Skip to content

Commit

Permalink
Remove unpublished pages from the translated languages, move into unt…
Browse files Browse the repository at this point in the history
…ranslated list

Refs getgrav/grav-plugin-sitemap#43
  • Loading branch information
flaviocopes committed May 18, 2017
1 parent f3cecd8 commit f26b515
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions system/src/Grav/Common/Page/Page.php
Expand Up @@ -192,6 +192,10 @@ public function translatedLanguages()
$route = $aPage->slug();
}

if (!$aPage->published()) {
continue;
}

$translatedLanguages[$language] = $route;
}
}
Expand Down

0 comments on commit f26b515

Please sign in to comment.