wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
add_allowed_options › WordPress Function
Seit5.5.0
Veraltetn/v
› add_allowed_options ( $new_options, $options = '' )
Parameter: (2) |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Adds an array of options to the list of allowed options.
Ähnliche Funktionen: remove_allowed_options, add_blog_option, add_site_option, wp_load_alloptions, add_option
Quellcode
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 ); if ( false === $pos ) { $allowed_options[ $page ][] = $key; } } } } return $allowed_options; }