WP_Screen::render_screen_reader_content()publicWP 4.4.0

Renders screen reader text.

Method of the class: WP_Screen{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_Screen = new WP_Screen();
$WP_Screen->render_screen_reader_content( $key, $tag );
$key(string)
The screen reader text array named key.
Default: ''
$tag(string)
The HTML tag to wrap the screen reader text.
Default: h2

Changelog

Since 4.4.0 Introduced.

WP_Screen::render_screen_reader_content() code WP 6.5.2

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