<?php
function portfolios()
{
    $labels = array(
        'name' => __('Portfolios', TEXT_DOMAIN),
        'singular_name' => __('Portfolios', TEXT_DOMAIN),
        'add_new' => __('Add Portfolio', TEXT_DOMAIN),
        'add_new_item' => __('Add Portfolio New',TEXT_DOMAIN),
        'edit_item' => __('Edit Portfolio',TEXT_DOMAIN),
        'new_item' => __('Post Portfolio',TEXT_DOMAIN),
        'all_items' => __('All Portfolios',TEXT_DOMAIN),
        'view_item' => __('Show Portfolio',TEXT_DOMAIN),
        'search_items' => __('Search For Portfolios',TEXT_DOMAIN),
        'not_found' => __('Portfolios Not Found',TEXT_DOMAIN),
        'not_found_in_trash' => __('Portfolios Not Found In Trash',TEXT_DOMAIN),
        'parent_item_colon' => '',
        'menu_name' => __('Portfolios',TEXT_DOMAIN),
    );
    $args = array(
        'labels' => $labels,
        'description' => '',
        'public' => true,
        'menu_position' => 12,
        'taxonomies' => array('portfolio_cat'),
        'supports' => array('title', 'editor','thumbnail'),
        'has_archive' => true,
        'show_in_rest' => true,
        'rest_base' => 'portfolio',
        'rest_controller_class' => 'WP_REST_Posts_Controller',
        'menu_icon' => 'dashicons-portfolio'
    );
    register_post_type('portfolios', $args);
}
add_action('init', 'portfolios');

function feedbacks()
{
    $labels = array(
        'name' => __('Feedbacks', TEXT_DOMAIN),
        'singular_name' => __('Feedbacks', TEXT_DOMAIN),
        'add_new' => __('Add Feedback', TEXT_DOMAIN),
        'add_new_item' => __('Add Feedback New',TEXT_DOMAIN),
        'edit_item' => __('Edit Feedback',TEXT_DOMAIN),
        'new_item' => __('Post Feedback',TEXT_DOMAIN),
        'all_items' => __('All Feedbacks',TEXT_DOMAIN),
        'view_item' => __('Show Feedback',TEXT_DOMAIN),
        'search_items' => __('Search For Feedback',TEXT_DOMAIN),
        'not_found' => __('Feedback Not Found',TEXT_DOMAIN),
        'not_found_in_trash' => __('Feedback Not Found In Trash',TEXT_DOMAIN),
        'parent_item_colon' => '',
        'menu_name' => __('Feedbacks',TEXT_DOMAIN),
    );

    $args = array(
        'labels' => $labels,
        'description' => '',
        'taxonomies' => array(),
        'menu_position' => 13,
        'supports' => array('title','thumbnail'),
        'has_archive' => false,
        'show_in_rest' => true,
        'rest_base' => 'feedbacks',
        'rest_controller_class' => 'WP_REST_Posts_Controller',
        'menu_icon' => 'dashicons-format-chat',
        'public' => true,
        'show_ui' => true, // Still show in admin
        'show_in_menu' => true, // Still show in admin menu
        'publicly_queryable' => false, // No single post view
    );
    register_post_type('feedbacks', $args);
}
add_action('init', 'feedbacks');

function team()
{
    $labels = array(
        'name' => _x('Team Members', TEXT_DOMAIN),
        'singular_name' => _x('Team Members', TEXT_DOMAIN),
        'add_new' => __('Add New Member', TEXT_DOMAIN),
        'add_new_item' => __('Add New Member',TEXT_DOMAIN),
        'edit_item' => __('Edit Member',TEXT_DOMAIN),
        'new_item' => __('Post Member New',TEXT_DOMAIN),
        'all_items' => __('All Team Members',TEXT_DOMAIN),
        'view_item' => __('Show Team Member',TEXT_DOMAIN),
        'search_items' => __('Search For Team Member',TEXT_DOMAIN),
        'not_found' => __('Team Member Not Found',TEXT_DOMAIN),
        'not_found_in_trash' => __('Team Member Not Found In Trash',TEXT_DOMAIN),
        'parent_item_colon' => '',
        'menu_name' => __('Team Members',TEXT_DOMAIN),
    );
    $args = array(
        'labels' => $labels,
        'description' => '',
        'taxonomies' => array(),
        'menu_position' => 14,
        'supports' => array('title','thumbnail'),
        'has_archive' => false,
        'show_in_rest' => true,
        'rest_base' => 'team',
        'rest_controller_class' => 'WP_REST_Posts_Controller',
        'menu_icon' => 'dashicons-groups',

        'public' => true,
        'show_ui' => true, // Still show in admin
        'show_in_menu' => true, // Still show in admin menu
        'publicly_queryable' => false, // No single post view
    );
    register_post_type('team', $args);
}
add_action('init', 'team');

function alerts()
{
    $labels = array(
        'name' => _x('Alerts', TEXT_DOMAIN),
        'singular_name' => _x('Alerts', TEXT_DOMAIN),
        'add_new' => __('Add New Alert', TEXT_DOMAIN),
        'add_new_item' => __('Add New Alert',TEXT_DOMAIN),
        'edit_item' => __('Edit Alert',TEXT_DOMAIN),
        'new_item' => __('Post Alert New',TEXT_DOMAIN),
        'all_items' => __('All Alerts',TEXT_DOMAIN),
        'view_item' => __('Show Alert',TEXT_DOMAIN),
        'search_items' => __('Search For Alert',TEXT_DOMAIN),
        'not_found' => __('Alert Not Found',TEXT_DOMAIN),
        'not_found_in_trash' => __('Alert Not Found In Trash',TEXT_DOMAIN),
        'parent_item_colon' => '',
        'menu_name' => __('Alerts',TEXT_DOMAIN),
    );
    $args = array(
        'labels' => $labels,
        'description' => '',
        'taxonomies' => array(),
        'menu_position' => 14,
        'supports' => array('title','editor'),
        'has_archive' => false,
        'show_in_rest' => true,
        'rest_base' => 'team',
        'rest_controller_class' => 'WP_REST_Posts_Controller',
        'menu_icon' => 'dashicons-bell',
        'public' => true,
        'show_ui' => true, // Still show in admin
        'show_in_menu' => true, // Still show in admin menu
        'publicly_queryable' => false, // No single post view
    );
    register_post_type('alerts', $args);
}
add_action('init', 'alerts');

function stories()
{
    $labels = array(
        'name' => __('Stories', TEXT_DOMAIN),
        'singular_name' => __('Stories', TEXT_DOMAIN),
        'add_new' => __('Add Story', TEXT_DOMAIN),
        'add_new_item' => __('Add Story New',TEXT_DOMAIN),
        'edit_item' => __('Edit Story',TEXT_DOMAIN),
        'new_item' => __('Post Story',TEXT_DOMAIN),
        'all_items' => __('All Stories',TEXT_DOMAIN),
        'view_item' => __('Show Story',TEXT_DOMAIN),
        'search_items' => __('Search For Story',TEXT_DOMAIN),
        'not_found' => __('Story Not Found',TEXT_DOMAIN),
        'not_found_in_trash' => __('Story Not Found In Trash',TEXT_DOMAIN),
        'parent_item_colon' => '',
        'menu_name' => __('Stories',TEXT_DOMAIN),
    );
    $args = array(
        'labels' => $labels,
        'description' => '',
        'taxonomies' => array(),
        'menu_position' => 13,
        'supports' => array('title','thumbnail'),
        'has_archive' => false,
        'show_in_rest' => true,
        'rest_base' => 'stories',
        'rest_controller_class' => 'WP_REST_Posts_Controller',
        'menu_icon' => 'dashicons-controls-play',

        'public' => true,
        'show_ui' => true, // Still show in admin
        'show_in_menu' => true, // Still show in admin menu
        'publicly_queryable' => false, // No single post view
    );
    register_post_type('stories', $args);
}
add_action('init', 'stories');
