| @@ -41,9 +41,9 @@ | ||
| 41 | 41 | if (!$slug) { |
| 42 | 42 | return null; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - $slug = sanitize_title($slug); | |
| 45 | + $slug = \Yatra\Helpers\SlugHelper::generate($slug); | |
| 46 | 46 | $map = [ |
| 47 | 47 | 'dashboard' => 'dashboard', |
| 48 | 48 | 'profile' => 'profile', |
| 49 | 49 | 'bookings' => 'bookings', |
| @@ -96,11 +96,11 @@ | ||
| 96 | 96 | */ |
| 97 | 97 | public static function matchListingPage(string $path): ?array |
| 98 | 98 | { |
| 99 | 99 | $bases = [ |
| 100 | - 'destination' => SettingsService::getString('destination_base', 'destination'), | |
| 101 | - 'activity' => SettingsService::getString('activity_base', 'activity'), | |
| 102 | - 'category' => SettingsService::getString('trip_category_base', 'trip-category'), | |
| 100 | + 'destination' => SettingsService::getDestinationBase(), | |
| 101 | + 'activity' => SettingsService::getActivityBase(), | |
| 102 | + 'category' => SettingsService::getTripCategoryBase(), | |
| 103 | 103 | ]; |
| 104 | 104 | |
| 105 | 105 | foreach ($bases as $type => $base) { |
| 106 | 106 | if ($path === $base) { |
| @@ -123,11 +123,11 @@ | ||
| 123 | 123 | */ |
| 124 | 124 | public static function matchTaxonomyPage(string $path): ?array |
| 125 | 125 | { |
| 126 | 126 | $bases = [ |
| 127 | - 'destination' => SettingsService::getString('destination_base', 'destination'), | |
| 128 | - 'activity' => SettingsService::getString('activity_base', 'activity'), | |
| 129 | - 'category' => SettingsService::getString('trip_category_base', 'trip-category'), | |
| 127 | + 'destination' => SettingsService::getDestinationBase(), | |
| 128 | + 'activity' => SettingsService::getActivityBase(), | |
| 129 | + 'category' => SettingsService::getTripCategoryBase(), | |
| 130 | 130 | ]; |
| 131 | 131 | |
| 132 | 132 | foreach ($bases as $type => $base) { |
| 133 | 133 | $slug = UrlParser::extractSlugFromPath($path, $base); |