Note that hook parameters are passed in an array; this is a necessary
inconvenience to make it possible to pass reference values (that can be changed)
into the hook code. Also note that earlier versions of wfRunHooks took a
-variable number of arguments; the [] calling protocol came about after
+variable number of arguments; the array calling protocol came about after
MediaWiki 1.4rc1.
==Events and parameters==
$revision: the revision the page was reverted back to
$current: the reverted revision
+'ArticleShowPatrolFooter': Called at the beginning of Article#showPatrolFooter.
+Extensions can use this to not show the [mark as patrolled] link in certain
+circumstances.
+$article: the Article object
+
'ArticleUndelete': When one or more revisions of an article are restored.
&$title: Title corresponding to the article restored
$create: Whether or not the restoration caused the page to be created (i.e. it
includes/Linker.php for Linker::makeImageLink
&$time: Timestamp of file in 'YYYYMMDDHHIISS' string form, or false for current
&$res: Final HTML output, used if you return false
+$parser: Parser instance
+&$query: Query params for desc URL
+&$widthOption: Used by the parser to remember the user preference thumbnailsize
'ImageOpenShowImageInlineBefore': Call potential extension just before showing
the image on an image page.
Special:Log for a specific log type
$type: String of log type being displayed
$logEventsList: LogEventsList object for context and access to the WebRequest
-&$input: string HTML of an input element
+&$input: string HTML of an input element (deprecated, use $formDescriptor instead)
+&$formDescriptor: array HTMLForm's form descriptor
'LogEventsListShowLogExtract': Called before the string is added to OutputPage.
Returning false will prevent the string from being added to the OutputPage.
edit.
$wikiPage: the WikiPage edited
$rev: the new revision
-$baseID: the revision ID this was based off, if any
+$originalRevId: if the edit restores or repeats an earlier revision (such as a
+ rollback or a null revision), the ID of that earlier revision. False otherwise.
+ (Used to be called $baseID.)
$user: the editing user
&$tags: tags to apply to the edit and recent change
&$otherBlockLink: An array with links to other block logs
$ip: The requested IP address or username
+'OutputPageAfterGetHeadLinksArray': Called in OutputPage#getHeadLinksArray right
+before returning the result.
+&$tags: array containing all <head> links generated so far. The array format is
+"link name or number => 'link HTML'".
+$out: the OutputPage object
+
'OutputPageBeforeHTML': A page has been processed by the parser and the
resulting HTML is about to be displayed.
&$parserOutput: the parserOutput (object) that corresponds to the page
$revision: New Revision of the article (can be null for edits that change
nothing)
$status: Status object about to be returned by doEditContent()
-$baseRevId: the rev ID (or false) this edit was based on
+$originalRevId: if the edit restores or repeats an earlier revision (such as a
+ rollback or a null revision), the ID of that earlier revision. False otherwise.
+ (Used to be called $baseRevId.)
$undidRevId: the rev ID (or 0) this edit undid
'PageHistoryBeforeList': When a history page list is about to be constructed.
the advanced form, a.k.a. power search box.
&$showSections: an array to add values with more options to
$term: the search term (not a title object)
-$opts: an array of hidden options (containing 'redirs' and 'profile')
+&$opts: an array of hidden options (containing 'redirs' and 'profile')
'SpecialSearchProfileForm': Allows modification of search profile forms.
$search: special page object
&$className: the class name of the Upload instance to be created
'UploadForm:BeforeProcessing': At the beginning of processUpload(). Lets you
-poke at member variables like $mUploadDescription before the file is saved. Do
-not use this hook to break upload processing. This will return the user to a
-blank form with no error message; use UploadVerification and UploadVerifyFile
-instead.
-&$form: UploadForm object
+poke at member variables like $mUploadDescription before the file is saved.
+Do not use this hook to break upload processing.
+This will return the user to a blank form with no error message;
+use UploadVerifyUpload or UploadVerifyFile instead.
+&$upload: SpecialUpload object
'UploadForm:getInitialPageText': After the initial page text for file uploads
is generated, to allow it to be altered.
'UploadForm:initial': Before the upload form is generated. You might set the
member-variables $uploadFormTextTop and $uploadFormTextAfterSummary to inject
text (HTML) either before or after the editform.
-&$form: UploadForm object
+&$upload: SpecialUpload object
'UploadFormInitDescriptor': After the descriptor for the upload form as been
assembled.