Make WordPress Core

Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#10773 closed defect (bug) (fixed)

Blank submenu entry created when register_taxonomy arg "label" set to false.

Reported by: batmoo Owned by: dd32
Milestone: 3.0 Priority: low
Severity: minor Version: 2.8.4
Component: Taxonomy Keywords: needs-patch
Focuses: Cc:


Setting label as false (as suggested in ##9945) when calling register_taxonomy creates a blank submenu entry under "Posts". The entry has a valid link that goes to a "Tags" page for the registered taxonomy; this page should be accessible.

Sample function call:
register_taxonomy( 'test', 'post', array('hierarchical' => false, 'update_count_callback' => '_update_post_term_count', 'label' => false, 'query_var' =>false, 'rewrite' => false) );

Change needs to be made in wp-admin/menu.php to check if the taxonomy has a valid label entry before creating submenu item.

Attachments (1)

menu.diff (536 bytes) - added by batmoo 12 years ago.

Download all attachments as: .zip

Change History (11)

#1 @batmoo
12 years ago

  • Owner changed from filosofo to batmoo
  • Status changed from new to accepted

#2 @dd32
12 years ago

  • Keywords needs-patch added
  • Milestone changed from Unassigned to 2.9

batmoo: Are you going to supply a patch?

#3 @batmoo
12 years ago

Yep, have a patch ready, just need to create the diff.

12 years ago


#4 @batmoo
12 years ago

  • Keywords has-patch added; needs-patch removed

Patch added.

#5 @westi
12 years ago

  • Cc westi added
  • Keywords needs-patch added; has-patch removed

Setting the label to false sounds like a horrid hack here.

I think it would be better to improve the function as you suggested in #9945 to give the code registering the plugin more control.

It would also probably be good to move the defaults for label out to the registration function to make it obvious it can be overloaded.

Do you fancy working up a patch for this?

#6 @azaozz
11 years ago

  • Milestone changed from 2.9 to Future Release

#7 @dd32
11 years ago

  • Milestone changed from Future Release to 3.0
  • Owner changed from batmoo to dd32

#8 @dd32
11 years ago

(In [13216]) First pass at giving taxonomies a show_ui param. See #10773

#9 @dd32
11 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

Re-open if there are any remaining issues regarding show_ui w/ taxonomies.

#10 @Denis-de-Bernardy
11 years ago

see also #10437, which I'm itching to close as fixed dup.

Note: See TracTickets for help on using tickets.