feat(wpmc S4): Router::route internal page + page_unic swap
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user