aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/elgglib.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/elgglib.php')
-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 1279b8906..1c4d02138 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -449,7 +449,18 @@
* @param array $menu_children Optionally, an array of submenu items
* @return true|false Depending on success
*/
- function add_menu($menu_name, $menu_url, $menu_children = array()) {
+ function add_menu($menu_name, $menu_url, $menu_children = array(), $context = "") {
+ global $CONFIG;
+ if (!isset($CONFIG->menucontexts)) {
+ $CONFIG->menucontexts = array();
+ }
+ if (empty($menu)) {
+ get_plugin_name();
+ }
+ if (empty($context)) {
+ $context = get_plugin_name();
+ }
+ $CONFIG->menucontexts[] = $context;
return add_to_register('menu',$menu_name,$menu_url, $menu_children);
}