acf/get_field_label
Filters the field's label HTML.
Usage
add_filter( 'acf/get_field_label', 'wp_kama_acf_get_field_label_filter', 10, 3 );
/**
* Function for `acf/get_field_label` filter-hook.
*
* @param string $label The label HTML.
* @param array $field The field array.
* @param string $context The output context (admin).
*
* @return string
*/
function wp_kama_acf_get_field_label_filter( $label, $field, $context ){
// filter...
return $label;
}
- $label(string)
- The label HTML.
- $field(array)
- The field array.
- $context(string)
- The output context (admin).
Changelog
| Since 5.7.10 | Introduced. |
Where the hook is called
acf/get_field_label
acf/includes/acf-field-functions.php 864
$label = apply_filters( 'acf/get_field_label', $label, $field, $context );