Make WordPress Core

Opened 8 years ago

Last modified 8 years ago

#14827 closed defect (bug)

Clean Up Updated Messages and UI for custom post types — at Initial Version

Reported by: johnkolbert Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0.1
Component: Posts, Post Types Keywords: has-patch
Focuses: Cc:


I have two concerns with the post editor for custom post types. First, WordPress has built in generic notification messages when a post type is updated, saved as draft, etc. The only built in support is for posts and pages.

Custom post types must filter their own messages through 'post_updated_messages' filter independently. I propose a pre-built solution that automatically supports these custom update messages. Labels will be pulled from the $labels array defined when registering the custom post type. No new labels are needed, the existing ones are fine. My solution also adds a new filter {$post_type}_updated_messages, where developers can modify these generated messages as before if needed.

Secondly, custom post types listed as 'public' => false, and 'show_ui' => true are still shown "View Post", "Preview", and permalink editing boxes that all lead to a 404 error message. I propose checking if public is true before displaying these items.

I've attached a diff with these modifications. Feed back?

Change History (1)

Note: See TracTickets for help on using tickets.