Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sanitize_select( $input, $setting )
- {
- $input = sanitize_key( $input );
- $control = $setting->manager->get_control( $setting->id );
- $choices = $control->choices;
- return ( array_key_exists( $input, $choices ) ? $input : $setting->default );
- }
Add Comment
Please, Sign In to add comment