acf/format_value хук-фильтрACF 5.0.0

Filters the $value for use in a template function.

Использование

add_filter( 'acf/format_value', 'wp_kama_acf_format_value_filter', 10, 4 );

/**
 * Function for `acf/format_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.
 * @param boolean $escape_html Ask the field for a HTML safe version of it's output.
 *
 * @return mixed
 */
function wp_kama_acf_format_value_filter( $value, $post_id, $field, $escape_html ){

	// filter...
	return $value;
}
$value(разное)
The value to preview.
$post_id(строка)
The post ID for this value.
$field(массив)
The field array.
$escape_html(true|false)
Ask the field for a HTML safe version of it's output.

Список изменений

С версии 5.0.0 Введена.

Где вызывается хук

acf_format_value()
acf/format_value
acf/includes/acf-value-functions.php 191
$value = apply_filters( 'acf/format_value', $value, $post_id, $field, $escape_html );

Где используется хук в Advanced Custom Fields PRO

Использование не найдено.