WP_Screen::render_screen_reader_content() WordPress Method

The WP_Screen::render_screen_reader_content() method is used to render the contents of a screen for a screen reader.

WP_Screen::render_screen_reader_content( string $key = '', string $tag = 'h2' ) #

Render screen reader text.


Parameters

$key

(string)(Optional)The screen reader text array named key.

Default value: ''

$tag

(string)(Optional) The HTML tag to wrap the screen reader text. Default h2.

Default value: 'h2'


Top ↑

Source

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

	public function render_screen_reader_content( $key = '', $tag = 'h2' ) {

		if ( ! isset( $this->_screen_reader_content[ $key ] ) ) {
			return;
		}
		echo "<$tag class='screen-reader-text'>" . $this->_screen_reader_content[ $key ] . "</$tag>";
	}

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.