WordPress at a glance

add_screen_option() WP 1.0

Register and configure an admin screen option

Works based on: get_current_screen()

No Hooks.

Return

Nothing (null).

Usage

add_screen_option( $option, $args );
$option(string) (required)
An option name.
$args(mixed)
Option-dependent arguments.
Default: array()

Code of add screen option: wp-admin/includes/screen.php WP 5.2.2

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

	if ( ! $current_screen ) {
		return;
	}

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

Related Functions

From category: Plugins, Hooks

No comments
    Hello, !     Log In . Register