Allow running code during unstrip
[lhc/web/wiklou.git] / docs / hooks.txt
index f2c47ca..f03e38d 100644 (file)
@@ -420,6 +420,8 @@ $module: ApiBase Module object
 $module: ApiBase Module object
 &$help: Array of HTML strings to be joined for the output.
 $options: Array Options passed to ApiHelp::getHelp
+&$tocData: Array If a TOC is being generated, this array has keys as anchors in
+the page and values as for Linker::generateTOC().
 
 'ApiMain::moduleManager': Called when ApiMain has finished initializing its
 module manager. Can be used to conditionally register API modules.
@@ -2012,6 +2014,17 @@ return false to omit the line from RecentChanges and Watchlist special pages.
 can alter or append to the array of URLs for search & suggestion formats.
 &$urls: array of associative arrays with Url element attributes
 
+'OpportunisticLinksUpdate': Called by WikiPage::triggerOpportunisticLinksUpdate
+when a page view triggers a re-rendering of the page. This may happen
+particularly if the parser cache is split by user language, and no cached
+rendering of the page exists in the user's language. The hook is called
+before checking whether page_links_updated indicates that the links are up
+to date. Returning false will cause triggerOpportunisticLinksUpdate() to abort
+without triggering any updates.
+$page: the Page that was rendered.
+$title: the Title of the rendered page.
+$parserOutput: ParserOutput resulting from rendering the page.
+
 'OtherBlockLogLink': Get links to the block log from extensions which blocks
 users and/or IP addresses too.
 $otherBlockLink: An array with links to other block logs
@@ -2101,12 +2114,25 @@ constructed.
 $pager: the pager
 $queryInfo: the query parameters
 
+'PageHistoryPager::doBatchLookups': Called after the pager query was run, before
+any output is generated, to allow batch lookups for prefetching information
+needed for display. If the hook handler returns false, the regular behavior of
+doBatchLookups() is skipped.
+$pager: the PageHistoryPager
+$result: a ResultWrapper representing the query result
+
 'PageRenderingHash': Alter the parser cache option hash key. A parser extension
 which depends on user options should install this hook and append its values to
 the key.
 &$confstr: reference to a hash key string which can be modified
 $user: User (object) requesting the page
 
+'PageViewUpdate': Allow database (or other) changes to be made after a
+page view is seen by MediaWiki.  Note this does not capture views made
+via external caches such as Squid.
+$wikipage: WikiPage (object) for the page being viewed.
+$user: User (object) for the user who is viewing.
+
 'ParserAfterParse': Called from Parser::parse() just after the call to
 Parser::internalParse() returns.
 $parser: parser object
@@ -2123,6 +2149,10 @@ $stripState: stripState used (object)
 $parser: Parser object being used
 $text: text that will be returned
 
+'ParserAfterUnstrip': Called after the first unstripGeneral() in Parser::internalParseHalfParsed()
+$parser: Parser object being used
+$text: text that will be returned
+
 'ParserBeforeInternalParse': Called at the beginning of Parser::internalParse().
 $parser: Parser object
 $text: text to parse