Guest User

Untitled

a guest
Oct 11th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. function sanitize_select( $input, $setting )
  2. {
  3. $input = sanitize_key( $input );
  4. $control = $setting->manager->get_control( $setting->id );
  5. $choices = $control->choices;
  6. return ( array_key_exists( $input, $choices ) ? $input : $setting->default );
  7. }
Add Comment
Please, Sign In to add comment