WordPress at a glance
function is not described

wp_ajax_get_revision_diffs() WP 3.6.0

Ajax handler for getting revision diffs.

No Hooks.

Return

Null. Nothing.

Usage

wp_ajax_get_revision_diffs();

Changelog

Since 3.6.0 Introduced.

Code of wp ajax get revision diffs: wp-admin/includes/ajax-actions.php WP 5.2.2

<?php
function wp_ajax_get_revision_diffs() {
	require ABSPATH . 'wp-admin/includes/revision.php';

	if ( ! $post = get_post( (int) $_REQUEST['post_id'] ) ) {
		wp_send_json_error();
	}

	if ( ! current_user_can( 'edit_post', $post->ID ) ) {
		wp_send_json_error();
	}

	// Really just pre-loading the cache here.
	if ( ! $revisions = wp_get_post_revisions( $post->ID, array( 'check_enabled' => false ) ) ) {
		wp_send_json_error();
	}

	$return = array();
	@set_time_limit( 0 );

	foreach ( $_REQUEST['compare'] as $compare_key ) {
		list( $compare_from, $compare_to ) = explode( ':', $compare_key ); // from:to

		$return[] = array(
			'id'     => $compare_key,
			'fields' => wp_get_revision_ui_diff( $post, $compare_from, $compare_to ),
		);
	}
	wp_send_json_success( $return );
}