aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-24 22:20:03 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-24 22:20:03 +0000
commitc0bc34a6ce4c08e652ef86712dd6b9c1781eade5 (patch)
treee5057c33f98e0b8f029a131f2172a49ccd88a7de /engine
parent3b0b462b5790f15fcb612de66544838bdbce658b (diff)
downloadelgg-c0bc34a6ce4c08e652ef86712dd6b9c1781eade5.tar.gz
elgg-c0bc34a6ce4c08e652ef86712dd6b9c1781eade5.tar.bz2
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
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/elgglib.php13
1 files changed, 12 insertions, 1 deletions
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
@@ -3006,6 +3006,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
*/
define('ACCESS_DEFAULT', -1);
@@ -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