Changeset 15737
- Timestamp:
- 10/06/2010 11:18:42 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/classes.php
r15734 r15737 275 275 276 276 if ( !empty( $this->query_vars[$wpvar] ) ) { 277 $this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar]; 277 if ( ! is_array( $this->query_vars[$wpvar] ) ) { 278 $this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar]; 279 } else { 280 foreach ( $this->query_vars[$wpvar] as $vkey => $v ) 281 $this->query_vars[$wpvar][$vkey] = (string) $v; 282 } 283 278 284 if ( isset( $taxonomy_query_vars[$wpvar] ) ) { 279 285 $this->query_vars['taxonomy'] = $taxonomy_query_vars[$wpvar]; … … 288 294 // Limit publicly queried post_types to those that are publicly_queryable 289 295 if ( isset( $this->query_vars['post_type']) ) { 290 $queryable_post_types = get_post_types( array('publicly_queryable' => true) ); 291 if ( ! in_array( $this->query_vars['post_type'], $queryable_post_types ) ) 292 unset( $this->query_vars['post_type'] ); 296 $queryable_post_types = get_post_types( array('publicly_queryable' => true) ); 297 if ( ! is_array( $this->query_vars['post_type'] ) ) { 298 if ( ! in_array( $this->query_vars['post_type'], $queryable_post_types ) ) 299 unset( $this->query_vars['post_type'] ); 300 } else { 301 $this->query_vars['post_type'] = array_intersect( $this->query_vars['post_type'], $queryable_post_types ); 302 } 293 303 } 294 304
Note: See TracChangeset
for help on using the changeset viewer.