Manual:Hooks/de

From MediaWiki.org
Jump to: navigation, search
Gnome-preferences-other.svg Erweiterungen: Tag-Erweiterungen Parserfunktionen Hooks Spezialseiten Skins Zauberworte API
MediaWiki extensions

Contents

Hooks erlauben benutzerdefinierten Code auszuführen, wenn eins von vielen definierten Ereignissen (wie das Speichern eines Artikels oder wenn sich ein Benutzer anmeldet) auftreten werden. Zum Beispiel: Der folgende Code-Schnipsel, wenn zur LocalSettings.php hinzugefügt, würde die Funktion MyExtensionHooks::articleSaveComplete aufrufen, wann immer der ArticleSaveComplete Hook läuft (function arguments):

$wgHooks['ArticleSaveComplete'][] = 'MyExtensionHooks::articleSaveComplete';

MediaWiki bietet viele Hooks, die verwendet werden können, um die Funktionalität der MediaWiki-Software zu erweitern. Zuweisen einer Funktion (auch bekannt als ein Event-Handler) zu einem Hook führt dazu, dass diese Funktion am entsprechenden Punkt im Haupt-MediaWiki-Code aufgerufen wird, um was auch immer für zusätzliche Aufgabe(n) der Entwickler denkt durchzuführen, wäre an dieser Stelle sinnvoll. Jeder Hook kann mehreren Handlern zugewiesen werden, wobei sie die Funktionen in der Reihenfolge aufrufen, der sie zugeordnet sind, mit jeglichen Änderungen gemacht durch eine Funktion, werden an nachfolgende Funktionen in der Kette weitergegeben.

Hooks sollten am Ende der LocalSettings.php oder in Ihrer eigenen Erweiterungs-Datei auf dem Datei-Umfang (nicht in einer $wgExtensionFunctions oder dem ParserFirstCallInit Hook) zugeordnet werden. Der einfachste Weg, um eine Funktion zu einem Hook zuzuweisen ist:

$wgHooks['event'][] = 'function';

die ein Element an das Array $wgHooks hinzufügen. Sie können auch neue Hooks in Ihrer eigenen Erweiterung erstellen. Hooks die auf diese Weise erstellt werden, sollten der Extension Hook Registry hinzugefügt werden.

Hintergrund [edit]

Jeder Hook ist im Code durch einen Aufruf der Funktion wfRunHooks, die in der Datei Hooks.php definiert ist vertreten. Das erste Argument von wfRunHooks ist der Name des Hooks, der zweite ist der Array von Argumenten des Hooks. Die Funktion wfRunHooks findet die Aufgaben, die von dem Array $wgHooks getan werden. Es ruft die PHP-Funktion call_user_func_array mit Argumenten als die Funktion, die aufgerufen werden und ihre Argumente.

Siehe auch die Hook-Beschreibung in Gerrit.

In diesem Beispiel von der doEdit Funktion in Article.php, wird wfRunHooks verwendet, um den ArticleSaveComplete Hook mit mehreren Argumenten aufzurufen:

wfRunHooks( 'ArticleSaveComplete', array( &$this, &$user, $text, $summary, $flags & EDIT_MINOR, &$watchthis, null,
  &$flags, $revision, &$status, $baseRevId, &$redirect) );

Der Kern ruft viele Hooks auf, aber Erweiterungen können auch Hooks aufrufen.

Schreiben eines Ereignishandler [edit]

Ein Event-Handler ist eine Funktion, die zu einem Hook zugeordnet ist, der ausgeführt wird, wenn das Ereignis von diesem Hook vertreten auftritt wird. Es besteht aus:

  • eine Funktion mit einigen optionalen begleitenden Daten, oder
  • einer Aufgabe mit einem Verfahren und einigen optionalen zugehörigen Daten.

Eventhandler werden registriert, indem sie sie zum globalen '$wgHooks' Array für ein gegebenes Ereignis hinzufügen. Hooks können von jedem beliebigen Punkt in der Ausführung hinzugefügt werden, bevor der Hook aufgerufen ist, sind aber am häufigsten in LocalSettings.php hinzugefügt oder seiner enthaltenen Dateien. Alle die folgenden sind gültige Möglichkeiten, um Hooks zu definieren, mit dem Code der ausgeführt wird, wenn 'EventName' passiert:

Format Syntax Resultierender Funktionsaufruf.
Function, no data $wgHooks['EventName'][] = 'someFunction'; someFunction($param1, $param2);
Function with data $wgHooks['EventName'][] = array('someFunction', $someData); someFunction($someData, $param1, $param2);
Function, no data
(weird syntax, but OK)
$wgHooks['EventName'][] = array('someFunction'); someFunction($param1, $param2);
Object only $wgHooks['EventName'][] = $object; $object->onEventName($param1, $param2);
Object with method $wgHooks['EventName'][] = array($object, 'someMethod'); $object->someMethod($param1, $param2);
Object with method and data $wgHooks['EventName'][] = array($object, 'someMethod', $someData); $object->someMethod($someData, $param1, $param2);
Object only
(weird syntax, but OK)
$wgHooks['EventName'][] = array($object); $object->onEventName($param1, $param2);

Wenn ein Ereignis eintritt, wird die Funktion (oder Objekt-Methode) mit den optional zur Verfügung gestellten Daten sowie Event-spezifischen Parametern aufgerufen werden. Beachten Sie, dass wenn ein Objekt der Hook ist und es keine festgelegte Methode gibt, die Standard-Methode namens 'OnEventName' ist. Für verschiedene Ereignisse wäre dies anders: 'onArticleSave', 'onUserLogin', etc.

Die zusätzlichen Daten sind sinnvoll, wenn wir die gleiche Funktion oder ein Objekt für unterschiedliche Zwecke nutzen wollen. Zum Beispiel:

$wgHooks['ArticleSaveComplete'][] = array('ircNotify', 'TimStarling');
$wgHooks['ArticleSaveComplete'][] = array('ircNotify', 'brion');

Dieser Code würde in ircNotify resultieren, zweimal zu laufen wenn ein Artikel gespeichert: einmal für 'TimStarling', und einmal für "Brion".

Event-Handler können einen von drei möglichen Werten zurückgeben:

  • true: der Hook ist seit Jahren erfolgreich
  • "some string": ein Fehler ist aufgetreten; Verarbeitung sollten aufhören, und der Fehler sollte dem Benutzer angezeigt werden
  • false: der Hook hat erfolgreich die notwendigen Arbeiten erledigt und die aufrufende Funktion sollte überspringen
In vielen Fällen, in denen eine Fehlermeldung erwartet wird, wird der Haken eine Variable als Referenz für Erweiterungen definieren, eine Fehlermeldung speichern und diese über Rückgabe eine Zeichenfolge, die einfach als "interner Fehler" wird angezeigt bevorzugt weitergeleitet. In einigen Fällen sind Hooks nur als bequeme Möglichkeit für Erweiterungen zum Lesen oder Ändern von Daten (z. B. EditPageBeforeEditButtons) und es gibt kaum einen Unterschied zwischen wahr und falsch wieder zur Verfügung gestellt.(Ausgabe von false bewirkt, dass alle übrigen Aufgaben, die dem gleichen Hook zugewiesen sind, nicht laufen. Allerdings werden Hooks in den Reihenfolge hinzugefügt wie Erweiterungen in der LocalSettings geführt werden, sich darauf für Wechselwirkungen zwischen Erweiterungen zu verlassen, kann so zu inkonsequenten Ergebnissen führen.)

Das letzte Ergebnis wäre für Fälle, in denen die Hook-Funktion die wichtigsten Funktionen ersetzt.

Zum Beispiel, wenn Sie einen Benutzer auf eine benutzerdefiniertes System (LDAP, ein anderes PHP-Programm, oder was auch immer) authentifizieren wollen, könnten Sie tun:

$wgHooks['UserLogin'][] = array('ldapLogin', $ldapServer);
 
$ldap['server'] = "ldaps://ldap.company.com/";
$ldap['port'] = 636;
$ldap['base'] = ",ou=Staff,dc=company,dc=com";
 
function ldapLogin( $username, $password ) {
        global $ldap;
        $auth_user = "uid=" . $username . $ldap['base'];
        wfSupressWarnings();
        if( $connect = ldap_connect( $ldap['server'], $ldap['port'] ) ){
                if( $bind = ldap_bind( $connect, $auth_user, $password ) ){
                        ldap_close( $connect );
                        return true;
                } else { // if bound to ldap
                        echo 'Error on ldap_bind';
                }
        } else { // if connected to ldap
                echo 'Error on ldap_connect';
        }
        ldap_close( $connect );
        wfRestoreWarnings();
        return false;
}

Das falsche zurückgeben hat weniger Sinn für Ereignisse wo die Aktion abgeschlossen ist, und wird normalerweise ignoriert.

Verfügbare Hooks [edit]

Diese Seite enthält eine Liste von Hooks, die durch die MediaWiki Software bereitgestellt werden, und bekannt ist, zur Version 1.8.2 abgeschlossen zu sein. Es gibt eine Menge von Details die insbesondere für neuere Hooks fehlen, da ihr Zweck/Nutzung noch nicht von den Entwicklern dokumentiert worden ist. Wenn Sie weitere Informationen über eine von ihnen haben, dann fügen Sie es bitte an der entsprechenden Stelle ein.

In den Tabellen gibt die erste Spalte die MediaWiki-Version, dass der Hook in dieser eingeführt wurde, nutzen Sie den Link in der zweiten Spalte, um mehr Informationen über den Hook und wie man es benutzt zu erhalten.

Für eine vollständige Liste der Hooks, benutzen Sie die Kategorie, welche mehr auf dem Laufenden gehalten werden sollte

Hooks gruppiert nach Funktion [edit]

Einige dieser Hooks können in mehrere Funktionen gruppiert werden.

Sektionen: Artikelverwaltung - Seitenbearbeitung - Seitenwiedergabe - Benutzeroberfläche - Spezialseiten - Benutzerverwaltung - Protokollierung - Skinning / Vorlagen - API - Verschiedenes
Funktion Version Hook Beschreibung
Artikelverwaltung 1.4.0 ArticleDelete Occurs whenever the software receives a request to delete an article
1.4.0 ArticleDeleteComplete Occurs after the delete article request has been processed
1.9.1 ArticleUndelete When one or more revisions of an article are restored
1.12.0 ArticleRevisionUndeleted Occurs after an article revision is restored
1.8.0 ArticleFromTitle Called to determine the class to handle the article rendering, based on title
1.4.0 ArticleProtect Occurs whenever the software receives a request to protect an article
1.4.0 ArticleProtectComplete Occurs after the protect article request has been processed
1.6.0 ArticleInsertComplete Occurs after a new article has been created
1.11.0 RevisionInsertComplete Called after a revision is inserted into the DB
1.4.0 ArticleSave Occurs whenever the software receives a request to save an article
1.4.0 ArticleSaveComplete Occurs after the save article request has been processed
1.11.0 ArticleUpdateBeforeRedirect Occurs after a page is updated (usually on save), before the user is redirected back to the page
1.5.7 ArticleEditUpdateNewTalk Allows an extension to prevent user notification when a new message is added to their talk page.
1.14.0 ArticleEditUpdates Called when edit updates (mainly link tracking) are made when an article has been changed.
1.6.0 ArticleEditUpdatesDeleteFromRecentchanges Occurs before saving to the database. If returning false old entries are not deleted from the recentchangeslist.
1.8.0 RecentChange_save Called after a "Recent Change" is committed to the DB
1.6.0 SpecialMovepageAfterMove Called after a page is moved.
1.4.0 TitleMoveComplete Occurs whenever a request to move an article is completed
1.12.0 AbortMove Allows to abort moving page from one title to another
1.12.0 ArticleRollbackComplete Occurs after an article rollback is completed
1.12.0 ArticleMergeComplete after merging to article using Special:Mergehistory
1.6.0 ArticlePurge Allows an extension to cancel a purge.
1.13.0 ArticleRevisionVisibilitySet called when changing visibility of one or more revisions of an article
Seitenbearbeitung 1.6.0 AlternateEdit Used to replace the entire edit page, altogether.
1.6.0 EditFilter Perform checks on an edit
1.12.0 EditFilterMerged Perform checks on an edit
1.7.0 EditFormPreloadText Called when edit page for a new article is shown. This lets you fill the text-box of a new page with initial wikitext.
1.8.3 EditPage::attemptSave Called before an article is saved, that is before insertNewArticle() is called
1.6.0 EditPage::showEditForm:fields Allows injection of form field into edit form.
1.6.0 EditPage::showEditForm:initial Allows injection of HTML into edit form
1.13.0 EditPageBeforeConflictDiff Allows modifying the EditPage object and output when there's an edit conflict.
1.12.0 EditPageBeforeEditButtons Used to modify the edit buttons on the edit form
Seitenwiedergabe 1.6.0 ArticlePageDataBefore Executes before data is loaded for the article requested.
1.6.0 ArticlePageDataAfter Executes after loading the data of an article from the database.
1.6.0 ArticleViewHeader Called after an articleheader is shown.
1.6.0 PageRenderingHash Alter the parser cache option hash key.
1.6.0 ArticleAfterFetchContent Used to process raw wiki code after most of the other parser processing is complete.
1.6.0 ParserClearState Called at the end of Parser::clearState()
1.5.0 ParserBeforeStrip Used to process the raw wiki code before any internal processing is applied.
1.5.0 ParserAfterStrip (Deprecated) Before version 1.14.0, used to process raw wiki code after text surrounded by <nowiki> tags have been protected but before any other wiki text has been processed. In version 1.14.0 and later, runs immediately after ParserBeforeStrip.
1.6.0 ParserBeforeInternalParse Replaces the normal processing of stripped wiki text with custom processing. Used primarily to support alternatives (rather than additions) to the core MediaWiki markup syntax.
1.6.0 ParserGetVariableValueVarCache Use this to change the value of the variable cache or return false to not use it.
1.6.0 ParserGetVariableValueTs Use this to change the value of the time for the {{LOCAL...}} magic word.
1.6.0 ParserGetVariableValueSwitch Assigns a value to a user defined variable.
1.10.0 InternalParseBeforeLinks Used to process the expanded wiki code after <nowiki>, HTML-comments, and templates have been treated. Suitable for syntax extensions that want to customize the treatment of internal link syntax, i.e. [[....]].
1.13.0 LinkerMakeExternalLink Called before the HTML for external links is returned. Used for modifying external link HTML.
1.13.0 LinkerMakeExternalImage Called before external image HTML is returned. Used for modifying external image HTML.
1.11.0 EditSectionLink (Deprecated) Override the return value of Linker::editSectionLink(). Called after creating [edit] link in header in Linker::editSectionLink but before HTML is displayed.
1.11.0 EditSectionLinkForOther (Deprecated) Override the return value of Linker::editSectionLinkForOther(). Called after creating [edit] link in header in Linker::editSectionLinkForOther but before HTML is displayed.
1.14.0 EditSectionLink (Deprecated) Override the HTML generated for section edit links.
1.5.0 ParserBeforeTidy Used to process the nearly-rendered html code for the page (but before any html tidying occurs).
1.5.0 ParserAfterTidy Used to add some final processing to the fully-rendered page output.
1.8.0 OutputPageParserOutput Called after parse, before the HTML is added to the output.
1.6.0 OutputPageBeforeHTML Called every time wikitext is added to the OutputPage, after it is parsed but before it is added. Called after the page has been rendered, but before the HTML is displayed.
1.4.3 CategoryPageView Called before viewing a categorypage in CategoryPage::view
1.5.1 ArticleViewRedirect Allows an extension to prevent the display of a "Redirected From" link on a redirect page.
1.10.0 IsFileCacheable Allow an extension to disable file caching on pages.
1.10.1 BeforeParserFetchTemplateAndtitle Allows an extension to specify a version of a page to get for inclusion in a template.
1.10.1 BeforeParserMakeImageLinkObj Allows an extension to select a different version of an image to link to.
1.10.1 BeforeParserrenderImageGallery Allows an extension to modify an image gallery before it is rendered.
1.17.0 ResourceLoaderRegisterModules Allows registering modules with ResourceLoader
Benutzeroberfläche 1.5.4 AutoAuthenticate Called to authenticate users on external/environmental means
1.4.0 UserLoginComplete Occurs after a user has successfully logged in
1.4.0 UserLogout Occurs when the software receives a request to log out
1.4.0 UserLogoutComplete Occurs after a user has successfully logged out
1.6.0 userCan To interrupt/advise the "user can do X to Y article" check
1.4.0 WatchArticle Occurs whenever the software receives a request to watch an article
1.4.0 WatchArticleComplete Occurs after the watch article request has been processed
1.4.0 UnwatchArticle Occurs whenever the software receives a request to unwatch an article
1.4.0 UnwatchArticleComplete Occurs after the unwatch article request has been processed
1.6.0 MarkPatrolled Called before an edit is marked patrolled
1.6.0 MarkPatrolledComplete Called after an edit is marked patrolled
1.4.0 EmailUser Occurs whenever the software receives a request to send an email from one user to another
1.4.0 EmailUserComplete Occurs after an email has been sent from one user to another
1.6.0 SpecialMovepageAfterMove Called after a page is moved.
1.19.0 SpecialSearchCreateLink Called when making the message to create a page or go to an existing page
1.17.0 SpecialSearchGo
1.6.0 SpecialSearchNogomatch
1.19.0 SpecialSearchPowerBox the equivalent of SpecialSearchProfileForm for the advanced form
1.5.7 ArticleEditUpdateNewTalk
1.5.7 UserRetrieveNewTalks
1.5.7 UserClearNewTalkNotification
1.6.0 ArticlePurge
File Upload 1.6.0 UploadVerification Called when a file is uploaded, to allow extra file verification to take place (deprecated)
1.17 UploadVerifyFile Called when a file is uploaded, to allow extra file verification to take place (preferred)
1.6.4 UploadComplete Called when a file upload has completed.
Spezialseiten 1.6.0 SpecialPageGetRedirect
1.13.0 SpecialListusersDefaultQuery Called right before the end of UsersPager::getDefaultQuery()
1.13.0 SpecialListusersFormatRow Called right before the end of UsersPager::formatRow()
1.13.0 SpecialListusersHeader Called before closing the <fieldset> in UsersPager::getPageHeader()
1.13.0 SpecialListusersHeaderForm Called before adding the submit button in UsersPager::getPageHeader()
1.13.0 SpecialListusersQueryInfo Called right before the end of UsersPager::getQueryInfo()
1.6.0 SpecialPageExecuteBeforeHeader
1.6.0 SpecialPageExecuteBeforePage
1.6.0 SpecialPageExecuteAfterPage
1.6.0 SpecialVersionExtensionTypes
SpecialPage_initList Called after the Special Page list is populated
1.9.0 UploadForm:initial Called just before the upload form is generated
1.9.0 UploadForm:BeforeProcessing Called just before the file data (for example description) are processed, so extensions have a chance to manipulate them.
1.14.0 UserrightsChangeableGroups Called after the list of groups that can be manipulated via Special:UserRights is populated, but before it is returned.
Benutzerverwaltung 1.5.0 AddNewAccount Called after a user account is created
1.5.8 AbortNewAccount Can be used to cancel user account creation
1.4.0 BlockIp Occurs whenever the software receives a request to block an IP address or user
1.4.0 BlockIpComplete Occurs after the request to block an IP or user has been processed
1.6.0 UserRights Called after a user's group memberships are changed
1.6.0 GetBlockedStatus
Protokollierung 1.6.0 LogPageActionText
1.5.0 LogPageLogHeader
1.5.0 LogPageLogName
1.5.0 LogPageValidTypes
Skinning / Vorlagen 1.7.0 BeforePageDisplay Allows last minute changes to the output page, e.g. adding of CSS or Javascript by extensions.
1.6.0 MonoBookTemplateToolboxEnd Called by Monobook skin after toolbox links have been rendered (useful for adding more)
1.7.0 PersonalUrls (SkinTemplate.php) Called after the list of personal URLs (links at the top in Monobook) has been populated.
1.11.0 SkinAfterBottomScripts (Skin.php) At the end of Skin::bottomScripts()
1.12.0 SkinSubPageSubtitle (Skin.php) Called before the list of subpage links on top of a subpage is generated
1.5.0 SkinTemplateContentActions Called after the default tab list is populated (list is context dependent i.e. "normal" article or "special page").
1.6.0 SkinTemplateTabs Called after the skin's default tab list is populated.
1.6.0 SkinTemplatePreventOtherActiveTabs Called to enable/disable the inclusion of additional tabs to the skin.
1.6.0 SkinTemplateSetupPageCss
1.6.0 SkinTemplateBuildContentActionUrlsAfterSpecialPage
1.6.0 SkinTemplateBuildNavUrlsNav_urlsAfterPermalink Called after the permalink has been entered in navigation URL array.
1.6.0 UserCreateForm Allows for last minute updates to the UserCreateForm (SpecialUserLogin.php).
1.6.0 UserLoginForm Allows for last minute updates to the UserLoginForm (SpecialUserLogin.php).
API 1.13.0 APIEditBeforeSave Called right before saving an edit submitted through api.php?action=edit
1.13.0 APIQueryInfoTokens Use this hook to add custom tokens to prop=info
1.13.0 APIQueryRevisionsTokens Use this hook to add custom tokens to prop=revisions
1.14.0 APIQueryRecentChangesTokens Use this hook to add custom tokens to list=recentchanges
1.14.0 APIGetAllowedParams Use this hook to modify a module's parameters
1.14.0 APIGetParamDescription Use this hook to modify a module's parameter descriptions
1.14.0 APIAfterExecute Use this hook to extend core API modules
1.14.0 APIQueryAfterExecute Use this hook to extend core API query modules
1.14.0 APIQueryGeneratorAfterExecute Use this hook to extend core API query modules
Verschiedenes 1.6.0 ArticleEditUpdatesDeleteFromRecentchanges
1.19.0 Collation::factory Allows extensions to register new collation names, to be used with $wgCategoryCollation
1.18.0 GetDefaultSortkey Allows to override what the default sortkey is, which is used to order pages in a category.
1.6.0 GetInternalURL Used to modify fully-qualified URLs (useful for squid cache purging)
1.6.0 GetLocalURL Used to modify local URLs as output into page links
1.6.0 GetFullURL Used to modify fully-qualified URLs used in redirects/export/offsite data
1.16.0 ImgAuthBeforeStream Executed before file is streamed to user, but only when using img_auth
1.14.0 LinkBegin Used when generating internal and interwiki links in Linker::link()
1.14.0 LinkEnd Used when generating internal and interwiki links in Linker::link(), just before the function returns a value.
1.6.0 MagicWordMagicWords
1.6.0 MagicWordwgVariableIDs
1.5.7 MessagesPreLoad
1.6.0 ParserTestParser
1.5.0 SpecialContributionsBeforeMainOutput
1.12.0 MediaWikiPerformAction Override MediaWiki::performAction()
1.4.0 UnknownAction Used to add new query-string actions
1.6.0 wgQueryPages
1.8.0 DisplayOldSubtitle
1.8.0 LoadAllMessages
1.8.0 RecentChange_save Called after a "Recent Change" is committed to the DB
1.8.0 UserToggles Called before returning "user toggle names"

Alphabetische Liste der Hooks [edit]

Version Hook Called From Description
1.181.18.0 AbortAutoAccount SpecialUserlogin.php Allow to cancel automated local account creation, where normally authentication against an external auth plugin would be creating a local account.
1.130 1.13.0 AbortAutoblock Block.php Allow extension to cancel an autoblock
1.140 1.14.0 AbortDiffCache DifferenceEngine.php Can be used to cancel the caching of a diff
1.100 1.10.0 AbortLogin SpecialUserlogin.php Allows an extension like a captcha to abort the login process
1.1201.12.0 AbortMove Title.php, SpecialMovepage.php Can be used to cancel page movement
1.0581.5.8 AbortNewAccount SpecialUserlogin.php Can be used to cancel user account creation
1.1801.18.0 ActionBeforeFormDisplay Action.php Before executing the HTMLForm object
1.1801.18.0 ActionModifyFormFields Action.php Before creating an HTMLForm object for a page action
1.0501.5.0 AddNewAccount SpecialUserlogin.php Called after a user account is created
1.1701.17.0 AfterImportPage ImportXMLReader.php When a page import is completed
1.1701.17.0 AfterUserMessage User.php After a user message has been left
1.0911.9.1 AjaxAddScript OutputPage.php Called in output page just before the initialisation
1.0601.6.0 AlternateEdit EditPage.php Occurs whenever action=edit is called
1.1801.18.0 AlternateUserMailer UserMailer.php Called before mail is sent so that mail could be logged (or something else) instead of using PEAR or PHP's mail().
1.1401.14.0 APIAfterExecute ApiMain.php Use this hook to extend core API modules
1.1301.13.0 APIEditBeforeSave ApiEditPage.php Called right before saving an edit submitted through api.php?action=edit
1.1401.14.0 APIGetAllowedParams ApiBase.php Use this hook to modify a module's parameters
1.1901.19.0 APIGetDescription ApiBase.php Use this hook to modify a module's descriptions
1.1401.14.0 APIGetParamDescription ApiBase.php Use this hook to modify a module's parameter descriptions
1.2001.20.0 ApiTokensGetTokenTypes ApiTokens.php Use this hook to extend action=tokens with new token types
1.1401.14.0 APIQueryAfterExecute ApiQuery.php Use this hook to extend core API query modules
1.1401.14.0 APIQueryGeneratorAfterExecute ApiQuery.php Use this hook to extend core API query modules
1.1301.13.0 APIQueryInfoTokens ApiQueryInfo.php Use this hook to add custom tokens to prop=info.
1.1401.14.0 APIQueryRecentChangesTokens ApiQueryRecentChanges.php Use this hook to add custom tokens to list=recentchanges.
1.1301.13.0 APIQueryRevisionsTokens ApiQueryRevisions.php Use this hook to add custom tokens to prop=revisions.
1.1501.15.0 APIQueryUsersTokens ApiQueryUsers.php Use this hook to add custom tokens to list=users.
1.1701.17.0 ApiRsdServiceApis ApiRsd.php Add or remove APIs from the RSD services list.
1.0601.6.0 ArticleAfterFetchContent Article.php Used to process raw wiki code after most of the other parser processing is complete.
1.1601.16.0 ArticleConfirmDelete Article.php Occurs before writing the confirmation form for article deletion.
1.1701.17.0 ArticleContentOnDiff DifferenceEngine.php Before showing the article content below a diff.
1.0401.4.0 ArticleDelete Article.php Occurs whenever the software receives a request to delete an article
1.0401.4.0 ArticleDeleteComplete Article.php Occurs after the delete article request has been processed
1.0571.5.7 ArticleEditUpdateNewTalk Article.php Allows an extension to prevent user notification when a new message is added to their talk page.
1.1401.14.0 ArticleEditUpdates Article.php Called when edit updates (mainly link tracking) are made when an article has been changed.
1.0601.6.0 ArticleEditUpdatesDeleteFromRecentchanges Article.php Occurs before saving to the database. If returning false old entries are not deleted from the recentchangeslist.
1.0801.8.0 ArticleFromTitle Wiki.php Called to determine the class to handle the article rendering, based on title.
1.0601.6.0 ArticleInsertComplete Article.php Called after an article is created
1.1201.12.0 ArticleMergeComplete SpecialMergeHistory.php after merging to article using Special:Mergehistory
1.0601.6.0 ArticlePageDataAfter Article.php after loading data of an article from the database
1.0601.6.0 ArticlePageDataBefore Article.php before loading data of an article from the database
1.1801.18.0 ArticlePrepareTextForEdit Article.php Called when preparing text to be saved.
1.0401.4.0 ArticleProtect Article.php Occurs whenever the software receives a request to protect an article
1.0401.4.0 ArticleProtectComplete Article.php Occurs after the protect article request has been processed
1.0601.6.0 ArticlePurge Article.php Allows an extension to cancel a purge.
1.1301.13.0 ArticleRevisionVisiblitySet SpecialRevisiondelete.php called when changing visibility of one or more revisions of an article
1.1201.12.0 ArticleRevisionUndeleted SpecialUndelete.php Occurs after an article revision is restored
1.1201.12.0 ArticleRollbackComplete Article.php Occurs after an article rollback is completed
1.0401.4.0 ArticleSave Article.php Occurs whenever the software receives a request to save an article
1.0401.4.0 ArticleSaveComplete Article.php Occurs after the save article request has been processed
1.0911.9.1 ArticleUndelete SpecialUndelete.php When one or more revisions of an article are restored
1.1101.11.0 ArticleUpdateBeforeRedirect Article.php Occurs after a page is updated (usually on save), before the user is redirected back to the page
1.1901.19.0 ArticleViewCustom Article.php Allows to output the text of the article in a different format than wikitext.
1.1801.18.0 ArticleViewFooter Article.php After showing the footer section of an ordinary page view.
1.0601.6.0 ArticleViewHeader Article.php Occurs when header is shown
1.0511.5.1 ArticleViewRedirect Article.php Allows an extension to prevent the display of a "Redirected From" link on a redirect page.
1.1301.13.0 AuthPluginAutoCreate SpecialUserlogin.php Called when creating a local account for an user logged in from an external authentication method
1.0911.9.1 AuthPluginSetup Setup.php Update or replace authentication plugin object ($wgAuth)
1.0541.5.4 AutoAuthenticate StubObject.php Called to authenticate users on external/environmental means.
1.1201.12.0 AutopromoteCondition Autopromote.php check autopromote condition for user.
1.1901.19.0 BacklinkCacheGetConditions BacklinkCache.php Allows to set conditions for query when links to certain title.
1.1901.19.0 BacklinkCacheGetPrefix BacklinkCache.php Allows to set prefix for a spefific link table.
1.0701.7.0 BadImage ImageFunctions.php Before bad image list is evaluated
1.1801.18.0 BaseTemplateToolbox SkinTemplate.php Called by BaseTemplate when building the toolbox array

and returning it for the skin to output.

1.101 1.10.1 BeforeGalleryFindFile ImageGallery.php Allows extensions to specify a specific version of an image to display in a gallery.
1.190 1.19.0 BeforeDisplayNoArticleText Article.php Before displaying noarticletext or noarticletext-nopermission messages.
1.160 1.16.0 BeforeInitialize Wiki.php Occurs before anything is initialized in MediaWiki::performRequestForTitle().
1.0701.7.0 BeforePageDisplay OutputPage.php
SkinTemplate.php (< 1.12.0)
Allows last minute changes to the output page, e.g. adding of CSS or Javascript by extensions.
1.1901.19.0 BeforePageRedirect OutputPage.php Called prior to sending an HTTP redirect.
1.1801.18.0 BeforeParserFetchFileAndTitle Parser.php Before an image is rendered by Parser
1.1011.10.1 BeforeParserFetchTemplateAndtitle Parser.php Before a template is fetched by Parser
1.1011.10.1 BeforeParserMakeImageLinkObj Parser.php Before an image is rendered by Parser
1.1011.10.1 BeforeParserrenderImageGallery Parser.php Before an image gallery is rendered by Parser
1.1201.12.0 BeforeWatchlist SpecialWatchlist.php Override watchlist display or add extra SQL clauses.
1.1901.19.0 BitmapHandlerCheckImageArea Bitmap.php Called by BitmapHandler::normaliseParams(), after all normalizations have been performed, except for the $wgMaxImageArea check.
1.1801.18.0 BitmapHandlerTransform Bitmap.php Before a file is transformed, gives extension the possibility to transform it themselves.
1.0401.4.0 BlockIp SpecialBlockip.php Occurs whenever the software receives a request to block an IP address or user
1.0401.4.0 BlockIpComplete SpecialBlockip.php Occurs after the request to block an IP or user has been processed
1.0911.9.1 BookInformation SpecialBooksources.php Before information output on Special:Booksources
1.1301.13.0 BrokenLink Linker.php Before the HTML is created for a broken (i.e. red) link
1.1701.17.0 CanonicalNamespaces Namespace.php For extensions adding their own namespaces or altering the defaults.
1.0431.4.3 CategoryPageView CategoryPage.php Called before viewing a categorypage in CategoryPage::view
1.1201.12.0 ChangesListInsertArticleLink ChangesList.php Override or augment link to article in RC list.
1.1901.19.0 Collation::factory Collation.php Allows extensions to register new collation names, to be used with $wgCategoryCollation
1.1601.16.0 ConfirmEmailComplete User.php Called after a user's email has been confirmed successfully.
1.1301.13.0 ContribsPager::getQueryInfo SpecialContributions.php Before the contributions query is about to run
1.1301.13.0 ContributionsLineEnding SpecialContributions.php Called before a contributions HTML line is finished
1.1101.11.0 ContributionsToolLinks SpecialContributions.php Change tool links above Special:Contributions
1.0911.9.1 CustomEditor Wiki.php When invoking the page editor. Return true to allow the normal editor to be used, or false if implementing a custom editor, e.g. for a special namespace, etc.
1.1601.16.0 DatabaseOraclePostInit DatabaseOracle.php Called after initialising an Oracle database connection
1.0701.7.0 DiffViewHeader DifferenceEngine.php Called before diff display
1.0801.8.0 DisplayOldSubtitle Article.php Allows extensions to modify the displaying of links to other revisions when browsing through revisions.
1.1401.14.0 DoEditSectionLink Linker.php Override the HTML generated for section edit links.
1.0601.6.0 EditFilter EditPage.php Perform checks on an edit
1.1201.12.0 EditFilterMerged EditPage.php Perform checks on an edit
1.0701.7.0 EditFormPreloadText EditPage.php Called when edit page for a new article is shown. This lets you fill the text-box of a new page with initial wikitext.
1.1601.16.0 EditFormInitialText EditPage.php Called when edit page for a existing article is shown. This lets you modify the content.
1.0831.8.3 EditPage::attemptSave EditPage.php Called before an article is saved, that is before insertNewArticle() is called
1.1601.16.0 EditPage::importFormData EditPage.php Allow extensions to read additional data posted in the form
1.0601.6.0 EditPage::showEditForm:fields EditPage.php Allows injection of form field into edit form.
1.0601.6.0 EditPage::showEditForm:initial EditPage.php before showing the edit form
1.1301.13.0 EditPageBeforeConflictDiff EditPage.php Allows modifying the EditPage object and output when there's an edit conflict.
1.1201.12.0 EditPageBeforeEditButtons EditPage.php Used to modify the edit buttons on the edit form
1.1401.14.0 EditPageBeforeEditChecks EditPage.php Allows modifying the edit checks below the textarea in the edit form
1.1601.16.0 EditPageBeforeEditToolbar EditPage.php Allows modifying the edit toolbar above the textarea
1.1601.16.0 EditPageCopyrightWarning EditPage.php Allow for site and per-namespace customization of contribution/copyright notice.
1.1601.16.0 EditPageGetDiffText EditPage.php Allow modifying the wikitext that will be used in "Show changes".
1.1601.16.0 EditPageGetPreviewText EditPage.php Allow modifying the wikitext that will be previewed.
1.1601.16.0 EditPageNoSuchSection EditPage.php When a section edit request is given for an non-existent section.
1.1601.16.0 EditPageTosSummary EditPage.php Give a chance for site and per-namespace customizations of terms of service summary link.
1.1101.11.0 EditSectionLink EditPage.php Override the return value of Linker::editSectionLink()
1.1101.11.0 EditSectionLinkForOther EditPage.php Override the return value of Linker::editSectionLink()
1.0701.7.0 EmailConfirmed User.php When checking that the user's email address is "confirmed"
1.0401.4.0 EmailUser SpecialEmailuser.php Occurs whenever the software receives a request to send an email from one user to another
1.1701.17.0 EmailUserCC SpecialEmailuser.php Occurs before sending the copy of the email to the author
1.0401.4.0 EmailUserComplete SpecialEmailuser.php Occurs after an email has been sent from one user to another
1.1701.17.0 EmailUserForm SpecialEmailuser.php Occurs after building the email user form object
1.1601.16.0 EmailUserPermissionsErrors SpecialEmailuser.php Retrieves permissions errors for emailing a user
1.1901.19.0 ExemptFromAccountCreationThrottle SpecialUserlogin.php To add an exemption from the account creation throttle
1.1801.18.0 ExtensionTypes SpecialVersion.php Called when generating the extensions credits, use this to change the tables headers
1.1901.19.0 ExtractThumbParameters thumb.php Called when extracting thumbnail parameters from a thumbnail file name.
1.0701.7.0 FetchChangesList ChangesList.php Allows extension to modify a recent changes list for a user.
1.130 1.13.0 FileDeleteComplete FileDeleteForm.php When a file is deleted
1.110 1.11.0 FileUpload filerepo/LocalFile.php When a file upload occurs
1.130 1.13.0 FileUndeleteComplete SpecialUndelete.php When a file is undeleted
1.170 1.17.0 FormatUserMessage User.php Hook to format a message if you want to override the internal formatter.
1.130 1.13.0 GetAutoPromoteGroups Autopromote.php When determining which autopromote groups a user is entitled to be in.
1.0601.6.0 GetBlockedStatus User.php Fired after the user's getBlockStatus is set.
1.1301.13.0 GetCacheVaryCookies OutputPage.php get cookies that should vary cache options
1.1801.18.0 GetCanonicalURL Title.php Allows to modify fully-qualified URLs used for IRC and e-mail notifications.
1.1801.18.0 GetDefaultSortkey Title.php Allows to override what the default sortkey is.
1.0601.6.0 GetFullURL Title.php Used to modify fully-qualified URLs used in redirects/export/offsite data
1.0601.6.0 GetInternalURL Title.php Used to modify fully-qualified URLs (useful for squid cache purging)
1.170 1.17.0 GetIP ProxyTools.php Modify the ip of the current user (called only once).
1.1201.12.0 GetLinkColours Parser.php modify the CSS class of an array of page links
1.0601.6.0 GetLocalURL Title.php Used to modify local URLs as output into page links
1.1901.19.0 GetLocalURL::Article Title.php Allows to modify local URLs specifically pointing to article paths without any fancy queries or variants.
1.1901.19.0 GetLocalURL::Internal Title.php Allows to modify local URLs to internal pages.
1.1801.18.0 GetMetadataVersion Generic.php Allows to modify the image metadata version currently in use.
1.1501.15.0 GetPreferences Preferences.php Modify user preferences
1.1201.12.0 getUserPermissionsErrors Title.php Add a permissions error when permissions errors are checked for.
1.1201.12.0 getUserPermissionsErrorsExpensive Title.php Absolutely the same, but is called only if expensive checks are enabled.
1.1401.14.0 HTMLCacheUpdate::doUpdate HTMLCacheUpdate.php After cache invalidation updates are inserted into the job queue
1.1301.13.0 ImageBeforeProduceHTML Linker.php Called before producing the HTML created by a wiki image insertion.
1.1101.11.0 ImageOpenShowImageInlineBefore ImagePage.php Call potential extension just before showing the image on an image page.
1.1601.16.0 ImagePageAfterImageLinks ImagePage.php Called after the image links section on an image page is built.
1.1301.13.0 ImagePageFileHistoryLine ImagePage.php Called when a file history line is contructed.
1.1301.13.0 ImagePageFindFile ImagePage.php Called when fetching the file associed with an image page.
1.1601.16.0 ImagePageShowTOC ImagePage.php Called when the file toc on an image page is generated.
1.170 1.17.0 ImportHandleLogItemXMLTag ImportXMLReader.php When parsing a XML tag in a log item
1.170 1.17.0 ImportHandlePageXMLTag ImportXMLReader.php When parsing a XML tag in a page
1.170 1.17.0 ImportHandleRevisionXMLTag ImportXMLReader.php When parsing a XML tag in a page revision
1.170 1.17.0 ImportHandleToplevelXMLTag ImportXMLReader.php When parsing a top level XML tag
1.170 1.17.0 ImportHandleUploadXMLTag ImportXMLReader.php When parsing a XML tag in a file upload
1.1101.11.0 InitPreferencesForm SpecialPreferences.php Called at the end of PreferencesForm's constructor
1.16.01.16.0 ImgAuthBeforeStream img_auth.php Executed before file is streamed to user, but only when using img_auth
1.1301.13.0 InitializeArticleMaybeRedirect Wiki.php Called when checking if title is a redirect
1.1001.10.0 InternalParseBeforeLinks Parser.php Used to process the expanded wiki code after <nowiki>, HTML-comments, and templates have been treated. Suitable for syntax extensions that want to support templates and comments.
1.160 1.16.0 InvalidateEmailComplete User.php Called after a user's email has been invalidated successfully.
1.180 1.18.0 IRCLineURL RecentChange.php When constructing the URL to use in an IRC notification.
1.100 1.10.0 IsFileCacheable Article.php Allow an extension to disable file caching on pages.
1.0901.9.0 IsTrustedProxy ProxyTools.php Allows an extension to set an IP as trusted or not.
1.120 1.12.0 isValidEmailAddr User.php Override the result of User::isValidEmailAddr()
1.110 1.11.0 isValidPassword User.php Override the result of User::isValidPassword()
1.1901.19.0 LanguageGetNamespaces languages/Language.php Provide custom ordering for namespaces or

remove namespaces.

1.0901.9.0 LanguageGetSpecialPageAliases languages/Language.php Use to define aliases of special pages names depending of the language
1.1801.18.0 LanguageGetTranslatedLanguageNames languages/Language.php Provide translated language names.
1.1401.14.0 LinkBegin Linker.php Used when generating internal and interwiki links in Linker::link()
1.1401.14.0 LinkEnd Linker.php Used when generating internal and interwiki links in Linker::link(), just before the function returns a value.
1.1301.13.0 LinkerMakeExternalLink Linker.php At the end of Linker::makeExternalLink() just before the return
1.1301.13.0 LinkerMakeExternalImage Linker.php At the end of Linker::makeExternalImage() just before the return
1.120 1.12.0 LinksUpdate LinksUpdate.php At the beginning of LinksUpdate::doUpdate() just before the actual update.
1.120 1.12.0 LinksUpdateComplete LinksUpdate.php At the end of LinksUpdate::doUpdate() when updating has completed.
1.110 1.11.0 LinksUpdateConstructed LinksUpdate.php At the end of LinksUpdate() is construction.
1.150 1.15.0 ListDefinedTags ChangeTags.php When trying to find all defined tags.
1.0801.8.0 LoadAllMessages MessageCache.php called by MessageCache::loadAllMessages() to load extensions messages
1.101 1.10.1 LoadExtensionSchemaUpdates maintenance/updaters.inc Fired when MediaWiki is updated to allow extensions to update the database.
1.130 1.13.0 LocalFile::getHistory LocalFile.php Called before file history query performed
1.190 1.19.0 LogEventsListShowLogExtract LogEventsList.php Called before the result of LogEventsList::showLogExtract() is added to OutputPage.
1.190 1.19.0 LoggableUserIPData (by extensions) Called when IP data for a user action can be logged by extensions like Extension:CheckUser.
1.100 1.10.0 LoginAuthenticateAudit SpecialUserLogin.php A login attempt for a valid user account either succeeded or failed. No return data is accepted; this hook is for auditing only.
1.1201.12.0 LogLine SpecialLog.php Processes a single log entry on Special:Log
1.0601.6.0 LogPageActionText Setup.php Strings used by wfMsg as a header. DEPRECATED: Use $wgLogActions
1.0501.5.0 LogPageLogHeader Setup.php Strings used by wfMsg as a header. DEPRECATED: Use $wgLogHeaders
1.0501.5.0 LogPageLogName Setup.php Name of the logging page(s). DEPRECATED: Use $wgLogNames
1.0501.5.0 LogPageValidTypes Setup.php Action being logged. DEPRECATED: Use $wgLogTypes
1.0601.6.0 MagicWordwgVariableIDs MagicWord.php Allows extensions to add Magic Word IDs.
1.1801.18.0 MaintenanceRefreshLinksInit maintenance/refreshLinks.php Before executing the refreshLinks.php maintenance script.
1.1401.14.0 MakeGlobalVariablesScript Skin.php called right before Skin::makeVariablesScript() is executed
1.0601.6.0 MarkPatrolled Article.php Called before an edit is marked patrolled
1.0601.6.0 MarkPatrolledComplete Article.php Called after an edit is marked patrolled
1.0701.7.0 MathAfterTexvc Math.php After texvc is executed when rendering mathematics
1.1201.12.0 MediaWikiPerformAction Wiki.php Override MediaWiki::performAction().
1.1501.15.0 MessageCacheReplace MessageCache.php When a message page is changed. Useful for updating caches.
1.1601.16.0 MessageNotInMwNs MessageCache.php When trying to get a message that isn't found in the MediaWiki namespace
1.0571.5.7 MessagesPreLoad MessageCache.php Occurs when loading a message from the database
1.1601.16.0 ModifyExportQuery Export.php Modify the query used by the exporter.
1.0601.6.0 MonoBookTemplateToolboxEnd skins/Monobook.php Called by Monobook skin after toolbox links have been rendered (useful for adding more)
1.1501.15.0 NewDifferenceEngine diff/DifferenceEngine.php Called when a new DifferenceEngine object is made.
1.1301.13.0 NewRevisionFromEditComplete (Various files) Called when a revision was inserted due to an edit
1.1301.13.0 NormalizeMessageKey MessageFunctions.php Called before the software gets the text of a message
1.1401.14.0 OldChangesListRecentChangesLine ChangesList.php Customize entire Recent Changes line
1.1301.13.0 OpenSearchUrls opensearch_desc.php Called when constructing the OpenSearch description XML.
1.1601.16.0 OtherBlockLogLink SpecialBlockip.php Get links to the block log from extensions which blocks users and/or IP addresses too
1.0601.6.0 OutputPageBeforeHTML OutputPage.php Called after the page has been rendered, but before the HTML is displayed.
1.1701.17.0 OutputPageBodyAttributes OutputPage.php Called when OutputPage::headElement() is creating the body tag.
1.1401.14.0 OutputPageCheckLastModified OutputPage.php When checking if the page has been modified since the last visit
1.1301.13.0 OutputPageMakeCategoryLinks OutputPage.php Called when links are about to be generated for the page's categories.
1.0801.8.0 OutputPageParserOutput OutputPage.php after adding a parserOutput to $wgOut
1.1901.19.0 PageContentLanguage Title.php Allows changing the page content language and the direction depending on that language.
1.1001.10.0 PageHistoryBeforeList PageHistory.php When a history page list is about to be constructed.
1.1001.10.0 PageHistoryLineEnding PageHistory.php Right before the end >li> is added to a history line
1.1301.13.0 PageHistoryPager::getQueryInfo PageHistory.php When a history pager query parameter set is constructed
1.0601.6.0 PageRenderingHash User.php Alter the parser cache option hash key
1.0501.5.0 ParserAfterStrip Parser.php Same as ParserBeforeStrip
1.0501.5.0 ParserAfterTidy Parser.php Used to add some final processing to the fully-rendered page output
1.0601.6.0 ParserBeforeInternalParse Parser.php called at the beginning of Parser::internalParse()
1.0501.5.0 ParserBeforeStrip Parser.php Used to process the raw wiki code before any internal processing is applied
1.0501.5.0 ParserBeforeTidy Parser.php Used to process the nearly-rendered html code for the page (but before any html tidying occurs)
1.0601.6.0 ParserClearState Parser.php called at the end of Parser::clearState()
1.1201.12.0 ParserFirstCallInit Parser.php called when the parser initialises for the first time
1.0601.6.0 ParserGetVariableValueSwitch Parser.php called when the parser needs the value of a custom magic word
1.0601.6.0 ParserGetVariableValueTs Parser.php use this to change the value of the time for the {{LOCAL...}} magic word
1.0601.6.0 ParserGetVariableValueVarCache Parser.php use this to change the value of the variable cache or return false to not use it
1.1201.12.0 ParserLimitReport Parser.php called at the end of Parser::parse() when the parser will include comments about size of the text parsed
1.1201.12.0 ParserMakeImageParams Parser.php called at the end of Parser::makeImage(). Alter the parameters used to generate an image.
1.1901.19.0 ParserSectionCreate Parser.php Called each time the parser creates a document section from wikitext.
1.0601.6.0 ParserTestParser maintenance/Parser.inc called when creating a new instance of Parser in maintenance/parserTests.inc
1.1001.10.0 ParserTestTables maintenance/parserTests.inc Alter the list of tables to duplicate when parser tests are run.
Use when page save hooks require the presence of custom tables to ensure that tests continue to run properly.
1.1801.18.0 PerformRetroactiveAutoblock Block.php Called before a retroactive autoblock is applied to a user.
1.0601.6.0 PersonalUrls SkinTemplate.php Alter the user-specific navigation links (e.g. "my page, my talk page, my contributions" etc).
1.0901.9.0 PingLimiter User.php Allows extensions to override the results of User::pingLimiter()
1.1901.19.0 PlaceNewSection WikiPage.php Allows extensions to control where new sections are added.
1.0901.9.0 PreferencesUserInformationPanel SpecialPreferences.php Add HTML bits to user information list in preferences form
1.1201.12.0 PrefixSearchBackend PrefixSearch.php Override the title prefix search used for OpenSearch and AJAX search suggestions.
1.1101.11.0 PrefsEmailAudit SpecialPreferences.php called when user changes his email address
1.1101.11.0 PrefsPasswordAudit SpecialPreferences.php called when user changes his password
1.1601.16.0 ProtectionForm::buildForm ProtectionForm.php Called after all protection type fieldsets are made in the form
1.1601.16.0 ProtectionForm::save ProtectionForm.php Called when a protection form is submitted
1.1601.16.0 ProtectionForm::showLogExtract ProtectionForm.php Called after the protection log extract is shown
1.1001.10.0 RawPageViewBeforeOutput RawPage.php Right before the text is blown out in action=raw
1.0801.8.0 RecentChange_save RecentChange.php Called after a "Recent Change" is commited to the DB
1.1101.11.0 RenderPreferencesForm SpecialPreferences.php Called at the end of PreferencesForm::mainPrefsForm
1.1901.19.0 RequestContextCreateSkin RequestContext.php Called when creating a skin instance.
1.1101.11.0 ResetPreferences SpecialPreferences.php Called at the end of PreferencesForm::resetPrefs
1.1701.17.0 ResourceLoaderGetConfigVars ResourceLoaderStartUpModule.php Called right before ResourceLoaderStartUpModule::getConfig() returns.
1.1801.18.0 ResourceLoaderGetStartupModules ResourceLoaderStartUpModule.php Run once the startup module is being generated.
1.1701.17.0 ResourceLoaderRegisterModules ResourceLoader.php Allows registering of modules with ResourceLoader.
1.1901.19.0 ResourceLoaderTestModules ResourceLoader.php Add new javascript testing modules. This is called after the addition of MediaWiki core test suites.
1.1101.11.0 RevisionInsertComplete Revision.php Called after a revision is inserted into the DB
1.1101.11.0 SavePreferences SpecialPreferences.php Called at the end of PreferencesForm::savePreferences; returning false prevents the preferences from being saved.
1.1601.16.0 SearchableNamespaces SearchEngine.php An option to modify which namespaces are searchable.
1.1601.16.0 SearchEngineReplacePrefixesComplete SearchEngine.php Run after SearchEngine::replacePrefixes().
1.1201.12.0 SearchGetNearMatch SearchEngine.php An extra chance for exact-title-matches in "go" searches.
1.1601.16.0 SearchGetNearMatchBefore SearchEngine.php Perform exact-title-matches in "go" searches before the normal operations.
1.1601.16.0 SearchGetNearMatchComplete SearchEngine.php A chance to modify exact-title-matches in "go" searches.
1.1001.10.0 SearchUpdate SearchUpdate.php Prior to search update completion
1.1401.14.0 SetupAfterCache Setup.php Called in Setup.php, after cache objects are set
1.1701.17.0 SetupUserMessageArticle User.php Called in User::leaveUserMessage() before anything has been posted to the article.
1.1601.16.0 ShowMissingArticle Article.php Called when generating the output for a non-existent page
1.1101.11.0 ShowRawCssJs Article.php Customise the output of raw CSS and JavaScript in page views
1.1601.16.0 ShowSearchHitTitle SpecialSearch.php Customise display of search hit title/link.
1.0701.7.0 SiteNoticeAfter GlobalFunctions.php After site notice is determined
1.0701.7.0 SiteNoticeBefore GlobalFunctions.php Before site notice is determined
1.1101.11.0 SkinAfterBottomScripts Skin.php At the end of Skin::bottomScripts()
1.1401.14.0 SkinAfterContent Skin.php Allows extensions to add text after the page content and article metadata.
1.1401.14.0 SkinBuildSidebar Skin.php At the end of Skin::buildSidebar()
1.1601.16.0 SkinCopyrightFooter Skin.php Allow for site and per-namespace customization of copyright notice.
1.1701.17.0 SkinGetPoweredBy Skin.php Called when generating the code used to display the "Powered by MediaWiki" icon.
1.1201.12.0 SkinSubPageSubtitle Skin.php Called before the list of subpage links on top of a subpage is generated
1.0601.6.0 SkinTemplateBuildContentActionUrlsAfterSpecialPage SkinTemplate.php after the single tab when showing a special page
1.0601.6.0 SkinTemplateBuildNavUrlsNav_urlsAfterPermalink SkinTemplate.php after creating the "permanent link" tab
1.0501.5.0 SkinTemplateContentActions SkinTemplate.php Alter the "content action" links in SkinTemplates
1.1601.16.0 SkinTemplateNavigation SkinTemplate.php Alter the structured navigation links in SkinTemplate
1.1001.10.0 SkinTemplateOutputPageBeforeExec SkinTemplate.php Before SkinTemplate::outputPage() starts page output
1.0601.6.0 SkinTemplatePreventOtherActiveTabs SkinTemplate.php use this to prevent showing active tabs
1.0601.6.0 SkinTemplateSetupPageCss SkinTemplate.php use this to provide per-page CSS
1.1801.18.0 SkinTemplateNavigation::SpecialPage SkinTemplate.php Called on special pages after the special tab is added but before variants have been added
1.1201.12.0 SkinTemplateTabAction SkinTemplate.php Override SkinTemplate::tabAction().
1.0601.6.0 SkinTemplateTabs SkinTemplate.php called when finished to build the actions tabs
1.1301.13.0 SkinTemplateToolboxEnd skins/Monobook.php, skins/Modern.php Called by SkinTemplate skins after toolbox links have been rendered (useful for adding more)
1.1801.18.0 SkinTemplateNavigation::Universal SkinTemplate.php Called on both content and special pages after variants have been added
1.1501.15.0 SoftwareInfo SpecialVersion.php Called by Special:Version for returning information about the software
1.0501.5.0 SpecialContributionsBeforeMainOutput SpecialContributions.php Before the form on Special:Contributions
1.1301.13.0 SpecialListusersDefaultQuery SpecialListusers.php Called right before the end of UsersPager::getDefaultQuery()
1.1301.13.0 SpecialListusersFormatRow SpecialListusers.php Called right before the end of UsersPager::formatRow()
1.1301.13.0 SpecialListusersHeader SpecialListusers.php Called before closing the <fieldset> in UsersPager::getPageHeader()
1.1301.13.0 SpecialListusersHeaderForm SpecialListusers.php Called before adding the submit button in UsersPager::getPageHeader()
1.1301.13.0 SpecialListusersQueryInfo SpecialListusers.php Called right before the end of UsersPager::getQueryInfo()
1.0601.6.0 SpecialMovepageAfterMove SpecialMovepage.php Called after a page is moved.
1.1801.18.0 SpecialNewPagesFilters SpecialNewpages.php Called after building form options at NewPages.
1.0701.7.0 SpecialPage_initList SpecialPage.php Called when the list of Special Pages is populated. Hook gets a chance to change the list to hide/show pages
1.0601.6.0 SpecialPageExecuteAfterPage SpecialPage.php called after executing a special page
1.0601.6.0 SpecialPageExecuteBeforeHeader SpecialPage.php called before setting the header text of the special page
1.0601.6.0 SpecialPageExecuteBeforePage SpecialPage.php called after setting the special page header text but before the main execution
1.1801.18.0 SpecialPasswordResetOnSubmit SpecialPasswordReset.php Called when executing a form submission on Special:PasswordReset.
1.1601.16.0 SpecialRandomGetRandomTitle SpecialRandompage.php Modify the selection criteria for Special:Random
1.1801.18.0 SpecialRecentChangesFilters SpecialRecentchanges.php Called after building form options at RecentChanges
1.1301.13.0 SpecialRecentChangesPanel SpecialRecentchanges.php called when building form options in SpecialRecentChanges
1.1301.13.0 SpecialRecentChangesQuery SpecialRecentchanges.php called when building sql query for SpecialRecentChanges
1.1901.19.0 SpecialSearchCreateLink SpecialSearch.php Called when making the message to create a page or go to the existing page.
1.0601.6.0 SpecialSearchNogomatch SpecialSearch.php called when user clicked the "Go" button but the target doesn't exist
1.1301.13.0 SpecialSearchNoResults SpecialSearch.php called before search result display when there are no matches
1.1901.19.0 SpecialSearchPowerBox SpecialSearch.php The equivalent of SpecialSearchProfileForm for the advanced form, a.k.a. power search box
1.1801.18.0 SpecialSearchProfileForm SpecialSearch.php allows modification of search profile forms
1.1601.16.0 SpecialSearchProfiles SpecialSearch.php allows modification of search profiles
1.1301.13.0 SpecialSearchResults SpecialSearch.php called before search result display when there are matches
1.1801.18.0 SpecialSearchSetupEngine SpecialSearch.php allows passing custom data to search engine
1.1601.16.0 SpecialStatsAddExtra SpecialStatistics.php Can be used to add extra statistic at the end of Special:Statistics
1.1601.16.0 SpecialUploadComplete SpecialUpload.php Called after successfully uploading a file from Special:Upload
1.0601.6.0 SpecialVersionExtensionTypes SpecialVersion.php called when generating the extensions credits, use this to change the tables headers
1.1801.18.0 SpecialWatchlistFilters SpecialWatchlist.php Called after building form options at Watchlist.
1.1401.14.0 SpecialWatchlistQuery SpecialWatchlist.php Called when building sql query for SpecialWatchlist
1.1801.18.0 TestCanonicalRedirect Wiki.php Called when about to force a redirect to a canonical URL for a title when we have no other parameters on the URL.
1.1401.14.0 TitleArrayFromResult TitleArray.php called when creating an TitleArray object from a database result
1.1601.16.0 TitleGetRestrictionTypes Title.php Allows to modify the types of protection that can be applied.
1.2001.20.0 TitleIsAlwaysKnown Title.php Allows overriding default behaviour for determining if a page exists.
1.1901.19.0 TitleIsCssOrJsPage Title.php Called when determining if a page is a CSS or JS page.
1.1901.19.0 TitleIsMovable Title.php Called when determining if it is possible to move a page.
1.1901.19.0 TitleIsWikitextPage Title.php Called when determining if a page is a wikitext or should be handled by seperate handler (via ArticleViewCustom).
1.0401.4.0 TitleMoveComplete Title.php Occurs whenever a request to move an article is completed
1.1801.18.0 UndeleteForm::showHistory SpecialUndelete.php Called in UndeleteForm::showHistory, after a PageArchive object has been created but before any further processing is done.
1.1801.18.0 UndeleteForm::showRevision SpecialUndelete.php Called in UndeleteForm::showRevision, after a PageArchive object has been created but before any further processing is done.
1.1801.18.0 UndeleteForm::undelete SpecialUndelete.php Called un UndeleteForm::undelete, after checking that the site is not in read-only mode, that the Title object is not null and after a PageArchive object has been constructed but before performing any further processing.
1.0901.9.0 UndeleteShowRevision SpecialUndelete.php called when showing a revision in Special:Undelete
1.0401.4.0 UnknownAction Wiki.php Used to add new query-string actions
1.0401.4.0 UnwatchArticle Article.php Occurs whenever the software receives a request to unwatch an article
1.0401.4.0 UnwatchArticleComplete Article.php Occurs after the unwatch article request has been processed
1.1601.16.0 UploadCreateFromRequest UploadBase.php When UploadBase::createFromRequest has been called.
1.0641.6.4 UploadComplete SpecialUpload.php Called when a file upload has completed.
1.1601.16.0 UploadFormInitDescriptor SpecialUpload.php Occurs after the descriptor for the upload form as been assembled.
1.1601.16.0 UploadFormSourceDescriptors SpecialUpload.php Occurs after the standard source inputs have been added to the descriptor.
1.0901.9.0 UploadForm:BeforeProcessing SpecialUpload.php Called just before the file data (for example description) are processed, so extensions have a chance to manipulate them.
1.0901.9.0 UploadForm:initial SpecialUpload.php Called just before the upload form is generated
1.0601.6.0 UploadVerification SpecialUpload.php Called when a file is uploaded, to allow extra file verification to take place (deprecated)
1.1701.17.0 UploadVerifyFile SpecialUpload.php Called when a file is uploaded, to allow extra file verification to take place (preferred)
1.1801.18.0 UserAddGroup User.php Called when adding a group to an user.
1.1301.13.0 UserArrayFromResult UserArray.php called when creating an UserArray object from a database result
1.0601.6.0 userCan Title.php To interrupt/advise the "user can do X to Y article" check
1.1201.12.0 UserCanSendEmail User.php To override User::canSendEmail() permission check
1.0571.5.7 UserClearNewTalkNotification User.php called when clearing the "You have new messages!" message
1.1401.14.0 UserComparePasswords User.php Called when checking passwords
1.0601.6.0 UserCreateForm SpecialUserlogin.php Change to manipulate the login form
1.1401.14.0 UserCryptPassword User.php Called when hashing a password
1.110 1.11.0 UserEffectiveGroups User.php Called in User::getEffectiveGroups()
1.130 1.13.0 UserGetAllRights User.php After calculating a list of all available rights
1.180 1.18.0 UserGetDefaultOptions User.php Called after fetching the core default user options.
1.130 1.13.0 UserGetEmail User.php Called when getting an user email address
1.130 1.13.0 UserGetEmailAuthenticationTimestamp User.php Called when getting the timestamp of email authentification
1.110 1.11.0 UserGetImplicitGroups User.php Called in User::getImplicitGroups()
1.180 1.18.0 UserGetLanguageObject User.php Called when getting user's interface language object.
1.140 1.14.0 UserGetReservedNames User.php Allows to modify $wgReservedUsernames at run time.
1.1101.11.0 UserGetRights User.php Called in User::getRights()
1.1601.16.0 UserIsBlockedFrom User.php Check if a user is blocked from a specific page (for specific block exemptions).
1.1401.14.0 UserIsBlockedGlobally User.php Check if user is blocked on all wikis.
1.1401.14.0 UserLoadAfterLoadFromSession User.php Called to authenticate users on external/environmental means; occurs after session is loaded
1.1301.13.0 UserLoadDefaults User.php Called when loading a default user
1.1501.15.0 UserLoadFromDatabase User.php Called when loading a user from the database
1.1301.13.0 UserLoadFromSession User.php Called to authenticate users on external/environmental means
1.1501.15.0 UserLoadOptions User.php Called when user options/preferences are being loaded from the database
1.0401.4.0 UserLoginComplete SpecialUserlogin.php Occurs after a user has successfully logged in
1.0601.6.0 UserLoginForm SpecialUserlogin.php Change to manipulate the login form
1.0401.4.0 UserLogout SpecialUserlogin.php Occurs when the software receives a request to log out
1.0401.4.0 UserLogoutComplete SpecialUserlogin.php Occurs after a user has successfully logged out
1.1401.14.0 User::mailPasswordInternal SpecialUserlogin.php Before creation and mailing of a user's new temporary password
1.1801.18.0 UserRemoveGroup User.php Called when removing a group from an user.
1.0571.5.7 UserRetrieveNewTalks User.php called when retrieving "You have new messages!" message(s)
1.0601.6.0 UserRights SpecialUserrights.php Called after a user's group memberships are changed
1.1401.14.0 UserrightsChangeableGroups SpecialUserrights.php Called after the list of groups that can be manipulated via Special:UserRights is populated, but before it is returned.
1.1501.15.0 UserSaveOptions User.php Called just before saving user preferences/options
1.1301.13.0 UserSaveSettings User.php Called when saving user settings
1.1301.13.0 UserSetCookies User.php Called when setting user cookies
1.1301.13.0 UserSetEmail User.php Called when changing user email address
1.1301.13.0 UserSetEmailAuthenticationTimestamp User.php Called when setting the timestamp of email authentification
1.0801.8.0 UserToggles User.php Called before returning "user toggle names"
1.1801.18.0 WantedPages::getQueryInfo SpecialWantedPages.php Called in WantedPagesPage::getQueryInfo(), can be used to alter the SQL query which gets the list of wanted pages.
1.1501.15.0 WantedPages::getSQL SpecialWantedPages.php Called in WantedPagesPage::getSQL(), can be used to alter the SQL query which gets the list of wanted pages
1.0401.4.0 WatchArticle Article.php Occurs whenever the software receives a request to watch an article
1.0401.4.0 WatchArticleComplete Article.php Occurs after the watch article request has been processed
1.1701.17.0 WatchlistEditorBuildRemoveLine WatchlistEditor.php Occurs when building remove lines in Special:Watchlist/edit
1.1901.19.0 WebRequestPathInfoRouter WebRequest.php While building the PathRouter to parse the REQUEST_URI.
1.1901.19.0 wfShellMaintenanceCmd GlobalFunctions.php Called when generating a shell-escaped command line string to run a maintenance script.
1.1501.15.0 WikiExporter::dumpStableQuery Export.php Get the SELECT query for "stable" revisions dumps
1.0601.6.0 wgQueryPages QueryPage.php called when initialising $wgQueryPages
1.1601.16.0 XmlDumpWriterOpenPage Export.php Called at the end of XmlDumpWriter::openPage, to allow extra metadata to be added.
1.1601.16.0 XmlDumpWriterWriteRevision Export.php Called at the end of a revision in an XML dump, to add extra metadata.
1.1801.18.0 XMPGetInfo media/XMPInfo.php Called when obtaining the list of XMP tags to extract.
1.1801.18.0 XMPGetResults media/XMP.php Called just before returning the results array of parsing xmp data.

Hooks gruppiert nach Version [edit]

Um Hooks nach Version gruppiert zu sehen, gehen Sie zur obigen Tabelle und klicken Sie auf das Pfeilsymbol im Tabellenkopf.

Siehe auch [edit]

Sprache: English  • Deutsch • Bahasa Indonesia • 日本語