diff --git a/wp-admin/includes/revision.php b/wp-admin/includes/revision.php index 67bb56c761..756a1dd500 100644 --- a/wp-admin/includes/revision.php +++ b/wp-admin/includes/revision.php @@ -199,7 +199,7 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null $current_id = $revision->ID; } - $revisions[ $revision->ID ] = array( + $revisions_data = array( 'id' => $revision->ID, 'title' => get_the_title( $post->ID ), 'author' => $authors[ $revision->post_author ], @@ -210,6 +210,16 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null 'current' => $current, 'restoreUrl' => $can_restore ? $restore_link : false, ); + + /** + * Filter the array of revisions used on the revisions screen. + * + * @since 4.4.0 + * + * @param array $revisions_data The bootstrapped data for the revisions screen. + * @param WP_Post $post The revision's parent WP_Post object. + */ + $revisions[ $revision->ID ] = apply_filters( 'wp_prepare_revision_for_js', $revisions_data, $post ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index fd9b5ad3ac..8d7b9ea251 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34540'; +$wp_version = '4.4-alpha-34541'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.