trigger.php 379 B

123456789101112131415
  1. <?php
  2. /**
  3. * The current value for the hook is passed into the trigger function. Handlers
  4. * can change this value. In this snippet, we check if the value of true was
  5. * changed by the handler functions.
  6. */
  7. $result = elgg_trigger_plugin_hook('get_status', 'example', null, true);
  8. if ($result) {
  9. var_dump('Plugin hook says ok!');
  10. } else {
  11. var_dump('Plugin hook says no.');
  12. }