add_option_whitelist

Advertisement

Summery Summery

Adds an array of options to the options whitelist.

Syntax Syntax

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

Parameters Parameters

$new_options

(Required)

$options

(Optional)

Default value: ''

Return Return

(array)

Source Source

File: wp-admin/includes/plugin.php

	return true;
}

/* Allowed list functions */

/**
 * Refreshes the value of the allowed options list available via the 'allowed_options' hook.
 *
 * See the {@see 'allowed_options'} filter.
 *
 * @since 2.7.0
 * @since 5.5.0 `$new_whitelist_options` was renamed to `$new_allowed_options`.
 *              Please consider writing more inclusive code.
 *
 * @global array $new_allowed_options
 *
 * @param array $options
 * @return array
 */
function option_update_filter( $options ) {
	global $new_allowed_options;

Advertisement

Changelog Changelog

Changelog
Version Description
2.7.0 Introduced.

Advertisement

Leave a Reply