mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-24 15:44:09 +00:00
f597e341af
This changes introduces new option on Special:Preferences page that allows users to enable/disable Page Previews feature. By default feature is disabled. Temporarily option in Preferences page is smoke and mirrors as switching logic is still WIP. Bug: T146889 Change-Id: Ifdd17ce265d2d4c7583433ed4991443c563f1fe3
36 lines
585 B
PHP
36 lines
585 B
PHP
<?php
|
|
/**
|
|
* Module.php
|
|
*/
|
|
namespace Popups;
|
|
|
|
/**
|
|
* Popups Module
|
|
*
|
|
* @package Popups
|
|
*/
|
|
final class Module {
|
|
/**
|
|
* @var \Config
|
|
*/
|
|
private $config;
|
|
|
|
/**
|
|
* Module constructor.
|
|
* @param \Config $config
|
|
*/
|
|
public function __construct( \Config $config ) {
|
|
$this->config = $config;
|
|
}
|
|
|
|
/**
|
|
* Are Page previews visible on User Preferences Page
|
|
*
|
|
* return @bool
|
|
*/
|
|
public function showPreviewsOptInOnPreferencesPage() {
|
|
return $this->config->get( 'PopupsBetaFeature' ) === false
|
|
&& $this->config->get( 'PopupsHideOptInOnPreferencesPage' ) === false;
|
|
}
|
|
}
|