Skip to content

Commit

Permalink
Manually run query_posts if Cortex is booted, as it is no longer run …
Browse files Browse the repository at this point in the history
…in WP::main() from WordPress 6.0
  • Loading branch information
polevaultweb committed May 25, 2022
1 parent 4c9cf21 commit c33bd59
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Cortex.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ public static function boot(RequestInterface $request = null)
$do = $instance->doBoot($wp, $do, $request);
unset($instance);

if ( ! $do ) {
$wp->query_posts();
}

return $do;
} catch (\Exception $e) {
if (defined('WP_DEBUG') && WP_DEBUG) {
Expand Down

0 comments on commit c33bd59

Please sign in to comment.