Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5967985
FeaturesHelper.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
FeaturesHelper.php
View Options
<?php
namespace
MediaWiki\Minerva\Skins
;
use
MediaWiki\Request\WebRequest
;
use
MediaWiki\Skins\Vector\ConfigHelper
;
use
MediaWiki\Title\Title
;
class
FeaturesHelper
{
/**
* Per the $options configuration (for use with $wgMinervaNightModeOptions)
* determine whether Night Mode should be disabled on the page.
* For the main page: Check the value of $options['exclude']['mainpage']
* Night Mode is disabled if:
* 1) The current namespace is listed in array $options['exclude']['namespaces']
* OR
* 2) A query string parameter matches one of the regex patterns in $exclusions['querystring'].
* OR
* 3) The canonical title matches one of the titles in $options['exclude']['pagetitles']
* For this functionality to work the Vector skin MUST be installed.
*
* @param array $options
* @param WebRequest $request
* @param Title|null $title
*
* @return bool
* @internal only for use inside tests.
*/
public
function
shouldDisableNightMode
(
array
$options
,
WebRequest
$request
,
?
Title
$title
=
null
):
bool
{
return
class_exists
(
ConfigHelper
::
class
)
?
ConfigHelper
::
shouldDisable
(
$options
,
$request
,
$title
)
:
false
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 12:45 (2 d, 14 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
78/52/82d5e477dfde6e80faacbcec3dab
Default Alt Text
FeaturesHelper.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment