Make WordPress Core

Opened 13 years ago

Closed 11 years ago

#19069 closed defect (bug) (wontfix)

Admin menu generation doesn't check whether default post types have 'show_ui' as true

Reported by: kawauso's profile kawauso Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch
Focuses: administration Cc:

Description

While patching #19055, I found wp-admin/menu.php doesn't check whether default post types have 'show_ui' set to true. The Comments menu is also displayed regardless of whether available post types support comments or not.

Attachments (1)

19069.diff (5.2 KB) - added by kawauso 13 years ago.
First pass

Download all attachments as: .zip

Change History (6)

@kawauso
13 years ago

First pass

#1 @kawauso
13 years ago

  • Component changed from General to Administration
  • Keywords has-patch added

First pass at checking the show_ui flag and post type support for comments.

#2 @johnbillion
13 years ago

  • Cc johnbillion@… added

#3 @nacin
13 years ago

Technically speaking, there's no proper way to set show_ui to false for pages or posts. I'm not saying there shouldn't be, but there isn't a way to modify a post type definition. remove_menu_page() seems like a good alternative for now.

Generally speaking, post type support refers to UI only, but I'm not sure if comments should depend on the implicit situation where no post types are linked to them. Could comments be used for something else other than a direct post link? (Think orphaned attachments or terms attached to links or users — both odd situations we need to account for.)

#4 @jeremyfelt
11 years ago

  • Component changed from Administration to Menus
  • Focuses administration added

#5 @nacin
11 years ago

  • Component changed from Menus to Posts, Post Types
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

remove_menu_page() seems like a good alternative for now.

Note: See TracTickets for help on using tickets.