函数原型
add_screen_option( string $option, mixed $args = array() )
函数描述
Register and configure an admin screen option
是否弃用
未弃用
函数参数
-
$option
string
Required - An option name.
-
$args
mixed
Optional - Option-dependent arguments.
Default:
array()
函数返回值
无
函数位置
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 );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |

