Ticket #14330: 14330.patch
File 14330.patch, 1.4 KB (added by , 14 years ago) |
---|
-
wp-includes/classes.php
274 274 $this->query_vars[$wpvar] = $perma_query_vars[$wpvar]; 275 275 276 276 if ( !empty( $this->query_vars[$wpvar] ) ) { 277 $this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar]; 277 !is_array( $this->query_vars[$wpvar] ) && ( $this->query_vars[$wpvar] = array( $this->query_vars[$wpvar] ) ); 278 $this->query_vars[$wpvar] = array_map( 'strval', $this->query_vars[$wpvar] ); 278 279 if ( isset( $taxonomy_query_vars[$wpvar] ) ) { 279 280 $this->query_vars['taxonomy'] = $taxonomy_query_vars[$wpvar]; 280 281 $this->query_vars['term'] = $this->query_vars[$wpvar]; … … 288 289 // Limit publicly queried post_types to those that are publicly_queryable 289 290 if ( isset( $this->query_vars['post_type']) ) { 290 291 $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']);292 !is_array( $this->query_vars['post_type'] ) && ( $this->query_vars['post_type'] = array( $this->query_vars['post_type'] ) ); 293 $this->query_vars['post_type'] = array_intersect( $this->query_vars['post_type'], $queryable_post_types ); 293 294 } 294 295 295 296 foreach ( (array) $this->private_query_vars as $var) {