function hocwp_setup_theme_new_post_type_and_taxonomy() { $args = array('name' => 'Sidebars', 'singular_name' => 'Sidebar', 'slug' => 'hocwp_sidebar', 'show_in_menu' => '', 'labels' => array('all_items' => 'Sidebars')); hocwp_register_post_type_private($args); if (hocwp_wc_installed()) { $args = array('name' => 'Product Tabs', 'singular_name' => 'Product Tab', 'slug' => 'hocwp_product_tab', 'show_in_menu' => '', 'labels' => array('all_items' => 'Product Tabs'), 'supports' => array('editor')); hocwp_register_post_type_private($args); } $args = array('name' => 'Sliders', 'singular_name' => 'Slider', 'slug' => 'hocwp_slider', 'show_in_menu' => '', 'labels' => array('all_items' => 'Sliders')); hocwp_register_post_type_private($args); $args = array('name' => 'Ads', 'singular_name' => 'Ads', 'slug' => 'hocwp_ads', 'show_in_menu' => '', 'labels' => array('all_items' => 'Ads')); hocwp_register_post_type_private($args); $user_subscribe = apply_filters('hocwp_allow_user_subscribe', false); if ($user_subscribe) { $args = array('name' => 'Subscribers', 'singular_name' => 'Subscriber', 'slug' => 'hocwp_subscriber', 'show_in_menu' => '', 'labels' => array('all_items' => 'Subscribers')); hocwp_register_post_type_private($args); } }
public function register_post_type() { $args = array('name' => __('String Translation', 'hocwp-theme'), 'slug' => 'hocwp_mo'); hocwp_register_post_type_private($args); }
function hocwp_register_post_type_mega_menu($args = array()) { $defaults = array('name' => __('Mega Menus', 'hocwp-theme'), 'singular_name' => __('Mega Menu', 'hocwp-theme'), 'slug' => 'hocwp_mega_menu'); $args = wp_parse_args($defaults, $args); hocwp_register_post_type_private($args); }