wp_required_field_message
Filters the message to explain required form fields.
Usage
add_filter( 'wp_required_field_message', 'wp_kama_required_field_message_filter' ); /** * Function for `wp_required_field_message` filter-hook. * * @param string $message Message text and glyph wrapped in a `span` tag. * * @return string */ function wp_kama_required_field_message_filter( $message ){ // filter... return $message; }
- $message(string)
- Message text and glyph wrapped in a span tag.
Changelog
Since 6.1.0 | Introduced. |
Where the hook is called
wp_required_field_message
wp-includes/general-template.php 5222
return apply_filters( 'wp_required_field_message', $message );