From ca9f22bac375f73c728905c876dd7e1eb1343599 Mon Sep 17 00:00:00 2001 From: "This, that and the other" Date: Thu, 29 Jan 2015 15:02:37 +1100 Subject: [PATCH] Implement ChangeTagsListActive hook This allows users to visit Special:Tags or use the API to see which change tags are still in active use. The ChangeTagsListActive hook was introduced to core in I77f476c8d0f32c80f720aa2c5e66869c81faa282 Change-Id: I18d921617ccd5eb19068bd4e4a202dabd73a3a17 --- VisualEditor.hooks.php | 7 +++++++ VisualEditor.php | 1 + 2 files changed, 8 insertions(+) diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index d4df34b9d1..b8b34403aa 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -367,6 +367,13 @@ class VisualEditorHooks { */ } + /** + * Implements the ListDefinedTags and ChangeTagsListActive hooks, to populate + * core Special:Tags with the change tags in use by VisualEditor. + * + * @param array $tags + * @return bool true + */ public static function onListDefinedTags( &$tags ) { $tags[] = 'visualeditor'; $tags[] = 'visualeditor-needcheck'; diff --git a/VisualEditor.php b/VisualEditor.php index e38c372627..e84c63679d 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -80,6 +80,7 @@ $wgHooks['DoEditSectionLink'][] = 'VisualEditorHooks::onDoEditSectionLink'; $wgHooks['GetBetaFeaturePreferences'][] = 'VisualEditorHooks::onGetBetaPreferences'; $wgHooks['GetPreferences'][] = 'VisualEditorHooks::onGetPreferences'; $wgHooks['ListDefinedTags'][] = 'VisualEditorHooks::onListDefinedTags'; +$wgHooks['ChangeTagsListActive'][] = 'VisualEditorHooks::onListDefinedTags'; $wgHooks['MakeGlobalVariablesScript'][] = 'VisualEditorHooks::onMakeGlobalVariablesScript'; $wgHooks['RedirectSpecialArticleRedirectParams'][] = 'VisualEditorHooks::onRedirectSpecialArticleRedirectParams';