From 8618288ed51942c814f45c67354b14eec43c2422 Mon Sep 17 00:00:00 2001 From: nickw Date: Wed, 12 May 2010 22:00:27 +0000 Subject: Creating a hook for plugin authors to register Walled Garden public sites. git-svn-id: http://code.elgg.org/elgg/trunk@6016 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/sitepages/start.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mod/sitepages/start.php') diff --git a/mod/sitepages/start.php b/mod/sitepages/start.php index afdff5635..2ce1d3312 100644 --- a/mod/sitepages/start.php +++ b/mod/sitepages/start.php @@ -46,6 +46,9 @@ function sitepages_init() { // define our own ecml keywords and views register_plugin_hook('get_keywords', 'ecml', 'sitepages_ecml_keyword_hook'); register_plugin_hook('get_views', 'ecml', 'sitepages_ecml_views_hook'); + + // hook into the walled garden pages + register_plugin_hook('public_pages', 'walled_garden', 'sitepages_public_pages'); register_action("sitepages/add", FALSE, $CONFIG->pluginspath . "sitepages/actions/add.php"); register_action("sitepages/addfront", FALSE, $CONFIG->pluginspath . "sitepages/actions/addfront.php"); @@ -215,5 +218,15 @@ function sitepages_ecml_views_hook($hook, $entity_type, $return_value, $params) return $return_value; } +function sitepages_public_pages($hook, $type, $return_value, $params) { + global $CONFIG; + + $return_value[] = "{$CONFIG->url}pg/sitepages/read/About/"; + $return_value[] = "{$CONFIG->url}pg/sitepages/read/Terms/"; + $return_value[] = "{$CONFIG->url}pg/sitepages/read/Privacy/"; + + return $return_value; +} + register_elgg_event_handler('init', 'system', 'sitepages_init'); register_elgg_event_handler('pagesetup', 'system', 'sitepages_pagesetup'); \ No newline at end of file -- cgit v1.2.3