remove_option_whitelist

Advertisement

Summery Summery

Removes a list of options from the options whitelist.

Syntax Syntax

remove_option_whitelist( array $del_options, string|array $options = '' )

Parameters Parameters

$del_options

(Required)

$options

(Optional)

Default value: ''

Return Return

(array)

Source Source

File: wp-admin/includes/plugin.php

 * @global array $allowed_options
 *
 * @param array        $new_options
 * @param string|array $options
 * @return array
 */
function add_allowed_options( $new_options, $options = '' ) {
	if ( '' === $options ) {
		global $allowed_options;
	} else {
		$allowed_options = $options;
	}

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

Advertisement

Changelog Changelog

Changelog
Version Description
2.7.0 Introduced.

Advertisement

Leave a Reply