Title: add_option_whitelist
Published: April 25, 2014
Last modified: May 20, 2026

---

# add_option_whitelist( array $new_options, string|array $options = '' ): array

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/add_option_whitelist/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/add_option_whitelist/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/add_option_whitelist/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/add_option_whitelist/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/add_option_whitelist/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/add_option_whitelist/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/functions/add_option_whitelist/?output_format=md#wp--skip-link--target)

This function has been deprecated since 5.5.0. Use add_allowed_options() instead.
Please consider writing more inclusive code.

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

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/add_option_whitelist/?output_format=md#parameters)󠁿

 `$new_options`arrayrequired

`$options`string|arrayoptional

Default:`''`

## 󠀁[Return](https://developer.wordpress.org/reference/functions/add_option_whitelist/?output_format=md#return)󠁿

 array

## 󠀁[Source](https://developer.wordpress.org/reference/functions/add_option_whitelist/?output_format=md#source)󠁿

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

    	return add_allowed_options( $new_options, $options );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/deprecated.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/deprecated.php#L4089)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/deprecated.php#L4089-L4093)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/add_option_whitelist/?output_format=md#related)󠁿

| Uses | Description | 
| [add_allowed_options()](https://developer.wordpress.org/reference/functions/add_allowed_options/)`wp-admin/includes/plugin.php` |

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

  | 
| [_deprecated_function()](https://developer.wordpress.org/reference/functions/_deprecated_function/)`wp-includes/functions.php` |

Marks a function as deprecated and inform when it has been used.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/add_option_whitelist/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.5.0](https://developer.wordpress.org/reference/since/5.5.0/) | Deprecated. Use [add_allowed_options()](https://developer.wordpress.org/reference/functions/add_allowed_options/) instead.
 Please consider writing more inclusive code. | 
| [2.7.0](https://developer.wordpress.org/reference/since/2.7.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/add_option_whitelist/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/functions/add_option_whitelist/?output_format=md#comment-content-971)
 2.   [David Brumbaugh](https://profiles.wordpress.org/dbrumbaugh10up/)  [  11 years ago  ](https://developer.wordpress.org/reference/functions/add_option_whitelist/#comment-971)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fadd_option_whitelist%2F%23comment-971)
    Vote results for this note: -3[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fadd_option_whitelist%2F%23comment-971)
 4. Here’s a nice little tutorial that uses add_option_wp_whitelist: [http://wpmututorials.com/how-to/writing-plugins/](http://wpmututorials.com/how-to/writing-plugins/)
 5.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fadd_option_whitelist%2F%3Freplytocom%3D971%23feedback-editor-971)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fadd_option_whitelist%2F)
before being able to contribute a note or feedback.