WordPress at a glance
function is not described

add_option_whitelist() WP 2.7.0

Adds an array of options to the options whitelist.

  • Global. Array. $whitelist_options

No Hooks.

Return

Array.

Usage

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

Default: ''

Code of add option whitelist: wp-admin/includes/plugin.php VER 5.1.1

<?php
function add_option_whitelist( $new_options, $options = '' ) {
	if ( $options == '' ) {
		global $whitelist_options;
	} else {
		$whitelist_options = $options;
	}

	foreach ( $new_options as $page => $keys ) {
		foreach ( $keys as $key ) {
			if ( ! isset( $whitelist_options[ $page ] ) || ! is_array( $whitelist_options[ $page ] ) ) {
				$whitelist_options[ $page ]   = array();
				$whitelist_options[ $page ][] = $key;
			} else {
				$pos = array_search( $key, $whitelist_options[ $page ] );
				if ( $pos === false ) {
					$whitelist_options[ $page ][] = $key;
				}
			}
		}
	}

	return $whitelist_options;
}