aboutsummaryrefslogtreecommitdiff
path: root/documentation/examples/hooks/basic.php
blob: 734d9e884829e0e8b7d2b35d55e95058a5587fd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
/**
 * The handler for a plugin hook receives information about the hook (name and
 * type), the current value for the hook, and parameters related to the hook.
 */

elgg_register_plugin_hook_handler('forward', '404', 'example_plugin_hook_handler');

function example_plugin_hook_handler($hook, $type, $value, $params) {
	var_dump($hook);
	var_dump($type);
	var_dump($value);
	var_dump($params);

	// we are not changing $value so return null
	return null;
}