You are here

function mmenu_preprocess_block in Mobile sliding menu 7.3

Same name and namespace in other branches
  1. 7 mmenu.module \mmenu_preprocess_block()
  2. 7.2 mmenu.module \mmenu_preprocess_block()

Implements hook_preprocess_HOOK().

File

./mmenu.module, line 1111
Primarily Drupal hooks and global API functions to manipulate mmenus.

Code

function mmenu_preprocess_block(&$variables) {
  if (isset($variables['elements']['#mmenu'])) {

    // Adds more template suggestions such as
    // block--search--form--mmenu.tpl.php or
    // block--search--form--mmenu_mmenu_right.tpl.php
    $mmenu = $variables['elements']['#mmenu'];
    $variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->module . '__' . strtr($variables['block']->delta, '-', '_') . '__' . 'mmenu';
    $variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->module . '__' . strtr($variables['block']->delta, '-', '_') . '__' . 'mmenu_' . $mmenu['name'];
  }
}