[wp-trac] [WordPress Trac] #28627: wp_prepare_revisions_for_js Should have more hooks/filters.
WordPress Trac
noreply at wordpress.org
Wed Jun 25 15:36:56 UTC 2014
#28627: wp_prepare_revisions_for_js Should have more hooks/filters.
-------------------------+-----------------------------------------
Reporter: jtsternberg | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Revisions | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses: javascript, administration
-------------------------+-----------------------------------------
Comment (by ericlewis):
Into it.
I don't see an immediate use case for overriding the settings array. For
the use case suggested (adding data to a revision model), I could see a
more specific filter applied when the
[https://core.trac.wordpress.org/browser/tags/3.9.1/src/wp-
admin/includes/revision.php#L166revision data's array is built].
a la
{{{
#!php
<?php
$revisions[$revision->ID] = apply_filters( 'wp_prepare_revision_for_js',
array( /* revision data */ ) );
}}}
The filter naming is for parity with the
[https://core.trac.wordpress.org/browser/tags/3.9.1/src/wp-
includes/media.php#L2644 wp_prepare_attachment_for_js filter].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28627#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list