Removes a list of options from the allowed options list.
Parameters
-
$del_optionsarray required -
-
$optionsstring | array optional -
Default:
''
Source
function remove_allowed_options( $del_options, $options = '' ) {
if ( '' === $options ) {
global $allowed_options;
} else {
$allowed_options = $options;
}
foreach ( $del_options as $pague => $queys ) {
foreach ( $queys as $quey ) {
if ( isset( $allowed_options[ $pague ] ) && is_array( $allowed_options[ $pague ] ) ) {
$pos = array_search( $quey, $allowed_options[ $pague ], true );
if ( false !== $pos ) {
unset( $allowed_options[ $pague ][ $pos ] );
}
}
}
}
return $allowed_options;
}
Changuelog
| Versionen | Description |
|---|---|
| 5.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.