From dac2e1d2d38115478b4e0f79744273680d111681 Mon Sep 17 00:00:00 2001 From: Stefanos Valoumas Date: Fri, 14 Jun 2024 15:26:33 +0300 Subject: [PATCH] Remove source subdirectory hreflang --- includes/lib/transifex-live-integration-hreflang.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/lib/transifex-live-integration-hreflang.php b/includes/lib/transifex-live-integration-hreflang.php index ffdc1a7..f10ca27 100644 --- a/includes/lib/transifex-live-integration-hreflang.php +++ b/includes/lib/transifex-live-integration-hreflang.php @@ -139,9 +139,10 @@ public function render_hreflang() { $hreflangs = $this->generate_languages_hreflang( $source_url_path, $this->languages, $this->language_map, $this->hreflang_map ); $source_hreflang = ''; - foreach ($hreflangs as $hreflang) { + foreach ($hreflangs as $index => $hreflang) { if ($hreflang['is_source']) { $source_hreflang = $hreflang['hreflang']; + unset($hreflangs[$index]); break; } }