public static function sanitizeParams()
    {
        self::$config['remote'] = [];

        $remote = is_array($_POST['remote']) ? $_POST['remote'] : [];
        foreach ($remote as $complement => $url) {
            $url = filter_var($url, FILTER_VALIDATE_URL);
            if ($url === false) {
                return false;
            }
            self::$config['remote'][$complement] = $url;
        }

        $params = ['id', 'app', 'request', 'filter', 'sort', 'nonce', 'complement'];

        foreach ($params as $param) {
            $value = filter_var($_POST[$param], FILTER_SANITIZE_STRING);
            if ($value === false) {
                return false;
            }
            self::$config[$param] = $value;
        }

        return true;
    }
public static function sanitizeParams()
    {
        self::$config['remote'] = [];

        $remote = is_array($_POST['remote']) ? $_POST['remote'] : [];
        foreach ($remote as $complement => $url) {
            $url = filter_var($url, FILTER_VALIDATE_URL);
            if ($url === false) {
                return false;
            }
            self::$config['remote'][$complement] = $url;
        }

        $params = ['id', 'app', 'request', 'filter', 'sort', 'nonce', 'complement'];

        foreach ($params as $param) {
            $value = filter_var($_POST[$param], FILTER_SANITIZE_STRING);
            if ($value === false) {
                return false;
            }
            self::$config[$param] = $value;
        }

        return true;
    }
public static function sanitizeParams ( ) { self :: $ config [ 'remote' ] = [ ] ; $ remote = is_array ( $ _POST [ 'remote' ] ) ? $ _POST [ 'remote' ] : [ ] ; foreach ( $ remote as $ complement => $ url ) { $ url = filter_var ( $ url , FILTER_VALIDATE_URL ) ; if ( $ url === false ) { return false ; } self :: $ config [ 'remote' ] [ $ complement ] = $ url ; } $ params = [ 'id' , 'app' , 'request' , 'filter' , 'sort' , 'nonce' , 'complement' ] ; foreach ( $ params as $ param ) { $ value = filter_var ( $ _POST [ $ param ] , FILTER_SANITIZE_STRING ) ; if ( $ value === false ) { return false ; } self :: $ config [ $ param ] = $ value ; } return true ; }
Sanitize request parameters.

@since 1.1.0

@return bool
Sanitize request parameters .