You are here

function block_styles_theme_suggestions_block_alter in Block Styles 8

Same name and namespace in other branches
  1. 2.x block_styles.module \block_styles_theme_suggestions_block_alter()
  2. 1.x block_styles.module \block_styles_theme_suggestions_block_alter()

Implements hook_theme_suggestions_HOOK_alter() for block templates.

File

./block_styles.module, line 8

Code

function block_styles_theme_suggestions_block_alter(array &$suggestions, array $variables) {
  if (isset($variables['elements']['#id'])) {
    $style = _block_styles_get_style($variables['elements']['#id']);
    if (isset($style['theme'])) {
      $suggestions[] = $style['theme'];
    }
  }
}