WP_Screen::set_screen_reader_content()publicWP 4.4.0

Adds accessible hidden headings and text for the screen.

Метод класса: WP_Screen{}

Хуков нет.

Возвращает

null. Ничего (null).

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

$WP_Screen = new WP_Screen();
$WP_Screen->set_screen_reader_content( $content );
$content(массив)

An associative array of screen reader text strings.

По умолчанию: array()

  • heading_views(строка)
    Screen reader text for the filter links heading.
    По умолчанию: 'Filter items list'

  • heading_pagination(строка)
    Screen reader text for the pagination heading.
    По умолчанию: 'Items list navigation'

  • heading_list(строка)
    Screen reader text for the items list heading.
    По умолчанию: 'Items list'

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

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

Код WP_Screen::set_screen_reader_content() WP 6.5.2

public function set_screen_reader_content( $content = array() ) {
	$defaults = array(
		'heading_views'      => __( 'Filter items list' ),
		'heading_pagination' => __( 'Items list navigation' ),
		'heading_list'       => __( 'Items list' ),
	);
	$content  = wp_parse_args( $content, $defaults );

	$this->_screen_reader_content = $content;
}