make post_submit_meta_box more generic
|Reported by:||themattharris||Owned by:|
|Component:||Posts, Post Types||Keywords:||needs-patch editorial-flow|
Currently there isn't a way to modify the meta boxes which set the post status. The function post_submit_meta_box in wp-admin/includes/meta-boxes.php is a closed function with post statuses hard coded. A new post status registered using register_post_status is available to the query object and plugins but cannot be added to the post status select box in the publish meta box.
A lot of the post_submit_meta_box is hardcoded to the default post status types.
Consider the use case where you want posts to only be visible to logged in users. A custom post status selectable by the user in add/edit post could be used which is then added or excluded in the query (filtered by posts_where) depending on whether the user is logged in or not. This way core can handle the non-visible posts the way private or future posts are handled.
Change History (25)
in reply to:
6 years ago
- Summary changed from a custom registered post status has no access to meta boxes to make post_submit_meta_box more generic
- Cc dromsey@… added
- Keywords changed from post_status, register_post_status, post_submit_meta_box, metaboxes to post_status register_post_status, post_submit_meta_box, metaboxes
- Keywords changed from post_status register_post_status, post_submit_meta_box, metaboxes to post_status register_post_status post_submit_meta_box metaboxes
- Keywords needs-patch added; post_status register_post_status post_submit_meta_box metaboxes removed
3 years ago
- Cc kovshenin added
- Keywords editorial-flow added
- Milestone changed from Future Release to 3.6