wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_required_field_message › WordPress Function

Since6.1.0
Deprecatedn/a
wp_required_field_message ( No parameters )
Returns:
  • (string) Message text and glyph wrapped in a `span` tag.
Defined at:
Codex:

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 );
}