You appear to be a bot. Output may be restricted
Description
Sanitize select.
Usage
$string = TwentyTwenty_Customize::sanitize_select( $input, $setting );
Parameters
- $input
- ( string ) required – The input from the setting.
- $setting
- ( object ) required – The selected setting.
Returns
string The input from the setting or the default setting.
Source
File name: twentytwenty/classes/class-twentytwenty-customize.php
Lines:
1 to 5 of 5
public static function sanitize_select( $input, $setting ) { $input = sanitize_key( $input ); $choices = $setting->manager->get_control( $setting->id )->choices; return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); }