[wp-trac] [WordPress Trac] #30232: Allow $revisions to be passed explicitly to wp_prepare_revisions_for_js()
WordPress Trac
noreply at wordpress.org
Tue Jan 12 15:33:29 UTC 2016
#30232: Allow $revisions to be passed explicitly to wp_prepare_revisions_for_js()
------------------------------------------------+--------------------------
Reporter: ericlewis | Owner:
Type: enhancement | adamsilverstein
Priority: normal | Status: reviewing
Component: Revisions | Milestone: Future
Severity: normal | Release
Keywords: has-patch 2nd-opinion dev-feedback | Version: 3.6
| Resolution:
| Focuses: javascript
------------------------------------------------+--------------------------
Comment (by adamsilverstein):
@ericlewis
Thanks for the detailed description: I looked at the patch and understand
its goal. The code seems sound and I don't have a problem with the
change...
Wondering however: could you achieve what you want with a filter on
`$revisions` right before the call to `wp_get_post_revisions`? This might
be a more flexible approach, allowing developers to readily alter the
`$revisions` object as they need, without calling the function directly.
It would also be a relatively smaller change.
What would you think of a filter approach?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30232#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list