Make WordPress Core

Opened 6 years ago

Closed 20 months ago

Last modified 20 months ago

#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:


#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.


Change History (7)

This ticket was mentioned in Slack in #core by helen. View the logs.

6 years ago

#2 @johnbillion
6 years ago

  • Keywords needs-patch added

I'm giving a tentative +1 to this. It should handle both post_updated_messages and bulk_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.

#3 @johnbillion
5 years ago

  • Milestone changed from Awaiting Review to 4.4
  • Owner set to johnbillion
  • Status changed from new to assigned

#4 @johnbillion
5 years ago

  • Milestone changed from 4.4 to Future Release

#5 @johnbillion
5 years ago

#35095 was marked as a duplicate.

#8 @Mista-Flo
21 months ago

  • Keywords bulk-reopened added

Any news on this @johnbillion, is this still relevant ?

#9 @johnbillion
20 months ago

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

Closing due to lack of interest.

Note: See TracTickets for help on using tickets.