Make WordPress Core

Opened 11 years ago

Closed 7 years ago

Last modified 7 years 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
Priority: normal Milestone:
Component: Posts, Post Types Version: 4.3
Severity: normal Keywords: needs-patch bulk-reopened
Cc: Focuses:

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.


11 years ago

#2 @johnbillion
11 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
11 years ago

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

#4 @johnbillion
11 years ago

  • Milestone 4.4 → Future Release

#5 @johnbillion
11 years ago

#35095 was marked as a duplicate.

#8 @Mista-Flo
8 years ago

  • Keywords bulk-reopened added

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

#9 @johnbillion
7 years ago

  • Resolution → wontfix
  • Status assigned → closed

Closing due to lack of interest.

Note: See TracTickets for help on using tickets.