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.

Return

Array.

Usage

add_option_whitelist( $new_options, $options );
$new_options(array) (required)
-
$options(string|array)
-
Default: ''

Notes

  • Global. Array. $allowed_options

Changelog

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

add_option_whitelist() code WP 6.4.3

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

	return add_allowed_options( $new_options, $options );
}