WP_Screen::render_screen_reader_content( string $key = , string $tag = ‘h2’ )

In this article

Renders screen reader text.

Parameters

$keystringoptional
The screen reader text array named key.

Default:''

$tagstringoptional
The HTML tag to wrap the screen reader text. Default h2.

Default:'h2'

Source

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

Changelog

VersionDescription
4.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.