Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#13144 closed defect (bug) (fixed)

Hide custom post type in Menu UI if Show_UI = False

Reported by: williamsba1 Owned by: williamsba1
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Menus Keywords:
Focuses: Cc:


Currently the menu system lists custom post types which is great! If the post type parameter Public is False it doesn't show in the menu UI, but it does if Show_UI is False.

However if Show_UI is False the custom post type menu is hidden on the admin dashboard. I would also expect the custom post type to be hidden from the Menu UI as well.

Attachments (1)

nav-menu.patch (480 bytes) - added by williamsba1 5 years ago.

Download all attachments as: .zip

Change History (9)

#1 @ryan
5 years ago

  • Component changed from General to Menus
  • Owner set to filosofo

#2 @williamsba1
5 years ago

Added patch to only show custom post type in Menu UI is show_UI is True

#3 @filosofo
5 years ago

  • Owner changed from filosofo to williamsba1
  • Status changed from new to assigned

#4 @nacin
5 years ago

  • Milestone changed from Unassigned to 3.0

show_ui is false for pages and posts.

We're thinking about a new export flag that defaults to whatever public is set to. Perhaps a similar flag here, to default what public is set to?

I'm actually alright with leaving it at public though. There's probably a filter to remove it (that said, a flag would be nice).

Moving to 3.0 so we handle it here.

#5 follow-up: @ryan
5 years ago

show_in_menus ?

#6 in reply to: ↑ 5 @nacin
5 years ago

Replying to ryan:

show_in_menus ?

That works for me.

#7 @ryan
5 years ago

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

(In [14602]) Add show_in_nav_menus flag to post type registration. Props williamsba1. fixes #13144

#8 @ryan
5 years ago

Went with show_in_nav_menus to avoid confusion with the admin menus.

Note: See TracTickets for help on using tickets.