acf/pre_update_value
acf_update_value
Updates the value for a given field and post_id.
Использование
add_filter( 'acf/pre_update_value', 'wp_kama_acf_pre_update_value_filter', 10, 3 ); /** * Function for `acf/pre_update_value` filter-hook. * * @param mixed $value The new value. * @param int|string $post_id The post id. * @param $field * * @return mixed */ function wp_kama_acf_pre_update_value_filter( $value, $post_id, $field ){ // filter... return $value; }
- $value(разное)
- The new value.
- $post_id(int|строка)
- The post id.
- $field
- -
Список изменений
С версии 5.0.0 | Введена. |
Где вызывается хук
acf/pre_update_value
acf/includes/acf-value-functions.php 200
$check = apply_filters( 'acf/pre_update_value', null, $value, $post_id, $field );