function _bootstrap_core_base_themes in Bootstrap Core 7.3
Helper function for building a flattened array of inherited base theme names.
Parameters
array $themes: The array of enabled themes provided by list_themes().
string $theme_key: The theme machine name to use for retrieving all base-themes associated.
Return value
array An indexed array of theme names, including $theme_key.
1 call to _bootstrap_core_base_themes()
- bootstrap_core_requirements in ./
bootstrap_core.install - Implements hook_install().
File
- ./
bootstrap_core.install, line 59 - bootstrap_core.install Install, update and uninstall functions for the Bootstrap UX module.
Code
function _bootstrap_core_base_themes($themes, $theme_key) {
$base_themes = array();
if (isset($themes[$theme_key])) {
$base_themes[] = $theme_key;
if (isset($themes[$theme_key]->base_themes)) {
foreach (array_keys($themes[$theme_key]->base_themes) as $theme) {
$base_themes = array_merge($base_themes, _bootstrap_core_base_themes($themes, $theme));
}
}
}
return array_unique(array_filter($base_themes));
}