WordPress at Your Fingertips
function is not described

WP_Screen::get_option() public WP 3.3.0

Gets the arguments for an option for the screen.

{} It's a method of the class: WP_Screen{}

No Hooks.

Return

String. The option value if set, null otherwise.

Usage

$WP_Screen = new WP_Screen();
$WP_Screen->get_option( $option, $key );
$option(string) (required)
Option name.
$key(string|false)
Specific array key for when the option is an array.
Default: false

Changelog

Since 3.3.0 Introduced.

Code of WP_Screen::get_option() WP 5.8.2

public function get_option( $option, $key = false ) {
	if ( ! isset( $this->_options[ $option ] ) ) {
		return null;
	}
	if ( $key ) {
		if ( isset( $this->_options[ $option ][ $key ] ) ) {
			return $this->_options[ $option ][ $key ];
		}
		return null;
	}
	return $this->_options[ $option ];
}