Follow-up Ia268c3a49: Actually hide the BF behind a feature flag
Change-Id: I9bfbfb4512bc6d5c96cdd8e7f75056f0e26b2016
This commit is contained in:
@@ -45,7 +45,7 @@ class UniversalLanguageSelectorHooks {
|
|||||||
* Hook: BeforePageDisplay
|
* Hook: BeforePageDisplay
|
||||||
*/
|
*/
|
||||||
public static function addModules( $out, $skin ) {
|
public static function addModules( $out, $skin ) {
|
||||||
global $wgULSPosition, $wgULSGeoService, $wgULSEventLogging;
|
global $wgULSCompactLinks, $wgULSPosition, $wgULSGeoService, $wgULSEventLogging;
|
||||||
|
|
||||||
// Load the style for users without JS, to hide the useless links
|
// Load the style for users without JS, to hide the useless links
|
||||||
$out->addModuleStyles( 'ext.uls.nojs' );
|
$out->addModuleStyles( 'ext.uls.nojs' );
|
||||||
@@ -337,17 +337,19 @@ class UniversalLanguageSelectorHooks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function onGetBetaFeaturePreferences( $user, &$prefs ) {
|
public static function onGetBetaFeaturePreferences( $user, &$prefs ) {
|
||||||
global $wgExtensionAssetsPath;
|
global $wgExtensionAssetsPath, $wgULSCompactLinks;
|
||||||
$prefs['uls-compact-links'] = array(
|
if ( $wgULSCompactLinks ) {
|
||||||
'label-message' => 'uls-betafeature-label',
|
$prefs['uls-compact-links'] = array(
|
||||||
'desc-message' => 'uls-betafeature-desc',
|
'label-message' => 'uls-betafeature-label',
|
||||||
'screenshot' => $wgExtensionAssetsPath .
|
'desc-message' => 'uls-betafeature-desc',
|
||||||
'/UniversalLanguageSelector/resources/images/compact-links-ltr.png',
|
'screenshot' => $wgExtensionAssetsPath .
|
||||||
'info-link' =>
|
'/UniversalLanguageSelector/resources/images/compact-links-ltr.png',
|
||||||
'https://www.mediawiki.org/wiki/Universal_Language_Selector/Design/Interlanguage_links',
|
'info-link' =>
|
||||||
'discussion-link' =>
|
'https://www.mediawiki.org/wiki/Universal_Language_Selector/Design/Interlanguage_links',
|
||||||
'https://www.mediawiki.org/wiki/Talk:Universal_Language_Selector/Design/Interlanguage_links',
|
'discussion-link' =>
|
||||||
);
|
'https://www.mediawiki.org/wiki/Talk:Universal_Language_Selector/Design/Interlanguage_links',
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user