开发者 | welly2103 |
---|---|
更新时间 | 2024年3月19日 02:45 |
PHP版本: | 7.2 及以上 |
WordPress版本: | 6.2 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
/wp-content/plugins/
directoryStatuses
in posts menuAs there is no core hook to add new items to the status dropdown in posts and in the quick edit view, js is required to achieve this. It is definently the most dirty way, but WP Core does not provide other ways to do it. There is an open trac ticket fo this circumstance: https://core.trac.wordpress.org/ticket/12706
Since all custom statuses would no longer be available, deleting the plugin will reset all posts, pages etc. with an custom status to the draft status. This step cannot be undone by reinstalling the plugin! However, the plugin can be deactivated without any problems (see "What happens when I delete a status or deactivate the plugin?").
Be careful, posts without a valid status will be hidden! Just change the status of your post with a custom status to a system status (e.g. publish or draft) before you delete a custom status or deactivate the plugin. Your posts will never be deleted, but you need to know your old status slugs once you have deleted a status or deactivated the plugin to get your posts back.
The "Hide in admin drop downs" option only hides the status if the current post doesn't have the status. As long as your post has the hidden status, the drop down will still show it.
To avoid misunderstandings in handling with own custom statuses, the button has been named more generally and is now just called Save. Likewise, the message that a post has been published has been renamed. This now only indicates that a post has been saved. The indicator whether a post is published or not should always be the status and not a message or button label. Furthermore, the publishing sidebar of Gutenberg has been removed.