You are here

simplemenu_devel.module in SimpleMenu 7

Same filename and directory in other branches
  1. 6 simplemenu_devel.module

Prepend the devel menu to Simplemenu.

File

simplemenu_devel.module
View source
<?php

/**
 * @file
 * Prepend the devel menu to Simplemenu.
 */

/**
 * Implementation of hook_simplemenu_tree_alter()
 */
function simplemenu_devel_simplemenu_tree_alter(&$tree) {
  if (user_access('access devel information')) {
    $devel = array(
      'link' => array(
        'mlid' => 0,
        'menu_name' => 'devel',
        'hidden' => FALSE,
        'access' => TRUE,
        'title' => t('Devel module'),
        'href' => 'admin/settings/devel',
        'in_active_trail' => FALSE,
        'has_children' => TRUE,
        'localized_options' => array(
          'attributes' => array(
            'id' => 'simplemenu_devel',
          ),
        ),
      ),
      'below' => simplemenu_menu_tree('devel:0'),
    );
    array_unshift($tree, $devel);
  }
}

// vim: ts=2 sw=2 et syntax=php

Functions

Namesort descending Description
simplemenu_devel_simplemenu_tree_alter Implementation of hook_simplemenu_tree_alter()