Translations:Manual:Hooks/14/en

Register the event handler by adding it to the global $1 array for a given event. Hooks can be added from any point in the execution before the hook is called, but are most commonly added in $2, its included files, or, for extensions, in the file extension.json. All the following are valid ways to define a hook function for the event EventName that is passed two parameters, showing the code that will be executed when EventName happens: