Ticket #10886: 10886.6.diff
File 10886.6.diff, 1.4 KB (added by , 9 years ago) |
---|
-
src/wp-includes/class-wp.php
118 118 * @global WP_Rewrite $wp_rewrite 119 119 * 120 120 * @param array|string $extra_query_vars Set the extra query variables. 121 * @return bool Whether the request was parsed. 121 122 */ 122 123 public function parse_request($extra_query_vars = '') { 123 124 global $wp_rewrite; … … 131 132 * @param WP $this Current WordPress environment instance. 132 133 * @param array|string $extra_query_vars Extra passed query variables. 133 134 */ 134 if ( ! apply_filters( 'do_parse_request', true, $this, $extra_query_vars ) ) 135 return; 135 if ( ! apply_filters( 'do_parse_request', true, $this, $extra_query_vars ) ) { 136 return false; 137 } 136 138 137 139 $this->query_vars = array(); 138 140 $post_type_query_vars = array(); … … 246 248 247 249 $this->did_permalink = false; 248 250 } 251 252 return true; 249 253 } 250 254 251 255 /** … … 624 628 */ 625 629 public function main($query_args = '') { 626 630 $this->init(); 627 $ this->parse_request($query_args);631 $parsed = $this->parse_request($query_args); 628 632 $this->send_headers(); 629 $this->query_posts(); 630 $this->handle_404(); 631 $this->register_globals(); 633 if ( $parsed ) { 634 $this->query_posts(); 635 $this->handle_404(); 636 $this->register_globals(); 637 } 632 638 633 639 /** 634 640 * Fires once the WordPress environment has been set up.