function bootstrap_styles_theme_suggestions_alter in Bootstrap Styles 1.0.x
Implements hook_theme_suggestions_alter().
File
- ./
bootstrap_styles.module, line 88 - Bootstrap styles module.
Code
function bootstrap_styles_theme_suggestions_alter(array &$suggestions, array $variables, $hook) {
$parents = $variables['element']['#array_parents'] ?? FALSE;
$bs_parents = [
'ui',
'tab_content',
'appearance',
'layout_settings',
];
// UI/Tab content are expected, and one of appearance or layout settings.
if ($parents && count(array_intersect($bs_parents, $parents)) >= 3) {
$suggestions[] = $hook . '__bs';
}
}