wp_required_field_indicator()WP 6.1.0

Assigns a visual indicator for required form fields.

Хуки из функции

Возвращает

Строку. Indicator glyph wrapped in a span tag.

Использование

wp_required_field_indicator();

Список изменений

С версии 6.1.0 Введена.

Код wp_required_field_indicator() WP 6.1.1

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