From 3e29193b980d3f8b8ec0d2a704e3c8f16f3077d2 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Mon, 5 Oct 2015 18:32:38 +0000 Subject: [PATCH] Revisions: Also pass the `$revision` post object to the `wp_prepare_revision_for_js` filter, introduced in [34541]. Props helen. Fixes #28627. git-svn-id: https://develop.svn.wordpress.org/trunk@34832 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/revision.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/revision.php b/src/wp-admin/includes/revision.php index db6ea9b570..3595226111 100644 --- a/src/wp-admin/includes/revision.php +++ b/src/wp-admin/includes/revision.php @@ -230,9 +230,10 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null * modified date matches the revision modified date (GMT-aware). * @type bool|false $restoreUrl URL if the revision can be restored, false otherwise. * } + * @param WP_Post $revision The revision's WP_Post object. * @param WP_Post $post The revision's parent WP_Post object. */ - $revisions[ $revision->ID ] = apply_filters( 'wp_prepare_revision_for_js', $revisions_data, $post ); + $revisions[ $revision->ID ] = apply_filters( 'wp_prepare_revision_for_js', $revisions_data, $revision, $post ); } /**