aboutsummaryrefslogtreecommitdiff
path: root/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'documentation')
-rw-r--r--documentation/examples/hooks/basic.php2
-rw-r--r--documentation/examples/hooks/register/all.php2
-rw-r--r--documentation/examples/hooks/register/emit.php1
3 files changed, 3 insertions, 2 deletions
diff --git a/documentation/examples/hooks/basic.php b/documentation/examples/hooks/basic.php
index fe0b847a2..d9055a4aa 100644
--- a/documentation/examples/hooks/basic.php
+++ b/documentation/examples/hooks/basic.php
@@ -17,7 +17,7 @@ function example_plugin_hook($hook, $type, $value, $params) {
return $value;
}
-function example_plugin_hook($hook, $type, $value, $params) {
+function example_plugin_hook_2($hook, $type, $value, $params) {
$username = isset($params['username']) ? $params['username'] : NULL;
if (is_array($value)) {
switch($username) {
diff --git a/documentation/examples/hooks/register/all.php b/documentation/examples/hooks/register/all.php
index f2e4407a6..6c23ed56b 100644
--- a/documentation/examples/hooks/register/all.php
+++ b/documentation/examples/hooks/register/all.php
@@ -2,7 +2,7 @@
register_plugin_hook('all', 'system', 'example_plugin_hook_handler');
-// This function will be called for any event of type 'object'
+// This function will be called for any hook of type 'system'
function example_plugin_hook_handler($hook, $type, $value, $params) {
// logic here.
}
diff --git a/documentation/examples/hooks/register/emit.php b/documentation/examples/hooks/register/emit.php
index bcf991794..d0ea2c4ad 100644
--- a/documentation/examples/hooks/register/emit.php
+++ b/documentation/examples/hooks/register/emit.php
@@ -1,5 +1,6 @@
<?php
+// @todo this is an event, not a hook
register_elgg_event_handler('test', 'example', 'example_init_system_callback');
$params = new ElggObject();