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

WordPress Trac noreply at wordpress.org
Mon Feb 4 04:29:26 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 danielbachhuber):

 12706.db.2.diff is my first patch plus the following:

 * Abstraction of the Publish meta box such that custom moderation statuses
 can appear in the dropdown, and contributors can submit to the next
 moderation status.
 * `_post_states()`, which is used in the Manage Posts list tables, will
 now add all 'protected' statuses, which includes 'draft', 'pending', and
 'private'
 * Implementation of a 'labels' argument when registering custom post
 statuses
 * `get_sample_permalink()`, and editing a post slug, no longer breaks when
 a post is saved to a custom moderation status

 If you apply the patch, you'll notice there's a JS error when you change a
 post to a custom moderation status and hit "OK". There's a @todo marker in
 the patch for this. Essentially, I'm loading the post status data to the
 clientside using the script loader. The script loader fires too early
 though (on init:0) for any custom statuses to be registered.

 At least these two big areas still need to be touched:

 * QuickPress / PressThis
 * XML-RPC

 Here are some pieces I ran into confusion about:

 ''wp-admin/includes/post.php:post_preview()''
 * 'draft' posts fire edit_post(), where as others do
 wp_create_post_autosave()
 * Two ways of redirecting to a preview link depending on draft vs. pending

 ''wp-admin/includes/post.php:_wp_translate_postdata()''
 * A bunch of different types of input buttons are interpreted

 ''wp-admin/includes/post.php:wp_edit_posts_query()''
 * Couple of hardcoded references to 'draft' and 'pending'

 Lastly, I've started logging the individual changes I'm making (and
 justification) on my Github fork:
 https://github.com/danielbachhuber/WordPress/compare/master...12706
 -custom-status

 Would love to have others play with this code and offer feedback during
 Tuesday's chat.

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


More information about the wp-trac mailing list