Opened 3 years ago
Last modified 3 years ago
#55895 new defect (bug)
Register custom post statuses
Reported by: | angryjim | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | dev-feedback needs-patch |
Focuses: | Cc: |
Description (last modified by )
When a developer register a custom post status with register_post_status()
The post status is not added to the visual parts of a post this means you can not set the post to this new status after register the new post status.
There have been several workarounds to this adding functions to get them visible but with recent WP versions this seems to have stopped working.
Another feature to add is regarding the get_post_statuses()
and get_page_statuses()
only returns a static array instead of checking the available post statues. There should also be a filter on this function to Add The correct label for your custom post status.
Things to improve:
- Expand get_post_statuses() and get_page_statuses() to actually return the registered statuses. Add a filter to be able to label your custom post status correctly.
- When custom post status is added it should also be available:
- In the post list overview the post status if not published should be in the name like (draft etc)
- When quick editing / bulk editing the options of all post status types should be available.
- When editing a post the post status should be available in the right settings column this should also work with the classic- and Gutenberg- mode.
There is an old ticket with large thread about similar issues here: #12706.
Improvement suggestion on the
get_post_status()
so it can be used to fetch all the registered post statues with a description label. Also add a filter to let the dev change the description.