acf/get_sub_field
Filters the $sub_field found.
Использование
add_filter( 'acf/get_sub_field', 'wp_kama_acf_get_sub_field_filter', 10, 3 ); /** * Function for `acf/get_sub_field` filter-hook. * * @param array $sub_field The found sub field array. * @param string $selector The selector used to search. * @param array $field The parent field array. * * @return array */ function wp_kama_acf_get_sub_field_filter( $sub_field, $selector, $field ){ // filter... return $sub_field; }
- $sub_field(массив)
- The found sub field array.
- $selector(строка)
- The selector used to search.
- $field(массив)
- The parent field array.
Список изменений
С версии 5.0.0 | Введена. |
Где вызывается хук
acf/get_sub_field
acf/includes/acf-field-functions.php 1314
$sub_field = apply_filters( 'acf/get_sub_field', $sub_field, $id, $field );