add_screen_option

Advertisement

Summery Summery

Register and configure an admin screen option

Syntax Syntax

add_screen_option( string $option, mixed $args = array() )

Parameters Parameters

$option

(string) (Required) An option name.

$args

(mixed) (Optional) Option-dependent arguments.

Default value: array()

Source Source

File: wp-admin/includes/screen.php

function add_screen_option( $option, $args = array() ) {
	$current_screen = get_current_screen();

	if ( ! $current_screen ) {
		return;
	}

	$current_screen->add_option( $option, $args );
}

Advertisement

Changelog Changelog

Changelog
Version Description
3.1.0 Introduced.

Advertisement

Leave a Reply

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