aboutsummaryrefslogtreecommitdiff
path: root/documentation
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 /documentation
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 'documentation')
-rw-r--r--documentation/examples/events/advanced.php2
-rw-r--r--documentation/examples/events/all.php2
-rw-r--r--documentation/examples/events/basic.php2
-rw-r--r--documentation/examples/events/emit.php4
-rw-r--r--documentation/examples/hooks/basic.php6
-rw-r--r--documentation/examples/hooks/register/advanced.php8
-rw-r--r--documentation/examples/hooks/register/all.php2
-rw-r--r--documentation/examples/hooks/register/basic.php2
-rw-r--r--documentation/examples/hooks/register/emit.php4
-rw-r--r--documentation/examples/hooks/trigger/advanced.php2
-rw-r--r--documentation/examples/hooks/trigger/basic.php2
-rw-r--r--documentation/stubs/config.php20
12 files changed, 28 insertions, 28 deletions
diff --git a/documentation/examples/events/advanced.php b/documentation/examples/events/advanced.php
index c6fc2d0fb..f566e0006 100644
--- a/documentation/examples/events/advanced.php
+++ b/documentation/examples/events/advanced.php
@@ -1,6 +1,6 @@
<?php
-register_elgg_event_handler('create', 'object', 'example_event_handler');
+elgg_register_event_handler('create', 'object', 'example_event_handler');
function example_event_handler($event, $type, $params) {
// Don't allow any non-admin users to create objects
diff --git a/documentation/examples/events/all.php b/documentation/examples/events/all.php
index 63959a9d2..238178312 100644
--- a/documentation/examples/events/all.php
+++ b/documentation/examples/events/all.php
@@ -1,6 +1,6 @@
<?php
-register_elgg_event_handler('all', 'object', 'example_event_handler');
+elgg_register_event_handler('all', 'object', 'example_event_handler');
// This function will be called for any event of type 'object'
function example_event_handler($event, $type, $params) {
diff --git a/documentation/examples/events/basic.php b/documentation/examples/events/basic.php
index b274137b8..91704e60b 100644
--- a/documentation/examples/events/basic.php
+++ b/documentation/examples/events/basic.php
@@ -1,6 +1,6 @@
<?php
-register_elgg_event_handler('init', 'system', 'example_event_handler');
+elgg_register_event_handler('init', 'system', 'example_event_handler');
function example_event_handler($event, $type, $params) {
var_dump($event);
diff --git a/documentation/examples/events/emit.php b/documentation/examples/events/emit.php
index f4cd1b127..b917c6dc0 100644
--- a/documentation/examples/events/emit.php
+++ b/documentation/examples/events/emit.php
@@ -1,7 +1,7 @@
<?php
$params = new ElggObject();
-trigger_elgg_event('test', 'example', $params);
+elgg_trigger_event('test', 'example', $params);
// handlers would be registered by saying
-register_elgg_event_handler('test', 'example', 'example_event_handler');
+elgg_register_event_handler('test', 'example', 'example_event_handler');
diff --git a/documentation/examples/hooks/basic.php b/documentation/examples/hooks/basic.php
index d9055a4aa..71076ee96 100644
--- a/documentation/examples/hooks/basic.php
+++ b/documentation/examples/hooks/basic.php
@@ -1,10 +1,10 @@
<?php
-register_plugin_hook('get_items', 'example', 'example_plugin_hook');
-register_plugin_hook('get_items', 'example', 'example_plugin_hook_2');
+elgg_register_plugin_hook_handler('get_items', 'example', 'example_plugin_hook');
+elgg_register_plugin_hook_handler('get_items', 'example', 'example_plugin_hook_2');
$params = array('username' => 'Joe');
-$items = trigger_plugin_hook('get_items', 'example', $params, $default);
+$items = elgg_trigger_plugin_hook('get_items', 'example', $params, $default);
var_dump($items);
diff --git a/documentation/examples/hooks/register/advanced.php b/documentation/examples/hooks/register/advanced.php
index 627bb5454..e3951c19c 100644
--- a/documentation/examples/hooks/register/advanced.php
+++ b/documentation/examples/hooks/register/advanced.php
@@ -1,20 +1,20 @@
<?php
// the output:page hook is triggered by elgg_view_page().
-register_plugin_hook('output', 'page', 'example_plugin_hook_handler', 600);
-register_plugin_hook('output', 'page', 'example_plugin_hook_handler_2', 601);
+elgg_register_plugin_hook_handler('output', 'page', 'example_plugin_hook_handler', 600);
+elgg_register_plugin_hook_handler('output', 'page', 'example_plugin_hook_handler_2', 601);
function example_plugin_hook_handler($event, $type, $value, $params) {
// change A to @
$value = str_replace('A', '@', $value);
-
+
return $value;
}
function example_plugin_hook_handler_2($event, $type, $value, $params) {
// change S to $
$value = str_replace('S', '$', $value);
-
+
return $value;
}
diff --git a/documentation/examples/hooks/register/all.php b/documentation/examples/hooks/register/all.php
index 6c23ed56b..0ff19bc86 100644
--- a/documentation/examples/hooks/register/all.php
+++ b/documentation/examples/hooks/register/all.php
@@ -1,6 +1,6 @@
<?php
-register_plugin_hook('all', 'system', 'example_plugin_hook_handler');
+elgg_register_plugin_hook_handler('all', 'system', 'example_plugin_hook_handler');
// This function will be called for any hook of type 'system'
function example_plugin_hook_handler($hook, $type, $value, $params) {
diff --git a/documentation/examples/hooks/register/basic.php b/documentation/examples/hooks/register/basic.php
index 4cedbf0fd..20493e200 100644
--- a/documentation/examples/hooks/register/basic.php
+++ b/documentation/examples/hooks/register/basic.php
@@ -1,6 +1,6 @@
<?php
-register_plugin_hook('forward', 'system', 'example_plugin_hook_handler');
+elgg_register_plugin_hook_handler('forward', 'system', 'example_plugin_hook_handler');
function example_plugin_hook_handler($event, $type, $value, $params) {
var_dump($event);
diff --git a/documentation/examples/hooks/register/emit.php b/documentation/examples/hooks/register/emit.php
index d0ea2c4ad..8382d72ca 100644
--- a/documentation/examples/hooks/register/emit.php
+++ b/documentation/examples/hooks/register/emit.php
@@ -1,7 +1,7 @@
<?php
// @todo this is an event, not a hook
-register_elgg_event_handler('test', 'example', 'example_init_system_callback');
+elgg_register_event_handler('test', 'example', 'example_init_system_callback');
$params = new ElggObject();
-trigger_elgg_event('test', 'example', $params);
+elgg_trigger_event('test', 'example', $params);
diff --git a/documentation/examples/hooks/trigger/advanced.php b/documentation/examples/hooks/trigger/advanced.php
index de33e7a10..5901a06e0 100644
--- a/documentation/examples/hooks/trigger/advanced.php
+++ b/documentation/examples/hooks/trigger/advanced.php
@@ -2,7 +2,7 @@
$default = array('Entry 1', 'Entry 2', 'Entry 3');
-$menu = trigger_plugin_hook('get_menu_items', 'menu', null, $default);
+$menu = elgg_trigger_plugin_hook('get_menu_items', 'menu', null, $default);
foreach ($menu as $item) {
var_dump($item);
diff --git a/documentation/examples/hooks/trigger/basic.php b/documentation/examples/hooks/trigger/basic.php
index a32bf9296..ea27a8a98 100644
--- a/documentation/examples/hooks/trigger/basic.php
+++ b/documentation/examples/hooks/trigger/basic.php
@@ -1,6 +1,6 @@
<?php
-$result = trigger_plugin_hook('get_status', 'example', null, true);
+$result = elgg_trigger_plugin_hook('get_status', 'example', null, true);
if ($result) {
var_dump('Plugin hook says ok!');
diff --git a/documentation/stubs/config.php b/documentation/stubs/config.php
index 67aab304d..86ba54e6d 100644
--- a/documentation/stubs/config.php
+++ b/documentation/stubs/config.php
@@ -11,8 +11,8 @@
/**
* Event information for the events subsystem.
*
- * Events are added with {@link register_elgg_event_handler()} and
- * can be removed in >= 1.8 with {@link unregister_elgg_event_handler()}.
+ * Events are added with {@link elgg_register_event_handler()} and
+ * can be removed in >= 1.8 with {@link elgg_unregister_event_handler()}.
*
* Events are stored as a multidimensional array in the format:
* <code>
@@ -22,17 +22,17 @@
* @global array $CONFIG->events
* @name $CONFIG->events
* @see events()
- * @see register_elgg_event_handler()
- * @see unregister_elgg_event_handler()
- * @see trigger_elgg_event()
+ * @see elgg_register_event_handler()
+ * @see elgg_unregister_event_handler()
+ * @see elgg_trigger_event()
*/
$CONFIG->events;
/**
* Plugin Hook information for the plugin hooks subsystem.
*
- * Hooks are added with {@link register_plugin_hook()} and
- * can be removed in >= 1.8 with {@link unregister_plugin_hook()}.
+ * Hooks are added with {@link elgg_register_plugin_hook_handler()} and
+ * can be removed in >= 1.8 with {@link elgg_unregister_plugin_hook_handler()}.
*
* Hooks are stored as a multidimensional array in the format:
* <code>
@@ -40,9 +40,9 @@ $CONFIG->events;
* </code>
*
* @global array $CONFIG->hooks
- * @see register_plugin_hook()
- * @see unregister_plugin_hook()
- * @see trigger_plugin_hook()
+ * @see elgg_register_plugin_hook_handler()
+ * @see elgg_unregister_plugin_hook_handler()
+ * @see elgg_trigger_plugin_hook()
*/
$CONFIG->hooks;