[wp-trac] [WordPress Trac] #12706: Custom post status bugs in the admin
WordPress Trac
wp-trac at lists.automattic.com
Sun Oct 3 18:45:51 UTC 2010
#12706: Custom post status bugs in the admin
----------------------------+-----------------------------------------------
Reporter: ptahdunbar | Owner: ptahdunbar
Type: task (blessed) | Status: new
Priority: normal | Milestone: 3.1
Component: Post Types | Version:
Severity: normal | Keywords: needs-patch
----------------------------+-----------------------------------------------
Comment(by ptahdunbar):
Alright, let's get this ticket moving. There's a few args in the current
version of register_post_status that either make no sense, are redundant,
or ones that I just don't understand and could use some clarification.
Here's the new params for the register function:
{{{
register_post_status( $post_status, $post_type, $args = array() );
}}}
'''Parameters:'''
* $post_status (string) - Name of the post status.
* $post_type (mixed) - string or array of post types to assign to the
post status.
* $args (array) - Optional.
'''Public args:'''
* label - A descriptive name for the post status. Defaults to
$post_status
* label_count - Label used in the admin status links to display the post
status' singular/plural count label. Defaults to label
* post_type - An array containing post types this post status is
associated with. Defaults to 'any'.
* exclude_from_search - Whether to exclude posts with this post status
from search results. Defaults to null.
* public - Whether posts of this type should be shown in the admin UI.
Defaults to null.
* internal - Whether the post status is internal. Removes from any
ui/query listing.
* protected - User must have edit permissions on the draft to preview.
Defaults to null.
* private - Limited to viewing by the author of a post or someone who has
caps to read private states. Defaults to null.
* publicly_queryable - Whether post status queries can be performed from
the front page. Defaults to null.
* show_ui - Whether to show the post status in the admin UI. Defaults to
null.
* edit_cap: changing the post status can be limited by capability. If
set, users must have the declared capability to change change posts to
this post status. Defaults to null.
'''Internal args:''' (Used by WP core built-in post statuses)
* _builtin - If this post status is a native or "built-in".
'''Args I left out:''' (can anyone explain the need for these?)
* show_in_admin_all
* show_in_admin_status_list
* show_in_admin_all_list (uses show_ui instead)
* single_view_cap
* capability_type
* hierarchical
* _edit_link
'''Functions that (most likely) need updates:'''
* get_available_post_statuses
* wp_edit_posts_query
* get_post_statuses
* get_page_statuses
* post_submit_meta_box
'''Files that need updates'''
* edit.php:261
* export.php:55,:132 (do we need a can_export arg?)
* query.php:2234
* script-loader.php & post.dev.js
See #12567
Thoughts?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12706#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list