Skip to content

Commit

Permalink
🩹 Let WP handle requests that should trigger a canonical redirect (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
tombroucke authored Feb 5, 2024
1 parent 4a26ed7 commit ac83f18
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Roots/Acorn/Bootloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ protected function registerRequestHandler(
return; // Let WordPress handle these requests
}

if (redirect_canonical(null, false)) {
return; // Let WordPress handle these requests
}

add_filter('do_parse_request', function ($doParse, \WP $wp, $extraQueryVars) use ($route) {
if (! $route) {
return $doParse;
Expand Down

0 comments on commit ac83f18

Please sign in to comment.