WP_Screen::set_screen_reader_content() WordPress Method

The WP_Screen::set_screen_reader_content() method is used to set the content for a screen reader. The content must be an array of arrays, each of which represents a line of text.

WP_Screen::set_screen_reader_content( array $content = array() ) #

Add accessible hidden headings and text for the screen.


Parameters

$content

(array)(Optional)An associative array of screen reader text strings.

  • 'heading_views'
    (string) Screen reader text for the filter links heading. Default 'Filter items list'.
  • 'heading_pagination'
    (string) Screen reader text for the pagination heading. Default 'Items list navigation'.
  • 'heading_list'
    (string) Screen reader text for the items list heading. Default 'Items list'.

Default value: array()


Top ↑

Source

File: wp-admin/includes/class-wp-screen.php

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


Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.