wp_required_field_indicator(): string

Assigns a visual indicator for required form fields.


Return

string Indicator glyph wrapped in a span tag.


Top ↑

Source

File: wp-includes/general-template.php. View all references

function wp_required_field_indicator() {
	/* translators: Character to identify required form fields. */
	$glyph     = __( '*' );
	$indicator = '<span class="required">' . esc_html( $glyph ) . '</span>';

	/**
	 * Filters the markup for a visual indicator of required form fields.
	 *
	 * @since 6.1.0
	 *
	 * @param string $indicator Markup for the indicator element.
	 */
	return apply_filters( 'wp_required_field_indicator', $indicator );
}

Top ↑

Hooks



Top ↑

Changelog

Changelog
Version Description
6.1.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.