_wp_post_revision_field_post_title filter-hookWP 3.6.0

Contextually filter a post revision field.

This is one of the variants of the dynamic hook _wp_post_revision_field_(field)

Usage

add_filter( '_wp_post_revision_field_post_title', 'wp_kama__wp_post_revision_field_title_filter', 10, 4 );

/**
 * Function for `_wp_post_revision_field_post_title` filter-hook.
 * 
 * @param string  $revision_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  $context        The context of whether the current revision is the old or the new one. Either 'to' or 'from'.
 *
 * @return string
 */
function wp_kama__wp_post_revision_field_title_filter( $revision_field, $field, $compare_from, $context ){

	// filter...
	return $revision_field;
}
$revision_field(string)
The current revision field to compare to or from.
$field(string)
The current revision field.
$compare_from(WP_Post)
The revision post object to compare to or from.
$context(string)
The context of whether the current revision is the old or the new one. Either 'to' or 'from'.

Changelog

Since 3.6.0 Introduced.

Where the hook is called

wp_get_revision_ui_diff()
_wp_post_revision_field_post_title
wp-admin/includes/revision.php 90
$content_from = $compare_from ? apply_filters( "_wp_post_revision_field_{$field}", $compare_from->$field, $field, $compare_from, 'from' ) : '';

Where the hook is used in WordPress

Usage not found.