Created
February 22, 2012 22:32
-
-
Save brettp/1888009 to your computer and use it in GitHub Desktop.
Remove an item from a menu in Elgg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
elgg_register_event_handler('init', 'system', 'remove_item_init'); | |
function remove_item_init() { | |
elgg_register_plugin_hook_handler('register', 'menu:topbar', 'remove_friends'); | |
} | |
function remove_friends($hook, $type, $menu_items, $option) { | |
foreach($menu_items as $i => $item) { | |
if ($item->getName() == 'friends') { | |
unset($menu_items[$i]); | |
} | |
} | |
return $menu_items; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment