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) {
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.
}
<?php
+// @todo this is an event, not a hook
register_elgg_event_handler('test', 'example', 'example_init_system_callback');
$params = new ElggObject();