Call hook functions defined in Hooks::register and $wgHooks.
For the given hook event, fetch the array of hook events and process them. Determine the proper callback for each hook and then call the actual hook using the appropriate arguments. Finally, process the return value and return/throw accordingly.
For hook event that are not abortable through a handler's return value, use runWithoutAbort() instead.
- Parameters
-
string | $event | Event name |
array | $args | Array of parameters passed to hook functions |
string | null | $deprecatedVersion | [optional] Mark hook as deprecated with version number |
- Returns
- bool True if no handler aborted the hook
- Exceptions
-
- Since
- 1.22 A hook function is not required to return a value for processing to continue. Not returning a value (or explicitly returning null) is equivalent to returning true.
Definition at line 200 of file Hooks.php.
References $args, and callHook().
Referenced by UploadForm\__construct(), RedirectSpecialArticle\__construct(), RenameuserSQL\__construct(), ChangesListSpecialPage\__construct(), DatabaseUpdater\__construct(), LinksUpdate\__construct(), ApiQuery\__construct(), ApiMain\__construct(), EmailNotification\actuallyNotifyOnPageChange(), User\addAutopromoteOnceGroups(), ApiBase\addDeprecation(), User\addGroup(), Skin\afterContentHook(), SpecialPageLanguage\alterForm(), ExternalUserNames\applyPrefix(), SpecialChangeEmail\attemptChange(), EditPage\attemptSave(), SearchEngine\augmentSearchResults(), MediaWiki\Auth\AuthManager\autoCreateUser(), MediaWiki\Auth\AuthManager\beginAuthentication(), Skin\bottomScripts(), MediaWiki\Linker\LinkRenderer\buildAElement(), SkinTemplate\buildContentNavigationUrls(), ProtectionForm\buildForm(), SkinTemplate\buildNavUrls(), SpecialEditWatchlist\buildRemoveLine(), Skin\buildSidebar(), ChangeTags\canAddTagsAccompanyingChange(), ContentHandler\canBeUsedOn(), ChangeTags\canCreateTag(), ChangeTags\canDeleteTag(), User\canSendEmail(), EmailNotification\canSendUserTalkEmail(), Autopromote\checkCondition(), ApiMain\checkConditionalRequestHeaders(), ApiMain\checkExecutePermissions(), User\checkPasswordValidity(), MediaWiki\Permissions\PermissionManager\checkPermissionHooks(), MovePage\checkPermissions(), MediaWiki\Permissions\PermissionManager\checkQuickPermissions(), MediaWiki\Permissions\PermissionManager\checkReadPermissions(), CleanupUsersWithNoId\cleanup(), User\clearNotification(), ApiFormatBase\closePrinter(), WikiPage\commitRollback(), SearchEngine\completionSearchBackend(), Article\confirmDelete(), User\confirmEmail(), MediaWiki\Auth\AuthManager\continueAuthentication(), AbstractContent\convert(), ContentHandler\createDifferenceEngine(), ChangeTags\deleteTagEverywhere(), MonoBookTemplate\deprecatedHookHack(), EditPage\displayViewSourcePage(), MediaWiki\Block\DatabaseBlock\doAutoblock(), HistoryPager\doBatchLookups(), UsersPager\doBatchLookups(), CategoryViewer\doCategoryQuery(), MediaWiki\Storage\PageUpdater\doCreate(), FileDeleteForm\doDelete(), SpecialNuke\doDelete(), Article\doDelete(), WikiPage\doDeleteArticleBatched(), WikiPage\doDeleteArticleReal(), Skin\doEditSectionLink(), WikiImporter\doImport(), RecentChange\doMarkPatrolled(), MediaWiki\Storage\PageUpdater\doModify(), RevDelRevisionList\doPostCommitUpdates(), WikiPage\doPurge(), RefreshLinks\doRefreshLinks(), MediaWiki\Block\DatabaseBlock\doRetroactiveAutoblock(), UserrightsPage\doSaveUserGroups(), MovePageForm\doSubmit(), TransformationalImageHandler\doTransform(), WatchAction\doUnwatch(), LinksUpdate\doUpdate(), WikiPage\doUpdateRestrictions(), MediaWiki\Storage\DerivedPageDataUpdater\doUpdates(), LinkHolderArray\doVariants(), WikiPage\doViewUpdates(), WatchAction\doWatch(), WikiExporter\dumpPages(), EditPage\edit(), ApiValidatePassword\execute(), SpecialRenameuser\execute(), ApiUndelete\execute(), ApiLogout\execute(), ApiExpandTemplates\execute(), VectorTemplate\execute(), ApiChangeAuthenticationData\execute(), SpecialLog\execute(), ApiOptions\execute(), SpecialContributions\execute(), SpecialTrackingCategories\execute(), BenchmarkHooks\execute(), SpecialStatistics\execute(), ApiParse\execute(), ApiRemoveAuthenticationData\execute(), CleanupPreferences\execute(), SpecialImport\execute(), ApiLogin\execute(), ApiOpenSearch\execute(), SpecialSearch\execute(), SpecialUpload\execute(), PasswordReset\execute(), ApiQuery\execute(), ApiMain\executeAction(), ApiPageSet\executeInternal(), Title\exists(), ApiQueryWatchlist\extractOutputData(), ApiQueryInfo\extractPageInfo(), Collation\factory(), WikiPage\factory(), ApiFeedContributions\feedItem(), FormatMetadata\fetchExtendedMetadata(), Article\fetchRevisionRecord(), AuthManagerSpecialPage\fieldInfoToFormDescriptor(), WikiImporter\finishImportPage(), Linker\formatAutocomments(), UsersPager\formatRow(), DeletedContribsPager\formatRow(), SpecialNewpages\formatRow(), ContribsPager\formatRow(), File\generateAndSaveThumb(), CategoryViewer\generateLink(), MediaWiki\Widget\Search\FullSearchResultWidget\generateMainLinkHtml(), ParserCache\get(), MessageCache\get(), LegacyLogFormatter\getActionLinks(), BaseTemplate\getAfterPortlet(), ApiImport\getAllowedImportSources(), MediaWiki\Permissions\PermissionManager\getAllPermissions(), ChangesList\getArticleLink(), MediaWiki\Storage\PageUpdater\getAtomicSectionUpdate(), Autopromote\getAutopromoteGroups(), User\getBlockedStatus(), NamespaceInfo\getCanonicalNamespaces(), Title\getCanonicalURL(), Title\getCategorySortkey(), Title\getCdnUrls(), CheckLanguageCLI\getCheckBlacklist(), EditPage\getCheckboxesDefinition(), BacklinkCache\getConditions(), ResourceLoaderStartUpModule\getConfigSettings(), ContentHandler\getContentModels(), Skin\getCopyright(), EditPage\getCopyrightWarning(), ContentHandler\getDataForSearchIndex(), Revision\MainSlotRoleHandler\getDefaultModel(), User\getDefaultOptions(), UsersPager\getDefaultQuery(), ParserOptions\getDefaults(), WikiPage\getDeletionUpdates(), ResourceLoaderForeignApiModule\getDependencies(), HistoryAction\getDescription(), DifferenceEngine\getDiffBody(), MagicWordFactory\getDoubleUnderscoreArray(), EditPage\getEditButtons(), Title\getEditNotices(), EditPage\getEditToolbar(), User\getEffectiveGroups(), User\getEmail(), User\getEmailAuthenticationTimestamp(), FormatMetadata\getExtendedMetadataFromHook(), WatchedItemQueryService\getExtensions(), SpecialVersion\getExtensionTypes(), LogEventsList\getExtraInputsDesc(), SpecialRecentChanges\getExtraOptions(), ApiBase\getFinalDescription(), ApiBase\getFinalParamDescription(), ApiBase\getFinalParams(), FormAction\getForm(), FormSpecialPage\getForm(), SpecialContributions\getForm(), MediaWiki\Preferences\DefaultPreferencesFactory\getFormDescriptor(), SpecialBlock\getFormFields(), SpecialMute\getFormFields(), ContentHandler\getForModelID(), Title\getFullURL(), User\getGlobalBlock(), ApiHelp\getHelpInternal(), LocalFile\getHistory(), Language\getHumanTimestamp(), SpecialUpload\getInitialPageText(), Title\getInternalURL(), RequestContext\getLanguage(), MediaWiki\Languages\LanguageNameUtils\getLanguageNamesUncached(), SkinTemplate\getLanguages(), PreferencesFormOOUI\getLegend(), ScribuntoEngineBase\getLibraries(), ScribuntoEngineBase\getLibraryPaths(), IRCColourfulRCFeedFormatter\getLine(), EnhancedChangesList\getLineData(), Title\getLocalURL(), EnhancedChangesList\getLogText(), SpecialLog\getLogTypesOnUser(), DifferenceEngine\getMarkPatrolledLinkInfo(), MediaWiki\Languages\LanguageNameUtils\getMessagesFileName(), MediaHandler\getMetadataVersion(), MessageCache\getMsgFromNamespace(), Language\getNamespaces(), SearchNearMatcher\getNearMatch(), SearchNearMatcher\getNearMatchInternal(), User\getNewMessageLinks(), SpecialNuke\getNewPages(), MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProvider\getNewPasswordExpiry(), Skin\getNewtalks(), SpecialEditWatchlist\getNormalForm(), UsersPager\getPageHeader(), CodeEditorHooks\getPageLanguage(), ContentHandler\getPageLanguage(), MediaWiki\Special\SpecialPageFactory\getPageList(), QueryPage\getPages(), AbstractContent\getParserOutput(), WebRequest\getPathInfo(), SpecialEmailUser\getPermissionsError(), UserPasswordPolicy\getPoliciesForUser(), Skin\getPoweredBy(), BacklinkCache\getPrefix(), EditPage\getPreviewLimitReport(), EditPage\getPreviewText(), SpecialShortPages\getQueryInfo(), SpecialAncientPages\getQueryInfo(), NewPagesPager\getQueryInfo(), WantedPagesPage\getQueryInfo(), SpecialLonelyPages\getQueryInfo(), HistoryPager\getQueryInfo(), UsersPager\getQueryInfo(), RandomPage\getQueryInfo(), ContribsPager\getQueryInfo(), RandomPage\getRandomTitle(), MWTimestamp\getRelativeTimestamp(), Title\getRestrictionTypes(), ApiRsd\getRsdApiList(), SearchEngine\getSearchIndexFields(), SpecialSearch\getSearchProfiles(), AbstractContent\getSecondaryDataUpdates(), MediaWiki\Storage\DerivedPageDataUpdater\getSecondaryDataUpdates(), BaseTemplate\getSidebar(), Skin\getSiteNotice(), RequestContext\getSkin(), ContentHandler\getSlotDiffRenderer(), SpecialVersion\getSoftwareInformation(), UploadForm\getSourceSection(), ApiQueryRevisions\getTokenFunctions(), ApiQueryRecentChanges\getTokenFunctions(), ApiQueryUsers\getTokenFunctions(), ApiQueryInfo\getTokenFunctions(), SpecialResetTokens\getTokensList(), ApiTokens\getTokenTypes(), ApiQueryTokens\getTokenTypeSalts(), BaseTemplate\getToolbox(), Skin\getUndeleteLink(), MediaWiki\Block\BlockManager\getUserBlock(), MediaWiki\Permissions\PermissionManager\getUserPermissions(), LoginHelper\getValidErrorMessages(), MagicWordFactory\getVariableIDs(), GitInfo\getViewers(), SpecialVersion\getwgVersionLinked(), SpecialSearch\goResult(), ApiMain\handleException(), WikiImporter\handleLogItem(), WikiImporter\handlePage(), WikiImporter\handleRevision(), EditPage\handleStatus(), WikiImporter\handleUpload(), HistoryPager\historyLine(), ImageHistoryList\imageHistoryLine(), EditPage\importFormData(), LinksUpdate\incrTableUpdate(), ChangesList\initChangesListRows(), initFromTitle(), MediaWiki\initializeArticle(), Revision\RevisionStore\insertRevisionOn(), EditPage\internalAttemptSave(), User\invalidateEmail(), UploadFromUrl\isAllowedUrl(), Title\isAlwaysKnown(), MediaWiki\BadFileLookup\isBadFile(), MediaWiki\Permissions\PermissionManager\isBlockedFrom(), User\isBot(), User\isEmailConfirmed(), MediaWiki\Permissions\PermissionManager\isEveryoneAllowed(), Article\isFileCacheable(), User\isHidden(), TransformationalImageHandler\isImageAreaOkForThumbnaling(), User\isLocked(), NamespaceInfo\isMovable(), Title\isMovable(), ProxyLookup\isTrustedProxy(), User\isUsableName(), MovePage\isValidMove(), ApiMain\lacksSameOriginSecurity(), SpecialWhatLinksHere\listItem(), ChangeTags\listSoftwareActivatedTags(), ChangeTags\listSoftwareDefinedTags(), MediaWiki\Interwiki\ClassicInterwikiLookup\load(), User\load(), User\loadDefaults(), ImagePage\loadFile(), User\loadFromDatabase(), ImageGalleryBase\loadModes(), DifferenceEngine\loadNewText(), User\loadOptions(), DifferenceEngine\loadRevisionIds(), MediaWiki\Session\SessionManager\loadSessionInfoFromStore(), DifferenceEngine\loadText(), MWExceptionHandler\logError(), MWExceptionHandler\logException(), BotPassword\loginHook(), LogEventsList\logLine(), User\logout(), MediaWiki\main(), ContentSecurityPolicy\makeCSPDirectives(), Linker\makeExternalImage(), Linker\makeExternalLink(), Linker\makeImageLink(), Linker\makeMediaLinkFile(), ApiParse\makeParserOptions(), MediaWiki\Shell\Shell\makeScriptCommand(), Linker\makeSelfLinkObj(), DifferenceEngine\markPatrolledLink(), MergeHistory\merge(), MovePage\moveToInternal(), MovePage\moveUnsafe(), ChangesList\newFromContext(), UserArray\newFromResult(), TitleArray\newFromResult(), Article\newFromTitle(), MediaWiki\MediaWikiServices\newInstance(), EditPage\noSuchSectionPage(), SpecialMute\onSubmit(), SpecialChangeContentModel\onSubmit(), SpecialUserLogout\onSuccess(), RawAction\onView(), InfoAction\onView(), HistoryAction\onView(), XmlDumpWriter\openPage(), ImagePage\openShowImage(), ParserOptions\optionsHash(), MediaWiki\Widget\Search\SearchFormWidget\optionsHtml(), WikiPage\pageData(), MediaWiki\Storage\PageEditStash\parseAndCache(), SearchEngine\parseNamespacePrefixes(), MediaWiki\performAction(), AuthManagerSpecialPage\performAuthenticationStep(), MediaWiki\performRequest(), MediaWiki\Session\CookieSessionProvider\persistSession(), User\pingLimiter(), MediaWiki\Widget\Search\SearchFormWidget\powerSearchBox(), Skin\preloadExistence(), MediaWiki\Storage\DerivedPageDataUpdater\prepareContent(), SkinTemplate\prepareQuickTemplate(), SpecialBlock\preText(), SpecialBlock\processForm(), ApiQueryBase\processRow(), SpecialUnblock\processUnblock(), SpecialUpload\processUpload(), RecentChangesUpdateJob\purgeExpiredRows(), LocalFile\purgeOldThumbnails(), LocalFile\purgeThumbnails(), DeletedContribsPager\reallyDoQuery(), ContribsPager\reallyDoQuery(), LocalisationCache\recache(), EnhancedChangesList\recentChangesBlockLine(), OldChangesList\recentChangesLine(), LocalFile\recordUpload2(), MessageCache\refreshAndReplaceInternal(), SpecialWatchlist\registerFilters(), ChangesListSpecialPage\registerFilters(), User\removeGroup(), RenameuserSQL\rename(), MediaWiki\Widget\Search\FullSearchResultWidget\render(), DifferenceEngine\renderNewRevision(), VectorTemplate\renderPortals(), LinkHolderArray\replaceInternal(), WikitextContent\replaceSection(), ImportReporter\reportPage(), User\requiresHTTPS(), WatchedItemStore\resetNotificationTimestamp(), User\resetOptions(), ApiQueryWatchlist\run(), SpecialPage\run(), MediaWiki\Linker\LinkRenderer\runBeginHook(), MediaWiki\Linker\LinkRenderer\runLegacyBeginHook(), ChangesListSpecialPage\runMainQueryHook(), EditPage\runPostMergeFilters(), SpecialEditWatchlist\runWatchUnwatchCompleteHook(), ProtectionForm\save(), ParserCache\save(), RecentChange\save(), MediaWiki\Session\SessionBackend\save(), MediaWiki\Preferences\DefaultPreferencesFactory\saveFormData(), User\saveOptions(), MediaWiki\Storage\PageUpdater\saveRevision(), User\saveSettings(), SearchEngineConfig\searchableNamespaces(), PrefixSearch\searchBackend(), MediaWiki\Auth\AuthManager\securitySensitiveOperationStatus(), ApiQueryBase\select(), UserMailer\send(), User\sendConfirmationMail(), SpecialEmailUser\sendEmailForm(), UserMailer\sendInternal(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider\sendNewAccountEmail(), WebResponse\setCookie(), User\setEmail(), User\setEmailAuthenticationTimestamp(), Article\setOldSubtitle(), MediaWiki\Auth\AuthManager\setSessionDataForUser(), SpecialNewpages\setup(), EditAction\show(), EditPage\showConflict(), SpecialSearch\showCreateLink(), DifferenceEngine\showDiff(), EditPage\showDiff(), DifferenceEngine\showDiffPage(), EditPage\showEditForm(), SpecialUndelete\showHistory(), SpecialAutoblockList\showList(), SpecialBookSources\showList(), SpecialBlockList\showList(), LogEventsList\showLogExtract(), ProtectionForm\showLogExtract(), Article\showMissingArticle(), Article\showPatrolFooter(), EditPage\showPreview(), Article\showRedirectedFromHeader(), SpecialSearch\showResults(), LoginHelper\showReturnToPage(), SpecialUndelete\showRevision(), EditPage\showStandardInputs(), ImagePage\showTOC(), EditPage\showTosSummary(), Article\showViewFooter(), SpecialEmailUser\submit(), Skin\subPageSubtitle(), SpecialUserLogin\successfulAction(), SpecialCreateAccount\successfulAction(), SkinTemplate\tabAction(), MediaWiki\Auth\ThrottlePreAuthenticationProvider\testForAccountCreation(), TraditionalImageGallery\toHTML(), ThumbnailImage\toHtml(), WikiPage\triggerOpportunisticLinksUpdate(), MediaWiki\tryNormaliseRedirect(), AuthManagerSpecialPage\trySubmit(), PageArchive\undelete(), SpecialUndelete\undelete(), PageArchive\undeleteRevisions(), WikiPage\updateCategoryCounts(), ChangeTags\updateTags(), HTMLFileCache\useFileCache(), Linker\userToolLinks(), UpdateMediaWiki\validateParamsAndArgs(), CategoryPage\view(), ImagePage\view(), Article\view(), wfCanIPUseHTTPS(), wfShellWikiCmd(), and XmlDumpWriter\writeRevision().