🌍
English
This is an old revision of the document!
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', EVENT_HANDLER_PRIORITY_NEUTRAL, MY_PLUGIN_PATH . 'include/callbacks.php' ); // OOP with static method add_event_handler('init', array('MyClass', 'init'), EVENT_HANDLER_PRIORITY_NEUTRAL, MY_PLUGIN_PATH . 'include/myclass.php' );
If the 4th parameter is anything else than a string it is ignored.