#56687 closed defect (bug) (worksforme)
Post Updated Messages are not working with Gutenberg
| Reported by: | Pratik Jain | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Posts, Post Types | Version: | 6.0.2 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
post_updated_messages filter is not working with Gutenberg for custom post type.
I have a custom post type named 'news' and I have added a post_updated_messages filter to change its respective messages like 'News updated', 'News published' and etc.
I have enabled the Gutenberg editor with a custom post type.
Now when I update the news post then it says 'Post updated. View News Item'. I think it should be 'News updated. View News Item'.
When I checked the same thing with WordPress default page then it says 'Page updated. View Page'.
Attachments (2)
Change History (5)
#1
@
4 years ago
Have you tried setting the item_updated post type label for your post type instead of using this filter?
If I look at the history of https://github.com/WordPress/gutenberg/issues/3315 it's basically impossible to respect this filter in Gutenberg.
So if you need a filter like this in JS to completely customize the message then I don't think it works.
#2
@
4 years ago
- Resolution → worksforme
- Status new → closed
Hi @swissspidy
Thanks for your update. I have used item_updated filters and yes, it is working properly. Thanks for your assistance. You can mark this as a resolved.
More labels can be find over here.
https://developer.wordpress.org/reference/functions/get_post_type_labels/
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Custom Post Type Update Message