follow simple menu maj

Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
bachy
2012-01-08 19:40:28 +01:00
parent c22eb6bc11
commit f83a0b9aee
9 changed files with 460 additions and 108 deletions
+5 -5
View File
@@ -9,7 +9,7 @@
* \brief Alter the menu item link theme registry.
*
* This function grabs the simplemenu theme registry for the
* menu_item_link theming. This gives us a way to remove the
* menu_link theming. This gives us a way to remove the
* link and replace it with a name (anchor) instead.
*
* This is only applied to the Simplemenu as intefering with
@@ -26,11 +26,11 @@ function simplemenu_inactive_parents_theme_registry_alter(&$theme_registry) {
// Save theme function
$themes = variable_get('simplemenu_inactive_parents_theme_function', array());
$themes[$theme] = $theme_registry['menu_item_link']['function'];
$themes[$theme] = $theme_registry['menu_link']['function'];
variable_set('simplemenu_inactive_parents_theme_function', $themes);
// Replace with our own
$theme_registry['menu_item_link']['function'] = 'simplemenu_inactive_parents_theme_menu_item_link';
$theme_registry['menu_item_link']['function'] = 'simplemenu_inactive_parents_theme_menu_link';
}
/**
@@ -39,7 +39,7 @@ function simplemenu_inactive_parents_theme_registry_alter(&$theme_registry) {
* This function intercepts the menu item link theming function of
* the system and
*/
function simplemenu_inactive_parents_theme_menu_item_link($link) {
function simplemenu_inactive_parents_theme_menu_link($link) {
global $theme;
static $cnt = 0;
@@ -57,7 +57,7 @@ function simplemenu_inactive_parents_theme_menu_item_link($link) {
// somehow the preprocess function did not get called?!
// use the core default
return theme_menu_item_link($link);
return theme_menu_link($link);
}
// vim: ts=2 sw=2 et syntax=php