| 277 | | $this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar]; |
| 278 | | if ( isset( $taxonomy_query_vars[$wpvar] ) ) { |
| 279 | | $this->query_vars['taxonomy'] = $taxonomy_query_vars[$wpvar]; |
| 280 | | $this->query_vars['term'] = $this->query_vars[$wpvar]; |
| 281 | | } elseif ( isset($post_type_query_vars[$wpvar] ) ) { |
| 282 | | $this->query_vars['post_type'] = $post_type_query_vars[$wpvar]; |
| 283 | | $this->query_vars['name'] = $this->query_vars[$wpvar]; |
| | 277 | if (!is_array($this->query_vars[$wpvar])) { |
| | 278 | $this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar]; |
| | 279 | if ( isset( $taxonomy_query_vars[$wpvar] ) ) { |
| | 280 | $this->query_vars['taxonomy'] = $taxonomy_query_vars[$wpvar]; |
| | 281 | $this->query_vars['term'] = $this->query_vars[$wpvar]; |
| | 282 | } elseif ( isset($post_type_query_vars[$wpvar] ) ) { |
| | 283 | $this->query_vars['post_type'] = $post_type_query_vars[$wpvar]; |
| | 284 | $this->query_vars['name'] = $this->query_vars[$wpvar]; |
| | 285 | } |
| | 286 | } else { |
| | 287 | foreach ($this->query_vars[$wpvar] as &$v) |
| | 288 | $v = (string) $v; |
| | 289 | if ( isset( $taxonomy_query_vars[$wpvar] ) ) { |
| | 290 | $this->query_vars['taxonomy'] = $taxonomy_query_vars[$wpvar]; |
| | 291 | $this->query_vars['term'] = $this->query_vars[$wpvar]; |
| | 292 | } elseif ( isset($post_type_query_vars[$wpvar] ) ) { |
| | 293 | $this->query_vars['post_type'] = $post_type_query_vars[$wpvar]; |
| | 294 | $this->query_vars['name'] = $this->query_vars[$wpvar]; |
| | 295 | } |
| 291 | | if ( ! in_array( $this->query_vars['post_type'], $queryable_post_types ) ) |
| 292 | | unset( $this->query_vars['post_type'] ); |
| | 303 | if (!is_array($this->query_vars['post_type'])) { |
| | 304 | if ( ! in_array( $this->query_vars['post_type'], $queryable_post_types ) ) |
| | 305 | unset( $this->query_vars['post_type'] ); |
| | 306 | } else { |
| | 307 | foreach ($this->query_vars['post_type'] as $key => &$pType) |
| | 308 | if ( ! in_array( $pType, $queryable_post_types ) ) |
| | 309 | unset( $this->query_vars['post_type'][$key] ); |
| | 310 | } |