MediaWiki fundraising/REL1_35
|
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\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\ParserAfterStripHook, MediaWiki\Hook\ParserAfterTidyHook, MediaWiki\Hook\ParserBeforeInternalParseHook, MediaWiki\Hook\ParserBeforePreprocessHook, MediaWiki\Hook\ParserBeforeStripHook, MediaWiki\Hook\ParserBeforeTidyHook, 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, MediaWiki\Linker\Hook\LinkBeginHook, MediaWiki\Linker\Hook\LinkEndHook, MediaWiki\Page\Hook\ArticleConfirmDeleteHook, MediaWiki\Page\Hook\ArticleDeleteAfterSuccessHook, MediaWiki\Page\Hook\ArticleDeleteCompleteHook, MediaWiki\Page\Hook\ArticleDeleteHook, MediaWiki\Page\Hook\ArticleFromTitleHook, MediaWiki\Page\Hook\ArticlePageDataAfterHook, MediaWiki\Page\Hook\ArticlePageDataBeforeHook, MediaWiki\Page\Hook\ArticleProtectCompleteHook, MediaWiki\Page\Hook\ArticleProtectHook, MediaWiki\Page\Hook\ArticlePurgeHook, MediaWiki\Page\Hook\ArticleRevisionUndeletedHook, MediaWiki\Page\Hook\ArticleRevisionViewCustomHook, MediaWiki\Page\Hook\ArticleRollbackCompleteHook, MediaWiki\Page\Hook\ArticleShowPatrolFooterHook, MediaWiki\Page\Hook\ArticleUndeleteHook, MediaWiki\Page\Hook\ArticleUndeleteLogEntryHook, MediaWiki\Page\Hook\ArticleViewFooterHook, MediaWiki\Page\Hook\ArticleViewHeaderHook, MediaWiki\Page\Hook\ArticleViewRedirectHook, MediaWiki\Page\Hook\Article__MissingArticleConditionsHook, MediaWiki\Page\Hook\BeforeDisplayNoArticleTextHook, MediaWiki\Page\Hook\CategoryAfterPageAddedHook, MediaWiki\Page\Hook\CategoryAfterPageRemovedHook, MediaWiki\Page\Hook\CategoryPageViewHook, MediaWiki\Page\Hook\DisplayOldSubtitleHook, MediaWiki\Page\Hook\ImageOpenShowImageInlineBeforeHook, MediaWiki\Page\Hook\ImagePageAfterImageLinksHook, MediaWiki\Page\Hook\ImagePageFileHistoryLineHook, MediaWiki\Page\Hook\ImagePageFindFileHook, MediaWiki\Page\Hook\ImagePageShowTOCHook, MediaWiki\Page\Hook\IsFileCacheableHook, MediaWiki\Page\Hook\NewRevisionFromEditCompleteHook, MediaWiki\Page\Hook\OpportunisticLinksUpdateHook, MediaWiki\Page\Hook\PageDeletionDataUpdatesHook, MediaWiki\Page\Hook\PageViewUpdatesHook, MediaWiki\Page\Hook\RevisionFromEditCompleteHook, MediaWiki\Page\Hook\RevisionUndeletedHook, MediaWiki\Page\Hook\RollbackCompleteHook, MediaWiki\Page\Hook\ShowMissingArticleHook, MediaWiki\Page\Hook\WikiPageDeletionUpdatesHook, MediaWiki\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, MediaWiki\ResourceLoader\Hook\ResourceLoaderGetConfigVarsHook, MediaWiki\ResourceLoader\Hook\ResourceLoaderJqueryMsgModuleMagicWordsHook, MediaWiki\Rest\Hook\SearchResultProvideDescriptionHook, MediaWiki\Rest\Hook\SearchResultProvideThumbnailHook, MediaWiki\Revision\Hook\ContentHandlerDefaultModelForHook, MediaWiki\Revision\Hook\RevisionInsertCompleteHook, MediaWiki\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\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.
Public Member Functions | |
__construct (HookContainer $container) | |
onAbortAutoblock ( $autoblockip, $block) | |
Use this hook to cancel an autoblock. | |
onAbortDiffCache ( $diffEngine) | |
Use this hook to cancel the caching of a diff. | |
onAbortEmailNotification ( $editor, $title, $rc) | |
Use this hook to cancel email notifications for an edit. | |
onAbortTalkPageEmailNotification ( $targetUser, $title) | |
Use this hook to disable email notifications of edits to users' talk pages. | |
onActionBeforeFormDisplay ( $name, $form, $article) | |
This hook is called before executing the HTMLForm object. | |
onActionModifyFormFields ( $name, &$fields, $article) | |
This hook is called before creating an HTMLForm object for a page action. | |
onAddNewAccount ( $user, $byEmail) | |
This hook is called after a user account is created. | |
onAfterBuildFeedLinks (&$feedLinks) | |
This hook is called in OutputPage.php after all feed links (atom, rss,...) are created. | |
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. | |
onAfterImportPage ( $title, $foreignTitle, $revCount, $sRevCount, $pageInfo) | |
This hook is called when a page import is completed. | |
onAfterParserFetchFileAndTitle ( $parser, $ig, &$html) | |
This hook is called after an image gallery is formed by Parser, just before adding its HTML to parser output. | |
onAlternateEdit ( $editPage) | |
This hook is called before checking if a user can edit a page and before showing the edit form ( EditPage::edit() ). | |
onAlternateEditPreview ( $editPage, &$content, &$previewHTML, &$parserOutput) | |
This hook is called before generating the preview of the page when editing ( EditPage::getPreviewText() ). | |
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(). | |
onAncientPagesQuery (&$tables, &$conds, &$joinConds) | |
Use this hook to modify the query used by Special:AncientPages. | |
onApiBeforeMain (&$main) | |
This hook is called before calling ApiMain's execute() method in api.php. | |
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. | |
onArticleConfirmDelete ( $article, $output, &$reason) | |
This hook is called before writing the confirmation form for article deletion. | |
onArticleContentOnDiff ( $diffEngine, $output) | |
This hook is called before showing the article content below a diff. | |
onArticleDelete ( $wikiPage, $user, &$reason, &$error, &$status, $suppress) | |
This hook is called before an article is deleted. | |
onArticleDeleteAfterSuccess ( $title, $outputPage) | |
Use this hook to modify the output after an article has been deleted. | |
onArticleDeleteComplete ( $wikiPage, $user, $reason, $id, $content, $logEntry, $archivedRevisionCount) | |
This hook is called after an article is deleted. | |
onArticleEditUpdateNewTalk ( $wikiPage, $recipient) | |
This hook is called before updating user_newtalk when a user talk page was changed. | |
onArticleEditUpdates ( $wikiPage, $editInfo, $changed) | |
This hook is called when edit updates (mainly link tracking) are made when an article has been changed. | |
onArticleEditUpdatesDeleteFromRecentchanges ( $wikiPage) | |
This hook is called before deleting old entries from recentchanges table. | |
onArticleFromTitle ( $title, &$article, $context) | |
This hook is called when creating an article object from a title object using Wiki::articleFromTitle(). | |
onArticleMergeComplete ( $targetTitle, $destTitle) | |
This hook is called after merging to article using Special:Mergehistory. | |
onArticlePageDataAfter ( $wikiPage, &$row) | |
This hook is called after loading data of an article from the database. | |
onArticlePageDataBefore ( $wikiPage, &$fields, &$tables, &$joinConds) | |
This hook is called before loading data of an article from the database. | |
onArticlePrepareTextForEdit ( $wikiPage, $popts) | |
This hook is called when preparing text to be saved. | |
onArticleProtect ( $wikiPage, $user, $protect, $reason) | |
This hook is called before an article is protected. | |
onArticleProtectComplete ( $wikiPage, $user, $protect, $reason) | |
This hook is called after an article is protected. | |
onArticlePurge ( $wikiPage) | |
This hook is called before executing "&action=purge". | |
onArticleRevisionUndeleted ( $title, $revision, $oldPageID) | |
This hook is called after an article revision is restored. | |
onArticleRevisionViewCustom ( $revision, $title, $oldid, $output) | |
Use this hook for custom rendering of an article's content. | |
onArticleRevisionVisibilitySet ( $title, $ids, $visibilityChangeMap) | |
This hook is called when changing visibility of one or more revisions of an article. | |
onArticleRollbackComplete ( $wikiPage, $user, $revision, $current) | |
This hook is called after an article rollback is completed. | |
onArticleShowPatrolFooter ( $article) | |
This hook is called at the beginning of Article::showPatrolFooter. | |
onArticleUndelete ( $title, $create, $comment, $oldPageId, $restoredPages) | |
This hook is called when one or more revisions of an article are restored. | |
onArticleUndeleteLogEntry ( $pageArchive, &$logEntry, $user) | |
This hook is called when a log entry is generated but not yet saved. | |
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. | |
onArticleViewFooter ( $article, $patrolFooterShown) | |
This hook is called after showing the footer section of an ordinary page view. | |
onArticleViewHeader ( $article, &$pcache, &$outputDone) | |
Use this hook to control article output. | |
onArticleViewRedirect ( $article) | |
This hook is called before setting "Redirected from ..." subtitle when a redirect was followed. | |
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. | |
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. | |
onAutopromoteCondition ( $type, $args, $user, &$result) | |
Use this hook to check autopromote condition for user. | |
onBacklinkCacheGetConditions ( $table, $title, &$conds) | |
Use this hook to set conditions for query when links to certain title are fetched. | |
onBacklinkCacheGetPrefix ( $table, &$prefix) | |
Use this hook to set a prefix for a specific link table. | |
onBadImage ( $name, &$bad) | |
This hook is called when checking against the bad image list. | |
onBaseTemplateAfterPortlet ( $template, $portlet, &$html) | |
This hook is called after output of portlets, allow injecting custom HTML after the section. | |
onBaseTemplateToolbox ( $sk, &$toolbox) | |
This hook is called by BaseTemplate when building the $toolbox array and returning it for the skin to output. | |
onBeforeDisplayNoArticleText ( $article) | |
This hook is called before displaying message key "noarticletext" or "noarticletext-nopermission" at Article::showMissingArticle(). | |
onBeforeHttpsRedirect ( $context, &$redirect) | |
This hook is called prior to forcing HTTP->HTTPS redirect. | |
onBeforeInitialize ( $title, $unused, $output, $user, $request, $mediaWiki) | |
This hook is called before anything is initialized in MediaWiki::performRequest(). | |
onBeforePageDisplay ( $out, $skin) | |
This hook is called prior to outputting a page. | |
onBeforePageRedirect ( $out, &$redirect, &$code) | |
This hook is called prior to sending an HTTP redirect. | |
onBeforeParserFetchFileAndTitle ( $parser, $nt, &$options, &$descQuery) | |
This hook is called before an image is rendered by Parser. | |
onBeforeParserFetchTemplateAndtitle ( $parser, $title, &$skip, &$id) | |
This hook is called before a template is fetched by Parser. | |
onBeforeParserrenderImageGallery ( $parser, $ig) | |
This hook is called before an image gallery is rendered by Parser. | |
onBeforeResetNotificationTimestamp (&$userObj, &$titleObj, $force, &$oldid) | |
This hook is called before the notification timestamp of a watched item is reset. | |
onBeforeWelcomeCreation (&$welcome_creation_msg, &$injected_html) | |
This hook is called before the welcomecreation message is displayed to a newly created user. | |
onBitmapHandlerCheckImageArea ( $image, &$params, &$checkImageAreaHookResult) | |
This hook is called by BitmapHandler::normaliseParams, after all normalizations have been performed, except for the $wgMaxImageArea check. | |
onBitmapHandlerTransform ( $handler, $image, &$scalerParams, &$mto) | |
This hook is called before a file is transformed, giving extensions the possibility to transform it themselves. | |
onBlockIp ( $block, $user, &$reason) | |
This hook is called before an IP address or user is blocked. | |
onBlockIpComplete ( $block, $user, $priorBlock) | |
This hook is called after an IP address or user is blocked. | |
onBookInformation ( $isbn, $output) | |
This hook is called before information output on Special:Booksources. | |
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. | |
onCanonicalNamespaces (&$namespaces) | |
Use this hook to add namespaces or alter the defaults. | |
onCategoryAfterPageAdded ( $category, $wikiPage) | |
This hook is called after a page is added to a category. | |
onCategoryAfterPageRemoved ( $category, $wikiPage, $id) | |
This hook is called after a page is removed from a category. | |
onCategoryPageView ( $catpage) | |
This hook is called before viewing a categorypage in CategoryPage::view. | |
onCategoryViewer__doCategoryQuery ( $type, $res) | |
This hook is called after querying for pages to be displayed in a Category page. | |
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. | |
onChangeAuthenticationDataAudit ( $req, $status) | |
This hook is called when a user changes their password. | |
onChangesListInitRows ( $changesList, $rows) | |
Use this hook to batch process change list rows prior to rendering. | |
onChangesListInsertArticleLink ( $changesList, &$articlelink, &$s, $rc, $unpatrolled, $watched) | |
Use this hook to override or augment link to article in RC list. | |
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). | |
onChangesListSpecialPageStructuredFilters ( $special) | |
Use this hook to register filters for pages inheriting from ChangesListSpecialPage (in core: RecentChanges,vRecentChangesLinked, and Watchlist). | |
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). | |
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. | |
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. | |
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. | |
onChangeTagsAllowedAdd (&$allowedTags, $addTags, $user) | |
This hook is called when checking if a user can add tags to a change. | |
onChangeTagsListActive (&$tags) | |
Use this hook to nominate which of the tags your extension uses are in active use. | |
onChangeUserGroups ( $performer, $user, &$add, &$remove) | |
This hook is called before user groups are changed. | |
onCollation__factory ( $collationName, &$collationObject) | |
This hook is called if $wgCategoryCollation is an unknown collation. | |
onConfirmEmailComplete ( $user) | |
This hook is called after a user's email has been confirmed successfully. | |
onContentAlterParserOutput ( $content, $title, $parserOutput) | |
Use this hook to modify parser output for a given content object. | |
onContentGetParserOutput ( $content, $title, $revId, $options, $generateHtml, &$output) | |
Use this hook to customize parser output for a given content object. | |
onContentHandlerDefaultModelFor ( $title, &$model) | |
This hook is called when the default content model is determined for a given title. | |
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. | |
onContentModelCanBeUsedOn ( $contentModel, $title, &$ok) | |
Use this hook to determine whether a content model can be used on a given page. | |
onContentSecurityPolicyDefaultSource (&$defaultSrc, $policyConfig, $mode) | |
Use this hook to modify the allowed CSP load sources. | |
onContentSecurityPolicyDirectives (&$directives, $policyConfig, $mode) | |
If ContentSecurityPolicyDefaultSource and ContentSecurityPolicyScriptSource do not meet your needs, use this hook to modify the content security policy directives. | |
onContentSecurityPolicyScriptSource (&$scriptSrc, $policyConfig, $mode) | |
Use this hook to modify the allowed CSP script sources. | |
onContribsPager__getQueryInfo ( $pager, &$queryInfo) | |
This hook is called before the contributions query is about to run. | |
onContribsPager__reallyDoQuery (&$data, $pager, $offset, $limit, $descending) | |
This hook is called before really executing the query for My Contributions. | |
onContributionsLineEnding ( $page, &$ret, $row, &$classes, &$attribs) | |
This hook is called before a contributions HTML line is finished. | |
onContributionsToolLinks ( $id, $title, &$tools, $specialPage) | |
Use this hook to change the tool links above Special:Contributions. | |
onConvertContent ( $content, $toModel, $lossy, &$result) | |
This hook is called by AbstractContent::convert when a conversion to another content model is requested. | |
onCustomEditor ( $article, $user) | |
This hook is called when invoking the page editor. | |
onDeletedContribsPager__reallyDoQuery (&$data, $pager, $offset, $limit, $descending) | |
This hook is called before really executing the query for Special:DeletedContributions. | |
onDeletedContributionsLineEnding ( $page, &$ret, $row, &$classes, &$attribs) | |
This hook is called before a DeletedContributions HTML line is finished. | |
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. | |
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. | |
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. | |
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". | |
onDifferenceEngineMarkPatrolledRCID (&$rcid, $differenceEngine, $change, $user) | |
Use this hook to possibly change the rcid parameter. | |
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. | |
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. | |
onDifferenceEngineOldHeaderNoOldRev (&$oldHeader) | |
Use this hook to change the $oldHeader variable in cases when there is no old revision. | |
onDifferenceEngineRenderRevisionAddParserOutput ( $differenceEngine, $out, $parserOutput, $wikiPage) | |
Use this hook to change the parser output. | |
onDifferenceEngineRenderRevisionShowFinalPatrolLink () | |
Use this hook to not show the final "mark as patrolled" link on the bottom of a page. | |
onDifferenceEngineShowDiff ( $differenceEngine) | |
Use this hook to affect the diff text which eventually gets sent to the OutputPage object. | |
onDifferenceEngineShowDiffPage ( $out) | |
Use this hook to add additional output via the available OutputPage object into the diff view. | |
onDifferenceEngineShowDiffPageMaybeShowMissingRevision ( $differenceEngine) | |
This hook is called in DifferenceEngine::showDiffPage() when revision data cannot be loaded. | |
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. | |
onDifferenceEngineViewHeader ( $differenceEngine) | |
This hook is called before diff display. | |
onDiffRevisionTools ( $newRev, &$links, $oldRev, $user) | |
Use this hook to override or extend the revision tools available from the diff view, i.e. | |
onDiffTools ( $newRevRecord, &$links, $oldRevRecord, $userIdentity) | |
Use this hook to override or extend the revision tools available from the diff view, i.e. | |
onDiffViewHeader ( $diff, $oldRev, $newRev) | |
This hook is called before diff display. | |
onDisplayOldSubtitle ( $article, &$oldid) | |
This hook is called before creating subtitle when browsing old versions of an article. | |
onEditFilter ( $editor, $text, $section, &$error, $summary) | |
Use this hook to perform checks on an edit. | |
onEditFilterMergedContent ( $context, $content, $status, $summary, $user, $minoredit) | |
Use this hook for a post-section-merge edit filter. | |
onEditFormInitialText ( $editPage) | |
Use this hook to modify the edit form when editing existing pages. | |
onEditFormPreloadText (&$text, $title) | |
Use this hook to populate the edit form when creating pages. | |
onEditPage__attemptSave ( $editpage_Obj) | |
This hook is called before an article is saved, before WikiPage::doEditContent() is called. | |
onEditPage__attemptSave_after ( $editpage_Obj, $status, $resultDetails) | |
This hook is called after an article save attempt. | |
onEditPage__importFormData ( $editpage, $request) | |
Use this hook to read additional data posted in the form. | |
onEditPage__showEditForm_fields ( $editor, $out) | |
Use this hook to inject form field into edit form. | |
onEditPage__showEditForm_initial ( $editor, $out) | |
This hook is called before showing the edit form. | |
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. | |
onEditPage__showStandardInputs_options ( $editor, $out, &$tabindex) | |
Use this hook to inject form fields into the editOptions area. | |
onEditPageBeforeConflictDiff ( $editor, $out) | |
Use this hook to modify the EditPage object and output when there's an edit conflict. | |
onEditPageBeforeEditButtons ( $editpage, &$buttons, &$tabindex) | |
Use this hook to modify the edit buttons below the textarea in the edit form. | |
onEditPageBeforeEditToolbar (&$toolbar) | |
Use this hook to add an edit toolbar above the textarea in the edit form. | |
onEditPageCopyrightWarning ( $title, &$msg) | |
Use this hook for site and per-namespace customization of contribution/copyright notice. | |
onEditPageGetCheckboxesDefinition ( $editpage, &$checkboxes) | |
Use this hook to modify the edit checkboxes and other form fields below the textarea in the edit form. | |
onEditPageGetDiffContent ( $editPage, &$newtext) | |
Use this hook to modify the wikitext that will be used in "Show changes". | |
onEditPageGetPreviewContent ( $editPage, &$content) | |
Use this hook to modify the wikitext that will be previewed. | |
onEditPageNoSuchSection ( $editpage, &$res) | |
This hook is called when a section edit request is given for an non-existent section. | |
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. | |
onEmailConfirmed ( $user, &$confirmed) | |
This hook is called when checking that the user's email address is "confirmed". | |
onEmailUser (&$to, &$from, &$subject, &$text, &$error) | |
This hook is called before sending email from one user to another. | |
onEmailUserCC (&$to, &$from, &$subject, &$text) | |
This hook is called before sending the copy of the email to the author. | |
onEmailUserComplete ( $to, $from, $subject, $text) | |
This hook is called after sending email from one user to another. | |
onEmailUserForm (&$form) | |
This hook is called after building the email user form object. | |
onEmailUserPermissionsErrors ( $user, $editToken, &$hookErr) | |
Use this hook to retrieve permissions errors for emailing a user. | |
onEnhancedChangesList__getLogText ( $changesList, &$links, $block) | |
Use this hook to alter, remove, or add to the links of a group of changes in EnhancedChangesList. | |
onEnhancedChangesListModifyBlockLineData ( $changesList, &$data, $rc) | |
Use this hook to alter data used to build a non-grouped recent change line in EnhancedChangesList. | |
onEnhancedChangesListModifyLineData ( $changesList, &$data, $block, $rc, &$classes, &$attribs) | |
Use this hook to alter data used to build a grouped recent change inner line in EnhancedChangesList. | |
onExemptFromAccountCreationThrottle ( $ip) | |
Use this hook to add an exemption from the account creation throttle. | |
onExtensionTypes (&$extTypes) | |
This hook is called when generating the extensions credits. | |
onFetchChangesList ( $user, $skin, &$list, $groups) | |
This hook is called when fetching the ChangesList derivative for a particular user. | |
onFileDeleteComplete ( $file, $oldimage, $article, $user, $reason) | |
This hook is called when a file is deleted. | |
onFileTransformed ( $file, $thumb, $tmpThumbPath, $thumbPath) | |
This hook is called when a file is transformed and moved into storage. | |
onFileUndeleteComplete ( $title, $fileVersions, $user, $reason) | |
This hook is called when a file is undeleted. | |
onFileUpload ( $file, $reupload, $hasDescription) | |
This hook is called when a file upload occurs. | |
onFormatAutocomments (&$comment, $pre, $auto, $post, $title, $local, $wikiId) | |
This hook is called when an autocomment is formatted by the Linker. | |
onGalleryGetModes (&$modeArray) | |
Use this hook to get a list of classes that can render different modes of a gallery. | |
onGetAutoPromoteGroups ( $user, &$promote) | |
This hook is called when determining which autopromote groups a user is entitled to be in. | |
onGetCacheVaryCookies ( $out, &$cookies) | |
Use this hook to get cookies that should vary cache options. | |
onGetCanonicalURL ( $title, &$url, $query) | |
Use this hook to modify fully-qualified URLs used for IRC and email notifications. | |
onGetContentModels (&$models) | |
Use this hook to add content models to the list of available models. | |
onGetDefaultSortkey ( $title, &$sortkey) | |
Use this hook to override the default sortkey for a page. | |
onGetDifferenceEngine ( $context, $old, $new, $refreshCache, $unhide, &$differenceEngine) | |
This hook is called when getting a new difference engine interface object. | |
onGetDoubleUnderscoreIDs (&$doubleUnderscoreIDs) | |
Use this hook to modify the list of behavior switches (double underscore variables in wikitext). | |
onGetExtendedMetadata (&$combinedMeta, $file, $context, $single, &$maxCacheTime) | |
Use this hook to get extended file metadata for the API. | |
onGetFullURL ( $title, &$url, $query) | |
Use this hook to modify fully-qualified URLs used in redirects/export/offsite data. | |
onGetHumanTimestamp (&$output, $timestamp, $relativeTo, $user, $lang) | |
Use this hook to preemptively override the human-readable timestamp generated by MWTimestamp::getHumanTimestamp(). | |
onGetInternalURL ( $title, &$url, $query) | |
Use this hook to modify fully-qualified URLs used for squid cache purging. | |
onGetIP (&$ip) | |
Use this hook to modify the IP of the current user (called only once). | |
onGetLangPreferredVariant (&$req) | |
This hook is called in LanguageConverter::getPreferredVariant() to allow fetching the language variant code from cookies or other such alternative storage. | |
onGetLinkColours ( $linkcolour_ids, &$colours, $title) | |
Use this hook to modify the CSS class of an array of page links. | |
onGetLocalURL ( $title, &$url, $query) | |
Use this hook to modify local URLs as output into page links. | |
onGetLocalURL__Article ( $title, &$url) | |
Use this hook to modify local URLs specifically pointing to article paths without any fancy queries or variants. | |
onGetLocalURL__Internal ( $title, &$url, $query) | |
Use this hook to modify local URLs to internal pages. | |
onGetLogTypesOnUser (&$types) | |
Use this hook to add log types where the target is a user page. | |
onGetMagicVariableIDs (&$variableIDs) | |
Use this hook to modify the list of magic variables. | |
onGetMetadataVersion (&$version) | |
Use this hook to modify the image metadata version currently in use. | |
onGetNewMessagesAlert (&$newMessagesAlert, $newtalks, $user, $out) | |
Use this hook to disable or modify the new messages alert. | |
onGetPreferences ( $user, &$preferences) | |
Use this hook to modify user preferences. | |
onGetRelativeTimestamp (&$output, &$diff, $timestamp, $relativeTo, $user, $lang) | |
Use this hook to pre-emptively override the relative timestamp generated by MWTimestamp::getRelativeTimestamp(). | |
onGetSlotDiffRenderer ( $contentHandler, &$slotDiffRenderer, $context) | |
Use this hook to replace or wrap the standard SlotDiffRenderer for some content type. | |
onGetUserBlock ( $user, $ip, &$block) | |
Use this hook to modify the block found by the block manager. | |
onGetUserPermissionsErrors ( $title, $user, $action, &$result) | |
Use this hook to add a permissions error when permissions errors are checked for. | |
onGetUserPermissionsErrorsExpensive ( $title, $user, $action, &$result) | |
This hook is equal to getUserPermissionsErrors, but it is called only if expensive checks are enabled. | |
onGitViewers (&$extTypes) | |
This hook is called when generating the list of git viewers for Special:Version, allowing you to modify the list. | |
onHistoryPageToolLinks ( $context, $linkRenderer, &$links) | |
Use this hook to add one or more links to revision history page subtitle. | |
onHistoryRevisionTools ( $rev, &$links, $prevRev, $user) | |
Use this hook to override or extend the revision tools available from the page history view, i.e. | |
onHistoryTools ( $revRecord, &$links, $prevRevRecord, $userIdentity) | |
Use this hook to override or extend the revision tools available from the page history view, i.e. | |
onHtmlCacheUpdaterAppendUrls ( $title, $mode, &$append) | |
This hook is used to declare extra URLs to purge from HTTP caches. | |
onHtmlCacheUpdaterVaryUrls ( $urls, &$append) | |
This hook is used to add variants of URLs to purge from HTTP caches. | |
onHTMLFileCache__useFileCache ( $context) | |
Use this hook to override whether a page should be cached in file cache. | |
onHtmlPageLinkRendererBegin ( $linkRenderer, $target, &$text, &$customAttribs, &$query, &$ret) | |
This hook is called when generating internal and interwiki links in LinkRenderer, before processing starts. | |
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. | |
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. | |
onImageOpenShowImageInlineBefore ( $imagePage, $output) | |
This hook is called just before showing the image on an image page. | |
onImagePageAfterImageLinks ( $imagePage, &$html) | |
This hook is called after the image links section on an image page is built. | |
onImagePageFileHistoryLine ( $imageHistoryList, $file, &$line, &$css) | |
This hook is called when a file history line is constructed. | |
onImagePageFindFile ( $page, &$file, &$displayFile) | |
This hook is called when fetching the file associated with an image page. | |
onImagePageShowTOC ( $page, &$toc) | |
This hook is called when the file toc on an image page is generated. | |
onImgAuthBeforeStream (&$title, &$path, &$name, &$result) | |
This hook is called before a file is streamed to a user, but only when using img_auth.php. | |
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. | |
onImportHandleContentXMLTag ( $reader, $contentInfo) | |
onImportHandleLogItemXMLTag ( $reader, $logInfo) | |
This hook is called when parsing an XML tag in a log item. | |
onImportHandlePageXMLTag ( $reader, &$pageInfo) | |
This hook is called when parsing an XML tag in a page. | |
onImportHandleRevisionXMLTag ( $reader, $pageInfo, $revisionInfo) | |
This hook is called when parsing an XML tag in a page revision. | |
onImportHandleToplevelXMLTag ( $reader) | |
This hook is called when parsing a top level XML tag. | |
onImportHandleUnknownUser ( $name) | |
When a user doesn't exist locally, use this hook to auto-create it. | |
onImportHandleUploadXMLTag ( $reader, $revisionInfo) | |
This hook is called when parsing an XML tag in a file upload. | |
onImportLogInterwikiLink (&$fullInterwikiPrefix, &$pageTitle) | |
Use this hook to change interwiki links in log entries and edit summaries for transwiki imports. | |
onImportSources (&$importSources) | |
This hook is called when reading from the $wgImportSources configuration variable. | |
onInfoAction ( $context, &$pageInfo) | |
This hook is called when building information to display on the action=info page. | |
onInitializeArticleMaybeRedirect ( $title, $request, &$ignoreRedirect, &$target, &$article) | |
Use this hook to check whether a title is a redirect. | |
onInternalParseBeforeLinks ( $parser, &$text, $stripState) | |
This hook is called during Parser's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processing. | |
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. | |
onInterwikiLoadPrefix ( $prefix, &$iwData) | |
This hook is called when resolving whether a given prefix is an interwiki or not. | |
onInvalidateEmailComplete ( $user) | |
This hook is called after a user's email has been invalidated successfully. | |
onIRCLineURL (&$url, &$query, $rc) | |
This hook is called when constructing the URL to use in an IRC notification. | |
onIsFileCacheable ( $article) | |
Use this hook to override the result of Article::isFileCacheable(). | |
onIsTrustedProxy ( $ip, &$result) | |
Use this hook to override the result of ProxyLookup::isTrustedProxy(). | |
onIsUploadAllowedFromUrl ( $url, &$allowed) | |
Use this hook to override the result of UploadFromUrl::isAllowedUrl(). | |
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. | |
onIsValidPassword ( $password, &$result, $user) | |
Use this hook to override the result of User::isValidPassword() | |
onLanguage__getMessagesFileName ( $code, &$file) | |
Use this hook to change the path of a localisation file. | |
onLanguageGetNamespaces (&$namespaces) | |
Use this hook to provide custom ordering for namespaces or remove namespaces. | |
onLanguageGetTranslatedLanguageNames (&$names, $code) | |
Use this hook to provide translated language names. | |
onLanguageLinks ( $title, &$links, &$linkFlags) | |
Use this hook to manipulate a page's language links. | |
onLanguageSelector ( $out, $cssClassName) | |
Use this hook to change the language selector available on a page. | |
onLinkBegin ( $skin, $target, &$html, &$customAttribs, &$query, &$options, &$ret) | |
This hook is called when generating internal and interwiki links in Linker::link(), before processing starts. | |
onLinkEnd ( $skin, $target, $options, &$html, &$attribs, &$ret) | |
This hook is called when generating internal and interwiki links in Linker::link(), just before the function returns a value. | |
onLinkerMakeExternalImage (&$url, &$alt, &$img) | |
This hook is called at the end of Linker::makeExternalImage() just before the return. | |
onLinkerMakeExternalLink (&$url, &$text, &$link, &$attribs, $linkType) | |
This hook is called at the end of Linker::makeExternalLink() just before the return. | |
onLinkerMakeMediaLinkFile ( $title, $file, &$html, &$attribs, &$ret) | |
This hook is called at the end of Linker::makeMediaLinkFile() just before the return. | |
onLinksUpdate ( $linksUpdate) | |
This hook is called at the beginning of LinksUpdate::doUpdate() just before the actual update. | |
onLinksUpdateAfterInsert ( $linksUpdate, $table, $insertions) | |
This hook is called at the end of LinksUpdate::incrTableUpdate() after each link table insert. | |
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. | |
onLinksUpdateConstructed ( $linksUpdate) | |
This hook is called at the end of LinksUpdate() is construction. | |
onListDefinedTags (&$tags) | |
This hook is called when trying to find all defined tags. | |
onLoadExtensionSchemaUpdates ( $updater) | |
This hook is called during database installation and updates. | |
onLocalFile__getHistory ( $file, &$tables, &$fields, &$conds, &$opts, &$join_conds) | |
This hook is called before a file history query is performed. | |
onLocalFilePurgeThumbnails ( $file, $archiveName, $urls) | |
This hook is called before thumbnails for a local file are purged. | |
onLocalisationCacheRecache ( $cache, $code, &$alldata, $unused) | |
Called when loading the localisation data into cache. | |
onLocalisationCacheRecacheFallback ( $cache, $code, &$alldata) | |
Called for each language when merging fallback data into the cache. | |
onLocalUserCreated ( $user, $autocreated) | |
This hook is called when a local user has been created. | |
onLogEventsListGetExtraInputs ( $type, $logEventsList, &$input, &$formDescriptor) | |
This hook is called when getting extra inputs to display on Special:Log for a specific log type. | |
onLogEventsListLineEnding ( $page, &$ret, $entry, &$classes, &$attribs) | |
This hook is called before a Special:Log line is finished. | |
onLogEventsListShowLogExtract (&$s, $types, $page, $user, $param) | |
This hook is called before the string is added to OutputPage. | |
onLogException ( $e, $suppressed) | |
This hook is called before an exception (or PHP error) is logged. | |
onLoginFormValidErrorMessages (array &$messages) | |
This hook is called in LoginForm when a function gets valid error messages. | |
onLogLine ( $log_type, $log_action, $title, $paramArray, &$comment, &$revert, $time) | |
Use this hook to process a single log entry on Special:Log. | |
onLonelyPagesQuery (&$tables, &$conds, &$joinConds) | |
Use this hook to modify the query used by Special:LonelyPages. | |
onMagicWordwgVariableIDs (&$variableIDs) | |
This hook is called when defining new magic words IDs. | |
onMaintenanceRefreshLinksInit ( $refreshLinks) | |
This hook is called before executing the refreshLinks.php maintenance script. | |
onMaintenanceUpdateAddParams (&$params) | |
Use this hook to add params to the update.php maintenance script. | |
onMakeGlobalVariablesScript (&$vars, $out) | |
This hook is called at end of OutputPage::getJSVars. | |
onManualLogEntryBeforePublish ( $logEntry) | |
Use this hook to access or modify log entry just before it is published. | |
onMarkPatrolled ( $rcid, $user, $wcOnlySysopsCanPatrol, $auto, &$tags) | |
This hook is called before an edit is marked patrolled. | |
onMarkPatrolledComplete ( $rcid, $user, $wcOnlySysopsCanPatrol, $auto) | |
This hook is called after an edit is marked patrolled. | |
onMediaWikiPerformAction ( $output, $article, $title, $user, $request, $mediaWiki) | |
Use this hook to override MediaWiki::performAction(). | |
onMediaWikiPHPUnitTest__endTest ( $test, $time) | |
This hook is called after each PHPUnit test completes. | |
onMediaWikiPHPUnitTest__startTest ( $test) | |
This hook is called before each PHPUnit test starts. | |
onMediaWikiServices ( $services) | |
This hook is called when a global MediaWikiServices instance is initialized. | |
onMessageCache__get (&$key) | |
This hook is called when fetching a message. | |
onMessageCacheReplace ( $title, $text) | |
This hook is called when a message page is changed. | |
onMessagesPreLoad ( $title, &$message, $code) | |
This hook is called when loading a message from the database. | |
onMimeMagicGuessFromContent ( $mimeMagic, &$head, &$tail, $file, &$mime) | |
Use this hook to guess the MIME by content. | |
onMimeMagicImproveFromExtension ( $mimeMagic, $ext, &$mime) | |
Use this hook to further improve the MIME type detected by considering the file extension. | |
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. | |
onModifyExportQuery ( $db, &$tables, $cond, &$opts, &$join_conds, &$conds) | |
Use this hook to modify the query used by the exporter. | |
onMovePageCheckPermissions ( $oldTitle, $newTitle, $user, $reason, $status) | |
Use this hook to specify whether the user is allowed to move the page. | |
onMovePageIsValidMove ( $oldTitle, $newTitle, $status) | |
Use this hook to specify whether a page can be moved for technical reasons. | |
onMultiContentSave ( $renderedRevision, $user, $summary, $flags, $status) | |
This hook is called before an article is saved. | |
onNamespaceIsMovable ( $index, &$result) | |
This hook is called when determining if it is possible to move pages in a namespace. | |
onNewDifferenceEngine ( $title, &$oldId, &$newId, $old, $new) | |
This hook is called when a new DifferenceEngine object is made. | |
onNewPagesLineEnding ( $page, &$ret, $row, &$classes, &$attribs) | |
This hook is called before a NewPages line is finished. | |
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. | |
onOldChangesListRecentChangesLine ( $changeslist, &$s, $rc, &$classes, &$attribs) | |
Use this hook to customize a recent changes line. | |
onOpenSearchUrls (&$urls) | |
This hook is called when constructing the OpenSearch description XML. | |
onOpportunisticLinksUpdate ( $page, $title, $parserOutput) | |
This hook is called by WikiPage::triggerOpportunisticLinksUpdate when a page view triggers a re-rendering of the page. | |
onOtherAutoblockLogLink (&$otherBlockLink) | |
Use this hook to add list items to a list of "other autoblocks" which appears at the end of Special:AutoblockList. | |
onOtherBlockLogLink (&$otherBlockLink, $ip) | |
Use this hook to add list items to a list of "other blocks" when viewing Special:BlockList. | |
onOutputPageAfterGetHeadLinksArray (&$tags, $out) | |
This hook is called in OutputPage::getHeadLinksArray right before returning the result. | |
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. | |
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. | |
onOutputPageCheckLastModified (&$modifiedTimes, $out) | |
This hook is called when checking if the page has been modified since the last visit. | |
onOutputPageMakeCategoryLinks ( $out, $categories, &$links) | |
This hook is called when links are about to be generated for the page's categories. | |
onOutputPageParserOutput ( $out, $parserOutput) | |
This hook is called after adding a parserOutput to $wgOut. | |
onPageContentInsertComplete ( $wikiPage, $user, $content, $summary, $isMinor, $isWatch, $section, $flags, $revision) | |
This hook is called after a new article is created. | |
onPageContentLanguage ( $title, &$pageLang, $userLang) | |
Use this hook to change the language in which the content of a page is written. | |
onPageContentSave ( $wikiPage, $user, $content, &$summary, $isminor, $iswatch, $section, $flags, $status) | |
This hook is called before an article is saved. | |
onPageContentSaveComplete ( $wikiPage, $user, $content, $summary, $isMinor, $isWatch, $section, $flags, $revision, $status, $originalRevId, $undidRevId) | |
This hook is called after an article has been updated. | |
onPageDeletionDataUpdates ( $title, $revision, &$updates) | |
This hook is called when constructing a list of DeferrableUpdate to be executed when a page is deleted. | |
onPageHistoryBeforeList ( $article, $context) | |
This hook is called when a history page list is about to be constructed. | |
onPageHistoryLineEnding ( $historyAction, &$row, &$s, &$classes, &$attribs) | |
This hook is called right before the <li> is generated for a history line. | |
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. | |
onPageHistoryPager__getQueryInfo ( $pager, &$queryInfo) | |
This hook is called when a history pager query parameter set is constructed. | |
onPageMoveComplete ( $old, $new, $user, $pageid, $redirid, $reason, $revision) | |
This hook is called after moving an article (title), post-commit. | |
onPageMoveCompleting ( $old, $new, $user, $pageid, $redirid, $reason, $revision) | |
This hook is called after moving an article (title), pre-commit. | |
onPageRenderingHash (&$confstr, $user, &$forOptions) | |
NOTE: Consider using ParserOptionsRegister instead. | |
onPageSaveComplete ( $wikiPage, $user, $summary, $flags, $revisionRecord, $editResult) | |
This hook is called after an article has been updated. | |
onPageViewUpdates ( $wikipage, $user) | |
Use this hook to make database (or other) changes after a page view is seen by MediaWiki. | |
onParserAfterParse ( $parser, &$text, $stripState) | |
This hook is called from Parser::parse() just after the call to Parser::internalParse() returns. | |
onParserAfterStrip ( $parser, &$text, $stripState) | |
This hook is called at end of parsing time. | |
onParserAfterTidy ( $parser, &$text) | |
This hook is called after Parser::tidy() in Parser::parse(). | |
onParserBeforeInternalParse ( $parser, &$text, $stripState) | |
This hook is called at the beginning of Parser::internalParse(). | |
onParserBeforePreprocess ( $parser, &$text, $stripState) | |
Called at the beginning of Parser::preprocess() | |
onParserBeforeStrip ( $parser, &$text, $stripState) | |
This hook is called at start of parsing time. | |
onParserBeforeTidy ( $parser, &$text) | |
This hook is called before tidy and custom tags replacements. | |
onParserCacheSaveComplete ( $parserCache, $parserOutput, $title, $popts, $revId) | |
This hook is called after a ParserOutput has been committed to the parser cache. | |
onParserClearState ( $parser) | |
This hook is called at the end of Parser::clearState(). | |
onParserCloned ( $parser) | |
This hook is called when the parser is cloned. | |
onParserFetchTemplate ( $parser, $title, $rev, &$text, &$deps) | |
This hook is called when the parser fetches a template. | |
onParserFirstCallInit ( $parser) | |
This hook is called when the parser initialises for the first time. | |
onParserGetVariableValueSwitch ( $parser, &$variableCache, $magicWordId, &$ret, $frame) | |
This hook is called when the parser needs the value of a custom magic word. | |
onParserGetVariableValueTs ( $parser, &$time) | |
Use this hook to change the value of the time for the {{LOCAL...}} magic word. | |
onParserGetVariableValueVarCache ( $parser, &$varCache) | |
Use this hook to change the value of the variable cache or return false to not use it. | |
onParserLimitReportFormat ( $key, &$value, &$report, $isHTML, $localize) | |
This hook is called for each row in the parser limit report that needs formatting. | |
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. | |
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. | |
onParserOptionsRegister (&$defaults, &$inCacheKey, &$lazyLoad) | |
Use this hook to register additional parser options. | |
onParserOutputPostCacheTransform ( $parserOutput, &$text, &$options) | |
This hook is called from ParserOutput::getText() to do post-cache transforms. | |
onParserOutputStashForEdit ( $page, $content, $output, $summary, $user) | |
This hook is called when an edit stash parse finishes, before the output is cached. | |
onParserPreSaveTransformComplete ( $parser, &$text) | |
This hook is called from Parser::preSaveTransform() after processing is complete, giving the extension a chance to further modify the wikitext. | |
onParserSectionCreate ( $parser, $section, &$sectionContent, $showEditLinks) | |
This hook is called each time the parser creates a document section from wikitext. | |
onParserTestGlobals (&$globals) | |
Use this hook to define globals for parser tests. | |
onParserTestTables (&$tables) | |
Use this hook to alter the list of tables to duplicate when parser tests are run. | |
onPasswordPoliciesForUser ( $user, &$effectivePolicy) | |
Use this hook to alter the effective password policy for a user. | |
onPerformRetroactiveAutoblock ( $block, &$blockIds) | |
This hook is called before a retroactive autoblock is applied to a user. | |
onPersonalUrls (&$personal_urls, &$title, $skin) | |
Use this hook to alter the user-specific navigation links (e.g. | |
onPingLimiter ( $user, $action, &$result, $incrBy) | |
Use this hook to override the results of User::pingLimiter(). | |
onPlaceNewSection ( $content, $oldtext, $subject, &$text) | |
Use this hook to override placement of new sections. | |
onPostLoginRedirect (&$returnTo, &$returnToQuery, &$type) | |
Use this hook to modify the post login redirect behavior. | |
onPreferencesFormPreSave ( $formData, $form, $user, &$result, $oldUserOptions) | |
Use this hook to override preferences being saved. | |
onPreferencesGetLegend ( $form, $key, &$legend) | |
Use the hook to override the text used for the <legend> of a preferences section. | |
onPrefixSearchBackend ( $ns, $search, $limit, &$results, $offset) | |
Use this hook to override the title prefix search used for OpenSearch and AJAX search suggestions. | |
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. | |
onPrefsEmailAudit ( $user, $oldaddr, $newaddr) | |
This hook is called when user changes their email address. | |
onProtectionForm__buildForm ( $article, &$output) | |
This hook is called after all protection type fieldsets are made in the form. | |
onProtectionForm__save ( $article, &$errorMsg, $reasonstr) | |
This hook is called when a protection form is submitted. | |
onProtectionForm__showLogExtract ( $article, $out) | |
This hook is called after the protection log extract is shown. | |
onRandomPageQuery (&$tables, &$conds, &$joinConds) | |
Use this hook to modify the query used by Special:Random to select random pages. | |
onRawPageViewBeforeOutput ( $obj, &$text) | |
This hook is called right before the text is blown out in action=raw. | |
onRecentChange_save ( $recentChange) | |
This hook is called at the end of RecentChange::save(). | |
onRecentChangesPurgeRows ( $rows) | |
This hook is called when old recentchanges rows are purged, after deleting those rows but within the same transaction. | |
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. | |
onRejectParserCacheValue ( $parserOutput, $wikiPage, $parserOptions) | |
Use this hook to reject an otherwise usable cached value from the Parser cache. | |
onRequestContextCreateSkin ( $context, &$skin) | |
This hook is called when RequestContext::getSkin creates a skin instance. | |
onResetPasswordExpiration ( $user, &$newExpire) | |
Use this hook to allow extensions to set a default password expiration. | |
onResourceLoaderGetConfigVars (array &$vars, $skin, Config $config) | |
Export static site-wide mw.config variables to JavaScript. | |
onResourceLoaderJqueryMsgModuleMagicWords (ResourceLoaderContext $context, array &$magicWords) | |
Add magic words to the mediawiki.jqueryMsg module. | |
onRevisionDataUpdates ( $title, $renderedRevision, &$updates) | |
This hook is called when constructing a list of DeferrableUpdate to be executed to record secondary data about a revision. | |
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. | |
onRevisionInsertComplete ( $revision, $data, $flags) | |
This hook is called after a revision is inserted into the database. | |
onRevisionRecordInserted ( $revisionRecord) | |
This hook is called after a revision is inserted into the database. | |
onRevisionUndeleted ( $revisionRecord, $oldPageID) | |
After an article revision is restored. | |
onRollbackComplete ( $wikiPage, $user, $revision, $current) | |
After an article rollback is completed. | |
onSearchableNamespaces (&$arr) | |
Use this hook to modify which namespaces are searchable. | |
onSearchAfterNoDirectMatch ( $term, &$title) | |
This hook is called if there was no match for the exact result. | |
onSearchDataForIndex (&$fields, $handler, $page, $output, $engine) | |
Use this hook to add data to search document. | |
onSearchGetNearMatch ( $term, &$title) | |
Use this hook to perform exact-title-matches in "go" searches if nothing was found. | |
onSearchGetNearMatchBefore ( $allSearchTerms, &$titleResult) | |
Use this hook to perform exact-title-matches in "go" searches before the normal operations. | |
onSearchGetNearMatchComplete ( $term, &$title) | |
Use this hook to modify exact-title-matches in "go" searches. | |
onSearchIndexFields (&$fields, $engine) | |
Use this hook to add fields to search index mapping. | |
onSearchResultInitFromTitle ( $title, &$id) | |
Use this hook to set the revision used when displaying a page in search results. | |
onSearchResultProvideDescription (array $pageIdentities, &$descriptions) | |
This hook is called when generating search results in order to fill the 'description' field in an extension. | |
onSearchResultProvideThumbnail (array $pageIdentities, &$thumbnails) | |
This hook is called when generating search results in order to fill the 'thumbnail' field in an extension. | |
onSearchResultsAugment (&$setAugmentors, &$rowAugmentors) | |
Use this hook to add code to the list of search result augmentors. | |
onSecondaryDataUpdates ( $title, $oldContent, $recursive, $parserOutput, &$updates) | |
Use this hook to modify the list of DataUpdates to perform when page content is modified. | |
onSecuritySensitiveOperationStatus (&$status, $operation, $session, $timeSinceAuth) | |
Use this hook to affect the return value from MediaWiki\Auth\AuthManager::securitySensitiveOperationStatus(). | |
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. | |
onSendWatchlistEmailNotification ( $targetUser, $title, $enotif) | |
Use this hook to cancel watchlist email notifications (enotifwatchlist) for an edit. | |
onSessionCheckInfo (&$reason, $info, $request, $metadata, $data) | |
Use this hook to validate a MediaWiki\Session\SessionInfo as it's being loaded from storage. | |
onSessionMetadata ( $backend, &$metadata, $requests) | |
Use this hook to add metadata to a session being saved. | |
onSetupAfterCache () | |
This hook is called in Setup.php, after cache objects are set. | |
onShortPagesQuery (&$tables, &$conds, &$joinConds, &$options) | |
Use this hook to modify the query used by Special:ShortPages. | |
onShowMissingArticle ( $article) | |
This hook is called when generating the output for a non-existent page. | |
onShowSearchHit ( $searchPage, $result, $terms, &$link, &$redirect, &$section, &$extract, &$score, &$size, &$date, &$related, &$html) | |
Use this hook to customize display of search hit. | |
onShowSearchHitTitle (&$title, &$titleSnippet, $result, $terms, $specialSearch, &$query, &$attributes) | |
Use this hook to customise display of search hit title/link. | |
onSidebarBeforeOutput ( $skin, &$sidebar) | |
Use this hook to edit the sidebar just before it is output by skins. | |
onSiteNoticeAfter (&$siteNotice, $skin) | |
This hook is called after the sitenotice/anonnotice is composed. | |
onSiteNoticeBefore (&$siteNotice, $skin) | |
This hook is called before the sitenotice/anonnotice is composed. | |
onSkinAddFooterLinks (Skin $skin, string $key, array &$footerItems) | |
This hook is called when generating the code used to display the footer. | |
onSkinAfterBottomScripts ( $skin, &$text) | |
This hook is called at the end of Skin::bottomScripts(). | |
onSkinAfterContent (&$data, $skin) | |
Use this hook to add text after the page content and article metadata. | |
onSkinAfterPortlet ( $skin, $portlet, &$html) | |
This hook is called when generating portlets. | |
onSkinBuildSidebar ( $skin, &$bar) | |
This hook is called at the end of Skin::buildSidebar(). | |
onSkinCopyrightFooter ( $title, $type, &$msg, &$link) | |
Use this hook for site and per-namespace customization of the copyright notice. | |
onSkinEditSectionLinks ( $skin, $title, $section, $tooltip, &$result, $lang) | |
Use this hook to modify section edit links. | |
onSkinGetPoweredBy (&$text, $skin) | |
This hook is called when generating the code used to display the "Powered by MediaWiki" icon. | |
onSkinPageReadyConfig (ResourceLoaderContext $context, array &$config) | |
Allows skins to change the mediawiki.page.ready module configuration. | |
onSkinPreloadExistence (&$titles, $skin) | |
Use this hook to supply titles that should be added to link existence cache before the page is rendered. | |
onSkinSubPageSubtitle (&$subpages, $skin, $out) | |
This hook is called at the beginning of Skin::subPageSubtitle(). | |
onSkinTemplateBuildNavUrlsNav_urlsAfterPermalink ( $sktemplate, &$nav_urls, &$revid, &$revid2) | |
This hook is called after creating the "permanent link" tab. | |
onSkinTemplateGetLanguageLink (&$languageLink, $languageLinkTitle, $title, $outputPage) | |
This hook is called after building the data for a language link from which the actual html is constructed. | |
onSkinTemplateNavigation ( $sktemplate, &$links) | |
This hook is called on content pages after the tabs have been added, but before variants have been added. | |
onSkinTemplateNavigation__SpecialPage ( $sktemplate, &$links) | |
This hook is called on special pages after the special tab is added but before variants have been added. | |
onSkinTemplateNavigation__Universal ( $sktemplate, &$links) | |
This hook is called on both content and special pages after variants have been added. | |
onSkinTemplateOutputPageBeforeExec ( $sktemplate, $tpl) | |
This hook is called before SkinTemplate::outputPage() starts page output. | |
onSkinTemplatePreventOtherActiveTabs ( $sktemplate, &$res) | |
Use this hook to prevent showing active tabs. | |
onSkinTemplateTabAction ( $sktemplate, $title, $message, $selected, $checkEdit, &$classes, &$query, &$text, &$result) | |
Use this hook to override SkinTemplate::tabAction(). | |
onSkinTemplateToolboxEnd ( $sk, $dummy) | |
This hook is called by SkinTemplate skins after toolbox links have been rendered (useful for adding more). | |
onSoftwareInfo (&$software) | |
This hook is called by Special:Version for returning information about the software. | |
onSpecialBlockModifyFormFields ( $sp, &$fields) | |
Use this hook to add more fields to Special:Block. | |
onSpecialContributions__formatRow__flags ( $context, $row, &$flags) | |
This hook is called before rendering a Special:Contributions row. | |
onSpecialContributions__getForm__filters ( $sp, &$filters) | |
This hook is called with a list of filters to render on Special:Contributions. | |
onSpecialContributionsBeforeMainOutput ( $id, $user, $sp) | |
This hook is called before the form on Special:Contributions. | |
onSpecialListusersDefaultQuery ( $pager, &$query) | |
This hook is called right before the end of UsersPager::getDefaultQuery(). | |
onSpecialListusersFormatRow (&$item, $row) | |
This hook is called right before the end of UsersPager::formatRow(). | |
onSpecialListusersHeader ( $pager, &$out) | |
This hook is called after adding the submit button in UsersPager::getPageHeader(). | |
onSpecialListusersHeaderForm ( $pager, &$out) | |
This hook is called before adding the submit button in UsersPager::getPageHeader(). | |
onSpecialListusersQueryInfo ( $pager, &$query) | |
This hook is called right before the end of UsersPager::getQueryInfo() | |
onSpecialLogAddLogSearchRelations ( $type, $request, &$qc) | |
Use this hook to add log relations to the current log. | |
onSpecialMovepageAfterMove ( $movePage, $oldTitle, $newTitle) | |
This hook is called after moving a page. | |
onSpecialMuteModifyFormFields ( $sp, &$fields) | |
Use this hook to add more fields to Special:Mute. | |
onSpecialMuteSubmit ( $data) | |
This hook is called at the end of SpecialMute::onSubmit. | |
onSpecialNewpagesConditions ( $special, $opts, &$conds, &$tables, &$fields, &$join_conds) | |
This hook is called when building the SQL query for Special:NewPages. | |
onSpecialNewPagesFilters ( $special, &$filters) | |
This hook is called after building form options at NewPages. | |
onSpecialPage_initList (&$list) | |
This hook is called when setting up SpecialPageFactory::$list. | |
onSpecialPageAfterExecute ( $special, $subPage) | |
This hook is called after SpecialPage::execute. | |
onSpecialPageBeforeExecute ( $special, $subPage) | |
This hook is called before SpecialPage::execute. | |
onSpecialPageBeforeFormDisplay ( $name, $form) | |
This hook is called before executing the HTMLForm object. | |
onSpecialPasswordResetOnSubmit (&$users, $data, &$error) | |
This hook is called when executing a form submission on Special:PasswordReset. | |
onSpecialRandomGetRandomTitle (&$randstr, &$isRedir, &$namespaces, &$extra, &$title) | |
This hook is called during the execution of Special:Random,. | |
onSpecialRecentChangesPanel (&$extraOpts, $opts) | |
This hook is called when building form options in SpecialRecentChanges. | |
onSpecialResetTokensTokens (&$tokens) | |
This hook is called when building token list for SpecialResetTokens. | |
onSpecialSearchCreateLink ( $t, &$params) | |
This hook is called when making the message to create a page or go to the existing page. | |
onSpecialSearchGoResult ( $term, $title, &$url) | |
Use this hook to alter the behaviour of the 'go' feature when searching. | |
onSpecialSearchNogomatch (&$title) | |
This hook is called when the 'Go' feature is triggered and the target doesn't exist. | |
onSpecialSearchPowerBox (&$showSections, $term, &$opts) | |
Use this hook to modify advanced search profile forms. | |
onSpecialSearchProfileForm ( $search, &$form, $profile, $term, $opts) | |
Use this hook to modify search profile forms. | |
onSpecialSearchProfiles (&$profiles) | |
Use this hook to modify search profiles. | |
onSpecialSearchResults ( $term, &$titleMatches, &$textMatches) | |
This hook is called before search result display. | |
onSpecialSearchResultsAppend ( $specialSearch, $output, $term) | |
This hook is called immediately before returning HTML on the search results page. | |
onSpecialSearchResultsPrepend ( $specialSearch, $output, $term) | |
This hook is called immediately before returning HTML on the search results page. | |
onSpecialSearchSetupEngine ( $search, $profile, $engine) | |
Use this hook for passing custom data to the search engine. | |
onSpecialStatsAddExtra (&$extraStats, $context) | |
Use this hook to add extra statistics at the end of Special:Statistics. | |
onSpecialTrackingCategories__generateCatLink ( $specialPage, $catTitle, &$html) | |
This hook is called for each category link on Special:TrackingCategories. | |
onSpecialTrackingCategories__preprocess ( $specialPage, $trackingCategories) | |
This hook is called after LinkBatch on Special:TrackingCategories. | |
onSpecialUploadComplete ( $form) | |
This hook is called after successfully uploading a file from Special:Upload. | |
onSpecialVersionVersionUrl ( $version, &$versionUrl) | |
This hook is called when building the URL for Special:Version. | |
onSpecialWatchlistGetNonRevisionTypes (&$nonRevisionTypes) | |
This hook is called when building the SQL query for SpecialWatchlist. | |
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. | |
onThumbnailBeforeProduceHTML ( $thumbnail, &$attribs, &$linkAttribs) | |
This hook is called before an image HTML is about to be rendered (by ThumbnailImage:toHtml method). | |
onTitleArrayFromResult (&$titleArray, $res) | |
This hook is called when creating a TitleArray object from a database result. | |
onTitleExists ( $title, &$exists) | |
This hook is called when determining whether a page exists at a given title. | |
onTitleGetEditNotices ( $title, $oldid, &$notices) | |
Use this hook to add edit notices. | |
onTitleGetRestrictionTypes ( $title, &$types) | |
Use this hook to modify the types of protection that can be applied. | |
onTitleIsAlwaysKnown ( $title, &$isKnown) | |
This hook is called when determining if a page exists. | |
onTitleIsMovable ( $title, &$result) | |
This hook is called when determining if it is possible to move a page. | |
onTitleMove ( $old, $nt, $user, $reason, &$status) | |
This hook is called before moving an article (title). | |
onTitleMoveComplete ( $old, $nt, $user, $pageid, $redirid, $reason, $revision) | |
This hook is called after moving an article (title), post-commit. | |
onTitleMoveCompleting ( $old, $nt, $user, $pageid, $redirid, $reason, $revision) | |
This hook is called after moving an article (title), pre-commit. | |
onTitleMoveStarting ( $old, $nt, $user) | |
This hook is called before moving an article (title), but just after the atomic DB section starts. | |
onTitleQuickPermissions ( $title, $user, $action, &$errors, $doExpensiveQueries, $short) | |
This hook is called from Title::checkQuickPermissions to add to or override the quick permissions check. | |
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. | |
onTitleSquidURLs ( $title, &$urls) | |
This hook is called to determine which URLs to purge from HTTP caches. | |
onUnblockUser ( $block, $user, &$reason) | |
This hook is called before an IP address or user is unblocked. | |
onUnblockUserComplete ( $block, $user) | |
This hook is called after an IP address or user has been unblocked. | |
onUndeleteForm__showHistory (&$archive, $title) | |
This hook is called in UndeleteForm::showHistory, after creating the PageArchive object. | |
onUndeleteForm__showRevision (&$archive, $title) | |
This hook is called in UndeleteForm::showRevision, after creating a PageArchive object. | |
onUndeleteForm__undelete (&$archive, $title) | |
This hook is called in UndeleteForm::undelete, after checks are conducted. | |
onUndeletePageToolLinks ( $context, $linkRenderer, &$links) | |
Use this hook to add one or more links to edit page subtitle when a page has been previously deleted. | |
onUndeleteShowRevision ( $title, $rev) | |
This hook is called when showing a revision in Special:Undelete. | |
onUnitTestsAfterDatabaseSetup ( $database, $prefix) | |
This hook is called right after MediaWiki's test infrastructure has finished creating/duplicating core tables for unit tests. | |
onUnitTestsBeforeDatabaseTeardown () | |
This hook is called right before MediaWiki tears down its database infrastructure used for unit tests. | |
onUnitTestsList (&$paths) | |
This hook is called when building a list of paths containing PHPUnit tests. | |
onUnwatchArticle ( $user, $page, &$status) | |
This hook is called before a watch is removed from an article. | |
onUnwatchArticleComplete ( $user, $page) | |
This hook is called after a watch is removed from an article. | |
onUpdateUserMailerFormattedPageStatus (&$formattedPageStatus) | |
This hook is called before a notification email gets sent. | |
onUploadComplete ( $uploadBase) | |
This hook is called upon completion of a file upload. | |
onUploadCreateFromRequest ( $type, &$className) | |
This hook is called when UploadBase::createFromRequest has been called. | |
onUploadForm_BeforeProcessing ( $upload) | |
This hook is called at the beginning of processUpload(). | |
onUploadForm_getInitialPageText (&$pageText, $msg, $config) | |
This hook is called after the initial page text for file uploads is generated. | |
onUploadForm_initial ( $upload) | |
This hook is called before the upload form is generated. | |
onUploadFormInitDescriptor (&$descriptor) | |
This hook is called after the descriptor for the upload form as been assembled. | |
onUploadFormSourceDescriptors (&$descriptor, &$radio, $selectedSourceType) | |
This hook is called after the standard source inputs have been added to the descriptor. | |
onUploadStashFile ( $upload, $user, $props, &$error) | |
This hook is called before a file is stashed (uploaded to stash). | |
onUploadVerifyFile ( $upload, $mime, &$error) | |
Use this hook to perform extra file verification, based on MIME type, etc. | |
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.). | |
onUser__mailPasswordInternal ( $user, $ip, $u) | |
This hook is called before creation and mailing of a user's new temporary password. | |
onUserAddGroup ( $user, &$group, &$expiry) | |
This hook is alled when adding a group or changing a group's expiry. | |
onUserArrayFromResult (&$userArray, $res) | |
This hook is called when creating an UserArray object from a database result. | |
onUserCan ( $title, $user, $action, &$result) | |
Use this hook to interrupt or advise the "user can do X to Y article" check. | |
onUserCanSendEmail ( $user, &$canSend) | |
Use this hook to override User::canSendEmail() permission check. | |
onUserClearNewTalkNotification ( $userIdentity, $oldid) | |
This hook is called before clearing the "You have new messages!" message. | |
onUserEffectiveGroups ( $user, &$groups) | |
This hook is called in UserGroupManager::getUserEffectiveGroups(). | |
onUserGetAllRights (&$rights) | |
This hook is called after calculating a list of all available rights. | |
onUserGetDefaultOptions (&$defaultOptions) | |
This hook is called after fetching core default user options but before returning the options. | |
onUserGetEmail ( $user, &$email) | |
This hook is called when getting an user email address. | |
onUserGetEmailAuthenticationTimestamp ( $user, &$timestamp) | |
This hook is called when getting the timestamp of email authentication. | |
onUserGetLanguageObject ( $user, &$code, $context) | |
This hook is called when getting a user's interface language object. | |
onUserGetReservedNames (&$reservedUsernames) | |
Use this hook to modify $wgReservedUsernames at run time. | |
onUserGetRights ( $user, &$rights) | |
This hook is called in User::getRights(). | |
onUserGetRightsRemove ( $user, &$rights) | |
This hook is called in User::getRights(). | |
onUserGroupsChanged ( $user, $added, $removed, $performer, $reason, $oldUGMs, $newUGMs) | |
This hook is called after user groups are changed. | |
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). | |
onUserIsBlockedGlobally ( $user, $ip, &$blocked, &$block) | |
Use this hook to establish that a user is blocked on all wikis. | |
onUserIsBot ( $user, &$isBot) | |
Use this hook to establish whether a user is a bot account. | |
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. | |
onUserIsLocked ( $user, &$locked) | |
Use this hook to establish that a user is locked. | |
onUserLoadAfterLoadFromSession ( $user) | |
This hook is called to authenticate users on external or environmental means. | |
onUserLoadDefaults ( $user, $name) | |
This hook is called when loading a default user. | |
onUserLoadFromDatabase ( $user, &$s) | |
This hook is called when loading a user from the database. | |
onUserLoadOptions ( $user, &$options) | |
This hook is called when user options/preferences are being loaded from the database. | |
onUserLoggedIn ( $user) | |
This hook is called after a user is logged in. | |
onUserLoginComplete ( $user, &$inject_html, $direct) | |
Use this hook to show custom content after a user has logged in via the web interface. | |
onUserLogout ( $user) | |
This hook is called before a user logs out. | |
onUserLogoutComplete ( $user, &$inject_html, $oldName) | |
This hook is called after a user has logged out. | |
onUserMailerChangeReturnPath ( $to, &$returnPath) | |
This hook is called to generate a VERP return address when UserMailer sends an email, with a bounce handling extension. | |
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. | |
onUserMailerTransformContent ( $to, $from, &$body, &$error) | |
This hook is called in UserMailer::send() to change email contents. | |
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. | |
onUserRemoveGroup ( $user, &$group) | |
This hook is called when removing a group. | |
onUserRequiresHTTPS ( $user, &$https) | |
This hook is called to determine whether a user needs to be switched to HTTPS. | |
onUserResetAllOptions ( $user, &$newOptions, $options, $resetKinds) | |
This hook is called when user preferences have been requested to be reset. | |
onUserRetrieveNewTalks ( $user, &$talks) | |
This hook is called when retrieving "You have new messages!" message(s). | |
onUserSaveOptions ( $user, &$options, $originalOptions) | |
This hook is called just before saving user preferences. | |
onUserSaveSettings ( $user) | |
This hook is called directly after user preferences have been saved to the database. | |
onUserSendConfirmationMail ( $user, &$mail, $info) | |
This hook is called just before a confirmation email is sent to a user. | |
onUserSetCookies ( $user, &$session, &$cookies) | |
This hook is called when setting user cookies. | |
onUserSetEmail ( $user, &$email) | |
This hook is called when changing user email address. | |
onUserSetEmailAuthenticationTimestamp ( $user, &$timestamp) | |
This hook is called when setting the timestamp of a User's email authentication. | |
onUsersPagerDoBatchLookups ( $dbr, $userIds, &$cache, &$groups) | |
This hook is called called in UsersPager::doBatchLookups() | |
onUserToolLinksEdit ( $userId, $userText, &$items) | |
This hook is called when generating a list of user tool links, e.g. | |
onValidateExtendedMetadataCache ( $timestamp, $file) | |
Use this hook to validate the cached metadata in FormatMetadata::getExtendedMeta. | |
onWantedPages__getQueryInfo ( $wantedPages, &$query) | |
This hook is called in WantedPagesPage::getQueryInfo(). | |
onWatchArticle ( $user, $page, &$status, $expiry) | |
This hook is called before a watch is added to an article. | |
onWatchArticleComplete ( $user, $page) | |
This hook is called after a watch is added to an article. | |
onWatchedItemQueryServiceExtensions (&$extensions, $watchedItemQueryService) | |
Use this hook to create a WatchedItemQueryServiceExtension. | |
onWatchlistEditorBeforeFormRender (&$watchlistInfo) | |
This hook is called before building the Special:EditWatchlist form. | |
onWatchlistEditorBuildRemoveLine (&$tools, $title, $redirect, $skin, &$link) | |
This hook is called when building remove lines in Special:Watchlist/edit. | |
onWebRequestPathInfoRouter ( $router) | |
This hook is called while building the PathRouter to parse the REQUEST_URI. | |
onWebResponseSetCookie (&$name, &$value, &$expire, &$options) | |
This hook is called when setting a cookie in WebResponse::setcookie(). | |
onWfShellWikiCmd (&$script, &$parameters, &$options) | |
This hook is called when generating a shell-escaped command line string to run a MediaWiki CLI script. | |
onWgQueryPages (&$qp) | |
This hook is called when initialising list of QueryPage subclasses. | |
onWhatLinksHereProps ( $row, $title, $target, &$props) | |
Use this hook to add annotations to Special:WhatLinksHere. | |
onWikiExporter__dumpStableQuery (&$tables, &$opts, &$join) | |
Use this hook to get the SELECT query for "stable" revisions dumps. | |
onWikiPageDeletionUpdates ( $page, $content, &$updates) | |
Use this hook to manipulate the list of DeferrableUpdates to be applied when a page is deleted. | |
onWikiPageFactory ( $title, &$page) | |
Use this hook to override WikiPage class used for a title. | |
onXmlDumpWriterOpenPage ( $obj, &$out, $row, $title) | |
This hook is called at the end of XmlDumpWriter::openPage, to allow extra metadata to be added. | |
onXmlDumpWriterWriteRevision ( $obj, &$out, $row, $text, $rev) | |
This hook is called at the end of a revision in an XML dump, to add extra metadata. | |
Private Attributes | |
HookContainer | $container |
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 22 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::__construct | ( | HookContainer | $container | ) |
Definition at line 570 of file HookRunner.php.
References MediaWiki\HookContainer\HookRunner\$container.
MediaWiki\HookContainer\HookRunner::onAbortAutoblock | ( | $autoblockip, | |
$block ) |
Use this hook to cancel an autoblock.
string | $autoblockip | IP going to be autoblocked |
DatabaseBlock | $block | Block from which the autoblock is coming |
Implements MediaWiki\Block\Hook\AbortAutoblockHook.
Definition at line 574 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onAbortDiffCache | ( | $diffEngine | ) |
Use this hook to cancel the caching of a diff.
DifferenceEngine | $diffEngine |
Implements MediaWiki\Diff\Hook\AbortDiffCacheHook.
Definition at line 581 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onAbortEmailNotification | ( | $editor, | |
$title, | |||
$rc ) |
Use this hook to cancel email notifications for an edit.
User | $editor | User who made the change |
Title | $title | Title of the page that was edited |
RecentChange | $rc | Current RecentChange object |
Implements MediaWiki\Hook\AbortEmailNotificationHook.
Definition at line 588 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onAbortTalkPageEmailNotification | ( | $targetUser, | |
$title ) |
Use this hook to disable email notifications of edits to users' talk pages.
Implements MediaWiki\Hook\AbortTalkPageEmailNotificationHook.
Definition at line 595 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onActionBeforeFormDisplay | ( | $name, | |
$form, | |||
$article ) |
This hook is called before executing the HTMLForm object.
Implements MediaWiki\Hook\ActionBeforeFormDisplayHook.
Definition at line 602 of file HookRunner.php.
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.
Implements MediaWiki\Hook\ActionModifyFormFieldsHook.
Definition at line 609 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onAddNewAccount | ( | $user, | |
$byEmail ) |
This hook is called after a user account is created.
User | $user | the User object that was created. (Parameter added in 1.7) |
bool | $byEmail | true when account was created "by email" (added in 1.12) |
Implements MediaWiki\Hook\AddNewAccountHook.
Definition at line 616 of file HookRunner.php.
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.
string[] | &$feedLinks | Array of created feed links |
Implements MediaWiki\Hook\AfterBuildFeedLinksHook.
Definition at line 623 of file HookRunner.php.
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().
OutputPage | $output | The OutputPage object where output() was called |
Implements MediaWiki\Hook\AfterFinalPageOutputHook.
Definition at line 630 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onAfterImportPage | ( | $title, | |
$foreignTitle, | |||
$revCount, | |||
$sRevCount, | |||
$pageInfo ) |
This hook is called when a page import is completed.
Title | $title | Title under which the revisions were imported |
ForeignTitle | $foreignTitle | ForeignTitle object based on data provided by the XML file |
int | $revCount | Number of revisions in the XML file |
int | $sRevCount | Number of successfully imported revisions |
array | $pageInfo | Associative array of page information |
Implements MediaWiki\Hook\AfterImportPageHook.
Definition at line 638 of file HookRunner.php.
References $title.
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.
Parser | $parser | Parser that called the hook |
ImageGalleryBase | $ig | Gallery, an object of one of the gallery classes (inheriting from ImageGalleryBase) |
string | &$html | HTML generated by the gallery |
Implements MediaWiki\Hook\AfterParserFetchFileAndTitleHook.
Definition at line 647 of file HookRunner.php.
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.
EditPage | $editPage |
Implements MediaWiki\Hook\AlternateEditHook.
Definition at line 654 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onAlternateEditPreview | ( | $editPage, | |
& | $content, | ||
& | $previewHTML, | ||
& | $parserOutput ) |
This hook is called before generating the preview of the page when editing ( EditPage::getPreviewText() ).
EditPage | $editPage | |
Content | &$content | Content object for the text field from the edit page |
string | &$previewHTML | Text to be placed into the page for the preview |
ParserOutput | &$parserOutput | ParserOutput object for the preview |
Implements MediaWiki\Hook\AlternateEditPreviewHook.
Definition at line 661 of file HookRunner.php.
References $content.
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().
array | $headers | Associative array of headers for the email |
MailAddress | array | $to | To address |
MailAddress | $from | From address |
string | $subject | Subject of the email |
string | $body | Body of the message |
Implements MediaWiki\Hook\AlternateUserMailerHook.
Definition at line 670 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onAncientPagesQuery | ( | & | $tables, |
& | $conds, | ||
& | $joinConds ) |
Use this hook to modify the query used by Special:AncientPages.
array | &$tables | tables to join in the query |
array | &$conds | conditions for the query |
array | &$joinConds | join conditions for the query |
Implements MediaWiki\Hook\AncientPagesQueryHook.
Definition at line 677 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onApiBeforeMain | ( | & | $main | ) |
This hook is called before calling ApiMain's execute() method in api.php.
ApiMain | &$main |
Implements MediaWiki\Hook\ApiBeforeMainHook.
Definition at line 684 of file HookRunner.php.
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.
array | &$conds | Array of query conditions (all of which have to be met; conditions will AND in the final query) |
string[] | $logTypes | Array of log types being queried |
Implements MediaWiki\Page\Hook\Article__MissingArticleConditionsHook.
Definition at line 897 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onArticleConfirmDelete | ( | $article, | |
$output, | |||
& | $reason ) |
This hook is called before writing the confirmation form for article deletion.
Article | $article | Article being deleted |
OutputPage | $output | |
string | &$reason | Reason the article is being deleted |
Implements MediaWiki\Page\Hook\ArticleConfirmDeleteHook.
Definition at line 691 of file HookRunner.php.
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.
DifferenceEngine | $diffEngine | |
OutputPage | $output |
Implements MediaWiki\Diff\Hook\ArticleContentOnDiffHook.
Definition at line 698 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onArticleDelete | ( | $wikiPage, | |
$user, | |||
& | $reason, | ||
& | $error, | ||
& | $status, | ||
$suppress ) |
This hook is called before an article is deleted.
WikiPage | $wikiPage | WikiPage being deleted |
User | $user | User deleting the article |
string | &$reason | Reason the article is being deleted |
string | &$error | If the deletion was prohibited, the (raw HTML) error message to display (added in 1.13) |
Status | &$status | Modify this to throw an error. Overridden by $error (added in 1.20) |
bool | $suppress | Whether this is a suppression deletion or not (added in 1.27) |
Implements MediaWiki\Page\Hook\ArticleDeleteHook.
Definition at line 705 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onArticleDeleteAfterSuccess | ( | $title, | |
$outputPage ) |
Use this hook to modify the output after an article has been deleted.
Title | $title | Article that has been deleted |
OutputPage | $outputPage | OutputPage that can be used to append the output |
Implements MediaWiki\Page\Hook\ArticleDeleteAfterSuccessHook.
Definition at line 714 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onArticleDeleteComplete | ( | $wikiPage, | |
$user, | |||
$reason, | |||
$id, | |||
$content, | |||
$logEntry, | |||
$archivedRevisionCount ) |
This hook is called after an article is deleted.
WikiPage | $wikiPage | WikiPage that was deleted |
User | $user | User that deleted the article |
string | $reason | Reason the article was deleted |
int | $id | ID of the article that was deleted |
Content | null | $content | Content of the deleted page (or null, when deleting a broken page) |
ManualLogEntry | $logEntry | ManualLogEntry used to record the deletion |
int | $archivedRevisionCount | Number of revisions archived during the deletion |
Implements MediaWiki\Page\Hook\ArticleDeleteCompleteHook.
Definition at line 721 of file HookRunner.php.
References $content.
MediaWiki\HookContainer\HookRunner::onArticleEditUpdateNewTalk | ( | $wikiPage, | |
$recipient ) |
This hook is called before updating user_newtalk when a user talk page was changed.
WikiPage | $wikiPage | WikiPage of the user talk page |
User | $recipient | User whose talk page was edited |
Implements MediaWiki\Storage\Hook\ArticleEditUpdateNewTalkHook.
Definition at line 731 of file HookRunner.php.
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.
WikiPage | $wikiPage | |
PreparedEdit | $editInfo | Data holder that includes the parser output ($editInfo->output) for that page after the change |
bool | $changed | Whether the page was changed |
Implements MediaWiki\Storage\Hook\ArticleEditUpdatesHook.
Definition at line 738 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onArticleEditUpdatesDeleteFromRecentchanges | ( | $wikiPage | ) |
This hook is called before deleting old entries from recentchanges table.
Implements MediaWiki\Storage\Hook\ArticleEditUpdatesDeleteFromRecentchangesHook.
Definition at line 745 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onArticleFromTitle | ( | $title, | |
& | $article, | ||
$context ) |
This hook is called when creating an article object from a title object using Wiki::articleFromTitle().
Title | $title | Title used to create the article object |
Article | &$article | Article that will be returned |
IContextSource | $context |
Implements MediaWiki\Page\Hook\ArticleFromTitleHook.
Definition at line 752 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onArticleMergeComplete | ( | $targetTitle, | |
$destTitle ) |
This hook is called after merging to article using Special:Mergehistory.
Implements MediaWiki\Hook\ArticleMergeCompleteHook.
Definition at line 759 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onArticlePageDataAfter | ( | $wikiPage, | |
& | $row ) |
This hook is called after loading data of an article from the database.
WikiPage | $wikiPage | WikiPage whose data were loaded |
stdClass | &$row | Row returned from the database server |
Implements MediaWiki\Page\Hook\ArticlePageDataAfterHook.
Definition at line 766 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onArticlePageDataBefore | ( | $wikiPage, | |
& | $fields, | ||
& | $tables, | ||
& | $joinConds ) |
This hook is called before loading data of an article from the database.
WikiPage | $wikiPage | WikiPage whose data will be loaded |
array | &$fields | Fields to load from the database |
array | &$tables | Tables to load from the database |
array | &$joinConds | Join conditions to load from the database |
Implements MediaWiki\Page\Hook\ArticlePageDataBeforeHook.
Definition at line 773 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onArticlePrepareTextForEdit | ( | $wikiPage, | |
$popts ) |
This hook is called when preparing text to be saved.
WikiPage | $wikiPage | WikiPage being saved |
ParserOptions | $popts | Parser options to be used for pre-save transformation |
Implements MediaWiki\Storage\Hook\ArticlePrepareTextForEditHook.
Definition at line 782 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onArticleProtect | ( | $wikiPage, | |
$user, | |||
$protect, | |||
$reason ) |
This hook is called before an article is protected.
WikiPage | $wikiPage | WikiPage being protected |
User | $user | User doing the protection |
array | $protect | Set of restriction keys |
string | $reason | Reason for protect |
Implements MediaWiki\Page\Hook\ArticleProtectHook.
Definition at line 789 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onArticleProtectComplete | ( | $wikiPage, | |
$user, | |||
$protect, | |||
$reason ) |
This hook is called after an article is protected.
WikiPage | $wikiPage | WikiPage that was protected |
User | $user | User who did the protection |
array | $protect | Set of restriction keys |
string | $reason | Reason for protect |
Implements MediaWiki\Page\Hook\ArticleProtectCompleteHook.
Definition at line 796 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onArticlePurge | ( | $wikiPage | ) |
This hook is called before executing "&action=purge".
Implements MediaWiki\Page\Hook\ArticlePurgeHook.
Definition at line 803 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onArticleRevisionUndeleted | ( | $title, | |
$revision, | |||
$oldPageID ) |
This hook is called after an article revision is restored.
Title | $title | Article title |
Revision | $revision | |
int | null | $oldPageID | Page ID of the revision when archived |
Implements MediaWiki\Page\Hook\ArticleRevisionUndeletedHook.
Definition at line 810 of file HookRunner.php.
References $title.
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.
RevisionRecord | null | $revision | Content 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 | $title | Title of the page |
int | $oldid | Requested revision ID, or 0 for the current revision |
OutputPage | $output |
Implements MediaWiki\Page\Hook\ArticleRevisionViewCustomHook.
Definition at line 817 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onArticleRevisionVisibilitySet | ( | $title, | |
$ids, | |||
$visibilityChangeMap ) |
This hook is called when changing visibility of one or more revisions of an article.
Title | $title | Title of the article |
int[] | $ids | IDs to set the visibility for |
array | $visibilityChangeMap | Map 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], ... ] |
Implements MediaWiki\Hook\ArticleRevisionVisibilitySetHook.
Definition at line 826 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onArticleRollbackComplete | ( | $wikiPage, | |
$user, | |||
$revision, | |||
$current ) |
This hook is called after an article rollback is completed.
WikiPage | $wikiPage | WikiPage that was edited |
User | $user | User who did the rollback |
Revision | $revision | Revision the page was reverted back to |
Revision | $current | Reverted revision |
Implements MediaWiki\Page\Hook\ArticleRollbackCompleteHook.
Definition at line 835 of file HookRunner.php.
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.
Article | $article |
Implements MediaWiki\Page\Hook\ArticleShowPatrolFooterHook.
Definition at line 844 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onArticleUndelete | ( | $title, | |
$create, | |||
$comment, | |||
$oldPageId, | |||
$restoredPages ) |
This hook is called when one or more revisions of an article are restored.
Title | $title | Title corresponding to the article restored |
bool | $create | Whether or not the restoration caused the page to be created (i.e. it didn't exist before) |
string | $comment | Comment associated with the undeletion |
int | $oldPageId | ID of page previously deleted (from archive table). This ID will be used for the restored page. |
array | $restoredPages | Set of page IDs that have revisions restored for this undelete, with keys set to page IDs and values set to 'true' |
Implements MediaWiki\Page\Hook\ArticleUndeleteHook.
Definition at line 851 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onArticleUndeleteLogEntry | ( | $pageArchive, | |
& | $logEntry, | ||
$user ) |
This hook is called when a log entry is generated but not yet saved.
PageArchive | $pageArchive | |
ManualLogEntry | &$logEntry | |
User | $user | User who is performing the log action |
Implements MediaWiki\Page\Hook\ArticleUndeleteLogEntryHook.
Definition at line 860 of file HookRunner.php.
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.
Article | $article | |
string | &$sectionanchor | Section anchor link (e.g. "#overview" ) |
string | &$extraq | Extra query parameters which can be added via hooked functions |
Implements MediaWiki\Hook\ArticleUpdateBeforeRedirectHook.
Definition at line 867 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onArticleViewFooter | ( | $article, | |
$patrolFooterShown ) |
This hook is called after showing the footer section of an ordinary page view.
Article | $article | |
bool | $patrolFooterShown | Whether patrol footer is shown |
Implements MediaWiki\Page\Hook\ArticleViewFooterHook.
Definition at line 876 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onArticleViewHeader | ( | $article, | |
& | $pcache, | ||
& | $outputDone ) |
Use this hook to control article output.
This hook is called before the parser cache is about to be tried for article viewing.
Article | $article | |
bool | &$pcache | Whether to try the parser cache or not |
bool | ParserOutput | &$outputDone | Whether 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. |
Implements MediaWiki\Page\Hook\ArticleViewHeaderHook.
Definition at line 883 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onArticleViewRedirect | ( | $article | ) |
This hook is called before setting "Redirected from ..." subtitle when a redirect was followed.
Article | $article | Target article |
Implements MediaWiki\Page\Hook\ArticleViewRedirectHook.
Definition at line 890 of file HookRunner.php.
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.
AuthenticationRequest[] | $requests | Array of AuthenticationRequests the fields are created from |
array | $fieldInfo | Field information array (union of all AuthenticationRequest::getFieldInfo() responses) |
array | &$formDescriptor | HTMLForm descriptor. The special key 'weight' can be set to change the order of the fields. |
string | $action | One of the AuthManager::ACTION_* constants |
Implements MediaWiki\SpecialPage\Hook\AuthChangeFormFieldsHook.
Definition at line 904 of file HookRunner.php.
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.
AuthenticationResponse | $response | Response in either a PASS or FAIL state |
User | null | $user | User being authenticated against, or null if authentication failed before getting that far |
string | $username | A 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[] | $extraData | Array (string => string) with extra information, intended to be added to log contexts. Fields it might include:
|
Implements MediaWiki\Auth\Hook\AuthManagerLoginAuthenticateAuditHook.
Definition at line 913 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onAutopromoteCondition | ( | $type, | |
$args, | |||
$user, | |||
& | $result ) |
Use this hook to check autopromote condition for user.
string | $type | Condition type |
array | $args | Arguments |
User | $user | |
array | &$result | Result of checking autopromote condition |
Implements MediaWiki\User\Hook\AutopromoteConditionHook.
Definition at line 922 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onBacklinkCacheGetConditions | ( | $table, | |
$title, | |||
& | $conds ) |
Use this hook to set conditions for query when links to certain title are fetched.
string | $table | Table name |
Title | $title | Title of the page to which backlinks are sought |
array | &$conds | Query conditions |
Implements MediaWiki\Cache\Hook\BacklinkCacheGetConditionsHook.
Definition at line 929 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onBacklinkCacheGetPrefix | ( | $table, | |
& | $prefix ) |
Use this hook to set a prefix for a specific link table.
string | $table | Table name |
string | &$prefix | Prefix |
Implements MediaWiki\Cache\Hook\BacklinkCacheGetPrefixHook.
Definition at line 936 of file HookRunner.php.
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.
string | $name | Image name being checked |
bool | &$bad | Whether or not the image is "bad" |
Implements MediaWiki\Hook\BadImageHook.
Definition at line 943 of file HookRunner.php.
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.
BaseTemplate | $template | |
string | $portlet | Portlet name |
string | &$html |
Implements MediaWiki\Hook\BaseTemplateAfterPortletHook.
Definition at line 950 of file HookRunner.php.
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.
BaseTemplate | $sk | Base skin template |
array | &$toolbox | Array of toolbox items, see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array |
Implements MediaWiki\Hook\BaseTemplateToolboxHook.
Definition at line 957 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onBeforeDisplayNoArticleText | ( | $article | ) |
This hook is called before displaying message key "noarticletext" or "noarticletext-nopermission" at Article::showMissingArticle().
Article | $article |
Implements MediaWiki\Page\Hook\BeforeDisplayNoArticleTextHook.
Definition at line 964 of file HookRunner.php.
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.
IContextSource | $context | |
string | &$redirect | string URL, modifiable |
Implements MediaWiki\Hook\BeforeHttpsRedirectHook.
Definition at line 971 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onBeforeInitialize | ( | $title, | |
$unused, | |||
$output, | |||
$user, | |||
$request, | |||
$mediaWiki ) |
This hook is called before anything is initialized in MediaWiki::performRequest().
Title | $title | Title being used for request |
null | $unused | Null |
OutputPage | $output | |
User | $user | |
WebRequest | $request | |
MediaWiki | $mediaWiki |
Implements MediaWiki\Hook\BeforeInitializeHook.
Definition at line 978 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onBeforePageDisplay | ( | $out, | |
$skin ) |
This hook is called prior to outputting a page.
OutputPage | $out | |
Skin | $skin |
Implements MediaWiki\Hook\BeforePageDisplayHook.
Definition at line 987 of file HookRunner.php.
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.
OutputPage | $out | |
string | &$redirect | URL, modifiable |
int | &$code | HTTP code (eg '301' or '302'), modifiable |
Implements MediaWiki\Hook\BeforePageRedirectHook.
Definition at line 995 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onBeforeParserFetchFileAndTitle | ( | $parser, | |
$nt, | |||
& | $options, | ||
& | $descQuery ) |
This hook is called before an image is rendered by Parser.
Parser | $parser | |
Title | $nt | Image title |
array | &$options | Array of options to RepoGroup::findFile. If it contains 'broken' as a key then the file will appear as a broken thumbnail. |
string | &$descQuery | Query string to add to thumbnail URL |
Implements MediaWiki\Hook\BeforeParserFetchFileAndTitleHook.
Definition at line 1002 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onBeforeParserFetchTemplateAndtitle | ( | $parser, | |
$title, | |||
& | $skip, | ||
& | $id ) |
This hook is called before a template is fetched by Parser.
Parser | $parser | |
Title | $title | Title of the template |
bool | &$skip | Skip this template and link it? |
int | &$id | ID of the revision being parsed |
Implements MediaWiki\Hook\BeforeParserFetchTemplateAndtitleHook.
Definition at line 1011 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onBeforeParserrenderImageGallery | ( | $parser, | |
$ig ) |
This hook is called before an image gallery is rendered by Parser.
Parser | $parser | |
ImageGalleryBase | $ig | ImageGallery object |
Implements MediaWiki\Hook\BeforeParserrenderImageGalleryHook.
Definition at line 1020 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onBeforeResetNotificationTimestamp | ( | & | $userObj, |
& | $titleObj, | ||
$force, | |||
& | $oldid ) |
This hook is called before the notification timestamp of a watched item is reset.
User | &$userObj | |
Title | &$titleObj | |
string | $force | If this is the string "force", then the reset will be done even if the page is not watched |
int | &$oldid | Revision ID |
Implements MediaWiki\Hook\BeforeResetNotificationTimestampHook.
Definition at line 1027 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onBeforeWelcomeCreation | ( | & | $welcome_creation_msg, |
& | $injected_html ) |
This hook is called before the welcomecreation message is displayed to a newly created user.
string | &$welcome_creation_msg | MediaWiki message name to display on the welcome screen to a newly created user account. |
string | &$injected_html | Any HTML to inject after the "logged in" message of a newly created user account |
Implements MediaWiki\Hook\BeforeWelcomeCreationHook.
Definition at line 1036 of file HookRunner.php.
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.
File | $image | |
array | &$params | Array of parameters |
bool | null | &$checkImageAreaHookResult | Set to true or false to override the $wgMaxImageArea check result |
Implements MediaWiki\Hook\BitmapHandlerCheckImageAreaHook.
Definition at line 1045 of file HookRunner.php.
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.
TransformationalImageHandler | $handler | |
File | $image | |
array | &$scalerParams | Array with scaler parameters |
null | MediaTransformOutput | &$mto |
Implements MediaWiki\Hook\BitmapHandlerTransformHook.
Definition at line 1054 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onBlockIp | ( | $block, | |
$user, | |||
& | $reason ) |
This hook is called before an IP address or user is blocked.
DatabaseBlock | $block | the Block object about to be saved |
User | $user | the user doing the block (not the one being blocked) |
array | &$reason | if the hook is aborted, the error message to be returned in an array |
Implements MediaWiki\Hook\BlockIpHook.
Definition at line 1063 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onBlockIpComplete | ( | $block, | |
$user, | |||
$priorBlock ) |
This hook is called after an IP address or user is blocked.
DatabaseBlock | $block | the block object that was saved |
User | $user | the user who did the block (not the one being blocked) |
?DatabaseBlock | $priorBlock | the block object for the prior block, if there was one |
Implements MediaWiki\Hook\BlockIpCompleteHook.
Definition at line 1070 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onBookInformation | ( | $isbn, | |
$output ) |
This hook is called before information output on Special:Booksources.
string | $isbn | ISBN to show information for |
OutputPage | $output | OutputPage object in use |
Implements MediaWiki\Hook\BookInformationHook.
Definition at line 1077 of file HookRunner.php.
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.
string | $ip | IP address in human-readable form |
bool | &$canDo | Set to false if the client may not be able to use HTTPS |
Implements MediaWiki\Hook\CanIPUseHTTPSHook.
Definition at line 1084 of file HookRunner.php.
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.
string[] | &$namespaces | Array of namespace numbers with corresponding canonical names |
Implements MediaWiki\Hook\CanonicalNamespacesHook.
Definition at line 1091 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onCategoryAfterPageAdded | ( | $category, | |
$wikiPage ) |
This hook is called after a page is added to a category.
Category | $category | Category that page was added to |
WikiPage | $wikiPage | WikiPage that was added |
Implements MediaWiki\Page\Hook\CategoryAfterPageAddedHook.
Definition at line 1098 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onCategoryAfterPageRemoved | ( | $category, | |
$wikiPage, | |||
$id ) |
This hook is called after a page is removed from a category.
Category | $category | Category that page was removed from |
WikiPage | $wikiPage | WikiPage that was removed |
int | $id | Page ID (original ID in case of page deletions) |
Implements MediaWiki\Page\Hook\CategoryAfterPageRemovedHook.
Definition at line 1105 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onCategoryPageView | ( | $catpage | ) |
This hook is called before viewing a categorypage in CategoryPage::view.
CategoryPage | $catpage |
Implements MediaWiki\Page\Hook\CategoryPageViewHook.
Definition at line 1112 of file HookRunner.php.
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.
string | $type | Category type, either 'page', 'file', or 'subcat' |
IResultWrapper | $res | Query result from Wikimedia\Rdbms\IDatabase::select() |
Implements MediaWiki\Hook\CategoryViewer__doCategoryQueryHook.
Definition at line 1119 of file HookRunner.php.
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.
string | $type | Category type, either 'page', 'img', or 'subcat' |
Title | $title | Categorized page |
string | $html | Requested HTML content of anchor |
string | &$link | Returned value. When set to a non-null value by a hook subscriber, this value will be used as the anchor instead of Linker::link. |
Implements MediaWiki\Hook\CategoryViewer__generateLinkHook.
Definition at line 1126 of file HookRunner.php.
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.
AuthenticationRequest | $req | AuthenticationRequest object describing the change (and target user) |
StatusValue | $status | StatusValue with the result of the action |
Implements MediaWiki\SpecialPage\Hook\ChangeAuthenticationDataAuditHook.
Definition at line 1133 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onChangesListInitRows | ( | $changesList, | |
$rows ) |
Use this hook to batch process change list rows prior to rendering.
ChangesList | $changesList | |
IResultWrapper | array | $rows | Data that will be rendered |
Implements MediaWiki\Hook\ChangesListInitRowsHook.
Definition at line 1140 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onChangesListInsertArticleLink | ( | $changesList, | |
& | $articlelink, | ||
& | $s, | ||
$rc, | |||
$unpatrolled, | |||
$watched ) |
Use this hook to override or augment link to article in RC list.
ChangesList | $changesList | |
string | &$articlelink | HTML of link to article (already filled-in) |
string | &$s | HTML of row that is being constructed |
RecentChange | $rc | |
bool | $unpatrolled | Whether or not we are showing unpatrolled changes |
bool | $watched | Whether or not the change is watched by the user |
Implements MediaWiki\Hook\ChangesListInsertArticleLinkHook.
Definition at line 1147 of file HookRunner.php.
References $s.
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.
string | $name | Name of the special page, e.g. 'Watchlist' |
array | &$tables | Array of tables to be queried |
array | &$fields | Array of columns to select |
array | &$conds | Array of WHERE conditionals for query |
array | &$query_options | Array of options for the database request |
array | &$join_conds | Join conditions for the tables |
FormOptions | $opts | FormOptions for this request |
Implements MediaWiki\SpecialPage\Hook\ChangesListSpecialPageQueryHook.
Definition at line 1156 of file HookRunner.php.
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.
ChangesListSpecialPage | $special |
Implements MediaWiki\SpecialPage\Hook\ChangesListSpecialPageStructuredFiltersHook.
Definition at line 1166 of file HookRunner.php.
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.
string | $tag | Name of the tag |
Status | &$status | Add warnings to this as required. There is no point setting errors, as the deletion has already been partly carried out by this point. |
Implements MediaWiki\ChangeTags\Hook\ChangeTagAfterDeleteHook.
Definition at line 1173 of file HookRunner.php.
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.
string | $tag | Name of the tag |
User | $user | User initiating the action |
Status | &$status | Add 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. |
Implements MediaWiki\ChangeTags\Hook\ChangeTagCanCreateHook.
Definition at line 1180 of file HookRunner.php.
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.
string | $tag | Name of the tag |
User | $user | User initiating the action |
Status | &$status | To allow deletion of the tag, set $status = Status::newGood() , and then return false from the hook function. |
Implements MediaWiki\ChangeTags\Hook\ChangeTagCanDeleteHook.
Definition at line 1187 of file HookRunner.php.
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.
string[] | $addedTags | Tags effectively added in the update |
string[] | $removedTags | Tags effectively removed in the update |
string[] | $prevTags | Tags that were present prior to the update |
int | $rc_id | Recentchanges table id |
int | $rev_id | Revision table id |
int | $log_id | Logging table id |
string | null | $params | Tag params |
RecentChange | null | $rc | RecentChange being tagged when the tagging accompanies the action, or null |
User | null | $user | User who performed the tagging when the tagging is subsequent to the action, or null |
Implements MediaWiki\ChangeTags\Hook\ChangeTagsAfterUpdateTagsHook.
Definition at line 1194 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onChangeTagsAllowedAdd | ( | & | $allowedTags, |
$addTags, | |||
$user ) |
This hook is called when checking if a user can add tags to a change.
string[] | &$allowedTags | List 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[] | $addTags | List of tags user intends to add |
User | $user | User who is adding the tags |
Implements MediaWiki\ChangeTags\Hook\ChangeTagsAllowedAddHook.
Definition at line 1204 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onChangeTagsListActive | ( | & | $tags | ) |
Use this hook to nominate which of the tags your extension uses are in active use.
string[] | &$tags | List of all active tags. Append to this array. |
Implements MediaWiki\ChangeTags\Hook\ChangeTagsListActiveHook.
Definition at line 1211 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onChangeUserGroups | ( | $performer, | |
$user, | |||
& | $add, | ||
& | $remove ) |
This hook is called before user groups are changed.
User | $performer | The User who will perform the change |
User | $user | The User whose groups will be changed |
array | &$add | The groups that will be added |
array | &$remove | The groups that will be removed |
Implements MediaWiki\Hook\ChangeUserGroupsHook.
Definition at line 1218 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onCollation__factory | ( | $collationName, | |
& | $collationObject ) |
This hook is called if $wgCategoryCollation is an unknown collation.
string | $collationName | Name of the collation in question |
Collation | null | &$collationObject | Null. Replace with a subclass of the Collation class that implements the collation given in $collationName. |
Implements MediaWiki\Hook\Collation__factoryHook.
Definition at line 1225 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onConfirmEmailComplete | ( | $user | ) |
This hook is called after a user's email has been confirmed successfully.
Implements MediaWiki\User\Hook\ConfirmEmailCompleteHook.
Definition at line 1232 of file HookRunner.php.
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).
Content | $content | Content to render |
Title | $title | Title of the page, as context |
ParserOutput | $parserOutput | ParserOutput to manipulate |
Implements MediaWiki\Content\Hook\ContentAlterParserOutputHook.
Definition at line 1239 of file HookRunner.php.
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.
Content | $content | Content to render |
Title | $title | Title of the page, as context |
int | $revId | Revision ID, as context |
ParserOptions | $options | ParserOptions 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 | $generateHtml | Whether 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 | &$output | ParserOutput to manipulate or replace |
Implements MediaWiki\Content\Hook\ContentGetParserOutputHook.
Definition at line 1246 of file HookRunner.php.
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.
Title | $title | Title in question |
string | &$model | Model name. Use with CONTENT_MODEL_XXX constants. |
Implements MediaWiki\Revision\Hook\ContentHandlerDefaultModelForHook.
Definition at line 1255 of file HookRunner.php.
References $title.
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.
string | $modeName | Requested content model name |
ContentHandler | &$handler | Set this to a ContentHandler object, if desired |
Implements MediaWiki\Content\Hook\ContentHandlerForModelIDHook.
Definition at line 1262 of file HookRunner.php.
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.
string | $contentModel | Content model ID |
Title | $title | |
bool | &$ok | Whether 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. |
Implements MediaWiki\Content\Hook\ContentModelCanBeUsedOnHook.
Definition at line 1269 of file HookRunner.php.
References $title.
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.
string[] | &$defaultSrc | Array of Content-Security-Policy allowed sources |
array | $policyConfig | Current configuration for the Content-Security-Policy header |
string | $mode | ContentSecurityPolicy::REPORT_ONLY_MODE or ContentSecurityPolicy::FULL_MODE depending on type of header |
Implements MediaWiki\Hook\ContentSecurityPolicyDefaultSourceHook.
Definition at line 1276 of file HookRunner.php.
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.
string[] | &$directives | Array of CSP directives |
array | $policyConfig | Current configuration for the CSP header |
string | $mode | ContentSecurityPolicy::REPORT_ONLY_MODE or ContentSecurityPolicy::FULL_MODE depending on type of header |
Implements MediaWiki\Hook\ContentSecurityPolicyDirectivesHook.
Definition at line 1285 of file HookRunner.php.
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.
string[] | &$scriptSrc | Array of CSP directives |
array | $policyConfig | Current configuration for the CSP header |
string | $mode | ContentSecurityPolicy::REPORT_ONLY_MODE or ContentSecurityPolicy::FULL_MODE depending on type of header |
Implements MediaWiki\Hook\ContentSecurityPolicyScriptSourceHook.
Definition at line 1294 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onContribsPager__getQueryInfo | ( | $pager, | |
& | $queryInfo ) |
This hook is called before the contributions query is about to run.
ContribsPager | $pager | Pager object for contributions |
array | &$queryInfo | The query for the contribs Pager |
Implements MediaWiki\Hook\ContribsPager__getQueryInfoHook.
Definition at line 1303 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onContribsPager__reallyDoQuery | ( | & | $data, |
$pager, | |||
$offset, | |||
$limit, | |||
$descending ) |
This hook is called before really executing the query for My Contributions.
array | &$data | an array of results of all contribs queries |
ContribsPager | $pager | The ContribsPager object hooked into |
string | $offset | Index offset, inclusive |
int | $limit | Exact query limit |
bool | $descending | Query direction, false for ascending, true for descending |
Implements MediaWiki\Hook\ContribsPager__reallyDoQueryHook.
Definition at line 1310 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onContributionsLineEnding | ( | $pager, | |
& | $ret, | ||
$row, | |||
& | $classes, | ||
& | $attribs ) |
This hook is called before a contributions HTML line is finished.
ContribsPager | $pager | The ContribsPager object hooked into |
string | &$ret | The HTML line |
stdClass | $row | The DB row for this line |
string[] | &$classes | The classes to add to the surrounding |
string[] | &$attribs | Associative array of other HTML attributes for the element. Currently only data attributes reserved to MediaWiki are allowed (see Sanitizer::isReservedDataAttribute). |
Implements MediaWiki\Hook\ContributionsLineEndingHook.
Definition at line 1319 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onContributionsToolLinks | ( | $id, | |
$title, | |||
& | $tools, | ||
$specialPage ) |
Use this hook to change the tool links above Special:Contributions.
int | $id | User identifier |
Title | $title | User page title |
string[] | &$tools | Array of tool links |
SpecialPage | $specialPage | SpecialPage instance for context and services. Can be either SpecialContributions or DeletedContributionsPage. Extensions should type hint against a generic SpecialPage though. |
Implements MediaWiki\Hook\ContributionsToolLinksHook.
Definition at line 1328 of file HookRunner.php.
References $title.
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.
Content | $content | Content object to be converted |
string | $toModel | ID of the content model to convert to |
bool | $lossy | Whether lossy conversion is allowed |
Content | bool | &$result | Output parameter, in case the handler function wants to provide a converted Content object. Note that $result->getContentModel() must return $toModel. |
Implements MediaWiki\Content\Hook\ConvertContentHook.
Definition at line 1335 of file HookRunner.php.
References $content.
MediaWiki\HookContainer\HookRunner::onCustomEditor | ( | $article, | |
$user ) |
This hook is called when invoking the page editor.
Implements MediaWiki\Hook\CustomEditorHook.
Definition at line 1342 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onDeletedContribsPager__reallyDoQuery | ( | & | $data, |
$pager, | |||
$offset, | |||
$limit, | |||
$descending ) |
This hook is called before really executing the query for Special:DeletedContributions.
array | &$data | an array of results of all contribs queries |
DeletedContribsPager | $pager | The DeletedContribsPager object hooked into |
string | $offset | Index offset, inclusive |
int | $limit | Exact query limit |
bool | $descending | Query direction, false for ascending, true for descending |
Implements MediaWiki\Hook\DeletedContribsPager__reallyDoQueryHook.
Definition at line 1349 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onDeletedContributionsLineEnding | ( | $page, | |
& | $ret, | ||
$row, | |||
& | $classes, | ||
& | $attribs ) |
This hook is called before a DeletedContributions HTML line is finished.
DeletedContribsPager | $page | Pager object for DeletedContribsPager |
string | &$ret | The HTML line |
stdClass | $row | The DB row for this line |
string[] | &$classes | The classes to add to the surrounding |
string[] | &$attribs | Associative array of other HTML attributes for the element. Currently only data attributes reserved to MediaWiki are allowed (see Sanitizer::isReservedDataAttribute). |
Implements MediaWiki\Hook\DeletedContributionsLineEndingHook.
Definition at line 1358 of file HookRunner.php.
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.
array | &$where | Array that will be passed as the $cond parameter to IDatabase::select() to determine what will be deleted from the user_properties table |
IDatabase | $db | IDatabase object, useful for accessing $db->buildLike() etc. |
Implements MediaWiki\Hook\DeleteUnknownPreferencesHook.
Definition at line 1367 of file HookRunner.php.
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.
DifferenceEngine | $differenceEngine |
Implements MediaWiki\Diff\Hook\DifferenceEngineAfterLoadNewTextHook.
Definition at line 1374 of file HookRunner.php.
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.
DifferenceEngine | $differenceEngine |
Implements MediaWiki\Diff\Hook\DifferenceEngineLoadTextAfterNewContentIsLoadedHook.
Definition at line 1381 of file HookRunner.php.
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".
DifferenceEngine | $differenceEngine | |
string | &$markAsPatrolledLink | "Mark as patrolled" link HTML |
int | $rcid | Recent change ID (rc_id) for this change |
Implements MediaWiki\Diff\Hook\DifferenceEngineMarkPatrolledLinkHook.
Definition at line 1390 of file HookRunner.php.
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.
int | &$rcid | rc_id of the change or 0 |
DifferenceEngine | $differenceEngine | |
RecentChange | $change | |
User | $user | Current user |
Implements MediaWiki\Diff\Hook\DifferenceEngineMarkPatrolledRCIDHook.
Definition at line 1399 of file HookRunner.php.
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.
DifferenceEngine | $differenceEngine | |
string | &$newHeader | String containing the various #mw-diff-otitle[1-5] divs, which include things like revision author info, revision comment, RevisionDelete link and more |
array | $formattedRevisionTools | Array containing revision tools, some of which may have been injected with the DiffRevisionTools hook |
string | $nextlink | String containing the link to the next revision (if any); also included in $newHeader |
string | $rollback | Rollback link to roll this revision back to the previous one, if any |
string | $newminor | String indicating if the new revision was marked as a minor edit |
bool | $diffOnly | Boolean 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 | $rdel | RevisionDelete link for the new revision, if the current user is allowed to use the RevisionDelete feature |
bool | $unhide | Boolean parameter indicating whether to show RevisionDeleted revisions |
Implements MediaWiki\Diff\Hook\DifferenceEngineNewHeaderHook.
Definition at line 1408 of file HookRunner.php.
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.
DifferenceEngine | $differenceEngine | |
string | &$oldHeader | String containing the various #mw-diff-otitle[1-5] divs, which include things like revision author info, revision comment, RevisionDelete link and more |
string | $prevlink | String containing the link to the previous revision (if any); also included in $oldHeader |
string | $oldminor | String indicating if the old revision was marked as a minor edit |
bool | $diffOnly | Boolean 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 | $ldel | RevisionDelete link for the old revision, if the current user is allowed to use the RevisionDelete feature |
bool | $unhide | Boolean parameter indicating whether to show RevisionDeleted revisions |
Implements MediaWiki\Diff\Hook\DifferenceEngineOldHeaderHook.
Definition at line 1419 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onDifferenceEngineOldHeaderNoOldRev | ( | & | $oldHeader | ) |
Use this hook to change the $oldHeader variable in cases when there is no old revision.
string | &$oldHeader | Empty string by default |
Implements MediaWiki\Diff\Hook\DifferenceEngineOldHeaderNoOldRevHook.
Definition at line 1429 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onDifferenceEngineRenderRevisionAddParserOutput | ( | $differenceEngine, | |
$out, | |||
$parserOutput, | |||
$wikiPage ) |
Use this hook to change the parser output.
DifferenceEngine | $differenceEngine | |
OutputPage | $out | |
ParserOutput | $parserOutput | |
WikiPage | $wikiPage |
Implements MediaWiki\Diff\Hook\DifferenceEngineRenderRevisionAddParserOutputHook.
Definition at line 1436 of file HookRunner.php.
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.
Implements MediaWiki\Diff\Hook\DifferenceEngineRenderRevisionShowFinalPatrolLinkHook.
Definition at line 1445 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onDifferenceEngineShowDiff | ( | $differenceEngine | ) |
Use this hook to affect the diff text which eventually gets sent to the OutputPage object.
DifferenceEngine | $differenceEngine |
Implements MediaWiki\Diff\Hook\DifferenceEngineShowDiffHook.
Definition at line 1452 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onDifferenceEngineShowDiffPage | ( | $out | ) |
Use this hook to add additional output via the available OutputPage object into the diff view.
OutputPage | $out |
Implements MediaWiki\Diff\Hook\DifferenceEngineShowDiffPageHook.
Definition at line 1459 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onDifferenceEngineShowDiffPageMaybeShowMissingRevision | ( | $differenceEngine | ) |
This hook is called in DifferenceEngine::showDiffPage() when revision data cannot be loaded.
DifferenceEngine | $differenceEngine |
Implements MediaWiki\Diff\Hook\DifferenceEngineShowDiffPageMaybeShowMissingRevisionHook.
Definition at line 1466 of file HookRunner.php.
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.
DifferenceEngine | $differenceEngine |
Implements MediaWiki\Diff\Hook\DifferenceEngineShowEmptyOldContentHook.
Definition at line 1475 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onDifferenceEngineViewHeader | ( | $differenceEngine | ) |
This hook is called before diff display.
DifferenceEngine | $differenceEngine |
Implements MediaWiki\Diff\Hook\DifferenceEngineViewHeaderHook.
Definition at line 1482 of file HookRunner.php.
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.
Revision | $newRev | New revision |
string[] | &$links | Array of HTML links |
Revision | null | $oldRev | Old revision (may be null) |
User | $user | Current user |
Implements MediaWiki\Diff\Hook\DiffRevisionToolsHook.
Definition at line 1489 of file HookRunner.php.
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.
RevisionRecord | $newRevRecord | New revision |
string[] | &$links | Array of HTML links |
RevisionRecord | null | $oldRevRecord | Old revision (may be null) |
UserIdentity | $userIdentity | Current user |
Implements MediaWiki\Diff\Hook\DiffToolsHook.
Definition at line 1496 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onDiffViewHeader | ( | $diff, | |
$oldRev, | |||
$newRev ) |
This hook is called before diff display.
DifferenceEngine | $diff | |
Revision | null | $oldRev | Old revision (may be null/invalid) |
Revision | $newRev | New revision |
Implements MediaWiki\Diff\Hook\DiffViewHeaderHook.
Definition at line 1503 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onDisplayOldSubtitle | ( | $article, | |
& | $oldid ) |
This hook is called before creating subtitle when browsing old versions of an article.
Implements MediaWiki\Page\Hook\DisplayOldSubtitleHook.
Definition at line 1510 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onEditFilter | ( | $editor, | |
$text, | |||
$section, | |||
& | $error, | ||
$summary ) |
Use this hook to perform checks on an edit.
EditPage | $editor | Edit form (see includes/EditPage.php) |
string | $text | Contents of the edit box |
string | $section | Section being edited |
string | &$error | Error message to return |
string | $summary | Edit summary for page |
Implements MediaWiki\Hook\EditFilterHook.
Definition at line 1517 of file HookRunner.php.
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.
IContextSource | $context | |
Content | $content | Content of the edit box |
Status | $status | Status object to represent errors, etc. |
string | $summary | Edit summary for page |
User | $user | User whois performing the edit |
bool | $minoredit | Whether the edit was marked as minor by the user. |
Implements MediaWiki\Hook\EditFilterMergedContentHook.
Definition at line 1524 of file HookRunner.php.
References $content.
MediaWiki\HookContainer\HookRunner::onEditFormInitialText | ( | $editPage | ) |
Use this hook to modify the edit form when editing existing pages.
EditPage | $editPage |
Implements MediaWiki\Hook\EditFormInitialTextHook.
Definition at line 1533 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onEditFormPreloadText | ( | & | $text, |
$title ) |
Use this hook to populate the edit form when creating pages.
Implements MediaWiki\Hook\EditFormPreloadTextHook.
Definition at line 1540 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onEditPage__attemptSave | ( | $editpage_Obj | ) |
This hook is called before an article is saved, before WikiPage::doEditContent() is called.
Implements MediaWiki\Hook\EditPage__attemptSaveHook.
Definition at line 1610 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onEditPage__attemptSave_after | ( | $editpage_Obj, | |
$status, | |||
$resultDetails ) |
This hook is called after an article save attempt.
EditPage | $editpage_Obj | Current EditPage object |
Status | $status | Resulting Status object |
array | $resultDetails | Result details array |
Implements MediaWiki\Hook\EditPage__attemptSave_afterHook.
Definition at line 1617 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onEditPage__importFormData | ( | $editpage, | |
$request ) |
Use this hook to read additional data posted in the form.
EditPage | $editpage | |
WebRequest | $request |
Implements MediaWiki\Hook\EditPage__importFormDataHook.
Definition at line 1626 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onEditPage__showEditForm_fields | ( | $editor, | |
$out ) |
Use this hook to inject form field into edit form.
EditPage | $editor | EditPage instance for reference |
OutputPage | $out | OutputPage instance to write to |
Implements MediaWiki\Hook\EditPage__showEditForm_fieldsHook.
Definition at line 1633 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onEditPage__showEditForm_initial | ( | $editor, | |
$out ) |
This hook is called before showing the edit form.
EditPage | $editor | |
OutputPage | $out | OutputPage instance to write to |
Implements MediaWiki\Hook\EditPage__showEditForm_initialHook.
Definition at line 1640 of file HookRunner.php.
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.
EditPage | $editor | |
OutputPage | $out | OutputPage instance to write to |
Implements MediaWiki\Hook\EditPage__showReadOnlyForm_initialHook.
Definition at line 1647 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onEditPage__showStandardInputs_options | ( | $editor, | |
$out, | |||
& | $tabindex ) |
Use this hook to inject form fields into the editOptions area.
EditPage | $editor | |
OutputPage | $out | OutputPage instance to write to |
int | &$tabindex | HTML tabindex of the last edit check/button |
Implements MediaWiki\Hook\EditPage__showStandardInputs_optionsHook.
Definition at line 1654 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onEditPageBeforeConflictDiff | ( | $editor, | |
$out ) |
Use this hook to modify the EditPage object and output when there's an edit conflict.
EditPage | $editor | |
OutputPage | $out |
Implements MediaWiki\Hook\EditPageBeforeConflictDiffHook.
Definition at line 1547 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onEditPageBeforeEditButtons | ( | $editpage, | |
& | $buttons, | ||
& | $tabindex ) |
Use this hook to modify the edit buttons below the textarea in the edit form.
EditPage | $editpage | Current EditPage object |
array | &$buttons | Array of edit buttons, "Save", "Preview", "Live", and "Diff" |
string | &$tabindex | HTML tabindex of the last edit check/button |
Implements MediaWiki\Hook\EditPageBeforeEditButtonsHook.
Definition at line 1554 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onEditPageBeforeEditToolbar | ( | & | $toolbar | ) |
Use this hook to add an edit toolbar above the textarea in the edit form.
string | &$toolbar | Toolbar HTML, initially an empty <div id="toolbar"></div> |
Implements MediaWiki\Hook\EditPageBeforeEditToolbarHook.
Definition at line 1561 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onEditPageCopyrightWarning | ( | $title, | |
& | $msg ) |
Use this hook for site and per-namespace customization of contribution/copyright notice.
Title | $title | Title of page being edited |
array | &$msg | An array of arguments to wfMessage(), overridable. The default is an array containing either 'copyrightwarning' or 'copyrightwarning2' as the first element (the message key). |
Implements MediaWiki\Hook\EditPageCopyrightWarningHook.
Definition at line 1568 of file HookRunner.php.
References $title.
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.
EditPage | $editpage | Current EditPage object |
array | &$checkboxes | Array of checkbox definitions. See EditPage::getCheckboxesDefinition() for the format. |
Implements MediaWiki\Hook\EditPageGetCheckboxesDefinitionHook.
Definition at line 1575 of file HookRunner.php.
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.
Implements MediaWiki\Hook\EditPageGetDiffContentHook.
Definition at line 1582 of file HookRunner.php.
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.
EditPage | $editPage | |
Content | &$content | Content object to be previewed (may be replaced by hook function) |
Implements MediaWiki\Hook\EditPageGetPreviewContentHook.
Definition at line 1589 of file HookRunner.php.
References $content.
MediaWiki\HookContainer\HookRunner::onEditPageNoSuchSection | ( | $editpage, | |
& | $res ) |
This hook is called when a section edit request is given for an non-existent section.
Implements MediaWiki\Hook\EditPageNoSuchSectionHook.
Definition at line 1596 of file HookRunner.php.
References $res.
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.
Title | $title | Title of page being edited |
string | &$msg | Localization message name, overridable. Defaults to 'editpage-tos-summary' |
Implements MediaWiki\Hook\EditPageTosSummaryHook.
Definition at line 1603 of file HookRunner.php.
References $title.
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.
Implements MediaWiki\User\Hook\EmailConfirmedHook.
Definition at line 1663 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onEmailUser | ( | & | $to, |
& | $from, | ||
& | $subject, | ||
& | $text, | ||
& | $error ) |
This hook is called before sending email from one user to another.
MailAddress | &$to | MailAddress object of receiving user |
MailAddress | &$from | MailAddress object of sending user |
MailAddress | &$subject | subject of the mail |
string | &$text | text of the mail |
bool | Status | MessageSpecifier | array | &$error | Out-param for an error. Should be set to a Status object or boolean false. |
Implements MediaWiki\Hook\EmailUserHook.
Definition at line 1670 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onEmailUserCC | ( | & | $to, |
& | $from, | ||
& | $subject, | ||
& | $text ) |
This hook is called before sending the copy of the email to the author.
MailAddress | &$to | MailAddress object of receiving user |
MailAddress | &$from | MailAddress object of sending user |
string | &$subject | Subject of the mail |
string | &$text | Text of the mail |
Implements MediaWiki\Hook\EmailUserCCHook.
Definition at line 1677 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onEmailUserComplete | ( | $to, | |
$from, | |||
$subject, | |||
$text ) |
This hook is called after sending email from one user to another.
MailAddress | $to | MailAddress object of receiving user |
MailAddress | $from | MailAddress object of sending user |
string | $subject | subject of the mail |
string | $text | text of the mail |
Implements MediaWiki\Hook\EmailUserCompleteHook.
Definition at line 1684 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onEmailUserForm | ( | & | $form | ) |
This hook is called after building the email user form object.
Implements MediaWiki\Hook\EmailUserFormHook.
Definition at line 1691 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onEmailUserPermissionsErrors | ( | $user, | |
$editToken, | |||
& | $hookErr ) |
Use this hook to retrieve permissions errors for emailing a user.
User | $user | The user who is trying to email another user. |
string | $editToken | The user's edit token. |
bool | string | array | &$hookErr | Out-param for the error. Passed as the parameters to OutputPage::showErrorPage. |
Implements MediaWiki\Hook\EmailUserPermissionsErrorsHook.
Definition at line 1698 of file HookRunner.php.
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.
EnhancedChangesList | $changesList | |
string[] | &$links | Links generated by EnhancedChangesList |
RecentChange[] | $block | RecentChange objects in that block |
Implements MediaWiki\Hook\EnhancedChangesList__getLogTextHook.
Definition at line 1723 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onEnhancedChangesListModifyBlockLineData | ( | $changesList, | |
& | $data, | ||
$rc ) |
Use this hook to alter data used to build a non-grouped recent change line in EnhancedChangesList.
EnhancedChangesList | $changesList | |
array | &$data | Array of components that will be joined in order to create the line |
RecentChange | $rc | RecentChange object for this line |
Implements MediaWiki\Hook\EnhancedChangesListModifyBlockLineDataHook.
Definition at line 1705 of file HookRunner.php.
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.
EnhancedChangesList | $changesList | |
array | &$data | Array of components that will be joined in order to create the line |
RecentChange[] | $block | Array of RecentChange objects in that block |
RecentChange | $rc | RecentChange object for this line |
string[] | &$classes | Array of classes to change |
string[] | &$attribs | Associative array of other HTML attributes for the <tr> element. Currently only data attributes reserved to MediaWiki are allowed (see Sanitizer::isReservedDataAttribute). |
Implements MediaWiki\Hook\EnhancedChangesListModifyLineDataHook.
Definition at line 1714 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onExemptFromAccountCreationThrottle | ( | $ip | ) |
Use this hook to add an exemption from the account creation throttle.
string | $ip | IP address of the user |
Implements MediaWiki\Auth\Hook\ExemptFromAccountCreationThrottleHook.
Definition at line 1732 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onExtensionTypes | ( | & | $extTypes | ) |
This hook is called when generating the extensions credits.
Use this to change the tables headers.
string[] | &$extTypes | Associative 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. |
Implements MediaWiki\Hook\ExtensionTypesHook.
Definition at line 1739 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onFetchChangesList | ( | $user, | |
$skin, | |||
& | $list, | ||
$groups ) |
This hook is called when fetching the ChangesList derivative for a particular user.
User | $user | User the list is being fetched for |
Skin | $skin | Skin object to be used with the list |
ChangesList | null | &$list | Defaults to NULL. Change it to an object instance and return false to override the list derivative used. |
ChangesListFilterGroup[] | $groups | Added in 1.34 |
Implements MediaWiki\Hook\FetchChangesListHook.
Definition at line 1746 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onFileDeleteComplete | ( | $file, | |
$oldimage, | |||
$article, | |||
$user, | |||
$reason ) |
This hook is called when a file is deleted.
LocalFile | $file | Reference to the deleted file |
string | $oldimage | In case of the deletion of an old image, the name of the old file |
WikiFilePage | $article | In case all revisions of the file are deleted, a reference to the WikiFilePage associated with the file |
User | $user | User who performed the deletion |
string | $reason | Reason |
Implements MediaWiki\Hook\FileDeleteCompleteHook.
Definition at line 1753 of file HookRunner.php.
References $file.
MediaWiki\HookContainer\HookRunner::onFileTransformed | ( | $file, | |
$thumb, | |||
$tmpThumbPath, | |||
$thumbPath ) |
This hook is called when a file is transformed and moved into storage.
File | $file | Reference to the File object |
MediaTransformOutput | $thumb | |
string | $tmpThumbPath | Temporary file system path of the transformed file |
string | $thumbPath | Permanent storage path of the transformed file |
Implements MediaWiki\Hook\FileTransformedHook.
Definition at line 1762 of file HookRunner.php.
References $file.
MediaWiki\HookContainer\HookRunner::onFileUndeleteComplete | ( | $title, | |
$fileVersions, | |||
$user, | |||
$reason ) |
This hook is called when a file is undeleted.
Title | $title | Title object for the file |
int[] | $fileVersions | Array of undeleted filearchive IDs. Empty if all versions were restored. |
User | $user | User who performed the undeletion |
string | $reason |
Implements MediaWiki\Hook\FileUndeleteCompleteHook.
Definition at line 1769 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onFileUpload | ( | $file, | |
$reupload, | |||
$hasDescription ) |
This hook is called when a file upload occurs.
File | $file | Image object representing the file that was uploaded |
bool | $reupload | Boolean indicating if there was a previously another image there or not (since 1.17) |
bool | $hasDescription | Boolean indicating that there was already a description page and a new one from the comment wasn't created (since 1.17) |
Implements MediaWiki\Hook\FileUploadHook.
Definition at line 1776 of file HookRunner.php.
References $file.
MediaWiki\HookContainer\HookRunner::onFormatAutocomments | ( | & | $comment, |
$pre, | |||
$auto, | |||
$post, | |||
$title, | |||
$local, | |||
$wikiId ) |
This hook is called when an autocomment is formatted by the Linker.
string | null | &$comment | Reference to the accumulated comment. Initially null, when set the default code will be skipped. |
bool | $pre | True if there is text before this autocomment |
string | $auto | Extracted part of the parsed comment before the call to the hook |
bool | $post | True if there is text after this autocomment |
Title | null | $title | Optional title object used to links to sections |
bool | $local | Whether section links should refer to local page |
string | null | $wikiId | ID (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. |
Implements MediaWiki\Hook\FormatAutocommentsHook.
Definition at line 1783 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onGalleryGetModes | ( | & | $modeArray | ) |
Use this hook to get a list of classes that can render different modes of a gallery.
array | &$modeArray | Associative array mapping mode names to classes that implement that mode. It is expected that all registered classes are a subclass of ImageGalleryBase. |
Implements MediaWiki\Hook\GalleryGetModesHook.
Definition at line 1792 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onGetAutoPromoteGroups | ( | $user, | |
& | $promote ) |
This hook is called when determining which autopromote groups a user is entitled to be in.
Implements MediaWiki\User\Hook\GetAutoPromoteGroupsHook.
Definition at line 1799 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onGetCacheVaryCookies | ( | $out, | |
& | $cookies ) |
Use this hook to get cookies that should vary cache options.
OutputPage | $out | |
string[] | &$cookies | Array of cookie names. Add a value to it if you want to add a cookie that has to vary cache options. |
Implements MediaWiki\Hook\GetCacheVaryCookiesHook.
Definition at line 1806 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onGetCanonicalURL | ( | $title, | |
& | $url, | ||
$query ) |
Use this hook to modify fully-qualified URLs used for IRC and email notifications.
Title | $title | Title object of page |
string | &$url | String value as output (out parameter, can modify) |
string | $query | Query options as string passed to Title::getCanonicalURL() |
Implements MediaWiki\Hook\GetCanonicalURLHook.
Definition at line 1813 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onGetContentModels | ( | & | $models | ) |
Use this hook to add content models to the list of available models.
string[] | &$models | Array containing current model list as strings. Extensions should add to this list. |
Implements MediaWiki\Content\Hook\GetContentModelsHook.
Definition at line 1820 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onGetDefaultSortkey | ( | $title, | |
& | $sortkey ) |
Use this hook to override the default sortkey for a page.
Implements MediaWiki\Hook\GetDefaultSortkeyHook.
Definition at line 1827 of file HookRunner.php.
References $title.
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.
IContextSource | $context | IContextSource context to be used for diff |
int | $old | Revision ID to show and diff with |
int | string | $new | Either a revision ID or one of the strings 'cur', 'prev' or 'next' |
bool | $refreshCache | If set, refreshes the diff cache |
bool | $unhide | If set, allow viewing deleted revs |
DifferenceEngine | &$differenceEngine | Difference engine object to be used for the diff |
Implements MediaWiki\Content\Hook\GetDifferenceEngineHook.
Definition at line 1834 of file HookRunner.php.
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.
string[] | &$doubleUnderscoreIDs | Array of magic word identifiers |
Implements MediaWiki\Hook\GetDoubleUnderscoreIDsHook.
Definition at line 1844 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onGetExtendedMetadata | ( | & | $combinedMeta, |
$file, | |||
$context, | |||
$single, | |||
& | $maxCacheTime ) |
Use this hook to get extended file metadata for the API.
array | &$combinedMeta | Array of the form: 'MetadataPropName' => [ value' => prop value, 'source' => 'name of hook' ] |
File | $file | File in question |
IContextSource | $context | RequestContext (including language to use) |
bool | $single | Only 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 | &$maxCacheTime | How long the results can be cached |
Implements MediaWiki\Hook\GetExtendedMetadataHook.
Definition at line 1851 of file HookRunner.php.
References $file.
MediaWiki\HookContainer\HookRunner::onGetFullURL | ( | $title, | |
& | $url, | ||
$query ) |
Use this hook to modify fully-qualified URLs used in redirects/export/offsite data.
Title | $title | Title object of page |
string | &$url | String value as output (out parameter, can modify) |
string | $query | Query options as string passed to Title::getFullURL() |
Implements MediaWiki\Hook\GetFullURLHook.
Definition at line 1860 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onGetHumanTimestamp | ( | & | $output, |
$timestamp, | |||
$relativeTo, | |||
$user, | |||
$lang ) |
Use this hook to preemptively override the human-readable timestamp generated by MWTimestamp::getHumanTimestamp().
string | &$output | Output timestamp |
MWTimestamp | $timestamp | Current (user-adjusted) timestamp |
MWTimestamp | $relativeTo | Relative (user-adjusted) timestamp |
User | $user | User whose preferences are being used to make timestamp |
Language | $lang | Language that will be used to render the timestamp |
Implements MediaWiki\Hook\GetHumanTimestampHook.
Definition at line 1867 of file HookRunner.php.
References $lang.
MediaWiki\HookContainer\HookRunner::onGetInternalURL | ( | $title, | |
& | $url, | ||
$query ) |
Use this hook to modify fully-qualified URLs used for squid cache purging.
Title | $title | Title object of page |
string | &$url | String value as output (out parameter, can modify) |
string | $query | Query options as string passed to Title::getInternalURL() |
Implements MediaWiki\Hook\GetInternalURLHook.
Definition at line 1876 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onGetIP | ( | & | $ip | ) |
Use this hook to modify the IP of the current user (called only once).
string | &$ip | IP as determined so far |
Implements MediaWiki\Hook\GetIPHook.
Definition at line 1883 of file HookRunner.php.
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.
string | null | &$req | Language variant from the URL or null if no variant was specified in the URL; the value of this variable comes from LanguageConverter::getURLVariant() |
Implements MediaWiki\Hook\GetLangPreferredVariantHook.
Definition at line 1890 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onGetLinkColours | ( | $linkcolour_ids, | |
& | $colours, | ||
$title ) |
Use this hook to modify the CSS class of an array of page links.
string[] | $linkcolour_ids | Array 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 | $title | Title of the page being parsed, on which the links will be shown |
Implements MediaWiki\Hook\GetLinkColoursHook.
Definition at line 1897 of file HookRunner.php.
References $title.
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.
Title | $title | Title object of page |
string | &$url | String value as output (out parameter, can modify) |
string | $query | Query options as string passed to Title::getLocalURL() |
Implements MediaWiki\Hook\GetLocalURLHook.
Definition at line 1904 of file HookRunner.php.
References $title.
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.
Title | $title | Title object of page |
string | &$url | String value as output (out parameter, can modify) |
Implements MediaWiki\Hook\GetLocalURL__ArticleHook.
Definition at line 1911 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onGetLocalURL__Internal | ( | $title, | |
& | $url, | ||
$query ) |
Use this hook to modify local URLs to internal pages.
Title | $title | Title object of page |
string | &$url | String value as output (out parameter, can modify) |
string | $query | Query options as string passed to Title::getLocalURL() |
Implements MediaWiki\Hook\GetLocalURL__InternalHook.
Definition at line 1918 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onGetLogTypesOnUser | ( | & | $types | ) |
Use this hook to add log types where the target is a user page.
string[] | &$types | Array of log types |
Implements MediaWiki\Hook\GetLogTypesOnUserHook.
Definition at line 1925 of file HookRunner.php.
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.
string[] | &$variableIDs | array of magic word identifiers |
Implements MediaWiki\Hook\GetMagicVariableIDsHook.
Definition at line 1932 of file HookRunner.php.
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.
string[] | &$version | Array of version strings |
Implements MediaWiki\Hook\GetMetadataVersionHook.
Definition at line 1939 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onGetNewMessagesAlert | ( | & | $newMessagesAlert, |
$newtalks, | |||
$user, | |||
$out ) |
Use this hook to disable or modify the new messages alert.
string | &$newMessagesAlert | Empty string by default. If the user has new talk page messages, this should be populated with an alert message to that effect. |
array | $newtalks | Empty array if the user has no new messages, or an array containing links and revisions if there are new messages. (See User::getNewMessageLinks.) |
User | $user | User who is loading the page |
OutputPage | $out | To check what type of page the user is on |
Implements MediaWiki\Hook\GetNewMessagesAlertHook.
Definition at line 1946 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onGetPreferences | ( | $user, | |
& | $preferences ) |
Use this hook to modify user preferences.
User | $user | User whose preferences are being modified |
array | &$preferences | Preferences description array, to be fed to an HTMLForm object |
Implements MediaWiki\Preferences\Hook\GetPreferencesHook.
Definition at line 1955 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onGetRelativeTimestamp | ( | & | $output, |
& | $diff, | ||
$timestamp, | |||
$relativeTo, | |||
$user, | |||
$lang ) |
Use this hook to pre-emptively override the relative timestamp generated by MWTimestamp::getRelativeTimestamp().
string | &$output | String for the output timestamp |
DateInterval | &$diff | Difference between the timestamps |
MWTimestamp | $timestamp | Current (user-adjusted) timestamp |
MWTimestamp | $relativeTo | Relative (user-adjusted) timestamp |
User | $user | User whose preferences are being used to make timestamp |
Language | $lang | Language that will be used to render the timestamp |
Implements MediaWiki\Hook\GetRelativeTimestampHook.
Definition at line 1962 of file HookRunner.php.
References $lang.
MediaWiki\HookContainer\HookRunner::onGetSlotDiffRenderer | ( | $contentHandler, | |
& | $slotDiffRenderer, | ||
$context ) |
Use this hook to replace or wrap the standard SlotDiffRenderer for some content type.
ContentHandler | $contentHandler | ContentHandler for which the slot diff renderer is fetched |
SlotDiffRenderer | &$slotDiffRenderer | SlotDiffRenderer to change or replace |
IContextSource | $context |
Implements MediaWiki\Content\Hook\GetSlotDiffRendererHook.
Definition at line 1971 of file HookRunner.php.
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().
User | $user | User targeted by the block |
string | null | $ip | IP of the current request if $user is the current user and they're not exempted from IP blocks. Null otherwise. |
AbstractBlock | null | &$block | User's block, or null if none was found |
Implements MediaWiki\Block\Hook\GetUserBlockHook.
Definition at line 1980 of file HookRunner.php.
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).
Title | $title | Title being checked against |
User | $user | Current user |
string | $action | Action being checked |
string | &$result | User 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. |
Implements MediaWiki\Permissions\Hook\GetUserPermissionsErrorsHook.
Definition at line 1987 of file HookRunner.php.
References $title.
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).
Title | $title | Title being checked against |
User | $user | Current user |
string | $action | Action being checked |
string | &$result | User 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. |
Implements MediaWiki\Permissions\Hook\GetUserPermissionsErrorsExpensiveHook.
Definition at line 1994 of file HookRunner.php.
References $title.
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.
string[] | &$extTypes | Associative array of repo URLS to viewer URLs |
Implements MediaWiki\Hook\GitViewersHook.
Definition at line 2003 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onHistoryPageToolLinks | ( | $context, | |
$linkRenderer, | |||
& | $links ) |
Use this hook to add one or more links to revision history page subtitle.
IContextSource | $context | |
LinkRenderer | $linkRenderer | |
string[] | &$links | Array of HTML strings |
Implements MediaWiki\Hook\HistoryPageToolLinksHook.
Definition at line 2010 of file HookRunner.php.
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.
Revision | $rev | |
string[] | &$links | Array of HTML links |
Revision | null | $prevRev | Revision object, next in line in page history, or null |
User | $user | Current user object |
Implements MediaWiki\Hook\HistoryRevisionToolsHook.
Definition at line 2017 of file HookRunner.php.
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.
RevisionRecord | $revRecord | |
string[] | &$links | Array of HTML links |
RevisionRecord | null | $prevRevRecord | RevisionRecord object, next in line in page history, or null |
UserIdentity | $userIdentity | Current user |
Implements MediaWiki\Hook\HistoryToolsHook.
Definition at line 2024 of file HookRunner.php.
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.
Title | $title | Title of the page being updated |
int | $mode | Mode |
array | &$append | Append URLs relating to the title |
Implements MediaWiki\Cache\Hook\HtmlCacheUpdaterAppendUrlsHook.
Definition at line 2031 of file HookRunner.php.
References $title.
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.
array | $urls | Canonical URLs |
array | &$append | Append alternative URLs for $urls |
Implements MediaWiki\Cache\Hook\HtmlCacheUpdaterVaryUrlsHook.
Definition at line 2038 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onHTMLFileCache__useFileCache | ( | $context | ) |
Use this hook to override whether a page should be cached in file cache.
IContextSource | $context | IContextSource object with information about the request being served |
Implements MediaWiki\Cache\Hook\HTMLFileCache__useFileCacheHook.
Definition at line 2045 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onHtmlPageLinkRendererBegin | ( | $linkRenderer, | |
$target, | |||
& | $text, | ||
& | $customAttribs, | ||
& | $query, | ||
& | $ret ) |
This hook is called when generating internal and interwiki links in LinkRenderer, before processing starts.
LinkRenderer | $linkRenderer | |
LinkTarget | $target | LinkTarget that the link is pointing to |
string | HtmlArmor | null | &$text | Contents that the <a> tag should have; either a plain, unescaped string or an HtmlArmor object; null means "default" |
string[] | &$customAttribs | HTML attributes that the <a> tag should have, in associative array form, with keys and values unescaped. Should be merged with default values, with a value of false meaning to suppress the attribute. |
string[] | &$query | Query string to add to the generated URL (the bit after the "?"), in associative array form, with keys and values unescaped. |
string | &$ret | Value to return if your hook returns false |
Implements MediaWiki\Linker\Hook\HtmlPageLinkRendererBeginHook.
Definition at line 2052 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
LinkRenderer | $linkRenderer | |
LinkTarget | $target | LinkTarget object that the link is pointing to |
bool | $isKnown | Whether the page is known or not |
string | HtmlArmor | &$text | Contents that the <a> tag should have; either a plain, unescaped string or an HtmlArmor object |
string[] | &$attribs | Final HTML attributes of the <a> tag, after processing, in associative array form |
string | &$ret | Value to return if your hook returns false |
<a>
element with HTML attributes $attribs and contents $html will be returned. If you return false, $ret will be returned. Implements MediaWiki\Linker\Hook\HtmlPageLinkRendererEndHook.
Definition at line 2061 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
You can skip the default logic entirely by returning false, or just modify a few things using call-by-reference.
DummyLinker | $linker | Formerly a Skin/Linker, now a DummyLinker for b/c |
Title | &$title | Title object of the image |
File | bool | &$file | File object, or false if it doesn't exist |
array | &$frameParams | Various parameters with special meanings; see documentation in includes/Linker.php for Linker::makeImageLink |
array | &$handlerParams | Various parameters with special meanings; see documentation in includes/Linker.php for Linker::makeImageLink |
string | bool | &$time | Timestamp of file in 'YYYYMMDDHHIISS' string form, or false for current |
string | &$res | Final HTML output, used if you return false |
Parser | $parser | |
string | &$query | Query params for desc URL |
string | &$widthOption | Used by the parser to remember the user preference thumbnailsize |
Implements MediaWiki\Hook\ImageBeforeProduceHTMLHook.
Definition at line 2070 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onImageOpenShowImageInlineBefore | ( | $imagePage, | |
$output ) |
This hook is called just before showing the image on an image page.
ImagePage | $imagePage | ImagePage object ($this) |
OutputPage | $output | $wgOut |
Implements MediaWiki\Page\Hook\ImageOpenShowImageInlineBeforeHook.
Definition at line 2080 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onImagePageAfterImageLinks | ( | $imagePage, | |
& | $html ) |
This hook is called after the image links section on an image page is built.
Implements MediaWiki\Page\Hook\ImagePageAfterImageLinksHook.
Definition at line 2087 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onImagePageFileHistoryLine | ( | $imageHistoryList, | |
$file, | |||
& | $line, | ||
& | $css ) |
This hook is called when a file history line is constructed.
ImageHistoryList | $imageHistoryList | Formerly an ImagePage but since 1.27 it is an ImageHistoryList. |
File | $file | |
string | &$line | HTML of the history line |
string | &$css | Line CSS class |
Implements MediaWiki\Page\Hook\ImagePageFileHistoryLineHook.
Definition at line 2094 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onImagePageFindFile | ( | $page, | |
& | $file, | ||
& | $displayFile ) |
This hook is called when fetching the file associated with an image page.
ImagePage | $page | |
File | false | &$file | False on input, can be replaced with a File |
File | false | &$displayFile | False on input, can be replaced with a file to display. |
Implements MediaWiki\Page\Hook\ImagePageFindFileHook.
Definition at line 2101 of file HookRunner.php.
References $file.
MediaWiki\HookContainer\HookRunner::onImagePageShowTOC | ( | $page, | |
& | $toc ) |
This hook is called when the file toc on an image page is generated.
ImagePage | $page | |
string[] | &$toc | Array of <li> strings |
Implements MediaWiki\Page\Hook\ImagePageShowTOCHook.
Definition at line 2108 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onImgAuthBeforeStream | ( | & | $title, |
& | $path, | ||
& | $name, | ||
& | $result ) |
This hook is called before a file is streamed to a user, but only when using img_auth.php.
Title | &$title | Title object of the file as it would appear for the upload page |
string | &$path | Original file and path name when img_auth was invoked by the web server |
string | &$name | Name only component of the file |
array | &$result | Location to pass back results of the hook routine (only used if failed)
|
Implements MediaWiki\Hook\ImgAuthBeforeStreamHook.
Definition at line 2115 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
LinkTarget | $title | |
string[] | &$headers | HTTP headers ( name => value, names are case insensitive ). Two headers get special handling: If-Modified-Since (value must be a valid HTTP date) and Range (must be of the form "bytes=(\\d*-\\d*)") will be honored when streaming the file. |
Implements MediaWiki\Hook\ImgAuthModifyHeadersHook.
Definition at line 2122 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onImportHandleContentXMLTag | ( | $reader, | |
$contentInfo ) |
Definition at line 2152 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onImportHandleLogItemXMLTag | ( | $reader, | |
$logInfo ) |
This hook is called when parsing an XML tag in a log item.
WikiImporter | $reader | |
array | $logInfo | Array of information |
Implements MediaWiki\Hook\ImportHandleLogItemXMLTagHook.
Definition at line 2129 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onImportHandlePageXMLTag | ( | $reader, | |
& | $pageInfo ) |
This hook is called when parsing an XML tag in a page.
WikiImporter | $reader | |
array | &$pageInfo | Array of information |
Implements MediaWiki\Hook\ImportHandlePageXMLTagHook.
Definition at line 2136 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onImportHandleRevisionXMLTag | ( | $reader, | |
$pageInfo, | |||
$revisionInfo ) |
This hook is called when parsing an XML tag in a page revision.
WikiImporter | $reader | |
array | $pageInfo | Array of page information |
array | $revisionInfo | Array of revision information |
Implements MediaWiki\Hook\ImportHandleRevisionXMLTagHook.
Definition at line 2143 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onImportHandleToplevelXMLTag | ( | $reader | ) |
This hook is called when parsing a top level XML tag.
WikiImporter | $reader |
Implements MediaWiki\Hook\ImportHandleToplevelXMLTagHook.
Definition at line 2158 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onImportHandleUnknownUser | ( | $name | ) |
When a user doesn't exist locally, use this hook to auto-create it.
string | $name | Username |
Implements MediaWiki\Hook\ImportHandleUnknownUserHook.
Definition at line 2165 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onImportHandleUploadXMLTag | ( | $reader, | |
$revisionInfo ) |
This hook is called when parsing an XML tag in a file upload.
WikiImporter | $reader | |
array | $revisionInfo | Array of information |
Implements MediaWiki\Hook\ImportHandleUploadXMLTagHook.
Definition at line 2172 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onImportLogInterwikiLink | ( | & | $fullInterwikiPrefix, |
& | $pageTitle ) |
Use this hook to change interwiki links in log entries and edit summaries for transwiki imports.
string | &$fullInterwikiPrefix | Interwiki prefix, may contain colons. |
string | &$pageTitle | String that contains page title. |
Implements MediaWiki\Hook\ImportLogInterwikiLinkHook.
Definition at line 2179 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onImportSources | ( | & | $importSources | ) |
This hook is called when reading from the $wgImportSources configuration variable.
This can be used to lazy-load the import sources list.
array | &$importSources | The value of $wgImportSources. Modify as necessary. See the comment in DefaultSettings.php for the detail of how to structure this array. |
Implements MediaWiki\Hook\ImportSourcesHook.
Definition at line 2186 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onInfoAction | ( | $context, | |
& | $pageInfo ) |
This hook is called when building information to display on the action=info page.
IContextSource | $context | |
array | &$pageInfo | Array of information |
Implements MediaWiki\Hook\InfoActionHook.
Definition at line 2193 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onInitializeArticleMaybeRedirect | ( | $title, | |
$request, | |||
& | $ignoreRedirect, | ||
& | $target, | ||
& | $article ) |
Use this hook to check whether a title is a redirect.
Title | $title | Title object for the current page |
WebRequest | $request | |
bool | &$ignoreRedirect | Boolean to skip redirect check |
Title | string | &$target | Title/string of redirect target |
Article | &$article |
Implements MediaWiki\Hook\InitializeArticleMaybeRedirectHook.
Definition at line 2200 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onInternalParseBeforeLinks | ( | $parser, | |
& | $text, | ||
$stripState ) |
This hook is called during Parser's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processing.
Parser | $parser | |
string | &$text | Partially parsed text |
StripState | $stripState | Parser's internal StripState object |
Implements MediaWiki\Hook\InternalParseBeforeLinksHook.
Definition at line 2209 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
Ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments.
Parser | $parser | |
string | &$text | Partially parsed text |
StripState | $stripState | Parser's internal StripState object |
Implements MediaWiki\Hook\InternalParseBeforeSanitizeHook.
Definition at line 2216 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onInterwikiLoadPrefix | ( | $prefix, | |
& | $iwData ) |
This hook is called when resolving whether a given prefix is an interwiki or not.
string | $prefix | Interwiki prefix we are looking for |
array | &$iwData | Output array describing the interwiki with keys iw_url, iw_local, iw_trans and optionally iw_api and iw_wikiid |
Implements MediaWiki\Interwiki\Hook\InterwikiLoadPrefixHook.
Definition at line 2223 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onInvalidateEmailComplete | ( | $user | ) |
This hook is called after a user's email has been invalidated successfully.
Implements MediaWiki\User\Hook\InvalidateEmailCompleteHook.
Definition at line 2230 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onIRCLineURL | ( | & | $url, |
& | $query, | ||
$rc ) |
This hook is called when constructing the URL to use in an IRC notification.
Callee may modify $url and $query; URL will be constructed as $url . $query
string | &$url | URL to index.php |
string | &$query | Query string |
RecentChange | $rc | RecentChange object that triggered URL generation |
Implements MediaWiki\Hook\IRCLineURLHook.
Definition at line 2237 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onIsFileCacheable | ( | $article | ) |
Use this hook to override the result of Article::isFileCacheable().
Implements MediaWiki\Page\Hook\IsFileCacheableHook.
Definition at line 2244 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onIsTrustedProxy | ( | $ip, | |
& | $result ) |
Use this hook to override the result of ProxyLookup::isTrustedProxy().
string | $ip | IP being checked |
bool | &$result | Change this value to override the result of ProxyLookup::isTrustedProxy() |
Implements MediaWiki\Hook\IsTrustedProxyHook.
Definition at line 2251 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onIsUploadAllowedFromUrl | ( | $url, | |
& | $allowed ) |
Use this hook to override the result of UploadFromUrl::isAllowedUrl().
string | $url | URL used to upload from |
bool | &$allowed | Whether uploading is allowed for given URL |
Implements MediaWiki\Hook\IsUploadAllowedFromUrlHook.
Definition at line 2258 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
string | $addr | Email address entered by the user |
bool | null | &$result | Set this and return false to override the internal checks |
Implements MediaWiki\Hook\IsValidEmailAddrHook.
Definition at line 2265 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onIsValidPassword | ( | $password, | |
& | $result, | ||
$user ) |
Use this hook to override the result of User::isValidPassword()
string | $password | The password entered by the user |
bool | string | MessageSpecifier | &$result | Set this and return false to override the internal checks |
User | $user | User the password is being validated for |
Implements MediaWiki\User\Hook\IsValidPasswordHook.
Definition at line 2272 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onLanguage__getMessagesFileName | ( | $code, | |
& | $file ) |
Use this hook to change the path of a localisation file.
string | $code | Language code or the language we're looking for a messages file for |
string | &$file | Messages file path. You can override this to change the location. |
Implements MediaWiki\Languages\Hook\Language__getMessagesFileNameHook.
Definition at line 2307 of file HookRunner.php.
References $file.
MediaWiki\HookContainer\HookRunner::onLanguageGetNamespaces | ( | & | $namespaces | ) |
Use this hook to provide custom ordering for namespaces or remove namespaces.
Do not use this hook to add namespaces. Use CanonicalNamespaces for that.
string[] | &$namespaces | Array of namespaces indexed by their numbers |
Implements MediaWiki\Hook\LanguageGetNamespacesHook.
Definition at line 2279 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onLanguageGetTranslatedLanguageNames | ( | & | $names, |
$code ) |
Use this hook to provide translated language names.
string[] | &$names | Array of language code => language name |
string | $code | Language of the preferred translations |
Implements MediaWiki\Languages\Hook\LanguageGetTranslatedLanguageNamesHook.
Definition at line 2286 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onLanguageLinks | ( | $title, | |
& | $links, | ||
& | $linkFlags ) |
Use this hook to manipulate a page's language links.
This hook is called in various places to allow extensions to define the effective language links for a page.
Title | $title | |
string[] | &$links | Array with elements of the form "language:title" in the order that they will be output |
array | &$linkFlags | Associative array mapping prefixed links to arrays of flags. Currently unused, but planned to provide support for marking individual language links in the UI, e.g. for featured articles. |
Implements MediaWiki\Hook\LanguageLinksHook.
Definition at line 2293 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onLanguageSelector | ( | $out, | |
$cssClassName ) |
Use this hook to change the language selector available on a page.
OutputPage | $out | The output page. |
string | $cssClassName | CSS class name of the language selector. |
Implements MediaWiki\Hook\LanguageSelectorHook.
Definition at line 2300 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onLinkBegin | ( | $skin, | |
$target, | |||
& | $html, | ||
& | $customAttribs, | ||
& | $query, | ||
& | $options, | ||
& | $ret ) |
This hook is called when generating internal and interwiki links in Linker::link(), before processing starts.
See documentation for Linker::link() for details on the expected meanings of parameters.
DummyLinker | $skin | Formerly a Linker/Skin, now a DummyLinker for b/c |
Title | $target | Title that the link is pointing to |
string | null | &$html | Contents that the <a> tag should have (raw HTML); null means "default" |
string[] | &$customAttribs | HTML attributes that the <a> tag should have, in associative array form, with keys and values unescaped. Should be merged with default values, with a value of false meaning to suppress the attribute. |
string[] | &$query | Query string to add to the generated URL (the bit after the "?"), in associative array form, with keys and values unescaped |
string[] | &$options | Array of options, which can include 'known', 'broken', 'noclasses' |
string | &$ret | Value to return if your hook returns false |
Implements MediaWiki\Linker\Hook\LinkBeginHook.
Definition at line 2314 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onLinkEnd | ( | $skin, | |
$target, | |||
$options, | |||
& | $html, | ||
& | $attribs, | ||
& | $ret ) |
This hook is called when generating internal and interwiki links in Linker::link(), just before the function returns a value.
DummyLinker | $skin | Formerly a Linker/Skin, now a DummyLinker for b/c |
Title | $target | Title that the link is pointing to |
string[] | $options | Array of options, which always includes either 'known' or 'broken', and may include 'noclasses' |
string | &$html | Final (raw HTML) contents of the <a> tag, after processing |
string[] | &$attribs | Final HTML attributes of the <a> tag, after processing, in associative array form |
string | &$ret | Value to return if your hook returns false |
<a>
element with HTML attributes $attribs and contents $html will be returned. If you return false, $ret will be returned. Implements MediaWiki\Linker\Hook\LinkEndHook.
Definition at line 2324 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onLinkerMakeExternalImage | ( | & | $url, |
& | $alt, | ||
& | $img ) |
This hook is called at the end of Linker::makeExternalImage() just before the return.
string | &$url | Image URL |
string | &$alt | Image's alt text |
string | &$img | New image HTML (if returning false) |
Implements MediaWiki\Hook\LinkerMakeExternalImageHook.
Definition at line 2331 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onLinkerMakeExternalLink | ( | & | $url, |
& | $text, | ||
& | $link, | ||
& | $attribs, | ||
$linkType ) |
This hook is called at the end of Linker::makeExternalLink() just before the return.
string | &$url | Link URL |
string | &$text | Link text |
string | &$link | New link HTML (if returning false) |
string[] | &$attribs | Attributes to be applied |
string | $linkType | External link type |
Implements MediaWiki\Hook\LinkerMakeExternalLinkHook.
Definition at line 2338 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onLinkerMakeMediaLinkFile | ( | $title, | |
$file, | |||
& | $html, | ||
& | $attribs, | ||
& | $ret ) |
This hook is called at the end of Linker::makeMediaLinkFile() just before the return.
Title | $title | Title that the link is pointing to |
File | bool | $file | File object or false if broken link |
string | &$html | Link text |
array | &$attribs | Attributes to be applied |
string | &$ret | Value to return if your hook returns false |
Implements MediaWiki\Hook\LinkerMakeMediaLinkFileHook.
Definition at line 2347 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onLinksUpdate | ( | $linksUpdate | ) |
This hook is called at the beginning of LinksUpdate::doUpdate() just before the actual update.
LinksUpdate | $linksUpdate |
Implements MediaWiki\Hook\LinksUpdateHook.
Definition at line 2356 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onLinksUpdateAfterInsert | ( | $linksUpdate, | |
$table, | |||
$insertions ) |
This hook is called at the end of LinksUpdate::incrTableUpdate() after each link table insert.
For example: pagelinks, imagelinks, externallinks.
LinksUpdate | $linksUpdate | |
string | $table | Table to insert links to |
array | $insertions | Array of links to insert |
Implements MediaWiki\Hook\LinksUpdateAfterInsertHook.
Definition at line 2363 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
LinksUpdate | $linksUpdate | |
mixed | $ticket | Prior result of LBFactory::getEmptyTransactionTicket() |
Implements MediaWiki\Hook\LinksUpdateCompleteHook.
Definition at line 2370 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onLinksUpdateConstructed | ( | $linksUpdate | ) |
This hook is called at the end of LinksUpdate() is construction.
LinksUpdate | $linksUpdate |
Implements MediaWiki\Hook\LinksUpdateConstructedHook.
Definition at line 2377 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onListDefinedTags | ( | & | $tags | ) |
This hook is called when trying to find all defined tags.
string[] | &$tags | List of tags |
Implements MediaWiki\ChangeTags\Hook\ListDefinedTagsHook.
Definition at line 2384 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onLoadExtensionSchemaUpdates | ( | $updater | ) |
This hook is called during database installation and updates.
Do not use this hook with a handler that uses a "services" option in its ObjectFactory spec. It is called in a context where the global service locator is not initialised.
DatabaseUpdater | $updater | DatabaseUpdater subclass |
Implements MediaWiki\Installer\Hook\LoadExtensionSchemaUpdatesHook.
Definition at line 2391 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onLocalFile__getHistory | ( | $file, | |
& | $tables, | ||
& | $fields, | ||
& | $conds, | ||
& | $opts, | ||
& | $join_conds ) |
This hook is called before a file history query is performed.
File | $file | |
array | &$tables | Tables |
array | &$fields | Select fields |
array | &$conds | Conditions |
array | &$opts | Query options |
array | &$join_conds | JOIN conditions |
Implements MediaWiki\Hook\LocalFile__getHistoryHook.
Definition at line 2406 of file HookRunner.php.
References $file.
MediaWiki\HookContainer\HookRunner::onLocalFilePurgeThumbnails | ( | $file, | |
$archiveName, | |||
$urls ) |
This hook is called before thumbnails for a local file are purged.
File | $file | The File of which the thumbnails are being purged |
string | $archiveName | Name of an old file version or false if it's the current one |
array | $urls | Urls to be purged |
Implements MediaWiki\Hook\LocalFilePurgeThumbnailsHook.
Definition at line 2399 of file HookRunner.php.
References $file.
MediaWiki\HookContainer\HookRunner::onLocalisationCacheRecache | ( | $cache, | |
$code, | |||
& | $alldata, | ||
$unused ) |
Called when loading the localisation data into cache.
?mixed | $cache | The LocalisationCache object |
?mixed | $code | language code |
?mixed | &$alldata | The localisation data from core and extensions |
?mixed | $unused | Used to be $purgeBlobs, removed in 1.34 |
Implements MediaWiki\Hook\LocalisationCacheRecacheHook.
Definition at line 2415 of file HookRunner.php.
References $cache.
MediaWiki\HookContainer\HookRunner::onLocalisationCacheRecacheFallback | ( | $cache, | |
$code, | |||
& | $alldata ) |
Called for each language when merging fallback data into the cache.
?mixed | $cache | The LocalisationCache object |
?mixed | $code | language code |
?mixed | &$alldata | The localisation data from core and extensions. Note some keys may be omitted if they won't be merged into the final result. |
Implements MediaWiki\Hook\LocalisationCacheRecacheFallbackHook.
Definition at line 2422 of file HookRunner.php.
References $cache.
MediaWiki\HookContainer\HookRunner::onLocalUserCreated | ( | $user, | |
$autocreated ) |
This hook is called when a local user has been created.
User | $user | User object for the created user |
bool | $autocreated | Whether this was an auto-creation |
Implements MediaWiki\Auth\Hook\LocalUserCreatedHook.
Definition at line 2429 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onLogEventsListGetExtraInputs | ( | $type, | |
$logEventsList, | |||
& | $input, | ||
& | $formDescriptor ) |
This hook is called when getting extra inputs to display on Special:Log for a specific log type.
string | $type | Log type being displayed |
LogEventsList | $logEventsList | LogEventsList object for context and access to the WebRequest |
string | &$input | HTML of an input element. Deprecated, use $formDescriptor instead. |
array | &$formDescriptor | HTMLForm's form descriptor |
Implements MediaWiki\Hook\LogEventsListGetExtraInputsHook.
Definition at line 2436 of file HookRunner.php.
References $type.
MediaWiki\HookContainer\HookRunner::onLogEventsListLineEnding | ( | $page, | |
& | $ret, | ||
$entry, | |||
& | $classes, | ||
& | $attribs ) |
This hook is called before a Special:Log line is finished.
LogEventsList | $page | |
string | &$ret | HTML line |
DatabaseLogEntry | $entry | DatabaseLogEntry object for this row |
string[] | &$classes | Classes to add to the surrounding <li> |
string[] | &$attribs | Associative array of other HTML attributes for the <li> element. Currently only data attributes reserved to MediaWiki are allowed (see Sanitizer::isReservedDataAttribute). |
Implements MediaWiki\Hook\LogEventsListLineEndingHook.
Definition at line 2445 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onLogEventsListShowLogExtract | ( | & | $s, |
$types, | |||
$page, | |||
$user, | |||
$param ) |
This hook is called before the string is added to OutputPage.
string | &$s | HTML to show for the log extract |
string | array | $types | Log types to show |
string | Title | $page | Page title to show log entries for |
string | $user | User who made the log entries |
array | $param | Associative array with the following additional options:
|
Implements MediaWiki\Hook\LogEventsListShowLogExtractHook.
Definition at line 2454 of file HookRunner.php.
References $s.
MediaWiki\HookContainer\HookRunner::onLogException | ( | $e, | |
$suppressed ) |
This hook is called before an exception (or PHP error) is logged.
This is meant for integration with external error aggregation services; returning false will NOT prevent logging.
Exception | ErrorException | $e | Exception (in case of a plain old PHP error, a wrapping ErrorException) |
bool | $suppressed | True if the error was suppressed via error_reporting()/wfSuppressWarnings() |
Implements MediaWiki\Hook\LogExceptionHook.
Definition at line 2463 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onLoginFormValidErrorMessages | ( | array & | $messages | ) |
This hook is called in LoginForm when a function gets valid error messages.
This hook allows extensions to add additional error messages (except messages already in LoginForm::$validErrorMessages).
string[] | &$messages | Already added message keys (including message keys from LoginForm::$validErrorMessages) |
Implements MediaWiki\Hook\LoginFormValidErrorMessagesHook.
Definition at line 2470 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onLogLine | ( | $log_type, | |
$log_action, | |||
$title, | |||
$paramArray, | |||
& | $comment, | ||
& | $revert, | ||
$time ) |
Use this hook to process a single log entry on Special:Log.
string | $log_type | Type of log entry (e.g. 'move'). Corresponds to logging.log_type database field. |
string | $log_action | Type of log action (e.g. 'delete', 'block', 'create2'). Corresponds to logging.log_action database field. |
Title | $title | Title object that corresponds to logging.log_namespace and logging.log_title database fields |
array | $paramArray | Parameters that correspond to logging.log_params field. Note that only $paramArray[0] appears to contain anything. |
string | &$comment | Logging.log_comment database field, which is displayed in the UI |
string | &$revert | String that is displayed in the UI, similar to $comment |
string | $time | Timestamp of the log entry (added in 1.12) |
Implements MediaWiki\Hook\LogLineHook.
Definition at line 2477 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onLonelyPagesQuery | ( | & | $tables, |
& | $conds, | ||
& | $joinConds ) |
Use this hook to modify the query used by Special:LonelyPages.
array | &$tables | tables to join in the query |
array | &$conds | conditions for the query |
array | &$joinConds | join conditions for the query |
Implements MediaWiki\Hook\LonelyPagesQueryHook.
Definition at line 2487 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onMagicWordwgVariableIDs | ( | & | $variableIDs | ) |
This hook is called when defining new magic words IDs.
string[] | &$variableIDs |
Implements MediaWiki\Hook\MagicWordwgVariableIDsHook.
Definition at line 2494 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onMaintenanceRefreshLinksInit | ( | $refreshLinks | ) |
This hook is called before executing the refreshLinks.php maintenance script.
RefreshLinks | $refreshLinks |
Implements MediaWiki\Hook\MaintenanceRefreshLinksInitHook.
Definition at line 2501 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onMaintenanceUpdateAddParams | ( | & | $params | ) |
Use this hook to add params to the update.php maintenance script.
array | &$params | Array to populate with the params to be added. Array elements are keyed by the param name. Each param is an associative array that must include the following keys:
|
Implements MediaWiki\Hook\MaintenanceUpdateAddParamsHook.
Definition at line 2508 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onMakeGlobalVariablesScript | ( | & | $vars, |
$out ) |
This hook is called at end of OutputPage::getJSVars.
Ideally, this hook should only be used to add variables that depend on the current page/request; static configuration should be added through ResourceLoaderGetConfigVars instead.
array | &$vars | Variable (or multiple variables) to be added into the output of Skin::makeVariablesScript |
OutputPage | $out | OutputPage which called the hook, can be used to get the real title |
Implements MediaWiki\Hook\MakeGlobalVariablesScriptHook.
Definition at line 2515 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onManualLogEntryBeforePublish | ( | $logEntry | ) |
Use this hook to access or modify log entry just before it is published.
ManualLogEntry | $logEntry |
Implements MediaWiki\Hook\ManualLogEntryBeforePublishHook.
Definition at line 2522 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onMarkPatrolled | ( | $rcid, | |
$user, | |||
$wcOnlySysopsCanPatrol, | |||
$auto, | |||
& | $tags ) |
This hook is called before an edit is marked patrolled.
int | $rcid | ID of the revision to be marked patrolled |
User | $user | User marking the revision as patrolled |
bool | $wcOnlySysopsCanPatrol | Config setting indicating whether the user needs to be a sysop in order to mark an edit patrolled |
bool | $auto | True if the edit is being marked as patrolled automatically |
string[] | &$tags | Tags to be applied to the patrol log entry |
Implements MediaWiki\Hook\MarkPatrolledHook.
Definition at line 2530 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onMarkPatrolledComplete | ( | $rcid, | |
$user, | |||
$wcOnlySysopsCanPatrol, | |||
$auto ) |
This hook is called after an edit is marked patrolled.
int | $rcid | ID of the revision marked as patrolled |
User | $user | User who marked the edit patrolled |
bool | $wcOnlySysopsCanPatrol | Config setting indicating whether the user must be a sysop to patrol the edit |
bool | $auto | True if the edit is being marked as patrolled automatically |
Implements MediaWiki\Hook\MarkPatrolledCompleteHook.
Definition at line 2539 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onMediaWikiPerformAction | ( | $output, | |
$article, | |||
$title, | |||
$user, | |||
$request, | |||
$mediaWiki ) |
Use this hook to override MediaWiki::performAction().
Use this to do something completely different, after the basic globals have been set up, but before ordinary actions take place.
OutputPage | $output | Context output |
Article | $article | Article on which the action will be performed |
Title | $title | Title on which the action will be performed |
User | $user | Context user |
WebRequest | $request | Context request |
MediaWiki | $mediaWiki |
Implements MediaWiki\Hook\MediaWikiPerformActionHook.
Definition at line 2548 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onMediaWikiPHPUnitTest__endTest | ( | $test, | |
$time ) |
This hook is called after each PHPUnit test completes.
Test | $test | |
int | $time | Execution time in seconds |
Implements MediaWiki\Hook\MediaWikiPHPUnitTest__endTestHook.
Definition at line 2557 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onMediaWikiPHPUnitTest__startTest | ( | $test | ) |
This hook is called before each PHPUnit test starts.
Test | $test |
Implements MediaWiki\Hook\MediaWikiPHPUnitTest__startTestHook.
Definition at line 2564 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onMediaWikiServices | ( | $services | ) |
This hook is called when a global MediaWikiServices instance is initialized.
Extensions may use this to define, replace, or wrap services. However, the preferred way to define a new service is the $wgServiceWiringFiles array.
MediaWikiServices | $services |
Implements MediaWiki\Hook\MediaWikiServicesHook.
Definition at line 2571 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onMessageCache__get | ( | & | $key | ) |
This hook is called when fetching a message.
Use this hook to override the key for customisations. Given and returned message key must be formatted with: 1) the first letter in lower case according to the content language 2) spaces replaced with underscores
string | &$key | Message key |
Implements MediaWiki\Cache\Hook\MessageCache__getHook.
Definition at line 2585 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onMessageCacheReplace | ( | $title, | |
$text ) |
This hook is called when a message page is changed.
Use this hook to update caches.
Title | $title | Name of the page changed |
string | $text | New contents of the page |
Implements MediaWiki\Cache\Hook\MessageCacheReplaceHook.
Definition at line 2578 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onMessagesPreLoad | ( | $title, | |
& | $message, | ||
$code ) |
This hook is called when loading a message from the database.
string | $title | Title of the message |
string | &$message | Message you want to define |
string | $code | Language code |
Implements MediaWiki\Cache\Hook\MessagesPreLoadHook.
Definition at line 2592 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onMimeMagicGuessFromContent | ( | $mimeMagic, | |
& | $head, | ||
& | $tail, | ||
$file, | |||
& | $mime ) |
Use this hook to guess the MIME by content.
MimeAnalyzer | $mimeMagic | |
string | &$head | First 1024 bytes of the file in a string (in - Do not alter!) |
string | &$tail | More or equal than last 65558 bytes of the file in a string (in - Do not alter!) |
string | $file | File path |
string | &$mime | MIME type (out) |
Implements MediaWiki\Hook\MimeMagicGuessFromContentHook.
Definition at line 2599 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onMimeMagicImproveFromExtension | ( | $mimeMagic, | |
$ext, | |||
& | $mime ) |
Use this hook to further improve the MIME type detected by considering the file extension.
MimeAnalyzer | $mimeMagic | |
string | $ext | File extension |
string | &$mime | MIME type (in/out) |
Implements MediaWiki\Hook\MimeMagicImproveFromExtensionHook.
Definition at line 2608 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
As an extension author, you are encouraged to submit patches to MediaWiki's core to add new MIME types to mime.types.
MimeAnalyzer | $mimeMagic |
|
Implements MediaWiki\Hook\MimeMagicInitHook.
Definition at line 2615 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onModifyExportQuery | ( | $db, | |
& | $tables, | ||
$cond, | |||
& | $opts, | ||
& | $join_conds, | ||
& | $conds ) |
Use this hook to modify the query used by the exporter.
IDatabase | $db | Database object to be queried |
array | &$tables | Tables in the query |
string | $cond | An SQL fragment included in the WHERE clause which is used to filter the results, for example to a specific page. Since 1.31, modification of this parameter has no effect. Since 1.35, you can use $conds instead to modify the array of conditions passed to IDatabase::select(). |
array | &$opts | Options for the query |
array | &$join_conds | Join conditions for the query |
array | &$conds | The array of conditions to be passed to IDatabase::select(). Can be modified. Includes the value of $cond. |
Implements MediaWiki\Hook\ModifyExportQueryHook.
Definition at line 2622 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onMovePageCheckPermissions | ( | $oldTitle, | |
$newTitle, | |||
$user, | |||
$reason, | |||
$status ) |
Use this hook to specify whether the user is allowed to move the page.
Title | $oldTitle | Current (old) location |
Title | $newTitle | New location |
User | $user | User making the move |
string | $reason | Reason provided by the user |
Status | $status | Status object to pass error messages to |
Implements MediaWiki\Hook\MovePageCheckPermissionsHook.
Definition at line 2631 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onMovePageIsValidMove | ( | $oldTitle, | |
$newTitle, | |||
$status ) |
Use this hook to specify whether a page can be moved for technical reasons.
Title | $oldTitle | Current (old) location |
Title | $newTitle | New location |
Status | $status | Status object to pass error messages to |
Implements MediaWiki\Hook\MovePageIsValidMoveHook.
Definition at line 2640 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onMultiContentSave | ( | $renderedRevision, | |
$user, | |||
$summary, | |||
$flags, | |||
$status ) |
This hook is called before an article is saved.
RenderedRevision | $renderedRevision | Planned revision. Provides access to: (1) ParserOutput of all slots, (2) RevisionRecord, which contains (2a) Title of the page that will be edited, (2b) RevisionSlots - content of all slots, including inherited slots, where content has already been modified by PreSaveTransform. NOTE: because this revision is not yet saved, slots don't have content ID or address, and revision itself doesn't have an ID. |
UserIdentity | $user | Author of this new revision |
CommentStoreComment | $summary | User-provided edit comment/summary (not an autosummary: will be empty if the user hasn't provided a comment) |
int | $flags | Combination of EDIT_* flags, e.g. EDIT_MINOR |
Status | $status | If the hook is aborted, error code can be placed into this Status |
Implements MediaWiki\Storage\Hook\MultiContentSaveHook.
Definition at line 2647 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onNamespaceIsMovable | ( | $index, | |
& | $result ) |
This hook is called when determining if it is possible to move pages in a namespace.
int | $index | Index of the namespace being checked |
bool | &$result | Whether MediaWiki currently thinks that pages in this namespace are movable. Hooks may change this value to override the return value of NamespaceInfo::isMovable(). |
Implements MediaWiki\Hook\NamespaceIsMovableHook.
Definition at line 2656 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onNewDifferenceEngine | ( | $title, | |
& | $oldId, | ||
& | $newId, | ||
$old, | |||
$new ) |
This hook is called when a new DifferenceEngine object is made.
Title | null | $title | Diff page title |
int | false | null | &$oldId | Actual old ID to use in the diff |
int | false | null | &$newId | Actual new Id to use in the diff (0 means current) |
int | $old | ?old= param value from the URL |
int | $new | ?new= param value from the URL |
Implements MediaWiki\Diff\Hook\NewDifferenceEngineHook.
Definition at line 2663 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onNewPagesLineEnding | ( | $page, | |
& | $ret, | ||
$row, | |||
& | $classes, | ||
& | $attribs ) |
This hook is called before a NewPages line is finished.
SpecialNewPages | $page | The SpecialNewPages object |
string | &$ret | the HTML line |
stdClass | $row | The database row for this page (the recentchanges record and a few extras
|
string[] | &$classes | The classes to add to the surrounding |
string[] | &$attribs | Associative array of other HTML attributes for the element. Currently only data attributes reserved to MediaWiki are allowed (see Sanitizer::isReservedDataAttribute). |
Implements MediaWiki\Hook\NewPagesLineEndingHook.
Definition at line 2670 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
WikiPage | $wikiPage | WikiPage edited |
Revision | $rev | New revision |
int | bool | $originalRevId | If the edit restores or repeats an earlier revision (such as a rollback or a null revision), the ID of that earlier revision. False otherwise. (Used to be called $baseID.) |
User | $user | Editing user |
array | &$tags | Tags to apply to the edit and recent change. This is empty, and replacement is ignored, in the case of import or page move. |
Implements MediaWiki\Page\Hook\NewRevisionFromEditCompleteHook.
Definition at line 2677 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onOldChangesListRecentChangesLine | ( | $changeslist, | |
& | $s, | ||
$rc, | |||
& | $classes, | ||
& | $attribs ) |
Use this hook to customize a recent changes line.
OldChangesList | $changeslist | |
string | &$s | HTML of the form <li>...</li> containing one RC entry |
RecentChange | $rc | |
string[] | &$classes | Array of CSS classes for the <li> element |
string[] | &$attribs | Associative array of other HTML attributes for the <li> element. Currently only data attributes reserved to MediaWiki are allowed (see Sanitizer::isReservedDataAttribute). |
Implements MediaWiki\Hook\OldChangesListRecentChangesLineHook.
Definition at line 2686 of file HookRunner.php.
References $s.
MediaWiki\HookContainer\HookRunner::onOpenSearchUrls | ( | & | $urls | ) |
This hook is called when constructing the OpenSearch description XML.
Hooks can alter or append to the array of URLs for search & suggestion formats.
array[] | &$urls | Array of associative arrays with URL element attributes |
Implements MediaWiki\Hook\OpenSearchUrlsHook.
Definition at line 2695 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onOpportunisticLinksUpdate | ( | $page, | |
$title, | |||
$parserOutput ) |
This hook is called by WikiPage::triggerOpportunisticLinksUpdate when a page view triggers a re-rendering of the page.
This may happen particularly if the parser cache is split by user language, and no cached rendering of the page exists in the user's language. The hook is called before checking whether page_links_updated indicates that the links are up to date.
Page | $page | Page that was rendered |
Title | $title | Title of the rendered page |
ParserOutput | $parserOutput | ParserOutput resulting from rendering the page |
Implements MediaWiki\Page\Hook\OpportunisticLinksUpdateHook.
Definition at line 2702 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onOtherAutoblockLogLink | ( | & | $otherBlockLink | ) |
Use this hook to add list items to a list of "other autoblocks" which appears at the end of Special:AutoblockList.
Handlers should append HTML fragments to the $otherBlockLink array.
string[] | &$otherBlockLink | An array of HTML fragments |
Implements MediaWiki\Hook\OtherAutoblockLogLinkHook.
Definition at line 2709 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onOtherBlockLogLink | ( | & | $otherBlockLink, |
$ip ) |
Use this hook to add list items to a list of "other blocks" when viewing Special:BlockList.
Handlers should append HTML fragments to the $otherBlockLink array.
string[] | &$otherBlockLink | Array of HTML fragments |
string | $ip | The requested IP address or username, or an empty string if Special:BlockList is showing all blocks. |
Implements MediaWiki\Hook\OtherBlockLogLinkHook.
Definition at line 2716 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onOutputPageAfterGetHeadLinksArray | ( | & | $tags, |
$out ) |
This hook is called in OutputPage::getHeadLinksArray right before returning the result.
array | &$tags | Array containing all <head> links generated so far. The array format is "link name or number => 'link HTML'". |
OutputPage | $out |
Implements MediaWiki\Hook\OutputPageAfterGetHeadLinksArrayHook.
Definition at line 2723 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
OutputPage | $out | OutputPage object that corresponds to the page |
string | &$text | Text that will be displayed, in HTML |
Implements MediaWiki\Hook\OutputPageBeforeHTMLHook.
Definition at line 2730 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
Or to allow building extensions to add body classes that aren't of high enough demand to be included in core.
OutputPage | $out | OutputPage which called the hook, can be used to get the real title |
Skin | $sk | Skin that called OutputPage::headElement |
string[] | &$bodyAttrs | Array of attributes for the body tag passed to Html::openElement |
Implements MediaWiki\Hook\OutputPageBodyAttributesHook.
Definition at line 2737 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onOutputPageCheckLastModified | ( | & | $modifiedTimes, |
$out ) |
This hook is called when checking if the page has been modified since the last visit.
string[] | &$modifiedTimes | Array of timestamps. The following keys are set: page, user, epoch. |
OutputPage | $out | since 1.28 |
Implements MediaWiki\Hook\OutputPageCheckLastModifiedHook.
Definition at line 2744 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onOutputPageMakeCategoryLinks | ( | $out, | |
$categories, | |||
& | $links ) |
This hook is called when links are about to be generated for the page's categories.
OutputPage | $out | |
string[] | $categories | Associative array in which keys are category names and values are category types ("normal" or "hidden") |
array | &$links | Intended to hold the result. Associative array with category types as keys and arrays of HTML links as values. |
Implements MediaWiki\Hook\OutputPageMakeCategoryLinksHook.
Definition at line 2751 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onOutputPageParserOutput | ( | $out, | |
$parserOutput ) |
This hook is called after adding a parserOutput to $wgOut.
OutputPage | $out | |
ParserOutput | $parserOutput | ParserOutput instance being added in $out |
Implements MediaWiki\Hook\OutputPageParserOutputHook.
Definition at line 2758 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onPageContentInsertComplete | ( | $wikiPage, | |
$user, | |||
$content, | |||
$summary, | |||
$isMinor, | |||
$isWatch, | |||
$section, | |||
$flags, | |||
$revision ) |
This hook is called after a new article is created.
WikiPage | $wikiPage | WikiPage created |
User | $user | User creating the article |
Content | $content | New content |
string | $summary | Edit summary/comment |
bool | $isMinor | Whether or not the edit was marked as minor |
null | $isWatch | (No longer used) |
null | $section | (No longer used) |
int | $flags | Flags passed to WikiPage::doEditContent() |
Revision | $revision | New Revision of the article |
Implements MediaWiki\Storage\Hook\PageContentInsertCompleteHook.
Definition at line 2766 of file HookRunner.php.
References $content.
MediaWiki\HookContainer\HookRunner::onPageContentLanguage | ( | $title, | |
& | $pageLang, | ||
$userLang ) |
Use this hook to change the language in which the content of a page is written.
Defaults to the wiki content language.
Title | $title | |
Language | string | &$pageLang | Page content language. Input can be anything (under control of hook subscribers), but hooks should return Language objects. Language code strings are deprecated. |
Language | $userLang | User language |
Implements MediaWiki\Content\Hook\PageContentLanguageHook.
Definition at line 2776 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onPageContentSave | ( | $wikiPage, | |
$user, | |||
$content, | |||
& | $summary, | ||
$isminor, | |||
$iswatch, | |||
$section, | |||
$flags, | |||
$status ) |
This hook is called before an article is saved.
WikiPage | $wikiPage | WikiPage being saved |
User | $user | User saving the article |
Content | $content | New article content |
CommentStoreComment | &$summary | Edit comment. Can be replaced with a new one. |
bool | $isminor | Whether the edit was marked as minor |
null | $iswatch | Previously a watch flag. Currently unused, always null. |
null | $section | Previously the section number being edited. Currently unused, always null. |
int | $flags | All EDIT_… flags (including EDIT_MINOR) as an integer number. See WikiPage::doEditContent documentation for flags' definition. |
StatusValue | $status | StatusValue object for the hook handlers resulting status. Either set $status->fatal() or return false to abort the save action. |
Implements MediaWiki\Storage\Hook\PageContentSaveHook.
Definition at line 2783 of file HookRunner.php.
References $content.
MediaWiki\HookContainer\HookRunner::onPageContentSaveComplete | ( | $wikiPage, | |
$user, | |||
$content, | |||
$summary, | |||
$isMinor, | |||
$isWatch, | |||
$section, | |||
$flags, | |||
$revision, | |||
$status, | |||
$originalRevId, | |||
$undidRevId ) |
This hook is called after an article has been updated.
WikiPage | $wikiPage | WikiPage modified |
User | $user | User performing the modification |
Content | $content | New content |
string | $summary | Edit summary/comment |
bool | $isMinor | Whether or not the edit was marked as minor |
null | $isWatch | (No longer used) |
null | $section | (No longer used) |
int | $flags | Flags passed to WikiPage::doEditContent() |
Revision | $revision | New Revision of the article |
Status | $status | Status object about to be returned by doEditContent(). Since MediaWiki 1.32, replacing the Status object by assigning through the reference has had no effect. |
int | bool | $originalRevId | If the edit restores or repeats an earlier revision (such as a rollback or a null revision), the ID of that earlier revision. False otherwise. (Used to be called $baseRevId.) |
int | $undidRevId | Rev ID (or 0) this edit undid |
Implements MediaWiki\Storage\Hook\PageContentSaveCompleteHook.
Definition at line 2793 of file HookRunner.php.
References $content.
MediaWiki\HookContainer\HookRunner::onPageDeletionDataUpdates | ( | $title, | |
$revision, | |||
& | $updates ) |
This hook is called when constructing a list of DeferrableUpdate to be executed when a page is deleted.
Title | $title | Title of the page being deleted |
RevisionRecord | $revision | RevisionRecord representing the page's current revision at the time of deletion |
DeferrableUpdate[] | &$updates | List of DeferrableUpdate that can be manipulated by the hook handler |
Implements MediaWiki\Page\Hook\PageDeletionDataUpdatesHook.
Definition at line 2804 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onPageHistoryBeforeList | ( | $article, | |
$context ) |
This hook is called when a history page list is about to be constructed.
Article | $article | The article that the history is loading for |
IContextSource | $context |
Implements MediaWiki\Hook\PageHistoryBeforeListHook.
Definition at line 2811 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onPageHistoryLineEnding | ( | $historyAction, | |
& | $row, | ||
& | $s, | ||
& | $classes, | ||
& | $attribs ) |
This hook is called right before the <li>
is generated for a history line.
HistoryPager | $historyAction | |
stdClass | &$row | The revision row for this line |
string | &$s | The string representing this parsed line |
string[] | &$classes | Array containing the <li> element classes |
string[] | &$attribs | Associative array of other HTML attributes for the <li> element. Currently only data attributes reserved to MediaWiki are allowed (see Sanitizer::isReservedDataAttribute). |
Implements MediaWiki\Hook\PageHistoryLineEndingHook.
Definition at line 2818 of file HookRunner.php.
References $s.
MediaWiki\HookContainer\HookRunner::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.
HistoryPager | $pager | |
IResultWrapper | $result | A ResultWrapper representing the query result |
Implements MediaWiki\Hook\PageHistoryPager__doBatchLookupsHook.
Definition at line 2827 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onPageHistoryPager__getQueryInfo | ( | $pager, | |
& | $queryInfo ) |
This hook is called when a history pager query parameter set is constructed.
HistoryPager | $pager | |
array | &$queryInfo | The query parameters |
Implements MediaWiki\Hook\PageHistoryPager__getQueryInfoHook.
Definition at line 2834 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onPageMoveComplete | ( | $old, | |
$new, | |||
$user, | |||
$pageid, | |||
$redirid, | |||
$reason, | |||
$revision ) |
This hook is called after moving an article (title), post-commit.
LinkTarget | $old | Old title |
LinkTarget | $new | New title |
UserIdentity | $user | User who did the move |
int | $pageid | Database ID of the page that's been moved |
int | $redirid | Database ID of the created redirect |
string | $reason | Reason for the move |
RevisionRecord | $revision | Revision created by the move |
Implements MediaWiki\Hook\PageMoveCompleteHook.
Definition at line 2841 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onPageMoveCompleting | ( | $old, | |
$new, | |||
$user, | |||
$pageid, | |||
$redirid, | |||
$reason, | |||
$revision ) |
This hook is called after moving an article (title), pre-commit.
LinkTarget | $old | Old title |
LinkTarget | $new | New title |
UserIdentity | $user | User who did the move |
int | $pageid | Database ID of the page that's been moved |
int | $redirid | Database ID of the created redirect |
string | $reason | Reason for the move |
RevisionRecord | $revision | Revision created by the move |
Implements MediaWiki\Hook\PageMoveCompletingHook.
Definition at line 2848 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onPageRenderingHash | ( | & | $confstr, |
$user, | |||
& | $forOptions ) |
NOTE: Consider using ParserOptionsRegister instead.
Use this hook to alter the parser cache option hash key. A parser extension which depends on user options should install this hook and append its values to the key.
string | &$confstr | Reference to a hash key string which can be modified |
User | $user | User requesting the page |
array | &$forOptions | Array of options the hash is for |
Implements MediaWiki\Hook\PageRenderingHashHook.
Definition at line 2855 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onPageSaveComplete | ( | $wikiPage, | |
$user, | |||
$summary, | |||
$flags, | |||
$revisionRecord, | |||
$editResult ) |
This hook is called after an article has been updated.
WikiPage | $wikiPage | WikiPage modified |
UserIdentity | $user | User performing the modification |
string | $summary | Edit summary/comment |
int | $flags | Flags passed to WikiPage::doEditContent() |
RevisionRecord | $revisionRecord | New RevisionRecord of the article |
EditResult | $editResult | Object 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). |
Implements MediaWiki\Storage\Hook\PageSaveCompleteHook.
Definition at line 2862 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onPageViewUpdates | ( | $wikipage, | |
$user ) |
Use this hook to make database (or other) changes after a page view is seen by MediaWiki.
Note this does not capture views made via external caches such as Squid.
Implements MediaWiki\Page\Hook\PageViewUpdatesHook.
Definition at line 2871 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserAfterParse | ( | $parser, | |
& | $text, | ||
$stripState ) |
This hook is called from Parser::parse() just after the call to Parser::internalParse() returns.
Parser | $parser | |
string | &$text | Text being parsed |
StripState | $stripState | StripState used |
Implements MediaWiki\Hook\ParserAfterParseHook.
Definition at line 2878 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserAfterStrip | ( | $parser, | |
& | $text, | ||
$stripState ) |
This hook is called at end of parsing time.
TODO: No more strip, deprecated ?
Parser | $parser | |
string | &$text | Text being parsed |
StripState | $stripState | StripState used |
Implements MediaWiki\Hook\ParserAfterStripHook.
Definition at line 2885 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserAfterTidy | ( | $parser, | |
& | $text ) |
This hook is called after Parser::tidy() in Parser::parse().
Implements MediaWiki\Hook\ParserAfterTidyHook.
Definition at line 2892 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserBeforeInternalParse | ( | $parser, | |
& | $text, | ||
$stripState ) |
This hook is called at the beginning of Parser::internalParse().
Parser | $parser | |
string | &$text | Text to parse |
StripState | $stripState | StripState instance being used |
Implements MediaWiki\Hook\ParserBeforeInternalParseHook.
Definition at line 2899 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserBeforePreprocess | ( | $parser, | |
& | $text, | ||
$stripState ) |
Called at the beginning of Parser::preprocess()
Parser | $parser | Parser object |
string | &$text | text to parse |
StripState | $stripState | StripState instance being used |
Implements MediaWiki\Hook\ParserBeforePreprocessHook.
Definition at line 2906 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserBeforeStrip | ( | $parser, | |
& | $text, | ||
$stripState ) |
This hook is called at start of parsing time.
TODO: No more strip, deprecated ?
Parser | $parser | |
string | &$text | Text being parsed |
StripState | $stripState | StripState used |
Implements MediaWiki\Hook\ParserBeforeStripHook.
Definition at line 2913 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserBeforeTidy | ( | $parser, | |
& | $text ) |
This hook is called before tidy and custom tags replacements.
Implements MediaWiki\Hook\ParserBeforeTidyHook.
Definition at line 2920 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserCacheSaveComplete | ( | $parserCache, | |
$parserOutput, | |||
$title, | |||
$popts, | |||
$revId ) |
This hook is called after a ParserOutput has been committed to the parser cache.
ParserCache | $parserCache | ParserCache object $parserOutput was stored in |
ParserOutput | $parserOutput | ParserOutput object that was stored |
Title | $title | Title of the page that was parsed to generate $parserOutput |
ParserOptions | $popts | ParserOptions used for generating $parserOutput |
int | $revId | ID of the revision that was parsed to create $parserOutput |
Implements MediaWiki\Hook\ParserCacheSaveCompleteHook.
Definition at line 2927 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onParserClearState | ( | $parser | ) |
This hook is called at the end of Parser::clearState().
Implements MediaWiki\Hook\ParserClearStateHook.
Definition at line 2936 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserCloned | ( | $parser | ) |
This hook is called when the parser is cloned.
Implements MediaWiki\Hook\ParserClonedHook.
Definition at line 2943 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserFetchTemplate | ( | $parser, | |
$title, | |||
$rev, | |||
& | $text, | ||
& | $deps ) |
This hook is called when the parser fetches a template.
Parser | bool | $parser | Parser object or false |
Title | $title | Title object of the template to be fetched |
Revision | $rev | Revision object of the template |
string | bool | null | &$text | Transclusion text of the template or false or null |
array | &$deps | Array of template dependencies with 'title', 'page_id', and 'rev_id' keys |
Implements MediaWiki\Hook\ParserFetchTemplateHook.
Definition at line 2950 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onParserFirstCallInit | ( | $parser | ) |
This hook is called when the parser initialises for the first time.
Implements MediaWiki\Hook\ParserFirstCallInitHook.
Definition at line 2957 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserGetVariableValueSwitch | ( | $parser, | |
& | $variableCache, | ||
$magicWordId, | |||
& | $ret, | ||
$frame ) |
This hook is called when the parser needs the value of a custom magic word.
Parser | $parser | |
array | &$variableCache | Array to cache the value; when you return $variableCache[$magicWordId] should be the same as $ret |
string | $magicWordId | Index of the magic word (hook should not mutate it!) |
string | &$ret | Value of the magic word (the hook should set it) |
PPFrame | $frame | PPFrame object to use for expanding any template variables |
Implements MediaWiki\Hook\ParserGetVariableValueSwitchHook.
Definition at line 2964 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserGetVariableValueTs | ( | $parser, | |
& | $time ) |
Use this hook to change the value of the time for the {{LOCAL...}} magic word.
Parser | $parser | |
string | &$time | Actual time (timestamp) |
Implements MediaWiki\Hook\ParserGetVariableValueTsHook.
Definition at line 2973 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserGetVariableValueVarCache | ( | $parser, | |
& | $varCache ) |
Use this hook to change the value of the variable cache or return false to not use it.
Parser | $parser | |
array | &$varCache | Variable cache |
Implements MediaWiki\Hook\ParserGetVariableValueVarCacheHook.
Definition at line 2980 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserLimitReportFormat | ( | $key, | |
& | $value, | ||
& | $report, | ||
$isHTML, | |||
$localize ) |
This hook is called for each row in the parser limit report that needs formatting.
If nothing handles this hook, the default is to use "$key" to get the label, and "$key-value" or "$key-value-text"/"$key-value-html" to format the value.
string | $key | Key for the limit report item |
string | &$value | Value of the limit report item |
string | &$report | String onto which to append the data |
string | $isHTML | If true, $report is an HTML table with two columns; if false, it's text intended for display in a monospaced font |
bool | $localize | If false, $report should be output in English |
Implements MediaWiki\Hook\ParserLimitReportFormatHook.
Definition at line 2987 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
Hooks should use $output->setLimitReportData() to populate data. Functions for this hook should not use $wgLang; do that in ParserLimitReportFormat instead.
Parser | $parser | |
ParserOutput | $output |
Implements MediaWiki\Hook\ParserLimitReportPrepareHook.
Definition at line 2996 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
Title | $title | Title object representing the file |
File | $file | File object that will be used to create the image |
array | &$params | Two-dimensional array of parameters |
Parser | $parser | Parser object that called the hook |
Implements MediaWiki\Hook\ParserMakeImageParamsHook.
Definition at line 3003 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserOptionsRegister | ( | & | $defaults, |
& | $inCacheKey, | ||
& | $lazyLoad ) |
Use this hook to register additional parser options.
Note that if you change the default value for an option, all existing parser cache entries will be invalid. To avoid bugs, you'll need to handle that somehow (e.g. with the RejectParserCacheValue hook) because MediaWiki won't do it for you.
array | &$defaults | Set the default value for your option here |
array | &$inCacheKey | To fragment the parser cache on your option, set a truthy value in this array, with the key being the option name. |
array | &$lazyLoad | To lazy-initialize your option, set it null in $defaults and set a callable in this array, with the key being the option name. The callable is passed the ParserOptions object and the option name. |
Implements MediaWiki\Hook\ParserOptionsRegisterHook.
Definition at line 3010 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserOutputPostCacheTransform | ( | $parserOutput, | |
& | $text, | ||
& | $options ) |
This hook is called from ParserOutput::getText() to do post-cache transforms.
ParserOutput | $parserOutput | |
string | &$text | Text being transformed, before core transformations are done |
array | &$options | Options array being used for the transformation |
Implements MediaWiki\Hook\ParserOutputPostCacheTransformHook.
Definition at line 3017 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserOutputStashForEdit | ( | $page, | |
$content, | |||
$output, | |||
$summary, | |||
$user ) |
This hook is called when an edit stash parse finishes, before the output is cached.
WikiPage | $page | WikiPage of the candidate edit |
Content | $content | Content object of the candidate edit |
ParserOutput | $output | ParserOutput result of the candidate edit |
string | $summary | Change summary of the candidate edit |
User | $user | User considering the edit |
Implements MediaWiki\Storage\Hook\ParserOutputStashForEditHook.
Definition at line 3027 of file HookRunner.php.
References $content.
MediaWiki\HookContainer\HookRunner::onParserPreSaveTransformComplete | ( | $parser, | |
& | $text ) |
This hook is called from Parser::preSaveTransform() after processing is complete, giving the extension a chance to further modify the wikitext.
Parser | $parser | Calling Parser instance |
string | &$text | Transformed text, which can be modified by the hook |
Implements MediaWiki\Hook\ParserPreSaveTransformCompleteHook.
Definition at line 3036 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserSectionCreate | ( | $parser, | |
$section, | |||
& | $sectionContent, | ||
$showEditLinks ) |
This hook is called each time the parser creates a document section from wikitext.
Use this to apply per-section modifications to HTML (like wrapping the section in a DIV). Caveat: DIVs are valid wikitext, and a DIV can begin in one section and end in another. Make sure your code can handle that case gracefully. See the EditSectionClearerLink extension for an example.
Parser | $parser | Calling Parser instance |
int | $section | Section number, zero-based, but section 0 is usually empty |
string | &$sectionContent | Reference to the content of the section, which can be modified by the hook |
bool | $showEditLinks | Whether this section has an edit link |
Implements MediaWiki\Hook\ParserSectionCreateHook.
Definition at line 3043 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserTestGlobals | ( | & | $globals | ) |
Use this hook to define globals for parser tests.
array | &$globals | Array with all the globals which should be set for parser tests. The arrays keys serve as the globals' names, its values are the globals' values. |
Implements MediaWiki\Hook\ParserTestGlobalsHook.
Definition at line 3052 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onParserTestTables | ( | & | $tables | ) |
Use this hook to alter the list of tables to duplicate when parser tests are run.
Use when page save hooks require the presence of custom tables to ensure that tests continue to run properly.
string[] | &$tables | Array of table names |
Implements MediaWiki\Hook\ParserTestTablesHook.
Definition at line 3059 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onPasswordPoliciesForUser | ( | $user, | |
& | $effectivePolicy ) |
Use this hook to alter the effective password policy for a user.
User | $user | User whose policy you are modifying |
array | &$effectivePolicy | Array of policy statements that apply to this user |
Implements MediaWiki\Hook\PasswordPoliciesForUserHook.
Definition at line 3066 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onPerformRetroactiveAutoblock | ( | $block, | |
& | $blockIds ) |
This hook is called before a retroactive autoblock is applied to a user.
DatabaseBlock | $block | Block object which is set to be autoblocking |
array | &$blockIds | Array of block IDs of the autoblock |
Implements MediaWiki\Block\Hook\PerformRetroactiveAutoblockHook.
Definition at line 3073 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onPersonalUrls | ( | & | $personal_urls, |
& | $title, | ||
$skin ) |
Use this hook to alter the user-specific navigation links (e.g.
"my page, my talk page, my contributions" etc).
array | &$personal_urls | Array of link specifiers (see SkinTemplate.php) |
Title | &$title | Current page |
SkinTemplate | $skin | SkinTemplate object providing context (e.g. to check if the user is logged in, etc.) |
Implements MediaWiki\Hook\PersonalUrlsHook.
Definition at line 3080 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onPingLimiter | ( | $user, | |
$action, | |||
& | $result, | ||
$incrBy ) |
Use this hook to override the results of User::pingLimiter().
User | $user | User performing the action |
string | $action | Action being performed |
bool | &$result | Whether or not the action should be prevented Change $result and return false to give a definitive answer, otherwise the built-in rate limiting checks are used, if enabled. |
int | $incrBy | Amount to increment counter by |
Implements MediaWiki\User\Hook\PingLimiterHook.
Definition at line 3088 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onPlaceNewSection | ( | $content, | |
$oldtext, | |||
$subject, | |||
& | $text ) |
Use this hook to override placement of new sections.
WikiPage | Content | $content | Formerly a WikiPage, but accidentally a Content object since approximately 1.21 |
string | $oldtext | Text of the article before editing |
string | $subject | Subject of the new section |
string | &$text | Text of the new section |
Implements MediaWiki\Content\Hook\PlaceNewSectionHook.
Definition at line 3095 of file HookRunner.php.
References $content.
MediaWiki\HookContainer\HookRunner::onPostLoginRedirect | ( | & | $returnTo, |
& | $returnToQuery, | ||
& | $type ) |
Use this hook to modify the post login redirect behavior.
Occurs after signing up or logging in, allows for interception of redirect.
string | &$returnTo | The page name to return to, as a string |
string[] | &$returnToQuery | Array of url parameters, mapping parameter names to values |
string | &$type | Type of login redirect as string:
|
Implements MediaWiki\Hook\PostLoginRedirectHook.
Definition at line 3102 of file HookRunner.php.
References $type.
MediaWiki\HookContainer\HookRunner::onPreferencesFormPreSave | ( | $formData, | |
$form, | |||
$user, | |||
& | $result, | ||
$oldUserOptions ) |
Use this hook to override preferences being saved.
array | $formData | Array of user submitted data |
HTMLForm | $form | HTMLForm object, also a ContextSource |
User | $user | User with preferences to be saved |
bool | &$result | Boolean indicating success |
array | $oldUserOptions | Array with user's old options (before save) |
Implements MediaWiki\Preferences\Hook\PreferencesFormPreSaveHook.
Definition at line 3109 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onPreferencesGetLegend | ( | $form, | |
$key, | |||
& | $legend ) |
Use the hook to override the text used for the <legend> of a preferences section.
HTMLForm | $form | the HTMLForm object. This is a ContextSource as well |
string | $key | the section name |
string | &$legend | the legend text. Defaults to wfMessage( "prefs-$key" )->text() but may be overridden |
Implements MediaWiki\Hook\PreferencesGetLegendHook.
Definition at line 3118 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onPrefixSearchBackend | ( | $ns, | |
$search, | |||
$limit, | |||
& | $results, | ||
$offset ) |
Use this hook to override the title prefix search used for OpenSearch and AJAX search suggestions.
Put results into &$results outparam and return false.
int[] | $ns | Array of int namespace keys to search in |
string | $search | Search term (not guaranteed to be conveniently normalized) |
int | $limit | Maximum number of results to return |
string[] | &$results | Out param: array of page names |
int | $offset | Number of results to offset from the beginning |
Implements MediaWiki\Search\Hook\PrefixSearchBackendHook.
Definition at line 3125 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
int[] | &$namespaces | Array of int namespace keys to search in (change this if you can extract namespaces) |
string | &$search | Search term (replace this with term without the namespace if you can extract one) |
Implements MediaWiki\Search\Hook\PrefixSearchExtractNamespaceHook.
Definition at line 3134 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onPrefsEmailAudit | ( | $user, | |
$oldaddr, | |||
$newaddr ) |
This hook is called when user changes their email address.
User | $user | User (object) changing his email address |
string | $oldaddr | old email address (string) |
string | $newaddr | new email address (string) |
Implements MediaWiki\Hook\PrefsEmailAuditHook.
Definition at line 3141 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onProtectionForm__buildForm | ( | $article, | |
& | $output ) |
This hook is called after all protection type fieldsets are made in the form.
Implements MediaWiki\Hook\ProtectionForm__buildFormHook.
Definition at line 3148 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onProtectionForm__save | ( | $article, | |
& | $errorMsg, | ||
$reasonstr ) |
This hook is called when a protection form is submitted.
Article | $article | Page being (un)protected |
string | array | &$errorMsg | HTML message string of an error or an array of message name and its parameters |
string | $reasonstr | String describing the reason page protection level is altered |
Implements MediaWiki\Hook\ProtectionForm__saveHook.
Definition at line 3155 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onProtectionForm__showLogExtract | ( | $article, | |
$out ) |
This hook is called after the protection log extract is shown.
Article | $article | Page the form is shown for |
OutputPage | $out |
Implements MediaWiki\Hook\ProtectionForm__showLogExtractHook.
Definition at line 3162 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onRandomPageQuery | ( | & | $tables, |
& | $conds, | ||
& | $joinConds ) |
Use this hook to modify the query used by Special:Random to select random pages.
array | &$tables | Database tables to be used in the query |
array | &$conds | Conditions to be applied in the query |
array | &$joinConds | Join conditions to be applied in the query |
Implements MediaWiki\Hook\RandomPageQueryHook.
Definition at line 3169 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onRawPageViewBeforeOutput | ( | $obj, | |
& | $text ) |
This hook is called right before the text is blown out in action=raw.
RawAction | $obj | |
string | &$text | The text that's going to be the output |
Implements MediaWiki\Hook\RawPageViewBeforeOutputHook.
Definition at line 3176 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onRecentChange_save | ( | $recentChange | ) |
This hook is called at the end of RecentChange::save().
RecentChange | $recentChange |
Implements MediaWiki\Hook\RecentChange_saveHook.
Definition at line 3190 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onRecentChangesPurgeRows | ( | $rows | ) |
This hook is called when old recentchanges rows are purged, after deleting those rows but within the same transaction.
array | $rows | Deleted rows as an array of recentchanges row objects (with up to $wgUpdateRowsPerQuery items) |
Implements MediaWiki\Hook\RecentChangesPurgeRowsHook.
Definition at line 3183 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
string[] | &$redirectParams | Array of parameters preserved by redirecting special pages |
Implements MediaWiki\SpecialPage\Hook\RedirectSpecialArticleRedirectParamsHook.
Definition at line 3197 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onRejectParserCacheValue | ( | $parserOutput, | |
$wikiPage, | |||
$parserOptions ) |
Use this hook to reject an otherwise usable cached value from the Parser cache.
NOTE: CARELESS USE OF THIS HOOK CAN HAVE CATASTROPHIC CONSEQUENCES FOR HIGH-TRAFFIC INSTALLATIONS. USE WITH EXTREME CARE.
ParserOutput | $parserOutput | ParserOutput value |
WikiPage | $wikiPage | |
ParserOptions | $parserOptions |
Implements MediaWiki\Hook\RejectParserCacheValueHook.
Definition at line 3204 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onRequestContextCreateSkin | ( | $context, | |
& | $skin ) |
This hook is called when RequestContext::getSkin creates a skin instance.
Use this hook to override what skin is used in certain contexts.
IContextSource | $context | RequestContext the skin is being created for |
Skin | string | &$skin | Variable reference you may set a Skin instance or string key on to override the skin that will be used for the context |
Implements MediaWiki\Hook\RequestContextCreateSkinHook.
Definition at line 3213 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onResetPasswordExpiration | ( | $user, | |
& | $newExpire ) |
Use this hook to allow extensions to set a default password expiration.
User | $user | User having their password expiration reset |
string | &$newExpire | New expiration date |
Implements MediaWiki\Auth\Hook\ResetPasswordExpirationHook.
Definition at line 3220 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onResourceLoaderGetConfigVars | ( | array & | $vars, |
$skin, | |||
Config | $config ) |
Export static site-wide mw.config
variables to JavaScript.
Variables that depend on the current page or request state must be added through MediaWiki\Hook\MakeGlobalVariablesScriptHook instead. The skin name is made available to send skin-specific config only when needed.
This hook is called from ResourceLoaderStartUpModule.
array | &$vars | [ variable name => value ] |
string | $skin | |
Config | $config | since 1.34 |
Implements MediaWiki\ResourceLoader\Hook\ResourceLoaderGetConfigVarsHook.
Definition at line 3227 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onResourceLoaderJqueryMsgModuleMagicWords | ( | ResourceLoaderContext | $context, |
array & | $magicWords ) |
Add magic words to the mediawiki.jqueryMsg
module.
The values should be a string, and they may only vary by what's in the ResourceLoaderContext.
This hook is called from ResourceLoaderJqueryMsgModule.
ResourceLoaderContext | $context | |
string[] | &$magicWords | Associative array mapping all-caps magic word to a string value |
Implements MediaWiki\ResourceLoader\Hook\ResourceLoaderJqueryMsgModuleMagicWordsHook.
Definition at line 3235 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onRevisionDataUpdates | ( | $title, | |
$renderedRevision, | |||
& | $updates ) |
This hook is called when constructing a list of DeferrableUpdate to be executed to record secondary data about a revision.
Title | $title | Title of the page the revision belongs to |
RenderedRevision | $renderedRevision | RenderedRevision object representing the new revision and providing access to the RevisionRecord as well as ParserOutput of that revision |
DeferrableUpdate[] | &$updates | List of DeferrableUpdate that can be manipulated by the hook handler |
Implements MediaWiki\Storage\Hook\RevisionDataUpdatesHook.
Definition at line 3245 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::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.
WikiPage | $wikiPage | WikiPage edited |
RevisionRecord | $rev | New revision |
int | bool | $originalRevId | If the edit restores or repeats an earlier revision (such as a rollback or a null revision), the ID of that earlier revision. False otherwise. (Used to be called $baseID.) |
UserIdentity | $user | Editing user |
string[] | &$tags | Tags to apply to the edit and recent change. This is empty, and replacement is ignored, in the case of import or page move. |
Implements MediaWiki\Page\Hook\RevisionFromEditCompleteHook.
Definition at line 3252 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onRevisionInsertComplete | ( | $revision, | |
$data, | |||
$flags ) |
This hook is called after a revision is inserted into the database.
Revision | $revision | |
null | $data | DEPRECATED! Always null! |
null | $flags | DEPRECATED! Always null! |
Implements MediaWiki\Revision\Hook\RevisionInsertCompleteHook.
Definition at line 3259 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onRevisionRecordInserted | ( | $revisionRecord | ) |
This hook is called after a revision is inserted into the database.
RevisionRecord | $revisionRecord | RevisionRecord that has just been inserted |
Implements MediaWiki\Revision\Hook\RevisionRecordInsertedHook.
Definition at line 3266 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onRevisionUndeleted | ( | $revisionRecord, | |
$oldPageID ) |
After an article revision is restored.
RevisionRecord | $revisionRecord | the RevisionRecord that was restored |
?int | $oldPageID | the page ID of the revision when archived (may be null) |
Implements MediaWiki\Page\Hook\RevisionUndeletedHook.
Definition at line 3273 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onRollbackComplete | ( | $wikiPage, | |
$user, | |||
$revision, | |||
$current ) |
After an article rollback is completed.
WikiPage | $wikiPage | the WikiPage that was edited |
UserIdentity | $user | UserIdentity for the user who did the rollback |
RevisionRecord | $revision | RevisionRecord for the revision the page was reverted back to |
RevisionRecord | $current | RevisionRecord for the reverted revision |
Implements MediaWiki\Page\Hook\RollbackCompleteHook.
Definition at line 3280 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSearchableNamespaces | ( | & | $arr | ) |
Use this hook to modify which namespaces are searchable.
int[] | &$arr | Array of namespaces ($nsId => $name) which will be used |
Implements MediaWiki\Search\Hook\SearchableNamespacesHook.
Definition at line 3287 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSearchAfterNoDirectMatch | ( | $term, | |
& | $title ) |
This hook is called if there was no match for the exact result.
This runs before lettercase variants are attempted, whereas 'SearchGetNearMatch' runs after.
string | $term | Search term |
Title | &$title | Outparam; set to $title object and return false for a match |
Implements MediaWiki\Search\Hook\SearchAfterNoDirectMatchHook.
Definition at line 3294 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onSearchDataForIndex | ( | & | $fields, |
$handler, | |||
$page, | |||
$output, | |||
$engine ) |
Use this hook to add data to search document.
Allows you to add any data to the field map used to index the document.
array | &$fields | Array of name => value pairs for fields |
ContentHandler | $handler | ContentHandler for the content being indexed |
WikiPage | $page | WikiPage that is being indexed |
ParserOutput | $output | ParserOutput that is produced from the page |
SearchEngine | $engine | SearchEngine for which the indexing is intended |
Implements MediaWiki\Content\Hook\SearchDataForIndexHook.
Definition at line 3301 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSearchGetNearMatch | ( | $term, | |
& | $title ) |
Use this hook to perform exact-title-matches in "go" searches if nothing was found.
string | $term | Search term |
Title | &$title | Outparam; set to $title object and return false for a match |
Implements MediaWiki\Search\Hook\SearchGetNearMatchHook.
Definition at line 3310 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onSearchGetNearMatchBefore | ( | $allSearchTerms, | |
& | $titleResult ) |
Use this hook to perform exact-title-matches in "go" searches before the normal operations.
string[] | $allSearchTerms | Array of the search terms in all content languages |
Title | null | &$titleResult | Outparam; the value to return |
Implements MediaWiki\Search\Hook\SearchGetNearMatchBeforeHook.
Definition at line 3317 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSearchGetNearMatchComplete | ( | $term, | |
& | $title ) |
Use this hook to modify exact-title-matches in "go" searches.
string | $term | Search term |
Title | null | &$title | Current Title object that is being returned (null if none found) |
Implements MediaWiki\Search\Hook\SearchGetNearMatchCompleteHook.
Definition at line 3324 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onSearchIndexFields | ( | & | $fields, |
$engine ) |
Use this hook to add fields to search index mapping.
SearchIndexField[] | &$fields | Array of fields, all implement SearchIndexField |
SearchEngine | $engine | SearchEngine instance for which mapping is being built |
Implements MediaWiki\Search\Hook\SearchIndexFieldsHook.
Definition at line 3331 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSearchResultInitFromTitle | ( | $title, | |
& | $id ) |
Use this hook to set the revision used when displaying a page in search results.
Title | $title | Current title being displayed in search results |
int | bool | &$id | Revision ID (default is false, for latest) |
Implements MediaWiki\Search\Hook\SearchResultInitFromTitleHook.
Definition at line 3338 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onSearchResultProvideDescription | ( | array | $pageIdentities, |
& | $descriptions ) |
This hook is called when generating search results in order to fill the 'description' field in an extension.
array | $pageIdentities | Array (string=>SearchResultPageIdentity) where key is pageId |
array | &$descriptions | Output array (string=>string|null) where key is pageId and value is either a description for given page or null |
Implements MediaWiki\Rest\Hook\SearchResultProvideDescriptionHook.
Definition at line 3345 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSearchResultProvideThumbnail | ( | array | $pageIdentities, |
& | $thumbnails ) |
This hook is called when generating search results in order to fill the 'thumbnail' field in an extension.
array | $pageIdentities | Array (string=>SearchResultPageIdentity) where key is pageId |
array | &$thumbnails | Output array (string=>SearchResultThumbnail|null) where key is pageId and value is either a valid SearchResultThumbnail for given page or null |
Implements MediaWiki\Rest\Hook\SearchResultProvideThumbnailHook.
Definition at line 3352 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSearchResultsAugment | ( | & | $setAugmentors, |
& | $rowAugmentors ) |
Use this hook to add code to the list of search result augmentors.
ResultSetAugmentor[] | &$setAugmentors | List of whole-set augmentor objects, must implement ResultSetAugmentor |
ResultAugmentor[] | &$rowAugmentors | List of per-row augmentor objects, must implement ResultAugmentor. Note that lists should be in the format name => object and the names in both lists should be distinct. |
Implements MediaWiki\Search\Hook\SearchResultsAugmentHook.
Definition at line 3359 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSecondaryDataUpdates | ( | $title, | |
$oldContent, | |||
$recursive, | |||
$parserOutput, | |||
& | $updates ) |
Use this hook to modify the list of DataUpdates to perform when page content is modified.
Title | $title | Title of the page that is being edited |
Content | $oldContent | Page content before the edit |
bool | $recursive | Whether DataUpdates should trigger recursive updates (relevant mostly for LinksUpdate) |
ParserOutput | $parserOutput | Rendered version of the page after the edit |
DataUpdate[] | &$updates | List of DataUpdate objects, to be modified or replaced by the hook handler |
Implements MediaWiki\Content\Hook\SecondaryDataUpdatesHook.
Definition at line 3366 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onSecuritySensitiveOperationStatus | ( | & | $status, |
$operation, | |||
$session, | |||
$timeSinceAuth ) |
Use this hook to affect the return value from MediaWiki\Auth\AuthManager::securitySensitiveOperationStatus().
string | &$status | Status to be returned. One of the AuthManager::SEC_* constants. SEC_REAUTH will be automatically changed to SEC_FAIL if authentication isn't possible for the current session type. |
string | $operation | Operation being checked |
Session | $session | Current session. The currently-authenticated user may be retrieved as $session->getUser(). |
int | $timeSinceAuth | Time since last authentication. PHP_INT_MAX if the time of last auth is unknown, or -1 if authentication is not possible. |
Implements MediaWiki\Auth\Hook\SecuritySensitiveOperationStatusHook.
Definition at line 3375 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
Title | $nt | |
string | &$html | HTML to display for the link |
string | &$trail | Optional text to display before $html |
string | &$prefix | Optional text to display after $html |
string | &$ret | Value to return if your hook returns false |
Implements MediaWiki\Hook\SelfLinkBeginHook.
Definition at line 3384 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSendWatchlistEmailNotification | ( | $targetUser, | |
$title, | |||
$enotif ) |
Use this hook to cancel watchlist email notifications (enotifwatchlist) for an edit.
User | $targetUser | User whom to send watchlist email notification |
Title | $title | Page title |
EmailNotification | $enotif |
Implements MediaWiki\Hook\SendWatchlistEmailNotificationHook.
Definition at line 3391 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onSessionCheckInfo | ( | & | $reason, |
$info, | |||
$request, | |||
$metadata, | |||
$data ) |
Use this hook to validate a MediaWiki\Session\SessionInfo as it's being loaded from storage.
string | &$reason | Rejection reason to be logged |
SessionInfo | $info | MediaWiki\Session\SessionInfo being validated |
WebRequest | $request | WebRequest being loaded from |
array | bool | $metadata | Metadata array for the MediaWiki\Session\Session |
array | bool | $data | Data array for the MediaWiki\Session\Session |
Implements MediaWiki\Session\Hook\SessionCheckInfoHook.
Definition at line 3398 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSessionMetadata | ( | $backend, | |
& | $metadata, | ||
$requests ) |
Use this hook to add metadata to a session being saved.
SessionBackend | $backend | MediaWiki\Session\SessionBackend being saved |
array | &$metadata | Metadata to be stored. Add new keys here. |
WebRequest[] | $requests | Array of WebRequests potentially being saved to. Generally 0-1 real request and 0+ FauxRequests. |
Implements MediaWiki\Session\Hook\SessionMetadataHook.
Definition at line 3407 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSetupAfterCache | ( | ) |
This hook is called in Setup.php, after cache objects are set.
Implements MediaWiki\Hook\SetupAfterCacheHook.
Definition at line 3414 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onShortPagesQuery | ( | & | $tables, |
& | $conds, | ||
& | $joinConds, | ||
& | $options ) |
Use this hook to modify the query used by Special:ShortPages.
array | &$tables | tables to join in the query |
array | &$conds | conditions for the query |
array | &$joinConds | join conditions for the query |
array | &$options | options for the query |
Implements MediaWiki\Hook\ShortPagesQueryHook.
Definition at line 3421 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onShowMissingArticle | ( | $article | ) |
This hook is called when generating the output for a non-existent page.
Implements MediaWiki\Page\Hook\ShowMissingArticleHook.
Definition at line 3428 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onShowSearchHit | ( | $searchPage, | |
$result, | |||
$terms, | |||
& | $link, | ||
& | $redirect, | ||
& | $section, | ||
& | $extract, | ||
& | $score, | ||
& | $size, | ||
& | $date, | ||
& | $related, | ||
& | $html ) |
Use this hook to customize display of search hit.
SpecialSearch | $searchPage | |
SearchResult | $result | SearchResult to show |
string[] | $terms | Search terms, for highlighting (unreliable as search engine dependent) |
string | &$link | HTML of link to the matching page. May be modified. |
string | &$redirect | HTML of redirect info. May be modified. |
string | &$section | HTML of matching section. May be modified. |
string | &$extract | HTML of content extract. May be modified. |
string | &$score | HTML of score. May be modified. |
string | &$size | HTML of page size. May be modified. |
string | &$date | HTML of of page modification date. May be modified. |
string | &$related | HTML of additional info for the matching page. May be modified. |
string | &$html | May be set to the full HTML that should be used to represent the search hit. Must include the <li> ... </li> tags. Will only be used if the hook function returned false. |
Implements MediaWiki\Search\Hook\ShowSearchHitHook.
Definition at line 3435 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onShowSearchHitTitle | ( | & | $title, |
& | $titleSnippet, | ||
$result, | |||
$terms, | |||
$specialSearch, | |||
& | $query, | ||
& | $attributes ) |
Use this hook to customise display of search hit title/link.
Title | &$title | Title to link to |
string | HtmlArmor | null | &$titleSnippet | Label for the link representing the search result. Typically the article title. |
SearchResult | $result | |
array | $terms | Array of search terms extracted by SearchDatabase search engines (may not be populated by other search engines) |
SpecialSearch | $specialSearch | |
string[] | &$query | Array of query string parameters for the link representing the search result |
string[] | &$attributes | Array of title link attributes, can be modified by extension |
Implements MediaWiki\Search\Hook\ShowSearchHitTitleHook.
Definition at line 3445 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onSidebarBeforeOutput | ( | $skin, | |
& | $sidebar ) |
Use this hook to edit the sidebar just before it is output by skins.
Warning: This hook is run on each display. You should consider using 'SkinBuildSidebar', which is aggressively cached.
Skin | $skin | |
array | &$sidebar | Sidebar content. Modify $sidebar to add or modify sidebar portlets. |
Implements MediaWiki\Hook\SidebarBeforeOutputHook.
Definition at line 3455 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSiteNoticeAfter | ( | & | $siteNotice, |
$skin ) |
This hook is called after the sitenotice/anonnotice is composed.
string | &$siteNotice | HTML sitenotice. Alter the contents of $siteNotice to add to/alter the sitenotice/anonnotice. |
Skin | $skin |
Implements MediaWiki\Hook\SiteNoticeAfterHook.
Definition at line 3463 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSiteNoticeBefore | ( | & | $siteNotice, |
$skin ) |
This hook is called before the sitenotice/anonnotice is composed.
string | &$siteNotice | HTML returned as the sitenotice |
Skin | $skin |
Implements MediaWiki\Hook\SiteNoticeBeforeHook.
Definition at line 3470 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSkinAddFooterLinks | ( | Skin | $skin, |
string | $key, | ||
array & | $footerItems ) |
This hook is called when generating the code used to display the footer.
Skins
Skin | $skin | |
string | $key | the current key for the current group (row) of footer links. e.g. info or places . |
array | &$footerItems | an empty array that can be populated with new links. keys should be strings and will be used for generating the ID of the footer item and value should be an HTML string. |
Implements MediaWiki\Hook\SkinAddFooterLinksHook.
Definition at line 3487 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSkinAfterBottomScripts | ( | $skin, | |
& | $text ) |
This hook is called at the end of Skin::bottomScripts().
Skin | $skin | |
string | &$text | BottomScripts text. Append to $text to add additional text/scripts after the stock bottom scripts. |
Implements MediaWiki\Hook\SkinAfterBottomScriptsHook.
Definition at line 3494 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSkinAfterContent | ( | & | $data, |
$skin ) |
Use this hook to add text after the page content and article metadata.
This hook should work in all skins. Set the &$data variable to the text you're going to add.
string | &$data | Text to be printed out directly (without parsing) |
Skin | $skin |
Implements MediaWiki\Hook\SkinAfterContentHook.
Definition at line 3501 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSkinAfterPortlet | ( | $skin, | |
$portletName, | |||
& | $html ) |
This hook is called when generating portlets.
It allows injecting custom HTML after the portlet.
Skin | $skin | |
string | $portletName | |
string | &$html |
Implements MediaWiki\Skins\Hook\SkinAfterPortletHook.
Definition at line 3508 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSkinBuildSidebar | ( | $skin, | |
& | $bar ) |
This hook is called at the end of Skin::buildSidebar().
Skin | $skin | |
array | &$bar | Sidebar contents. Modify $bar to add or modify sidebar portlets. |
Implements MediaWiki\Hook\SkinBuildSidebarHook.
Definition at line 3515 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSkinCopyrightFooter | ( | $title, | |
$type, | |||
& | $msg, | ||
& | $link ) |
Use this hook for site and per-namespace customization of the copyright notice.
Title | $title | Displayed page title |
string | $type | Set to 'normal' or 'history' for old/diff views |
string | &$msg | Overridable message, usually 'copyright' or 'history_copyright'. This message must be in HTML format, not wikitext! |
string | &$link | Overridable HTML link to be passed into the message as $1 |
Implements MediaWiki\Hook\SkinCopyrightFooterHook.
Definition at line 3522 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSkinEditSectionLinks | ( | $skin, | |
$title, | |||
$section, | |||
$tooltip, | |||
& | $result, | ||
$lang ) |
Use this hook to modify section edit links.
Skin | $skin | Skin object rendering the UI |
Title | $title | Title being linked to (may not be the same as the page title, if the section is included from a template) |
string | $section | Designation of the section being pointed to, to be included in the link, like "§ion=$section" |
string | $tooltip | Default tooltip. Escape before using. By default, this is wrapped in the 'editsectionhint' message. |
array | &$result | Array containing all link detail arrays. Each link detail array should contain the following keys:
|
Language | $lang | Language to use for the link in the wfMessage function |
Implements MediaWiki\Hook\SkinEditSectionLinksHook.
Definition at line 3529 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSkinGetPoweredBy | ( | & | $text, |
$skin ) |
This hook is called when generating the code used to display the "Powered by MediaWiki" icon.
string | &$text | Additional 'powered by' icons in HTML. Note: Modern skin does not use the MediaWiki icon but plain text instead. |
Skin | $skin |
Implements MediaWiki\Hook\SkinGetPoweredByHook.
Definition at line 3538 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSkinPageReadyConfig | ( | ResourceLoaderContext | $context, |
array & | $config ) |
Allows skins to change the mediawiki.page.ready
module configuration.
ResourceLoaderContext | $context | |
mixed[] | &$config | Associative array of configurable options |
Implements MediaWiki\Skins\Hook\SkinPageReadyConfigHook.
Definition at line 3477 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSkinPreloadExistence | ( | & | $titles, |
$skin ) |
Use this hook to supply titles that should be added to link existence cache before the page is rendered.
Implements MediaWiki\Hook\SkinPreloadExistenceHook.
Definition at line 3545 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSkinSubPageSubtitle | ( | & | $subpages, |
$skin, | |||
$out ) |
This hook is called at the beginning of Skin::subPageSubtitle().
string | &$subpages | Subpage links HTML |
Skin | $skin | |
OutputPage | $out |
Implements MediaWiki\Hook\SkinSubPageSubtitleHook.
Definition at line 3552 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSkinTemplateBuildNavUrlsNav_urlsAfterPermalink | ( | $sktemplate, | |
& | $nav_urls, | ||
& | $revid, | ||
& | $revid2 ) |
This hook is called after creating the "permanent link" tab.
SkinTemplate | $sktemplate | |
array | &$nav_urls | Array of tabs |
int | &$revid | Revision ID of the permanent link |
int | &$revid2 | Revision ID of the permanent link, second time |
Implements MediaWiki\Hook\SkinTemplateBuildNavUrlsNav_urlsAfterPermalinkHook.
Definition at line 3559 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSkinTemplateGetLanguageLink | ( | & | $languageLink, |
$languageLinkTitle, | |||
$title, | |||
$outputPage ) |
This hook is called after building the data for a language link from which the actual html is constructed.
array | &$languageLink | Array containing data about the link. The following keys can be modified: href, text, title, class, lang, hreflang. Each of them is a string. |
Title | $languageLinkTitle | Title object belonging to the external language link |
Title | $title | Title object of the page the link belongs to |
OutputPage | $outputPage | OutputPage object the links are built from |
Implements MediaWiki\Hook\SkinTemplateGetLanguageLinkHook.
Definition at line 3568 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onSkinTemplateNavigation | ( | $sktemplate, | |
& | $links ) |
This hook is called on content pages after the tabs have been added, but before variants have been added.
SkinTemplate | $sktemplate | |
array | &$links | Structured navigation links. This is used to alter the navigation for skins which use buildNavigationUrls such as Vector. |
Implements MediaWiki\Hook\SkinTemplateNavigationHook.
Definition at line 3577 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSkinTemplateNavigation__SpecialPage | ( | $sktemplate, | |
& | $links ) |
This hook is called on special pages after the special tab is added but before variants have been added.
SkinTemplate | $sktemplate | |
array | &$links | Structured navigation links. This is used to alter the navigation for skins which use buildNavigationUrls such as Vector. |
Implements MediaWiki\Hook\SkinTemplateNavigation__SpecialPageHook.
Definition at line 3585 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSkinTemplateNavigation__Universal | ( | $sktemplate, | |
& | $links ) |
This hook is called on both content and special pages after variants have been added.
SkinTemplate | $sktemplate | |
array | &$links | Structured navigation links. This is used to alter the navigation for skins which use buildNavigationUrls such as Vector. |
Implements MediaWiki\Hook\SkinTemplateNavigation__UniversalHook.
Definition at line 3593 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSkinTemplateOutputPageBeforeExec | ( | $sktemplate, | |
$tpl ) |
This hook is called before SkinTemplate::outputPage() starts page output.
SkinTemplate | $sktemplate | |
QuickTemplate | $tpl | QuickTemplate engine object |
Implements MediaWiki\Hook\SkinTemplateOutputPageBeforeExecHook.
Definition at line 3601 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSkinTemplatePreventOtherActiveTabs | ( | $sktemplate, | |
& | $res ) |
Use this hook to prevent showing active tabs.
SkinTemplate | $sktemplate | |
bool | &$res | Set to true to prevent active tabs |
Implements MediaWiki\Hook\SkinTemplatePreventOtherActiveTabsHook.
Definition at line 3608 of file HookRunner.php.
References $res.
MediaWiki\HookContainer\HookRunner::onSkinTemplateTabAction | ( | $sktemplate, | |
$title, | |||
$message, | |||
$selected, | |||
$checkEdit, | |||
& | $classes, | ||
& | $query, | ||
& | $text, | ||
& | $result ) |
Use this hook to override SkinTemplate::tabAction().
You can either create your own array, or alter the parameters for the normal one.
SkinTemplate | $sktemplate | |
Title | $title | |
string | $message | Visible label of tab |
bool | $selected | Whether this is a selected tab |
bool | $checkEdit | Whether or not the action=edit query should be added if appropriate |
string[] | &$classes | Array of CSS classes to apply |
string | &$query | Query string to add to link |
string | &$text | Link text |
array | &$result | Complete associative array if you want to return true |
Implements MediaWiki\Hook\SkinTemplateTabActionHook.
Definition at line 3615 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onSkinTemplateToolboxEnd | ( | $sk, | |
$dummy ) |
This hook is called by SkinTemplate skins after toolbox links have been rendered (useful for adding more).
QuickTemplate | $sk | QuickTemplate based skin template running the hook |
bool | $dummy | Called when SkinTemplateToolboxEnd is used from a BaseTemplate skin, extensions that add support for BaseTemplateToolbox should watch for this dummy parameter with "$dummy=false" in their code and return without echoing any HTML to avoid creating duplicate toolbox items. |
Implements MediaWiki\Hook\SkinTemplateToolboxEndHook.
Definition at line 3625 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSoftwareInfo | ( | & | $software | ) |
This hook is called by Special:Version for returning information about the software.
array | &$software | The array of software in format 'name' => 'version'. See SpecialVersion::softwareInformation(). |
Implements MediaWiki\Hook\SoftwareInfoHook.
Definition at line 3632 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialBlockModifyFormFields | ( | $sp, | |
& | $fields ) |
Use this hook to add more fields to Special:Block.
SpecialBlock | $sp | SpecialPage object, for context |
array | &$fields | Current HTMLForm fields |
Implements MediaWiki\Hook\SpecialBlockModifyFormFieldsHook.
Definition at line 3639 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialContributions__formatRow__flags | ( | $context, | |
$row, | |||
& | $flags ) |
This hook is called before rendering a Special:Contributions row.
IContextSource | $context | IContextSource object |
stdClass | $row | Revision information from the database |
string[] | &$flags | HTML fragments describing flags for this row |
Implements MediaWiki\Hook\SpecialContributions__formatRow__flagsHook.
Definition at line 3653 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialContributions__getForm__filters | ( | $sp, | |
& | $filters ) |
This hook is called with a list of filters to render on Special:Contributions.
SpecialContributions | $sp | SpecialContributions object, for context |
array | &$filters | List of filter object definitions (compatible with OOUI form) |
Implements MediaWiki\Hook\SpecialContributions__getForm__filtersHook.
Definition at line 3662 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialContributionsBeforeMainOutput | ( | $id, | |
$user, | |||
$sp ) |
This hook is called before the form on Special:Contributions.
int | $id | User id number, only provided for backwards-compatibility |
User | $user | User object representing user contributions are being fetched for |
SpecialContributions | $sp | SpecialPage instance, providing context |
Implements MediaWiki\Hook\SpecialContributionsBeforeMainOutputHook.
Definition at line 3646 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialListusersDefaultQuery | ( | $pager, | |
& | $query ) |
This hook is called right before the end of UsersPager::getDefaultQuery().
UsersPager | $pager | The UsersPager instance |
array | &$query | The query array to be returned |
Implements MediaWiki\Hook\SpecialListusersDefaultQueryHook.
Definition at line 3669 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialListusersFormatRow | ( | & | $item, |
$row ) |
This hook is called right before the end of UsersPager::formatRow().
string | &$item | HTML to be returned. Will be wrapped in an after the hook finishes |
stdClass | $row | Database row object |
Implements MediaWiki\Hook\SpecialListusersFormatRowHook.
Definition at line 3676 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialListusersHeader | ( | $pager, | |
& | $out ) |
This hook is called after adding the submit button in UsersPager::getPageHeader().
UsersPager | $pager | The UsersPager instance |
string | &$out | The header HTML |
Implements MediaWiki\Hook\SpecialListusersHeaderHook.
Definition at line 3683 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialListusersHeaderForm | ( | $pager, | |
& | $out ) |
This hook is called before adding the submit button in UsersPager::getPageHeader().
UsersPager | $pager | The UsersPager instance |
string | &$out | The header HTML |
Implements MediaWiki\Hook\SpecialListusersHeaderFormHook.
Definition at line 3690 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialListusersQueryInfo | ( | $pager, | |
& | $query ) |
This hook is called right before the end of UsersPager::getQueryInfo()
UsersPager | $pager | The UsersPager instance |
array | &$query | The query array to be returned |
Implements MediaWiki\Hook\SpecialListusersQueryInfoHook.
Definition at line 3697 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialLogAddLogSearchRelations | ( | $type, | |
$request, | |||
& | $qc ) |
Use this hook to add log relations to the current log.
string | $type | String of the log type |
WebRequest | $request | WebRequest object for getting the value provided by the current user |
array | &$qc | Array for query conditions to add |
Implements MediaWiki\Hook\SpecialLogAddLogSearchRelationsHook.
Definition at line 3704 of file HookRunner.php.
References $type.
MediaWiki\HookContainer\HookRunner::onSpecialMovepageAfterMove | ( | $movePage, | |
$oldTitle, | |||
$newTitle ) |
This hook is called after moving a page.
MovePageForm | $movePage | MovePageForm object |
Title | $oldTitle | Old title |
Title | $newTitle | New title |
Implements MediaWiki\Hook\SpecialMovepageAfterMoveHook.
Definition at line 3711 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialMuteModifyFormFields | ( | $sp, | |
& | $fields ) |
Use this hook to add more fields to Special:Mute.
SpecialMute | $sp | SpecialPage object, for context |
array | &$fields | Current HTMLForm fields descriptors |
Implements MediaWiki\Hook\SpecialMuteModifyFormFieldsHook.
Definition at line 3718 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialMuteSubmit | ( | $data | ) |
This hook is called at the end of SpecialMute::onSubmit.
array | $data | Array containing information about submitted options on SpecialMute form |
Implements MediaWiki\Hook\SpecialMuteSubmitHook.
Definition at line 3725 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialNewpagesConditions | ( | $special, | |
$opts, | |||
& | $conds, | ||
& | $tables, | ||
& | $fields, | ||
& | $join_conds ) |
This hook is called when building the SQL query for Special:NewPages.
NewPagesPager | $special | NewPagesPager object (subclass of ReverseChronologicalPager) |
FormOptions | $opts | FormOptions object containing special page options |
array | &$conds | array of WHERE conditionals for query |
array | &$tables | array of tables to be queried |
array | &$fields | array of columns to select |
array | &$join_conds | join conditions for the tables |
Implements MediaWiki\Hook\SpecialNewpagesConditionsHook.
Definition at line 3732 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialNewPagesFilters | ( | $special, | |
& | $filters ) |
This hook is called after building form options at NewPages.
SpecialNewPages | $special | The special page object |
array | &$filters | Associative array of filter definitions. The keys are the HTML name/URL parameters. Each key maps to an associative array with a 'msg' (message key) and a 'default' value. |
Implements MediaWiki\Hook\SpecialNewPagesFiltersHook.
Definition at line 3741 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialPage_initList | ( | & | $list | ) |
This hook is called when setting up SpecialPageFactory::$list.
Use this hook to remove a core special page or conditionally register special pages.
array | &$list | List of core special pages |
Implements MediaWiki\SpecialPage\Hook\SpecialPage_initListHook.
Definition at line 3769 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialPageAfterExecute | ( | $special, | |
$subPage ) |
This hook is called after SpecialPage::execute.
SpecialPage | $special | |
string | null | $subPage | Subpage string, or null if no subpage was specified |
Implements MediaWiki\SpecialPage\Hook\SpecialPageAfterExecuteHook.
Definition at line 3748 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialPageBeforeExecute | ( | $special, | |
$subPage ) |
This hook is called before SpecialPage::execute.
SpecialPage | $special | |
string | null | $subPage | Subpage string, or null if no subpage was specified |
Implements MediaWiki\SpecialPage\Hook\SpecialPageBeforeExecuteHook.
Definition at line 3755 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialPageBeforeFormDisplay | ( | $name, | |
$form ) |
This hook is called before executing the HTMLForm object.
string | $name | Name of the special page |
HTMLForm | $form |
Implements MediaWiki\SpecialPage\Hook\SpecialPageBeforeFormDisplayHook.
Definition at line 3762 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialPasswordResetOnSubmit | ( | & | $users, |
$data, | |||
& | $error ) |
This hook is called when executing a form submission on Special:PasswordReset.
User[] | &$users | Array of User objects. |
array | $data | Array of data submitted by the user |
string | array | MessageSpecifier | &$error | String, error code (message key) used to describe to error (out parameter). The hook needs to return false when setting this, otherwise it will have no effect. |
Implements MediaWiki\User\Hook\SpecialPasswordResetOnSubmitHook.
Definition at line 3776 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialRandomGetRandomTitle | ( | & | $randstr, |
& | $isRedir, | ||
& | $namespaces, | ||
& | $extra, | ||
& | $title ) |
This hook is called during the execution of Special:Random,.
Use this to change some selection criteria or substitute a different title.
string | &$randstr | The random number from wfRandom() |
bool | &$isRedir | Boolean, whether to select a redirect or non-redirect |
int[] | &$namespaces | An array of namespace indexes to get the title from |
array | &$extra | An array of extra SQL statements |
Title | &$title | If the hook returns false, a Title object to use instead of the result from the normal query |
Implements MediaWiki\Hook\SpecialRandomGetRandomTitleHook.
Definition at line 3783 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onSpecialRecentChangesPanel | ( | & | $extraOpts, |
$opts ) |
This hook is called when building form options in SpecialRecentChanges.
array | &$extraOpts | Array of added items, to which can be added |
FormOptions | $opts | FormOptions for this request |
Implements MediaWiki\Hook\SpecialRecentChangesPanelHook.
Definition at line 3792 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialResetTokensTokens | ( | & | $tokens | ) |
This hook is called when building token list for SpecialResetTokens.
array | &$tokens | array of token information arrays in the format of [ 'preference' => '<preference-name>', 'label-message' => '<message-key>', ] |
Implements MediaWiki\Hook\SpecialResetTokensTokensHook.
Definition at line 3799 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialSearchCreateLink | ( | $t, | |
& | $params ) |
This hook is called when making the message to create a page or go to the existing page.
Title | $t | Title object searched for |
array | &$params | An array of the default message name and page title (as parameter) |
Implements MediaWiki\Hook\SpecialSearchCreateLinkHook.
Definition at line 3806 of file HookRunner.php.
References $t.
MediaWiki\HookContainer\HookRunner::onSpecialSearchGoResult | ( | $term, | |
$title, | |||
& | $url ) |
Use this hook to alter the behaviour of the 'go' feature when searching.
If a hook returns false the 'go' feature will be canceled and a normal search will be performed. Returning true without setting $url does a standard redirect to $title. Setting $url redirects to the specified URL.
string | $term | The string the user searched for |
Title | $title | The title the 'go' feature has decided to forward the user to |
string | null | &$url | Initially null, hook subscribers can set this to specify the final url to redirect to |
Implements MediaWiki\Hook\SpecialSearchGoResultHook.
Definition at line 3813 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onSpecialSearchNogomatch | ( | & | $title | ) |
This hook is called when the 'Go' feature is triggered and the target doesn't exist.
This generally comes from autocomplete search other than the main bar on Special:Search. Full text search results are generated after this hook is called.
Implements MediaWiki\Hook\SpecialSearchNogomatchHook.
Definition at line 3820 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onSpecialSearchPowerBox | ( | & | $showSections, |
$term, | |||
& | $opts ) |
Use this hook to modify advanced search profile forms.
This hook is equivalent to SpecialSearchProfileForm for the advanced form, also know as power search box.
string[] | &$showSections | Array to add values with more options to |
string | $term | Search term (not a title object) |
string[] | &$opts | Array of hidden options (containing 'redirs' and 'profile') |
Implements MediaWiki\Search\Hook\SpecialSearchPowerBoxHook.
Definition at line 3827 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialSearchProfileForm | ( | $search, | |
& | $form, | ||
$profile, | |||
$term, | |||
$opts ) |
Use this hook to modify search profile forms.
SpecialPage | $search | |
string | &$form | Form HTML |
string | $profile | Current search profile |
string | $term | Search term |
string[] | $opts | Key => value of hidden options for inclusion in custom forms |
Implements MediaWiki\Search\Hook\SpecialSearchProfileFormHook.
Definition at line 3834 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialSearchProfiles | ( | & | $profiles | ) |
Use this hook to modify search profiles.
array | &$profiles | profiles, which can be modified. |
Implements MediaWiki\Hook\SpecialSearchProfilesHook.
Definition at line 3843 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialSearchResults | ( | $term, | |
& | $titleMatches, | ||
& | $textMatches ) |
This hook is called before search result display.
string | $term | Search term |
?ISearchResultSet | &$titleMatches | Empty or ISearchResultSet object |
?ISearchResultSet | &$textMatches | Empty or ISearchResultSet object |
Implements MediaWiki\Hook\SpecialSearchResultsHook.
Definition at line 3850 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialSearchResultsAppend | ( | $specialSearch, | |
$output, | |||
$term ) |
This hook is called immediately before returning HTML on the search results page.
Useful for including a feedback link.
SpecialSearch | $specialSearch | SpecialSearch object ($this) |
OutputPage | $output | $wgOut |
string | $term | Search term specified by the user |
Implements MediaWiki\Hook\SpecialSearchResultsAppendHook.
Definition at line 3857 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialSearchResultsPrepend | ( | $specialSearch, | |
$output, | |||
$term ) |
This hook is called immediately before returning HTML on the search results page.
Useful for including an external search provider. To disable the output of MediaWiki search output, return false.
SpecialSearch | $specialSearch | SpecialSearch object ($this) |
OutputPage | $output | $wgOut |
string | $term | Search term specified by the user |
Implements MediaWiki\Hook\SpecialSearchResultsPrependHook.
Definition at line 3864 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialSearchSetupEngine | ( | $search, | |
$profile, | |||
$engine ) |
Use this hook for passing custom data to the search engine.
SpecialSearch | $search | |
string | $profile | Current search profile |
SearchEngine | $engine |
Implements MediaWiki\Hook\SpecialSearchSetupEngineHook.
Definition at line 3871 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialStatsAddExtra | ( | & | $extraStats, |
$context ) |
Use this hook to add extra statistics at the end of Special:Statistics.
array | &$extraStats | Array to save the new stats $extraStats['<name of statistic>'] => |
;
can be an array with the keys "name" and "number": "name" is the HTML to be displayed in the name column "number" is the number to be displayed. or,
can be the number to be displayed and <name> is the message key to use in the name column,
IContextSource | $context | IContextSource object |
Implements MediaWiki\Hook\SpecialStatsAddExtraHook.
Definition at line 3878 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialTrackingCategories__generateCatLink | ( | $specialPage, | |
$catTitle, | |||
& | $html ) |
This hook is called for each category link on Special:TrackingCategories.
SpecialTrackingCategories | $specialPage | The SpecialTrackingCategories object |
Title | $catTitle | The Title object of the linked category |
string | &$html | The Result html |
Implements MediaWiki\Hook\SpecialTrackingCategories__generateCatLinkHook.
Definition at line 3885 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialTrackingCategories__preprocess | ( | $specialPage, | |
$trackingCategories ) |
This hook is called after LinkBatch on Special:TrackingCategories.
SpecialTrackingCategories | $specialPage | The SpecialTrackingCategories object |
array | $trackingCategories | Array of data from Special:TrackingCategories with msg and cats |
Implements MediaWiki\Hook\SpecialTrackingCategories__preprocessHook.
Definition at line 3894 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialUploadComplete | ( | $form | ) |
This hook is called after successfully uploading a file from Special:Upload.
SpecialUpload | $form | The SpecialUpload object |
Implements MediaWiki\Hook\SpecialUploadCompleteHook.
Definition at line 3903 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialVersionVersionUrl | ( | $version, | |
& | $versionUrl ) |
This hook is called when building the URL for Special:Version.
string | $version | Current MediaWiki version |
string | &$versionUrl | Raw url to link to (eg: release notes) |
Implements MediaWiki\Hook\SpecialVersionVersionUrlHook.
Definition at line 3910 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onSpecialWatchlistGetNonRevisionTypes | ( | & | $nonRevisionTypes | ) |
This hook is called when building the SQL query for SpecialWatchlist.
It allows extensions to register custom values they have inserted to rc_type so they can be returned as part of the watchlist.
int[] | &$nonRevisionTypes | Array of values in the rc_type field of the recentchanges table |
Implements MediaWiki\Hook\SpecialWatchlistGetNonRevisionTypesHook.
Definition at line 3917 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
Use this hook to alter page view behavior radically to abort that redirect or handle it manually.
WebRequest | $request | |
Title | $title | Title of the currently found Title object |
OutputPage | $output |
Implements MediaWiki\Hook\TestCanonicalRedirectHook.
Definition at line 3924 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onThumbnailBeforeProduceHTML | ( | $thumbnail, | |
& | $attribs, | ||
& | $linkAttribs ) |
This hook is called before an image HTML is about to be rendered (by ThumbnailImage:toHtml method).
ThumbnailImage | $thumbnail | |
string[] | &$attribs | Image attribute array |
string[] | &$linkAttribs | Image link attribute array |
Implements MediaWiki\Hook\ThumbnailBeforeProduceHTMLHook.
Definition at line 3931 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onTitleArrayFromResult | ( | & | $titleArray, |
$res ) |
This hook is called when creating a TitleArray object from a database result.
TitleArray | &$titleArray | Set this to an object to override the default object returned |
IResultWrapper | $res | Database result used to create the object |
Implements MediaWiki\Hook\TitleArrayFromResultHook.
Definition at line 3940 of file HookRunner.php.
References $res.
MediaWiki\HookContainer\HookRunner::onTitleExists | ( | $title, | |
& | $exists ) |
This hook is called when determining whether a page exists at a given title.
Implements MediaWiki\Hook\TitleExistsHook.
Definition at line 3947 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onTitleGetEditNotices | ( | $title, | |
$oldid, | |||
& | $notices ) |
Use this hook to add edit notices.
Title | $title | Title object for the page the edit notices are for |
int | $oldid | Revision ID that the edit notices are for (or 0 for latest) |
array | &$notices | Array of notices. Keys are i18n message keys, values are parseAsBlock()ed messages. |
Implements MediaWiki\Hook\TitleGetEditNoticesHook.
Definition at line 3954 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onTitleGetRestrictionTypes | ( | $title, | |
& | $types ) |
Use this hook to modify the types of protection that can be applied.
Implements MediaWiki\Hook\TitleGetRestrictionTypesHook.
Definition at line 3961 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onTitleIsAlwaysKnown | ( | $title, | |
& | $isKnown ) |
This hook is called when determining if a page exists.
Use this hook to override default behavior for determining if a page exists. If $isKnown is kept as null, regular checks happen. If it's a boolean, this value is returned by the isKnown method.
Title | $title | Title object that is being checked |
bool | null | &$isKnown | Whether MediaWiki currently thinks this page is known |
Implements MediaWiki\Hook\TitleIsAlwaysKnownHook.
Definition at line 3968 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onTitleIsMovable | ( | $title, | |
& | $result ) |
This hook is called when determining if it is possible to move a page.
Note that this hook is not called for interwiki pages or pages in immovable namespaces: for these, isMovable() always returns false.
Title | $title | Title object that is being checked |
bool | &$result | Whether MediaWiki currently thinks this page is movable. Hooks may change this value to override the return value of Title::isMovable(). |
Implements MediaWiki\Hook\TitleIsMovableHook.
Definition at line 3975 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onTitleMove | ( | $old, | |
$nt, | |||
$user, | |||
$reason, | |||
& | $status ) |
This hook is called before moving an article (title).
Title | $old | Old title |
Title | $nt | New title |
User | $user | User who does the move |
string | $reason | Reason provided by the user |
Status | &$status | To abort the move, add a fatal error to this object (i.e. call $status->fatal()) |
Implements MediaWiki\Hook\TitleMoveHook.
Definition at line 3982 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onTitleMoveComplete | ( | $old, | |
$nt, | |||
$user, | |||
$pageid, | |||
$redirid, | |||
$reason, | |||
$revision ) |
This hook is called after moving an article (title), post-commit.
Title | $old | Old title |
Title | $nt | New title |
User | $user | User who did the move |
int | $pageid | Database ID of the page that's been moved |
int | $redirid | Database ID of the created redirect |
string | $reason | Reason for the move |
Revision | $revision | Revision created by the move |
Implements MediaWiki\Hook\TitleMoveCompleteHook.
Definition at line 3989 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onTitleMoveCompleting | ( | $old, | |
$nt, | |||
$user, | |||
$pageid, | |||
$redirid, | |||
$reason, | |||
$revision ) |
This hook is called after moving an article (title), pre-commit.
Title | $old | Old title |
Title | $nt | New title |
User | $user | User who did the move |
int | $pageid | Database ID of the page that's been moved |
int | $redirid | Database ID of the created redirect |
string | $reason | Reason for the move |
Revision | $revision | Revision created by the move |
Implements MediaWiki\Hook\TitleMoveCompletingHook.
Definition at line 3998 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onTitleMoveStarting | ( | $old, | |
$nt, | |||
$user ) |
This hook is called before moving an article (title), but just after the atomic DB section starts.
Implements MediaWiki\Hook\TitleMoveStartingHook.
Definition at line 4007 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onTitleQuickPermissions | ( | $title, | |
$user, | |||
$action, | |||
& | $errors, | ||
$doExpensiveQueries, | |||
$short ) |
This hook is called from Title::checkQuickPermissions to add to or override the quick permissions check.
Title | $title | Title being accessed |
User | $user | User performing the action |
string | $action | Action being performed |
array | &$errors | Array of errors |
bool | $doExpensiveQueries | Whether to do expensive database queries |
bool | $short | Whether to return immediately on first error |
Implements MediaWiki\Permissions\Hook\TitleQuickPermissionsHook.
Definition at line 4014 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::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.
Title | $title | Title being checked against |
User | $user | Current user |
bool | &$whitelisted | Whether this title is whitelisted |
Implements MediaWiki\Permissions\Hook\TitleReadWhitelistHook.
Definition at line 4023 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onTitleSquidURLs | ( | $title, | |
& | $urls ) |
This hook is called to determine which URLs to purge from HTTP caches.
Title | $title | Title object to purge |
string[] | &$urls | Array of URLs to purge from the caches, to be manipulated |
Implements MediaWiki\Hook\TitleSquidURLsHook.
Definition at line 4030 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onUnblockUser | ( | $block, | |
$user, | |||
& | $reason ) |
This hook is called before an IP address or user is unblocked.
DatabaseBlock | $block | The Block object about to be saved |
User | $user | The user performing the unblock (not the one being unblocked) |
array | &$reason | If the hook is aborted, the error message to be returned in an array |
Implements MediaWiki\Hook\UnblockUserHook.
Definition at line 4037 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUnblockUserComplete | ( | $block, | |
$user ) |
This hook is called after an IP address or user has been unblocked.
DatabaseBlock | $block | The Block object that was saved |
User | $user | The user who performed the unblock (not the one being unblocked) |
Implements MediaWiki\Hook\UnblockUserCompleteHook.
Definition at line 4044 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUndeleteForm__showHistory | ( | & | $archive, |
$title ) |
This hook is called in UndeleteForm::showHistory, after creating the PageArchive object.
PageArchive | &$archive | PageArchive object |
Title | $title | Title object of the page that we're viewing |
Implements MediaWiki\Hook\UndeleteForm__showHistoryHook.
Definition at line 4051 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onUndeleteForm__showRevision | ( | & | $archive, |
$title ) |
This hook is called in UndeleteForm::showRevision, after creating a PageArchive object.
PageArchive | &$archive | PageArchive object |
Title | $title | Title object of the page that we're viewing |
Implements MediaWiki\Hook\UndeleteForm__showRevisionHook.
Definition at line 4058 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onUndeleteForm__undelete | ( | & | $archive, |
$title ) |
This hook is called in UndeleteForm::undelete, after checks are conducted.
Called after checking that the site is not in read-only mode, that the Title object is not null and after a PageArchive object has been constructed but before performing any further processing.
PageArchive | &$archive | |
Title | $title | The title of the page that we're about to undelete |
Implements MediaWiki\Hook\UndeleteForm__undeleteHook.
Definition at line 4065 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onUndeletePageToolLinks | ( | $context, | |
$linkRenderer, | |||
& | $links ) |
Use this hook to add one or more links to edit page subtitle when a page has been previously deleted.
IContextSource | $context | |
LinkRenderer | $linkRenderer | |
string[] | &$links | Array of HTML strings |
Implements MediaWiki\Hook\UndeletePageToolLinksHook.
Definition at line 4072 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUndeleteShowRevision | ( | $title, | |
$rev ) |
This hook is called when showing a revision in Special:Undelete.
Implements MediaWiki\Hook\UndeleteShowRevisionHook.
Definition at line 4079 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onUnitTestsAfterDatabaseSetup | ( | $database, | |
$prefix ) |
This hook is called right after MediaWiki's test infrastructure has finished creating/duplicating core tables for unit tests.
IMaintainableDatabase | $database | Database in question |
string | $prefix | Table prefix to be used in unit tests |
Implements MediaWiki\Hook\UnitTestsAfterDatabaseSetupHook.
Definition at line 4086 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUnitTestsBeforeDatabaseTeardown | ( | ) |
This hook is called right before MediaWiki tears down its database infrastructure used for unit tests.
Implements MediaWiki\Hook\UnitTestsBeforeDatabaseTeardownHook.
Definition at line 4093 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUnitTestsList | ( | & | $paths | ) |
This hook is called when building a list of paths containing PHPUnit tests.
Since 1.24, paths pointing to a directory will be recursively scanned for test case files matching the suffix "Test.php".
array | &$paths | List of test cases and directories to search |
Implements MediaWiki\Hook\UnitTestsListHook.
Definition at line 4100 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUnwatchArticle | ( | $user, | |
$page, | |||
& | $status ) |
This hook is called before a watch is removed from an article.
User | $user | User watching |
WikiPage | $page | WikiPage object to be removed |
Status | &$status | Status object to be returned if the hook returns false |
Implements MediaWiki\Hook\UnwatchArticleHook.
Definition at line 4107 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUnwatchArticleComplete | ( | $user, | |
$page ) |
This hook is called after a watch is removed from an article.
Implements MediaWiki\Hook\UnwatchArticleCompleteHook.
Definition at line 4114 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUpdateUserMailerFormattedPageStatus | ( | & | $formattedPageStatus | ) |
This hook is called before a notification email gets sent.
string[] | &$formattedPageStatus | List of valid page states |
Implements MediaWiki\Hook\UpdateUserMailerFormattedPageStatusHook.
Definition at line 4121 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUploadComplete | ( | $uploadBase | ) |
This hook is called upon completion of a file upload.
UploadBase | $uploadBase | UploadBase (or subclass) object. File can be accessed by $uploadBase->getLocalFile(). |
Implements MediaWiki\Hook\UploadCompleteHook.
Definition at line 4128 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUploadCreateFromRequest | ( | $type, | |
& | $className ) |
This hook is called when UploadBase::createFromRequest has been called.
string | $type | Requested upload type |
string | &$className | Class name of the Upload instance to be created |
Implements MediaWiki\Hook\UploadCreateFromRequestHook.
Definition at line 4135 of file HookRunner.php.
References $type.
MediaWiki\HookContainer\HookRunner::onUploadForm_BeforeProcessing | ( | $upload | ) |
This hook is called at the beginning of processUpload().
Lets you poke at member variables like $mUploadDescription before the file is saved. Do not use this hook to break upload processing. This will return the user to a blank form with no error message; use UploadVerifyUpload or UploadVerifyFile instead.
SpecialUpload | $upload |
Implements MediaWiki\Hook\UploadForm_BeforeProcessingHook.
Definition at line 4158 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUploadForm_getInitialPageText | ( | & | $pageText, |
$msg, | |||
$config ) |
This hook is called after the initial page text for file uploads is generated.
It allows extensions to modify the initial page text.
string | &$pageText | The page text |
string[] | $msg | Array of header messages |
Config | $config |
Implements MediaWiki\Hook\UploadForm_getInitialPageTextHook.
Definition at line 4165 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUploadForm_initial | ( | $upload | ) |
This hook is called before the upload form is generated.
Extensions might set the member-variables $uploadFormTextTop and $uploadFormTextAfterSummary to inject text (HTML) either before or after the editform.
SpecialUpload | $upload |
Implements MediaWiki\Hook\UploadForm_initialHook.
Definition at line 4172 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUploadFormInitDescriptor | ( | & | $descriptor | ) |
This hook is called after the descriptor for the upload form as been assembled.
array | &$descriptor | (array) the HTMLForm descriptor |
Implements MediaWiki\Hook\UploadFormInitDescriptorHook.
Definition at line 4142 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUploadFormSourceDescriptors | ( | & | $descriptor, |
& | $radio, | ||
$selectedSourceType ) |
This hook is called after the standard source inputs have been added to the descriptor.
array | &$descriptor | The HTMLForm descriptor |
bool | &$radio | Boolean, if source type should be shown as radio button |
string | $selectedSourceType | The selected source type |
Implements MediaWiki\Hook\UploadFormSourceDescriptorsHook.
Definition at line 4149 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUploadStashFile | ( | $upload, | |
$user, | |||
$props, | |||
& | $error ) |
This hook is called before a file is stashed (uploaded to stash).
Note that code which has not been updated for MediaWiki 1.28 may not call this hook. If your extension absolutely, positively must prevent some files from being uploaded, use UploadVerifyFile or UploadVerifyUpload.
UploadBase | $upload | Instance of UploadBase with all info about the upload |
User | $user | User uploading this file |
array | null | $props | File properties, as returned by MWFileProps::getPropsFromPath(). Note this is not always guaranteed to be set, e.g. in test scenarios. Call MWFileProps::getPropsFromPath() yourself in case you need the information. |
array | MessageSpecifier | null | &$error | Output: If the file stashing should be prevented, set this to 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.) |
Implements MediaWiki\Hook\UploadStashFileHook.
Definition at line 4179 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUploadVerifyFile | ( | $upload, | |
$mime, | |||
& | $error ) |
Use this hook to perform extra file verification, based on MIME type, etc.
UploadBase | $upload | Instance of UploadBase, with all info about the upload |
string | $mime | Uploaded file's MIME type, as detected by MediaWiki. Handlers will typically only apply for specific MIME types. |
bool | array | MessageSpecifier | &$error | Output: true if the file is valid. Otherwise, set this to 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.) |
Implements MediaWiki\Hook\UploadVerifyFileHook.
Definition at line 4186 of file HookRunner.php.
References $mime.
MediaWiki\HookContainer\HookRunner::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.).
UploadBase | $upload | Instance of UploadBase, with all info about the upload |
User | $user | User uploading this file |
array | null | $props | File properties, as returned by MWFileProps::getPropsFromPath(). Note this is not always guaranteed to be set, e.g. in test scenarios. Call MWFileProps::getPropsFromPath() yourself in case you need the information. |
string | $comment | Upload log comment (also used as edit summary) |
string | $pageText | File description page text (only used for new uploads) |
array | MessageSpecifier | &$error | Output: If the file upload should be prevented, set this to 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.) |
Implements MediaWiki\Hook\UploadVerifyUploadHook.
Definition at line 4193 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUser__mailPasswordInternal | ( | $user, | |
$ip, | |||
$u ) |
This hook is called before creation and mailing of a user's new temporary password.
User | $user | The user who sent the message out |
string | $ip | IP of the user who sent the message out |
User | $u | The account whose new password will be set |
Implements MediaWiki\User\Hook\User__mailPasswordInternalHook.
Definition at line 4517 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserAddGroup | ( | $user, | |
& | $group, | ||
& | $expiry ) |
This hook is alled when adding a group or changing a group's expiry.
User | $user | The user that is to have a group added |
string | &$group | The group to add; can be modified |
string | null | &$expiry | The expiry time in TS_MW format, or null if the group is not to expire; can be modified |
Implements MediaWiki\User\Hook\UserAddGroupHook.
Definition at line 4202 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserArrayFromResult | ( | & | $userArray, |
$res ) |
This hook is called when creating an UserArray object from a database result.
UserArrayFromResult | null | &$userArray | Set this to an object to override the default |
IResultWrapper | $res | Database result used to create the object |
Implements MediaWiki\User\Hook\UserArrayFromResultHook.
Definition at line 4209 of file HookRunner.php.
References $res.
MediaWiki\HookContainer\HookRunner::onUserCan | ( | $title, | |
$user, | |||
$action, | |||
& | $result ) |
Use this hook to interrupt or advise the "user can do X to Y article" check.
If you want to display an error message, try getUserPermissionsErrors.
Title | $title | Title being checked against |
User | $user | Current user |
string | $action | Action being checked |
string | &$result | Pointer to result returned if hook returns false. If null is returned, userCan checks are continued by internal code. |
Implements MediaWiki\Permissions\Hook\UserCanHook.
Definition at line 4216 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onUserCanSendEmail | ( | $user, | |
& | $canSend ) |
Use this hook to override User::canSendEmail() permission check.
User | $user | User (object) whose permission is being checked |
bool | &$canSend | Set on input, can override on output |
Implements MediaWiki\User\Hook\UserCanSendEmailHook.
Definition at line 4223 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserClearNewTalkNotification | ( | $userIdentity, | |
$oldid ) |
This hook is called before clearing the "You have new messages!" message.
UserIdentity | $userIdentity | User that will clear the message |
int | $oldid | ID of the talk page revision being viewed (0 means the most recent one) |
Implements MediaWiki\User\Hook\UserClearNewTalkNotificationHook.
Definition at line 4230 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserEffectiveGroups | ( | $user, | |
& | $groups ) |
This hook is called in UserGroupManager::getUserEffectiveGroups().
Implements MediaWiki\User\Hook\UserEffectiveGroupsHook.
Definition at line 4237 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserGetAllRights | ( | & | $rights | ) |
This hook is called after calculating a list of all available rights.
string[] | &$rights | Array of rights, which may be added to |
Implements MediaWiki\Permissions\Hook\UserGetAllRightsHook.
Definition at line 4244 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserGetDefaultOptions | ( | & | $defaultOptions | ) |
This hook is called after fetching core default user options but before returning the options.
Warning: This hook is called for every call to User::getDefaultOptions(), which means it's potentially called dozens or hundreds of times. You may want to cache the results of non-trivial operations in your hook function for this reason.
array | &$defaultOptions | Array of preference keys and their default values. |
Implements MediaWiki\User\Hook\UserGetDefaultOptionsHook.
Definition at line 4251 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserGetEmail | ( | $user, | |
& | $email ) |
This hook is called when getting an user email address.
Implements MediaWiki\User\Hook\UserGetEmailHook.
Definition at line 4258 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserGetEmailAuthenticationTimestamp | ( | $user, | |
& | $timestamp ) |
This hook is called when getting the timestamp of email authentication.
User | $user | User object |
string | &$timestamp | Timestamp. Change this to override the local email authentication timestamp. |
Implements MediaWiki\User\Hook\UserGetEmailAuthenticationTimestampHook.
Definition at line 4265 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserGetLanguageObject | ( | $user, | |
& | $code, | ||
$context ) |
This hook is called when getting a user's interface language object.
User | $user | |
string | &$code | Language code that will be used to create the object |
IContextSource | $context |
Implements MediaWiki\Hook\UserGetLanguageObjectHook.
Definition at line 4272 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserGetReservedNames | ( | & | $reservedUsernames | ) |
Use this hook to modify $wgReservedUsernames at run time.
array | &$reservedUsernames | $wgReservedUsernames |
Implements MediaWiki\User\Hook\UserGetReservedNamesHook.
Definition at line 4279 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserGetRights | ( | $user, | |
& | $rights ) |
This hook is called in User::getRights().
Implements MediaWiki\Permissions\Hook\UserGetRightsHook.
Definition at line 4286 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserGetRightsRemove | ( | $user, | |
& | $rights ) |
This hook is called in User::getRights().
This hook overrides the UserGetRights hook. It can be used to remove rights from a user and ensure that they will not be reinserted by the other hook callbacks. This hook should not be used to add any rights; use UserGetRights instead.
Implements MediaWiki\Permissions\Hook\UserGetRightsRemoveHook.
Definition at line 4293 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserGroupsChanged | ( | $user, | |
$added, | |||
$removed, | |||
$performer, | |||
$reason, | |||
$oldUGMs, | |||
$newUGMs ) |
This hook is called after user groups are changed.
User | $user | User whose groups changed |
string[] | $added | Groups added |
string[] | $removed | Groups removed |
User | false | $performer | User who performed the change, false if via autopromotion |
string | false | $reason | The reason, if any, given by the user performing the change, false if via autopromotion. |
UserGroupMembership[] | $oldUGMs | An associative array (group name => UserGroupMembership) of the user's group memberships before the change. |
UserGroupMembership[] | $newUGMs | An associative array (group name => UserGroupMembership) of the user's current group memberships. |
Implements MediaWiki\User\Hook\UserGroupsChangedHook.
Definition at line 4300 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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).
User | $user | User in question |
Title | $title | Title of the page in question |
bool | &$blocked | Out-param, whether or not the user is blocked from that page |
bool | &$allowUsertalk | If the user is blocked, whether or not the block allows users to edit their own user talk pages |
Implements MediaWiki\Permissions\Hook\UserIsBlockedFromHook.
Definition at line 4310 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onUserIsBlockedGlobally | ( | $user, | |
$ip, | |||
& | $blocked, | ||
& | $block ) |
Use this hook to establish that a user is blocked on all wikis.
User | $user | User object |
string | $ip | User's IP address |
bool | &$blocked | Whether the user is blocked, to be modified by the hook |
null | &$block | The Block object, to be modified by the hook |
Implements MediaWiki\User\Hook\UserIsBlockedGloballyHook.
Definition at line 4317 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserIsBot | ( | $user, | |
& | $isBot ) |
Use this hook to establish whether a user is a bot account.
User | $user | The user |
bool | &$isBot | Whether this is user a bot or not (boolean) |
Implements MediaWiki\User\Hook\UserIsBotHook.
Definition at line 4324 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
string | $right | User right being checked |
Implements MediaWiki\Permissions\Hook\UserIsEveryoneAllowedHook.
Definition at line 4331 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserIsLocked | ( | $user, | |
& | $locked ) |
Use this hook to establish that a user is locked.
See User::isLocked().
Implements MediaWiki\User\Hook\UserIsLockedHook.
Definition at line 4338 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserLoadAfterLoadFromSession | ( | $user | ) |
This hook is called to authenticate users on external or environmental means.
This hook is called after session is loaded.
Implements MediaWiki\User\Hook\UserLoadAfterLoadFromSessionHook.
Definition at line 4345 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserLoadDefaults | ( | $user, | |
$name ) |
This hook is called when loading a default user.
Implements MediaWiki\User\Hook\UserLoadDefaultsHook.
Definition at line 4352 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserLoadFromDatabase | ( | $user, | |
& | $s ) |
This hook is called when loading a user from the database.
User | $user | |
stdClass | bool | &$s | Database query object |
Implements MediaWiki\User\Hook\UserLoadFromDatabaseHook.
Definition at line 4359 of file HookRunner.php.
References $s.
MediaWiki\HookContainer\HookRunner::onUserLoadOptions | ( | $user, | |
& | $options ) |
This hook is called when user options/preferences are being loaded from the database.
Implements MediaWiki\User\Hook\UserLoadOptionsHook.
Definition at line 4366 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserLoggedIn | ( | $user | ) |
This hook is called after a user is logged in.
Implements MediaWiki\Auth\Hook\UserLoggedInHook.
Definition at line 4373 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserLoginComplete | ( | $user, | |
& | $inject_html, | ||
$direct ) |
Use this hook to show custom content after a user has logged in via the web interface.
For functionality that needs to run after any login (API or web) use UserLoggedIn.
User | $user | The user object that was created on login |
string | &$inject_html | Any HTML to inject after the "logged in" message. |
bool | $direct | (bool) The hook is called directly after a successful login. This will only happen once per login. A UserLoginComplete call with direct=false can happen when the user visits the login page while already logged in. |
Implements MediaWiki\Hook\UserLoginCompleteHook.
Definition at line 4380 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserLogout | ( | $user | ) |
This hook is called before a user logs out.
User | $user | The user that is about to be logged out |
Implements MediaWiki\User\Hook\UserLogoutHook.
Definition at line 4387 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserLogoutComplete | ( | $user, | |
& | $inject_html, | ||
$oldName ) |
This hook is called after a user has logged out.
User | $user | the user object after logout (won't have name, ID, etc.) |
string | &$inject_html | Any HTML to inject after the "logged out" message. |
string | $oldName | name of the user before logout (string) |
Implements MediaWiki\Hook\UserLogoutCompleteHook.
Definition at line 4394 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserMailerChangeReturnPath | ( | $to, | |
& | $returnPath ) |
This hook is called to generate a VERP return address when UserMailer sends an email, with a bounce handling extension.
MailAddress[] | $to | Array of MailAddress objects for the recipients |
string | &$returnPath | Return address |
Implements MediaWiki\Hook\UserMailerChangeReturnPathHook.
Definition at line 4401 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
MailAddress[] | &$to | Unset the ones which should be mailed separately |
Implements MediaWiki\Hook\UserMailerSplitToHook.
Definition at line 4408 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserMailerTransformContent | ( | $to, | |
$from, | |||
& | $body, | ||
& | $error ) |
This hook is called in UserMailer::send() to change email contents.
MailAddress[] | $to | Array of addresses of the targets |
MailAddress | $from | Address of the sender |
string | array | &$body | Email body, either a string (for plaintext emails) or an array with 'text' and 'html' keys |
string | &$error | Error message |
Implements MediaWiki\Hook\UserMailerTransformContentHook.
Definition at line 4415 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::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.
MailAddress[] | $to | Array of addresses of the targets |
MailAddress | $from | Address of the sender |
string | &$subject | Email subject (not MIME encoded) |
array | &$headers | Email headers (except To: and Subject:) as an array of header name => value pairs |
string | &$body | email body (in MIME format) |
string | &$error | Error message |
Implements MediaWiki\Hook\UserMailerTransformMessageHook.
Definition at line 4422 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserRemoveGroup | ( | $user, | |
& | $group ) |
This hook is called when removing a group.
User | $user | The user that is to have a group removed |
string | &$group | The group to be removed. Can be modified. |
Implements MediaWiki\User\Hook\UserRemoveGroupHook.
Definition at line 4431 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserRequiresHTTPS | ( | $user, | |
& | $https ) |
This hook is called to determine whether a user needs to be switched to HTTPS.
Deprecated since 1.35 as part of a drive towards deprecation of mixed-protocol wikis.
Implements MediaWiki\User\Hook\UserRequiresHTTPSHook.
Definition at line 4438 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserResetAllOptions | ( | $user, | |
& | $newOptions, | ||
$options, | |||
$resetKinds ) |
This hook is called when user preferences have been requested to be reset.
This hook can be used to exclude certain options from being reset even when the user has requested that all preferences to be reset, because certain options might be stored in the user_properties database table despite not being visible and editable via Special:Preferences.
User | $user | The user whose preferences are being reset |
array | &$newOptions | Array of new (site default) preferences |
array | $options | Array of the user's old preferences |
string[] | $resetKinds | Array containing the kinds of preferences to reset |
Implements MediaWiki\User\Hook\UserResetAllOptionsHook.
Definition at line 4445 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserRetrieveNewTalks | ( | $user, | |
& | $talks ) |
This hook is called when retrieving "You have new messages!" message(s).
To override the notification, populate the $talks array and then return false. If the hook returns true, $talks will not be used.
User | $user | User retrieving new talks messages |
array[] | &$talks | Array in which each element is an associative array describing a notification, with the following keys:
|
Implements MediaWiki\User\Hook\UserRetrieveNewTalksHook.
Definition at line 4454 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserSaveOptions | ( | $user, | |
& | $options, | ||
$originalOptions ) |
This hook is called just before saving user preferences.
Hook handlers can either add or manipulate options, or reset one back to its default to block changing it. Hook handlers are also allowed to abort the process by returning false, e.g. to save to a global profile instead. Compare to the UserSaveSettings hook, which is called after the preferences have been saved.
User | $user | The User for which the options are going to be saved |
array | &$options | The user's options as an associative array, modifiable |
array | $originalOptions | The user's original options being replaced |
Implements MediaWiki\User\Hook\UserSaveOptionsHook.
Definition at line 4461 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserSaveSettings | ( | $user | ) |
This hook is called directly after user preferences have been saved to the database.
Compare to the UserSaveOptions hook, which is called before saving.
Implements MediaWiki\User\Hook\UserSaveSettingsHook.
Definition at line 4468 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserSendConfirmationMail | ( | $user, | |
& | $mail, | ||
$info ) |
This hook is called just before a confirmation email is sent to a user.
Hook handlers can modify the email that will be sent.
User | $user | The User for which the confirmation email is going to be sent |
array | Associative array describing the email, with the following keys:
| |
array | $info | Associative array with additional information:
|
Implements MediaWiki\User\Hook\UserSendConfirmationMailHook.
Definition at line 4475 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserSetCookies | ( | $user, | |
& | $session, | ||
& | $cookies ) |
This hook is called when setting user cookies.
User | $user | |
array | &$session | Session array, will be added to the session |
string[] | &$cookies | Cookies array mapping cookie name to its value |
Implements MediaWiki\Session\Hook\UserSetCookiesHook.
Definition at line 4482 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserSetEmail | ( | $user, | |
& | $email ) |
This hook is called when changing user email address.
Implements MediaWiki\User\Hook\UserSetEmailHook.
Definition at line 4489 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserSetEmailAuthenticationTimestamp | ( | $user, | |
& | $timestamp ) |
This hook is called when setting the timestamp of a User's email authentication.
User | $user | User object |
?string | &$timestamp | new timestamp, change this to override local email authentication timestamp |
Implements MediaWiki\User\Hook\UserSetEmailAuthenticationTimestampHook.
Definition at line 4496 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUsersPagerDoBatchLookups | ( | $dbr, | |
$userIds, | |||
& | $cache, | ||
& | $groups ) |
This hook is called called in UsersPager::doBatchLookups()
It is used to give extensions providing user group data from an alternate source a chance to add their data into the cache array so that things like global user groups are displayed correctly in Special:ListUsers.
DBConnRef | $dbr | Read-only database handle |
int[] | $userIds | Array of user IDs whose groups we should look up |
array | &$cache | Array of user ID -> (array of internal group name (e.g. 'sysop') -> UserGroupMembership object) |
array | &$groups | Array of group name -> bool true mappings for members of a given user group |
Implements MediaWiki\Hook\UsersPagerDoBatchLookupsHook.
Definition at line 4503 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onUserToolLinksEdit | ( | $userId, | |
$userText, | |||
& | $items ) |
This hook is called when generating a list of user tool links, e.g.
"Foobar (Talk | Contribs | Block)".
int | $userId | User ID of the current user |
string | $userText | Username of the current user |
string[] | &$items | Array of user tool links as HTML fragments |
Implements MediaWiki\Hook\UserToolLinksEditHook.
Definition at line 4510 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onValidateExtendedMetadataCache | ( | $timestamp, | |
$file ) |
Use this hook to validate the cached metadata in FormatMetadata::getExtendedMeta.
Implements MediaWiki\Hook\ValidateExtendedMetadataCacheHook.
Definition at line 4524 of file HookRunner.php.
References $file.
MediaWiki\HookContainer\HookRunner::onWantedPages__getQueryInfo | ( | $wantedPages, | |
& | $query ) |
This hook is called in WantedPagesPage::getQueryInfo().
Can be used to alter the SQL query.
WantedPagesPage | $wantedPages | |
array | &$query | Query array. See QueryPage::getQueryInfo() for format documentation. |
Implements MediaWiki\Hook\WantedPages__getQueryInfoHook.
Definition at line 4531 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onWatchArticle | ( | $user, | |
$page, | |||
& | $status, | ||
$expiry ) |
This hook is called before a watch is added to an article.
User | $user | User that will watch |
WikiPage | $page | WikiPage object to be watched |
Status | &$status | Status object to be returned if the hook returns false |
string | null | $expiry | Optional expiry timestamp in any format acceptable to wfTimestamp() |
Implements MediaWiki\Hook\WatchArticleHook.
Definition at line 4538 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onWatchArticleComplete | ( | $user, | |
$page ) |
This hook is called after a watch is added to an article.
Implements MediaWiki\Hook\WatchArticleCompleteHook.
Definition at line 4545 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onWatchedItemQueryServiceExtensions | ( | & | $extensions, |
$watchedItemQueryService ) |
Use this hook to create a WatchedItemQueryServiceExtension.
array | &$extensions | Add WatchedItemQueryServiceExtension objects to this array |
WatchedItemQueryService | $watchedItemQueryService | Service object |
Implements MediaWiki\Hook\WatchedItemQueryServiceExtensionsHook.
Definition at line 4552 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onWatchlistEditorBeforeFormRender | ( | & | $watchlistInfo | ) |
This hook is called before building the Special:EditWatchlist form.
It is used to manipulate the list of pages or preload data based on that list.
array | &$watchlistInfo | Array of watchlisted pages in [namespaceId => ['title1' => 1, 'title2' => 1]] format |
Implements MediaWiki\Hook\WatchlistEditorBeforeFormRenderHook.
Definition at line 4561 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onWatchlistEditorBuildRemoveLine | ( | & | $tools, |
$title, | |||
$redirect, | |||
$skin, | |||
& | $link ) |
This hook is called when building remove lines in Special:Watchlist/edit.
string[] | &$tools | Array of extra HTML links |
Title | $title | |
bool | $redirect | whether the page is a redirect |
Skin | $skin | |
string | &$link | HTML link to title |
Implements MediaWiki\Hook\WatchlistEditorBuildRemoveLineHook.
Definition at line 4568 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onWebRequestPathInfoRouter | ( | $router | ) |
This hook is called while building the PathRouter to parse the REQUEST_URI.
PathRouter | $router |
Implements MediaWiki\Hook\WebRequestPathInfoRouterHook.
Definition at line 4577 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onWebResponseSetCookie | ( | & | $name, |
& | $value, | ||
& | $expire, | ||
& | $options ) |
This hook is called when setting a cookie in WebResponse::setcookie().
string | &$name | Cookie name passed to WebResponse::setcookie() |
string | &$value | Cookie value passed to WebResponse::setcookie() |
int | null | &$expire | Cookie expiration, as for PHP's setcookie() |
array | &$options | Options passed to WebResponse::setcookie() |
Implements MediaWiki\Hook\WebResponseSetCookieHook.
Definition at line 4584 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onWfShellWikiCmd | ( | & | $script, |
& | $parameters, | ||
& | $options ) |
This hook is called when generating a shell-escaped command line string to run a MediaWiki CLI script.
string | &$script | MediaWiki CLI script path |
string[] | &$parameters | Array of arguments and options to the script |
array | &$options | Associative array of options, may contain the 'php' and 'wrapper' keys |
Implements MediaWiki\Shell\Hook\WfShellWikiCmdHook.
Definition at line 4591 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onWgQueryPages | ( | & | $qp | ) |
This hook is called when initialising list of QueryPage subclasses.
Use this hook to add new query pages to be updated with maintenance/updateSpecialPages.php.
array | &$qp | List of QueryPages |
Implements MediaWiki\SpecialPage\Hook\WgQueryPagesHook.
Definition at line 4598 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onWhatLinksHereProps | ( | $row, | |
$title, | |||
$target, | |||
& | $props ) |
Use this hook to add annotations to Special:WhatLinksHere.
stdClass | $row | The DB row of the entry. |
Title | $title | The Title of the page where the link comes FROM |
Title | $target | The Title of the page where the link goes TO |
string[] | &$props | Array of HTML strings to display after the title. |
Implements MediaWiki\Hook\WhatLinksHerePropsHook.
Definition at line 4605 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onWikiExporter__dumpStableQuery | ( | & | $tables, |
& | $opts, | ||
& | $join ) |
Use this hook to get the SELECT query for "stable" revisions dumps.
One, and only one hook should set this, and return false.
array | &$tables | Database tables to use in the SELECT query |
array | &$opts | Options to use for the query |
array | &$join | Join conditions |
Implements MediaWiki\Hook\WikiExporter__dumpStableQueryHook.
Definition at line 4612 of file HookRunner.php.
MediaWiki\HookContainer\HookRunner::onWikiPageDeletionUpdates | ( | $page, | |
$content, | |||
& | $updates ) |
Use this hook to manipulate the list of DeferrableUpdates to be applied when a page is deleted.
WikiPage | $page | |
Content | null | $content | Content to generate updates for, or null in case the page revision could not be loaded. The delete will succeed despite this. |
DeferrableUpdate[] | &$updates | Array of objects that implement DeferrableUpdate. Hook function may want to add to it. |
Implements MediaWiki\Page\Hook\WikiPageDeletionUpdatesHook.
Definition at line 4619 of file HookRunner.php.
References $content.
MediaWiki\HookContainer\HookRunner::onWikiPageFactory | ( | $title, | |
& | $page ) |
Use this hook to override WikiPage class used for a title.
Implements MediaWiki\Page\Hook\WikiPageFactoryHook.
Definition at line 4626 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onXmlDumpWriterOpenPage | ( | $obj, | |
& | $out, | ||
$row, | |||
$title ) |
This hook is called at the end of XmlDumpWriter::openPage, to allow extra metadata to be added.
XmlDumpWriter | $obj | |
string | &$out | Output string |
stdClass | $row | Database row for the page |
Title | $title | Title of the page |
Implements MediaWiki\Hook\XmlDumpWriterOpenPageHook.
Definition at line 4633 of file HookRunner.php.
References $title.
MediaWiki\HookContainer\HookRunner::onXmlDumpWriterWriteRevision | ( | $obj, | |
& | $out, | ||
$row, | |||
$text, | |||
$rev ) |
This hook is called at the end of a revision in an XML dump, to add extra metadata.
XmlDumpWriter | $obj | |
string | &$out | Text being output |
stdClass | $row | Database row for the revision being dumped. DEPRECATED, use $rev instead. |
string | $text | Revision text to be dumped. DEPRECATED, use $rev instead. |
RevisionRecord | $rev | RevisionRecord that is being dumped to XML |
Implements MediaWiki\Hook\XmlDumpWriterWriteRevisionHook.
Definition at line 4640 of file HookRunner.php.
|
private |
Definition at line 568 of file HookRunner.php.
Referenced by MediaWiki\HookContainer\HookRunner\__construct().