diff options
author | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-12 22:00:27 +0000 |
---|---|---|
committer | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-12 22:00:27 +0000 |
commit | 8618288ed51942c814f45c67354b14eec43c2422 (patch) | |
tree | 161e4d21f3e250d25ae288be3e483e64cabef72d /mod/sitepages | |
parent | 8ae46cff217a0ed97c0920099b505ddde3c5e431 (diff) | |
download | elgg-8618288ed51942c814f45c67354b14eec43c2422.tar.gz elgg-8618288ed51942c814f45c67354b14eec43c2422.tar.bz2 |
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
Diffstat (limited to 'mod/sitepages')
-rw-r--r-- | mod/sitepages/start.php | 13 |
1 files changed, 13 insertions, 0 deletions
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 |