Don't apply CLL to pages with the noexternallanglinks magic word
There is actually a magic word and a parser function. This checks if all links are excluded (*). Bug: T186590 Change-Id: Iaf860683f6e3bc9b00d5e8f19b8be7c0f1b20f5b
This commit is contained in:
@@ -119,7 +119,10 @@ class UniversalLanguageSelectorHooks {
|
|||||||
// If the extension is enabled, basic features (API, language data) available.
|
// If the extension is enabled, basic features (API, language data) available.
|
||||||
$out->addModules( 'ext.uls.init' );
|
$out->addModules( 'ext.uls.init' );
|
||||||
|
|
||||||
if ( self::isCompactLinksEnabled( $out->getUser() ) ) {
|
// Soft dependency to Wikibase client. Don't enable CLL if links are managed manually.
|
||||||
|
$excludedLinks = $out->getProperty( 'noexternallanglinks' );
|
||||||
|
$override = is_array( $excludedLinks ) && in_array( '*', $excludedLinks );
|
||||||
|
if ( !$override && self::isCompactLinksEnabled( $out->getUser() ) ) {
|
||||||
$out->addModules( 'ext.uls.compactlinks' );
|
$out->addModules( 'ext.uls.compactlinks' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user