从选项白名单中删除选项列表。

原型

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

参数

$del_options (array) (Required)

$options (string|array) (Optional)

返回值

(array)  

源文件

路径:wp-admin/includes/plugin.php

<?php
...
function remove_option_whitelist( $del_options, $options = '' ) {
	if ( $options == '' )
		global $whitelist_options;
	else
		$whitelist_options = $options;
	foreach ( $del_options as $page => $keys ) {
		foreach ( $keys as $key ) {
			if ( isset($whitelist_options[ $page ]) && is_array($whitelist_options[ $page ]) ) {
				$pos = array_search( $key, $whitelist_options[ $page ] );
				if ( $pos !== false )
					unset( $whitelist_options[ $page ][ $pos ] );
			}
		}
	}
	return $whitelist_options;
}
...
?>

其他

英文文档:https://developer.wordpress.org/reference/functions/remove_option_whitelist/