add_option_whitelist [ WordPress Function ]
add_option_whitelist ( $new_options, $options = '' )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: remove_option_whitelist, add_option, add_option_update_handler, add_options_page, add_settings_field
{@internal Missing Short Description}}
Source
<?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;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- add_option_whitelist() WordPress function reference, arguments ...
Source. function add_option_whitelist( $new_options, $options = '' ) { if ( $options == '' ) global $whitelist_options; else $whitelist_options = $options; foreach ...
queryposts.com - Writing Plugins (for WP & WPMU) – WordPress "Must-Use" Tutorials
Sep 28, 2009 ... $options = add_option_whitelist( $added, $options ); ... The call to add_option_whitelist merges the $options parameter and the array I just ...
wpmututorials.com - #14149 (Introduce register_settings()) – WordPress Trac
Currently, you need to loop on register_setting(), or some try to use the add_option_whitelist function or filters (which was originally introduced partially as a ...
core.trac.wordpress.org - All elements - WordPress.org
add_option_update_handler() in deprecated.php. Register a setting and its sanitization callback. add_option_whitelist. add_option_whitelist() in plugin.php ...
phpdoc.wordpress.org