plugin development - Customize Message

admin2025-01-07  5

I am developing a Plugin. I would like to Customize Message. When I delete any post I am getting message 1 post moved to the Trash. and when I delete a post from trash I am getting message 1 post permanently deleted.. I am getting message No posts found in Trash. at the table of list.

How can I customize those messages ?

I would like to customize like below.

1 post moved to the Trash. ---> 1 Game moved to the Trash.

1 post permanently deleted. ---> 1 Game permanently deleted.

No posts found in Trash. ---> No Games found in Trash.

I am developing a Plugin. I would like to Customize Message. When I delete any post I am getting message 1 post moved to the Trash. and when I delete a post from trash I am getting message 1 post permanently deleted.. I am getting message No posts found in Trash. at the table of list.

How can I customize those messages ?

I would like to customize like below.

1 post moved to the Trash. ---> 1 Game moved to the Trash.

1 post permanently deleted. ---> 1 Game permanently deleted.

No posts found in Trash. ---> No Games found in Trash.

Share Improve this question asked Dec 5, 2024 at 8:39 abu abuabu abu 2031 silver badge9 bronze badges 2
  • 1 you can customise that with the filter bulk_post_updated_messages. – mmm Commented Dec 5, 2024 at 12:38
  • 1 It might make sense to create a custom post type called Game. That way Games will have their own appropriate messages, while other content like Posts and Pages can say the Post or Page has been moved to the trash, etc. – WebElaine Commented Dec 5, 2024 at 15:06
Add a comment  | 

1 Answer 1

Reset to default 1

Those messages are specified in the labels argument to register_post_type(), there's a full list of them here.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736263049a861.html

最新回复(0)