Creates a message to explain required form fields.
Source
function wp_required_field_message() {
$message = sprintf(
'<span class="required-field-message">%s</span>',
/* translators: %s: Asterisk symbol (*). */
sprintf( __( 'Required fields are marked %s' ), wp_required_field_indicator() )
);
/**
* Filters the message to explain required form fields.
*
* @since 6.1.0
*
* @param string $message Message text and glyph wrapped in a `span` tag.
*/
return apply_filters( 'wp_required_field_message', $message );
}
Hooks
- apply_filters( ‘wp_required_field_message’,
string $message ) Filters the message to explain required form fields.
Changelog
Version | Description |
---|---|
6.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.