Falcon_Admin::validate_type PHP Метод

validate_type() публичный статический Метод

Ensures that the selected type can actually be selected
public static validate_type ( string $input ) : string | boolean
$input string Selected class name
Результат string | boolean Selected class name if valid, otherwise false
    public static function validate_type($input)
    {
        if (in_array($input, array_keys(Falcon::get_handlers()))) {
            if ($input !== Falcon::get_option('bbsub_handler_type', false) && empty($_POST['bbsub_used_ajax'])) {
                self::$wipe_handler_options = true;
            }
            return $input;
        }
        add_settings_error('bbsub_handler_type', 'bbsub_handler_invalid', __('The selected handler is invalid', 'falcon'));
        return false;
    }