aboutsummaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'start.php')
-rw-r--r--start.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/start.php b/start.php
index 1881b1d31..ea5c67e2d 100644
--- a/start.php
+++ b/start.php
@@ -162,6 +162,17 @@
}
/**
+ * Sets up tidypics admin menu. Triggered on pagesetup.
+ */
+ function tidypics_adminmenu()
+ {
+ global $CONFIG;
+ if (get_context() == 'admin' && isadminloggedin()) {
+ add_submenu_item(elgg_echo('tidypics:adminsettings'), $CONFIG->url . "mod/tidypics/admin.php");
+ }
+ }
+
+ /**
* tidypics page handler
*
* @param array $page Array of page elements, forwarded by the page handling mechanism
@@ -338,6 +349,7 @@
// Make sure tidypics_init is called on initialisation
register_elgg_event_handler('init','system','tidypics_init');
register_elgg_event_handler('pagesetup','system','tidypics_submenus');
+ register_elgg_event_handler('pagesetup','system','tidypics_adminmenu');
// Register actions
register_action("tidypics/upload", false, $CONFIG->pluginspath . "tidypics/actions/upload.php");