public function registerTaxonomy() {
        $namePlural = __('Topics', 'customer-feedback');
        $nameSingular = __('Topic', 'customer-feedback');

        $labels = array(
            'name'              => $namePlural,
            'singular_name'     => $nameSingular,
            'search_items'      => sprintf(__('Search %s', 'customer-feedback'), $namePlural),
            'all_items'         => sprintf(__('All %s', 'customer-feedback'), $namePlural),
            'parent_item'       => sprintf(__('Parent %s:', 'customer-feedback'), $nameSingular),
            'parent_item_colon' => sprintf(__('Parent %s:', 'customer-feedback'), $nameSingular) . ':',
            'edit_item'         => sprintf(__('Edit %s', 'customer-feedback'), $nameSingular),
            'update_item'       => sprintf(__('Update %s', 'customer-feedback'), $nameSingular),
            'add_new_item'      => sprintf(__('Add New %s', 'customer-feedback'), $nameSingular),
            'new_item_name'     => sprintf(__('New %s Name', 'customer-feedback'), $nameSingular),
            'menu_name'         => $nameSingular,
        );

        $args = array(
            'hierarchical'      => false,
            'labels'            => $labels,
            'show_ui'           => true,
            'show_admin_column' => true,
            'query_var'         => true,
            'meta_box_cb'       => false,
            'rewrite'           => array('slug' => 'topic'),
        );

        register_taxonomy('feedback_topic', array($this->postTypeSlug), $args);
    }
public function registerTaxonomy() {
        $namePlural = __('Topics', 'customer-feedback');
        $nameSingular = __('Topic', 'customer-feedback');

        $labels = array(
            'name'              => $namePlural,
            'singular_name'     => $nameSingular,
            'search_items'      => sprintf(__('Search %s', 'customer-feedback'), $namePlural),
            'all_items'         => sprintf(__('All %s', 'customer-feedback'), $namePlural),
            'parent_item'       => sprintf(__('Parent %s:', 'customer-feedback'), $nameSingular),
            'parent_item_colon' => sprintf(__('Parent %s:', 'customer-feedback'), $nameSingular) . ':',
            'edit_item'         => sprintf(__('Edit %s', 'customer-feedback'), $nameSingular),
            'update_item'       => sprintf(__('Update %s', 'customer-feedback'), $nameSingular),
            'add_new_item'      => sprintf(__('Add New %s', 'customer-feedback'), $nameSingular),
            'new_item_name'     => sprintf(__('New %s Name', 'customer-feedback'), $nameSingular),
            'menu_name'         => $nameSingular,
        );

        $args = array(
            'hierarchical'      => false,
            'labels'            => $labels,
            'show_ui'           => true,
            'show_admin_column' => true,
            'query_var'         => true,
            'meta_box_cb'       => false,
            'rewrite'           => array('slug' => 'topic'),
        );

        register_taxonomy('feedback_topic', array($this->postTypeSlug), $args);
    }
public function registerTaxonomy ( ) { $ namePlural = __ ( 'Topics' , 'customer-feedback' ) ; $ nameSingular = __ ( 'Topic' , 'customer-feedback' ) ; $ labels = array ( 'name' => $ namePlural , 'singular_name' => $ nameSingular , 'search_items' => sprintf ( __ ( 'Search %s' , 'customer-feedback' ) , $ namePlural ) , 'all_items' => sprintf ( __ ( 'All %s' , 'customer-feedback' ) , $ namePlural ) , 'parent_item' => sprintf ( __ ( 'Parent %s:' , 'customer-feedback' ) , $ nameSingular ) , 'parent_item_colon' => sprintf ( __ ( 'Parent %s:' , 'customer-feedback' ) , $ nameSingular ) . ':' , 'edit_item' => sprintf ( __ ( 'Edit %s' , 'customer-feedback' ) , $ nameSingular ) , 'update_item' => sprintf ( __ ( 'Update %s' , 'customer-feedback' ) , $ nameSingular ) , 'add_new_item' => sprintf ( __ ( 'Add New %s' , 'customer-feedback' ) , $ nameSingular ) , 'new_item_name' => sprintf ( __ ( 'New %s Name' , 'customer-feedback' ) , $ nameSingular ) , 'menu_name' => $ nameSingular , ) ; $ args = array ( 'hierarchical' => false , 'labels' => $ labels , 'show_ui' => true , 'show_admin_column' => true , 'query_var' => true , 'meta_box_cb' => false , 'rewrite' => array ( 'slug' => 'topic' ) , ) ; register_taxonomy ( 'feedback_topic' , array ( $ this -> postTypeSlug ) , $ args ) ; }
Register a 'topic' taxonomy for post type 'customer-feedback'.
Register a topic taxonomy for post type customer - feedback .