Merge "Add hook for custom difference engine (WikEdDiff)"
[lhc/web/wiklou.git] / docs / hooks.txt
index dba6281..e81637a 100644 (file)
@@ -870,6 +870,20 @@ $wikiPage: WikiPage that was removed
 'CategoryPageView': Before viewing a categorypage in CategoryPage::view.
 $catpage: CategoryPage instance
 
+'CategoryViewer::doCategoryQuery': After querying for pages to be displayed
+in a Category page. Gives extensions the opportunity to batch load any
+related data about the pages.
+$type: The category type. Either 'page', 'file' or 'subcat'
+$res: Query result from DatabaseBase::select()
+
+'CategoryViewer::generateLink': Before generating an output link allow
+extensions opportunity to generate a more specific or relevant link.
+$type: The category type. Either 'page', 'img' or 'subcat'
+$title: Title object for the categorized page
+$html: Requested html content of anchor
+&$link: Returned value. When set to a non-null value by a hook subscriber
+this value will be used as the anchor instead of Linker::link
+
 'ChangePasswordForm': For extensions that need to add a field to the
 ChangePassword form via the Preferences form.
 &$extraFields: An array of arrays that hold fields like would be passed to the
@@ -1043,6 +1057,15 @@ $title: the diff page title (nullable)
 $old: the ?old= param value from the url
 $new: the ?new= param value from the url
 
+'GetDifferenceEngine': Called when getting a new difference engine interface object
+Return false for valid object in $differenceEngine or true for the default difference engine
+$context: IContextSource context to be used for diff
+$old: Revision ID to show and diff with
+$new: Either a revision ID or one of the strings 'cur', 'prev' or 'next'
+$refreshCache: If set, refreshes the diff cache
+$unhide: If set, allow viewing deleted revs
+&$differenceEngine: output parameter, difference engine object to be used for diff
+
 'DiffRevisionTools': Override or extend the revision tools available from the
 diff view, i.e. undo, etc.
 $newRev: Revision object of the "new" revision
@@ -1060,6 +1083,7 @@ $article: article (object) being viewed
 $oldid: oldid (int) being viewed
 
 'DoEditSectionLink': Override the HTML generated for section edit links
+* Deprecated in favour of SkinEditSectionLinks hook *
 $skin: Skin object rendering the UI
 $title: Title object for the title being linked to (may not be the same as
   the page title, if the section is included from a template)
@@ -2277,6 +2301,10 @@ configuration variables to JavaScript. Things that depend on the current page
 or request state must be added through MakeGlobalVariablesScript instead.
 &$vars: array( variable name => value )
 
+'ResourceLoaderGetLessVars': Called in ResourceLoader::getLessVars after variables
+from $wgResourceLoaderLESSVars are added. Can be used to add context-based variables.
+&$lessVars: array of variables already added
+
 'ResourceLoaderRegisterModules': Right before modules information is required,
 such as when responding to a resource
 loader request or generating HTML output.
@@ -2419,6 +2447,23 @@ $type: 'normal' or 'history' for old/diff views
 &$forContent: overridable flag if copyright footer is shown in content language.
   This parameter is deprecated.
 
+'SkinEditSectionLinks': Modify the section edit links
+$skin: Skin object rendering the UI
+$title: Title object for the title being linked to (may not be the same as
+  the page title, if the section is included from a template)
+$section: The designation of the section being pointed to, to be included in
+  the link, like "&section=$section"
+$tooltip: The default tooltip.  Escape before using.
+  By default, this is wrapped in the 'editsectionhint' message.
+&$result: Array containing all link detail arrays. Each link detail array should contain
+  the following keys:
+  * targetTitle - Target Title object
+  * text - String for the text
+  * attribs - Array of attributes
+  * query - Array of query parameters to add to the URL
+  * options - Array of options for Linker::link
+$lang: The language code to use for the link in the wfMessage function
+
 'SkinGetPoweredBy': TODO
 &$text: additional 'powered by' icons in HTML. Note: Modern skin does not use
 the MediaWiki icon but plain text instead.