many updates 😁
This commit is contained in:
@@ -297,6 +297,9 @@ if (! function_exists('phpb_current_language')) {
|
||||
return $languageCode;
|
||||
}
|
||||
}
|
||||
if ('/'.explode('?', $urlComponents[0])[0] === phpb_config('website_manager.url')) {
|
||||
return phpb_config('general.language');
|
||||
}
|
||||
}
|
||||
$languageCode = phpb_config('general.language');
|
||||
if (in_array($languageCode, array_keys(phpb_active_languages()))) {
|
||||
@@ -324,6 +327,32 @@ if (! function_exists('phpb_in_module')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('phpb_themes')) {
|
||||
/**
|
||||
* Return all theme configs.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function phpb_themes()
|
||||
{
|
||||
$themes = [];
|
||||
|
||||
if (file_exists('themes') && is_dir('themes')) {
|
||||
$themesDirectory = new DirectoryIterator('themes');
|
||||
foreach ($themesDirectory as $entry) {
|
||||
$themeFolder = $entry->getFilename();
|
||||
$configFile = 'themes/' . $themeFolder . '/config.php';
|
||||
if ($entry->isDir() && !$entry->isDot() && file_exists($configFile)) {
|
||||
$themeConfig = include($configFile);
|
||||
$themes[$themeFolder] = $themeConfig;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $themes;
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('phpb_on_url')) {
|
||||
/**
|
||||
* Return whether we are currently on the given URL.
|
||||
|
||||
Reference in New Issue
Block a user