Ticket #19744: 19744_1.patch
File 19744_1.patch, 2.6 KB (added by , 8 years ago) |
---|
-
wp-includes/query.php
1699 1699 ); 1700 1700 } 1701 1701 1702 foreach ( $GLOBALS['wp_taxonomies']as $taxonomy => $t ) {1702 foreach ( get_taxonomies( array() , 'objects' ) as $taxonomy => $t ) { 1703 1703 if ( 'post_tag' == $taxonomy ) 1704 1704 continue; // Handled further down in the $q['tag'] block 1705 1705 -
wp-includes/rewrite.php
331 331 $url = trim($url, '/'); 332 332 333 333 $request = $url; 334 334 $post_type_query_vars = array(); 335 336 foreach ( get_post_types( array() , 'objects' ) as $post_type => $t ) { 337 if ( !empty( $t->query_var ) ) { 338 $post_type_query_vars[ $t->query_var ] = $post_type; 339 } 340 } 341 335 342 // Look for matches. 336 343 $request_match = $request; 337 344 foreach ( (array)$rewrite as $match => $query) { … … 361 368 parse_str($query, $query_vars); 362 369 $query = array(); 363 370 foreach ( (array) $query_vars as $key => $value ) { 364 if ( in_array($key, $wp->public_query_vars) ) 371 if ( in_array($key, $wp->public_query_vars) ){ 365 372 $query[$key] = $value; 373 if ( isset( $post_type_query_vars[$key] ) ) { 374 $query['post_type'] = $post_type_query_vars[$key]; 375 $query['name'] = $value; 376 } 377 } 366 378 } 367 379 368 380 // Do the query -
wp-includes/class-wp.php
247 247 248 248 $this->public_query_vars = apply_filters('query_vars', $this->public_query_vars); 249 249 250 foreach ( $GLOBALS['wp_post_types']as $post_type => $t )250 foreach ( get_post_types(array(),'objects') as $post_type => $t ) 251 251 if ( $t->query_var ) 252 252 $post_type_query_vars[$t->query_var] = $post_type; 253 253 … … 280 280 } 281 281 282 282 // Convert urldecoded spaces back into + 283 foreach ( $GLOBALS['wp_taxonomies']as $taxonomy => $t )283 foreach ( get_taxonomies( array() , 'objects' ) as $taxonomy => $t ) 284 284 if ( $t->query_var && isset( $this->query_vars[$t->query_var] ) ) 285 285 $this->query_vars[$t->query_var] = str_replace( ' ', '+', $this->query_vars[$t->query_var] ); 286 286