WordPress at a glance
filter is not described

wp_prepare_revision_for_js filter-hook . WP 4.4.0

Filters the array of revisions used on the revisions screen.

Usage

add_filter( 'wp_prepare_revision_for_js', 'filter_function_name_6028', 10, 3 );
function filter_function_name_6028( $revisions_data, $revision, $post ){
	// filter...

	return $revisions_data;
}
$revisions_data(array)

The bootstrapped data for the revisions screen.

  • $id (int)
    Revision ID.

  • $title (string)
    Title for the revision's parent WP_Post object.

  • $author (int)
    Revision post author ID.

  • $date (string)
    Date the revision was modified.

  • $dateShort (string)
    Short-form version of the date the revision was modified.

  • $timeAgo (string)
    GMT-aware amount of time ago the revision was modified.

  • $autosave (true/false)
    Whether the revision is an autosave.

  • $current (true/false)
    Whether the revision is both not an autosave and the post modified date matches the revision modified date (GMT-aware).

  • $restoreUrl (true/false/false)
    URL if the revision can be restored, false otherwise.
$revision(WP_Post)
The revision's WP_Post object.
$post(WP_Post)
The revision's parent WP_Post object.

Where the hook is called

wp_prepare_revisions_for_js()
wp_prepare_revision_for_js
wp-admin/includes/revision.php 237
$revisions[ $revision->ID ] = apply_filters( 'wp_prepare_revision_for_js', $revisions_data, $revision, $post );

Where the hook is used (in WP core)

Does not used.