Author: Astronouth7303
Description:
The basic idea is in situations where each hook handles a specific item (such as
an action), a hook may tell the hooking code this (by using it as its key in the
$wgHooks[...] array (the array containing the hook functions for a specific
hook; I'll use the term "hook array" when refering to this.) When the hook is
called by the MW code, the caller passes the key (which is derived from the
context, not the hook) to wfRunHooks(). wfRunHooks() checks the hook array for
this key, and (if found) runs that hook before others.
The primary reason for this would be a performance boost in situations where
this is applicable. If the hook function returned false, then only one hook was
called.
Currently, the only hook that this is really useful on is 'UnknownAction', where
the action would be the key. (Since each hook likely handles a specific action,
hardcoded.)
Version: unspecified
Severity: enhancement