[wp-trac] [WordPress Trac] #36836: Two different preview saving processes cause confusion with editorial teams

WordPress Trac noreply at wordpress.org
Fri May 13 21:05:54 UTC 2016


#36836: Two different preview saving processes cause confusion with editorial teams
-------------------------+-----------------------------
 Reporter:  sc0ttkclark  |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Revisions    |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 When `post_preview()` runs from the post editor when editing a draft, it
 will save over the draft if:

 * The post is not locked by someone else AND
 * You are the author of the post AND
 * The post status is currently 'draft' or 'auto-draft'

 However, when dealing with a published post, none of those are hit so an
 auto-save is created with `wp_create_post_autosave()`.

 This establishes two separate workflows for an editorial team to be aware
 of:

 * In some cases, when previewing a post, your changes will '''overwrite'''
 the current post
 * In other cases, when previewing a post, your changes will safely be
 saved to a new autoave for preview purposes

 I propose we '''always run''' `wp_create_post_autosave()`, even if the
 post is a draft, removing the `edit_post()` call in `post_preview()` if
 the post status is a draft / auto-draft. This establishes clear and
 consistent saving handling when previewing a post.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36836>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list