#32532 closed enhancement (wontfix)
Add admin notification message text to array of labels when registering a custom post type
Reported by: | nathanrice | Owned by: | johnbillion |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.3 |
Component: | Posts, Post Types | Keywords: | needs-patch bulk-reopened |
Focuses: | Cc: |
Description
#14827 tried to cover this, but it ended up being reduced down to a mere public check.
The initial complain still stands, though. The $messages
array only handles posts, pages, and media. As it is now, you can register a CPT, change all the labels to make sure nothing references "Post(s)" and think you're good to go. Then you go to save an entry, and you get an ugly "Post Updated. View post" message. Not at all what you would expect.
If you want to change the messages for a CPT, you have to filter the array and inject them. Not terribly difficult, but it's a completely unnecessary step that really should be handled in the same way the labels are handled.
I have a rough solution in place for a plugin I manage. It's not perfect, but it's a good example of a possible way it could be handled.
https://github.com/copyblogger/simple-urls/blob/develop/plugin.php#L112
Change History (7)
This ticket was mentioned in Slack in #core by helen. View the logs.
9 years ago
#3
@
8 years ago
- Milestone changed from Awaiting Review to 4.4
- Owner set to johnbillion
- Status changed from new to assigned
I'm giving a tentative +1 to this. It should handle both
post_updated_messages
andbulk_post_updated_messages
, and we should do the same for taxonomies too.My Extended CPTs and Extended Taxos libraries demonstrate what the formatted strings should probably look like.
See also #17609.