Skip to content

Commit

Permalink
Don't filter out current site alt tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Tam committed Jun 6, 2023
1 parent e97a94b commit 8aa5ba8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.7.6 - 2023-06-06
### Changed
- Don't filter out current site alt tag

## 3.7.5 - 2023-06-05
### Added
- Support passing `?site=<siteHandle>` to sitemap URLs for headless sites
Expand Down
7 changes: 4 additions & 3 deletions src/services/SitemapService.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,11 @@ public function core (array $variables)
$elements->limit = $settings->sitemapLimit;
$elements->offset = $settings->sitemapLimit * $variables['page'];

$currentLocale = $craft->locale->id;
// $currentLocale = $craft->locale->id;
$availableLocales = $craft->i18n->getSiteLocaleIds();

if (($key = array_search($currentLocale, $availableLocales)) !== false)
unset($availableLocales[$key]);
// if (($key = array_search($currentLocale, $availableLocales)) !== false)
// unset($availableLocales[$key]);

$seoFieldHandle = null;
if ($first = $elements->one())
Expand Down Expand Up @@ -376,6 +376,7 @@ function ($a, $b) {
[]
);


if (!$settings->removeAlternateUrls)
{
foreach ($item->supportedSites as $siteId)
Expand Down

0 comments on commit 8aa5ba8

Please sign in to comment.