simplemenu_devel.module in SimpleMenu 6
Same filename and directory in other branches
Prepend the devel menu to Simplemenu.
File
simplemenu_devel.moduleView 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,
'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
Name![]() |
Description |
---|---|
simplemenu_devel_simplemenu_tree_alter | Implementation of hook_simplemenu_tree_alter() |