acf/pre_format_value
Returns a formatted version of the provided value.
Использование
add_filter( 'acf/pre_format_value', 'wp_kama_acf_pre_format_value_filter', 10, 4 );
/**
* Function for `acf/pre_format_value` filter-hook.
*
* @param mixed $value The field value.
* @param integer|string $post_id The post id.
* @param array $field The field array.
* @param $escape_html
*
* @return mixed
*/
function wp_kama_acf_pre_format_value_filter( $value, $post_id, $field, $escape_html ){
// filter...
return $value;
}
- $value(разное)
- The field value.
- $post_id(int|строка)
- The post id.
- $field(массив)
- The field array.
- $escape_html
- -
Список изменений
| С версии 5.0.0 | Введена. |
Где вызывается хук
acf/pre_format_value
acf/includes/acf-value-functions.php 175
$check = apply_filters( 'acf/pre_format_value', null, $value, $post_id, $field, $escape_html );