filter lang list, keep only active ones
authorEduardo <[email protected]>
Sat, 18 Nov 2023 01:29:58 +0000 (02:29 +0100)
committerEduardo <[email protected]>
Sat, 18 Nov 2023 01:29:58 +0000 (02:29 +0100)
page-generator/index.php

index a4b35b67cd4ab34c7db3550945a48160d231a050..a01d2c33bb48c2216d335d3f5636dbf5676c2146 100644 (file)
@@ -30,6 +30,11 @@ $data['footer'] = load_data(URL . '?sheet=_footer');
 $data['menu'] = load_data(URL . '?sheet=_menu');
 $data['pages'] = load_data(URL . '?sheet=_pages');
 
+// remove langs that are not active
+$data['langs'] = array_filter($data['langs'], function ($item) {
+    return $item['active'] == "TRUE";
+});
+
 #endregion
 
 #region assets and images