Advertisements

add_option_whitelist

Definition:
function add_option_whitelist( $new_options, $options = '' ) {}

Parameters

  • unknown_type $new_options
  • unknown_type $options

Source code

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;

}

271

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: