This is an old revision of the document!

Technical changes in Piwigo 2.7

add_event_handler() 4th parameter

The fourth parameter of add_event_handler function was used to tell the number of parameters which will be transmitted to the callback. This is no longer used: all parameters given to trigger_change or trigger_notify are always transmitted to all callback.

But the fourth parameter is still used: if a string is given it will be used as a file path included just before the callback (with include_once).

// procedural
add_event_handler('init', 'my_init',
  MY_PLUGIN_PATH . 'include/callbacks.php'
// OOP with static method
add_event_handler('init', array('MyClass', 'init'),
  MY_PLUGIN_PATH . 'include/myclass.php'

If the 4th parameter is anything else than a string it is ignored.

Back to top
dev/changes_in_2.7.1392735945.txt.gz · Last modified: 2014/02/18 15:05 (external edit)
github twitter newsletter Donate © 2002-2021 · Contact