mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-12 07:25:13 +00:00
Only show in beta feature list when enabled as a betafeature
Bug: T149092 Change-Id: Iab021a8699845cfc302353c453ebdc1c125d7fd9
This commit is contained in:
parent
bb4666ae88
commit
c824428d41
|
@ -116,18 +116,21 @@ class RevisionSliderHooks {
|
|||
}
|
||||
|
||||
public static function getBetaFeaturePreferences( User $user, array &$prefs ) {
|
||||
global $wgExtensionAssetsPath;
|
||||
$config = MediaWikiServices::getInstance()->getMainConfig();
|
||||
$extensionAssetsPath = $config->get( 'ExtensionAssetsPath' );
|
||||
|
||||
$prefs['revisionslider'] = [
|
||||
'label-message' => 'revisionslider-beta-feature-message',
|
||||
'desc-message' => 'revisionslider-beta-feature-description',
|
||||
'screenshot' => [
|
||||
'ltr' => "$wgExtensionAssetsPath/RevisionSlider/resources/RevisionSlider-beta-features-ltr.svg",
|
||||
'rtl' => "$wgExtensionAssetsPath/RevisionSlider/resources/RevisionSlider-beta-features-rtl.svg",
|
||||
],
|
||||
'info-link' => 'https://www.mediawiki.org/wiki/Extension:RevisionSlider',
|
||||
'discussion-link' => 'https://www.mediawiki.org/wiki/Extension_talk:RevisionSlider',
|
||||
];
|
||||
if ( $config->get( 'RevisionSliderBetaFeature' ) ) {
|
||||
$prefs['revisionslider'] = [
|
||||
'label-message' => 'revisionslider-beta-feature-message',
|
||||
'desc-message' => 'revisionslider-beta-feature-description',
|
||||
'screenshot' => [
|
||||
'ltr' => "$extensionAssetsPath/RevisionSlider/resources/RevisionSlider-beta-features-ltr.svg",
|
||||
'rtl' => "$extensionAssetsPath/RevisionSlider/resources/RevisionSlider-beta-features-rtl.svg",
|
||||
],
|
||||
'info-link' => 'https://www.mediawiki.org/wiki/Extension:RevisionSlider',
|
||||
'discussion-link' => 'https://www.mediawiki.org/wiki/Extension_talk:RevisionSlider',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
public static function onResourceLoaderTestModules( array &$testModules, ResourceLoader $rl ) {
|
||||
|
|
Loading…
Reference in a new issue