UrlToQueryItem.php
private function parseQueryVar( $wpvar = '' ) {
        if ( ! is_array( $this->query_vars[$wpvar] ) ) {
            $this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar];
        } else {
            foreach ( $this->query_vars[$wpvar] as $vkey => $v ) {
                if ( ! is_object( $v ) ) {
                    $this->query_vars[$wpvar][$vkey] = (string) $v;
                }
            }
        }
        if ( isset( $this->post_type_query_vars[$wpvar] ) ) {
            $this->query_vars['post_type'] = $this->post_type_query_vars[$wpvar];
            $this->query_vars['name'] = $this->query_vars[$wpvar];
        }
    }
private function parseQueryVar( $wpvar = '' ) {
        if ( ! is_array( $this->query_vars[$wpvar] ) ) {
            $this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar];
        } else {
            foreach ( $this->query_vars[$wpvar] as $vkey => $v ) {
                if ( ! is_object( $v ) ) {
                    $this->query_vars[$wpvar][$vkey] = (string) $v;
                }
            }
        }
        if ( isset( $this->post_type_query_vars[$wpvar] ) ) {
            $this->query_vars['post_type'] = $this->post_type_query_vars[$wpvar];
            $this->query_vars['name'] = $this->query_vars[$wpvar];
        }
    }
private function parseQueryVar ( $ wpvar = '' ) { if ( ! is_array ( $ this -> query_vars [ $ wpvar ] ) ) { $ this -> query_vars [ $ wpvar ] = ( string ) $ this -> query_vars [ $ wpvar ] ; } else { foreach ( $ this -> query_vars [ $ wpvar ] as $ vkey => $ v ) { if ( ! is_object ( $ v ) ) { $ this -> query_vars [ $ wpvar ] [ $ vkey ] = ( string ) $ v ; } } } if ( isset ( $ this -> post_type_query_vars [ $ wpvar ] ) ) { $ this -> query_vars [ 'post_type' ] = $ this -> post_type_query_vars [ $ wpvar ] ; $ this -> query_vars [ 'name' ] = $ this -> query_vars [ $ wpvar ] ; } }
Parse a query variable, "flattening" it if is an array or an object, also set 'post_type'
and 'name' query var, if a slug of a registered post type is present among query vars

@param string  $wpvar
Parse a query variable flattening it if is an array or an object also set post_type and name query var if a slug of a registered post type is present among query vars