aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-10 22:22:40 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-10 22:22:40 +0000
commitc8f6c3c934df01bf969e3d91ae67f0887de10da9 (patch)
treed21179fda1e19d540eb3ea56b31584f86fc1e338 /mod
parenta7801c71ecc6ce0f0d2a8fc82cdc779da9417aa4 (diff)
downloadelgg-c8f6c3c934df01bf969e3d91ae67f0887de10da9.tar.gz
elgg-c8f6c3c934df01bf969e3d91ae67f0887de10da9.tar.bz2
Fixes #2367: With fear and trepidation, converting events/plugin hooks to use elgg_ prefixed versions
git-svn-id: http://code.elgg.org/elgg/trunk@7284 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/blog/start.php14
-rw-r--r--mod/bookmarks/start.php8
-rw-r--r--mod/captcha/start.php8
-rw-r--r--mod/categories/start.php6
-rw-r--r--mod/crontrigger/start.php6
-rw-r--r--mod/defaultwidgets/start.php84
-rw-r--r--mod/diagnostics/actions/download.php2
-rw-r--r--mod/diagnostics/start.php14
-rw-r--r--mod/ecml/ecml_functions.php2
-rw-r--r--mod/ecml/start.php16
-rw-r--r--mod/embed/start.php6
-rw-r--r--mod/embed/views/default/embed/embed.php2
-rw-r--r--mod/file/start.php12
-rw-r--r--mod/friends/start.php2
-rw-r--r--mod/garbagecollector/start.php6
-rw-r--r--mod/groups/start.php36
-rw-r--r--mod/htmlawed/start.php8
-rw-r--r--mod/invitefriends/start.php2
-rw-r--r--mod/logbrowser/start.php2
-rw-r--r--mod/logrotate/start.php4
-rw-r--r--mod/members/index.php2
-rw-r--r--mod/members/start.php4
-rw-r--r--mod/messageboard/start.php2
-rw-r--r--mod/messages/start.php12
-rw-r--r--mod/notifications/start.php14
-rw-r--r--mod/pages/start.php12
-rw-r--r--mod/profile/actions/edit.php2
-rw-r--r--mod/profile/actions/iconupload.php2
-rw-r--r--mod/profile/start.php14
-rw-r--r--mod/reportedcontent/actions/add.php2
-rw-r--r--mod/reportedcontent/actions/archive.php2
-rw-r--r--mod/reportedcontent/actions/delete.php2
-rw-r--r--mod/reportedcontent/start.php2
-rw-r--r--mod/riverdashboard/start.php6
-rw-r--r--mod/search/index.php10
-rw-r--r--mod/search/start.php16
-rw-r--r--mod/sitepages/start.php10
-rw-r--r--mod/tagcloud/start.php2
-rw-r--r--mod/thewire/start.php8
-rw-r--r--mod/tinymce/start.php2
-rw-r--r--mod/twitter/start.php2
-rw-r--r--mod/uservalidationbyemail/start.php16
-rw-r--r--mod/zaudio/start.php2
43 files changed, 193 insertions, 193 deletions
diff --git a/mod/blog/start.php b/mod/blog/start.php
index 386870fd4..92ddf65c8 100644
--- a/mod/blog/start.php
+++ b/mod/blog/start.php
@@ -30,17 +30,17 @@ function blog_init() {
elgg_extend_view('css', 'blog/css');
- register_elgg_event_handler('pagesetup', 'system', 'blog_page_setup');
+ elgg_register_event_handler('pagesetup', 'system', 'blog_page_setup');
register_page_handler('blog', 'blog_page_handler');
register_entity_url_handler('blog_url_handler', 'object', 'blog');
// notifications
register_notification_object('object', 'blog', elgg_echo('blog:newpost'));
- register_plugin_hook('notify:entity:message', 'object', 'blog_notify_message');
+ elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'blog_notify_message');
// pingbacks
- //register_elgg_event_handler('create', 'object', 'blog_incoming_ping');
- //register_plugin_hook('pingback:object:subtypes', 'object', 'blog_pingback_subtypes');
+ //elgg_register_event_handler('create', 'object', 'blog_incoming_ping');
+ //elgg_register_plugin_hook_handler('pingback:object:subtypes', 'object', 'blog_pingback_subtypes');
// Register for search.
register_entity_type('object', 'blog');
@@ -54,10 +54,10 @@ function blog_init() {
register_action('blog/delete', FALSE, "$action_path/delete.php");
// ecml
- register_plugin_hook('get_views', 'ecml', 'blog_ecml_views_hook');
+ elgg_register_plugin_hook_handler('get_views', 'ecml', 'blog_ecml_views_hook');
// Register profile menu hook
- register_plugin_hook('profile_menu', 'profile', 'blog_profile_menu');
+ elgg_register_plugin_hook_handler('profile_menu', 'profile', 'blog_profile_menu');
}
/**
@@ -204,4 +204,4 @@ function blog_profile_menu($hook, $entity_type, $return_value, $params) {
return $return_value;
}
-register_elgg_event_handler('init', 'system', 'blog_init');
+elgg_register_event_handler('init', 'system', 'blog_init');
diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php
index 808f88ede..b0a2369d3 100644
--- a/mod/bookmarks/start.php
+++ b/mod/bookmarks/start.php
@@ -25,7 +25,7 @@ function bookmarks_init() {
}
// Listen to notification events and supply a more useful message
- register_plugin_hook('notify:entity:message', 'object', 'bookmarks_notify_message');
+ elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'bookmarks_notify_message');
// Register a URL handler for shared items
register_entity_url_handler('bookmark_url','object','bookmarks');
@@ -43,7 +43,7 @@ function bookmarks_init() {
elgg_extend_view('groups/tool_latest','bookmarks/group_bookmarks');
// Register profile menu hook
- register_plugin_hook('profile_menu', 'profile', 'bookmarks_profile_menu');
+ elgg_register_plugin_hook_handler('profile_menu', 'profile', 'bookmarks_profile_menu');
}
/**
@@ -327,8 +327,8 @@ function bookmarks_profile_menu($hook, $entity_type, $return_value, $params) {
}
// Make sure the initialisation function is called on initialisation
-register_elgg_event_handler('init','system','bookmarks_init');
-register_elgg_event_handler('pagesetup','system','bookmarks_pagesetup');
+elgg_register_event_handler('init','system','bookmarks_init');
+elgg_register_event_handler('pagesetup','system','bookmarks_pagesetup');
// Register actions
global $CONFIG;
diff --git a/mod/captcha/start.php b/mod/captcha/start.php
index 0c3f17c60..3458e02a5 100644
--- a/mod/captcha/start.php
+++ b/mod/captcha/start.php
@@ -21,15 +21,15 @@ function captcha_init() {
$CONFIG->captcha_length = 5;
// Register a function that provides some default override actions
- register_plugin_hook('actionlist', 'captcha', 'captcha_actionlist_hook');
+ elgg_register_plugin_hook_handler('actionlist', 'captcha', 'captcha_actionlist_hook');
// Register actions to intercept
$actions = array();
- $actions = trigger_plugin_hook('actionlist', 'captcha', NULL, $actions);
+ $actions = elgg_trigger_plugin_hook('actionlist', 'captcha', NULL, $actions);
if (($actions) && (is_array($actions))) {
foreach ($actions as $action) {
- register_plugin_hook("action", $action, "captcha_verify_action_hook");
+ elgg_register_plugin_hook_handler("action", $action, "captcha_verify_action_hook");
}
}
}
@@ -133,4 +133,4 @@ function captcha_actionlist_hook($hook, $entity_type, $returnvalue, $params) {
return $returnvalue;
}
-register_elgg_event_handler('init', 'system', 'captcha_init');
+elgg_register_event_handler('init', 'system', 'captcha_init');
diff --git a/mod/categories/start.php b/mod/categories/start.php
index 35406459a..b717294f7 100644
--- a/mod/categories/start.php
+++ b/mod/categories/start.php
@@ -19,8 +19,8 @@ function categories_init() {
register_page_handler('categories', 'categories_page_handler');
- register_elgg_event_handler('update','all','categories_save');
- register_elgg_event_handler('create','all','categories_save');
+ elgg_register_event_handler('update','all','categories_save');
+ elgg_register_event_handler('create','all','categories_save');
}
@@ -73,4 +73,4 @@ function categories_on_disable() {
elgg_delete_admin_notice('categories_admin_notice_no_categories');
}
-register_elgg_event_handler('init','system','categories_init'); \ No newline at end of file
+elgg_register_event_handler('init','system','categories_init'); \ No newline at end of file
diff --git a/mod/crontrigger/start.php b/mod/crontrigger/start.php
index 93d72de46..379fe1978 100644
--- a/mod/crontrigger/start.php
+++ b/mod/crontrigger/start.php
@@ -16,10 +16,10 @@
*/
function crontrigger_init()
{
- register_elgg_event_handler('shutdown', 'system', 'crontrigger_shutdownhook');
+ elgg_register_event_handler('shutdown', 'system', 'crontrigger_shutdownhook');
}
- function crontrigger_trigger($period) { trigger_plugin_hook('cron', $period); }
+ function crontrigger_trigger($period) { elgg_trigger_plugin_hook('cron', $period); }
function crontrigger_minute() { crontrigger_trigger('minute'); }
@@ -76,5 +76,5 @@
// Initialise plugin
- register_elgg_event_handler('init','system','crontrigger_init');
+ elgg_register_event_handler('init','system','crontrigger_init');
?> \ No newline at end of file
diff --git a/mod/defaultwidgets/start.php b/mod/defaultwidgets/start.php
index 2e52f78be..9e86a1625 100644
--- a/mod/defaultwidgets/start.php
+++ b/mod/defaultwidgets/start.php
@@ -3,12 +3,12 @@
* Elgg default_widgets plugin.
*
* @package DefaultWidgets
- *
+ *
* Code based on the work of:
* @link http://www.tastyseed.com
* @link http://www.chadsowald.com
* @links http://www.somosmas.org
- *
+ *
*/
global $CONFIG;
@@ -17,7 +17,7 @@ global $CONFIG;
* Default widgets initialisation
*
* These parameters are required for the event API, but we won't use them:
- *
+ *
* @param unknown_type $event
* @param unknown_type $object_type
* @param unknown_type $object
@@ -25,12 +25,12 @@ global $CONFIG;
function defaultwidgets_init() {
// register create user event hook
register_elgg_event_handler ( 'create', 'user', 'defaultwidgets_newusers' );
-
+
// set the widget access to the default access on validation if this is not an admin-created user
if (!isadminloggedin()) {
- register_elgg_event_handler('validate', 'user', 'defaultwidgets_reset_access');
+ elgg_register_event_handler('validate', 'user', 'defaultwidgets_reset_access');
}
-
+
// @todo These submenu pages should be DRYed up
elgg_add_admin_submenu_item('default_profile_widgets', elgg_echo('defaultwidgets:menu:profile'), 'appearance');
elgg_add_admin_submenu_item('default_dashboard_widgets', elgg_echo('defaultwidgets:menu:dashboard'), 'appearance');
@@ -38,11 +38,11 @@ function defaultwidgets_init() {
/**
* Overrides default permissions for the default widgets context
- *
+ *
*/
function defaultwidgets_can_edit($hook_name, $entity_type, $return_value, $parameters) {
global $defaultwidget_access;
-
+
if ($defaultwidget_access) {
return true;
}
@@ -55,7 +55,7 @@ function defaultwidgets_can_edit($hook_name, $entity_type, $return_value, $param
*/
function defaultwidgets_can_edit_metadata($hook_name, $entity_type, $return_value, $parameters) {
global $defaultwidget_access;
-
+
if ($defaultwidget_access) {
return true;
}
@@ -69,7 +69,7 @@ function defaultwidgets_can_edit_metadata($hook_name, $entity_type, $return_valu
*/
function defaultwidgets_can_edit_container($hook_name, $entity_type, $return_value, $parameters) {
global $defaultwidget_access;
-
+
if ($defaultwidget_access) {
return true;
}
@@ -80,14 +80,14 @@ function defaultwidgets_can_edit_container($hook_name, $entity_type, $return_val
* Extends the create user event to add admin defined widgets to the dashboard/profile context
*/
function defaultwidgets_newusers($event, $object_type, $object) {
-
+
// turn on permissions override
global $defaultwidget_access, $CONFIG;
$defaultwidget_access = true;
-
+
// get the new user guid
$guid = $object->guid;
-
+
if (isadminloggedin()) {
// this is an admin-created user
// no permissions problems, so set proper access now
@@ -99,37 +99,37 @@ function defaultwidgets_newusers($event, $object_type, $object) {
// to avoid Elgg permissions problems
$widget_access = ACCESS_PUBLIC;
}
-
+
// check if it's set
if (! empty ( $guid )) {
-
+
// get the user entity
if ($user = get_entity ( $guid )) {
-
+
// can this user edit
if ($user->canEdit ()) {
-
+
// each of the contexts to add widgets for
$contexts = array ('profile', 'dashboard' );
-
+
// get the entities for the module
$entities = elgg_get_entities (array('type' => 'object', 'subtype' => 'moddefaultwidgets', 'limit' => 9999));
-
+
// check if the entity exists
if (isset ( $entities [0] )) {
-
+
// get the widgets for the context
$entity = $entities [0];
-
+
foreach ( $contexts as $context ) {
$current_widgets = $entity->$context;
list ( $left, $middle, $right ) = split ( '%%', $current_widgets );
-
+
// split columns into seperate widgets
$area1widgets = split ( '::', $left );
$area2widgets = split ( '::', $middle );
$area3widgets = split ( '::', $right );
-
+
// clear out variables if no widgets are available
if ($area1widgets [0] == "")
$area1widgets = false;
@@ -137,21 +137,21 @@ function defaultwidgets_newusers($event, $object_type, $object) {
$area2widgets = false;
if ($area3widgets [0] == "")
$area3widgets = false;
-
- // generate left column widgets for a new user
+
+ // generate left column widgets for a new user
if ($area1widgets) {
foreach ( $area1widgets as $i => $widget ) {
add_widget ( $guid, $widget, $context, ($i + 1), 1, $widget_access );
}
}
-
+
// generate middle column widgets for a new user
if ($area2widgets) {
foreach ( $area2widgets as $i => $widget ) {
add_widget ( $guid, $widget, $context, ($i + 1), 2, $widget_access );
}
}
-
+
// generate right column widgets for a new user
if ($area3widgets) {
foreach ( $area3widgets as $i => $widget ) {
@@ -163,45 +163,45 @@ function defaultwidgets_newusers($event, $object_type, $object) {
}
}
}
-
+
// turn off permissions override
$defaultwidget_access = false;
}
function defaultwidgets_reset_access($event, $object_type, $object) {
-
+
global $defaultwidget_access;
-
+
// turn on permissions override
$defaultwidget_access = true;
-
+
// the widgets are disabled, so turn on the ability to see disabled entities
-
+
$access_status = access_get_show_hidden_status();
access_show_hidden_entities(true);
-
+
$widgets = elgg_get_entities(array('type' => 'object', 'subtype' => 'widget', 'owner_guid' => $object->getGUID()));
-
+
if ($widgets) {
foreach($widgets as $widget) {
$widget->access_id = get_default_access();
$widget->save();
}
}
-
+
access_show_hidden_entities($access_status);
-
+
// turn off permissions override
$defaultwidget_access = false;
-
+
return true;
}
// Make sure the status initialisation function is called on initialisation
-register_elgg_event_handler ( 'init', 'system', 'defaultwidgets_init' );
+elgg_register_event_handler('init', 'system', 'defaultwidgets_init');
-register_plugin_hook ( 'permissions_check', 'user', 'defaultwidgets_can_edit' );
-register_plugin_hook ( 'permissions_check', 'object', 'defaultwidgets_can_edit' );
-register_plugin_hook ( 'container_permissions_check', 'user', 'defaultwidgets_can_edit_container' );
+elgg_register_plugin_hook_handler('permissions_check', 'user', 'defaultwidgets_can_edit');
+elgg_register_plugin_hook_handler('permissions_check', 'object', 'defaultwidgets_can_edit');
+elgg_register_plugin_hook_handler('container_permissions_check', 'user', 'defaultwidgets_can_edit_container');
-register_action ( "defaultwidgets/update", false, $CONFIG->pluginspath . "defaultwidgets/actions/update.php" );
+register_action("defaultwidgets/update", false, $CONFIG->pluginspath . "defaultwidgets/actions/update.php");
diff --git a/mod/diagnostics/actions/download.php b/mod/diagnostics/actions/download.php
index d429f2592..3c096eb0a 100644
--- a/mod/diagnostics/actions/download.php
+++ b/mod/diagnostics/actions/download.php
@@ -8,7 +8,7 @@
admin_gatekeeper();
$output = elgg_echo('diagnostics:header', array(date('r'), get_loggedin_user()->name));
- $output = trigger_plugin_hook('diagnostics:report', 'system', null, $output);
+ $output = elgg_trigger_plugin_hook('diagnostics:report', 'system', null, $output);
header("Cache-Control: public");
header("Content-Description: File Transfer");
diff --git a/mod/diagnostics/start.php b/mod/diagnostics/start.php
index 46a5e9e10..8895a2eec 100644
--- a/mod/diagnostics/start.php
+++ b/mod/diagnostics/start.php
@@ -181,13 +181,13 @@ function diagnostics_globals_hook($hook, $entity_type, $returnvalue, $params)
}
// Initialise log browser
-register_elgg_event_handler('init','system','diagnostics_init');
-register_elgg_event_handler('pagesetup','system','diagnostics_pagesetup');
+elgg_register_event_handler('init','system','diagnostics_init');
+elgg_register_event_handler('pagesetup','system','diagnostics_pagesetup');
-register_plugin_hook("diagnostics:report", "system", "diagnostics_basic_hook", 0); // show basics first
-register_plugin_hook("diagnostics:report", "system", "diagnostics_plugins_hook", 2); // Now the plugins
-register_plugin_hook("diagnostics:report", "system", "diagnostics_sigs_hook", 1); // Now the signatures
+elgg_register_plugin_hook_handler("diagnostics:report", "system", "diagnostics_basic_hook", 0); // show basics first
+elgg_register_plugin_hook_handler("diagnostics:report", "system", "diagnostics_plugins_hook", 2); // Now the plugins
+elgg_register_plugin_hook_handler("diagnostics:report", "system", "diagnostics_sigs_hook", 1); // Now the signatures
-register_plugin_hook("diagnostics:report", "system", "diagnostics_globals_hook"); // Global variables
-register_plugin_hook("diagnostics:report", "system", "diagnostics_phpinfo_hook"); // PHP info
+elgg_register_plugin_hook_handler("diagnostics:report", "system", "diagnostics_globals_hook"); // Global variables
+elgg_register_plugin_hook_handler("diagnostics:report", "system", "diagnostics_phpinfo_hook"); // PHP info
?> \ No newline at end of file
diff --git a/mod/ecml/ecml_functions.php b/mod/ecml/ecml_functions.php
index 938d003f2..75839aec4 100644
--- a/mod/ecml/ecml_functions.php
+++ b/mod/ecml/ecml_functions.php
@@ -267,7 +267,7 @@ function ecml_get_keywords($recache = FALSE) {
return $CONFIG->ecml_keywords;
}
- $keywords = trigger_plugin_hook('get_keywords', 'ecml', NULL, array());
+ $keywords = elgg_trigger_plugin_hook('get_keywords', 'ecml', NULL, array());
$CONFIG->ecml_keywords = $keywords;
return $keywords;
}
diff --git a/mod/ecml/start.php b/mod/ecml/start.php
index 14031aac4..82bea88ae 100644
--- a/mod/ecml/start.php
+++ b/mod/ecml/start.php
@@ -45,25 +45,25 @@ function ecml_init() {
//elgg_extend_view('input/text', 'ecml/input_ext');
// add parsing for core views.
- register_plugin_hook('get_views', 'ecml', 'ecml_views_hook');
+ elgg_register_plugin_hook_handler('get_views', 'ecml', 'ecml_views_hook');
// get register the views we want to parse for ecml
// @todo will need to do profiling to see if it would be faster
// to foreach through this list and register to specific views or
// do the check in a single plugin hook.
// Wants array('view_name' => 'Short Description')
- $CONFIG->ecml_parse_views = trigger_plugin_hook('get_views', 'ecml', NULL, array());
+ $CONFIG->ecml_parse_views = elgg_trigger_plugin_hook('get_views', 'ecml', NULL, array());
foreach ($CONFIG->ecml_parse_views as $view => $desc) {
- register_plugin_hook('view', $view, 'ecml_parse_view');
+ elgg_register_plugin_hook_handler('view', $view, 'ecml_parse_view');
}
// provide a few built-in ecml keywords.
// @todo could pull this out into an array here to save an API call.
- register_plugin_hook('get_keywords', 'ecml', 'ecml_keyword_hook');
+ elgg_register_plugin_hook_handler('get_keywords', 'ecml', 'ecml_keyword_hook');
// grab the list of keywords and their views from plugins
- $CONFIG->ecml_keywords = trigger_plugin_hook('get_keywords', 'ecml', NULL, array());
+ $CONFIG->ecml_keywords = elgg_trigger_plugin_hook('get_keywords', 'ecml', NULL, array());
// grab permissions for specific views/contexts
// this is a black list.
@@ -73,10 +73,10 @@ function ecml_init() {
$CONFIG->ecml_permissions = unserialize(get_plugin_setting('ecml_permissions', 'ecml'));
// 3rd party media embed section
- register_plugin_hook('embed_get_sections', 'all', 'ecml_embed_web_services_hook');
+ elgg_register_plugin_hook_handler('embed_get_sections', 'all', 'ecml_embed_web_services_hook');
// remove ecml when stripping tags
- register_plugin_hook('format', 'strip_tags', 'ecml_strip_tags');
+ elgg_register_plugin_hook_handler('format', 'strip_tags', 'ecml_strip_tags');
}
/**
@@ -295,4 +295,4 @@ function ecml_strip_tags($hook, $type, $value, $params) {
}
// be sure to run after other plugins
-register_elgg_event_handler('init', 'system', 'ecml_init', 9999); \ No newline at end of file
+elgg_register_event_handler('init', 'system', 'ecml_init', 9999); \ No newline at end of file
diff --git a/mod/embed/start.php b/mod/embed/start.php
index b3a6a3feb..5a7076c34 100644
--- a/mod/embed/start.php
+++ b/mod/embed/start.php
@@ -44,8 +44,8 @@ function embed_page_handler($page) {
// default to embed/listing | item if not found.
// @todo trigger for all right now. If we categorize these later we can trigger
// for certain categories.
- $sections = trigger_plugin_hook('embed_get_sections', 'all', NULL, array());
- $upload_sections = trigger_plugin_hook('embed_get_upload_sections', 'all', NULL, array());
+ $sections = elgg_trigger_plugin_hook('embed_get_sections', 'all', NULL, array());
+ $upload_sections = elgg_trigger_plugin_hook('embed_get_upload_sections', 'all', NULL, array());
elgg_sort_3d_array_by_value($sections, 'name');
elgg_sort_3d_array_by_value($upload_sections, 'name');
@@ -66,4 +66,4 @@ function embed_page_handler($page) {
exit;
}
-register_elgg_event_handler('init', 'system', 'embed_init'); \ No newline at end of file
+elgg_register_event_handler('init', 'system', 'embed_init'); \ No newline at end of file
diff --git a/mod/embed/views/default/embed/embed.php b/mod/embed/views/default/embed/embed.php
index 583ea71e5..2855a5576 100644
--- a/mod/embed/views/default/embed/embed.php
+++ b/mod/embed/views/default/embed/embed.php
@@ -74,7 +74,7 @@ if (!$sections) {
if ($section_content = elgg_view("embed/$active_section/content", $params)) {
// handles its own pagination
$content .= $section_content;
- } elseif ($embed_info = trigger_plugin_hook('embed_get_items', $active_section, $params, array('items' => array(), 'count' => 0))) {
+ } elseif ($embed_info = elgg_trigger_plugin_hook('embed_get_items', $active_section, $params, array('items' => array(), 'count' => 0))) {
// check if we have an override for this section type.
$view = "embed/$active_section/item/$layout";
diff --git a/mod/file/start.php b/mod/file/start.php
index 64e890626..78790d034 100644
--- a/mod/file/start.php
+++ b/mod/file/start.php
@@ -51,7 +51,7 @@
}
// Listen to notification events and supply a more useful message
- register_plugin_hook('notify:entity:message', 'object', 'file_notify_message');
+ elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'file_notify_message');
// add the group files tool option
add_group_tool_option('file',elgg_echo('groups:enablefiles'),true);
@@ -60,9 +60,9 @@
register_entity_type('object','file');
// embed support
- register_plugin_hook('embed_get_sections', 'all', 'file_embed_get_sections');
- register_plugin_hook('embed_get_items', 'file', 'file_embed_get_items');
- register_plugin_hook('embed_get_upload_sections', 'all', 'file_embed_get_upload_sections');
+ elgg_register_plugin_hook_handler('embed_get_sections', 'all', 'file_embed_get_sections');
+ elgg_register_plugin_hook_handler('embed_get_items', 'file', 'file_embed_get_items');
+ elgg_register_plugin_hook_handler('embed_get_upload_sections', 'all', 'file_embed_get_upload_sections');
}
@@ -297,8 +297,8 @@
}
// Make sure test_init is called on initialisation
- register_elgg_event_handler('init','system','file_init');
- register_elgg_event_handler('pagesetup','system','file_submenus');
+ elgg_register_event_handler('init','system','file_init');
+ elgg_register_event_handler('pagesetup','system','file_submenus');
// Register actions
register_action("file/upload", false, $CONFIG->pluginspath . "file/actions/upload.php");
diff --git a/mod/friends/start.php b/mod/friends/start.php
index b936477b2..fe6a40c75 100644
--- a/mod/friends/start.php
+++ b/mod/friends/start.php
@@ -11,4 +11,4 @@ function friends_init() {
add_widget_type('friends', elgg_echo("friends"), elgg_echo('friends:widget:description'));
}
-register_elgg_event_handler('init', 'system', 'friends_init');
+elgg_register_event_handler('init', 'system', 'friends_init');
diff --git a/mod/garbagecollector/start.php b/mod/garbagecollector/start.php
index e3f8c030f..26a462207 100644
--- a/mod/garbagecollector/start.php
+++ b/mod/garbagecollector/start.php
@@ -22,7 +22,7 @@
}
// Register cron hook
- register_plugin_hook('cron', $period, 'garbagecollector_cron');
+ elgg_register_plugin_hook_handler('cron', $period, 'garbagecollector_cron');
}
/**
@@ -48,7 +48,7 @@
// Now, because we are nice, trigger a plugin hook to let other plugins do some GC
$rv = true;
$period = get_plugin_setting('period','garbagecollector');
- trigger_plugin_hook('gc', 'system', array('period' => $period));
+ elgg_trigger_plugin_hook('gc', 'system', array('period' => $period));
// Now we optimize all tables
$tables = get_db_tables();
@@ -67,5 +67,5 @@
}
// Initialise plugin
- register_elgg_event_handler('init','system','garbagecollector_init');
+ elgg_register_event_handler('init','system','garbagecollector_init');
?> \ No newline at end of file
diff --git a/mod/groups/start.php b/mod/groups/start.php
index 8e5befb74..3e9f228ed 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -52,30 +52,30 @@
elgg_extend_view('css','groups/css');
// Access permissions
- register_plugin_hook('access:collections:write', 'all', 'groups_write_acl_plugin_hook');
- //register_plugin_hook('access:collections:read', 'all', 'groups_read_acl_plugin_hook');
+ elgg_register_plugin_hook_handler('access:collections:write', 'all', 'groups_write_acl_plugin_hook');
+ //elgg_register_plugin_hook_handler('access:collections:read', 'all', 'groups_read_acl_plugin_hook');
// Notification hooks
if (is_callable('register_notification_object'))
register_notification_object('object', 'groupforumtopic', elgg_echo('groupforumtopic:new'));
- register_plugin_hook('object:notifications','object','group_object_notifications_intercept');
+ elgg_register_plugin_hook_handler('object:notifications','object','group_object_notifications_intercept');
// Listen to notification events and supply a more useful message
- register_plugin_hook('notify:entity:message', 'object', 'groupforumtopic_notify_message');
+ elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'groupforumtopic_notify_message');
// add the forum tool option
add_group_tool_option('forum',elgg_echo('groups:enableforum'),true);
// Now override icons
- register_plugin_hook('entity:icon:url', 'group', 'groups_groupicon_hook');
+ elgg_register_plugin_hook_handler('entity:icon:url', 'group', 'groups_groupicon_hook');
// Register profile menu hook
- register_plugin_hook('profile_menu', 'profile', 'forum_profile_menu');
- register_plugin_hook('profile_menu', 'profile', 'activity_profile_menu');
+ elgg_register_plugin_hook_handler('profile_menu', 'profile', 'forum_profile_menu');
+ elgg_register_plugin_hook_handler('profile_menu', 'profile', 'activity_profile_menu');
// allow ecml in discussion and profiles
- register_plugin_hook('get_views', 'ecml', 'groups_ecml_views_hook');
- register_plugin_hook('get_views', 'ecml', 'groupprofile_ecml_views_hook');
+ elgg_register_plugin_hook_handler('get_views', 'ecml', 'groups_ecml_views_hook');
+ elgg_register_plugin_hook_handler('get_views', 'ecml', 'groupprofile_ecml_views_hook');
}
@@ -179,7 +179,7 @@
//'website' => 'url',
);
- $CONFIG->group = trigger_plugin_hook('profile:fields', 'group', NULL, $profile_defaults);
+ $CONFIG->group = elgg_trigger_plugin_hook('profile:fields', 'group', NULL, $profile_defaults);
// register any tag metadata names
foreach ($CONFIG->group as $name => $type) {
@@ -623,18 +623,18 @@
register_extender_url_handler('group_topicpost_url','annotation', 'group_topic_post');
// Register a handler for create groups
- register_elgg_event_handler('create', 'group', 'groups_create_event_listener');
+ elgg_register_event_handler('create', 'group', 'groups_create_event_listener');
// Register a handler for delete groups
- register_elgg_event_handler('delete', 'group', 'groups_delete_event_listener');
+ elgg_register_event_handler('delete', 'group', 'groups_delete_event_listener');
// Make sure the groups initialisation function is called on initialisation
- register_elgg_event_handler('init','system','groups_init');
- register_elgg_event_handler('init','system','groups_fields_setup', 10000); // Ensure this runs after other plugins
- register_elgg_event_handler('join','group','groups_user_join_event_listener');
- register_elgg_event_handler('leave','group','groups_user_leave_event_listener');
- register_elgg_event_handler('pagesetup','system','groups_submenus');
- register_elgg_event_handler('annotate','all','group_object_notifications');
+ elgg_register_event_handler('init','system','groups_init');
+ elgg_register_event_handler('init','system','groups_fields_setup', 10000); // Ensure this runs after other plugins
+ elgg_register_event_handler('join','group','groups_user_join_event_listener');
+ elgg_register_event_handler('leave','group','groups_user_leave_event_listener');
+ elgg_register_event_handler('pagesetup','system','groups_submenus');
+ elgg_register_event_handler('annotate','all','group_object_notifications');
// Register actions
global $CONFIG;
diff --git a/mod/htmlawed/start.php b/mod/htmlawed/start.php
index 0c5ab6ab0..04c363968 100644
--- a/mod/htmlawed/start.php
+++ b/mod/htmlawed/start.php
@@ -23,7 +23,7 @@ function htmlawed_init() {
//. 'style:color,cursor,text-align,font-size,font-weight,font-style,border,margin,padding,float'
);
- register_plugin_hook('validate', 'input', 'htmlawed_filter_tags', 1);
+ elgg_register_plugin_hook_handler('validate', 'input', 'htmlawed_filter_tags', 1);
}
/**
@@ -79,7 +79,7 @@ function htmlawed_hook($element, $attribute_array) {
if ($string = trim($string)) {
$string = " $string";
}
-
+
$r = "<$element$string>";
return $r;
}
@@ -104,7 +104,7 @@ function htmlawed_filter_tags($hook, $entity_type, $returnvalue, $params) {
$return = "";
$return = htmLawed($var, $htmlawed_config);
} else {
-
+
array_walk_recursive($var, 'htmLawedArray', $htmlawed_config);
$return = $var;
@@ -123,4 +123,4 @@ function htmLawedArray(&$v, $k, $htmlawed_config) {
-register_elgg_event_handler('init', 'system', 'htmlawed_init');
+elgg_register_event_handler('init', 'system', 'htmlawed_init');
diff --git a/mod/invitefriends/start.php b/mod/invitefriends/start.php
index 19a4c4b55..1ad1d3ca1 100644
--- a/mod/invitefriends/start.php
+++ b/mod/invitefriends/start.php
@@ -18,4 +18,4 @@ function invitefriends_pagesetup() {
}
register_action('invitefriends/invite', false, $CONFIG->pluginspath . 'invitefriends/actions/invite.php');
-register_elgg_event_handler('pagesetup', 'system', 'invitefriends_pagesetup');
+elgg_register_event_handler('pagesetup', 'system', 'invitefriends_pagesetup');
diff --git a/mod/logbrowser/start.php b/mod/logbrowser/start.php
index 0ed7275a4..70f0c89f8 100644
--- a/mod/logbrowser/start.php
+++ b/mod/logbrowser/start.php
@@ -24,4 +24,4 @@ function logbrowser_init() {
}
// Initialise log browser
-register_elgg_event_handler('init','system','logbrowser_init');
+elgg_register_event_handler('init','system','logbrowser_init');
diff --git a/mod/logrotate/start.php b/mod/logrotate/start.php
index cc2d19b0a..485f53f49 100644
--- a/mod/logrotate/start.php
+++ b/mod/logrotate/start.php
@@ -22,7 +22,7 @@
}
// Register cron hook
- register_plugin_hook('cron', $period, 'logrotate_cron');
+ elgg_register_plugin_hook_handler('cron', $period, 'logrotate_cron');
}
/**
@@ -52,5 +52,5 @@
}
// Initialise plugin
- register_elgg_event_handler('init','system','logrotate_init');
+ elgg_register_event_handler('init','system','logrotate_init');
?> \ No newline at end of file
diff --git a/mod/members/index.php b/mod/members/index.php
index 221df7685..5a461d5e8 100644
--- a/mod/members/index.php
+++ b/mod/members/index.php
@@ -61,7 +61,7 @@ switch($filter){
$options['type'] = "user";
$options['offset'] = $offset;
$options['limit'] = $limit;
- $results = trigger_plugin_hook('search', 'tags', $options, array());
+ $results = elgg_trigger_plugin_hook('search', 'tags', $options, array());
$count = $results['count'];
$users = $results['entities'];
$filter_content = elgg_view_entity_list($users, $count, $offset, $limit, false, false, true);
diff --git a/mod/members/start.php b/mod/members/start.php
index 395922219..53f4f3753 100644
--- a/mod/members/start.php
+++ b/mod/members/start.php
@@ -11,5 +11,5 @@ function members_init() {
}
// @todo - use page handler for members index
-register_elgg_event_handler('pagesetup','system','members_pagesetup');
-register_elgg_event_handler('init','system','members_init'); \ No newline at end of file
+elgg_register_event_handler('pagesetup','system','members_pagesetup');
+elgg_register_event_handler('init','system','members_init'); \ No newline at end of file
diff --git a/mod/messageboard/start.php b/mod/messageboard/start.php
index f97e77999..0cd546573 100644
--- a/mod/messageboard/start.php
+++ b/mod/messageboard/start.php
@@ -85,7 +85,7 @@ function messageboard_add($poster, $owner, $message, $access_id = ACCESS_PUBLIC)
// Register initialisation callback
-register_elgg_event_handler('init', 'system', 'messageboard_init');
+elgg_register_event_handler('init', 'system', 'messageboard_init');
// Register actions
register_action("messageboard/add", FALSE, $CONFIG->pluginspath . "messageboard/actions/add.php");
diff --git a/mod/messages/start.php b/mod/messages/start.php
index 7f5f2c647..027003284 100644
--- a/mod/messages/start.php
+++ b/mod/messages/start.php
@@ -44,14 +44,14 @@ function messages_init() {
// Register a notification handler for site messages
register_notification_handler("site", "messages_site_notify_handler");
- register_plugin_hook('notify:entity:message','object','messages_notification_msg');
+ elgg_register_plugin_hook_handler('notify:entity:message','object','messages_notification_msg');
register_notification_object('object','messages',elgg_echo('messages:new'));
// Override metadata permissions
- register_plugin_hook('permissions_check:metadata','object','messages_can_edit_metadata');
+ elgg_register_plugin_hook_handler('permissions_check:metadata','object','messages_can_edit_metadata');
// ecml
- register_plugin_hook('get_views', 'ecml', 'messages_ecml_views_hook');
+ elgg_register_plugin_hook_handler('get_views', 'ecml', 'messages_ecml_views_hook');
}
@@ -317,10 +317,10 @@ function messages_ecml_views_hook($hook, $entity_type, $return_value, $params) {
// Make sure the messages initialisation function is called on initialisation
-register_elgg_event_handler('init','system','messages_init');
+elgg_register_event_handler('init','system','messages_init');
-register_plugin_hook('permissions_check','object','messages_can_edit');
-register_plugin_hook('container_permissions_check','object','messages_can_edit_container');
+elgg_register_plugin_hook_handler('permissions_check','object','messages_can_edit');
+elgg_register_plugin_hook_handler('container_permissions_check','object','messages_can_edit_container');
// Register actions
global $CONFIG;
diff --git a/mod/notifications/start.php b/mod/notifications/start.php
index d98c475d3..093b49b0f 100644
--- a/mod/notifications/start.php
+++ b/mod/notifications/start.php
@@ -14,19 +14,19 @@ function notifications_plugin_init() {
register_page_handler('notifications', 'notifications_page_handler');
- register_elgg_event_handler('pagesetup', 'system', 'notifications_plugin_pagesetup');
+ elgg_register_event_handler('pagesetup', 'system', 'notifications_plugin_pagesetup');
// Unset the default notification settings
- unregister_plugin_hook('usersettings:save', 'user', 'notification_user_settings_save');
+ elgg_unregister_plugin_hook_handler('usersettings:save', 'user', 'notification_user_settings_save');
elgg_unextend_view('usersettings/user', 'notifications/settings/usersettings');
// update notifications based on relationships changing
- register_elgg_event_handler('delete', 'member', 'notifications_relationship_remove');
- register_elgg_event_handler('delete', 'friend', 'notifications_relationship_remove');
+ elgg_register_event_handler('delete', 'member', 'notifications_relationship_remove');
+ elgg_register_event_handler('delete', 'friend', 'notifications_relationship_remove');
// update notifications when new friend or access collection membership
- register_elgg_event_handler('create', 'friend', 'notifications_update_friend_notify');
- register_plugin_hook('access:collections:add_user', 'collection', 'notifications_update_collection_notify');
+ elgg_register_event_handler('create', 'friend', 'notifications_update_friend_notify');
+ elgg_register_plugin_hook_handler('access:collections:add_user', 'collection', 'notifications_update_collection_notify');
}
/**
@@ -172,7 +172,7 @@ function notifications_update_collection_notify($event, $object_type, $returnval
}
}
-register_elgg_event_handler('init', 'system', 'notifications_plugin_init', 1000);
+elgg_register_event_handler('init', 'system', 'notifications_plugin_init', 1000);
register_action("notificationsettings/save", FALSE, $CONFIG->pluginspath . "notifications/actions/save.php");
diff --git a/mod/pages/start.php b/mod/pages/start.php
index 074e2a771..787f0c632 100644
--- a/mod/pages/start.php
+++ b/mod/pages/start.php
@@ -42,7 +42,7 @@ function pages_init() {
}
// Listen to notification events and supply a more useful message
- register_plugin_hook('notify:entity:message', 'object', 'page_notify_message');
+ elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'page_notify_message');
// add the group pages tool option
add_group_tool_option('pages',elgg_echo('groups:enablepages'),true);
@@ -64,7 +64,7 @@ function pages_init() {
);
// register ecml views to parse
- register_plugin_hook('get_views', 'ecml', 'pages_ecml_views_hook');
+ elgg_register_plugin_hook_handler('get_views', 'ecml', 'pages_ecml_views_hook');
}
function pages_url($entity) {
@@ -345,9 +345,9 @@ function pages_ecml_views_hook($hook, $entity_type, $return_value, $params) {
}
// write permission plugin hooks
-register_plugin_hook('permissions_check', 'object', 'pages_write_permission_check');
-register_plugin_hook('container_permissions_check', 'object', 'pages_container_permission_check');
+elgg_register_plugin_hook_handler('permissions_check', 'object', 'pages_write_permission_check');
+elgg_register_plugin_hook_handler('container_permissions_check', 'object', 'pages_container_permission_check');
// Make sure the pages initialisation function is called on initialisation
-register_elgg_event_handler('init','system','pages_init');
-register_elgg_event_handler('pagesetup','system','pages_submenus'); \ No newline at end of file
+elgg_register_event_handler('init','system','pages_init');
+elgg_register_event_handler('pagesetup','system','pages_submenus'); \ No newline at end of file
diff --git a/mod/profile/actions/edit.php b/mod/profile/actions/edit.php
index f3c928cef..312b72a1a 100644
--- a/mod/profile/actions/edit.php
+++ b/mod/profile/actions/edit.php
@@ -98,7 +98,7 @@ if (sizeof($input) > 0) {
$profile_owner->save();
// Notify of profile update
- trigger_elgg_event('profileupdate',$user->type,$user);
+ elgg_trigger_event('profileupdate',$user->type,$user);
//add to river if edited by self
if (get_loggedin_userid() == $user->guid) {
diff --git a/mod/profile/actions/iconupload.php b/mod/profile/actions/iconupload.php
index cd842752f..f146316f0 100644
--- a/mod/profile/actions/iconupload.php
+++ b/mod/profile/actions/iconupload.php
@@ -54,7 +54,7 @@ foreach ($icon_sizes as $name => $size_info) {
}
$profile_owner->icontime = time();
-if (trigger_elgg_event('profileiconupdate', $profile_owner->type, $profile_owner)) {
+if (elgg_trigger_event('profileiconupdate', $profile_owner->type, $profile_owner)) {
// pull this out into the river plugin.
//add_to_river('river/user/default/profileiconupdate','update',$user->guid,$user->guid);
system_message(elgg_echo("profile:icon:uploaded"));
diff --git a/mod/profile/start.php b/mod/profile/start.php
index dab12b12d..6e9a43a68 100644
--- a/mod/profile/start.php
+++ b/mod/profile/start.php
@@ -45,10 +45,10 @@ function profile_init() {
elgg_extend_view('js/initialise_elgg', 'profile/javascript');
// Now override icons
- register_plugin_hook('entity:icon:url', 'user', 'profile_usericon_hook');
+ elgg_register_plugin_hook_handler('entity:icon:url', 'user', 'profile_usericon_hook');
// allow ECML in parts of the profile
- register_plugin_hook('get_views', 'ecml', 'profile_ecml_views_hook');
+ elgg_register_plugin_hook_handler('get_views', 'ecml', 'profile_ecml_views_hook');
// default profile fields admin item
elgg_add_admin_submenu_item('defaultprofile', elgg_echo('profile:edit:default'), 'appearance');
@@ -97,7 +97,7 @@ function profile_fields_setup() {
$profile_defaults = $loaded_defaults;
}
- $CONFIG->profile = trigger_plugin_hook('profile:fields', 'profile', NULL, $profile_defaults);
+ $CONFIG->profile = elgg_trigger_plugin_hook('profile:fields', 'profile', NULL, $profile_defaults);
// register any tag metadata names
foreach ($CONFIG->profile as $name => $type) {
@@ -275,11 +275,11 @@ function profile_ecml_views_hook($hook, $entity_type, $return_value, $params) {
}
// Make sure the profile initialisation function is called on initialisation
-register_elgg_event_handler('init','system','profile_init',1);
-register_elgg_event_handler('init','system','profile_fields_setup', 10000); // Ensure this runs after other plugins
+elgg_register_event_handler('init','system','profile_init',1);
+elgg_register_event_handler('init','system','profile_fields_setup', 10000); // Ensure this runs after other plugins
-register_elgg_event_handler('pagesetup','system','profile_pagesetup');
-register_elgg_event_handler('profileupdate','all','object_notifications');
+elgg_register_event_handler('pagesetup','system','profile_pagesetup');
+elgg_register_event_handler('profileupdate','all','object_notifications');
// Register actions
diff --git a/mod/reportedcontent/actions/add.php b/mod/reportedcontent/actions/add.php
index 0611f7402..138e66cb9 100644
--- a/mod/reportedcontent/actions/add.php
+++ b/mod/reportedcontent/actions/add.php
@@ -22,7 +22,7 @@
$report->access_id = $access;
if ($report->save()) {
- if (!trigger_plugin_hook('reportedcontent:add', 'system', array('report'=>$report), true)) {
+ if (!elgg_trigger_plugin_hook('reportedcontent:add', 'system', array('report'=>$report), true)) {
$report->delete();
register_error(elgg_echo('reportedcontent:failed'));
} else {
diff --git a/mod/reportedcontent/actions/archive.php b/mod/reportedcontent/actions/archive.php
index 3bd10f520..231ebdd35 100644
--- a/mod/reportedcontent/actions/archive.php
+++ b/mod/reportedcontent/actions/archive.php
@@ -15,7 +15,7 @@ $guid = (int) get_input('item');
$report = get_entity($guid);
if ($report->getSubtype() == "reported_content" && $report->canEdit()) {
// change the state
- if (!trigger_plugin_hook('reportedcontent:archive', 'system', array('report'=>$report), TRUE)) {
+ if (!elgg_trigger_plugin_hook('reportedcontent:archive', 'system', array('report'=>$report), TRUE)) {
system_message(elgg_echo("reportedcontent:notarchived"));
forward('pg/admin/reportedcontent');
}
diff --git a/mod/reportedcontent/actions/delete.php b/mod/reportedcontent/actions/delete.php
index 3e38d2069..fa10c6d7e 100644
--- a/mod/reportedcontent/actions/delete.php
+++ b/mod/reportedcontent/actions/delete.php
@@ -15,7 +15,7 @@ $guid = (int) get_input('item');
$report = get_entity($guid);
if ($report->getSubtype() == "reported_content" && $report->canEdit()) {
// Delete it!
- if (!trigger_plugin_hook('reportedcontent:delete', '$system', array('report'=>$report), true)) {
+ if (!elgg_trigger_plugin_hook('reportedcontent:delete', '$system', array('report'=>$report), true)) {
register_error(elgg_echo("reportedcontent:notdeleted"));
forward('pg/admin/reportedcontent');
}
diff --git a/mod/reportedcontent/start.php b/mod/reportedcontent/start.php
index 0a35a33e8..d301a9802 100644
--- a/mod/reportedcontent/start.php
+++ b/mod/reportedcontent/start.php
@@ -30,4 +30,4 @@ function reportedcontent_init() {
}
// Initialise Reported Content
-register_elgg_event_handler('init','system','reportedcontent_init');
+elgg_register_event_handler('init','system','reportedcontent_init');
diff --git a/mod/riverdashboard/start.php b/mod/riverdashboard/start.php
index 0adc3d653..15d563855 100644
--- a/mod/riverdashboard/start.php
+++ b/mod/riverdashboard/start.php
@@ -17,9 +17,9 @@ function riverdashboard_init() {
// add an activity stream ECML keyword
// we'll restrict it to use in sitepages's custom_frontpage
- register_plugin_hook('get_keywords', 'ecml', 'riverdashboard_ecml_keywords_hook');
+ elgg_register_plugin_hook_handler('get_keywords', 'ecml', 'riverdashboard_ecml_keywords_hook');
- register_plugin_hook('get_views', 'ecml', 'riverdashboard_ecml_views_hook');
+ elgg_register_plugin_hook_handler('get_views', 'ecml', 'riverdashboard_ecml_views_hook');
}
/**
@@ -83,4 +83,4 @@ function riverdashboard_ecml_views_hook($hook, $entity_type, $return_value, $par
return $return_value;
}
-register_elgg_event_handler('init', 'system', 'riverdashboard_init');
+elgg_register_event_handler('init', 'system', 'riverdashboard_init');
diff --git a/mod/search/index.php b/mod/search/index.php
index 54054244a..035401640 100644
--- a/mod/search/index.php
+++ b/mod/search/index.php
@@ -64,7 +64,7 @@ $params = array(
);
$types = get_registered_entity_types();
-$custom_types = trigger_plugin_hook('search_types', 'get_types', $params, array());
+$custom_types = elgg_trigger_plugin_hook('search_types', 'get_types', $params, array());
// add submenu items for all and native types
// @todo should these maintain any existing type / subtype filters or reset?
@@ -172,7 +172,7 @@ if ($search_type == 'all' || $search_type == 'entities') {
$current_params['subtype'] = $subtype;
$current_params['type'] = $type;
- $results = trigger_plugin_hook('search', "$type:$subtype", $current_params, NULL);
+ $results = elgg_trigger_plugin_hook('search', "$type:$subtype", $current_params, NULL);
if ($results === FALSE) {
// someone is saying not to display these types in searches.
continue;
@@ -182,7 +182,7 @@ if ($search_type == 'all' || $search_type == 'entities') {
// no results and not hooked. use default type search.
// don't change the params here, since it's really a different subtype.
// Will be passed to elgg_get_entities().
- $results = trigger_plugin_hook('search', $type, $current_params, array());
+ $results = elgg_trigger_plugin_hook('search', $type, $current_params, array());
}
if (is_array($results['entities']) && $results['count']) {
@@ -197,7 +197,7 @@ if ($search_type == 'all' || $search_type == 'entities') {
$current_params['type'] = $type;
$current_params['subtype'] = ELGG_ENTITIES_NO_VALUE;
- $results = trigger_plugin_hook('search', $type, $current_params, array());
+ $results = elgg_trigger_plugin_hook('search', $type, $current_params, array());
if ($results === FALSE) {
// someone is saying not to display these types in searches.
continue;
@@ -224,7 +224,7 @@ if ($search_type != 'entities' || $search_type == 'all') {
// custom search types have no subtype.
unset($current_params['subtype']);
- $results = trigger_plugin_hook('search', $type, $current_params, array());
+ $results = elgg_trigger_plugin_hook('search', $type, $current_params, array());
if ($results === FALSE) {
// someone is saying not to display these types in searches.
diff --git a/mod/search/start.php b/mod/search/start.php
index 791555a99..9369e9221 100644
--- a/mod/search/start.php
+++ b/mod/search/start.php
@@ -18,19 +18,19 @@ function search_init() {
register_page_handler('search','search_page_handler');
// register some default search hooks
- register_plugin_hook('search', 'object', 'search_objects_hook');
- register_plugin_hook('search', 'user', 'search_users_hook');
+ elgg_register_plugin_hook_handler('search', 'object', 'search_objects_hook');
+ elgg_register_plugin_hook_handler('search', 'user', 'search_users_hook');
// @todo pull this out into groups
- register_plugin_hook('search', 'group', 'search_groups_hook');
+ elgg_register_plugin_hook_handler('search', 'group', 'search_groups_hook');
// tags and comments are a bit different.
// register a search types and a hooks for them.
- register_plugin_hook('search_types', 'get_types', 'search_custom_types_tags_hook');
- register_plugin_hook('search', 'tags', 'search_tags_hook');
+ elgg_register_plugin_hook_handler('search_types', 'get_types', 'search_custom_types_tags_hook');
+ elgg_register_plugin_hook_handler('search', 'tags', 'search_tags_hook');
- register_plugin_hook('search_types', 'get_types', 'search_custom_types_comments_hook');
- register_plugin_hook('search', 'comments', 'search_comments_hook');
+ elgg_register_plugin_hook_handler('search_types', 'get_types', 'search_custom_types_comments_hook');
+ elgg_register_plugin_hook_handler('search', 'comments', 'search_comments_hook');
// get server min and max allowed chars for ft searching
$CONFIG->search_info = array();
@@ -491,4 +491,4 @@ function search_get_order_by_sql($entities_table, $type_table, $sort, $order) {
}
/** Register init system event **/
-register_elgg_event_handler('init','system','search_init');
+elgg_register_event_handler('init','system','search_init');
diff --git a/mod/sitepages/start.php b/mod/sitepages/start.php
index 82fd0ab72..b98345451 100644
--- a/mod/sitepages/start.php
+++ b/mod/sitepages/start.php
@@ -39,15 +39,15 @@ function sitepages_init() {
// Replace the default index page if user has requested and the site is not running walled garden
if (get_plugin_setting('ownfrontpage', 'sitepages') == 'yes') {
- register_plugin_hook('index', 'system', 'sitepages_custom_index');
+ elgg_register_plugin_hook_handler('index', 'system', 'sitepages_custom_index');
}
// 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');
+ elgg_register_plugin_hook_handler('get_keywords', 'ecml', 'sitepages_ecml_keyword_hook');
+ elgg_register_plugin_hook_handler('get_views', 'ecml', 'sitepages_ecml_views_hook');
// hook into the walled garden pages
- register_plugin_hook('public_pages', 'walled_garden', 'sitepages_public_pages');
+ elgg_register_plugin_hook_handler('public_pages', 'walled_garden', 'sitepages_public_pages');
register_action('settings/sitepages/save', FALSE, "{$CONFIG->pluginspath}sitepages/actions/edit_settings.php");
@@ -208,4 +208,4 @@ function sitepages_public_pages($hook, $type, $return_value, $params) {
return $return_value;
}
-register_elgg_event_handler('init', 'system', 'sitepages_init');
+elgg_register_event_handler('init', 'system', 'sitepages_init');
diff --git a/mod/tagcloud/start.php b/mod/tagcloud/start.php
index a2e4f5143..a6b573d90 100644
--- a/mod/tagcloud/start.php
+++ b/mod/tagcloud/start.php
@@ -9,4 +9,4 @@ function tagcloud_init() {
elgg_extend_view('css','tagcloud/css');
}
-register_elgg_event_handler('init', 'system', 'tagcloud_init');
+elgg_register_event_handler('init', 'system', 'tagcloud_init');
diff --git a/mod/thewire/start.php b/mod/thewire/start.php
index ca13acc9c..31bad5809 100644
--- a/mod/thewire/start.php
+++ b/mod/thewire/start.php
@@ -44,14 +44,14 @@
register_entity_type('object','thewire');
// Listen for SMS create event
- register_elgg_event_handler('create','object','thewire_incoming_sms');
+ elgg_register_event_handler('create','object','thewire_incoming_sms');
// Register granular notification for this type
if (is_callable('register_notification_object'))
register_notification_object('object', 'thewire', elgg_echo('thewire:newpost'));
// Listen to notification events and supply a more useful message for SMS'
- register_plugin_hook('notify:entity:message', 'object', 'thewire_notify_message');
+ elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'thewire_notify_message');
}
function thewire_pagesetup() {
@@ -194,8 +194,8 @@
}
// Make sure the thewire initialisation function is called on initialisation
- register_elgg_event_handler('init','system','thewire_init');
- register_elgg_event_handler('pagesetup','system','thewire_pagesetup');
+ elgg_register_event_handler('init','system','thewire_init');
+ elgg_register_event_handler('pagesetup','system','thewire_pagesetup');
// Register actions
global $CONFIG;
diff --git a/mod/tinymce/start.php b/mod/tinymce/start.php
index fd5c4176b..b605f92f6 100644
--- a/mod/tinymce/start.php
+++ b/mod/tinymce/start.php
@@ -12,4 +12,4 @@ function tinymce_init() {
elgg_extend_view('embed/custom_insert_js', 'tinymce/embed_custom_insert_js');
}
-register_elgg_event_handler('init', 'system', 'tinymce_init', 9999);
+elgg_register_event_handler('init', 'system', 'tinymce_init', 9999);
diff --git a/mod/twitter/start.php b/mod/twitter/start.php
index a1d2228ed..fc8c44ae8 100644
--- a/mod/twitter/start.php
+++ b/mod/twitter/start.php
@@ -17,6 +17,6 @@
}
- register_elgg_event_handler('init','system','twitter_init');
+ elgg_register_event_handler('init','system','twitter_init');
?> \ No newline at end of file
diff --git a/mod/uservalidationbyemail/start.php b/mod/uservalidationbyemail/start.php
index b0f621a84..3bc0febae 100644
--- a/mod/uservalidationbyemail/start.php
+++ b/mod/uservalidationbyemail/start.php
@@ -17,25 +17,25 @@ function uservalidationbyemail_init() {
register_page_handler('uservalidationbyemail', 'uservalidationbyemail_page_handler');
// mark users as unvalidated and disable when they register
- register_plugin_hook('register', 'user', 'uservalidationbyemail_disable_new_user');
+ elgg_register_plugin_hook_handler('register', 'user', 'uservalidationbyemail_disable_new_user');
// canEdit override to allow not logged in code to disable a user
- register_plugin_hook('permissions_check', 'user', 'uservalidationbyemail_allow_new_user_can_edit');
+ elgg_register_plugin_hook_handler('permissions_check', 'user', 'uservalidationbyemail_allow_new_user_can_edit');
// prevent users from logging in if they aren't validated
- register_plugin_hook('action', 'login', 'uservalidationbyemail_check_login_attempt');
+ elgg_register_plugin_hook_handler('action', 'login', 'uservalidationbyemail_check_login_attempt');
// when requesting a new password
- register_plugin_hook('action', 'user/requestnewpassword', 'uservalidationbyemail_check_request_password');
+ elgg_register_plugin_hook_handler('action', 'user/requestnewpassword', 'uservalidationbyemail_check_request_password');
// prevent the engine from logging in users via login()
- register_elgg_event_handler('login', 'user', 'uservalidationbyemail_check_manual_login');
+ elgg_register_event_handler('login', 'user', 'uservalidationbyemail_check_manual_login');
// make admin users always validated
- register_elgg_event_handler('make_admin', 'user', 'uservalidationbyemail_validate_new_admin_user');
+ elgg_register_event_handler('make_admin', 'user', 'uservalidationbyemail_validate_new_admin_user');
// register Walled Garden public pages
- register_plugin_hook('public_pages', 'walled_garden', 'uservalidationbyemail_public_pages');
+ elgg_register_plugin_hook_handler('public_pages', 'walled_garden', 'uservalidationbyemail_public_pages');
// admin interface to manually validate users
elgg_add_admin_submenu_item('unvalidated', elgg_echo('uservalidationbyemail:admin:unvalidated'), 'users');
@@ -269,4 +269,4 @@ function uservalidationbyemail_check_request_password($hook, $type, $value, $par
return $value;
}
-register_elgg_event_handler('init', 'system', 'uservalidationbyemail_init'); \ No newline at end of file
+elgg_register_event_handler('init', 'system', 'uservalidationbyemail_init'); \ No newline at end of file
diff --git a/mod/zaudio/start.php b/mod/zaudio/start.php
index 35a4c33dd..551fd479a 100644
--- a/mod/zaudio/start.php
+++ b/mod/zaudio/start.php
@@ -13,6 +13,6 @@
}
// Make sure the status initialisation function is called on initialisation
- register_elgg_event_handler('init','system','zaudio_init',999);
+ elgg_register_event_handler('init','system','zaudio_init',999);
?> \ No newline at end of file