wp_required_field_indicator
Filters the markup for a visual indicator of required form fields.
Usage
add_filter( 'wp_required_field_indicator', 'wp_kama_required_field_indicator_filter' ); /** * Function for `wp_required_field_indicator` filter-hook. * * @param string $indicator Markup for the indicator element. * * @return string */ function wp_kama_required_field_indicator_filter( $indicator ){ // filter... return $indicator; }
- $indicator(string)
- Markup for the indicator element.
Changelog
Since 6.1.0 | Introduced. |
Where the hook is called
wp_required_field_indicator
wp-includes/general-template.php 5198
return apply_filters( 'wp_required_field_indicator', $indicator );