From bdcc067c4cbf94b2cfd475abf9b7814c4d2608cb Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Mon, 23 Sep 2013 22:45:10 +0000 Subject: [PATCH] Inline documentation for hooks in wp-admin/includes/revision.php. Fixes #25283. Built from https://develop.svn.wordpress.org/trunk@25587 git-svn-id: http://core.svn.wordpress.org/trunk@25504 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/revision.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/wp-admin/includes/revision.php b/wp-admin/includes/revision.php index 2b3102f27d..ea714394ad 100644 --- a/wp-admin/includes/revision.php +++ b/wp-admin/includes/revision.php @@ -55,7 +55,22 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) { $return = array(); foreach ( _wp_post_revision_fields() as $field => $name ) { + /** + * Contextually filter a post revision field. + * + * The dynamic portion of the hook name, $field, corresponds to each of the post + * fields of the revision object being iterated over in a foreach statement. + * + * @since 3.6.0 + * + * @param string $compare_from->$field The current revision field to compare to or from. + * @param string $field The current revision field. + * @param WP_Post $compare_from The revision post object to compare to or from. + * @param string null The context of whether the current revision is the old or the new one. Values are 'to' or 'from'. + */ $content_from = $compare_from ? apply_filters( "_wp_post_revision_field_$field", $compare_from->$field, $field, $compare_from, 'from' ) : ''; + + //duplicate_hook $content_to = apply_filters( "_wp_post_revision_field_$field", $compare_to->$field, $field, $compare_to, 'to' ); $diff = wp_text_diff( $content_from, $content_to, array( 'show_split_view' => true ) );