feat(wpmc S4): Router::route internal page + page_unic swap

This commit is contained in:
Vladimir Bryzgalov
2026-05-16 19:59:00 +05:00
parent 98e16fce7c
commit 004a8517e4
2 changed files with 77 additions and 1 deletions
+9 -1
View File
@@ -60,7 +60,15 @@ final class Router
return;
}
// Internal page handling lands in Task 13.
$page_id = \url_to_postid($url_original);
if (!$page_id) {
return;
}
$swap = Helpers::page_unic_swap($page_id, $town_slug);
if ($swap !== null) {
$page_id = $swap;
}
self::install_query($page_id, $town_slug, false);
}
private static function strip_town_prefix(string $uri, string $town_slug): string