basic.php 465 B

123456789101112131415161718
  1. <?php
  2. /**
  3. * The handler for a plugin hook receives information about the hook (name and
  4. * type), the current value for the hook, and parameters related to the hook.
  5. */
  6. elgg_register_plugin_hook_handler('forward', '404', 'example_plugin_hook_handler');
  7. function example_plugin_hook_handler($hook, $type, $value, $params) {
  8. var_dump($hook);
  9. var_dump($type);
  10. var_dump($value);
  11. var_dump($params);
  12. // we are not changing $value so return null
  13. return null;
  14. }