You are here

function blocktheme_theme_suggestions_block in Block Theme 8

Implements hook_theme_suggestions_HOOK().

File

./blocktheme.module, line 50
Provides a configuration option to select custom themes for blocks

Code

function blocktheme_theme_suggestions_block(array $variables) {
  $form_id = $variables['elements']['#id'];
  if ($custom_block_theme = blocktheme_get_theme($form_id)) {
    $template_name = 'block__blocktheme__' . str_replace('-', '_', $custom_block_theme);
    return $template_name;
  }
  return NULL;
}