WP_Screen::add_option( string $option, mixed $args = array() )

In this article

Adds an option for the screen.

Description

Call this in template files after admin.php is loaded and before admin-header.php is loaded to add screen options.

Parameters

$optionstringrequired
Option ID.
$argsmixedoptional
Option-dependent arguments.

Default:array()

Source

public function add_option( $option, $args = array() ) {
	$this->_options[ $option ] = $args;
}

Changelog

VersionDescription
3.3.0Introduced.

User Contributed Notes

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