Merge "ApiQuerySiteinfo: Add prop=restrictions for protection information"
[lhc/web/wiklou.git] / docs / hooks.txt
index 4a43359..37ac2be 100644 (file)
@@ -847,6 +847,15 @@ 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.
 
+'ContentModelCanBeUsedOn': Called to determine whether that content model can
+be used on a given page. This is especially useful to prevent some content models
+to be used in some special location.
+$contentModel: ID of the content model in question
+$title: the Title in question.
+&$ok: Output parameter, whether it is OK to use $contentModel on $title.
+Handler functions that modify $ok should generally return false to prevent further
+hooks from further modifying $ok.
+
 'ConvertContent': Called by AbstractContent::convert when a conversion to another
 content model is requested.
 $content: The Content object to be converted.
@@ -899,8 +908,9 @@ $new: the ?new= param value from the url
 
 'DiffRevisionTools': Override or extend the revision tools available from the
 diff view, i.e. undo, etc.
-$rev: Revision object
+$newRev: Revision object of the "new" revision
 &$links: Array of HTML links
+$oldRev: Revision object of the "old" revision (may be null)
 
 'DiffViewHeader': Called before diff display
 $diff: DifferenceEngine object that's calling
@@ -1957,6 +1967,12 @@ $form: the PreferencesForm object. This is a ContextSource as well
 $key: the section name
 &$legend: the legend text. Defaults to wfMessage( "prefs-$key" )->text() but may be overridden
 
+'PreferencesFormPreSave': Override preferences being saved
+ $formData: array of user submitted data
+ $form: PreferencesForm object, also a ContextSource
+ $user: User object with preferences to be saved set
+ &$result: boolean indicating success
+
 'PrefixSearchBackend': Override the title prefix search used for OpenSearch and
 AJAX search suggestions. Put results into &$results outparam and return false.
 $ns : array of int namespace keys to search in
@@ -2177,6 +2193,13 @@ link" tab.
 $sktemplate: SkinTemplate object
 $nav_urls: array of tabs
 
+'SkinTemplateGetLanguageLink': After building the data for a language link from
+which the actual html is constructed.
+&$languageLink: array containing data about the link. The following keys can be
+  modified: href, text, title, class, lang, hreflang. Each of them is a string.
+$languageLinkTitle: Title object belonging to the external language link
+$title: Title object of the page the link belongs to
+
 To alter the structured navigation links in SkinTemplates, there are three
 hooks called in different spots: