[wp-trac] [WordPress Trac] #13382: _wp_post_revision_fields filter is not very useful

WordPress Trac noreply at wordpress.org
Wed Sep 2 02:10:53 UTC 2015


#13382: _wp_post_revision_fields filter is not very useful
------------------------------------+------------------------------
 Reporter:  mdawaffe                |       Owner:  adamsilverstein
     Type:  enhancement             |      Status:  assigned
 Priority:  normal                  |   Milestone:  Future Release
Component:  Revisions               |     Version:  3.0
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------
Changes (by adamsilverstein):

 * keywords:  needs-patch => has-patch dev-feedback
 * owner:   => adamsilverstein
 * status:  new => assigned


Comment:

 In [attachment:13382.diff]:
 * Adjust `_wp_post_revision_fields()` function to allow passing WP_Post
 object
 * Add $post/$revision context to all internal uses of
 `_wp_post_revision_fields()`
 * Add the $post (array) as an additional parameter to the
 `_wp_post_revision_fields` filter, giving you the context you need to
 determine post_type, or any other post meta information you might need.
 * Adjust the doc blocks to reflect the new function and filter parameters.

 Appreciate any feedback, I think adding the $post context makes the
 `_wp_post_revision_fields` filter more useful.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/13382#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list