add_screen_option()
Register and configure an admin screen option
Uses: get_current_screen()
No Hooks.
Return
null
. Nothing.
Usage
add_screen_option( $option, $args );
- $option(string) (required)
- An option name.
- $args(mixed)
- Option-dependent arguments.
Default: array()
Changelog
Since 3.1.0 | Introduced. |
Code of add_screen_option() add screen option WP 6.0
function add_screen_option( $option, $args = array() ) { $current_screen = get_current_screen(); if ( ! $current_screen ) { return; } $current_screen->add_option( $option, $args ); }