WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

WPCF7_ContactForm::screen_reader_response() public CF7 1.0

{} Это метод класса: WPCF7_ContactForm{}

Хуков нет.

Возвращает

Null. Ничего.

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

$WPCF7_ContactForm = new WPCF7_ContactForm();
$WPCF7_ContactForm->screen_reader_response();

Код WPCF7_ContactForm::screen_reader_response() CF7 5.4

<?php
public function screen_reader_response() {
	$primary_response = '';
	$validation_errors = array();

	if ( $this->is_posted() ) { // Post response output for non-AJAX
		$submission = WPCF7_Submission::get_instance();
		$primary_response = $submission->get_response();

		if ( $invalid_fields = $submission->get_invalid_fields() ) {
			foreach ( (array) $invalid_fields as $name => $field ) {
				$list_item = esc_html( $field['reason'] );

				if ( $field['idref'] ) {
					$list_item = sprintf(
						'<a href="#%1$s">%2$s</a>',
						esc_attr( $field['idref'] ),
						$list_item
					);
				}

				$validation_error_id = sprintf(
					'%1$s-ve-%2$s',
					$this->unit_tag(),
					$name
				);

				$list_item = sprintf(
					'<li id="%1$s">%2$s</li>',
					$validation_error_id,
					$list_item
				);

				$validation_errors[] = $list_item;
			}
		}
	}

	$primary_response = sprintf(
		'<p role="status" aria-live="polite" aria-atomic="true">%s</p>',
		esc_html( $primary_response )
	);

	$validation_errors = sprintf(
		'<ul>%s</ul>',
		implode( "\n", $validation_errors )
	);

	$output = sprintf(
		'<div class="screen-reader-response">%1$s %2$s</div>',
		$primary_response,
		$validation_errors
	);

	return $output;
}