[wp-trac] [WordPress Trac] #30586: Taxonomy (register_taxonomy)

WordPress Trac noreply at wordpress.org
Wed Dec 3 13:33:28 UTC 2014


#30586: Taxonomy (register_taxonomy)
-------------------------+------------------------------
 Reporter:  iammathews   |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Taxonomy     |     Version:  4.0.1
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  administration
-------------------------+------------------------------

Comment (by iammathews):

 As read on the codex - 'not_found' (3.6+) - the text displayed via
 clicking 'Choose from the most used tags' in the taxonomy meta box when no
 tags are available. '''This string is not used on hierarchical
 taxonomies'''.

 It's as if 'not_found' gets ignored. Here's the code:

 {{{
 add_action( 'init', 'register_programme_types', 0 );
 function register_programme_types(){
         $labels = array(
                 'name'              => _x( 'Programme Types', '' ),
                 'singular_name'     => _x( 'Type', '' ),
                 'menu_name'         => __( 'Programme Types' ),
                 'all_items'         => __( 'All Types' ),
                 'edit_item'         => __( 'Edit Type' ),
                 'view_item'         => __( 'View Type' ),
                 'update_item'       => __( 'Update Type' ),
                 'add_new_item'      => __( 'Add New Type' ),
                 'new_item_name'     => __( 'New Type Name' ),
                 'parent_item'       => __( 'Parent Type' ),
                 'parent_item_colon' => __( 'Parent Type:' ),
                 'search_items'      => __( 'Search Types' ),
                 'not_found'         => __( 'No types found.' ),
         );

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

         register_taxonomy( 'types', array( 'programmes' ), $args );
 }
 }}}


 [[Image(http://build.yusrimathews.co.za/tax-no-items.PNG)]]

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30586#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list