(bug 42064) Make EditFilterMergedContent more generic.
[lhc/web/wiklou.git] / docs / hooks.txt
index c53baef..d04813e 100644 (file)
@@ -856,11 +856,18 @@ $text: content of the edit box
 &$error: error message to return
 $summary: Edit summary for page
 
-'EditFilterMergedContent': Post-section-merge edit filter
-$editor: EditPage instance (object)
-$content: content of the edit box, as a Content object
-&$error: error message to return
+'EditFilterMergedContent': Post-section-merge edit filter.
+This may be triggered by the EditPage or any other facility that modifies page content.
+Use the $status object to indicate whether the edit should be allowed, and to provide
+a reason for disallowing it. Return false to abort the edit, and true to continue.
+Returning true if $status->isOK() returns false means "don't save but continue user
+interaction", e.g. show the edit form.
+$context: object implementing the IContextSource interface.
+$content: content of the edit box, as a Content object.
+$status: Status object to represent errors, etc.
 $summary: Edit summary for page
+$user: the User object representing the user whois performing the edit.
+$minoredit: whether the edit was marked as minor by the user.
 
 'EditFormPreloadText': Allows population of the edit form when creating
 new pages
@@ -1075,6 +1082,10 @@ $query: query options passed to Title::getCanonicalURL()
 $title: Title object that we need to get a sortkey for
 &$sortkey: Sortkey to use.
 
+'GetDoubleUnderscoreIDs': modify the list of behavior switch (double underscore)
+magic words. Called by MagicWord.
+&$doubleUnderscoreIDs: array of strings
+
 'GetFullURL': modify fully-qualified URLs used in redirects/export/offsite data
 $title: Title object of page
 $url: string value as output (out parameter, can modify)
@@ -1349,8 +1360,14 @@ $linkType: The external link type
 actual update
 &$linksUpdate: the LinksUpdate object
 
-'LinksUpdateComplete': At the end of LinksUpdate::doUpdate() when updating has
-completed
+'LinksUpdateAfterInsert': At the end of LinksUpdate::incrTableUpdate() after
+each link table insert.  For example, pagelinks, imagelinks, externallinks.
+$linksUpdate: LinksUpdate object
+$table: the table to insert links to
+$insertions: an arry of links to insert
+
+'LinksUpdateComplete': At the end of LinksUpdate::doUpdate() when updating,
+including delete and insert, has completed for all link tables
 &$linksUpdate: the LinksUpdate object
 
 'LinksUpdateConstructed': At the end of LinksUpdate() is contruction.
@@ -1518,7 +1535,8 @@ displayed
 &$transform: whether or not to expand variables and templates
        in the message (bool)
 
-'OldChangesListRecentChangesLine': Customize entire Recent Changes line.
+'OldChangesListRecentChangesLine': Customize entire Recent Changes line,
+or return false to omit the line from RecentChanges and Watchlist special pages.
 &$changeslist: The OldChangesList instance.
 &$s: HTML of the form "<li>...</li>" containing one RC entry.
 &$rc: The RecentChange object.
@@ -2151,6 +2169,11 @@ $request: WebRequest
 $title: Title of the currently found title obj
 $output: OutputPage object
 
+'ThumbnailBeforeProduceHTML': called before an image HTML is about to be rendered (by ThumbnailImage:toHtml method)
+$thumbnail: the ThumbnailImage object
+&$attribs: image attibute array
+&$linkAttribs: image link attribute array
+
 'TitleArrayFromResult': called when creating an TitleArray object from a
 database result
 &$titleArray: set this to an object to override the default object returned
@@ -2543,4 +2566,4 @@ $text: The revision text.
        metadata tags returned (each tag is either a value, or an array of values).
 
 More hooks might be available but undocumented, you can execute
-./maintenance/findhooks.php to find hidden one.
+'php maintenance/findHooks.php' to find hidden one.