WordPress at a glance
function is not described

add_option_whitelist() WP 2.7.0

Deprecated from version 5.5.0. It is no longer supported and can be removed in future releases. Use add_allowed_options(). Please consider writing more inclusive code instead.

Adds an array of options to the list of allowed options.

No Hooks.


Array. Null. Nothing.


add_option_whitelist( $new_options, $options );
$new_options(array) (required)
$options *(string array)*


  • Global. Array. $allowed_options


Since 2.7.0 Introduced.
Deprecated Since 5.5.0 Use add_allowed_options() instead.
Please consider writing more inclusive code.

Code of add_option_whitelist() WP 5.7.1

function add_option_whitelist( $new_options, $options = '' ) {
	_deprecated_function( __FUNCTION__, '5.5.0', 'add_allowed_options()' );

	return add_allowed_options( $new_options, $options );