diff options
author | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-24 21:44:07 +0000 |
---|---|---|
committer | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-24 21:44:07 +0000 |
commit | 6b5a3b2dfd0a20da1dfb46f42a7bc79dfe9377fc (patch) | |
tree | e2f5b3cf9c799790fcc57b9e2c31c03cc70cb270 /mod/sitepages | |
parent | 07727717f2341edc80ba9dc47e78649d1133b29b (diff) | |
download | elgg-6b5a3b2dfd0a20da1dfb46f42a7bc79dfe9377fc.tar.gz elgg-6b5a3b2dfd0a20da1dfb46f42a7bc79dfe9377fc.tar.bz2 |
Updating multiple plugins to no longer register admin menus with an event hook.
git-svn-id: http://code.elgg.org/elgg/trunk@6191 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/sitepages')
-rw-r--r-- | mod/sitepages/start.php | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/mod/sitepages/start.php b/mod/sitepages/start.php index 457ed583c..180739cca 100644 --- a/mod/sitepages/start.php +++ b/mod/sitepages/start.php @@ -57,6 +57,11 @@ function sitepages_init() { register_action("sitepages/edit", FALSE, $CONFIG->pluginspath . "sitepages/actions/edit.php"); register_action("sitepages/delete", FALSE, $CONFIG->pluginspath . "sitepages/actions/delete.php"); + elgg_add_submenu_item(array( + 'text' => elgg_echo('sitepages'), + 'href' => "{$CONFIG->wwwroot}pg/sitepages/edit/front", + 'parent_id' => 'site', + ), 'admin', 'default'); } /** @@ -97,16 +102,6 @@ function sitepages_custom_index() { } /** - * Page setup. Adds admin controls to the admin panel. - */ -function sitepages_pagesetup(){ - if (get_context() == 'admin' && isadminloggedin()) { - global $CONFIG; - add_submenu_item(elgg_echo('sitepages'), $CONFIG->wwwroot . 'pg/sitepages/edit/front'); - } -} - -/** * * @param unknown_type $expage * @return unknown_type @@ -234,4 +229,3 @@ function sitepages_public_pages($hook, $type, $return_value, $params) { } register_elgg_event_handler('init', 'system', 'sitepages_init'); -register_elgg_event_handler('pagesetup', 'system', 'sitepages_pagesetup');
\ No newline at end of file |