acf/field_wrapper_attributes
Filters the $wrapper array before rendering.
Usage
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(array)
- The wrapper attributes array.
- $field(array)
- The field array.
Changelog
| Since 5.7.10 | Introduced. |
Where the hook is called
acf/field_wrapper_attributes
acf/includes/acf-field-functions.php 749
$wrapper = apply_filters( 'acf/field_wrapper_attributes', $wrapper, $field );
Where the hook is used in Advanced Custom Fields PRO
acf/includes/compatibility.php 49
add_filter( 'acf/field_wrapper_attributes', array( $this, 'field_wrapper_attributes' ), 20, 2 );