diff options
Diffstat (limited to 'mod/sitepages/start.php')
-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 |