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)
comment:1 in reply to: ↑ description @scribu — 5 years ago
- Summary changed from a custom registered post status has no access to meta boxes to make post_submit_meta_box more generic
comment:13 @goto10 — 4 years ago
- 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
comment:14 @soficgr — 2 years ago
- Keywords changed from post_status register_post_status, post_submit_meta_box, metaboxes to post_status register_post_status post_submit_meta_box metaboxes
comment:15 @scribu — 2 years ago
- Keywords needs-patch added; post_status register_post_status post_submit_meta_box metaboxes removed
comment:16 @kovshenin — 2 years ago
- Cc kovshenin added
- Keywords editorial-flow added
- Milestone changed from Future Release to 3.6