[wp-trac] [WordPress Trac] #30232: Allow $revisions to be passed explicitly to wp_prepare_revisions_for_js()

WordPress Trac noreply at wordpress.org
Sat Nov 1 21:08:02 UTC 2014


#30232: Allow $revisions to be passed explicitly to wp_prepare_revisions_for_js()
-------------------------+-----------------------------
 Reporter:  ericlewis    |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Revisions    |    Version:  3.6
 Severity:  normal       |   Keywords:
  Focuses:  javascript   |
-------------------------+-----------------------------
 wp_prepare_revisions_for_js() assembles data for the Revisions experience.

 With some minor tweaking, we can open it up for alternative custom
 experiences.

 I'm currently working on a post forking plugin, which uses revisions as
 forks. Default revisions set their post status to inherit. My forks use
 normal post statuses to take advantage of our native publishing workflow.

 I'm reusing components of the revisions javascript stack where possible
 (see screenshot), but hitting a snag with wp_prepare_revisions_for_js().

 wp_prepare_revisions_for_js() grabs all revisions for a post and stuffs
 them into the data object passed back utilizing wp_get_post_revisions().
 This is problematic for me, because that function assumes all revisions
 have a post status of inherit.

 I'd like to suggest allowing an abstract group of $revisions to be passed
 into wp_prepare_revisions_for_js() which, when present, will be used
 instead of the deault query.

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


More information about the wp-trac mailing list