WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 19 months ago

Last modified 11 months ago

#20930 closed enhancement (fixed)

register_taxonomy show_in_menu option

Reported by: wpsmith Owned by: ocean90
Milestone: 3.7 Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: has-patch 3.6-early
Focuses: Cc:

Description

Shouldn't taxonomies have a show_in_menu option for taxonomies as well. Of course, this would be the same as custom post types affecting the registration and the $parent_file.

The original attachment has the parent file logic via the filter, 'parent_file'.

Attachments (4)

taxonomy_submenu.php (1.2 KB) - added by wpsmith 3 years ago.
20930.patch (2.3 KB) - added by ocean90 2 years ago.
20930.diff (2.5 KB) - added by wonderboymusic 20 months ago.
20930.2.diff (3.9 KB) - added by ocean90 19 months ago.

Download all attachments as: .zip

Change History (13)

@wpsmith3 years ago

comment:1 @ryanduff3 years ago

  • Cc ryan@… added
  • Keywords needs-patch dev-feedback added; has-patch needs-testing removed

Yes. I think you should be able to show the menu and hide the metabox.

show_in_ui would set both to true, but you can set show_in_ui to false and show_in_menu to true to get the desired result and behavior you get with register_post_type

+1 for making this happen.

@ocean902 years ago

comment:2 @ocean902 years ago

  • Keywords has-patch 3.6-early added; needs-patch dev-feedback removed
  • Milestone changed from Awaiting Review to 3.5

Sad that this has missed the boat. Was on my plan for [21948].

comment:3 @ocean902 years ago

  • Milestone changed from 3.5 to Future Release

comment:4 @gableroux22 months ago

Can't figure out why this is not in wordpress core yet :\, very usefull.

@wonderboymusic20 months ago

comment:5 @wonderboymusic20 months ago

  • Milestone changed from Future Release to 3.7

was exploding, I refreshed

comment:6 @ocean9019 months ago

Created #25150 for the is_null() and doc fixes from 20930.diff.

Will do a refresh if it's in.

@ocean9019 months ago

comment:7 @ocean9019 months ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 25133:

Introduce show_in_menu for register_taxonomy.

Accepts boolean: true to show, false to hide. If not set, the default is inherited from show_ui.

fixes #20930.

comment:8 follow-up: @ciantic12 months ago

Now the "show_in_menu" works differently than "show_in_menu" in register_post_type. I don't see a reason why.

In register_post_type one can set "show_in_menu" as a string so that it appears in certain admin menu. With register_taxonomy it's not possible to relocate menu item.

comment:9 in reply to: ↑ 8 @SergeyBiryukov11 months ago

Replying to ciantic:

In register_post_type one can set "show_in_menu" as a string so that it appears in certain admin menu. With register_taxonomy it's not possible to relocate menu item.

Taxonomy is tied to an object type, so I guess relocating it make less sense than relocating a post type item.

However, I've just noticed that the parameter description is inaccurate, see #27943.

Note: See TracTickets for help on using tickets.