You are here

function block_skinr_theme_hooks in Skinr 7.2

Same name and namespace in other branches
  1. 8.2 modules/block.skinr.inc \block_skinr_theme_hooks()

Implements hook_skinr_theme_hooks().

File

modules/block.skinr.inc, line 164
Implements Skinr hooks for block.module.

Code

function block_skinr_theme_hooks($module, $element) {
  $theme_hooks = array();
  if ($module == 'block') {
    list($module, $delta) = explode('__', $element, 2);
    $result = db_select('block', 'b')
      ->fields('b')
      ->distinct()
      ->condition('b.module', $module)
      ->condition('b.delta', $delta)
      ->range(0, 1)
      ->execute();
    foreach ($result as $block) {
      $theme_hooks[] = 'block__' . $block->module;
    }
    $theme_hooks[] = 'block';
  }
  return $theme_hooks;
}