a guest Oct 11th, 2018 57 Never
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 );
RAW Paste Data