acf/preview_value filter-hookACF 5.5.0

Filters the $value before used in HTML.

Usage

add_filter( 'acf/preview_value', 'wp_kama_acf_preview_value_filter', 10, 3 );

/**
 * Function for `acf/preview_value` filter-hook.
 * 
 * @param mixed  $value   The value to preview.
 * @param string $post_id The post ID for this value.
 * @param array  $field   The field array.
 *
 * @return mixed
 */
function wp_kama_acf_preview_value_filter( $value, $post_id, $field ){
	// filter...
	return $value;
}
$value(mixed)
The value to preview.
$post_id(string)
The post ID for this value.
$field(array)
The field array.

Changelog

Since 5.5.0 Introduced.

Where the hook is called

acf_preview_value()
acf/preview_value
acf/includes/acf-value-functions.php 378
return apply_filters( 'acf/preview_value', $value, $post_id, $field );

Where the hook is used in Advanced Custom Fields PRO

Usage not found.