On this page
add_option_whitelist( array $new_options, string|array $options = '' ): array
This function has been deprecated. Use add_allowed_options() instead. Please consider writing more inclusive code.
Adds an array of options to the list of allowed options.
Parameters
$new_optionsarray Required$optionsstring|array Optional-
Default:
''
Return
array
Source
File: wp-includes/deprecated.php. View all references
function add_option_whitelist( $new_options, $options = '' ) {
_deprecated_function( __FUNCTION__, '5.5.0', 'add_allowed_options()' );
return add_allowed_options( $new_options, $options );
}
Related
Uses
| Uses | Description |
|---|---|
| add_allowed_options() wp-admin/includes/plugin.php | Adds an array of options to the list of allowed options. |
| _deprecated_function() wp-includes/functions.php | Marks a function as deprecated and inform when it has been used. |
Changelog
| Version | Description |
|---|---|
| 5.5.0 | Use add_allowed_options() instead. Please consider writing more inclusive code. |
| 2.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/add_option_whitelist