blob: 238178312e0018d08763117bb335979e2a0563e8 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 | <?php
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) {
	// check what sort of object is passed
	if ($params instanceof ElggObject) {
		$subtype = $params->getSubtype();
		switch($subtype) {
			case 'blog':
			case 'thewire':
			case 'pages':
				return false;
			default:
				return true;
		}
	}
	return true;
}
 |