diff --git a/UniversalLanguageSelector.hooks.php b/UniversalLanguageSelector.hooks.php index 95778f76..ea648dfe 100644 --- a/UniversalLanguageSelector.hooks.php +++ b/UniversalLanguageSelector.hooks.php @@ -50,7 +50,8 @@ class UniversalLanguageSelectorHooks { * @return bool */ public static function isCompactLinksEnabled( $user ) { - global $wgULSEnable, $wgULSEnableAnon, $wgInterwikiMagic, + global $wgULSEnable, $wgInterwikiMagic, + $wgULSCompactLinksEnableAnon, $wgHideInterlanguageLinks, $wgULSCompactLanguageLinksBetaFeature; // Whether any user visible features are enabled @@ -58,8 +59,8 @@ class UniversalLanguageSelectorHooks { return false; } - if ( !$wgULSEnableAnon && $user->isAnon() ) { - return false; + if ( $user->isAnon() && $wgULSCompactLinksEnableAnon ) { + return true; } if ( $wgULSCompactLanguageLinksBetaFeature === true && diff --git a/extension.json b/extension.json index bd2abf34..cfa9e6aa 100644 --- a/extension.json +++ b/extension.json @@ -95,7 +95,9 @@ "ULSCompactLanguageLinksBetaFeature": true, "@ULSCompactLanguageLinksBetaFeature": "Set compact interlanguage links as beta feature or not. If set false, compact interlanguage links will be available by default to all users.", "ULSCompactLinksForNewAccounts": false, - "@ULSCompactLinksForNewAccounts": "Enable compact interlanguage links for new user accounts." + "@ULSCompactLinksForNewAccounts": "Enable compact interlanguage links for new user accounts.", + "ULSCompactLinksEnableAnon": false, + "@ULSCompactLinksEnableAnon": "Enable compact interlanguage links for anonymous users." }, "callback": "UniversalLanguageSelectorHooks::setVersionConstant", "ResourceModules": {