WP_Screen::add_option

Advertisement

Summery Summery

Adds an option for the screen.

Syntax Syntax

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

Description Description

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

Parameters Parameters

$option

(string) (Required) Option ID

$args

(mixed) (Optional) Option-dependent arguments.

Default value: array()

Source Source

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

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

Advertisement

Changelog Changelog

Changelog
Version Description
3.3.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.