diff --git a/includes/Components/VectorComponentMainMenu.php b/includes/Components/VectorComponentMainMenu.php index 924c1bdcb..cfc96da1d 100644 --- a/includes/Components/VectorComponentMainMenu.php +++ b/includes/Components/VectorComponentMainMenu.php @@ -51,18 +51,17 @@ class VectorComponentMainMenu implements VectorComponent { $this->localizer = $localizer; $this->isPinned = $featureManager->isFeatureEnabled( Constants::FEATURE_MAIN_MENU_PINNED ); + $isPageToolsEnabled = $featureManager->isFeatureEnabled( Constants::FEATURE_PAGE_TOOLS ); + if ( $isPageToolsEnabled ) { + $this->pinnableHeader = new VectorComponentPinnableHeader( + $this->localizer, + $this->isPinned, + self::ID, + 'main-menu-pinned' + ); + } if ( $user->isRegistered() ) { $this->optOut = new VectorComponentMainMenuActionOptOut( $skin ); - - $isPageToolsEnabled = $featureManager->isFeatureEnabled( Constants::FEATURE_PAGE_TOOLS ); - if ( $isPageToolsEnabled ) { - $this->pinnableHeader = new VectorComponentPinnableHeader( - $this->localizer, - $this->isPinned, - self::ID, - 'main-menu-pinned' - ); - } } if ( $shouldLanguageAlertBeInSidebar ) { $this->alert = new VectorComponentMainMenuActionLanguageSwitchAlert( $skin );