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

Adds an option for the screen.

Description Description

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

Top ↑

Parameters Parameters


(string) (Required) Option ID.


(mixed) (Optional) Option-dependent arguments.

Default value: array()

Top ↑

Source Source

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

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

Top ↑

Changelog Changelog

Version Description
3.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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