acf/format_value
Filters the $value for use in a template function.
Использование
add_filter( 'acf/format_value', 'wp_kama_acf_format_value_filter', 10, 3 ); /** * 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. * * @return mixed */ function wp_kama_acf_format_value_filter( $value, $post_id, $field ){ // filter... return $value; }
- $value(разное)
- The value to preview.
- $post_id(строка)
- The post ID for this value.
- $field(массив)
- The field array.
Список изменений
С версии 5.0.0 | Введена. |
Где вызывается хук
acf/format_value
acf/includes/acf-value-functions.php 172
$value = apply_filters( 'acf/format_value', $value, $post_id, $field );