Translations:Manual:Hooks/6/en

A hook is triggered by a call to the function Hooks::run (described in file, and defined in GlobalFunctions.php}. The first argument to Hooks::run is the name of the hook, the second is the array of arguments for that hook. It will find the event handlers to run in the array $wgHooks. It calls the PHP function call_user_func_array with arguments being the function to be called and its arguments.