From c0bc34a6ce4c08e652ef86712dd6b9c1781eade5 Mon Sep 17 00:00:00 2001 From: brettp Date: Wed, 24 Mar 2010 22:20:03 +0000 Subject: Added ability to make arbitrary links for the menu items. git-svn-id: http://code.elgg.org/elgg/trunk@5498 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/elgglib.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'engine/lib/elgglib.php') diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index ad245ab79..e33fdab6f 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -3005,6 +3005,17 @@ function elgg_get_nav_items() { ); } +/** + * Hook that registers the custom menu items. + */ +function add_custom_menu_items() { + if ($custom_items = get_config('menu_items_custom_items')) { + foreach ($custom_items as $url => $name) { + add_menu($name, $url); + } + } +} + /** * Some useful constant definitions */ @@ -3021,4 +3032,4 @@ register_elgg_event_handler('init', 'system', 'elgg_init'); register_elgg_event_handler('boot', 'system', 'elgg_boot', 1000); register_plugin_hook('unit_test', 'system', 'elgg_api_test'); -//register_elgg_event_handler('pagesetup', 'system', 'ui_page_setup', 1000); \ No newline at end of file +register_elgg_event_handler('init', 'system', 'add_custom_menu_items', 1000); \ No newline at end of file -- cgit v1.2.3