acf/field_wrapper_attributes
Filters the $wrapper array before rendering.
Использование
add_filter( 'acf/field_wrapper_attributes', 'wp_kama_acf_field_wrapper_attributes_filter', 10, 2 );
/**
* Function for `acf/field_wrapper_attributes` filter-hook.
*
* @param array $wrapper The wrapper attributes array.
* @param array $field The field array.
*
* @return array
*/
function wp_kama_acf_field_wrapper_attributes_filter( $wrapper, $field ){
// filter...
return $wrapper;
}
- $wrapper(массив)
- The wrapper attributes array.
- $field(массив)
- The field array.
Список изменений
| С версии 5.7.10 | Введена. |
Где вызывается хук
acf/field_wrapper_attributes
acf/includes/acf-field-functions.php 737
$wrapper = apply_filters( 'acf/field_wrapper_attributes', $wrapper, $field );
Где используется хук в Advanced Custom Fields PRO
acf/includes/compatibility.php 40
add_filter( 'acf/field_wrapper_attributes', array( $this, 'field_wrapper_attributes' ), 20, 2 );