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 | 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)
Change History (6)
#1
@
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.
#3
@
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.)
First pass