diff --git a/includes/Hooks.php b/includes/Hooks.php index 9a8059a..0d93a38 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -231,6 +231,9 @@ class Hooks { /** * Upgrades Vector's watch action to a watchstar. + * This is invoked inside SkinVector, not via skin registration, as skin hooks + * are not guaranteed to run last. + * This can possibly be revised based on the outcome of T287622. * * @see https://www.mediawiki.org/wiki/Manual:Hooks/SkinTemplateNavigation * @param SkinTemplate $sk diff --git a/includes/SkinVector.php b/includes/SkinVector.php index 84d3b6c..166d1d0 100644 --- a/includes/SkinVector.php +++ b/includes/SkinVector.php @@ -24,6 +24,7 @@ use MediaWiki\MediaWikiServices; use Vector\Constants; +use Vector\Hooks; use Vector\VectorServices; /** @@ -307,6 +308,14 @@ class SkinVector extends SkinMustache { ]; } + /** + * @inheritDoc + */ + protected function runOnSkinTemplateNavigationHooks( SkinTemplate $skin, &$content_navigation ) { + parent::runOnSkinTemplateNavigationHooks( $skin, $content_navigation ); + Hooks::onSkinTemplateNavigation( $skin, $content_navigation ); + } + /** * @inheritDoc */ diff --git a/skin.json b/skin.json index bbf709b..9f3b8c0 100644 --- a/skin.json +++ b/skin.json @@ -12,7 +12,7 @@ "license-name": "GPL-2.0-or-later", "type": "skin", "requires": { - "MediaWiki": ">= 1.36.0" + "MediaWiki": ">= 1.37.0" }, "ValidSkinNames": { "vector": { @@ -75,7 +75,6 @@ "SkinPageReadyConfig": "Vector\\Hooks::onSkinPageReadyConfig", "GetPreferences": "Vector\\Hooks::onGetPreferences", "PreferencesFormPreSave": "Vector\\Hooks::onPreferencesFormPreSave", - "SkinTemplateNavigation::Universal": "Vector\\Hooks::onSkinTemplateNavigation", "LocalUserCreated": "Vector\\Hooks::onLocalUserCreated", "OutputPageBodyAttributes": "Vector\\Hooks::onOutputPageBodyAttributes", "MakeGlobalVariablesScript": "Vector\\Hooks::onMakeGlobalVariablesScript"