Pretty major update to better support several options:
* Added a white border at the top of the drop-downs in original * Optimized the "view" test for simplemenu * Enhanced the init() function by creating sub-functions and moving the footer functionality in it * The list of themes is now dynamically generated from the simplemenu themes folder * The list of superfish now includes a 'custom' so the code may come from another module or theme * The Simplemenu variable can now be moved to the header and cache in its own JS file * Create a Devel and Inactive Parents modules for additional functionality * Moved the simplemenu modules in the Menu package * Changed the function generating the menu so other modules may tweak the menu if so they wish * Moved the support for Devel in a separate sub-module. (this is with the new way of doing things & has a corresponding update hook to tell users about the change. It is actually a good example of using the new hook system!)
This commit is contained in:
31
simplemenu_devel.module
Normal file
31
simplemenu_devel.module
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
// $Id$
|
||||
|
||||
/**
|
||||
* @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(
|
||||
'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
|
||||
Reference in New Issue
Block a user