Merge "(bug 37755) Set robot meta tags for 'view source' pages"
[lhc/web/wiklou.git] / docs / hooks.txt
index 67b4580..0c8780d 100644 (file)
@@ -310,6 +310,15 @@ before showing the edit form ( EditPage::edit() ). This is triggered
 on &action=edit.
 $EditPage: the EditPage object
 
+'AlternateEditPreview': before generating the preview of the page when editing
+( EditPage::getPreviewText() ).
+$EditPage: the EditPage object
+&$content: the Content object for the text field from the edit page
+&$previewHTML: Text to be placed into the page for the preview
+&$parserOutput: the ParserOutput object for the preview
+return false and set $previewHTML and $parserOutput to output custom page
+preview HTML.
+
 'AlternateUserMailer': Called before mail is sent so that mail could
 be logged (or something else) instead of using PEAR or PHP's mail().
 Return false to skip the regular method of sending mail.  Return a
@@ -578,6 +587,11 @@ $create: Whether or not the restoration caused the page to be created
 (i.e. it didn't exist before)
 $comment: The comment associated with the undeletion.
 
+'ArticleUndeleteLogEntry': When a log entry is generated but not yet saved.
+$pageArchive: the PageArchive object
+&$logEntry: ManualLogEntry object
+$user: User who is performing the log action
+
 'ArticleUpdateBeforeRedirect': After a page is updated (usually on save),
 before the user is redirected back to the page
 &$article: the article
@@ -748,7 +762,7 @@ $title: the Title in question
 &$model: the model name. Use with CONTENT_MODEL_XXX constants.
 
 'ContentHandlerForModelID': Called when a ContentHandler is requested for a given
-cointent model name, but no entry for that model exists in $wgContentHandlers.
+content model name, but no entry for that model exists in $wgContentHandlers.
 $modeName: the requested content model name
 &$handler: set this to a ContentHandler object, if desired.
 
@@ -881,6 +895,13 @@ yourself. Alternatively, modifying $error and returning true will cause the
 contents of $error to be echoed at the top of the edit form as wikitext.
 Return true without altering $error to allow the edit to proceed.
 
+'EditPage::showStandardInputs:options': allows injection of form fields into
+the editOptions area
+$editor: EditPage instance (object)
+$out: an OutputPage instance to write to
+&$tabindex: HTML tabindex of the last edit check/button
+return value is ignored (should always be true)
+
 'EditPageBeforeConflictDiff': allows modifying the EditPage object and output
 when there's an edit conflict.  Return false to halt normal diff output; in
 this case you're responsible for computing and outputting the entire "conflict"
@@ -1629,6 +1650,9 @@ $text: actual text
 'ParserClearState': called at the end of Parser::clearState()
 $parser: Parser object being cleared
 
+'ParserCloned': called when the parser is cloned
+$parser: Newly-cloned Parser object
+
 'ParserFirstCallInit': called when the parser initialises for the first time
 &$parser: Parser object being cleared
 
@@ -1801,6 +1825,12 @@ $text : Current text being indexed
 $allSearchTerms : Array of the search terms in all content languages
 &$titleResult : Outparam; the value to return. A Title object or null.
 
+'SearchAfterNoDirectMatch': If there was no match for the exact result. This
+runs before lettercase variants are attempted, whereas 'SearchGetNearMatch'
+runs after.
+$term : Search term string
+&$title : Outparam; set to $title object and return false for a match
+
 'SearchGetNearMatch': An extra chance for exact-title-matches in "go" searches if nothing was found
 $term : Search term string
 &$title : Outparam; set to $title object and return false for a match
@@ -2101,6 +2131,10 @@ $form: The SpecialUpload object
 use this to change the tables headers
 $extTypes: associative array of extensions types
 
+'SpecialVersionVersionUrl': called when building the URL for Special:Version
+$wgVersion: Current $wgVersion for you to use
+&$versionUrl: Raw url to link to (eg: release notes)
+
 'SpecialWatchlistFilters': called after building form options at Watchlist
 $special: the special page object
 &$filters: associative array of filter definitions. The keys are the HTML name/URL parameters.
@@ -2198,6 +2232,9 @@ $page: WikiPage object to be removed
 $user: user that watched
 $page: WikiPage object that was watched
 
+'UpdateUserMailerFormattedPageStatus': before notification email gets sent
+$formattedPageStatus: list of valid page states
+
 'UploadForm:initial': before the upload form is generated
 $form: UploadForm object
 You might set the member-variables $uploadFormTextTop and