add_screen_option
Register and configure an admin screen option.
Description
Parameters (2)
- 0. $option (string)
- An option name.
- 1. $args — Optional. (array) =>
array()
- Option-dependent arguments.
Usage
if ( !function_exists( 'add_screen_option' ) ) { require_once ABSPATH . '/wp-admin/includes/screen.php'; } // An option name. $option = ''; // Option-dependent arguments. $args = array(); // NOTICE! Understand what this does before running. $result = add_screen_option($option, $args);
Defined (1)
The function is defined in the following location(s).
- /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 );
- }