MediaWiki  master
MediaWiki\HookContainer\HookRunner Class Reference

This class provides an implementation of the core hook interfaces, forwarding hook calls to HookContainer for dispatch to extensions. More...

Inherits MediaWiki\Auth\Hook\AuthManagerLoginAuthenticateAuditHook, MediaWiki\Auth\Hook\ExemptFromAccountCreationThrottleHook, MediaWiki\Auth\Hook\LocalUserCreatedHook, MediaWiki\Auth\Hook\ResetPasswordExpirationHook, MediaWiki\Auth\Hook\SecuritySensitiveOperationStatusHook, MediaWiki\Auth\Hook\UserLoggedInHook, MediaWiki\Block\Hook\AbortAutoblockHook, MediaWiki\Block\Hook\GetUserBlockHook, MediaWiki\Block\Hook\PerformRetroactiveAutoblockHook, MediaWiki\Cache\Hook\BacklinkCacheGetConditionsHook, MediaWiki\Cache\Hook\BacklinkCacheGetPrefixHook, MediaWiki\Cache\Hook\HtmlCacheUpdaterAppendUrlsHook, MediaWiki\Cache\Hook\HtmlCacheUpdaterVaryUrlsHook, MediaWiki\Cache\Hook\HTMLFileCache__useFileCacheHook, MediaWiki\Cache\Hook\MessageCacheReplaceHook, MediaWiki\Cache\Hook\MessageCache__getHook, MediaWiki\Cache\Hook\MessagesPreLoadHook, MediaWiki\Hook\TitleSquidURLsHook, MediaWiki\ChangeTags\Hook\ChangeTagAfterDeleteHook, MediaWiki\ChangeTags\Hook\ChangeTagCanCreateHook, MediaWiki\ChangeTags\Hook\ChangeTagCanDeleteHook, MediaWiki\ChangeTags\Hook\ChangeTagsAfterUpdateTagsHook, MediaWiki\ChangeTags\Hook\ChangeTagsAllowedAddHook, MediaWiki\ChangeTags\Hook\ChangeTagsListActiveHook, MediaWiki\ChangeTags\Hook\ListDefinedTagsHook, MediaWiki\Content\Hook\ContentAlterParserOutputHook, MediaWiki\Content\Hook\ContentGetParserOutputHook, MediaWiki\Content\Hook\ContentHandlerForModelIDHook, MediaWiki\Content\Hook\ContentModelCanBeUsedOnHook, MediaWiki\Content\Hook\ConvertContentHook, MediaWiki\Content\Hook\GetContentModelsHook, MediaWiki\Content\Hook\GetDifferenceEngineHook, MediaWiki\Content\Hook\GetSlotDiffRendererHook, MediaWiki\Content\Hook\PageContentLanguageHook, MediaWiki\Content\Hook\PlaceNewSectionHook, MediaWiki\Content\Hook\SearchDataForIndexHook, MediaWiki\Content\Hook\SecondaryDataUpdatesHook, MediaWiki\Diff\Hook\AbortDiffCacheHook, MediaWiki\Diff\Hook\ArticleContentOnDiffHook, MediaWiki\Diff\Hook\DifferenceEngineAfterLoadNewTextHook, MediaWiki\Diff\Hook\DifferenceEngineLoadTextAfterNewContentIsLoadedHook, MediaWiki\Diff\Hook\DifferenceEngineMarkPatrolledLinkHook, MediaWiki\Diff\Hook\DifferenceEngineMarkPatrolledRCIDHook, MediaWiki\Diff\Hook\DifferenceEngineNewHeaderHook, MediaWiki\Diff\Hook\DifferenceEngineOldHeaderHook, MediaWiki\Diff\Hook\DifferenceEngineOldHeaderNoOldRevHook, MediaWiki\Diff\Hook\DifferenceEngineRenderRevisionAddParserOutputHook, MediaWiki\Diff\Hook\DifferenceEngineRenderRevisionShowFinalPatrolLinkHook, MediaWiki\Diff\Hook\DifferenceEngineShowDiffHook, MediaWiki\Diff\Hook\DifferenceEngineShowDiffPageHook, MediaWiki\Diff\Hook\DifferenceEngineShowDiffPageMaybeShowMissingRevisionHook, MediaWiki\Diff\Hook\DifferenceEngineShowEmptyOldContentHook, MediaWiki\Diff\Hook\DifferenceEngineViewHeaderHook, MediaWiki\Diff\Hook\DiffRevisionToolsHook, MediaWiki\Diff\Hook\DiffToolsHook, MediaWiki\Diff\Hook\DiffViewHeaderHook, MediaWiki\Diff\Hook\NewDifferenceEngineHook, MediaWiki\Hook\AbortEmailNotificationHook, MediaWiki\Hook\AbortTalkPageEmailNotificationHook, MediaWiki\Hook\ActionBeforeFormDisplayHook, MediaWiki\Hook\ActionModifyFormFieldsHook, MediaWiki\Hook\AddNewAccountHook, MediaWiki\Hook\AfterBuildFeedLinksHook, MediaWiki\Hook\AfterFinalPageOutputHook, MediaWiki\Hook\AfterImportPageHook, MediaWiki\Hook\AfterParserFetchFileAndTitleHook, MediaWiki\Hook\AlternateEditHook, MediaWiki\Hook\AlternateEditPreviewHook, MediaWiki\Hook\AlternateUserMailerHook, MediaWiki\Hook\AncientPagesQueryHook, MediaWiki\Hook\ApiBeforeMainHook, MediaWiki\Hook\ArticleMergeCompleteHook, MediaWiki\Hook\ArticleRevisionVisibilitySetHook, MediaWiki\Hook\ArticleUpdateBeforeRedirectHook, MediaWiki\Hook\BadImageHook, MediaWiki\Hook\BaseTemplateAfterPortletHook, MediaWiki\Hook\BaseTemplateToolboxHook, MediaWiki\Hook\BeforeHttpsRedirectHook, MediaWiki\Hook\BeforeInitializeHook, MediaWiki\Hook\BeforePageDisplayHook, MediaWiki\Hook\BeforePageRedirectHook, MediaWiki\Hook\BeforeParserFetchFileAndTitleHook, MediaWiki\Hook\BeforeParserFetchTemplateAndtitleHook, MediaWiki\Hook\BeforeParserrenderImageGalleryHook, MediaWiki\Hook\BeforeResetNotificationTimestampHook, MediaWiki\Hook\BeforeWelcomeCreationHook, MediaWiki\Hook\BitmapHandlerCheckImageAreaHook, MediaWiki\Hook\BitmapHandlerTransformHook, MediaWiki\Hook\BlockIpCompleteHook, MediaWiki\Hook\BlockIpHook, MediaWiki\Hook\BookInformationHook, MediaWiki\Hook\CanIPUseHTTPSHook, MediaWiki\Hook\CanonicalNamespacesHook, MediaWiki\Hook\CategoryViewer__doCategoryQueryHook, MediaWiki\Hook\CategoryViewer__generateLinkHook, MediaWiki\Hook\ChangesListInitRowsHook, MediaWiki\Hook\ChangesListInsertArticleLinkHook, MediaWiki\Hook\ChangeUserGroupsHook, MediaWiki\Hook\Collation__factoryHook, MediaWiki\Hook\ContentSecurityPolicyDefaultSourceHook, MediaWiki\Hook\ContentSecurityPolicyDirectivesHook, MediaWiki\Hook\ContentSecurityPolicyScriptSourceHook, MediaWiki\Hook\ContribsPager__getQueryInfoHook, MediaWiki\Hook\ContribsPager__reallyDoQueryHook, MediaWiki\Hook\ContributionsLineEndingHook, MediaWiki\Hook\ContributionsToolLinksHook, MediaWiki\Hook\CustomEditorHook, MediaWiki\Hook\DeletedContribsPager__reallyDoQueryHook, MediaWiki\Hook\DeletedContributionsLineEndingHook, MediaWiki\Hook\DeleteUnknownPreferencesHook, MediaWiki\Hook\EditFilterHook, MediaWiki\Hook\EditFilterMergedContentHook, MediaWiki\Hook\EditFormInitialTextHook, MediaWiki\Hook\EditFormPreloadTextHook, MediaWiki\Hook\EditPageBeforeConflictDiffHook, MediaWiki\Hook\EditPageBeforeEditButtonsHook, MediaWiki\Hook\EditPageBeforeEditToolbarHook, MediaWiki\Hook\EditPageCopyrightWarningHook, MediaWiki\Hook\EditPageGetCheckboxesDefinitionHook, MediaWiki\Hook\EditPageGetDiffContentHook, MediaWiki\Hook\EditPageGetPreviewContentHook, MediaWiki\Hook\EditPageNoSuchSectionHook, MediaWiki\Hook\EditPageTosSummaryHook, MediaWiki\Hook\EditPage__attemptSaveHook, MediaWiki\Hook\EditPage__attemptSave_afterHook, MediaWiki\Hook\EditPage__importFormDataHook, MediaWiki\Hook\EditPage__showEditForm_fieldsHook, MediaWiki\Hook\EditPage__showEditForm_initialHook, MediaWiki\Hook\EditPage__showReadOnlyForm_initialHook, MediaWiki\Hook\EditPage__showStandardInputs_optionsHook, MediaWiki\Hook\EmailUserCCHook, MediaWiki\Hook\EmailUserCompleteHook, MediaWiki\Hook\EmailUserFormHook, MediaWiki\Hook\EmailUserHook, MediaWiki\Hook\EmailUserPermissionsErrorsHook, MediaWiki\Hook\EnhancedChangesListModifyBlockLineDataHook, MediaWiki\Hook\EnhancedChangesListModifyLineDataHook, MediaWiki\Hook\EnhancedChangesList__getLogTextHook, MediaWiki\Hook\ExtensionTypesHook, MediaWiki\Hook\FetchChangesListHook, MediaWiki\Hook\FileDeleteCompleteHook, MediaWiki\Hook\FileTransformedHook, MediaWiki\Hook\FileUndeleteCompleteHook, MediaWiki\Hook\FileUploadHook, MediaWiki\Hook\FormatAutocommentsHook, MediaWiki\Hook\GalleryGetModesHook, MediaWiki\Hook\GetCacheVaryCookiesHook, MediaWiki\Hook\GetCanonicalURLHook, MediaWiki\Hook\GetDefaultSortkeyHook, MediaWiki\Hook\GetDoubleUnderscoreIDsHook, MediaWiki\Hook\GetExtendedMetadataHook, MediaWiki\Hook\GetFullURLHook, MediaWiki\Hook\GetHumanTimestampHook, MediaWiki\Hook\GetInternalURLHook, MediaWiki\Hook\GetIPHook, MediaWiki\Hook\GetLangPreferredVariantHook, MediaWiki\Hook\GetLinkColoursHook, MediaWiki\Hook\GetLocalURLHook, MediaWiki\Hook\GetLocalURL__ArticleHook, MediaWiki\Hook\GetLocalURL__InternalHook, MediaWiki\Hook\GetLogTypesOnUserHook, MediaWiki\Hook\GetMagicVariableIDsHook, MediaWiki\Hook\GetMetadataVersionHook, MediaWiki\Hook\GetNewMessagesAlertHook, MediaWiki\Hook\GetRelativeTimestampHook, MediaWiki\Hook\GitViewersHook, MediaWiki\Hook\HistoryPageToolLinksHook, MediaWiki\Hook\HistoryRevisionToolsHook, MediaWiki\Hook\HistoryToolsHook, MediaWiki\Hook\ImageBeforeProduceHTMLHook, MediaWiki\Hook\ImgAuthBeforeStreamHook, MediaWiki\Hook\ImgAuthModifyHeadersHook, MediaWiki\Hook\ImportHandleContentXMLTagHook, MediaWiki\Hook\ImportHandleLogItemXMLTagHook, MediaWiki\Hook\ImportHandlePageXMLTagHook, MediaWiki\Hook\ImportHandleRevisionXMLTagHook, MediaWiki\Hook\ImportHandleToplevelXMLTagHook, MediaWiki\Hook\ImportHandleUnknownUserHook, MediaWiki\Hook\ImportHandleUploadXMLTagHook, MediaWiki\Hook\ImportLogInterwikiLinkHook, MediaWiki\Hook\ImportSourcesHook, MediaWiki\Hook\InfoActionHook, MediaWiki\Hook\InitializeArticleMaybeRedirectHook, MediaWiki\Hook\InternalParseBeforeLinksHook, MediaWiki\Hook\InternalParseBeforeSanitizeHook, MediaWiki\Hook\IRCLineURLHook, MediaWiki\Hook\IsTrustedProxyHook, MediaWiki\Hook\IsUploadAllowedFromUrlHook, MediaWiki\Hook\IsValidEmailAddrHook, MediaWiki\Hook\LanguageGetNamespacesHook, MediaWiki\Hook\LanguageLinksHook, MediaWiki\Hook\LanguageSelectorHook, MediaWiki\Hook\LinkerMakeExternalImageHook, MediaWiki\Hook\LinkerMakeExternalLinkHook, MediaWiki\Hook\LinkerMakeMediaLinkFileHook, MediaWiki\Hook\LinksUpdateAfterInsertHook, MediaWiki\Hook\LinksUpdateCompleteHook, MediaWiki\Hook\LinksUpdateConstructedHook, MediaWiki\Hook\LinksUpdateHook, MediaWiki\Hook\LocalFilePurgeThumbnailsHook, MediaWiki\Hook\LocalFile__getHistoryHook, MediaWiki\Hook\LocalisationCacheRecacheFallbackHook, MediaWiki\Hook\LocalisationCacheRecacheHook, MediaWiki\Hook\LogEventsListGetExtraInputsHook, MediaWiki\Hook\LogEventsListLineEndingHook, MediaWiki\Hook\LogEventsListShowLogExtractHook, MediaWiki\Hook\LogExceptionHook, MediaWiki\Hook\LoginFormValidErrorMessagesHook, MediaWiki\Hook\LogLineHook, MediaWiki\Hook\LonelyPagesQueryHook, MediaWiki\Hook\MagicWordwgVariableIDsHook, MediaWiki\Hook\MaintenanceRefreshLinksInitHook, MediaWiki\Hook\MaintenanceUpdateAddParamsHook, MediaWiki\Hook\MakeGlobalVariablesScriptHook, MediaWiki\Hook\ManualLogEntryBeforePublishHook, MediaWiki\Hook\MarkPatrolledCompleteHook, MediaWiki\Hook\MarkPatrolledHook, MediaWiki\Hook\MediaWikiPerformActionHook, MediaWiki\Hook\MediaWikiPHPUnitTest__endTestHook, MediaWiki\Hook\MediaWikiPHPUnitTest__startTestHook, MediaWiki\Hook\MediaWikiServicesHook, MediaWiki\Hook\MimeMagicGuessFromContentHook, MediaWiki\Hook\MimeMagicImproveFromExtensionHook, MediaWiki\Hook\MimeMagicInitHook, MediaWiki\Hook\ModifyExportQueryHook, MediaWiki\Hook\MovePageCheckPermissionsHook, MediaWiki\Hook\MovePageIsValidMoveHook, MediaWiki\Hook\NamespaceIsMovableHook, MediaWiki\Hook\NewPagesLineEndingHook, MediaWiki\Hook\OldChangesListRecentChangesLineHook, MediaWiki\Hook\OpenSearchUrlsHook, MediaWiki\Hook\OtherAutoblockLogLinkHook, MediaWiki\Hook\OtherBlockLogLinkHook, MediaWiki\Hook\OutputPageAfterGetHeadLinksArrayHook, MediaWiki\Hook\OutputPageBeforeHTMLHook, MediaWiki\Hook\OutputPageBodyAttributesHook, MediaWiki\Hook\OutputPageCheckLastModifiedHook, MediaWiki\Hook\OutputPageMakeCategoryLinksHook, MediaWiki\Hook\OutputPageParserOutputHook, MediaWiki\Hook\PageHistoryBeforeListHook, MediaWiki\Hook\PageHistoryLineEndingHook, MediaWiki\Hook\PageHistoryPager__doBatchLookupsHook, MediaWiki\Hook\PageHistoryPager__getQueryInfoHook, MediaWiki\Hook\PageMoveCompleteHook, MediaWiki\Hook\PageMoveCompletingHook, MediaWiki\Hook\PageRenderingHashHook, MediaWiki\Hook\ParserAfterParseHook, MediaWiki\Hook\ParserAfterTidyHook, MediaWiki\Hook\ParserBeforeInternalParseHook, MediaWiki\Hook\ParserBeforePreprocessHook, MediaWiki\Hook\ParserCacheSaveCompleteHook, MediaWiki\Hook\ParserClearStateHook, MediaWiki\Hook\ParserClonedHook, MediaWiki\Hook\ParserFetchTemplateHook, MediaWiki\Hook\ParserFirstCallInitHook, MediaWiki\Hook\ParserGetVariableValueSwitchHook, MediaWiki\Hook\ParserGetVariableValueTsHook, MediaWiki\Hook\ParserGetVariableValueVarCacheHook, MediaWiki\Hook\ParserLimitReportFormatHook, MediaWiki\Hook\ParserLimitReportPrepareHook, MediaWiki\Hook\ParserMakeImageParamsHook, MediaWiki\Hook\ParserOptionsRegisterHook, MediaWiki\Hook\ParserOutputPostCacheTransformHook, MediaWiki\Hook\ParserPreSaveTransformCompleteHook, MediaWiki\Hook\ParserSectionCreateHook, MediaWiki\Hook\ParserTestGlobalsHook, MediaWiki\Hook\ParserTestTablesHook, MediaWiki\Hook\PasswordPoliciesForUserHook, MediaWiki\Hook\PersonalUrlsHook, MediaWiki\Hook\PostLoginRedirectHook, MediaWiki\Hook\PreferencesGetLegendHook, MediaWiki\Hook\PrefsEmailAuditHook, MediaWiki\Hook\ProtectionForm__buildFormHook, MediaWiki\Hook\ProtectionForm__saveHook, MediaWiki\Hook\ProtectionForm__showLogExtractHook, MediaWiki\Hook\RandomPageQueryHook, MediaWiki\Hook\RawPageViewBeforeOutputHook, MediaWiki\Hook\RecentChangesPurgeRowsHook, MediaWiki\Hook\RecentChange_saveHook, MediaWiki\Hook\RejectParserCacheValueHook, MediaWiki\Hook\RequestContextCreateSkinHook, MediaWiki\Hook\SelfLinkBeginHook, MediaWiki\Hook\SendWatchlistEmailNotificationHook, MediaWiki\Hook\SetupAfterCacheHook, MediaWiki\Hook\ShortPagesQueryHook, MediaWiki\Hook\SidebarBeforeOutputHook, MediaWiki\Hook\SiteNoticeAfterHook, MediaWiki\Hook\SiteNoticeBeforeHook, MediaWiki\Hook\SkinAddFooterLinksHook, MediaWiki\Hook\SkinAfterBottomScriptsHook, MediaWiki\Hook\SkinAfterContentHook, MediaWiki\Hook\SkinBuildSidebarHook, MediaWiki\Hook\SkinCopyrightFooterHook, MediaWiki\Hook\SkinEditSectionLinksHook, MediaWiki\Hook\SkinGetPoweredByHook, MediaWiki\Hook\SkinPreloadExistenceHook, MediaWiki\Hook\SkinSubPageSubtitleHook, MediaWiki\Hook\SkinTemplateBuildNavUrlsNav_urlsAfterPermalinkHook, MediaWiki\Hook\SkinTemplateGetLanguageLinkHook, MediaWiki\Hook\SkinTemplateNavigationHook, MediaWiki\Hook\SkinTemplateNavigation__SpecialPageHook, MediaWiki\Hook\SkinTemplateNavigation__UniversalHook, MediaWiki\Hook\SkinTemplateOutputPageBeforeExecHook, MediaWiki\Hook\SkinTemplatePreventOtherActiveTabsHook, MediaWiki\Hook\SkinTemplateTabActionHook, MediaWiki\Hook\SkinTemplateToolboxEndHook, MediaWiki\Hook\SoftwareInfoHook, MediaWiki\Hook\SpecialBlockModifyFormFieldsHook, MediaWiki\Hook\SpecialContributionsBeforeMainOutputHook, MediaWiki\Hook\SpecialContributions__formatRow__flagsHook, MediaWiki\Hook\SpecialContributions__getForm__filtersHook, MediaWiki\Hook\SpecialListusersDefaultQueryHook, MediaWiki\Hook\SpecialListusersFormatRowHook, MediaWiki\Hook\SpecialListusersHeaderFormHook, MediaWiki\Hook\SpecialListusersHeaderHook, MediaWiki\Hook\SpecialListusersQueryInfoHook, MediaWiki\Hook\SpecialLogAddLogSearchRelationsHook, MediaWiki\Hook\SpecialMovepageAfterMoveHook, MediaWiki\Hook\SpecialMuteModifyFormFieldsHook, MediaWiki\Hook\SpecialMuteSubmitHook, MediaWiki\Hook\SpecialNewpagesConditionsHook, MediaWiki\Hook\SpecialNewPagesFiltersHook, MediaWiki\Hook\SpecialRandomGetRandomTitleHook, MediaWiki\Hook\SpecialRecentChangesPanelHook, MediaWiki\Hook\SpecialResetTokensTokensHook, MediaWiki\Hook\SpecialSearchCreateLinkHook, MediaWiki\Hook\SpecialSearchGoResultHook, MediaWiki\Hook\SpecialSearchNogomatchHook, MediaWiki\Hook\SpecialSearchProfilesHook, MediaWiki\Hook\SpecialSearchResultsAppendHook, MediaWiki\Hook\SpecialSearchResultsHook, MediaWiki\Hook\SpecialSearchResultsPrependHook, MediaWiki\Hook\SpecialSearchSetupEngineHook, MediaWiki\Hook\SpecialStatsAddExtraHook, MediaWiki\Hook\SpecialTrackingCategories__generateCatLinkHook, MediaWiki\Hook\SpecialTrackingCategories__preprocessHook, MediaWiki\Hook\SpecialUploadCompleteHook, MediaWiki\Hook\SpecialVersionVersionUrlHook, MediaWiki\Hook\SpecialWatchlistGetNonRevisionTypesHook, MediaWiki\Hook\TestCanonicalRedirectHook, MediaWiki\Hook\ThumbnailBeforeProduceHTMLHook, MediaWiki\Hook\TitleArrayFromResultHook, MediaWiki\Hook\TitleExistsHook, MediaWiki\Hook\TitleGetEditNoticesHook, MediaWiki\Hook\TitleGetRestrictionTypesHook, MediaWiki\Hook\TitleIsAlwaysKnownHook, MediaWiki\Hook\TitleIsMovableHook, MediaWiki\Hook\TitleMoveCompleteHook, MediaWiki\Hook\TitleMoveCompletingHook, MediaWiki\Hook\TitleMoveHook, MediaWiki\Hook\TitleMoveStartingHook, MediaWiki\Hook\UnblockUserCompleteHook, MediaWiki\Hook\UnblockUserHook, MediaWiki\Hook\UndeleteForm__showHistoryHook, MediaWiki\Hook\UndeleteForm__showRevisionHook, MediaWiki\Hook\UndeleteForm__undeleteHook, MediaWiki\Hook\UndeletePageToolLinksHook, MediaWiki\Hook\UndeleteShowRevisionHook, MediaWiki\Hook\UnitTestsAfterDatabaseSetupHook, MediaWiki\Hook\UnitTestsBeforeDatabaseTeardownHook, MediaWiki\Hook\UnitTestsListHook, MediaWiki\Hook\UnwatchArticleCompleteHook, MediaWiki\Hook\UnwatchArticleHook, MediaWiki\Hook\UpdateUserMailerFormattedPageStatusHook, MediaWiki\Hook\UploadCompleteHook, MediaWiki\Hook\UploadCreateFromRequestHook, MediaWiki\Hook\UploadFormInitDescriptorHook, MediaWiki\Hook\UploadFormSourceDescriptorsHook, MediaWiki\Hook\UploadForm_BeforeProcessingHook, MediaWiki\Hook\UploadForm_getInitialPageTextHook, MediaWiki\Hook\UploadForm_initialHook, MediaWiki\Hook\UploadStashFileHook, MediaWiki\Hook\UploadVerifyFileHook, MediaWiki\Hook\UploadVerifyUploadHook, MediaWiki\Hook\UserGetLanguageObjectHook, MediaWiki\Hook\UserLoginCompleteHook, MediaWiki\Hook\UserLogoutCompleteHook, MediaWiki\Hook\UserMailerChangeReturnPathHook, MediaWiki\Hook\UserMailerSplitToHook, MediaWiki\Hook\UserMailerTransformContentHook, MediaWiki\Hook\UserMailerTransformMessageHook, MediaWiki\Hook\UsersPagerDoBatchLookupsHook, MediaWiki\Hook\UserToolLinksEditHook, MediaWiki\Hook\ValidateExtendedMetadataCacheHook, MediaWiki\Hook\WantedPages__getQueryInfoHook, MediaWiki\Hook\WatchArticleCompleteHook, MediaWiki\Hook\WatchArticleHook, MediaWiki\Hook\WatchedItemQueryServiceExtensionsHook, MediaWiki\Hook\WatchlistEditorBeforeFormRenderHook, MediaWiki\Hook\WatchlistEditorBuildRemoveLineHook, MediaWiki\Hook\WebRequestPathInfoRouterHook, MediaWiki\Hook\WebResponseSetCookieHook, MediaWiki\Hook\WhatLinksHerePropsHook, MediaWiki\Hook\WikiExporter__dumpStableQueryHook, MediaWiki\Hook\XmlDumpWriterOpenPageHook, MediaWiki\Hook\XmlDumpWriterWriteRevisionHook, MediaWiki\Installer\Hook\LoadExtensionSchemaUpdatesHook, MediaWiki\Interwiki\Hook\InterwikiLoadPrefixHook, MediaWiki\Languages\Hook\LanguageGetTranslatedLanguageNamesHook, MediaWiki\Languages\Hook\Language__getMessagesFileNameHook, MediaWiki\Linker\Hook\HtmlPageLinkRendererBeginHook, MediaWiki\Linker\Hook\HtmlPageLinkRendererEndHook, Page\Hook\ArticleConfirmDeleteHook, Page\Hook\ArticleDeleteAfterSuccessHook, Page\Hook\ArticleDeleteCompleteHook, Page\Hook\ArticleDeleteHook, Page\Hook\ArticleFromTitleHook, Page\Hook\ArticlePageDataAfterHook, Page\Hook\ArticlePageDataBeforeHook, Page\Hook\ArticleProtectCompleteHook, Page\Hook\ArticleProtectHook, Page\Hook\ArticlePurgeHook, Page\Hook\ArticleRevisionUndeletedHook, Page\Hook\ArticleRevisionViewCustomHook, Page\Hook\ArticleRollbackCompleteHook, Page\Hook\ArticleShowPatrolFooterHook, Page\Hook\ArticleUndeleteHook, Page\Hook\ArticleUndeleteLogEntryHook, Page\Hook\ArticleViewFooterHook, Page\Hook\ArticleViewHeaderHook, Page\Hook\ArticleViewRedirectHook, Page\Hook\Article__MissingArticleConditionsHook, Page\Hook\BeforeDisplayNoArticleTextHook, Page\Hook\CategoryAfterPageAddedHook, Page\Hook\CategoryAfterPageRemovedHook, Page\Hook\CategoryPageViewHook, Page\Hook\DisplayOldSubtitleHook, Page\Hook\ImageOpenShowImageInlineBeforeHook, Page\Hook\ImagePageAfterImageLinksHook, Page\Hook\ImagePageFileHistoryLineHook, Page\Hook\ImagePageFindFileHook, Page\Hook\ImagePageShowTOCHook, Page\Hook\IsFileCacheableHook, Page\Hook\NewRevisionFromEditCompleteHook, Page\Hook\OpportunisticLinksUpdateHook, Page\Hook\PageDeletionDataUpdatesHook, Page\Hook\PageViewUpdatesHook, Page\Hook\RevisionFromEditCompleteHook, Page\Hook\RevisionUndeletedHook, Page\Hook\RollbackCompleteHook, Page\Hook\ShowMissingArticleHook, Page\Hook\WikiPageDeletionUpdatesHook, Page\Hook\WikiPageFactoryHook, MediaWiki\Permissions\Hook\GetUserPermissionsErrorsExpensiveHook, MediaWiki\Permissions\Hook\GetUserPermissionsErrorsHook, MediaWiki\Permissions\Hook\TitleQuickPermissionsHook, MediaWiki\Permissions\Hook\TitleReadWhitelistHook, MediaWiki\Permissions\Hook\UserCanHook, MediaWiki\Permissions\Hook\UserGetAllRightsHook, MediaWiki\Permissions\Hook\UserGetRightsHook, MediaWiki\Permissions\Hook\UserGetRightsRemoveHook, MediaWiki\Permissions\Hook\UserIsBlockedFromHook, MediaWiki\Permissions\Hook\UserIsEveryoneAllowedHook, MediaWiki\Preferences\Hook\GetPreferencesHook, MediaWiki\Preferences\Hook\PreferencesFormPreSaveHook, ResourceLoader\Hook\ResourceLoaderGetConfigVarsHook, ResourceLoader\Hook\ResourceLoaderJqueryMsgModuleMagicWordsHook, MediaWiki\Rest\Hook\SearchResultProvideDescriptionHook, MediaWiki\Rest\Hook\SearchResultProvideThumbnailHook, Revision\Hook\ContentHandlerDefaultModelForHook, Revision\Hook\RevisionInsertCompleteHook, Revision\Hook\RevisionRecordInsertedHook, MediaWiki\Search\Hook\PrefixSearchBackendHook, MediaWiki\Search\Hook\PrefixSearchExtractNamespaceHook, MediaWiki\Search\Hook\SearchableNamespacesHook, MediaWiki\Search\Hook\SearchAfterNoDirectMatchHook, MediaWiki\Search\Hook\SearchGetNearMatchBeforeHook, MediaWiki\Search\Hook\SearchGetNearMatchCompleteHook, MediaWiki\Search\Hook\SearchGetNearMatchHook, MediaWiki\Search\Hook\SearchIndexFieldsHook, MediaWiki\Search\Hook\SearchResultInitFromTitleHook, MediaWiki\Search\Hook\SearchResultsAugmentHook, MediaWiki\Search\Hook\ShowSearchHitHook, MediaWiki\Search\Hook\ShowSearchHitTitleHook, MediaWiki\Search\Hook\SpecialSearchPowerBoxHook, MediaWiki\Search\Hook\SpecialSearchProfileFormHook, MediaWiki\Session\Hook\SessionCheckInfoHook, MediaWiki\Session\Hook\SessionMetadataHook, MediaWiki\Session\Hook\UserSetCookiesHook, MediaWiki\Shell\Hook\WfShellWikiCmdHook, MediaWiki\Skins\Hook\SkinAfterPortletHook, MediaWiki\Skins\Hook\SkinPageReadyConfigHook, MediaWiki\SpecialPage\Hook\AuthChangeFormFieldsHook, MediaWiki\SpecialPage\Hook\ChangeAuthenticationDataAuditHook, MediaWiki\SpecialPage\Hook\ChangesListSpecialPageQueryHook, MediaWiki\SpecialPage\Hook\ChangesListSpecialPageStructuredFiltersHook, MediaWiki\SpecialPage\Hook\RedirectSpecialArticleRedirectParamsHook, MediaWiki\SpecialPage\Hook\SpecialPageAfterExecuteHook, MediaWiki\SpecialPage\Hook\SpecialPageBeforeExecuteHook, MediaWiki\SpecialPage\Hook\SpecialPageBeforeFormDisplayHook, MediaWiki\SpecialPage\Hook\SpecialPage_initListHook, MediaWiki\SpecialPage\Hook\WgQueryPagesHook, MediaWiki\Storage\Hook\ArticleEditUpdateNewTalkHook, MediaWiki\Storage\Hook\ArticleEditUpdatesDeleteFromRecentchangesHook, MediaWiki\Storage\Hook\ArticleEditUpdatesHook, MediaWiki\Storage\Hook\ArticlePrepareTextForEditHook, MediaWiki\Storage\Hook\BeforeRevertedTagUpdateHook, MediaWiki\Storage\Hook\MultiContentSaveHook, MediaWiki\Storage\Hook\PageContentInsertCompleteHook, MediaWiki\Storage\Hook\PageContentSaveCompleteHook, MediaWiki\Storage\Hook\PageContentSaveHook, MediaWiki\Storage\Hook\PageSaveCompleteHook, MediaWiki\Storage\Hook\ParserOutputStashForEditHook, MediaWiki\Storage\Hook\RevisionDataUpdatesHook, MediaWiki\User\Hook\AutopromoteConditionHook, MediaWiki\User\Hook\ConfirmEmailCompleteHook, MediaWiki\User\Hook\EmailConfirmedHook, MediaWiki\User\Hook\GetAutoPromoteGroupsHook, MediaWiki\User\Hook\InvalidateEmailCompleteHook, MediaWiki\User\Hook\IsValidPasswordHook, MediaWiki\User\Hook\PingLimiterHook, MediaWiki\User\Hook\SpecialPasswordResetOnSubmitHook, MediaWiki\User\Hook\UserAddGroupHook, MediaWiki\User\Hook\UserArrayFromResultHook, MediaWiki\User\Hook\UserCanSendEmailHook, MediaWiki\User\Hook\UserClearNewTalkNotificationHook, MediaWiki\User\Hook\UserEffectiveGroupsHook, MediaWiki\User\Hook\UserGetDefaultOptionsHook, MediaWiki\User\Hook\UserGetEmailAuthenticationTimestampHook, MediaWiki\User\Hook\UserGetEmailHook, MediaWiki\User\Hook\UserGetReservedNamesHook, MediaWiki\User\Hook\UserGroupsChangedHook, MediaWiki\User\Hook\UserIsBlockedGloballyHook, MediaWiki\User\Hook\UserIsBotHook, MediaWiki\User\Hook\UserIsLockedHook, MediaWiki\User\Hook\UserLoadAfterLoadFromSessionHook, MediaWiki\User\Hook\UserLoadDefaultsHook, MediaWiki\User\Hook\UserLoadFromDatabaseHook, MediaWiki\User\Hook\UserLoadOptionsHook, MediaWiki\User\Hook\UserLogoutHook, MediaWiki\User\Hook\UserRemoveGroupHook, MediaWiki\User\Hook\UserRequiresHTTPSHook, MediaWiki\User\Hook\UserResetAllOptionsHook, MediaWiki\User\Hook\UserRetrieveNewTalksHook, MediaWiki\User\Hook\UserSaveOptionsHook, MediaWiki\User\Hook\UserSaveSettingsHook, MediaWiki\User\Hook\UserSendConfirmationMailHook, MediaWiki\User\Hook\UserSetEmailAuthenticationTimestampHook, MediaWiki\User\Hook\UserSetEmailHook, and MediaWiki\User\Hook\User__mailPasswordInternalHook.

Collaboration diagram for MediaWiki\HookContainer\HookRunner:

Public Member Functions

 __construct (HookContainer $container)
 
 onAbortAutoblock ( $autoblockip, $block)
 Use this hook to cancel an autoblock. More...
 
 onAbortDiffCache ( $diffEngine)
 Use this hook to cancel the caching of a diff. More...
 
 onAbortEmailNotification ( $editor, $title, $rc)
 Use this hook to cancel email notifications for an edit. More...
 
 onAbortTalkPageEmailNotification ( $targetUser, $title)
 Use this hook to disable email notifications of edits to users' talk pages. More...
 
 onActionBeforeFormDisplay ( $name, $form, $article)
 This hook is called before executing the HTMLForm object. More...
 
 onActionModifyFormFields ( $name, &$fields, $article)
 This hook is called before creating an HTMLForm object for a page action. More...
 
 onAddNewAccount ( $user, $byEmail)
 This hook is called after a user account is created. More...
 
 onAfterBuildFeedLinks (&$feedLinks)
 This hook is called in OutputPage.php after all feed links (atom, rss,...) are created. More...
 
 onAfterFinalPageOutput ( $output)
 This hook is called nearly at the end of OutputPage::output() but before OutputPage::sendCacheControl() and final ob_end_flush() which will send the buffered output to the client. More...
 
 onAfterImportPage ( $title, $foreignTitle, $revCount, $sRevCount, $pageInfo)
 This hook is called when a page import is completed. More...
 
 onAfterParserFetchFileAndTitle ( $parser, $ig, &$html)
 This hook is called after an image gallery is formed by Parser, just before adding its HTML to parser output. More...
 
 onAlternateEdit ( $editPage)
 This hook is called before checking if a user can edit a page and before showing the edit form ( EditPage::edit() ). More...
 
 onAlternateEditPreview ( $editPage, &$content, &$previewHTML, &$parserOutput)
 This hook is called before generating the preview of the page when editing ( EditPage::getPreviewText() ). More...
 
 onAlternateUserMailer ( $headers, $to, $from, $subject, $body)
 This hook is called before mail is sent so that mail could be logged (or something else) instead of using PEAR or PHP's mail(). More...
 
 onAncientPagesQuery (&$tables, &$conds, &$joinConds)
 Use this hook to modify the query used by Special:AncientPages. More...
 
 onApiBeforeMain (&$main)
 This hook is called before calling ApiMain's execute() method in api.php. More...
 
 onArticle__MissingArticleConditions (&$conds, $logTypes)
 This hook is called before fetching deletion and move log entries to display a message of a non-existing page being deleted/moved. More...
 
 onArticleConfirmDelete ( $article, $output, &$reason)
 This hook is called before writing the confirmation form for article deletion. More...
 
 onArticleContentOnDiff ( $diffEngine, $output)
 This hook is called before showing the article content below a diff. More...
 
 onArticleDelete ( $wikiPage, $user, &$reason, &$error, &$status, $suppress)
 This hook is called before an article is deleted. More...
 
 onArticleDeleteAfterSuccess ( $title, $outputPage)
 Use this hook to modify the output after an article has been deleted. More...
 
 onArticleDeleteComplete ( $wikiPage, $user, $reason, $id, $content, $logEntry, $archivedRevisionCount)
 This hook is called after an article is deleted. More...
 
 onArticleEditUpdateNewTalk ( $wikiPage, $recipient)
 This hook is called before updating user_newtalk when a user talk page was changed. More...
 
 onArticleEditUpdates ( $wikiPage, $editInfo, $changed)
 This hook is called when edit updates (mainly link tracking) are made when an article has been changed. More...
 
 onArticleEditUpdatesDeleteFromRecentchanges ( $wikiPage)
 This hook is called before deleting old entries from recentchanges table. More...
 
 onArticleFromTitle ( $title, &$article, $context)
 This hook is called when creating an article object from a title object using Wiki::articleFromTitle(). More...
 
 onArticleMergeComplete ( $targetTitle, $destTitle)
 This hook is called after merging to article using Special:Mergehistory. More...
 
 onArticlePageDataAfter ( $wikiPage, &$row)
 This hook is called after loading data of an article from the database. More...
 
 onArticlePageDataBefore ( $wikiPage, &$fields, &$tables, &$joinConds)
 This hook is called before loading data of an article from the database. More...
 
 onArticlePrepareTextForEdit ( $wikiPage, $popts)
 This hook is called when preparing text to be saved. More...
 
 onArticleProtect ( $wikiPage, $user, $protect, $reason)
 This hook is called before an article is protected. More...
 
 onArticleProtectComplete ( $wikiPage, $user, $protect, $reason)
 This hook is called after an article is protected. More...
 
 onArticlePurge ( $wikiPage)
 This hook is called before executing "&action=purge". More...
 
 onArticleRevisionUndeleted ( $title, $revision, $oldPageID)
 This hook is called after an article revision is restored. More...
 
 onArticleRevisionViewCustom ( $revision, $title, $oldid, $output)
 Use this hook for custom rendering of an article's content. More...
 
 onArticleRevisionVisibilitySet ( $title, $ids, $visibilityChangeMap)
 This hook is called when changing visibility of one or more revisions of an article. More...
 
 onArticleRollbackComplete ( $wikiPage, $user, $revision, $current)
 This hook is called after an article rollback is completed. More...
 
 onArticleShowPatrolFooter ( $article)
 This hook is called at the beginning of Article::showPatrolFooter. More...
 
 onArticleUndelete ( $title, $create, $comment, $oldPageId, $restoredPages)
 This hook is called when one or more revisions of an article are restored. More...
 
 onArticleUndeleteLogEntry ( $pageArchive, &$logEntry, $user)
 This hook is called when a log entry is generated but not yet saved. More...
 
 onArticleUpdateBeforeRedirect ( $article, &$sectionanchor, &$extraq)
 This hook is called after a page is updated (usually on save), before the user is redirected back to the page. More...
 
 onArticleViewFooter ( $article, $patrolFooterShown)
 This hook is called after showing the footer section of an ordinary page view. More...
 
 onArticleViewHeader ( $article, &$outputDone, &$pcache)
 Use this hook to control article output. More...
 
 onArticleViewRedirect ( $article)
 This hook is called before setting "Redirected from ..." subtitle when a redirect was followed. More...
 
 onAuthChangeFormFields ( $requests, $fieldInfo, &$formDescriptor, $action)
 This hook is called after converting a field information array obtained from a set of AuthenticationRequest classes into a form descriptor; hooks can tweak the array to change how login etc. More...
 
 onAuthManagerLoginAuthenticateAudit ( $response, $user, $username, $extraData)
 This hook is called when a login attempt either succeeds or fails for a reason other than misconfiguration or session loss. More...
 
 onAutopromoteCondition ( $type, $args, $user, &$result)
 Use this hook to check autopromote condition for user. More...
 
 onBacklinkCacheGetConditions ( $table, $title, &$conds)
 Use this hook to set conditions for query when links to certain title are fetched. More...
 
 onBacklinkCacheGetPrefix ( $table, &$prefix)
 Use this hook to set a prefix for a specific link table. More...
 
 onBadImage ( $name, &$bad)
 This hook is called when checking against the bad image list. More...
 
 onBaseTemplateAfterPortlet ( $template, $portlet, &$html)
 This hook is called after output of portlets, allow injecting custom HTML after the section. More...
 
 onBaseTemplateToolbox ( $sk, &$toolbox)
 This hook is called by BaseTemplate when building the $toolbox array and returning it for the skin to output. More...
 
 onBeforeDisplayNoArticleText ( $article)
 This hook is called before displaying message key "noarticletext" or "noarticletext-nopermission" at Article::showMissingArticle(). More...
 
 onBeforeHttpsRedirect ( $context, &$redirect)
 This hook is called prior to forcing HTTP->HTTPS redirect. More...
 
 onBeforeInitialize ( $title, $unused, $output, $user, $request, $mediaWiki)
 This hook is called before anything is initialized in MediaWiki::performRequest(). More...
 
 onBeforePageDisplay ( $out, $skin)
 This hook is called prior to outputting a page. More...
 
 onBeforePageRedirect ( $out, &$redirect, &$code)
 This hook is called prior to sending an HTTP redirect. More...
 
 onBeforeParserFetchFileAndTitle ( $parser, $nt, &$options, &$descQuery)
 This hook is called before an image is rendered by Parser. More...
 
 onBeforeParserFetchTemplateAndtitle ( $parser, $title, &$skip, &$id)
 This hook is called before a template is fetched by Parser. More...
 
 onBeforeParserrenderImageGallery ( $parser, $ig)
 This hook is called before an image gallery is rendered by Parser. More...
 
 onBeforeResetNotificationTimestamp (&$userObj, &$titleObj, $force, &$oldid)
 This hook is called before the notification timestamp of a watched item is reset. More...
 
 onBeforeRevertedTagUpdate ( $wikiPage, $user, $summary, $flags, $revisionRecord, $editResult, &$approved)
 This hook is called before scheduling a RevertedTagUpdateJob. More...
 
 onBeforeWelcomeCreation (&$welcome_creation_msg, &$injected_html)
 This hook is called before the welcomecreation message is displayed to a newly created user. More...
 
 onBitmapHandlerCheckImageArea ( $image, &$params, &$checkImageAreaHookResult)
 This hook is called by BitmapHandler::normaliseParams, after all normalizations have been performed, except for the $wgMaxImageArea check. More...
 
 onBitmapHandlerTransform ( $handler, $image, &$scalerParams, &$mto)
 This hook is called before a file is transformed, giving extensions the possibility to transform it themselves. More...
 
 onBlockIp ( $block, $user, &$reason)
 This hook is called before an IP address or user is blocked. More...
 
 onBlockIpComplete ( $block, $user, $priorBlock)
 This hook is called after an IP address or user is blocked. More...
 
 onBookInformation ( $isbn, $output)
 This hook is called before information output on Special:Booksources. More...
 
 onCanIPUseHTTPS ( $ip, &$canDo)
 Use this hook to determine whether the client at a given source IP is likely to be able to access the wiki via HTTPS. More...
 
 onCanonicalNamespaces (&$namespaces)
 Use this hook to add namespaces or alter the defaults. More...
 
 onCategoryAfterPageAdded ( $category, $wikiPage)
 This hook is called after a page is added to a category. More...
 
 onCategoryAfterPageRemoved ( $category, $wikiPage, $id)
 This hook is called after a page is removed from a category. More...
 
 onCategoryPageView ( $catpage)
 This hook is called before viewing a categorypage in CategoryPage::view. More...
 
 onCategoryViewer__doCategoryQuery ( $type, $res)
 This hook is called after querying for pages to be displayed in a Category page. More...
 
 onCategoryViewer__generateLink ( $type, $title, $html, &$link)
 This hook is called before generating an output link allow extensions opportunity to generate a more specific or relevant link. More...
 
 onChangeAuthenticationDataAudit ( $req, $status)
 This hook is called when a user changes their password. More...
 
 onChangesListInitRows ( $changesList, $rows)
 Use this hook to batch process change list rows prior to rendering. More...
 
 onChangesListInsertArticleLink ( $changesList, &$articlelink, &$s, $rc, $unpatrolled, $watched)
 Use this hook to override or augment link to article in RC list. More...
 
 onChangesListSpecialPageQuery ( $name, &$tables, &$fields, &$conds, &$query_options, &$join_conds, $opts)
 This hook is called when building an SQL query on pages inheriting from ChangesListSpecialPage (in core: RecentChanges, RecentChangesLinked and Watchlist). More...
 
 onChangesListSpecialPageStructuredFilters ( $special)
 Use this hook to register filters for pages inheriting from ChangesListSpecialPage (in core: RecentChanges,vRecentChangesLinked, and Watchlist). More...
 
 onChangeTagAfterDelete ( $tag, &$status)
 This hook is called after a change tag has been deleted (that is, removed from all revisions and log entries to which it was applied). More...
 
 onChangeTagCanCreate ( $tag, $user, &$status)
 Use this hook to tell whether a change tag should be able to be created from the UI (Special:Tags) or via the API. More...
 
 onChangeTagCanDelete ( $tag, $user, &$status)
 Use this hook to tell whether a change tag should be able to be deleted from the UI (Special:Tags) or via the API. More...
 
 onChangeTagsAfterUpdateTags ( $addedTags, $removedTags, $prevTags, $rc_id, $rev_id, $log_id, $params, $rc, $user)
 This hook is called after tags have been updated with the ChangeTags::updateTags function. More...
 
 onChangeTagsAllowedAdd (&$allowedTags, $addTags, $user)
 This hook is called when checking if a user can add tags to a change. More...
 
 onChangeTagsListActive (&$tags)
 Use this hook to nominate which of the tags your extension uses are in active use. More...
 
 onChangeUserGroups ( $performer, $user, &$add, &$remove)
 This hook is called before user groups are changed. More...
 
 onCollation__factory ( $collationName, &$collationObject)
 This hook is called if $wgCategoryCollation is an unknown collation. More...
 
 onConfirmEmailComplete ( $user)
 This hook is called after a user's email has been confirmed successfully. More...
 
 onContentAlterParserOutput ( $content, $title, $parserOutput)
 Use this hook to modify parser output for a given content object. More...
 
 onContentGetParserOutput ( $content, $title, $revId, $options, $generateHtml, &$output)
 Use this hook to customize parser output for a given content object. More...
 
 onContentHandlerDefaultModelFor ( $title, &$model)
 This hook is called when the default content model is determined for a given title. More...
 
 onContentHandlerForModelID ( $modeName, &$handler)
 This hook is called when a ContentHandler is requested for a given content model name, but no entry for that model exists in $wgContentHandlers. More...
 
 onContentModelCanBeUsedOn ( $contentModel, $title, &$ok)
 Use this hook to determine whether a content model can be used on a given page. More...
 
 onContentSecurityPolicyDefaultSource (&$defaultSrc, $policyConfig, $mode)
 Use this hook to modify the allowed CSP load sources. More...
 
 onContentSecurityPolicyDirectives (&$directives, $policyConfig, $mode)
 If ContentSecurityPolicyDefaultSource and ContentSecurityPolicyScriptSource do not meet your needs, use this hook to modify the content security policy directives. More...
 
 onContentSecurityPolicyScriptSource (&$scriptSrc, $policyConfig, $mode)
 Use this hook to modify the allowed CSP script sources. More...
 
 onContribsPager__getQueryInfo ( $pager, &$queryInfo)
 This hook is called before the contributions query is about to run. More...
 
 onContribsPager__reallyDoQuery (&$data, $pager, $offset, $limit, $descending)
 This hook is called before really executing the query for My Contributions. More...
 
 onContributionsLineEnding ( $page, &$ret, $row, &$classes, &$attribs)
 This hook is called before a contributions HTML line is finished. More...
 
 onContributionsToolLinks ( $id, Title $title, array &$tools, SpecialPage $specialPage)
 Use this hook to change the tool links above Special:Contributions. More...
 
 onConvertContent ( $content, $toModel, $lossy, &$result)
 This hook is called by AbstractContent::convert when a conversion to another content model is requested. More...
 
 onCustomEditor ( $article, $user)
 This hook is called when invoking the page editor. More...
 
 onDeletedContribsPager__reallyDoQuery (&$data, $pager, $offset, $limit, $descending)
 This hook is called before really executing the query for Special:DeletedContributions. More...
 
 onDeletedContributionsLineEnding ( $page, &$ret, $row, &$classes, &$attribs)
 This hook is called before a DeletedContributions HTML line is finished. More...
 
 onDeleteUnknownPreferences (&$where, $db)
 This hook is called by the cleanupPreferences.php maintenance script to build a WHERE clause with which to delete preferences that are not known about. More...
 
 onDifferenceEngineAfterLoadNewText ( $differenceEngine)
 This hook is called in DifferenceEngine::loadNewText() after the new revision's content has been loaded into the class member variable $differenceEngine->mNewContent but before returning true from this function. More...
 
 onDifferenceEngineLoadTextAfterNewContentIsLoaded ( $differenceEngine)
 This hook is called in DifferenceEngine::loadText() after the new revision's content has been loaded into the class member variable $differenceEngine->mNewContent but before checking if the variable's value is null. More...
 
 onDifferenceEngineMarkPatrolledLink ( $differenceEngine, &$markAsPatrolledLink, $rcid)
 Use this hook to change the "mark as patrolled" link which is shown both on the diff header as well as on the bottom of a page, usually wrapped in a span element which has class="patrollink". More...
 
 onDifferenceEngineMarkPatrolledRCID (&$rcid, $differenceEngine, $change, $user)
 Use this hook to possibly change the rcid parameter. More...
 
 onDifferenceEngineNewHeader ( $differenceEngine, &$newHeader, $formattedRevisionTools, $nextlink, $rollback, $newminor, $diffOnly, $rdel, $unhide)
 Use this hook to change the $newHeader variable, which contains information about the new revision, such as the revision's author, whether the revision was marked as a minor edit or not, etc. More...
 
 onDifferenceEngineOldHeader ( $differenceEngine, &$oldHeader, $prevlink, $oldminor, $diffOnly, $ldel, $unhide)
 Use this hook to change the $oldHeader variable, which contains information about the old revision, such as the revision's author, whether the revision was marked as a minor edit or not, etc. More...
 
 onDifferenceEngineOldHeaderNoOldRev (&$oldHeader)
 Use this hook to change the $oldHeader variable in cases when there is no old revision. More...
 
 onDifferenceEngineRenderRevisionAddParserOutput ( $differenceEngine, $out, $parserOutput, $wikiPage)
 Use this hook to change the parser output. More...
 
 onDifferenceEngineRenderRevisionShowFinalPatrolLink ()
 Use this hook to not show the final "mark as patrolled" link on the bottom of a page. More...
 
 onDifferenceEngineShowDiff ( $differenceEngine)
 Use this hook to affect the diff text which eventually gets sent to the OutputPage object. More...
 
 onDifferenceEngineShowDiffPage ( $out)
 Use this hook to add additional output via the available OutputPage object into the diff view. More...
 
 onDifferenceEngineShowDiffPageMaybeShowMissingRevision ( $differenceEngine)
 This hook is called in DifferenceEngine::showDiffPage() when revision data cannot be loaded. More...
 
 onDifferenceEngineShowEmptyOldContent ( $differenceEngine)
 Use this hook to change the diff table body (without header) in cases when there is no old revision or the old and new revisions are identical. More...
 
 onDifferenceEngineViewHeader ( $differenceEngine)
 This hook is called before diff display. More...
 
 onDiffRevisionTools ( $newRev, &$links, $oldRev, $user)
 Use this hook to override or extend the revision tools available from the diff view, i.e. More...
 
 onDiffTools ( $newRevRecord, &$links, $oldRevRecord, $userIdentity)
 Use this hook to override or extend the revision tools available from the diff view, i.e. More...
 
 onDiffViewHeader ( $diff, $oldRev, $newRev)
 This hook is called before diff display. More...
 
 onDisplayOldSubtitle ( $article, &$oldid)
 This hook is called before creating subtitle when browsing old versions of an article. More...
 
 onEditFilter ( $editor, $text, $section, &$error, $summary)
 Use this hook to perform checks on an edit. More...
 
 onEditFilterMergedContent ( $context, $content, $status, $summary, $user, $minoredit)
 Use this hook for a post-section-merge edit filter. More...
 
 onEditFormInitialText ( $editPage)
 Use this hook to modify the edit form when editing existing pages. More...
 
 onEditFormPreloadText (&$text, $title)
 Use this hook to populate the edit form when creating pages. More...
 
 onEditPage__attemptSave ( $editpage_Obj)
 This hook is called before an article is saved, before WikiPage::doEditContent() is called. More...
 
 onEditPage__attemptSave_after ( $editpage_Obj, $status, $resultDetails)
 This hook is called after an article save attempt. More...
 
 onEditPage__importFormData ( $editpage, $request)
 Use this hook to read additional data posted in the form. More...
 
 onEditPage__showEditForm_fields ( $editor, $out)
 Use this hook to inject form field into edit form. More...
 
 onEditPage__showEditForm_initial ( $editor, $out)
 This hook is called before showing the edit form. More...
 
 onEditPage__showReadOnlyForm_initial ( $editor, $out)
 This hook is similar to EditPage::showEditForm:initial but for the read-only 'view source' variant of the edit form. More...
 
 onEditPage__showStandardInputs_options ( $editor, $out, &$tabindex)
 Use this hook to inject form fields into the editOptions area. More...
 
 onEditPageBeforeConflictDiff ( $editor, $out)
 Use this hook to modify the EditPage object and output when there's an edit conflict. More...
 
 onEditPageBeforeEditButtons ( $editpage, &$buttons, &$tabindex)
 Use this hook to modify the edit buttons below the textarea in the edit form. More...
 
 onEditPageBeforeEditToolbar (&$toolbar)
 Use this hook to add an edit toolbar above the textarea in the edit form. More...
 
 onEditPageCopyrightWarning ( $title, &$msg)
 Use this hook for site and per-namespace customization of contribution/copyright notice. More...
 
 onEditPageGetCheckboxesDefinition ( $editpage, &$checkboxes)
 Use this hook to modify the edit checkboxes and other form fields below the textarea in the edit form. More...
 
 onEditPageGetDiffContent ( $editPage, &$newtext)
 Use this hook to modify the wikitext that will be used in "Show changes". More...
 
 onEditPageGetPreviewContent ( $editPage, &$content)
 Use this hook to modify the wikitext that will be previewed. More...
 
 onEditPageNoSuchSection ( $editpage, &$res)
 This hook is called when a section edit request is given for an non-existent section. More...
 
 onEditPageTosSummary ( $title, &$msg)
 Use this hook for site and per-namespace customizations of terms of service summary link that might exist separately from the copyright notice. More...
 
 onEmailConfirmed ( $user, &$confirmed)
 This hook is called when checking that the user's email address is "confirmed". More...
 
 onEmailUser (&$to, &$from, &$subject, &$text, &$error)
 This hook is called before sending email from one user to another. More...
 
 onEmailUserCC (&$to, &$from, &$subject, &$text)
 This hook is called before sending the copy of the email to the author. More...
 
 onEmailUserComplete ( $to, $from, $subject, $text)
 This hook is called after sending email from one user to another. More...
 
 onEmailUserForm (&$form)
 This hook is called after building the email user form object. More...
 
 onEmailUserPermissionsErrors ( $user, $editToken, &$hookErr)
 Use this hook to retrieve permissions errors for emailing a user. More...
 
 onEnhancedChangesList__getLogText ( $changesList, &$links, $block)
 Use this hook to alter, remove, or add to the links of a group of changes in EnhancedChangesList. More...
 
 onEnhancedChangesListModifyBlockLineData ( $changesList, &$data, $rc)
 Use this hook to alter data used to build a non-grouped recent change line in EnhancedChangesList. More...
 
 onEnhancedChangesListModifyLineData ( $changesList, &$data, $block, $rc, &$classes, &$attribs)
 Use this hook to alter data used to build a grouped recent change inner line in EnhancedChangesList. More...
 
 onExemptFromAccountCreationThrottle ( $ip)
 Use this hook to add an exemption from the account creation throttle. More...
 
 onExtensionTypes (&$extTypes)
 This hook is called when generating the extensions credits. More...
 
 onFetchChangesList ( $user, $skin, &$list, $groups)
 This hook is called when fetching the ChangesList derivative for a particular user. More...
 
 onFileDeleteComplete ( $file, $oldimage, $article, $user, $reason)
 This hook is called when a file is deleted. More...
 
 onFileTransformed ( $file, $thumb, $tmpThumbPath, $thumbPath)
 This hook is called when a file is transformed and moved into storage. More...
 
 onFileUndeleteComplete ( $title, $fileVersions, $user, $reason)
 This hook is called when a file is undeleted. More...
 
 onFileUpload ( $file, $reupload, $hasDescription)
 This hook is called when a file upload occurs. More...
 
 onFormatAutocomments (&$comment, $pre, $auto, $post, $title, $local, $wikiId)
 This hook is called when an autocomment is formatted by the Linker. More...
 
 onGalleryGetModes (&$modeArray)
 Use this hook to get a list of classes that can render different modes of a gallery. More...
 
 onGetAutoPromoteGroups ( $user, &$promote)
 This hook is called when determining which autopromote groups a user is entitled to be in. More...
 
 onGetCacheVaryCookies ( $out, &$cookies)
 Use this hook to get cookies that should vary cache options. More...
 
 onGetCanonicalURL ( $title, &$url, $query)
 Use this hook to modify fully-qualified URLs used for IRC and email notifications. More...
 
 onGetContentModels (&$models)
 Use this hook to add content models to the list of available models. More...
 
 onGetDefaultSortkey ( $title, &$sortkey)
 Use this hook to override the default sortkey for a page. More...
 
 onGetDifferenceEngine ( $context, $old, $new, $refreshCache, $unhide, &$differenceEngine)
 This hook is called when getting a new difference engine interface object. More...
 
 onGetDoubleUnderscoreIDs (&$doubleUnderscoreIDs)
 Use this hook to modify the list of behavior switches (double underscore variables in wikitext). More...
 
 onGetExtendedMetadata (&$combinedMeta, $file, $context, $single, &$maxCacheTime)
 Use this hook to get extended file metadata for the API. More...
 
 onGetFullURL ( $title, &$url, $query)
 Use this hook to modify fully-qualified URLs used in redirects/export/offsite data. More...
 
 onGetHumanTimestamp (&$output, $timestamp, $relativeTo, $user, $lang)
 Use this hook to preemptively override the human-readable timestamp generated by MWTimestamp::getHumanTimestamp(). More...
 
 onGetInternalURL ( $title, &$url, $query)
 Use this hook to modify fully-qualified URLs used for squid cache purging. More...
 
 onGetIP (&$ip)
 Use this hook to modify the IP of the current user (called only once). More...
 
 onGetLangPreferredVariant (&$req)
 This hook is called in LanguageConverter::getPreferredVariant() to allow fetching the language variant code from cookies or other such alternative storage. More...
 
 onGetLinkColours ( $linkcolour_ids, &$colours, $title)
 Use this hook to modify the CSS class of an array of page links. More...
 
 onGetLocalURL ( $title, &$url, $query)
 Use this hook to modify local URLs as output into page links. More...
 
 onGetLocalURL__Article ( $title, &$url)
 Use this hook to modify local URLs specifically pointing to article paths without any fancy queries or variants. More...
 
 onGetLocalURL__Internal ( $title, &$url, $query)
 Use this hook to modify local URLs to internal pages. More...
 
 onGetLogTypesOnUser (&$types)
 Use this hook to add log types where the target is a user page. More...
 
 onGetMagicVariableIDs (&$variableIDs)
 Use this hook to modify the list of magic variables. More...
 
 onGetMetadataVersion (&$version)
 Use this hook to modify the image metadata version currently in use. More...
 
 onGetNewMessagesAlert (&$newMessagesAlert, $newtalks, $user, $out)
 Use this hook to disable or modify the new messages alert. More...
 
 onGetPreferences ( $user, &$preferences)
 Use this hook to modify user preferences. More...
 
 onGetRelativeTimestamp (&$output, &$diff, $timestamp, $relativeTo, $user, $lang)
 Use this hook to pre-emptively override the relative timestamp generated by MWTimestamp::getRelativeTimestamp(). More...
 
 onGetSlotDiffRenderer ( $contentHandler, &$slotDiffRenderer, $context)
 Use this hook to replace or wrap the standard SlotDiffRenderer for some content type. More...
 
 onGetUserBlock ( $user, $ip, &$block)
 Use this hook to modify the block found by the block manager. More...
 
 onGetUserPermissionsErrors ( $title, $user, $action, &$result)
 Use this hook to add a permissions error when permissions errors are checked for. More...
 
 onGetUserPermissionsErrorsExpensive ( $title, $user, $action, &$result)
 This hook is equal to getUserPermissionsErrors, but it is called only if expensive checks are enabled. More...
 
 onGitViewers (&$extTypes)
 This hook is called when generating the list of git viewers for Special:Version, allowing you to modify the list. More...
 
 onHistoryPageToolLinks (IContextSource $context, LinkRenderer $linkRenderer, array &$links)
 Use this hook to add one or more links to revision history page subtitle. More...
 
 onHistoryRevisionTools ( $rev, &$links, $prevRev, $user)
 Use this hook to override or extend the revision tools available from the page history view, i.e. More...
 
 onHistoryTools ( $revRecord, &$links, $prevRevRecord, $userIdentity)
 Use this hook to override or extend the revision tools available from the page history view, i.e. More...
 
 onHtmlCacheUpdaterAppendUrls ( $title, $mode, &$append)
 This hook is used to declare extra URLs to purge from HTTP caches. More...
 
 onHtmlCacheUpdaterVaryUrls ( $urls, &$append)
 This hook is used to add variants of URLs to purge from HTTP caches. More...
 
 onHTMLFileCache__useFileCache ( $context)
 Use this hook to override whether a page should be cached in file cache. More...
 
 onHtmlPageLinkRendererBegin ( $linkRenderer, $target, &$text, &$customAttribs, &$query, &$ret)
 This hook is called when generating internal and interwiki links in LinkRenderer, before processing starts. More...
 
 onHtmlPageLinkRendererEnd ( $linkRenderer, $target, $isKnown, &$text, &$attribs, &$ret)
 This hook is called when generating internal and interwiki links in LinkRenderer, just before the function returns a value. More...
 
 onImageBeforeProduceHTML ( $linker, &$title, &$file, &$frameParams, &$handlerParams, &$time, &$res, $parser, &$query, &$widthOption)
 This hook is called before producing the HTML created by a wiki image insertion. More...
 
 onImageOpenShowImageInlineBefore ( $imagePage, $output)
 This hook is called just before showing the image on an image page. More...
 
 onImagePageAfterImageLinks ( $imagePage, &$html)
 This hook is called after the image links section on an image page is built. More...
 
 onImagePageFileHistoryLine ( $imageHistoryList, $file, &$line, &$css)
 This hook is called when a file history line is constructed. More...
 
 onImagePageFindFile ( $page, &$file, &$displayFile)
 This hook is called when fetching the file associated with an image page. More...
 
 onImagePageShowTOC ( $page, &$toc)
 This hook is called when the file toc on an image page is generated. More...
 
 onImgAuthBeforeStream (&$title, &$path, &$name, &$result)
 This hook is called before a file is streamed to a user, but only when using img_auth.php. More...
 
 onImgAuthModifyHeaders ( $title, &$headers)
 This hook is called just before a file is streamed to a user via img_auth.php, allowing headers to be modified beforehand. More...
 
 onImportHandleContentXMLTag ( $reader, $contentInfo)
 This hook is called when parsing a content XML tag. More...
 
 onImportHandleLogItemXMLTag ( $reader, $logInfo)
 This hook is called when parsing an XML tag in a log item. More...
 
 onImportHandlePageXMLTag ( $reader, &$pageInfo)
 This hook is called when parsing an XML tag in a page. More...
 
 onImportHandleRevisionXMLTag ( $reader, $pageInfo, $revisionInfo)
 This hook is called when parsing an XML tag in a page revision. More...
 
 onImportHandleToplevelXMLTag ( $reader)
 This hook is called when parsing a top level XML tag. More...
 
 onImportHandleUnknownUser ( $name)
 When a user doesn't exist locally, use this hook to auto-create it. More...
 
 onImportHandleUploadXMLTag ( $reader, $revisionInfo)
 This hook is called when parsing an XML tag in a file upload. More...
 
 onImportLogInterwikiLink (&$fullInterwikiPrefix, &$pageTitle)
 Use this hook to change interwiki links in log entries and edit summaries for transwiki imports. More...
 
 onImportSources (&$importSources)
 This hook is called when reading from the $wgImportSources configuration variable. More...
 
 onInfoAction ( $context, &$pageInfo)
 This hook is called when building information to display on the action=info page. More...
 
 onInitializeArticleMaybeRedirect ( $title, $request, &$ignoreRedirect, &$target, &$article)
 Use this hook to check whether a title is a redirect. More...
 
 onInternalParseBeforeLinks ( $parser, &$text, $stripState)
 This hook is called during Parser's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processing. More...
 
 onInternalParseBeforeSanitize ( $parser, &$text, $stripState)
 This hook is called during Parser's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/ includeonly/onlyinclude and other processing. More...
 
 onInterwikiLoadPrefix ( $prefix, &$iwData)
 This hook is called when resolving whether a given prefix is an interwiki or not. More...
 
 onInvalidateEmailComplete ( $user)
 This hook is called after a user's email has been invalidated successfully. More...
 
 onIRCLineURL (&$url, &$query, $rc)
 This hook is called when constructing the URL to use in an IRC notification. More...
 
 onIsFileCacheable ( $article)
 Use this hook to override the result of Article::isFileCacheable(). More...
 
 onIsTrustedProxy ( $ip, &$result)
 Use this hook to override the result of ProxyLookup::isTrustedProxy(). More...
 
 onIsUploadAllowedFromUrl ( $url, &$allowed)
 Use this hook to override the result of UploadFromUrl::isAllowedUrl(). More...
 
 onIsValidEmailAddr ( $addr, &$result)
 Use this hook to override the result of Sanitizer::validateEmail(), for instance to return false if the domain name doesn't match your organization. More...
 
 onIsValidPassword ( $password, &$result, $user)
 Use this hook to override the result of User::isValidPassword() More...
 
 onLanguage__getMessagesFileName ( $code, &$file)
 Use this hook to change the path of a localisation file. More...
 
 onLanguageGetNamespaces (&$namespaces)
 Use this hook to provide custom ordering for namespaces or remove namespaces. More...
 
 onLanguageGetTranslatedLanguageNames (&$names, $code)
 Use this hook to provide translated language names. More...
 
 onLanguageLinks ( $title, &$links, &$linkFlags)
 Use this hook to manipulate a page's language links. More...
 
 onLanguageSelector ( $out, $cssClassName)
 Use this hook to change the language selector available on a page. More...
 
 onLinkerMakeExternalImage (&$url, &$alt, &$img)
 This hook is called at the end of Linker::makeExternalImage() just before the return. More...
 
 onLinkerMakeExternalLink (&$url, &$text, &$link, &$attribs, $linkType)
 This hook is called at the end of Linker::makeExternalLink() just before the return. More...
 
 onLinkerMakeMediaLinkFile ( $title, $file, &$html, &$attribs, &$ret)
 This hook is called at the end of Linker::makeMediaLinkFile() just before the return. More...
 
 onLinksUpdate ( $linksUpdate)
 This hook is called at the beginning of LinksUpdate::doUpdate() just before the actual update. More...
 
 onLinksUpdateAfterInsert ( $linksUpdate, $table, $insertions)
 This hook is called at the end of LinksUpdate::incrTableUpdate() after each link table insert. More...
 
 onLinksUpdateComplete ( $linksUpdate, $ticket)
 This hook is called at the end of LinksUpdate::doUpdate() when updating, including delete and insert, has completed for all link tables. More...
 
 onLinksUpdateConstructed ( $linksUpdate)
 This hook is called at the end of LinksUpdate() is construction. More...
 
 onListDefinedTags (&$tags)
 This hook is called when trying to find all defined tags. More...
 
 onLoadExtensionSchemaUpdates ( $updater)
 This hook is called during database installation and updates. More...
 
 onLocalFile__getHistory ( $file, &$tables, &$fields, &$conds, &$opts, &$join_conds)
 This hook is called before a file history query is performed. More...
 
 onLocalFilePurgeThumbnails ( $file, $archiveName)
 This hook is called before thumbnails for a local file are purged. More...
 
 onLocalisationCacheRecache ( $cache, $code, &$alldata, $unused)
 Called when loading the localisation data into cache. More...
 
 onLocalisationCacheRecacheFallback ( $cache, $code, &$alldata)
 Called for each language when merging fallback data into the cache. More...
 
 onLocalUserCreated ( $user, $autocreated)
 This hook is called when a local user has been created. More...
 
 onLogEventsListGetExtraInputs ( $type, $logEventsList, &$input, &$formDescriptor)
 This hook is called when getting extra inputs to display on Special:Log for a specific log type. More...
 
 onLogEventsListLineEnding ( $page, &$ret, $entry, &$classes, &$attribs)
 This hook is called before a Special:Log line is finished. More...
 
 onLogEventsListShowLogExtract (&$s, $types, $page, $user, $param)
 This hook is called before the string is added to OutputPage. More...
 
 onLogException ( $e, $suppressed)
 This hook is called before an exception (or PHP error) is logged. More...
 
 onLoginFormValidErrorMessages (array &$messages)
 This hook is called in LoginForm when a function gets valid error messages. More...
 
 onLogLine ( $log_type, $log_action, $title, $paramArray, &$comment, &$revert, $time)
 Use this hook to process a single log entry on Special:Log. More...
 
 onLonelyPagesQuery (&$tables, &$conds, &$joinConds)
 Use this hook to modify the query used by Special:LonelyPages. More...
 
 onMagicWordwgVariableIDs (&$variableIDs)
 This hook is called when defining new magic words IDs. More...
 
 onMaintenanceRefreshLinksInit ( $refreshLinks)
 This hook is called before executing the refreshLinks.php maintenance script. More...
 
 onMaintenanceUpdateAddParams (&$params)
 Use this hook to add params to the update.php maintenance script. More...
 
 onMakeGlobalVariablesScript (&$vars, $out)
 This hook is called at end of OutputPage::getJSVars. More...
 
 onManualLogEntryBeforePublish ( $logEntry)
 Use this hook to access or modify log entry just before it is published. More...
 
 onMarkPatrolled ( $rcid, $user, $wcOnlySysopsCanPatrol, $auto, &$tags)
 This hook is called before an edit is marked patrolled. More...
 
 onMarkPatrolledComplete ( $rcid, $user, $wcOnlySysopsCanPatrol, $auto)
 This hook is called after an edit is marked patrolled. More...
 
 onMediaWikiPerformAction ( $output, $article, $title, $user, $request, $mediaWiki)
 Use this hook to override MediaWiki::performAction(). More...
 
 onMediaWikiPHPUnitTest__endTest ( $test, $time)
 This hook is called after each PHPUnit test completes. More...
 
 onMediaWikiPHPUnitTest__startTest ( $test)
 This hook is called before each PHPUnit test starts. More...
 
 onMediaWikiServices ( $services)
 This hook is called when a global MediaWikiServices instance is initialized. More...
 
 onMessageCache__get (&$key)
 This hook is called when fetching a message. More...
 
 onMessageCacheReplace ( $title, $text)
 This hook is called when a message page is changed. More...
 
 onMessagesPreLoad ( $title, &$message, $code)
 This hook is called when loading a message from the database. More...
 
 onMimeMagicGuessFromContent ( $mimeMagic, &$head, &$tail, $file, &$mime)
 Use this hook to guess the MIME by content. More...
 
 onMimeMagicImproveFromExtension ( $mimeMagic, $ext, &$mime)
 Use this hook to further improve the MIME type detected by considering the file extension. More...
 
 onMimeMagicInit ( $mimeMagic)
 This hook is called before processing the list mapping MIME types to media types and the list mapping MIME types to file extensions. More...
 
 onModifyExportQuery ( $db, &$tables, $cond, &$opts, &$join_conds, &$conds)
 Use this hook to modify the query used by the exporter. More...
 
 onMovePageCheckPermissions ( $oldTitle, $newTitle, $user, $reason, $status)
 Use this hook to specify whether the user is allowed to move the page. More...
 
 onMovePageIsValidMove ( $oldTitle, $newTitle, $status)
 Use this hook to specify whether a page can be moved for technical reasons. More...
 
 onMultiContentSave ( $renderedRevision, $user, $summary, $flags, $status)
 This hook is called before an article is saved. More...
 
 onNamespaceIsMovable ( $index, &$result)
 This hook is called when determining if it is possible to move pages in a namespace. More...
 
 onNewDifferenceEngine ( $title, &$oldId, &$newId, $old, $new)
 This hook is called when a new DifferenceEngine object is made. More...
 
 onNewPagesLineEnding ( $page, &$ret, $row, &$classes, &$attribs)
 This hook is called before a NewPages line is finished. More...
 
 onNewRevisionFromEditComplete ( $wikiPage, $rev, $originalRevId, $user, &$tags)
 This hook is called when a revision was inserted due to an edit, file upload, import or page move. More...
 
 onOldChangesListRecentChangesLine ( $changeslist, &$s, $rc, &$classes, &$attribs)
 Use this hook to customize a recent changes line. More...
 
 onOpenSearchUrls (&$urls)
 This hook is called when constructing the OpenSearch description XML. More...
 
 onOpportunisticLinksUpdate ( $page, $title, $parserOutput)
 This hook is called by WikiPage::triggerOpportunisticLinksUpdate when a page view triggers a re-rendering of the page. More...
 
 onOtherAutoblockLogLink (&$otherBlockLink)
 Use this hook to add list items to a list of "other autoblocks" which appears at the end of Special:AutoblockList. More...
 
 onOtherBlockLogLink (&$otherBlockLink, $ip)
 Use this hook to add list items to a list of "other blocks" when viewing Special:BlockList. More...
 
 onOutputPageAfterGetHeadLinksArray (&$tags, $out)
 This hook is called in OutputPage::getHeadLinksArray right before returning the result. More...
 
 onOutputPageBeforeHTML ( $out, &$text)
 This hook is called when a page has been processed by the parser and the resulting HTML is about to be displayed. More...
 
 onOutputPageBodyAttributes ( $out, $sk, &$bodyAttrs)
 This hook is called when OutputPage::headElement is creating the body tag to allow for extensions to add attributes to the body of the page they might need. More...
 
 onOutputPageCheckLastModified (&$modifiedTimes, $out)
 This hook is called when checking if the page has been modified since the last visit. More...
 
 onOutputPageMakeCategoryLinks ( $out, $categories, &$links)
 This hook is called when links are about to be generated for the page's categories. More...
 
 onOutputPageParserOutput ( $out, $parserOutput)
 This hook is called after adding a parserOutput to $wgOut. More...
 
 onPageContentInsertComplete ( $wikiPage, $user, $content, $summary, $isMinor, $isWatch, $section, $flags, $revision)
 This hook is called after a new article is created. More...
 
 onPageContentLanguage ( $title, &$pageLang, $userLang)
 Use this hook to change the language in which the content of a page is written. More...
 
 onPageContentSave ( $wikiPage, $user, $content, &$summary, $isminor, $iswatch, $section, $flags, $status)
 This hook is called before an article is saved. More...
 
 onPageContentSaveComplete ( $wikiPage, $user, $content, $summary, $isMinor, $isWatch, $section, $flags, $revision, $status, $originalRevId, $undidRevId)
 This hook is called after an article has been updated. More...
 
 onPageDeletionDataUpdates ( $title, $revision, &$updates)
 This hook is called when constructing a list of DeferrableUpdate to be executed when a page is deleted. More...
 
 onPageHistoryBeforeList ( $article, $context)
 This hook is called when a history page list is about to be constructed. More...
 
 onPageHistoryLineEnding ( $historyAction, &$row, &$s, &$classes, &$attribs)
 This hook is called right before the <li> is generated for a history line. More...
 
 onPageHistoryPager__doBatchLookups ( $pager, $result)
 This hook is called after the pager query was run, before any output is generated, to allow batch lookups for prefetching information needed for display. More...
 
 onPageHistoryPager__getQueryInfo ( $pager, &$queryInfo)
 This hook is called when a history pager query parameter set is constructed. More...
 
 onPageMoveComplete ( $old, $new, $user, $pageid, $redirid, $reason, $revision)
 This hook is called after moving an article (title), post-commit. More...
 
 onPageMoveCompleting ( $old, $new, $user, $pageid, $redirid, $reason, $revision)
 This hook is called after moving an article (title), pre-commit. More...
 
 onPageRenderingHash (&$confstr, $user, &$forOptions)
 NOTE: Consider using ParserOptionsRegister instead. More...
 
 onPageSaveComplete ( $wikiPage, $user, $summary, $flags, $revisionRecord, $editResult)
 This hook is called after an article has been updated. More...
 
 onPageViewUpdates ( $wikipage, $user)
 Use this hook to make database (or other) changes after a page view is seen by MediaWiki. More...
 
 onParserAfterParse ( $parser, &$text, $stripState)
 This hook is called from Parser::parse() just after the call to Parser::internalParse() returns. More...
 
 onParserAfterTidy ( $parser, &$text)
 This hook is called after Parser::tidy() in Parser::parse(). More...
 
 onParserBeforeInternalParse ( $parser, &$text, $stripState)
 This hook is called at the beginning of Parser::internalParse(). More...
 
 onParserBeforePreprocess ( $parser, &$text, $stripState)
 Called at the beginning of Parser::preprocess() More...
 
 onParserCacheSaveComplete ( $parserCache, $parserOutput, $title, $popts, $revId)
 This hook is called after a ParserOutput has been committed to the parser cache. More...
 
 onParserClearState ( $parser)
 This hook is called at the end of Parser::clearState(). More...
 
 onParserCloned ( $parser)
 This hook is called when the parser is cloned. More...
 
 onParserFetchTemplate ( $parser, $title, $rev, &$text, &$deps)
 This hook is called when the parser fetches a template. More...
 
 onParserFirstCallInit ( $parser)
 This hook is called when the parser initialises for the first time. More...
 
 onParserGetVariableValueSwitch ( $parser, &$variableCache, $magicWordId, &$ret, $frame)
 This hook is called when the parser needs the value of a custom magic word. More...
 
 onParserGetVariableValueTs ( $parser, &$time)
 Use this hook to change the value of the time for the {{LOCAL...}} magic word. More...
 
 onParserGetVariableValueVarCache ( $parser, &$varCache)
 Use this hook to change the value of the variable cache or return false to not use it. More...
 
 onParserLimitReportFormat ( $key, &$value, &$report, $isHTML, $localize)
 This hook is called for each row in the parser limit report that needs formatting. More...
 
 onParserLimitReportPrepare ( $parser, $output)
 This hook is called at the end of Parser:parse() when the parser will include comments about size of the text parsed. More...
 
 onParserMakeImageParams ( $title, $file, &$params, $parser)
 This hook is called before the parser generates an image link, use this to modify the parameters of the image. More...
 
 onParserOptionsRegister (&$defaults, &$inCacheKey, &$lazyLoad)
 Use this hook to register additional parser options. More...
 
 onParserOutputPostCacheTransform ( $parserOutput, &$text, &$options)
 This hook is called from ParserOutput::getText() to do post-cache transforms. More...
 
 onParserOutputStashForEdit ( $page, $content, $output, $summary, $user)
 This hook is called when an edit stash parse finishes, before the output is cached. More...
 
 onParserPreSaveTransformComplete ( $parser, &$text)
 This hook is called from Parser::preSaveTransform() after processing is complete, giving the extension a chance to further modify the wikitext. More...
 
 onParserSectionCreate ( $parser, $section, &$sectionContent, $showEditLinks)
 This hook is called each time the parser creates a document section from wikitext. More...
 
 onParserTestGlobals (&$globals)
 Use this hook to define globals for parser tests. More...
 
 onParserTestTables (&$tables)
 Use this hook to alter the list of tables to duplicate when parser tests are run. More...
 
 onPasswordPoliciesForUser ( $user, &$effectivePolicy)
 Use this hook to alter the effective password policy for a user. More...
 
 onPerformRetroactiveAutoblock ( $block, &$blockIds)
 This hook is called before a retroactive autoblock is applied to a user. More...
 
 onPersonalUrls (&$personal_urls, &$title, $skin)
 Use this hook to alter the user-specific navigation links (e.g. More...
 
 onPingLimiter ( $user, $action, &$result, $incrBy)
 Use this hook to override the results of User::pingLimiter(). More...
 
 onPlaceNewSection ( $content, $oldtext, $subject, &$text)
 Use this hook to override placement of new sections. More...
 
 onPostLoginRedirect (&$returnTo, &$returnToQuery, &$type)
 Use this hook to modify the post login redirect behavior. More...
 
 onPreferencesFormPreSave ( $formData, $form, $user, &$result, $oldUserOptions)
 Use this hook to override preferences being saved. More...
 
 onPreferencesGetLegend ( $form, $key, &$legend)
 Use the hook to override the text used for the <legend> of a preferences section. More...
 
 onPrefixSearchBackend ( $ns, $search, $limit, &$results, $offset)
 Use this hook to override the title prefix search used for OpenSearch and AJAX search suggestions. More...
 
 onPrefixSearchExtractNamespace (&$namespaces, &$search)
 This hook is called if core was not able to extract a namespace from the search string so that extensions can attempt it. More...
 
 onPrefsEmailAudit ( $user, $oldaddr, $newaddr)
 This hook is called when user changes their email address. More...
 
 onProtectionForm__buildForm ( $article, &$output)
 This hook is called after all protection type fieldsets are made in the form. More...
 
 onProtectionForm__save ( $article, &$errorMsg, $reasonstr)
 This hook is called when a protection form is submitted. More...
 
 onProtectionForm__showLogExtract ( $article, $out)
 This hook is called after the protection log extract is shown. More...
 
 onRandomPageQuery (&$tables, &$conds, &$joinConds)
 Use this hook to modify the query used by Special:Random to select random pages. More...
 
 onRawPageViewBeforeOutput ( $obj, &$text)
 This hook is called right before the text is blown out in action=raw. More...
 
 onRecentChange_save ( $recentChange)
 This hook is called at the end of RecentChange::save(). More...
 
 onRecentChangesPurgeRows ( $rows)
 This hook is called when old recentchanges rows are purged, after deleting those rows but within the same transaction. More...
 
 onRedirectSpecialArticleRedirectParams (&$redirectParams)
 Use this hook to alter the set of parameter names such as "oldid" that are preserved when using redirecting special pages such as Special:MyPage and Special:MyTalk. More...
 
 onRejectParserCacheValue ( $parserOutput, $wikiPage, $parserOptions)
 Use this hook to reject an otherwise usable cached value from the Parser cache. More...
 
 onRequestContextCreateSkin ( $context, &$skin)
 This hook is called when RequestContext::getSkin creates a skin instance. More...
 
 onResetPasswordExpiration ( $user, &$newExpire)
 Use this hook to allow extensions to set a default password expiration. More...
 
 onResourceLoaderGetConfigVars (array &$vars, $skin, Config $config)
 Export static site-wide mw.config variables to JavaScript. More...
 
 onResourceLoaderJqueryMsgModuleMagicWords (ResourceLoaderContext $context, array &$magicWords)
 Add magic words to the mediawiki.jqueryMsg module. More...
 
 onRevisionDataUpdates ( $title, $renderedRevision, &$updates)
 This hook is called when constructing a list of DeferrableUpdate to be executed to record secondary data about a revision. More...
 
 onRevisionFromEditComplete ( $wikiPage, $rev, $originalRevId, $user, &$tags)
 This hook is called when a revision was inserted due to an edit, file upload, import or page move. More...
 
 onRevisionInsertComplete ( $revision, $data, $flags)
 This hook is called after a revision is inserted into the database. More...
 
 onRevisionRecordInserted ( $revisionRecord)
 This hook is called after a revision is inserted into the database. More...
 
 onRevisionUndeleted ( $revisionRecord, $oldPageID)
 After an article revision is restored. More...
 
 onRollbackComplete ( $wikiPage, $user, $revision, $current)
 After an article rollback is completed. More...
 
 onSearchableNamespaces (&$arr)
 Use this hook to modify which namespaces are searchable. More...
 
 onSearchAfterNoDirectMatch ( $term, &$title)
 This hook is called if there was no match for the exact result. More...
 
 onSearchDataForIndex (&$fields, $handler, $page, $output, $engine)
 Use this hook to add data to search document. More...
 
 onSearchGetNearMatch ( $term, &$title)
 Use this hook to perform exact-title-matches in "go" searches if nothing was found. More...
 
 onSearchGetNearMatchBefore ( $allSearchTerms, &$titleResult)
 Use this hook to perform exact-title-matches in "go" searches before the normal operations. More...
 
 onSearchGetNearMatchComplete ( $term, &$title)
 Use this hook to modify exact-title-matches in "go" searches. More...
 
 onSearchIndexFields (&$fields, $engine)
 Use this hook to add fields to search index mapping. More...
 
 onSearchResultInitFromTitle ( $title, &$id)
 Use this hook to set the revision used when displaying a page in search results. More...
 
 onSearchResultProvideDescription (array $pageIdentities, &$descriptions)
 This hook is called when generating search results in order to fill the 'description' field in an extension. More...
 
 onSearchResultProvideThumbnail (array $pageIdentities, &$thumbnails)
 This hook is called when generating search results in order to fill the 'thumbnail' field in an extension. More...
 
 onSearchResultsAugment (&$setAugmentors, &$rowAugmentors)
 Use this hook to add code to the list of search result augmentors. More...
 
 onSecondaryDataUpdates ( $title, $oldContent, $recursive, $parserOutput, &$updates)
 Use this hook to modify the list of DataUpdates to perform when page content is modified. More...
 
 onSecuritySensitiveOperationStatus (&$status, $operation, $session, $timeSinceAuth)
 Use this hook to affect the return value from MediaWiki\Auth\AuthManager::securitySensitiveOperationStatus(). More...
 
 onSelfLinkBegin ( $nt, &$html, &$trail, &$prefix, &$ret)
 This hook is called before a link to the current article is displayed to allow the display of the link to be customized. More...
 
 onSendWatchlistEmailNotification ( $targetUser, $title, $enotif)
 Use this hook to cancel watchlist email notifications (enotifwatchlist) for an edit. More...
 
 onSessionCheckInfo (&$reason, $info, $request, $metadata, $data)
 Use this hook to validate a MediaWiki\Session\SessionInfo as it's being loaded from storage. More...
 
 onSessionMetadata ( $backend, &$metadata, $requests)
 Use this hook to add metadata to a session being saved. More...
 
 onSetupAfterCache ()
 This hook is called in Setup.php, after cache objects are set. More...
 
 onShortPagesQuery (&$tables, &$conds, &$joinConds, &$options)
 Use this hook to modify the query used by Special:ShortPages. More...
 
 onShowMissingArticle ( $article)
 This hook is called when generating the output for a non-existent page. More...
 
 onShowSearchHit ( $searchPage, $result, $terms, &$link, &$redirect, &$section, &$extract, &$score, &$size, &$date, &$related, &$html)
 Use this hook to customize display of search hit. More...
 
 onShowSearchHitTitle (&$title, &$titleSnippet, $result, $terms, $specialSearch, &$query, &$attributes)
 Use this hook to customise display of search hit title/link. More...
 
 onSidebarBeforeOutput ( $skin, &$sidebar)
 Use this hook to edit the sidebar just before it is output by skins. More...
 
 onSiteNoticeAfter (&$siteNotice, $skin)
 This hook is called after the sitenotice/anonnotice is composed. More...
 
 onSiteNoticeBefore (&$siteNotice, $skin)
 This hook is called before the sitenotice/anonnotice is composed. More...
 
 onSkinAddFooterLinks (Skin $skin, string $key, array &$footerItems)
 This hook is called when generating the code used to display the footer. More...
 
 onSkinAfterBottomScripts ( $skin, &$text)
 This hook is called at the end of Skin::bottomScripts(). More...
 
 onSkinAfterContent (&$data, $skin)
 Use this hook to add text after the page content and article metadata. More...
 
 onSkinAfterPortlet ( $skin, $portlet, &$html)
 This hook is called when generating portlets. More...
 
 onSkinBuildSidebar ( $skin, &$bar)
 This hook is called at the end of Skin::buildSidebar(). More...
 
 onSkinCopyrightFooter ( $title, $type, &$msg, &$link)
 Use this hook for site and per-namespace customization of the copyright notice. More...
 
 onSkinEditSectionLinks ( $skin, $title, $section, $tooltip, &$result, $lang)
 Use this hook to modify section edit links. More...
 
 onSkinGetPoweredBy (&$text, $skin)
 This hook is called when generating the code used to display the "Powered by MediaWiki" icon. More...
 
 onSkinPageReadyConfig (ResourceLoaderContext $context, array &$config)
 Allows skins to change the mediawiki.page.ready module configuration. More...
 
 onSkinPreloadExistence (&$titles, $skin)
 Use this hook to supply titles that should be added to link existence cache before the page is rendered. More...
 
 onSkinSubPageSubtitle (&$subpages, $skin, $out)
 This hook is called at the beginning of Skin::subPageSubtitle(). More...
 
 onSkinTemplateBuildNavUrlsNav_urlsAfterPermalink ( $sktemplate, &$nav_urls, &$revid, &$revid2)
 This hook is called after creating the "permanent link" tab. More...
 
 onSkinTemplateGetLanguageLink (&$languageLink, $languageLinkTitle, $title, $outputPage)
 This hook is called after building the data for a language link from which the actual html is constructed. More...
 
 onSkinTemplateNavigation ( $sktemplate, &$links)
 This hook is called on content pages after the tabs have been added, but before variants have been added. More...
 
 onSkinTemplateNavigation__SpecialPage ( $sktemplate, &$links)
 This hook is called on special pages after the special tab is added but before variants have been added. More...
 
 onSkinTemplateNavigation__Universal ( $sktemplate, &$links)
 This hook is called on both content and special pages after variants have been added. More...
 
 onSkinTemplateOutputPageBeforeExec ( $sktemplate, $tpl)
 This hook is called before SkinTemplate::outputPage() starts page output. More...
 
 onSkinTemplatePreventOtherActiveTabs ( $sktemplate, &$res)
 Use this hook to prevent showing active tabs. More...
 
 onSkinTemplateTabAction ( $sktemplate, $title, $message, $selected, $checkEdit, &$classes, &$query, &$text, &$result)
 Use this hook to override SkinTemplate::tabAction(). More...
 
 onSkinTemplateToolboxEnd ( $sk, $dummy)
 This hook is called by SkinTemplate skins after toolbox links have been rendered (useful for adding more). More...
 
 onSoftwareInfo (&$software)
 This hook is called by Special:Version for returning information about the software. More...
 
 onSpecialBlockModifyFormFields ( $sp, &$fields)
 Use this hook to add more fields to Special:Block. More...
 
 onSpecialContributions__formatRow__flags ( $context, $row, &$flags)
 This hook is called before rendering a Special:Contributions row. More...
 
 onSpecialContributions__getForm__filters ( $sp, &$filters)
 This hook is called with a list of filters to render on Special:Contributions. More...
 
 onSpecialContributionsBeforeMainOutput ( $id, $user, $sp)
 This hook is called before the form on Special:Contributions. More...
 
 onSpecialListusersDefaultQuery ( $pager, &$query)
 This hook is called right before the end of UsersPager::getDefaultQuery(). More...
 
 onSpecialListusersFormatRow (&$item, $row)
 This hook is called right before the end of UsersPager::formatRow(). More...
 
 onSpecialListusersHeader ( $pager, &$out)
 This hook is called after adding the submit button in UsersPager::getPageHeader(). More...
 
 onSpecialListusersHeaderForm ( $pager, &$out)
 This hook is called before adding the submit button in UsersPager::getPageHeader(). More...
 
 onSpecialListusersQueryInfo ( $pager, &$query)
 This hook is called right before the end of UsersPager::getQueryInfo() More...
 
 onSpecialLogAddLogSearchRelations ( $type, $request, &$qc)
 Use this hook to add log relations to the current log. More...
 
 onSpecialMovepageAfterMove ( $movePage, $oldTitle, $newTitle)
 This hook is called after moving a page. More...
 
 onSpecialMuteModifyFormFields ( $target, $user, &$fields)
 Use this hook to add more fields to Special:Mute. More...
 
 onSpecialMuteSubmit ( $data)
 This hook is called at the end of SpecialMute::onSubmit. More...
 
 onSpecialNewpagesConditions ( $special, $opts, &$conds, &$tables, &$fields, &$join_conds)
 This hook is called when building the SQL query for Special:NewPages. More...
 
 onSpecialNewPagesFilters ( $special, &$filters)
 This hook is called after building form options at NewPages. More...
 
 onSpecialPage_initList (&$list)
 This hook is called when setting up SpecialPageFactory::$list. More...
 
 onSpecialPageAfterExecute ( $special, $subPage)
 This hook is called after SpecialPage::execute. More...
 
 onSpecialPageBeforeExecute ( $special, $subPage)
 This hook is called before SpecialPage::execute. More...
 
 onSpecialPageBeforeFormDisplay ( $name, $form)
 This hook is called before executing the HTMLForm object. More...
 
 onSpecialPasswordResetOnSubmit (&$users, $data, &$error)
 This hook is called when executing a form submission on Special:PasswordReset. More...
 
 onSpecialRandomGetRandomTitle (&$randstr, &$isRedir, &$namespaces, &$extra, &$title)
 This hook is called during the execution of Special:Random,. More...
 
 onSpecialRecentChangesPanel (&$extraOpts, $opts)
 This hook is called when building form options in SpecialRecentChanges. More...
 
 onSpecialResetTokensTokens (&$tokens)
 This hook is called when building token list for SpecialResetTokens. More...
 
 onSpecialSearchCreateLink ( $t, &$params)
 This hook is called when making the message to create a page or go to the existing page. More...
 
 onSpecialSearchGoResult ( $term, $title, &$url)
 Use this hook to alter the behaviour of the 'go' feature when searching. More...
 
 onSpecialSearchNogomatch (&$title)
 This hook is called when the 'Go' feature is triggered and the target doesn't exist. More...
 
 onSpecialSearchPowerBox (&$showSections, $term, &$opts)
 Use this hook to modify advanced search profile forms. More...
 
 onSpecialSearchProfileForm ( $search, &$form, $profile, $term, $opts)
 Use this hook to modify search profile forms. More...
 
 onSpecialSearchProfiles (&$profiles)
 Use this hook to modify search profiles. More...
 
 onSpecialSearchResults ( $term, &$titleMatches, &$textMatches)
 This hook is called before search result display. More...
 
 onSpecialSearchResultsAppend ( $specialSearch, $output, $term)
 This hook is called immediately before returning HTML on the search results page. More...
 
 onSpecialSearchResultsPrepend ( $specialSearch, $output, $term)
 This hook is called immediately before returning HTML on the search results page. More...
 
 onSpecialSearchSetupEngine ( $search, $profile, $engine)
 Use this hook for passing custom data to the search engine. More...
 
 onSpecialStatsAddExtra (&$extraStats, $context)
 Use this hook to add extra statistics at the end of Special:Statistics. More...
 
 onSpecialTrackingCategories__generateCatLink ( $specialPage, $catTitle, &$html)
 This hook is called for each category link on Special:TrackingCategories. More...
 
 onSpecialTrackingCategories__preprocess ( $specialPage, $trackingCategories)
 This hook is called after LinkBatch on Special:TrackingCategories. More...
 
 onSpecialUploadComplete ( $form)
 This hook is called after successfully uploading a file from Special:Upload. More...
 
 onSpecialVersionVersionUrl ( $version, &$versionUrl)
 This hook is called when building the URL for Special:Version. More...
 
 onSpecialWatchlistGetNonRevisionTypes (&$nonRevisionTypes)
 This hook is called when building the SQL query for SpecialWatchlist. More...
 
 onTestCanonicalRedirect ( $request, $title, $output)
 This hook is called when about to force a redirect to a canonical URL for a title when we have no other parameters on the URL. More...
 
 onThumbnailBeforeProduceHTML ( $thumbnail, &$attribs, &$linkAttribs)
 This hook is called before an image HTML is about to be rendered (by ThumbnailImage:toHtml method). More...
 
 onTitleArrayFromResult (&$titleArray, $res)
 This hook is called when creating a TitleArray object from a database result. More...
 
 onTitleExists ( $title, &$exists)
 This hook is called when determining whether a page exists at a given title. More...
 
 onTitleGetEditNotices ( $title, $oldid, &$notices)
 Use this hook to add edit notices. More...
 
 onTitleGetRestrictionTypes ( $title, &$types)
 Use this hook to modify the types of protection that can be applied. More...
 
 onTitleIsAlwaysKnown ( $title, &$isKnown)
 This hook is called when determining if a page exists. More...
 
 onTitleIsMovable ( $title, &$result)
 This hook is called when determining if it is possible to move a page. More...
 
 onTitleMove ( $old, $nt, $user, $reason, &$status)
 This hook is called before moving an article (title). More...
 
 onTitleMoveComplete ( $old, $nt, $user, $pageid, $redirid, $reason, $revision)
 This hook is called after moving an article (title), post-commit. More...
 
 onTitleMoveCompleting ( $old, $nt, $user, $pageid, $redirid, $reason, $revision)
 This hook is called after moving an article (title), pre-commit. More...
 
 onTitleMoveStarting ( $old, $nt, $user)
 This hook is called before moving an article (title), but just after the atomic DB section starts. More...
 
 onTitleQuickPermissions ( $title, $user, $action, &$errors, $doExpensiveQueries, $short)
 This hook is called from Title::checkQuickPermissions to add to or override the quick permissions check. More...
 
 onTitleReadWhitelist ( $title, $user, &$whitelisted)
 This hook is called at the end of read permissions checks, just before adding the default error message if nothing allows the user to read the page. More...
 
 onTitleSquidURLs ( $title, &$urls)
 This hook is called to determine which URLs to purge from HTTP caches. More...
 
 onUnblockUser ( $block, $user, &$reason)
 This hook is called before an IP address or user is unblocked. More...
 
 onUnblockUserComplete ( $block, $user)
 This hook is called after an IP address or user has been unblocked. More...
 
 onUndeleteForm__showHistory (&$archive, $title)
 This hook is called in UndeleteForm::showHistory, after creating the PageArchive object. More...
 
 onUndeleteForm__showRevision (&$archive, $title)
 This hook is called in UndeleteForm::showRevision, after creating a PageArchive object. More...
 
 onUndeleteForm__undelete (&$archive, $title)
 This hook is called in UndeleteForm::undelete, after checks are conducted. More...
 
 onUndeletePageToolLinks (IContextSource $context, LinkRenderer $linkRenderer, array &$links)
 Use this hook to add one or more links to edit page subtitle when a page has been previously deleted. More...
 
 onUndeleteShowRevision ( $title, $rev)
 This hook is called when showing a revision in Special:Undelete. More...
 
 onUnitTestsAfterDatabaseSetup ( $database, $prefix)
 This hook is called right after MediaWiki's test infrastructure has finished creating/duplicating core tables for unit tests. More...
 
 onUnitTestsBeforeDatabaseTeardown ()
 This hook is called right before MediaWiki tears down its database infrastructure used for unit tests. More...
 
 onUnitTestsList (&$paths)
 This hook is called when building a list of paths containing PHPUnit tests. More...
 
 onUnwatchArticle ( $user, $page, &$status)
 This hook is called before a watch is removed from an article. More...
 
 onUnwatchArticleComplete ( $user, $page)
 This hook is called after a watch is removed from an article. More...
 
 onUpdateUserMailerFormattedPageStatus (&$formattedPageStatus)
 This hook is called before a notification email gets sent. More...
 
 onUploadComplete ( $uploadBase)
 This hook is called upon completion of a file upload. More...
 
 onUploadCreateFromRequest ( $type, &$className)
 This hook is called when UploadBase::createFromRequest has been called. More...
 
 onUploadForm_BeforeProcessing ( $upload)
 This hook is called at the beginning of processUpload(). More...
 
 onUploadForm_getInitialPageText (&$pageText, $msg, $config)
 This hook is called after the initial page text for file uploads is generated. More...
 
 onUploadForm_initial ( $upload)
 This hook is called before the upload form is generated. More...
 
 onUploadFormInitDescriptor (&$descriptor)
 This hook is called after the descriptor for the upload form as been assembled. More...
 
 onUploadFormSourceDescriptors (&$descriptor, &$radio, $selectedSourceType)
 This hook is called after the standard source inputs have been added to the descriptor. More...
 
 onUploadStashFile ( $upload, $user, $props, &$error)
 This hook is called before a file is stashed (uploaded to stash). More...
 
 onUploadVerifyFile ( $upload, $mime, &$error)
 Use this hook to perform extra file verification, based on MIME type, etc. More...
 
 onUploadVerifyUpload ( $upload, $user, $props, $comment, $pageText, &$error)
 Use this hook to perform upload verification, based on both file properties like MIME type (same as UploadVerifyFile) and the information entered by the user (upload comment, file page contents etc.). More...
 
 onUser__mailPasswordInternal ( $user, $ip, $u)
 This hook is called before creation and mailing of a user's new temporary password. More...
 
 onUserAddGroup ( $user, &$group, &$expiry)
 This hook is alled when adding a group or changing a group's expiry. More...
 
 onUserArrayFromResult (&$userArray, $res)
 This hook is called when creating an UserArray object from a database result. More...
 
 onUserCan ( $title, $user, $action, &$result)
 Use this hook to interrupt or advise the "user can do X to Y article" check. More...
 
 onUserCanSendEmail ( $user, &$canSend)
 Use this hook to override User::canSendEmail() permission check. More...
 
 onUserClearNewTalkNotification ( $userIdentity, $oldid)
 This hook is called before clearing the "You have new messages!" message. More...
 
 onUserEffectiveGroups ( $user, &$groups)
 This hook is called in User::getEffectiveGroups(). More...
 
 onUserGetAllRights (&$rights)
 This hook is called after calculating a list of all available rights. More...
 
 onUserGetDefaultOptions (&$defaultOptions)
 This hook is called after fetching core default user options but before returning the options. More...
 
 onUserGetEmail ( $user, &$email)
 This hook is called when getting an user email address. More...
 
 onUserGetEmailAuthenticationTimestamp ( $user, &$timestamp)
 This hook is called when getting the timestamp of email authentication. More...
 
 onUserGetLanguageObject ( $user, &$code, $context)
 This hook is called when getting a user's interface language object. More...
 
 onUserGetReservedNames (&$reservedUsernames)
 Use this hook to modify $wgReservedUsernames at run time. More...
 
 onUserGetRights ( $user, &$rights)
 This hook is called in User::getRights(). More...
 
 onUserGetRightsRemove ( $user, &$rights)
 This hook is called in User::getRights(). More...
 
 onUserGroupsChanged ( $user, $added, $removed, $performer, $reason, $oldUGMs, $newUGMs)
 This hook is called after user groups are changed. More...
 
 onUserIsBlockedFrom ( $user, $title, &$blocked, &$allowUsertalk)
 Use this hook to check if a user is blocked from a specific page (for specific block exemptions if a user is already blocked). More...
 
 onUserIsBlockedGlobally ( $user, $ip, &$blocked, &$block)
 Use this hook to establish that a user is blocked on all wikis. More...
 
 onUserIsBot ( $user, &$isBot)
 Use this hook to establish whether a user is a bot account. More...
 
 onUserIsEveryoneAllowed ( $right)
 Use this hook to check if all users are allowed some user right; return false if a UserGetRights hook might remove the named right. More...
 
 onUserIsLocked ( $user, &$locked)
 Use this hook to establish that a user is locked. More...
 
 onUserLoadAfterLoadFromSession ( $user)
 This hook is called to authenticate users on external or environmental means. More...
 
 onUserLoadDefaults ( $user, $name)
 This hook is called when loading a default user. More...
 
 onUserLoadFromDatabase ( $user, &$s)
 This hook is called when loading a user from the database. More...
 
 onUserLoadOptions ( $user, &$options)
 This hook is called when user options/preferences are being loaded from the database. More...
 
 onUserLoggedIn ( $user)
 This hook is called after a user is logged in. More...
 
 onUserLoginComplete ( $user, &$inject_html, $direct)
 Use this hook to show custom content after a user has logged in via the web interface. More...
 
 onUserLogout ( $user)
 This hook is called before a user logs out. More...
 
 onUserLogoutComplete ( $user, &$inject_html, $oldName)
 This hook is called after a user has logged out. More...
 
 onUserMailerChangeReturnPath ( $to, &$returnPath)
 This hook is called to generate a VERP return address when UserMailer sends an email, with a bounce handling extension. More...
 
 onUserMailerSplitTo (&$to)
 This hook is called in UserMailer::send() to give extensions a chance to split up an email with multiple To: fields into separate emails. More...
 
 onUserMailerTransformContent ( $to, $from, &$body, &$error)
 This hook is called in UserMailer::send() to change email contents. More...
 
 onUserMailerTransformMessage ( $to, $from, &$subject, &$headers, &$body, &$error)
 This hook is called in UserMailer::send() to change email after it has gone through the MIME transform. More...
 
 onUserRemoveGroup ( $user, &$group)
 This hook is called when removing a group. More...
 
 onUserRequiresHTTPS ( $user, &$https)
 This hook is called to determine whether a user needs to be switched to HTTPS. More...
 
 onUserResetAllOptions ( $user, &$newOptions, $options, $resetKinds)
 This hook is called when user preferences have been requested to be reset. More...
 
 onUserRetrieveNewTalks ( $user, &$talks)
 This hook is called when retrieving "You have new messages!" message(s). More...
 
 onUserSaveOptions ( $user, &$options, $originalOptions)
 This hook is called just before saving user preferences. More...
 
 onUserSaveSettings ( $user)
 This hook is called directly after user preferences have been saved to the database. More...
 
 onUserSendConfirmationMail ( $user, &$mail, $info)
 This hook is called just before a confirmation email is sent to a user. More...
 
 onUserSetCookies ( $user, &$session, &$cookies)
 This hook is called when setting user cookies. More...
 
 onUserSetEmail ( $user, &$email)
 This hook is called when changing user email address. More...
 
 onUserSetEmailAuthenticationTimestamp ( $user, &$timestamp)
 This hook is called when setting the timestamp of a User's email authentication. More...
 
 onUsersPagerDoBatchLookups ( $dbr, $userIds, &$cache, &$groups)
 This hook is called in UsersPager::doBatchLookups() More...
 
 onUserToolLinksEdit ( $userId, $userText, &$items)
 This hook is called when generating a list of user tool links, e.g. More...
 
 onValidateExtendedMetadataCache ( $timestamp, $file)
 Use this hook to validate the cached metadata in FormatMetadata::getExtendedMeta. More...
 
 onWantedPages__getQueryInfo ( $wantedPages, &$query)
 This hook is called in WantedPagesPage::getQueryInfo(). More...
 
 onWatchArticle ( $user, $page, &$status, $expiry)
 This hook is called before a watch is added to an article. More...
 
 onWatchArticleComplete ( $user, $page)
 This hook is called after a watch is added to an article. More...
 
 onWatchedItemQueryServiceExtensions (&$extensions, $watchedItemQueryService)
 Use this hook to create a WatchedItemQueryServiceExtension. More...
 
 onWatchlistEditorBeforeFormRender (&$watchlistInfo)
 This hook is called before building the Special:EditWatchlist form. More...
 
 onWatchlistEditorBuildRemoveLine (&$tools, $title, $redirect, $skin, &$link)
 This hook is called when building remove lines in Special:Watchlist/edit. More...
 
 onWebRequestPathInfoRouter ( $router)
 This hook is called while building the PathRouter to parse the REQUEST_URI. More...
 
 onWebResponseSetCookie (&$name, &$value, &$expire, &$options)
 This hook is called when setting a cookie in WebResponse::setcookie(). More...
 
 onWfShellWikiCmd (&$script, &$parameters, &$options)
 This hook is called when generating a shell-escaped command line string to run a MediaWiki CLI script. More...
 
 onWgQueryPages (&$qp)
 This hook is called when initialising list of QueryPage subclasses. More...
 
 onWhatLinksHereProps ( $row, $title, $target, &$props)
 Use this hook to add annotations to Special:WhatLinksHere. More...
 
 onWikiExporter__dumpStableQuery (&$tables, &$opts, &$join)
 Use this hook to get the SELECT query for "stable" revisions dumps. More...
 
 onWikiPageDeletionUpdates ( $page, $content, &$updates)
 Use this hook to manipulate the list of DeferrableUpdates to be applied when a page is deleted. More...
 
 onWikiPageFactory ( $title, &$page)
 Use this hook to override WikiPage class used for a title. More...
 
 onXmlDumpWriterOpenPage ( $obj, &$out, $row, $title)
 This hook is called at the end of XmlDumpWriter::openPage, to allow extra metadata to be added. More...
 
 onXmlDumpWriterWriteRevision ( $obj, &$out, $row, $text, $rev)
 This hook is called at the end of a revision in an XML dump, to add extra metadata. More...
 

Private Attributes

HookContainer $container
 

Detailed Description

This class provides an implementation of the core hook interfaces, forwarding hook calls to HookContainer for dispatch to extensions.

It is intended for use within MediaWiki core only. Extensions that need a hook runner should create one for the hooks they need to run.

To use it, create a new HookRunner object from a HookContainer obtained by dependency injection, or as a last resort, from the global service container. Then call the relevant method on the object: ( new HookRunner( $hookContainer ) )->onSomeHook( $param );

Definition at line 26 of file HookRunner.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\HookContainer\HookRunner::__construct ( HookContainer  $container)

Definition at line 571 of file HookRunner.php.

References MediaWiki\HookContainer\HookRunner\$container.

Member Function Documentation

◆ onAbortAutoblock()

MediaWiki\HookContainer\HookRunner::onAbortAutoblock (   $autoblockip,
  $block 
)

Use this hook to cancel an autoblock.

Since
1.35
Parameters
string$autoblockipIP going to be autoblocked
DatabaseBlock$blockBlock from which the autoblock is coming
Returns
bool|void True or no return value to continue, or false to cancel an autoblock

Implements MediaWiki\Block\Hook\AbortAutoblockHook.

Definition at line 575 of file HookRunner.php.

◆ onAbortDiffCache()

MediaWiki\HookContainer\HookRunner::onAbortDiffCache (   $diffEngine)

Use this hook to cancel the caching of a diff.

Since
1.35
Parameters
DifferenceEngine$diffEngine
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Diff\Hook\AbortDiffCacheHook.

Definition at line 582 of file HookRunner.php.

◆ onAbortEmailNotification()

MediaWiki\HookContainer\HookRunner::onAbortEmailNotification (   $editor,
  $title,
  $rc 
)

Use this hook to cancel email notifications for an edit.

Since
1.35
Parameters
User$editorUser who made the change
Title$titleTitle of the page that was edited
RecentChange$rcCurrent RecentChange object
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\AbortEmailNotificationHook.

Definition at line 589 of file HookRunner.php.

References $title.

◆ onAbortTalkPageEmailNotification()

MediaWiki\HookContainer\HookRunner::onAbortTalkPageEmailNotification (   $targetUser,
  $title 
)

Use this hook to disable email notifications of edits to users' talk pages.

Since
1.35
Parameters
User$targetUserUser whom to send talk page email notification
Title$titlePage title
Returns
bool|void True or no return value to continue, or false to cancel talk page email notification

Implements MediaWiki\Hook\AbortTalkPageEmailNotificationHook.

Definition at line 596 of file HookRunner.php.

References $title.

◆ onActionBeforeFormDisplay()

MediaWiki\HookContainer\HookRunner::onActionBeforeFormDisplay (   $name,
  $form,
  $article 
)

This hook is called before executing the HTMLForm object.

Since
1.35
Parameters
string$nameName of the action
HTMLForm$form
Article$article
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\ActionBeforeFormDisplayHook.

Definition at line 603 of file HookRunner.php.

◆ onActionModifyFormFields()

MediaWiki\HookContainer\HookRunner::onActionModifyFormFields (   $name,
$fields,
  $article 
)

This hook is called before creating an HTMLForm object for a page action.

Use this hook to change the fields on the form that will be generated.

Since
1.35
Parameters
string$nameName of the action
array&$fieldsHTMLForm descriptor array
Article$article
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\ActionModifyFormFieldsHook.

Definition at line 610 of file HookRunner.php.

◆ onAddNewAccount()

MediaWiki\HookContainer\HookRunner::onAddNewAccount (   $user,
  $byEmail 
)

This hook is called after a user account is created.

Since
1.35
Parameters
User$userthe User object that was created. (Parameter added in 1.7)
bool$byEmailtrue when account was created "by email" (added in 1.12)
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\AddNewAccountHook.

Definition at line 617 of file HookRunner.php.

◆ onAfterBuildFeedLinks()

MediaWiki\HookContainer\HookRunner::onAfterBuildFeedLinks ( $feedLinks)

This hook is called in OutputPage.php after all feed links (atom, rss,...) are created.

Use this hook to omit specific feeds from being outputted. You must not use this hook to add feeds; use OutputPage::addFeedLink() instead.

Since
1.35
Parameters
string[]&$feedLinksArray of created feed links
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\AfterBuildFeedLinksHook.

Definition at line 624 of file HookRunner.php.

◆ onAfterFinalPageOutput()

MediaWiki\HookContainer\HookRunner::onAfterFinalPageOutput (   $output)

This hook is called nearly at the end of OutputPage::output() but before OutputPage::sendCacheControl() and final ob_end_flush() which will send the buffered output to the client.

This allows for last-minute modification of the output within the buffer by using ob_get_clean().

Since
1.35
Parameters
OutputPage$outputThe OutputPage object where output() was called
Returns
void This hook must not abort, it must return no value

Implements MediaWiki\Hook\AfterFinalPageOutputHook.

Definition at line 631 of file HookRunner.php.

◆ onAfterImportPage()

MediaWiki\HookContainer\HookRunner::onAfterImportPage (   $title,
  $foreignTitle,
  $revCount,
  $sRevCount,
  $pageInfo 
)

This hook is called when a page import is completed.

Since
1.35
Parameters
Title$titleTitle under which the revisions were imported
ForeignTitle$foreignTitleForeignTitle object based on data provided by the XML file
int$revCountNumber of revisions in the XML file
int$sRevCountNumber of successfully imported revisions
array$pageInfoAssociative array of page information
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\AfterImportPageHook.

Definition at line 639 of file HookRunner.php.

References $title.

◆ onAfterParserFetchFileAndTitle()

MediaWiki\HookContainer\HookRunner::onAfterParserFetchFileAndTitle (   $parser,
  $ig,
$html 
)

This hook is called after an image gallery is formed by Parser, just before adding its HTML to parser output.

Since
1.35
Parameters
Parser$parserParser that called the hook
ImageGalleryBase$igGallery, an object of one of the gallery classes (inheriting from ImageGalleryBase)
string&$htmlHTML generated by the gallery
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\AfterParserFetchFileAndTitleHook.

Definition at line 648 of file HookRunner.php.

◆ onAlternateEdit()

MediaWiki\HookContainer\HookRunner::onAlternateEdit (   $editPage)

This hook is called before checking if a user can edit a page and before showing the edit form ( EditPage::edit() ).

This is triggered on &action=edit.

Since
1.35
Parameters
EditPage$editPage
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\AlternateEditHook.

Definition at line 655 of file HookRunner.php.

◆ onAlternateEditPreview()

MediaWiki\HookContainer\HookRunner::onAlternateEditPreview (   $editPage,
$content,
$previewHTML,
$parserOutput 
)

This hook is called before generating the preview of the page when editing ( EditPage::getPreviewText() ).

Since
1.35
Parameters
EditPage$editPage
Content&$contentContent object for the text field from the edit page
string&$previewHTMLText to be placed into the page for the preview
ParserOutput&$parserOutputParserOutput object for the preview
Returns
bool|void True or no return value to continue, or false and set $previewHTML and $parserOutput to output custom page preview HTML

Implements MediaWiki\Hook\AlternateEditPreviewHook.

Definition at line 662 of file HookRunner.php.

References $content.

◆ onAlternateUserMailer()

MediaWiki\HookContainer\HookRunner::onAlternateUserMailer (   $headers,
  $to,
  $from,
  $subject,
  $body 
)

This hook is called before mail is sent so that mail could be logged (or something else) instead of using PEAR or PHP's mail().

Since
1.35
Parameters
array$headersAssociative array of headers for the email
MailAddress | array$toTo address
MailAddress$fromFrom address
string$subjectSubject of the email
string$bodyBody of the message
Returns
bool|string|void True or no return value to continue sending email in the regular way, or false to skip the regular method of sending mail. Return a string to return a php-mail-error message containing the error.

Implements MediaWiki\Hook\AlternateUserMailerHook.

Definition at line 671 of file HookRunner.php.

◆ onAncientPagesQuery()

MediaWiki\HookContainer\HookRunner::onAncientPagesQuery ( $tables,
$conds,
$joinConds 
)

Use this hook to modify the query used by Special:AncientPages.

Since
1.35
Parameters
array&$tablestables to join in the query
array&$condsconditions for the query
array&$joinCondsjoin conditions for the query
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\AncientPagesQueryHook.

Definition at line 678 of file HookRunner.php.

◆ onApiBeforeMain()

MediaWiki\HookContainer\HookRunner::onApiBeforeMain ( $main)

This hook is called before calling ApiMain's execute() method in api.php.

Since
1.35
Parameters
ApiMain&$main
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\ApiBeforeMainHook.

Definition at line 685 of file HookRunner.php.

◆ onArticle__MissingArticleConditions()

MediaWiki\HookContainer\HookRunner::onArticle__MissingArticleConditions ( $conds,
  $logTypes 
)

This hook is called before fetching deletion and move log entries to display a message of a non-existing page being deleted/moved.

Use this hook to hide unrelated log entries.

Since
1.35
Parameters
array&$condsArray of query conditions (all of which have to be met; conditions will AND in the final query)
string[]$logTypesArray of log types being queried
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\Article__MissingArticleConditionsHook.

Definition at line 898 of file HookRunner.php.

◆ onArticleConfirmDelete()

MediaWiki\HookContainer\HookRunner::onArticleConfirmDelete (   $article,
  $output,
$reason 
)

This hook is called before writing the confirmation form for article deletion.

Since
1.35
Parameters
Article$articleArticle being deleted
OutputPage$output
string&$reasonReason the article is being deleted
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticleConfirmDeleteHook.

Definition at line 692 of file HookRunner.php.

◆ onArticleContentOnDiff()

MediaWiki\HookContainer\HookRunner::onArticleContentOnDiff (   $diffEngine,
  $output 
)

This hook is called before showing the article content below a diff.

Use this hook to change the content in this area or how it is loaded.

Since
1.35
Parameters
DifferenceEngine$diffEngine
OutputPage$output
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Diff\Hook\ArticleContentOnDiffHook.

Definition at line 699 of file HookRunner.php.

◆ onArticleDelete()

MediaWiki\HookContainer\HookRunner::onArticleDelete (   $wikiPage,
  $user,
$reason,
$error,
$status,
  $suppress 
)

This hook is called before an article is deleted.

Since
1.35
Parameters
WikiPage$wikiPageWikiPage being deleted
User$userUser deleting the article
string&$reasonReason the article is being deleted
string&$errorIf the deletion was prohibited, the (raw HTML) error message to display (added in 1.13)
Status&$statusModify this to throw an error. Overridden by $error (added in 1.20)
bool$suppressWhether this is a suppression deletion or not (added in 1.27)
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticleDeleteHook.

Definition at line 706 of file HookRunner.php.

◆ onArticleDeleteAfterSuccess()

MediaWiki\HookContainer\HookRunner::onArticleDeleteAfterSuccess (   $title,
  $outputPage 
)

Use this hook to modify the output after an article has been deleted.

Since
1.35
Parameters
Title$titleArticle that has been deleted
OutputPage$outputPageOutputPage that can be used to append the output
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticleDeleteAfterSuccessHook.

Definition at line 715 of file HookRunner.php.

References $title.

◆ onArticleDeleteComplete()

MediaWiki\HookContainer\HookRunner::onArticleDeleteComplete (   $wikiPage,
  $user,
  $reason,
  $id,
  $content,
  $logEntry,
  $archivedRevisionCount 
)

This hook is called after an article is deleted.

Since
1.35
Parameters
WikiPage$wikiPageWikiPage that was deleted
User$userUser that deleted the article
string$reasonReason the article was deleted
int$idID of the article that was deleted
Content | null$contentContent of the deleted page (or null, when deleting a broken page)
ManualLogEntry$logEntryManualLogEntry used to record the deletion
int$archivedRevisionCountNumber of revisions archived during the deletion
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticleDeleteCompleteHook.

Definition at line 722 of file HookRunner.php.

References $content.

◆ onArticleEditUpdateNewTalk()

MediaWiki\HookContainer\HookRunner::onArticleEditUpdateNewTalk (   $wikiPage,
  $recipient 
)

This hook is called before updating user_newtalk when a user talk page was changed.

Since
1.35
Parameters
WikiPage$wikiPageWikiPage of the user talk page
User$recipientUser whose talk page was edited
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Storage\Hook\ArticleEditUpdateNewTalkHook.

Definition at line 732 of file HookRunner.php.

◆ onArticleEditUpdates()

MediaWiki\HookContainer\HookRunner::onArticleEditUpdates (   $wikiPage,
  $editInfo,
  $changed 
)

This hook is called when edit updates (mainly link tracking) are made when an article has been changed.

Since
1.35
Parameters
WikiPage$wikiPage
PreparedEdit$editInfoData holder that includes the parser output ($editInfo->output) for that page after the change
bool$changedWhether the page was changed
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Storage\Hook\ArticleEditUpdatesHook.

Definition at line 739 of file HookRunner.php.

◆ onArticleEditUpdatesDeleteFromRecentchanges()

MediaWiki\HookContainer\HookRunner::onArticleEditUpdatesDeleteFromRecentchanges (   $wikiPage)

This hook is called before deleting old entries from recentchanges table.

Since
1.35
Parameters
WikiPage$wikiPageWikiPage being modified
Returns
bool|void True or no return value to continue, or false to not delete old entries

Implements MediaWiki\Storage\Hook\ArticleEditUpdatesDeleteFromRecentchangesHook.

Definition at line 746 of file HookRunner.php.

◆ onArticleFromTitle()

MediaWiki\HookContainer\HookRunner::onArticleFromTitle (   $title,
$article,
  $context 
)

This hook is called when creating an article object from a title object using Wiki::articleFromTitle().

Since
1.35
Parameters
Title$titleTitle used to create the article object
Article&$articleArticle that will be returned
IContextSource$context
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticleFromTitleHook.

Definition at line 753 of file HookRunner.php.

References MediaWiki\$context, and $title.

◆ onArticleMergeComplete()

MediaWiki\HookContainer\HookRunner::onArticleMergeComplete (   $targetTitle,
  $destTitle 
)

This hook is called after merging to article using Special:Mergehistory.

Since
1.35
Parameters
Title$targetTitleTarget title
Title$destTitleDestination title
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\ArticleMergeCompleteHook.

Definition at line 760 of file HookRunner.php.

◆ onArticlePageDataAfter()

MediaWiki\HookContainer\HookRunner::onArticlePageDataAfter (   $wikiPage,
$row 
)

This hook is called after loading data of an article from the database.

Since
1.35
Parameters
WikiPage$wikiPageWikiPage whose data were loaded
stdClass&$rowRow returned from the database server
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticlePageDataAfterHook.

Definition at line 767 of file HookRunner.php.

◆ onArticlePageDataBefore()

MediaWiki\HookContainer\HookRunner::onArticlePageDataBefore (   $wikiPage,
$fields,
$tables,
$joinConds 
)

This hook is called before loading data of an article from the database.

Since
1.35
Parameters
WikiPage$wikiPageWikiPage whose data will be loaded
array&$fieldsFields to load from the database
array&$tablesTables to load from the database
array&$joinCondsJoin conditions to load from the database
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticlePageDataBeforeHook.

Definition at line 774 of file HookRunner.php.

◆ onArticlePrepareTextForEdit()

MediaWiki\HookContainer\HookRunner::onArticlePrepareTextForEdit (   $wikiPage,
  $popts 
)

This hook is called when preparing text to be saved.

Since
1.35
Parameters
WikiPage$wikiPageWikiPage being saved
ParserOptions$poptsParser options to be used for pre-save transformation
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Storage\Hook\ArticlePrepareTextForEditHook.

Definition at line 783 of file HookRunner.php.

◆ onArticleProtect()

MediaWiki\HookContainer\HookRunner::onArticleProtect (   $wikiPage,
  $user,
  $protect,
  $reason 
)

This hook is called before an article is protected.

Since
1.35
Parameters
WikiPage$wikiPageWikiPage being protected
User$userUser doing the protection
array$protectSet of restriction keys
string$reasonReason for protect
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticleProtectHook.

Definition at line 790 of file HookRunner.php.

◆ onArticleProtectComplete()

MediaWiki\HookContainer\HookRunner::onArticleProtectComplete (   $wikiPage,
  $user,
  $protect,
  $reason 
)

This hook is called after an article is protected.

Since
1.35
Parameters
WikiPage$wikiPageWikiPage that was protected
User$userUser who did the protection
array$protectSet of restriction keys
string$reasonReason for protect
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticleProtectCompleteHook.

Definition at line 797 of file HookRunner.php.

◆ onArticlePurge()

MediaWiki\HookContainer\HookRunner::onArticlePurge (   $wikiPage)

This hook is called before executing "&action=purge".

Since
1.35
Parameters
WikiPage$wikiPageWikiPage to purge
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticlePurgeHook.

Definition at line 804 of file HookRunner.php.

◆ onArticleRevisionUndeleted()

MediaWiki\HookContainer\HookRunner::onArticleRevisionUndeleted (   $title,
  $revision,
  $oldPageID 
)

This hook is called after an article revision is restored.

Since
1.35
Parameters
Title$titleArticle title
Revision$revision
int | null$oldPageIDPage ID of the revision when archived
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticleRevisionUndeletedHook.

Definition at line 811 of file HookRunner.php.

References $title.

◆ onArticleRevisionViewCustom()

MediaWiki\HookContainer\HookRunner::onArticleRevisionViewCustom (   $revision,
  $title,
  $oldid,
  $output 
)

Use this hook for custom rendering of an article's content.

Note that it is preferable to implement proper handing for a custom data type using the ContentHandler facility.

Since
1.35
Parameters
RevisionRecord | null$revisionContent of the page (or null if the revision could not be loaded). May also be a fake that wraps content supplied by an extension.
Title$titleTitle of the page
int$oldidRequested revision ID, or 0 for the current revision
OutputPage$output
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticleRevisionViewCustomHook.

Definition at line 818 of file HookRunner.php.

References $title.

◆ onArticleRevisionVisibilitySet()

MediaWiki\HookContainer\HookRunner::onArticleRevisionVisibilitySet (   $title,
  $ids,
  $visibilityChangeMap 
)

This hook is called when changing visibility of one or more revisions of an article.

Since
1.35
Parameters
Title$titleTitle of the article
int[]$idsIDs to set the visibility for
array$visibilityChangeMapMap of revision ID to oldBits and newBits. This array can be examined to determine exactly what visibility bits have changed for each revision. This array is of the form: [id => ['oldBits' => $oldBits, 'newBits' => $newBits], ... ]
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\ArticleRevisionVisibilitySetHook.

Definition at line 827 of file HookRunner.php.

References $title.

◆ onArticleRollbackComplete()

MediaWiki\HookContainer\HookRunner::onArticleRollbackComplete (   $wikiPage,
  $user,
  $revision,
  $current 
)

This hook is called after an article rollback is completed.

Since
1.35
Parameters
WikiPage$wikiPageWikiPage that was edited
User$userUser who did the rollback
Revision$revisionRevision the page was reverted back to
Revision$currentReverted revision
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticleRollbackCompleteHook.

Definition at line 836 of file HookRunner.php.

◆ onArticleShowPatrolFooter()

MediaWiki\HookContainer\HookRunner::onArticleShowPatrolFooter (   $article)

This hook is called at the beginning of Article::showPatrolFooter.

Use this hook to not show the [mark as patrolled] link in certain circumstances.

Since
1.35
Parameters
Article$article
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticleShowPatrolFooterHook.

Definition at line 845 of file HookRunner.php.

◆ onArticleUndelete()

MediaWiki\HookContainer\HookRunner::onArticleUndelete (   $title,
  $create,
  $comment,
  $oldPageId,
  $restoredPages 
)

This hook is called when one or more revisions of an article are restored.

Since
1.35
Parameters
Title$titleTitle corresponding to the article restored
bool$createWhether or not the restoration caused the page to be created (i.e. it didn't exist before)
string$commentComment associated with the undeletion
int$oldPageIdID of page previously deleted (from archive table). This ID will be used for the restored page.
array$restoredPagesSet of page IDs that have revisions restored for this undelete, with keys set to page IDs and values set to 'true'
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticleUndeleteHook.

Definition at line 852 of file HookRunner.php.

References $title.

◆ onArticleUndeleteLogEntry()

MediaWiki\HookContainer\HookRunner::onArticleUndeleteLogEntry (   $pageArchive,
$logEntry,
  $user 
)

This hook is called when a log entry is generated but not yet saved.

Since
1.35
Parameters
PageArchive$pageArchive
ManualLogEntry&$logEntry
User$userUser who is performing the log action
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticleUndeleteLogEntryHook.

Definition at line 861 of file HookRunner.php.

◆ onArticleUpdateBeforeRedirect()

MediaWiki\HookContainer\HookRunner::onArticleUpdateBeforeRedirect (   $article,
$sectionanchor,
$extraq 
)

This hook is called after a page is updated (usually on save), before the user is redirected back to the page.

Since
1.35
Parameters
Article$article
string&$sectionanchorSection anchor link (e.g. "#overview" )
string&$extraqExtra query parameters which can be added via hooked functions
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\ArticleUpdateBeforeRedirectHook.

Definition at line 868 of file HookRunner.php.

◆ onArticleViewFooter()

MediaWiki\HookContainer\HookRunner::onArticleViewFooter (   $article,
  $patrolFooterShown 
)

This hook is called after showing the footer section of an ordinary page view.

Since
1.35
Parameters
Article$article
bool$patrolFooterShownWhether patrol footer is shown
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticleViewFooterHook.

Definition at line 877 of file HookRunner.php.

◆ onArticleViewHeader()

MediaWiki\HookContainer\HookRunner::onArticleViewHeader (   $article,
$outputDone,
$pcache 
)

Use this hook to control article output.

This hook is called before the parser cache is about to be tried for article viewing.

Since
1.35
Parameters
Article$article
bool | ParserOutput&$outputDoneWhether the output for this page finished or not. Set to a ParserOutput object to both indicate that the output is done and what parser output was used.
bool&$pcacheWhether to try the parser cache or not
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticleViewHeaderHook.

Definition at line 884 of file HookRunner.php.

◆ onArticleViewRedirect()

MediaWiki\HookContainer\HookRunner::onArticleViewRedirect (   $article)

This hook is called before setting "Redirected from ..." subtitle when a redirect was followed.

Since
1.35
Parameters
Article$articleTarget article
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\ArticleViewRedirectHook.

Definition at line 891 of file HookRunner.php.

◆ onAuthChangeFormFields()

MediaWiki\HookContainer\HookRunner::onAuthChangeFormFields (   $requests,
  $fieldInfo,
$formDescriptor,
  $action 
)

This hook is called after converting a field information array obtained from a set of AuthenticationRequest classes into a form descriptor; hooks can tweak the array to change how login etc.

forms should look.

Since
1.35
Parameters
AuthenticationRequest[]$requestsArray of AuthenticationRequests the fields are created from
array$fieldInfoField information array (union of all AuthenticationRequest::getFieldInfo() responses)
array&$formDescriptorHTMLForm descriptor. The special key 'weight' can be set to change the order of the fields.
string$actionOne of the AuthManager::ACTION_* constants
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\SpecialPage\Hook\AuthChangeFormFieldsHook.

Definition at line 905 of file HookRunner.php.

References MediaWiki\$action.

◆ onAuthManagerLoginAuthenticateAudit()

MediaWiki\HookContainer\HookRunner::onAuthManagerLoginAuthenticateAudit (   $response,
  $user,
  $username,
  $extraData 
)

This hook is called when a login attempt either succeeds or fails for a reason other than misconfiguration or session loss.

No return data is accepted; this hook is for auditing only.

Since
1.35
Parameters
AuthenticationResponse$responseResponse in either a PASS or FAIL state
User | null$userUser being authenticated against, or null if authentication failed before getting that far
string$usernameA guess at the username being authenticated, or null if we can't even determine that. When $user is not null, it can be in the form of <username><more info> (e.g. for bot passwords).
string[]$extraDataArray (string => string) with extra information, intended to be added to log contexts. Fields it might include:
  • appId: application ID, only if the login was with a bot password
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Auth\Hook\AuthManagerLoginAuthenticateAuditHook.

Definition at line 914 of file HookRunner.php.

◆ onAutopromoteCondition()

MediaWiki\HookContainer\HookRunner::onAutopromoteCondition (   $type,
  $args,
  $user,
$result 
)

Use this hook to check autopromote condition for user.

Since
1.35
Parameters
string$typeCondition type
array$argsArguments
User$user
array&$resultResult of checking autopromote condition
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\User\Hook\AutopromoteConditionHook.

Definition at line 923 of file HookRunner.php.

References $args, and $type.

◆ onBacklinkCacheGetConditions()

MediaWiki\HookContainer\HookRunner::onBacklinkCacheGetConditions (   $table,
  $title,
$conds 
)

Use this hook to set conditions for query when links to certain title are fetched.

Since
1.35
Parameters
string$tableTable name
Title$titleTitle of the page to which backlinks are sought
array&$condsQuery conditions
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Cache\Hook\BacklinkCacheGetConditionsHook.

Definition at line 930 of file HookRunner.php.

References $title.

◆ onBacklinkCacheGetPrefix()

MediaWiki\HookContainer\HookRunner::onBacklinkCacheGetPrefix (   $table,
$prefix 
)

Use this hook to set a prefix for a specific link table.

Since
1.35
Parameters
string$tableTable name
string&$prefixPrefix
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Cache\Hook\BacklinkCacheGetPrefixHook.

Definition at line 937 of file HookRunner.php.

◆ onBadImage()

MediaWiki\HookContainer\HookRunner::onBadImage (   $name,
$bad 
)

This hook is called when checking against the bad image list.

If an image is "bad", it is not rendered inline in wiki pages or galleries in category pages.

Since
1.35
Parameters
string$nameImage name being checked
bool&$badWhether or not the image is "bad"
Returns
bool|void True or no return value to continue, or false and change $bad to override

Implements MediaWiki\Hook\BadImageHook.

Definition at line 944 of file HookRunner.php.

◆ onBaseTemplateAfterPortlet()

MediaWiki\HookContainer\HookRunner::onBaseTemplateAfterPortlet (   $template,
  $portlet,
$html 
)

This hook is called after output of portlets, allow injecting custom HTML after the section.

Any uses of the hook need to handle escaping.

Since
1.35
Parameters
BaseTemplate$template
string$portletPortlet name
string&$html
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\BaseTemplateAfterPortletHook.

Definition at line 951 of file HookRunner.php.

◆ onBaseTemplateToolbox()

MediaWiki\HookContainer\HookRunner::onBaseTemplateToolbox (   $sk,
$toolbox 
)

This hook is called by BaseTemplate when building the $toolbox array and returning it for the skin to output.

You can add items to the toolbox while still letting the skin make final decisions on skin-specific markup conventions using this hook.

Since
1.35
Parameters
BaseTemplate$skBase skin template
array&$toolboxArray of toolbox items, see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\BaseTemplateToolboxHook.

Definition at line 958 of file HookRunner.php.

◆ onBeforeDisplayNoArticleText()

MediaWiki\HookContainer\HookRunner::onBeforeDisplayNoArticleText (   $article)

This hook is called before displaying message key "noarticletext" or "noarticletext-nopermission" at Article::showMissingArticle().

Since
1.35
Parameters
Article$article
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\BeforeDisplayNoArticleTextHook.

Definition at line 965 of file HookRunner.php.

◆ onBeforeHttpsRedirect()

MediaWiki\HookContainer\HookRunner::onBeforeHttpsRedirect (   $context,
$redirect 
)

This hook is called prior to forcing HTTP->HTTPS redirect.

Use this hook to override how the redirect is output. ATTENTION: This hook is likely to be removed soon due to overall design of the system.

Since
1.35
Parameters
IContextSource$context
string&$redirectstring URL, modifiable
Returns
bool|void True or no return value to continue, or false to let standard HTTP rendering take place

Implements MediaWiki\Hook\BeforeHttpsRedirectHook.

Definition at line 972 of file HookRunner.php.

References MediaWiki\$context.

◆ onBeforeInitialize()

MediaWiki\HookContainer\HookRunner::onBeforeInitialize (   $title,
  $unused,
  $output,
  $user,
  $request,
  $mediaWiki 
)

This hook is called before anything is initialized in MediaWiki::performRequest().

Since
1.35
Parameters
Title$titleTitle being used for request
null$unused
OutputPage$output
User$user
WebRequest$request
MediaWiki$mediaWiki
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\BeforeInitializeHook.

Definition at line 979 of file HookRunner.php.

References $title.

◆ onBeforePageDisplay()

MediaWiki\HookContainer\HookRunner::onBeforePageDisplay (   $out,
  $skin 
)

This hook is called prior to outputting a page.

Since
1.35
Parameters
OutputPage$out
Skin$skin
Returns
void This hook must not abort, it must return no value

Implements MediaWiki\Hook\BeforePageDisplayHook.

Definition at line 988 of file HookRunner.php.

◆ onBeforePageRedirect()

MediaWiki\HookContainer\HookRunner::onBeforePageRedirect (   $out,
$redirect,
$code 
)

This hook is called prior to sending an HTTP redirect.

Gives a chance to override how the redirect is output by modifying, or by returning false and taking over the output.

Since
1.35
Parameters
OutputPage$out
string&$redirectURL, modifiable
int&$codeHTTP code (eg '301' or '302'), modifiable
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\BeforePageRedirectHook.

Definition at line 996 of file HookRunner.php.

◆ onBeforeParserFetchFileAndTitle()

MediaWiki\HookContainer\HookRunner::onBeforeParserFetchFileAndTitle (   $parser,
  $nt,
$options,
$descQuery 
)

This hook is called before an image is rendered by Parser.

Since
1.35
Parameters
Parser$parser
Title$ntImage title
array&$optionsArray of options to RepoGroup::findFile. If it contains 'broken' as a key then the file will appear as a broken thumbnail. If it contains private as a key, the value must be a User object.
string&$descQueryQuery string to add to thumbnail URL
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\BeforeParserFetchFileAndTitleHook.

Definition at line 1003 of file HookRunner.php.

◆ onBeforeParserFetchTemplateAndtitle()

MediaWiki\HookContainer\HookRunner::onBeforeParserFetchTemplateAndtitle (   $parser,
  $title,
$skip,
$id 
)

This hook is called before a template is fetched by Parser.

Since
1.35
Parameters
Parser$parser
Title$titleTitle of the template
bool&$skipSkip this template and link it?
int&$idID of the revision being parsed
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\BeforeParserFetchTemplateAndtitleHook.

Definition at line 1012 of file HookRunner.php.

References $title.

◆ onBeforeParserrenderImageGallery()

MediaWiki\HookContainer\HookRunner::onBeforeParserrenderImageGallery (   $parser,
  $ig 
)

This hook is called before an image gallery is rendered by Parser.

Since
1.35
Parameters
Parser$parser
ImageGalleryBase$igImageGallery object
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\BeforeParserrenderImageGalleryHook.

Definition at line 1021 of file HookRunner.php.

◆ onBeforeResetNotificationTimestamp()

MediaWiki\HookContainer\HookRunner::onBeforeResetNotificationTimestamp ( $userObj,
$titleObj,
  $force,
$oldid 
)

This hook is called before the notification timestamp of a watched item is reset.

Since
1.35
Parameters
User&$userObj
Title&$titleObj
string$forceIf this is the string "force", then the reset will be done even if the page is not watched
int&$oldidRevision ID
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\BeforeResetNotificationTimestampHook.

Definition at line 1028 of file HookRunner.php.

◆ onBeforeRevertedTagUpdate()

MediaWiki\HookContainer\HookRunner::onBeforeRevertedTagUpdate (   $wikiPage,
  $user,
  $summary,
  $flags,
  $revisionRecord,
  $editResult,
$approved 
)

This hook is called before scheduling a RevertedTagUpdateJob.

Various content management extensions that involve some kind of approval mechanism for edits can use this to indicate that the RevertedTagUpdate should not be performed right after the edit is made, but rather it should wait for the edit to be approved. To delay the execution of the update simply implement this hook and set the $approved parameter to false when the user does not have an "autoreview" user right or similar.

The update can be later rescheduled using RevertedTagUpdateManager. In your code that marks an edit as "approved" use:

$revertedTagUpdateManager =
MediaWikiServices::getInstance()->getRevertedTagUpdateManager();
$revertedTagUpdateManager->approveRevertedTagForRevision( $acceptedRevisionId );

And that's it.

There should be no adverse effects due to enqueueing the same update multiple times.

Since
1.36
Parameters
WikiPage$wikiPageWikiPage modified
UserIdentity$userUser performing the modification
CommentStoreComment$summaryEdit summary/comment
int$flagsFlags passed to WikiPage::doEditContent()
RevisionRecord$revisionRecordNew RevisionRecord of the article
EditResult$editResultObject storing information about the effects of this edit, including which edits were reverted and which edit is this based on (for reverts and null edits).
bool&$approvedWhether the edit is considered approved. Setting it to false will abort the update, true will cause the update to be executed normally. If patrolling is enabled, the passed value will indicate whether the edit is autopatrolled or not. In case patrolling is disabled on the wiki, the passed value will always be true, unless modified by other extensions.
Returns
void This hook must not abort, it must return no value

Implements MediaWiki\Storage\Hook\BeforeRevertedTagUpdateHook.

Definition at line 1037 of file HookRunner.php.

◆ onBeforeWelcomeCreation()

MediaWiki\HookContainer\HookRunner::onBeforeWelcomeCreation ( $welcome_creation_msg,
$injected_html 
)

This hook is called before the welcomecreation message is displayed to a newly created user.

Since
1.35
Parameters
string&$welcome_creation_msgMediaWiki message name to display on the welcome screen to a newly created user account.
string&$injected_htmlAny HTML to inject after the "logged in" message of a newly created user account
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\BeforeWelcomeCreationHook.

Definition at line 1048 of file HookRunner.php.

◆ onBitmapHandlerCheckImageArea()

MediaWiki\HookContainer\HookRunner::onBitmapHandlerCheckImageArea (   $image,
$params,
$checkImageAreaHookResult 
)

This hook is called by BitmapHandler::normaliseParams, after all normalizations have been performed, except for the $wgMaxImageArea check.

Since
1.35
Parameters
File$image
array&$paramsArray of parameters
bool | null&$checkImageAreaHookResultSet to true or false to override the $wgMaxImageArea check result
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\BitmapHandlerCheckImageAreaHook.

Definition at line 1057 of file HookRunner.php.

◆ onBitmapHandlerTransform()

MediaWiki\HookContainer\HookRunner::onBitmapHandlerTransform (   $handler,
  $image,
$scalerParams,
$mto 
)

This hook is called before a file is transformed, giving extensions the possibility to transform it themselves.

Since
1.35
Parameters
TransformationalImageHandler$handler
File$image
array&$scalerParamsArray with scaler parameters
null | MediaTransformOutput&$mto
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\BitmapHandlerTransformHook.

Definition at line 1066 of file HookRunner.php.

◆ onBlockIp()

MediaWiki\HookContainer\HookRunner::onBlockIp (   $block,
  $user,
$reason 
)

This hook is called before an IP address or user is blocked.

Since
1.35
Parameters
DatabaseBlock$blockthe Block object about to be saved
User$userthe user doing the block (not the one being blocked)
array&$reasonif the hook is aborted, the error message to be returned in an array
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\BlockIpHook.

Definition at line 1075 of file HookRunner.php.

◆ onBlockIpComplete()

MediaWiki\HookContainer\HookRunner::onBlockIpComplete (   $block,
  $user,
  $priorBlock 
)

This hook is called after an IP address or user is blocked.

Since
1.35
Parameters
DatabaseBlock$blockthe block object that was saved
User$userthe user who did the block (not the one being blocked)
?DatabaseBlock$priorBlock the block object for the prior block, if there was one
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\BlockIpCompleteHook.

Definition at line 1082 of file HookRunner.php.

◆ onBookInformation()

MediaWiki\HookContainer\HookRunner::onBookInformation (   $isbn,
  $output 
)

This hook is called before information output on Special:Booksources.

Since
1.35
Parameters
string$isbnISBN to show information for
OutputPage$outputOutputPage object in use
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\BookInformationHook.

Definition at line 1089 of file HookRunner.php.

◆ onCanIPUseHTTPS()

MediaWiki\HookContainer\HookRunner::onCanIPUseHTTPS (   $ip,
$canDo 
)

Use this hook to determine whether the client at a given source IP is likely to be able to access the wiki via HTTPS.

Deprecated:
since 1.35 This feature will be removed. All clients should use HTTPS.
Since
1.35
Parameters
string$ipIP address in human-readable form
bool&$canDoSet to false if the client may not be able to use HTTPS
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\CanIPUseHTTPSHook.

Definition at line 1096 of file HookRunner.php.

◆ onCanonicalNamespaces()

MediaWiki\HookContainer\HookRunner::onCanonicalNamespaces ( $namespaces)

Use this hook to add namespaces or alter the defaults.

Note that if you need to specify namespace protection or content model for a namespace that is added in a CanonicalNamespaces hook handler, you should do so by altering $wgNamespaceProtection and $wgNamespaceContentModels outside the handler, in top-level scope. The point at which the CanonicalNamespaces hook fires is too late for altering these variables. This applies even if the namespace addition is conditional; it is permissible to declare a content model and protection for a namespace and then decline to actually register it.

Since
1.35
Parameters
string[]&$namespacesArray of namespace numbers with corresponding canonical names
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\CanonicalNamespacesHook.

Definition at line 1103 of file HookRunner.php.

◆ onCategoryAfterPageAdded()

MediaWiki\HookContainer\HookRunner::onCategoryAfterPageAdded (   $category,
  $wikiPage 
)

This hook is called after a page is added to a category.

Since
1.35
Parameters
Category$categoryCategory that page was added to
WikiPage$wikiPageWikiPage that was added
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\CategoryAfterPageAddedHook.

Definition at line 1110 of file HookRunner.php.

◆ onCategoryAfterPageRemoved()

MediaWiki\HookContainer\HookRunner::onCategoryAfterPageRemoved (   $category,
  $wikiPage,
  $id 
)

This hook is called after a page is removed from a category.

Since
1.35
Parameters
Category$categoryCategory that page was removed from
WikiPage$wikiPageWikiPage that was removed
int$idPage ID (original ID in case of page deletions)
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\CategoryAfterPageRemovedHook.

Definition at line 1117 of file HookRunner.php.

◆ onCategoryPageView()

MediaWiki\HookContainer\HookRunner::onCategoryPageView (   $catpage)

This hook is called before viewing a categorypage in CategoryPage::view.

Since
1.35
Parameters
CategoryPage$catpage
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\CategoryPageViewHook.

Definition at line 1124 of file HookRunner.php.

◆ onCategoryViewer__doCategoryQuery()

MediaWiki\HookContainer\HookRunner::onCategoryViewer__doCategoryQuery (   $type,
  $res 
)

This hook is called after querying for pages to be displayed in a Category page.

Use this hook to batch load any related data about the pages.

Since
1.35
Parameters
string$typeCategory type, either 'page', 'file', or 'subcat'
IResultWrapper$resQuery result from Wikimedia\Rdbms\IDatabase::select()
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\CategoryViewer__doCategoryQueryHook.

Definition at line 1131 of file HookRunner.php.

References $res, and $type.

◆ onCategoryViewer__generateLink()

MediaWiki\HookContainer\HookRunner::onCategoryViewer__generateLink (   $type,
  $title,
  $html,
$link 
)

This hook is called before generating an output link allow extensions opportunity to generate a more specific or relevant link.

Since
1.35
Parameters
string$typeCategory type, either 'page', 'img', or 'subcat'
Title$titleCategorized page
string$htmlRequested HTML content of anchor
string&$linkReturned value. When set to a non-null value by a hook subscriber, this value will be used as the anchor instead of Linker::link.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\CategoryViewer__generateLinkHook.

Definition at line 1138 of file HookRunner.php.

References $title, and $type.

◆ onChangeAuthenticationDataAudit()

MediaWiki\HookContainer\HookRunner::onChangeAuthenticationDataAudit (   $req,
  $status 
)

This hook is called when a user changes their password.

No return data is accepted; this hook is for auditing only.

Since
1.35
Parameters
AuthenticationRequest$reqObject describing the change (and target user)
StatusValue$statusStatusValue with the result of the action
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\SpecialPage\Hook\ChangeAuthenticationDataAuditHook.

Definition at line 1145 of file HookRunner.php.

◆ onChangesListInitRows()

MediaWiki\HookContainer\HookRunner::onChangesListInitRows (   $changesList,
  $rows 
)

Use this hook to batch process change list rows prior to rendering.

Since
1.35
Parameters
ChangesList$changesList
IResultWrapper | \\stdClass[]$rowsData that will be rendered
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\ChangesListInitRowsHook.

Definition at line 1152 of file HookRunner.php.

◆ onChangesListInsertArticleLink()

MediaWiki\HookContainer\HookRunner::onChangesListInsertArticleLink (   $changesList,
$articlelink,
$s,
  $rc,
  $unpatrolled,
  $watched 
)

Use this hook to override or augment link to article in RC list.

Since
1.35
Parameters
ChangesList$changesList
string&$articlelinkHTML of link to article (already filled-in)
string&$sHTML of row that is being constructed
RecentChange$rc
bool$unpatrolledWhether or not we are showing unpatrolled changes
bool$watchedWhether or not the change is watched by the user
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\ChangesListInsertArticleLinkHook.

Definition at line 1159 of file HookRunner.php.

References $s.

◆ onChangesListSpecialPageQuery()

MediaWiki\HookContainer\HookRunner::onChangesListSpecialPageQuery (   $name,
$tables,
$fields,
$conds,
$query_options,
$join_conds,
  $opts 
)

This hook is called when building an SQL query on pages inheriting from ChangesListSpecialPage (in core: RecentChanges, RecentChangesLinked and Watchlist).

Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure. Instead, use sub-classes of those classes in conjunction with the ChangesListSpecialPageStructuredFilters hook. This hook can be used to implement filters that do not implement that structure or custom behavior that is not an individual filter.

Since
1.35
Parameters
string$nameName of the special page, e.g. 'Watchlist'
array&$tablesArray of tables to be queried
array&$fieldsArray of columns to select
array&$condsArray of WHERE conditionals for query
array&$query_optionsArray of options for the database request
array&$join_condsJoin conditions for the tables
FormOptions$optsFormOptions for this request
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\SpecialPage\Hook\ChangesListSpecialPageQueryHook.

Definition at line 1168 of file HookRunner.php.

◆ onChangesListSpecialPageStructuredFilters()

MediaWiki\HookContainer\HookRunner::onChangesListSpecialPageStructuredFilters (   $special)

Use this hook to register filters for pages inheriting from ChangesListSpecialPage (in core: RecentChanges,vRecentChangesLinked, and Watchlist).

Generally, you will want to construct new ChangesListBooleanFilter or ChangesListStringOptionsFilter objects. When constructing them, you specify which group they belong to. You can reuse existing groups (accessed through $special->getFilterGroup), or create your own (ChangesListBooleanFilterGroup or ChangesListStringOptionsFilterGroup). If you create new groups, you must register them with $special->registerFilterGroup. Note that this is called regardless of whether the user is currently using the new (structured) or old (unstructured) filter UI. If you want your boolean filter to show on both the new and old UI, specify all the supported fields. These include showHide, label, and description. See the constructor of each ChangesList* class for documentation of supported fields.

Since
1.35
Parameters
ChangesListSpecialPage$special
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\SpecialPage\Hook\ChangesListSpecialPageStructuredFiltersHook.

Definition at line 1178 of file HookRunner.php.

◆ onChangeTagAfterDelete()

MediaWiki\HookContainer\HookRunner::onChangeTagAfterDelete (   $tag,
$status 
)

This hook is called after a change tag has been deleted (that is, removed from all revisions and log entries to which it was applied).

This gives extensions a chance to take it off their books.

Since
1.35
Parameters
string$tagName of the tag
Status&$statusAdd warnings to this as required. There is no point setting errors, as the deletion has already been partly carried out by this point.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\ChangeTags\Hook\ChangeTagAfterDeleteHook.

Definition at line 1185 of file HookRunner.php.

◆ onChangeTagCanCreate()

MediaWiki\HookContainer\HookRunner::onChangeTagCanCreate (   $tag,
  $user,
$status 
)

Use this hook to tell whether a change tag should be able to be created from the UI (Special:Tags) or via the API.

You could use this hook if you want to reserve a specific "namespace" of tags, or something similar.

Since
1.35
Parameters
string$tagName of the tag
User$userUser initiating the action
Status&$statusAdd your errors using $status->fatal() or warnings using $status->warning(). Errors and warnings will be relayed to the user. If you set an error, the user will be unable to create the tag.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\ChangeTags\Hook\ChangeTagCanCreateHook.

Definition at line 1192 of file HookRunner.php.

◆ onChangeTagCanDelete()

MediaWiki\HookContainer\HookRunner::onChangeTagCanDelete (   $tag,
  $user,
$status 
)

Use this hook to tell whether a change tag should be able to be deleted from the UI (Special:Tags) or via the API.

The default is that tags defined using the ListDefinedTags hook are not allowed to be deleted unless specifically allowed. Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions.

Since
1.35
Parameters
string$tagName of the tag
User$userUser initiating the action
Status&$statusTo allow deletion of the tag, set $status = Status::newGood(), and then return false from the hook function.
Returns
bool|void True or no return value to continue or false to allow deletion of the tag

Implements MediaWiki\ChangeTags\Hook\ChangeTagCanDeleteHook.

Definition at line 1199 of file HookRunner.php.

◆ onChangeTagsAfterUpdateTags()

MediaWiki\HookContainer\HookRunner::onChangeTagsAfterUpdateTags (   $addedTags,
  $removedTags,
  $prevTags,
  $rc_id,
  $rev_id,
  $log_id,
  $params,
  $rc,
  $user 
)

This hook is called after tags have been updated with the ChangeTags::updateTags function.

Since
1.35
Parameters
string[]$addedTagsTags effectively added in the update
string[]$removedTagsTags effectively removed in the update
string[]$prevTagsTags that were present prior to the update
int$rc_idRecentchanges table id
int$rev_idRevision table id
int$log_idLogging table id
string | null$paramsTag params
RecentChange | null$rcRecentChange being tagged when the tagging accompanies the action, or null
User | null$userUser who performed the tagging when the tagging is subsequent to the action, or null
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\ChangeTags\Hook\ChangeTagsAfterUpdateTagsHook.

Definition at line 1206 of file HookRunner.php.

◆ onChangeTagsAllowedAdd()

MediaWiki\HookContainer\HookRunner::onChangeTagsAllowedAdd ( $allowedTags,
  $addTags,
  $user 
)

This hook is called when checking if a user can add tags to a change.

Since
1.35
Parameters
string[]&$allowedTagsList of all the tags the user is allowed to add. Any tags the user wants to add ($addTags) that are not in this array will cause it to fail. You may add or remove tags to this array as required.
string[]$addTagsList of tags user intends to add
User$userUser who is adding the tags
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\ChangeTags\Hook\ChangeTagsAllowedAddHook.

Definition at line 1216 of file HookRunner.php.

◆ onChangeTagsListActive()

MediaWiki\HookContainer\HookRunner::onChangeTagsListActive ( $tags)

Use this hook to nominate which of the tags your extension uses are in active use.

Since
1.35
Parameters
string[]&$tagsList of all active tags. Append to this array.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\ChangeTags\Hook\ChangeTagsListActiveHook.

Definition at line 1223 of file HookRunner.php.

◆ onChangeUserGroups()

MediaWiki\HookContainer\HookRunner::onChangeUserGroups (   $performer,
  $user,
$add,
$remove 
)

This hook is called before user groups are changed.

Since
1.35
Parameters
User$performerThe User who will perform the change
User$userThe User whose groups will be changed
array&$addThe groups that will be added
array&$removeThe groups that will be removed
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\ChangeUserGroupsHook.

Definition at line 1230 of file HookRunner.php.

◆ onCollation__factory()

MediaWiki\HookContainer\HookRunner::onCollation__factory (   $collationName,
$collationObject 
)

This hook is called if $wgCategoryCollation is an unknown collation.

Since
1.35
Parameters
string$collationNameName of the collation in question
Collation | null&$collationObjectNull. Replace with a subclass of the Collation class that implements the collation given in $collationName.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\Collation__factoryHook.

Definition at line 1237 of file HookRunner.php.

◆ onConfirmEmailComplete()

MediaWiki\HookContainer\HookRunner::onConfirmEmailComplete (   $user)

This hook is called after a user's email has been confirmed successfully.

Since
1.35
Parameters
User$userUser whose email is being confirmed
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\User\Hook\ConfirmEmailCompleteHook.

Definition at line 1244 of file HookRunner.php.

◆ onContentAlterParserOutput()

MediaWiki\HookContainer\HookRunner::onContentAlterParserOutput (   $content,
  $title,
  $parserOutput 
)

Use this hook to modify parser output for a given content object.

This hook is called by Content::getParserOutput after parsing has finished. Can be used for changes that depend on the result of the parsing but have to be done before LinksUpdate is called (such as adding tracking categories based on the rendered HTML).

Since
1.35
Parameters
Content$contentContent to render
Title$titleTitle of the page, as context
ParserOutput$parserOutputParserOutput to manipulate
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Content\Hook\ContentAlterParserOutputHook.

Definition at line 1251 of file HookRunner.php.

References $content, and $title.

◆ onContentGetParserOutput()

MediaWiki\HookContainer\HookRunner::onContentGetParserOutput (   $content,
  $title,
  $revId,
  $options,
  $generateHtml,
$output 
)

Use this hook to customize parser output for a given content object.

This hook is called by AbstractContent::getParserOutput. May be used to override the normal model-specific rendering of page content.

Since
1.35
Parameters
Content$contentContent to render
Title$titleTitle of the page, as context
int$revIdRevision ID, as context
ParserOptions$optionsParserOptions for rendering. To avoid confusing the parser cache, the output can only depend on parameters provided to this hook function, not on global state.
bool$generateHtmlWhether full HTML should be generated. If false, generation of HTML may be skipped, but other information should still be present in the ParserOutput object.
ParserOutput&$outputParserOutput to manipulate or replace
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Content\Hook\ContentGetParserOutputHook.

Definition at line 1258 of file HookRunner.php.

References $content, and $title.

◆ onContentHandlerDefaultModelFor()

MediaWiki\HookContainer\HookRunner::onContentHandlerDefaultModelFor (   $title,
$model 
)

This hook is called when the default content model is determined for a given title.

Use this hook to assign a different model for that title.

Since
1.35
Parameters
Title$titleTitle in question
string&$modelModel name. Use with CONTENT_MODEL_XXX constants.
Returns
bool|void True or no return value to continue or false to abort

Implements Revision\Hook\ContentHandlerDefaultModelForHook.

Definition at line 1267 of file HookRunner.php.

References $title.

◆ onContentHandlerForModelID()

MediaWiki\HookContainer\HookRunner::onContentHandlerForModelID (   $modeName,
$handler 
)

This hook is called when a ContentHandler is requested for a given content model name, but no entry for that model exists in $wgContentHandlers.

Note: if your extension implements additional models via this hook, please use GetContentModels hook to make them known to core.

Since
1.35
Parameters
string$modeNameRequested content model name
ContentHandler&$handlerSet this to a ContentHandler object, if desired
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Content\Hook\ContentHandlerForModelIDHook.

Definition at line 1274 of file HookRunner.php.

◆ onContentModelCanBeUsedOn()

MediaWiki\HookContainer\HookRunner::onContentModelCanBeUsedOn (   $contentModel,
  $title,
$ok 
)

Use this hook to determine whether a content model can be used on a given page.

This is especially useful to prevent some content models from being used in a certain location.

Since
1.35
Parameters
string$contentModelContent model ID
Title$title
bool&$okWhether it is OK to use $contentModel on $title. Handler functions that modify $ok should generally return false to prevent the remaining hooks from further modifying $ok.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Content\Hook\ContentModelCanBeUsedOnHook.

Definition at line 1281 of file HookRunner.php.

References $title.

◆ onContentSecurityPolicyDefaultSource()

MediaWiki\HookContainer\HookRunner::onContentSecurityPolicyDefaultSource ( $defaultSrc,
  $policyConfig,
  $mode 
)

Use this hook to modify the allowed CSP load sources.

This affects all directives except for the script directive. To add a script source, see ContentSecurityPolicyScriptSource hook.

Since
1.35
Parameters
string[]&$defaultSrcArray of Content-Security-Policy allowed sources
array$policyConfigCurrent configuration for the Content-Security-Policy header
string$modeContentSecurityPolicy::REPORT_ONLY_MODE or ContentSecurityPolicy::FULL_MODE depending on type of header
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\ContentSecurityPolicyDefaultSourceHook.

Definition at line 1288 of file HookRunner.php.

◆ onContentSecurityPolicyDirectives()

MediaWiki\HookContainer\HookRunner::onContentSecurityPolicyDirectives ( $directives,
  $policyConfig,
  $mode 
)

If ContentSecurityPolicyDefaultSource and ContentSecurityPolicyScriptSource do not meet your needs, use this hook to modify the content security policy directives.

Since
1.35
Parameters
string[]&$directivesArray of CSP directives
array$policyConfigCurrent configuration for the CSP header
string$modeContentSecurityPolicy::REPORT_ONLY_MODE or ContentSecurityPolicy::FULL_MODE depending on type of header
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\ContentSecurityPolicyDirectivesHook.

Definition at line 1297 of file HookRunner.php.

◆ onContentSecurityPolicyScriptSource()

MediaWiki\HookContainer\HookRunner::onContentSecurityPolicyScriptSource ( $scriptSrc,
  $policyConfig,
  $mode 
)

Use this hook to modify the allowed CSP script sources.

Note that you also have to use ContentSecurityPolicyDefaultSource if you want non-script sources to be loaded from whatever you add.

Since
1.35
Parameters
string[]&$scriptSrcArray of CSP directives
array$policyConfigCurrent configuration for the CSP header
string$modeContentSecurityPolicy::REPORT_ONLY_MODE or ContentSecurityPolicy::FULL_MODE depending on type of header
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\ContentSecurityPolicyScriptSourceHook.

Definition at line 1306 of file HookRunner.php.

◆ onContribsPager__getQueryInfo()

MediaWiki\HookContainer\HookRunner::onContribsPager__getQueryInfo (   $pager,
$queryInfo 
)

This hook is called before the contributions query is about to run.

Since
1.35
Parameters
ContribsPager$pagerPager object for contributions
array&$queryInfoThe query for the contribs Pager
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\ContribsPager__getQueryInfoHook.

Definition at line 1315 of file HookRunner.php.

◆ onContribsPager__reallyDoQuery()

MediaWiki\HookContainer\HookRunner::onContribsPager__reallyDoQuery ( $data,
  $pager,
  $offset,
  $limit,
  $descending 
)

This hook is called before really executing the query for My Contributions.

Since
1.35
Parameters
array&$dataan array of results of all contribs queries
ContribsPager$pagerThe ContribsPager object hooked into
string$offsetIndex offset, inclusive
int$limitExact query limit
bool$descendingQuery direction, false for ascending, true for descending
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\ContribsPager__reallyDoQueryHook.

Definition at line 1322 of file HookRunner.php.

◆ onContributionsLineEnding()

MediaWiki\HookContainer\HookRunner::onContributionsLineEnding (   $pager,
$ret,
  $row,
$classes,
$attribs 
)

This hook is called before a contributions HTML line is finished.

Since
1.35
Parameters
ContribsPager$pagerThe ContribsPager object hooked into
string&$retThe HTML line
stdClass$rowThe DB row for this line
string[]&$classesThe classes to add to the surrounding
string[]&$attribsAssociative array of other HTML attributes for the element. Currently only data attributes reserved to MediaWiki are allowed (see Sanitizer::isReservedDataAttribute).
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\ContributionsLineEndingHook.

Definition at line 1331 of file HookRunner.php.

◆ onContributionsToolLinks()

MediaWiki\HookContainer\HookRunner::onContributionsToolLinks (   $id,
Title  $title,
array &  $tools,
SpecialPage  $specialPage 
)

Use this hook to change the tool links above Special:Contributions.

Since
1.35
Parameters
int$idUser identifier
Title$titleUser page title
string[]&$toolsArray of tool links
SpecialPage$specialPageSpecialPage instance for context and services. Can be either SpecialContributions or DeletedContributionsPage. Extensions should type hint against a generic SpecialPage though.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\ContributionsToolLinksHook.

Definition at line 1340 of file HookRunner.php.

References $title.

◆ onConvertContent()

MediaWiki\HookContainer\HookRunner::onConvertContent (   $content,
  $toModel,
  $lossy,
$result 
)

This hook is called by AbstractContent::convert when a conversion to another content model is requested.

Handler functions that modify $result should generally return false to disable further attempts at conversion.

Since
1.35
Parameters
Content$contentContent object to be converted
string$toModelID of the content model to convert to
bool$lossyWhether lossy conversion is allowed
Content | bool&$resultOutput parameter, in case the handler function wants to provide a converted Content object. Note that $result->getContentModel() must return $toModel.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Content\Hook\ConvertContentHook.

Definition at line 1347 of file HookRunner.php.

References $content.

◆ onCustomEditor()

MediaWiki\HookContainer\HookRunner::onCustomEditor (   $article,
  $user 
)

This hook is called when invoking the page editor.

Since
1.35
Parameters
Article$articleArticle being edited
User$userUser performing the edit
Returns
bool|void True or no return value to allow the normal editor to be used. False if implementing a custom editor, e.g. for a special namespace, etc.

Implements MediaWiki\Hook\CustomEditorHook.

Definition at line 1354 of file HookRunner.php.

◆ onDeletedContribsPager__reallyDoQuery()

MediaWiki\HookContainer\HookRunner::onDeletedContribsPager__reallyDoQuery ( $data,
  $pager,
  $offset,
  $limit,
  $descending 
)

This hook is called before really executing the query for Special:DeletedContributions.

See also
ContribsPager__reallyDoQueryHook
Since
1.35
Parameters
array&$dataan array of results of all contribs queries
DeletedContribsPager$pagerThe DeletedContribsPager object hooked into
string$offsetIndex offset, inclusive
int$limitExact query limit
bool$descendingQuery direction, false for ascending, true for descending
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\DeletedContribsPager__reallyDoQueryHook.

Definition at line 1361 of file HookRunner.php.

◆ onDeletedContributionsLineEnding()

MediaWiki\HookContainer\HookRunner::onDeletedContributionsLineEnding (   $page,
$ret,
  $row,
$classes,
$attribs 
)

This hook is called before a DeletedContributions HTML line is finished.

See also
ContributionsLineEndingHook
Since
1.35
Parameters
DeletedContribsPager$pagePager object for DeletedContribsPager
string&$retThe HTML line
stdClass$rowThe DB row for this line
string[]&$classesThe classes to add to the surrounding
string[]&$attribsAssociative array of other HTML attributes for the element. Currently only data attributes reserved to MediaWiki are allowed (see Sanitizer::isReservedDataAttribute).
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\DeletedContributionsLineEndingHook.

Definition at line 1370 of file HookRunner.php.

◆ onDeleteUnknownPreferences()

MediaWiki\HookContainer\HookRunner::onDeleteUnknownPreferences ( $where,
  $db 
)

This hook is called by the cleanupPreferences.php maintenance script to build a WHERE clause with which to delete preferences that are not known about.

This hook is used by extensions that have dynamically-named preferences that should not be deleted in the usual cleanup process. For example, the Gadgets extension creates preferences prefixed with 'gadget-', so anything with that prefix is excluded from the deletion.

Since
1.35
Parameters
array&$whereArray that will be passed as the $cond parameter to IDatabase::select() to determine what will be deleted from the user_properties table
IDatabase$dbIDatabase object, useful for accessing $db->buildLike() etc.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\DeleteUnknownPreferencesHook.

Definition at line 1379 of file HookRunner.php.

◆ onDifferenceEngineAfterLoadNewText()

MediaWiki\HookContainer\HookRunner::onDifferenceEngineAfterLoadNewText (   $differenceEngine)

This hook is called in DifferenceEngine::loadNewText() after the new revision's content has been loaded into the class member variable $differenceEngine->mNewContent but before returning true from this function.

Since
1.35
Parameters
DifferenceEngine$differenceEngine
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Diff\Hook\DifferenceEngineAfterLoadNewTextHook.

Definition at line 1386 of file HookRunner.php.

◆ onDifferenceEngineLoadTextAfterNewContentIsLoaded()

MediaWiki\HookContainer\HookRunner::onDifferenceEngineLoadTextAfterNewContentIsLoaded (   $differenceEngine)

This hook is called in DifferenceEngine::loadText() after the new revision's content has been loaded into the class member variable $differenceEngine->mNewContent but before checking if the variable's value is null.

Use this hook to inject content into said class member variable.

Since
1.35
Parameters
DifferenceEngine$differenceEngine
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Diff\Hook\DifferenceEngineLoadTextAfterNewContentIsLoadedHook.

Definition at line 1393 of file HookRunner.php.

◆ onDifferenceEngineMarkPatrolledLink()

MediaWiki\HookContainer\HookRunner::onDifferenceEngineMarkPatrolledLink (   $differenceEngine,
$markAsPatrolledLink,
  $rcid 
)

Use this hook to change the "mark as patrolled" link which is shown both on the diff header as well as on the bottom of a page, usually wrapped in a span element which has class="patrollink".

Since
1.35
Parameters
DifferenceEngine$differenceEngine
string&$markAsPatrolledLink"Mark as patrolled" link HTML
int$rcidRecent change ID (rc_id) for this change
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Diff\Hook\DifferenceEngineMarkPatrolledLinkHook.

Definition at line 1402 of file HookRunner.php.

◆ onDifferenceEngineMarkPatrolledRCID()

MediaWiki\HookContainer\HookRunner::onDifferenceEngineMarkPatrolledRCID ( $rcid,
  $differenceEngine,
  $change,
  $user 
)

Use this hook to possibly change the rcid parameter.

For example the rcid might be set to zero due to the user being the same as the performer of the change but an extension might still want to show it under certain conditions.

Since
1.35
Parameters
int&$rcidrc_id of the change or 0
DifferenceEngine$differenceEngine
RecentChange$change
User$userCurrent user
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Diff\Hook\DifferenceEngineMarkPatrolledRCIDHook.

Definition at line 1411 of file HookRunner.php.

◆ onDifferenceEngineNewHeader()

MediaWiki\HookContainer\HookRunner::onDifferenceEngineNewHeader (   $differenceEngine,
$newHeader,
  $formattedRevisionTools,
  $nextlink,
  $rollback,
  $newminor,
  $diffOnly,
  $rdel,
  $unhide 
)

Use this hook to change the $newHeader variable, which contains information about the new revision, such as the revision's author, whether the revision was marked as a minor edit or not, etc.

Since
1.35
Parameters
DifferenceEngine$differenceEngine
string&$newHeaderString containing the various #mw-diff-otitle[1-5] divs, which include things like revision author info, revision comment, RevisionDelete link and more
array$formattedRevisionToolsArray containing revision tools, some of which may have been injected with the DiffRevisionTools hook
string$nextlinkString containing the link to the next revision (if any); also included in $newHeader
string$rollbackRollback link to roll this revision back to the previous one, if any
string$newminorString indicating if the new revision was marked as a minor edit
bool$diffOnlyBoolean parameter passed to DifferenceEngine::showDiffPage, indicating whether we should show just the diff; passed in as a query string parameter to the various URLs constructed here (i.e. $nextlink)
string$rdelRevisionDelete link for the new revision, if the current user is allowed to use the RevisionDelete feature
bool$unhideBoolean parameter indicating whether to show RevisionDeleted revisions
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Diff\Hook\DifferenceEngineNewHeaderHook.

Definition at line 1420 of file HookRunner.php.

◆ onDifferenceEngineOldHeader()

MediaWiki\HookContainer\HookRunner::onDifferenceEngineOldHeader (   $differenceEngine,
$oldHeader,
  $prevlink,
  $oldminor,
  $diffOnly,
  $ldel,
  $unhide 
)

Use this hook to change the $oldHeader variable, which contains information about the old revision, such as the revision's author, whether the revision was marked as a minor edit or not, etc.

Since
1.35
Parameters
DifferenceEngine$differenceEngine
string&$oldHeaderString containing the various #mw-diff-otitle[1-5] divs, which include things like revision author info, revision comment, RevisionDelete link and more
string$prevlinkString containing the link to the previous revision (if any); also included in $oldHeader
string$oldminorString indicating if the old revision was marked as a minor edit
bool$diffOnlyBoolean parameter passed to DifferenceEngine::showDiffPage, indicating whether we should show just the diff; passed in as a query string parameter to the various URLs constructed here (i.e. $prevlink)
string$ldelRevisionDelete link for the old revision, if the current user is allowed to use the RevisionDelete feature
bool$unhideBoolean parameter indicating whether to show RevisionDeleted revisions
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Diff\Hook\DifferenceEngineOldHeaderHook.

Definition at line 1431 of file HookRunner.php.

◆ onDifferenceEngineOldHeaderNoOldRev()

MediaWiki\HookContainer\HookRunner::onDifferenceEngineOldHeaderNoOldRev ( $oldHeader)

Use this hook to change the $oldHeader variable in cases when there is no old revision.

Since
1.35
Parameters
string&$oldHeaderEmpty string by default
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Diff\Hook\DifferenceEngineOldHeaderNoOldRevHook.

Definition at line 1441 of file HookRunner.php.

◆ onDifferenceEngineRenderRevisionAddParserOutput()

MediaWiki\HookContainer\HookRunner::onDifferenceEngineRenderRevisionAddParserOutput (   $differenceEngine,
  $out,
  $parserOutput,
  $wikiPage 
)

Use this hook to change the parser output.

Since
1.35
Parameters
DifferenceEngine$differenceEngine
OutputPage$out
ParserOutput$parserOutput
WikiPage$wikiPage
Returns
bool|void True or no return value to continue, or false to not add parser output via OutputPage's addParserOutput method

Implements MediaWiki\Diff\Hook\DifferenceEngineRenderRevisionAddParserOutputHook.

Definition at line 1448 of file HookRunner.php.

◆ onDifferenceEngineRenderRevisionShowFinalPatrolLink()

MediaWiki\HookContainer\HookRunner::onDifferenceEngineRenderRevisionShowFinalPatrolLink ( )

Use this hook to not show the final "mark as patrolled" link on the bottom of a page.

This hook has no arguments.

Since
1.35
Returns
bool|void True or no return value to continue, or false to not show the final "mark as patrolled" link

Implements MediaWiki\Diff\Hook\DifferenceEngineRenderRevisionShowFinalPatrolLinkHook.

Definition at line 1457 of file HookRunner.php.

◆ onDifferenceEngineShowDiff()

MediaWiki\HookContainer\HookRunner::onDifferenceEngineShowDiff (   $differenceEngine)

Use this hook to affect the diff text which eventually gets sent to the OutputPage object.

Since
1.35
Parameters
DifferenceEngine$differenceEngine
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Diff\Hook\DifferenceEngineShowDiffHook.

Definition at line 1464 of file HookRunner.php.

◆ onDifferenceEngineShowDiffPage()

MediaWiki\HookContainer\HookRunner::onDifferenceEngineShowDiffPage (   $out)

Use this hook to add additional output via the available OutputPage object into the diff view.

Since
1.35
Parameters
OutputPage$out
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Diff\Hook\DifferenceEngineShowDiffPageHook.

Definition at line 1471 of file HookRunner.php.

◆ onDifferenceEngineShowDiffPageMaybeShowMissingRevision()

MediaWiki\HookContainer\HookRunner::onDifferenceEngineShowDiffPageMaybeShowMissingRevision (   $differenceEngine)

This hook is called in DifferenceEngine::showDiffPage() when revision data cannot be loaded.

Since
1.35
Parameters
DifferenceEngine$differenceEngine
Returns
bool|void True or no return value to continue, or false to prevent displaying the missing revision message (i.e. to prevent DifferenceEngine::showMissingRevision() from being called)

Implements MediaWiki\Diff\Hook\DifferenceEngineShowDiffPageMaybeShowMissingRevisionHook.

Definition at line 1478 of file HookRunner.php.

◆ onDifferenceEngineShowEmptyOldContent()

MediaWiki\HookContainer\HookRunner::onDifferenceEngineShowEmptyOldContent (   $differenceEngine)

Use this hook to change the diff table body (without header) in cases when there is no old revision or the old and new revisions are identical.

Since
1.35
Parameters
DifferenceEngine$differenceEngine
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Diff\Hook\DifferenceEngineShowEmptyOldContentHook.

Definition at line 1487 of file HookRunner.php.

◆ onDifferenceEngineViewHeader()

MediaWiki\HookContainer\HookRunner::onDifferenceEngineViewHeader (   $differenceEngine)

This hook is called before diff display.

Since
1.35
Parameters
DifferenceEngine$differenceEngine
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Diff\Hook\DifferenceEngineViewHeaderHook.

Definition at line 1494 of file HookRunner.php.

◆ onDiffRevisionTools()

MediaWiki\HookContainer\HookRunner::onDiffRevisionTools (   $newRev,
$links,
  $oldRev,
  $user 
)

Use this hook to override or extend the revision tools available from the diff view, i.e.

undo, etc.

Since
1.35
Parameters
Revision$newRevNew revision
string[]&$linksArray of HTML links
Revision | null$oldRevOld revision (may be null)
User$userCurrent user
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Diff\Hook\DiffRevisionToolsHook.

Definition at line 1501 of file HookRunner.php.

◆ onDiffTools()

MediaWiki\HookContainer\HookRunner::onDiffTools (   $newRevRecord,
$links,
  $oldRevRecord,
  $userIdentity 
)

Use this hook to override or extend the revision tools available from the diff view, i.e.

undo, etc.

Since
1.35
Parameters
RevisionRecord$newRevRecordNew revision
string[]&$linksArray of HTML links
RevisionRecord | null$oldRevRecordOld revision (may be null)
UserIdentity$userIdentityCurrent user
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Diff\Hook\DiffToolsHook.

Definition at line 1508 of file HookRunner.php.

◆ onDiffViewHeader()

MediaWiki\HookContainer\HookRunner::onDiffViewHeader (   $diff,
  $oldRev,
  $newRev 
)

This hook is called before diff display.

Since
1.35
Parameters
DifferenceEngine$diff
Revision | null$oldRevOld revision (may be null/invalid)
Revision$newRevNew revision
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Diff\Hook\DiffViewHeaderHook.

Definition at line 1515 of file HookRunner.php.

◆ onDisplayOldSubtitle()

MediaWiki\HookContainer\HookRunner::onDisplayOldSubtitle (   $article,
$oldid 
)

This hook is called before creating subtitle when browsing old versions of an article.

Since
1.35
Parameters
Article$articleArticle being viewed
int&$oldidOld ID being viewed
Returns
bool|void True or no return value to continue or false to abort

Implements Page\Hook\DisplayOldSubtitleHook.

Definition at line 1522 of file HookRunner.php.

◆ onEditFilter()

MediaWiki\HookContainer\HookRunner::onEditFilter (   $editor,
  $text,
  $section,
$error,
  $summary 
)

Use this hook to perform checks on an edit.

Since
1.35
Parameters
EditPage$editorEdit form (see includes/EditPage.php)
string$textContents of the edit box
string$sectionSection being edited
string&$errorError message to return
string$summaryEdit summary for page
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EditFilterHook.

Definition at line 1529 of file HookRunner.php.

◆ onEditFilterMergedContent()

MediaWiki\HookContainer\HookRunner::onEditFilterMergedContent (   $context,
  $content,
  $status,
  $summary,
  $user,
  $minoredit 
)

Use this hook for a 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. $status->apiHookResult can be set to an array to be returned by api.php action=edit. This is used to deliver captchas.

Since
1.35
Parameters
IContextSource$context
Content$contentContent of the edit box
Status$statusStatus object to represent errors, etc.
string$summaryEdit summary for page
User$userUser whois performing the edit
bool$minoreditWhether the edit was marked as minor by the user.
Returns
bool|void True or no return value to continue or false to abort the edit. Returning true if $status->isOK() returns false means "don't save but continue user interaction", e.g. show the edit form.

Implements MediaWiki\Hook\EditFilterMergedContentHook.

Definition at line 1536 of file HookRunner.php.

References $content, and MediaWiki\$context.

◆ onEditFormInitialText()

MediaWiki\HookContainer\HookRunner::onEditFormInitialText (   $editPage)

Use this hook to modify the edit form when editing existing pages.

Since
1.35
Parameters
EditPage$editPage
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EditFormInitialTextHook.

Definition at line 1545 of file HookRunner.php.

◆ onEditFormPreloadText()

MediaWiki\HookContainer\HookRunner::onEditFormPreloadText ( $text,
  $title 
)

Use this hook to populate the edit form when creating pages.

Since
1.35
Parameters
string&$textText to preload with
Title$titlePage being created
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EditFormPreloadTextHook.

Definition at line 1552 of file HookRunner.php.

References $title.

◆ onEditPage__attemptSave()

MediaWiki\HookContainer\HookRunner::onEditPage__attemptSave (   $editpage_Obj)

This hook is called before an article is saved, before WikiPage::doEditContent() is called.

Since
1.35
Parameters
EditPage$editpage_ObjCurrent EditPage object
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EditPage__attemptSaveHook.

Definition at line 1622 of file HookRunner.php.

◆ onEditPage__attemptSave_after()

MediaWiki\HookContainer\HookRunner::onEditPage__attemptSave_after (   $editpage_Obj,
  $status,
  $resultDetails 
)

This hook is called after an article save attempt.

Since
1.35
Parameters
EditPage$editpage_ObjCurrent EditPage object
Status$statusResulting Status object
array$resultDetailsResult details array
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EditPage__attemptSave_afterHook.

Definition at line 1629 of file HookRunner.php.

◆ onEditPage__importFormData()

MediaWiki\HookContainer\HookRunner::onEditPage__importFormData (   $editpage,
  $request 
)

Use this hook to read additional data posted in the form.

Since
1.35
Parameters
EditPage$editpage
WebRequest$request
Returns
bool|void Return value is ignored; this hook should always return true

Implements MediaWiki\Hook\EditPage__importFormDataHook.

Definition at line 1638 of file HookRunner.php.

◆ onEditPage__showEditForm_fields()

MediaWiki\HookContainer\HookRunner::onEditPage__showEditForm_fields (   $editor,
  $out 
)

Use this hook to inject form field into edit form.

Since
1.35
Parameters
EditPage$editorEditPage instance for reference
OutputPage$outOutputPage instance to write to
Returns
bool|void Return value is ignored; this hook should always return true

Implements MediaWiki\Hook\EditPage__showEditForm_fieldsHook.

Definition at line 1645 of file HookRunner.php.

◆ onEditPage__showEditForm_initial()

MediaWiki\HookContainer\HookRunner::onEditPage__showEditForm_initial (   $editor,
  $out 
)

This hook is called before showing the edit form.

Since
1.35
Parameters
EditPage$editor
OutputPage$outOutputPage instance to write to
Returns
bool|void True or no return value without altering $error to allow the edit to continue. Modifying $error and returning true will cause the contents of $error to be echoed at the top of the edit form as wikitext. Return false to halt editing; you'll need to handle error messages, etc. yourself.

Implements MediaWiki\Hook\EditPage__showEditForm_initialHook.

Definition at line 1652 of file HookRunner.php.

◆ onEditPage__showReadOnlyForm_initial()

MediaWiki\HookContainer\HookRunner::onEditPage__showReadOnlyForm_initial (   $editor,
  $out 
)

This hook is similar to EditPage::showEditForm:initial but for the read-only 'view source' variant of the edit form.

Since
1.35
Parameters
EditPage$editor
OutputPage$outOutputPage instance to write to
Returns
bool|void Return value is ignored; this hook should always return true

Implements MediaWiki\Hook\EditPage__showReadOnlyForm_initialHook.

Definition at line 1659 of file HookRunner.php.

◆ onEditPage__showStandardInputs_options()

MediaWiki\HookContainer\HookRunner::onEditPage__showStandardInputs_options (   $editor,
  $out,
$tabindex 
)

Use this hook to inject form fields into the editOptions area.

Since
1.35
Parameters
EditPage$editor
OutputPage$outOutputPage instance to write to
int&$tabindexHTML tabindex of the last edit check/button
Returns
bool|void Return value is ignored; this hook should always return true

Implements MediaWiki\Hook\EditPage__showStandardInputs_optionsHook.

Definition at line 1666 of file HookRunner.php.

◆ onEditPageBeforeConflictDiff()

MediaWiki\HookContainer\HookRunner::onEditPageBeforeConflictDiff (   $editor,
  $out 
)

Use this hook to modify the EditPage object and output when there's an edit conflict.

Since
1.35
Parameters
EditPage$editor
OutputPage$out
Returns
bool|void True or no return value to continue. False to halt normal diff output; in this case you're responsible for computing and outputting the entire "conflict" part, i.e., the "difference between revisions" and "your text" headers and sections.

Implements MediaWiki\Hook\EditPageBeforeConflictDiffHook.

Definition at line 1559 of file HookRunner.php.

◆ onEditPageBeforeEditButtons()

MediaWiki\HookContainer\HookRunner::onEditPageBeforeEditButtons (   $editpage,
$buttons,
$tabindex 
)

Use this hook to modify the edit buttons below the textarea in the edit form.

Since
1.35
Parameters
EditPage$editpageCurrent EditPage object
array&$buttonsArray of edit buttons, "Save", "Preview", "Live", and "Diff"
string&$tabindexHTML tabindex of the last edit check/button
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EditPageBeforeEditButtonsHook.

Definition at line 1566 of file HookRunner.php.

◆ onEditPageBeforeEditToolbar()

MediaWiki\HookContainer\HookRunner::onEditPageBeforeEditToolbar ( $toolbar)

Use this hook to add an edit toolbar above the textarea in the edit form.

Since
1.35
Parameters
string&$toolbarToolbar HTML, initially an empty <div id="toolbar"></div>
Returns
bool|void True or no return value to continue, or false to have no toolbar HTML be loaded

Implements MediaWiki\Hook\EditPageBeforeEditToolbarHook.

Definition at line 1573 of file HookRunner.php.

◆ onEditPageCopyrightWarning()

MediaWiki\HookContainer\HookRunner::onEditPageCopyrightWarning (   $title,
$msg 
)

Use this hook for site and per-namespace customization of contribution/copyright notice.

Since
1.35
Parameters
Title$titleTitle of page being edited
array&$msgAn array of arguments to wfMessage(), overridable. The default is an array containing either 'copyrightwarning' or 'copyrightwarning2' as the first element (the message key).
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EditPageCopyrightWarningHook.

Definition at line 1580 of file HookRunner.php.

References $title.

◆ onEditPageGetCheckboxesDefinition()

MediaWiki\HookContainer\HookRunner::onEditPageGetCheckboxesDefinition (   $editpage,
$checkboxes 
)

Use this hook to modify the edit checkboxes and other form fields below the textarea in the edit form.

Since
1.35
Parameters
EditPage$editpageCurrent EditPage object
array&$checkboxesArray of checkbox definitions. See EditPage::getCheckboxesDefinition() for the format.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EditPageGetCheckboxesDefinitionHook.

Definition at line 1587 of file HookRunner.php.

◆ onEditPageGetDiffContent()

MediaWiki\HookContainer\HookRunner::onEditPageGetDiffContent (   $editPage,
$newtext 
)

Use this hook to modify the wikitext that will be used in "Show changes".

Note that it is preferable to implement diff handling for different data types using the ContentHandler facility.

Since
1.35
Parameters
EditPage$editPage
Content&$newtextContent that will be used in place of "Show changes"
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EditPageGetDiffContentHook.

Definition at line 1594 of file HookRunner.php.

◆ onEditPageGetPreviewContent()

MediaWiki\HookContainer\HookRunner::onEditPageGetPreviewContent (   $editPage,
$content 
)

Use this hook to modify the wikitext that will be previewed.

Note that it is preferable to implement previews for different data types using the ContentHandler facility.

Since
1.35
Parameters
EditPage$editPage
Content&$contentContent object to be previewed (may be replaced by hook function)
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EditPageGetPreviewContentHook.

Definition at line 1601 of file HookRunner.php.

References $content.

◆ onEditPageNoSuchSection()

MediaWiki\HookContainer\HookRunner::onEditPageNoSuchSection (   $editpage,
$res 
)

This hook is called when a section edit request is given for an non-existent section.

Since
1.35
Parameters
EditPage$editpageCurrent EditPage object
string&$resHTML of the error text
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EditPageNoSuchSectionHook.

Definition at line 1608 of file HookRunner.php.

References $res.

◆ onEditPageTosSummary()

MediaWiki\HookContainer\HookRunner::onEditPageTosSummary (   $title,
$msg 
)

Use this hook for site and per-namespace customizations of terms of service summary link that might exist separately from the copyright notice.

Since
1.35
Parameters
Title$titleTitle of page being edited
string&$msgLocalization message name, overridable. Defaults to 'editpage-tos-summary'
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EditPageTosSummaryHook.

Definition at line 1615 of file HookRunner.php.

References $title.

◆ onEmailConfirmed()

MediaWiki\HookContainer\HookRunner::onEmailConfirmed (   $user,
$confirmed 
)

This hook is called when checking that the user's email address is "confirmed".

This runs before the other checks, such as anonymity and the real check; return true to allow those checks to occur, and false if checking is done.

Since
1.35
Parameters
User$userUser being checked
bool&$confirmedWhether or not the email address is confirmed
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\User\Hook\EmailConfirmedHook.

Definition at line 1675 of file HookRunner.php.

◆ onEmailUser()

MediaWiki\HookContainer\HookRunner::onEmailUser ( $to,
$from,
$subject,
$text,
$error 
)

This hook is called before sending email from one user to another.

Since
1.35
Parameters
MailAddress&$toMailAddress object of receiving user
MailAddress&$fromMailAddress object of sending user
MailAddress&$subjectsubject of the mail
string&$texttext of the mail
bool | Status | MessageSpecifier | array&$errorOut-param for an error. Should be set to a Status object or boolean false.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EmailUserHook.

Definition at line 1682 of file HookRunner.php.

◆ onEmailUserCC()

MediaWiki\HookContainer\HookRunner::onEmailUserCC ( $to,
$from,
$subject,
$text 
)

This hook is called before sending the copy of the email to the author.

Since
1.35
Parameters
MailAddress&$toMailAddress object of receiving user
MailAddress&$fromMailAddress object of sending user
string&$subjectSubject of the mail
string&$textText of the mail
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EmailUserCCHook.

Definition at line 1689 of file HookRunner.php.

◆ onEmailUserComplete()

MediaWiki\HookContainer\HookRunner::onEmailUserComplete (   $to,
  $from,
  $subject,
  $text 
)

This hook is called after sending email from one user to another.

Since
1.35
Parameters
MailAddress$toMailAddress object of receiving user
MailAddress$fromMailAddress object of sending user
string$subjectsubject of the mail
string$texttext of the mail
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EmailUserCompleteHook.

Definition at line 1696 of file HookRunner.php.

◆ onEmailUserForm()

MediaWiki\HookContainer\HookRunner::onEmailUserForm ( $form)

This hook is called after building the email user form object.

Since
1.35
Parameters
HTMLForm&$formHTMLForm object
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EmailUserFormHook.

Definition at line 1703 of file HookRunner.php.

◆ onEmailUserPermissionsErrors()

MediaWiki\HookContainer\HookRunner::onEmailUserPermissionsErrors (   $user,
  $editToken,
$hookErr 
)

Use this hook to retrieve permissions errors for emailing a user.

Since
1.35
Parameters
User$userThe user who is trying to email another user.
string$editTokenThe user's edit token.
bool | string | array&$hookErrOut-param for the error. Passed as the parameters to OutputPage::showErrorPage.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EmailUserPermissionsErrorsHook.

Definition at line 1710 of file HookRunner.php.

◆ onEnhancedChangesList__getLogText()

MediaWiki\HookContainer\HookRunner::onEnhancedChangesList__getLogText (   $changesList,
$links,
  $block 
)

Use this hook to alter, remove, or add to the links of a group of changes in EnhancedChangesList.

Since
1.35
Parameters
EnhancedChangesList$changesList
string[]&$linksLinks generated by EnhancedChangesList
RecentChange[]$blockRecentChange objects in that block
Returns
bool|void True or no return value to continue, or false to omit this line from recentchanges

Implements MediaWiki\Hook\EnhancedChangesList__getLogTextHook.

Definition at line 1735 of file HookRunner.php.

◆ onEnhancedChangesListModifyBlockLineData()

MediaWiki\HookContainer\HookRunner::onEnhancedChangesListModifyBlockLineData (   $changesList,
$data,
  $rc 
)

Use this hook to alter data used to build a non-grouped recent change line in EnhancedChangesList.

Since
1.35
Parameters
EnhancedChangesList$changesList
array&$dataArray of components that will be joined in order to create the line
RecentChange$rcRecentChange object for this line
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\EnhancedChangesListModifyBlockLineDataHook.

Definition at line 1717 of file HookRunner.php.

◆ onEnhancedChangesListModifyLineData()

MediaWiki\HookContainer\HookRunner::onEnhancedChangesListModifyLineData (   $changesList,
$data,
  $block,
  $rc,
$classes,
$attribs 
)

Use this hook to alter data used to build a grouped recent change inner line in EnhancedChangesList.

Since
1.35
Parameters
EnhancedChangesList$changesList
array&$dataArray of components that will be joined in order to create the line
RecentChange[]$blockArray of RecentChange objects in that block
RecentChange$rcRecentChange object for this line
string[]&$classesArray of classes to change
string[]&$attribsAssociative array of other HTML attributes for the <tr> element. Currently only data attributes reserved to MediaWiki are allowed (see Sanitizer::isReservedDataAttribute).
Returns
bool|void True or no return value to continue, or false to omit this line from recentchanges

Implements MediaWiki\Hook\EnhancedChangesListModifyLineDataHook.

Definition at line 1726 of file HookRunner.php.

◆ onExemptFromAccountCreationThrottle()

MediaWiki\HookContainer\HookRunner::onExemptFromAccountCreationThrottle (   $ip)

Use this hook to add an exemption from the account creation throttle.

Since
1.35
Parameters
string$ipIP address of the user
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Auth\Hook\ExemptFromAccountCreationThrottleHook.

Definition at line 1744 of file HookRunner.php.

◆ onExtensionTypes()

MediaWiki\HookContainer\HookRunner::onExtensionTypes ( $extTypes)

This hook is called when generating the extensions credits.

Use this to change the tables headers.

Since
1.35
Parameters
string[]&$extTypesAssociative array of extensions types. The key of each element contains the symbolic type string as used in extension.json, and the value contains the description of the type, in the current user language, to be used as a header on Special:Version.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\ExtensionTypesHook.

Definition at line 1751 of file HookRunner.php.

◆ onFetchChangesList()

MediaWiki\HookContainer\HookRunner::onFetchChangesList (   $user,
  $skin,
$list,
  $groups 
)

This hook is called when fetching the ChangesList derivative for a particular user.

Since
1.35
Parameters
User$userUser the list is being fetched for
Skin$skinSkin object to be used with the list
ChangesList | null&$listDefaults to NULL. Change it to an object instance and return false to override the list derivative used.
ChangesListFilterGroup[]$groupsAdded in 1.34
Returns
bool|void True or no return value to continue, or false to override the list derivative used

Implements MediaWiki\Hook\FetchChangesListHook.

Definition at line 1758 of file HookRunner.php.

◆ onFileDeleteComplete()

MediaWiki\HookContainer\HookRunner::onFileDeleteComplete (   $file,
  $oldimage,
  $article,
  $user,
  $reason 
)

This hook is called when a file is deleted.

Since
1.35
Parameters
LocalFile$fileReference to the deleted file
string$oldimageIn case of the deletion of an old image, the name of the old file
WikiFilePage$articleIn case all revisions of the file are deleted, a reference to the WikiFilePage associated with the file
User$userUser who performed the deletion
string$reason
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\FileDeleteCompleteHook.

Definition at line 1765 of file HookRunner.php.

References $file.

◆ onFileTransformed()

MediaWiki\HookContainer\HookRunner::onFileTransformed (   $file,
  $thumb,
  $tmpThumbPath,
  $thumbPath 
)

This hook is called when a file is transformed and moved into storage.

Since
1.35
Parameters
File$fileReference to the File object
MediaTransformOutput$thumb
string$tmpThumbPathTemporary file system path of the transformed file
string$thumbPathPermanent storage path of the transformed file
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\FileTransformedHook.

Definition at line 1774 of file HookRunner.php.

References $file.

◆ onFileUndeleteComplete()

MediaWiki\HookContainer\HookRunner::onFileUndeleteComplete (   $title,
  $fileVersions,
  $user,
  $reason 
)

This hook is called when a file is undeleted.

Since
1.35
Parameters
Title$titleTitle object for the file
int[]$fileVersionsArray of undeleted filearchive IDs. Empty if all versions were restored.
User$userUser who performed the undeletion
string$reason
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\FileUndeleteCompleteHook.

Definition at line 1781 of file HookRunner.php.

References $title.

◆ onFileUpload()

MediaWiki\HookContainer\HookRunner::onFileUpload (   $file,
  $reupload,
  $hasDescription 
)

This hook is called when a file upload occurs.

Since
1.35
Parameters
File$fileImage object representing the file that was uploaded
bool$reuploadBoolean indicating if there was a previously another image there or not (since 1.17)
bool$hasDescriptionBoolean indicating that there was already a description page and a new one from the comment wasn't created (since 1.17)
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\FileUploadHook.

Definition at line 1788 of file HookRunner.php.

References $file.

◆ onFormatAutocomments()

MediaWiki\HookContainer\HookRunner::onFormatAutocomments ( $comment,
  $pre,
  $auto,
  $post,
  $title,
  $local,
  $wikiId 
)

This hook is called when an autocomment is formatted by the Linker.

Since
1.35
Parameters
string | null&$commentReference to the accumulated comment. Initially null, when set the default code will be skipped.
bool$preTrue if there is text before this autocomment
string$autoExtracted part of the parsed comment before the call to the hook
bool$postTrue if there is text after this autocomment
Title | null$titleOptional title object used to links to sections
bool$localWhether section links should refer to local page
string | null$wikiIdID (as used by WikiMap) of the wiki from which the autocomment originated; null for the local wiki. Added in 1.26, should default to null in handler functions, for backwards compatibility.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\FormatAutocommentsHook.

Definition at line 1795 of file HookRunner.php.

References $title.

◆ onGalleryGetModes()

MediaWiki\HookContainer\HookRunner::onGalleryGetModes ( $modeArray)

Use this hook to get a list of classes that can render different modes of a gallery.

Since
1.35
Parameters
array&$modeArrayAssociative array mapping mode names to classes that implement that mode. It is expected that all registered classes are a subclass of ImageGalleryBase.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GalleryGetModesHook.

Definition at line 1804 of file HookRunner.php.

◆ onGetAutoPromoteGroups()

MediaWiki\HookContainer\HookRunner::onGetAutoPromoteGroups (   $user,
$promote 
)

This hook is called when determining which autopromote groups a user is entitled to be in.

Since
1.35
Parameters
User$userUser to promote
string[]&$promoteGroups that will be added
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\User\Hook\GetAutoPromoteGroupsHook.

Definition at line 1811 of file HookRunner.php.

◆ onGetCacheVaryCookies()

MediaWiki\HookContainer\HookRunner::onGetCacheVaryCookies (   $out,
$cookies 
)

Use this hook to get cookies that should vary cache options.

Since
1.35
Parameters
OutputPage$out
string[]&$cookiesArray of cookie names. Add a value to it if you want to add a cookie that has to vary cache options.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GetCacheVaryCookiesHook.

Definition at line 1818 of file HookRunner.php.

◆ onGetCanonicalURL()

MediaWiki\HookContainer\HookRunner::onGetCanonicalURL (   $title,
$url,
  $query 
)

Use this hook to modify fully-qualified URLs used for IRC and email notifications.

Since
1.35
Parameters
Title$titleTitle object of page
string&$urlString value as output (out parameter, can modify)
string$queryQuery options as string passed to Title::getCanonicalURL()
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GetCanonicalURLHook.

Definition at line 1825 of file HookRunner.php.

References $title.

◆ onGetContentModels()

MediaWiki\HookContainer\HookRunner::onGetContentModels ( $models)

Use this hook to add content models to the list of available models.

Since
1.35
Parameters
string[]&$modelsArray containing current model list as strings. Extensions should add to this list.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Content\Hook\GetContentModelsHook.

Definition at line 1832 of file HookRunner.php.

◆ onGetDefaultSortkey()

MediaWiki\HookContainer\HookRunner::onGetDefaultSortkey (   $title,
$sortkey 
)

Use this hook to override the default sortkey for a page.

Since
1.35
Parameters
Title$titleTitle object that we need to get a sortkey for
string&$sortkeySortkey to use
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GetDefaultSortkeyHook.

Definition at line 1839 of file HookRunner.php.

References $title.

◆ onGetDifferenceEngine()

MediaWiki\HookContainer\HookRunner::onGetDifferenceEngine (   $context,
  $old,
  $new,
  $refreshCache,
  $unhide,
$differenceEngine 
)

This hook is called when getting a new difference engine interface object.

Use this hook to decorate or replace the default difference engine.

Since
1.35
Parameters
IContextSource$contextIContextSource context to be used for diff
int$oldRevision ID to show and diff with
int | string$newEither a revision ID or one of the strings 'cur', 'prev' or 'next'
bool$refreshCacheIf set, refreshes the diff cache
bool$unhideIf set, allow viewing deleted revs
DifferenceEngine&$differenceEngineDifference engine object to be used for the diff
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Content\Hook\GetDifferenceEngineHook.

Definition at line 1846 of file HookRunner.php.

References MediaWiki\$context.

◆ onGetDoubleUnderscoreIDs()

MediaWiki\HookContainer\HookRunner::onGetDoubleUnderscoreIDs ( $doubleUnderscoreIDs)

Use this hook to modify the list of behavior switches (double underscore variables in wikitext).

Behavior switches are localized with the magic word system, and this hook is called by MagicWordFactory.

Since
1.35
Parameters
string[]&$doubleUnderscoreIDsArray of magic word identifiers
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GetDoubleUnderscoreIDsHook.

Definition at line 1856 of file HookRunner.php.

◆ onGetExtendedMetadata()

MediaWiki\HookContainer\HookRunner::onGetExtendedMetadata ( $combinedMeta,
  $file,
  $context,
  $single,
$maxCacheTime 
)

Use this hook to get extended file metadata for the API.

Since
1.35
Parameters
array&$combinedMetaArray of the form: 'MetadataPropName' => [ value' => prop value, 'source' => 'name of hook' ]
File$fileFile in question
IContextSource$contextRequestContext (including language to use)
bool$singleOnly extract the current language; if false, the prop value should be in the metadata multi-language array format: https://mediawiki.org/wiki/Manual:File_metadata_handling#Multi-language_array_format
int&$maxCacheTimeHow long the results can be cached
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GetExtendedMetadataHook.

Definition at line 1863 of file HookRunner.php.

References MediaWiki\$context, and $file.

◆ onGetFullURL()

MediaWiki\HookContainer\HookRunner::onGetFullURL (   $title,
$url,
  $query 
)

Use this hook to modify fully-qualified URLs used in redirects/export/offsite data.

Since
1.35
Parameters
Title$titleTitle object of page
string&$urlString value as output (out parameter, can modify)
string$queryQuery options as string passed to Title::getFullURL()
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GetFullURLHook.

Definition at line 1872 of file HookRunner.php.

References $title.

◆ onGetHumanTimestamp()

MediaWiki\HookContainer\HookRunner::onGetHumanTimestamp ( $output,
  $timestamp,
  $relativeTo,
  $user,
  $lang 
)

Use this hook to preemptively override the human-readable timestamp generated by MWTimestamp::getHumanTimestamp().

Since
1.35
Parameters
string&$outputOutput timestamp
MWTimestamp$timestampCurrent (user-adjusted) timestamp
MWTimestamp$relativeToRelative (user-adjusted) timestamp
User$userUser whose preferences are being used to make timestamp
Language$langLanguage that will be used to render the timestamp
Returns
bool|void True or no return value to continue, or false to use the custom output

Implements MediaWiki\Hook\GetHumanTimestampHook.

Definition at line 1879 of file HookRunner.php.

References $lang.

◆ onGetInternalURL()

MediaWiki\HookContainer\HookRunner::onGetInternalURL (   $title,
$url,
  $query 
)

Use this hook to modify fully-qualified URLs used for squid cache purging.

Since
1.35
Parameters
Title$titleTitle object of page
string&$urlString value as output (out parameter, can modify)
string$queryQuery options as string passed to Title::getInternalURL()
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GetInternalURLHook.

Definition at line 1888 of file HookRunner.php.

References $title.

◆ onGetIP()

MediaWiki\HookContainer\HookRunner::onGetIP ( $ip)

Use this hook to modify the IP of the current user (called only once).

Since
1.35
Parameters
string&$ipIP as determined so far
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GetIPHook.

Definition at line 1895 of file HookRunner.php.

◆ onGetLangPreferredVariant()

MediaWiki\HookContainer\HookRunner::onGetLangPreferredVariant ( $req)

This hook is called in LanguageConverter::getPreferredVariant() to allow fetching the language variant code from cookies or other such alternative storage.

Since
1.35
Parameters
string | null&$reqLanguage variant from the URL or null if no variant was specified in the URL; the value of this variable comes from LanguageConverter::getURLVariant()
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GetLangPreferredVariantHook.

Definition at line 1902 of file HookRunner.php.

◆ onGetLinkColours()

MediaWiki\HookContainer\HookRunner::onGetLinkColours (   $linkcolour_ids,
$colours,
  $title 
)

Use this hook to modify the CSS class of an array of page links.

Since
1.35
Parameters
string[]$linkcolour_idsArray of prefixed DB keys of the pages linked to, indexed by page_id
string[]&$colours(Output) Array of CSS classes, indexed by prefixed DB keys
Title$titleTitle of the page being parsed, on which the links will be shown
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GetLinkColoursHook.

Definition at line 1909 of file HookRunner.php.

References $title.

◆ onGetLocalURL()

MediaWiki\HookContainer\HookRunner::onGetLocalURL (   $title,
$url,
  $query 
)

Use this hook to modify local URLs as output into page links.

Note that if you are working with internal urls (non-interwiki) then it may be preferable to work with the GetLocalURL::Internal or GetLocalURL::Article hooks as GetLocalURL can be buggy for internal URLs on render if you do not re-implement the horrible hack that Title::getLocalURL uses in your own extension.

Since
1.35
Parameters
Title$titleTitle object of page
string&$urlString value as output (out parameter, can modify)
string$queryQuery options as string passed to Title::getLocalURL()
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GetLocalURLHook.

Definition at line 1916 of file HookRunner.php.

References $title.

◆ onGetLocalURL__Article()

MediaWiki\HookContainer\HookRunner::onGetLocalURL__Article (   $title,
$url 
)

Use this hook to modify local URLs specifically pointing to article paths without any fancy queries or variants.

Since
1.35
Parameters
Title$titleTitle object of page
string&$urlString value as output (out parameter, can modify)
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GetLocalURL__ArticleHook.

Definition at line 1923 of file HookRunner.php.

References $title.

◆ onGetLocalURL__Internal()

MediaWiki\HookContainer\HookRunner::onGetLocalURL__Internal (   $title,
$url,
  $query 
)

Use this hook to modify local URLs to internal pages.

Since
1.35
Parameters
Title$titleTitle object of page
string&$urlString value as output (out parameter, can modify)
string$queryQuery options as string passed to Title::getLocalURL()
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GetLocalURL__InternalHook.

Definition at line 1930 of file HookRunner.php.

References $title.

◆ onGetLogTypesOnUser()

MediaWiki\HookContainer\HookRunner::onGetLogTypesOnUser ( $types)

Use this hook to add log types where the target is a user page.

Since
1.35
Parameters
string[]&$typesArray of log types
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GetLogTypesOnUserHook.

Definition at line 1937 of file HookRunner.php.

◆ onGetMagicVariableIDs()

MediaWiki\HookContainer\HookRunner::onGetMagicVariableIDs ( $variableIDs)

Use this hook to modify the list of magic variables.

Magic variables are localized with the magic word system, and this hook is called by MagicWordFactory.

Since
1.35
Parameters
string[]&$variableIDsarray of magic word identifiers
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GetMagicVariableIDsHook.

Definition at line 1944 of file HookRunner.php.

◆ onGetMetadataVersion()

MediaWiki\HookContainer\HookRunner::onGetMetadataVersion ( $version)

Use this hook to modify the image metadata version currently in use.

This is used when requesting image metadata from a ForeignApiRepo. Media handlers that need to have versioned metadata should add an element to the end of the version array of the form 'handler_name=version'. Most media handlers won't need to do this unless they broke backwards compatibility with a previous version of the media handler metadata output.

Since
1.35
Parameters
string[]&$versionArray of version strings
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GetMetadataVersionHook.

Definition at line 1951 of file HookRunner.php.

◆ onGetNewMessagesAlert()

MediaWiki\HookContainer\HookRunner::onGetNewMessagesAlert ( $newMessagesAlert,
  $newtalks,
  $user,
  $out 
)

Use this hook to disable or modify the new messages alert.

Since
1.35
Parameters
string&$newMessagesAlertEmpty string by default. If the user has new talk page messages, this should be populated with an alert message to that effect.
array$newtalksEmpty array if the user has no new messages, or an array containing links and revisions if there are new messages. (See User::getNewMessageLinks.)
User$userUser who is loading the page
OutputPage$outTo check what type of page the user is on
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GetNewMessagesAlertHook.

Definition at line 1958 of file HookRunner.php.

◆ onGetPreferences()

MediaWiki\HookContainer\HookRunner::onGetPreferences (   $user,
$preferences 
)

Use this hook to modify user preferences.

Since
1.35
Parameters
User$userUser whose preferences are being modified
array&$preferencesPreferences description array, to be fed to an HTMLForm object
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Preferences\Hook\GetPreferencesHook.

Definition at line 1967 of file HookRunner.php.

◆ onGetRelativeTimestamp()

MediaWiki\HookContainer\HookRunner::onGetRelativeTimestamp ( $output,
$diff,
  $timestamp,
  $relativeTo,
  $user,
  $lang 
)

Use this hook to pre-emptively override the relative timestamp generated by MWTimestamp::getRelativeTimestamp().

Since
1.35
Parameters
string&$outputString for the output timestamp
DateInterval&$diffDifference between the timestamps
MWTimestamp$timestampCurrent (user-adjusted) timestamp
MWTimestamp$relativeToRelative (user-adjusted) timestamp
User$userUser whose preferences are being used to make timestamp
Language$langLanguage that will be used to render the timestamp
Returns
bool|void True or no return value to continue, or false to use the custom output

Implements MediaWiki\Hook\GetRelativeTimestampHook.

Definition at line 1974 of file HookRunner.php.

References $lang.

◆ onGetSlotDiffRenderer()

MediaWiki\HookContainer\HookRunner::onGetSlotDiffRenderer (   $contentHandler,
$slotDiffRenderer,
  $context 
)

Use this hook to replace or wrap the standard SlotDiffRenderer for some content type.

Since
1.35
Parameters
ContentHandler$contentHandlerContentHandler for which the slot diff renderer is fetched
SlotDiffRenderer&$slotDiffRendererSlotDiffRenderer to change or replace
IContextSource$context
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Content\Hook\GetSlotDiffRendererHook.

Definition at line 1983 of file HookRunner.php.

References MediaWiki\$context.

◆ onGetUserBlock()

MediaWiki\HookContainer\HookRunner::onGetUserBlock (   $user,
  $ip,
$block 
)

Use this hook to modify the block found by the block manager.

This may be a single block or a composite block made from multiple blocks; the original blocks can be seen using CompositeBlock::getOriginalBlocks().

Since
1.35
Parameters
User$userUser targeted by the block
string | null$ipIP of the current request if $user is the current user and they're not exempted from IP blocks. Null otherwise.
AbstractBlock | null&$blockUser's block, or null if none was found
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Block\Hook\GetUserBlockHook.

Definition at line 1992 of file HookRunner.php.

◆ onGetUserPermissionsErrors()

MediaWiki\HookContainer\HookRunner::onGetUserPermissionsErrors (   $title,
  $user,
  $action,
$result 
)

Use this hook to add a permissions error when permissions errors are checked for.

Use instead of userCan for most cases. Return false if the user can't do it, and populate $result with the reason in the form of [ messagename, param1, param2, ... ] or a MessageSpecifier instance (you might want to use ApiMessage to provide machine-readable details for the API).

Since
1.35
Parameters
Title$titleTitle being checked against
User$userCurrent user
string$actionAction being checked
string&$resultUser permissions error to add. If none, return true. For consistency, error messages should be plain text with no special coloring, bolding, etc. to show that they're errors; presenting them properly to the user as errors is done by the caller.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Permissions\Hook\GetUserPermissionsErrorsHook.

Definition at line 1999 of file HookRunner.php.

References MediaWiki\$action, and $title.

◆ onGetUserPermissionsErrorsExpensive()

MediaWiki\HookContainer\HookRunner::onGetUserPermissionsErrorsExpensive (   $title,
  $user,
  $action,
$result 
)

This hook is equal to getUserPermissionsErrors, but it is called only if expensive checks are enabled.

Use this hook to add a permissions error when permissions errors are checked for. Return false if the user can't do it, and populate $result with the reason in the form of [ messagename, param1, param2, ... ] or a MessageSpecifier instance (you might want to use ApiMessage to provide machine-readable details for the API).

Since
1.35
Parameters
Title$titleTitle being checked against
User$userCurrent user
string$actionAction being checked
string&$resultUser permissions error to add. If none, return true. For consistency, error messages should be plain text with no special coloring, bolding, etc. to show that they're errors; presenting them properly to the user as errors is done by the caller.
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Permissions\Hook\GetUserPermissionsErrorsExpensiveHook.

Definition at line 2006 of file HookRunner.php.

References MediaWiki\$action, and $title.

◆ onGitViewers()

MediaWiki\HookContainer\HookRunner::onGitViewers ( $extTypes)

This hook is called when generating the list of git viewers for Special:Version, allowing you to modify the list.

Since
1.35
Parameters
string[]&$extTypesAssociative array of repo URLS to viewer URLs
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\GitViewersHook.

Definition at line 2015 of file HookRunner.php.

◆ onHistoryPageToolLinks()

MediaWiki\HookContainer\HookRunner::onHistoryPageToolLinks ( IContextSource  $context,
LinkRenderer  $linkRenderer,
array &  $links 
)

Use this hook to add one or more links to revision history page subtitle.

Since
1.35
Parameters
IContextSource$context
LinkRenderer$linkRenderer
string[]&$linksArray of HTML strings
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\HistoryPageToolLinksHook.

Definition at line 2022 of file HookRunner.php.

References MediaWiki\$context.

◆ onHistoryRevisionTools()

MediaWiki\HookContainer\HookRunner::onHistoryRevisionTools (   $rev,
$links,
  $prevRev,
  $user 
)

Use this hook to override or extend the revision tools available from the page history view, i.e.

undo, rollback, etc.

Since
1.35
Parameters
Revision$rev
string[]&$linksArray of HTML links
Revision | null$prevRevRevision object, next in line in page history, or null
User$userCurrent user object
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\HistoryRevisionToolsHook.

Definition at line 2029 of file HookRunner.php.

◆ onHistoryTools()

MediaWiki\HookContainer\HookRunner::onHistoryTools (   $revRecord,
$links,
  $prevRevRecord,
  $userIdentity 
)

Use this hook to override or extend the revision tools available from the page history view, i.e.

undo, rollback, etc.

Since
1.35
Parameters
RevisionRecord$revRecord
string[]&$linksArray of HTML links
RevisionRecord | null$prevRevRecordRevisionRecord object, next in line in page history, or null
UserIdentity$userIdentityCurrent user
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Hook\HistoryToolsHook.

Definition at line 2036 of file HookRunner.php.

◆ onHtmlCacheUpdaterAppendUrls()

MediaWiki\HookContainer\HookRunner::onHtmlCacheUpdaterAppendUrls (   $title,
  $mode,
$append 
)

This hook is used to declare extra URLs to purge from HTTP caches.

Use $mode to decide whether to gather all related URLs or only those affected by a re-render of the same content. For example, after a direct revision to the content the history page will need to be purged. However when re-rendering after a cascading change from a template, only URLs that render content need purging. The $mode will be either HtmlCacheUpdater::PURGE_URLS_LINKSUPDATE_ONLY or 0.

Since
1.35
Parameters
Title$titleTitle of the page being updated
int$mode
array&$appendAppend URLs relating to the title
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Cache\Hook\HtmlCacheUpdaterAppendUrlsHook.

Definition at line 2043 of file HookRunner.php.

References $title.

◆ onHtmlCacheUpdaterVaryUrls()

MediaWiki\HookContainer\HookRunner::onHtmlCacheUpdaterVaryUrls (   $urls,
$append 
)

This hook is used to add variants of URLs to purge from HTTP caches.

Extensions that provide site-wide variants of all URLs, such as by serving from an alternate domain or path, can use this hook to append alternative URLs for each url in $urls.

Since
1.35
Parameters
array$urlsCanonical URLs
array&$appendAppend alternative URLs for $urls
Returns
bool|void True or no return value to continue or false to abort

Implements MediaWiki\Cache\Hook\HtmlCacheUpdaterVaryUrlsHook.

Definition at line 2050 of file HookRunner.php.

◆ onHTMLFileCache__useFileCache()

MediaWiki\HookContainer\HookRunner::onHTMLFileCache__useFileCache (