diff options
author | cash <cash.costello@gmail.com> | 2011-11-12 14:49:36 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-11-16 19:53:04 -0500 |
commit | 0ec65a0130347b3b846628e9e59a1f1cbf0f0e06 (patch) | |
tree | a2a3a3fb11b6c1ca318d923e1cc949a2b10dd76b /documentation/examples/hooks/trigger.php | |
parent | 11aacb4f048e659d1b86a6ba229438444a186142 (diff) | |
download | elgg-0ec65a0130347b3b846628e9e59a1f1cbf0f0e06.tar.gz elgg-0ec65a0130347b3b846628e9e59a1f1cbf0f0e06.tar.bz2 |
cleaned up the plugin hooks documentation
Diffstat (limited to 'documentation/examples/hooks/trigger.php')
-rw-r--r-- | documentation/examples/hooks/trigger.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/documentation/examples/hooks/trigger.php b/documentation/examples/hooks/trigger.php new file mode 100644 index 000000000..4216fd6c0 --- /dev/null +++ b/documentation/examples/hooks/trigger.php @@ -0,0 +1,14 @@ +<?php +/** + * The current value for the hook is passed into the trigger function. Handlers + * can change this value. In this snippet, we check if the value of true was + * changed by the handler functions. + */ + +$result = elgg_trigger_plugin_hook('get_status', 'example', null, true); + +if ($result) { + var_dump('Plugin hook says ok!'); +} else { + var_dump('Plugin hook says no.'); +} |