函数原型
add_option_whitelist( array $new_options, string|array $options = ” ): array
函数描述
Adds an array of options to the list of allowed options.
是否弃用
Warning: This function has been deprecated. Use add_allowed_options() instead. Please consider writing more inclusive code.
函数参数
-
$new_options
array
Required -
$options
string|array
Optional Default:
''
函数返回值
array
函数位置
File: wp-includes/deprecated.php.
函数源码
function add_option_whitelist( $new_options, $options = '' ) {
_deprecated_function( __FUNCTION__, '5.5.0', 'add_allowed_options()' );
return add_allowed_options( $new_options, $options );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 5.5.0 | Use add_allowed_options() instead. Please consider writing more inclusive code. |
| 2.7.0 | Introduced. |

