diff --git a/wp-includes/class-wp.php b/wp-includes/class-wp.php index 9765a01507..35ebb06371 100644 --- a/wp-includes/class-wp.php +++ b/wp-includes/class-wp.php @@ -129,6 +129,7 @@ class WP { * @global WP_Rewrite $wp_rewrite WordPress rewrite component. * * @param array|string $extra_query_vars Set the extra query variables. + * @return bool Whether the request was parsed. */ public function parse_request( $extra_query_vars = '' ) { global $wp_rewrite; @@ -143,7 +144,7 @@ class WP { * @param array|string $extra_query_vars Extra passed query variables. */ if ( ! apply_filters( 'do_parse_request', true, $this, $extra_query_vars ) ) { - return; + return false; } $this->query_vars = array(); @@ -394,6 +395,8 @@ class WP { * @param WP $wp Current WordPress environment instance (passed by reference). */ do_action_ref_array( 'parse_request', array( &$this ) ); + + return true; } /** @@ -755,12 +758,13 @@ class WP { */ public function main( $query_args = '' ) { $this->init(); - $this->parse_request( $query_args ); + $parsed = $this->parse_request( $query_args ); $this->send_headers(); - $this->query_posts(); - $this->handle_404(); - $this->register_globals(); - + if ( $parsed ) { + $this->query_posts(); + $this->handle_404(); + $this->register_globals(); + } /** * Fires once the WordPress environment has been set up. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 4f17941fa6..1b0e33d60f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-52813'; +$wp_version = '6.0-alpha-52814'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.