*/ public function initPlugin() { self::registerSlideshowPostType(); self::registerSlideshowTaxonomy(); } /** * Register the slideshow post type * */ private function registerSlideshowPostType() { //register the slide post type $labels = array('name' => __('Slides', 'in-slideshow-plugin'), 'singular_name' => __('Slide', 'in-slideshow-plugin'), 'add_new' => __('Add New', 'in-slideshow-plugin'), 'add_new_item' => __('Add New Slide', 'in-slideshow-plugin'), 'edit_item' => __('Edit Slide', 'in-slideshow-plugin'), 'new_item' => __('New Slide', 'in-slideshow-plugin'), 'all_items' => __('All Slides', 'in-slideshow-plugin'), 'view_item' => __('View Slideshow', 'in-slideshow-plugin'), 'search_items' => __('Search Slides', 'in-slideshow-plugin'), 'not_found' => __('No slides found', 'in-slideshow-plugin'), 'not_found_in_trash' => __('No slides found in Trash', 'in-slideshow-plugin'), 'menu_name' => __('Slideshow', 'innd-slideshow-plugin')); $args = array('labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'rewrite' => array('slug' => 'slide'), 'supports' => array('title', 'thumbnail')); //Register the slide custom post type register_post_type(self::SLIDESHOW_POST_TYPE, $args); } /** * Register the slideshow taxonomy * */ private function registerSlideshowTaxonomy() { register_taxonomy(self::SLIDESHOW_TAXONOMY_TYPE, 'in-slideshow', array('hierarchical' => true, 'label' => 'Slideshow Group', 'query_var' => true, 'rewrite' => true, 'show_ui' => true, 'show_admin_column' => true)); } } } // Get the slideshow controller singleton $slideshowController = SlideshowController::getSingleton();