[wp-trac] [WordPress Trac] #12706: Custom post status bugs in the admin

WordPress Trac noreply at wordpress.org
Wed Jan 16 14:58:17 UTC 2013


#12706: Custom post status bugs in the admin
-------------------------------------------------+-------------------------
 Reporter:  ptahdunbar                           |       Owner:  ptahdunbar
     Type:  task (blessed)                       |      Status:  new
 Priority:  normal                               |   Milestone:  3.6
Component:  Post Types                           |     Version:  3.0
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch westi-likes needs-testing  |
  needs-refresh needs-unit-tests editorial-flow  |
-------------------------------------------------+-------------------------

Comment (by kovshenin):

 In [attachment:12706.3.diff]: still haven't touched any user facing parts,
 same as .2.diff with the following additions:

 * New `WP_Post_Status` class which is used by `register_post_status`,
 `register_post_type`, and possibly `register_post_status_for_object_type`
 (see #23169)
 * New status attribute `show_in_admin_status_dropdown` which tell whether
 the post status should be displayed in the Publish metabox dropdown. It
 defaults to false and basically prevents a bunch of custom statuses to
 suddenly show up for all post types after an upgrade to 3.6.
 * Another status attribute `priority` which defines whether a post goes
 through "Draft - Pending - Publish" or "Pending - Publish - Draft" so the
 one with the lowest priority (usually Draft) will also define what's the
 default status for new posts. A new function `_sort_post_statuses` which
 sorts by priority.
 * A `capabilities` array, for now only defines the `transition_post`
 capability map which defaults to `edit_post`, and set to `publish_post`
 for the Published post status. This allows us to check whether users can
 change a post to a certain status upon save, etc.

 Thoughts? Feedback? How does this look? Question: do you think
 `register_post_status` should be deprecated in favor of status
 registration with `register_post_type` and
 `register_post_status_for_object_type`?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12706#comment:135>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list