acf/pre_load_value
Retrieves the value for a given field and post_id.
Использование
add_filter( 'acf/pre_load_value', 'wp_kama_acf_pre_load_value_filter', 10, 2 ); /** * Function for `acf/pre_load_value` filter-hook. * * @param int|string $post_id The post id. * @param $field * * @return int|string */ function wp_kama_acf_pre_load_value_filter( $post_id, $field ){ // filter... return $post_id; }
- $post_id(int|строка)
- The post id.
- $field
- -
Список изменений
С версии 5.0.0 | Введена. |
Где вызывается хук
acf/includes/acf-value-functions.php 55
$value = apply_filters( 'acf/pre_load_value', null, $post_id, $field );
Где используется хук в Advanced Custom Fields PRO
acf/includes/forms/form-customizer.php 236
add_filter( 'acf/pre_load_value', array( $this, 'pre_load_value' ), 10, 3 );
acf/includes/forms/form-user.php 203
add_filter( 'acf/pre_load_value', array( $this, 'filter_pre_load_value' ), 10, 3 );