Page MenuHomeWickedGov Phorge

Theme.php
No OneTemporary

Size
724 B
Referenced Files
None
Subscribers
None

Theme.php

<?php
declare( strict_types=1 );
namespace MediaWiki\Skins\Citizen\Partials;
const CLIENTPREFS_THEME_MAP = [
'auto' => 'os',
'light' => 'day',
'dark' => 'night'
];
/**
* Theme switcher partial of Skin Citizen
*/
final class Theme extends Partial {
/**
* Sets the corresponding theme class on the <html> element
* If the theme is set to auto, the theme switcher script will be added
*/
public function setSkinTheme(): void {
// Set theme to site theme
$theme = $this->getConfigValue( 'CitizenThemeDefault' ) ?? 'auto';
// Add HTML class based on theme set
if ( CLIENTPREFS_THEME_MAP[ $theme ] ) {
$this->out->addHtmlClasses( 'skin-theme-clientpref-' . CLIENTPREFS_THEME_MAP[ $theme ] );
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Oct 7 2026, 08:15 (6 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
a4/f0/65e55ba0ea014ce42a8985f9d6c0
Default Alt Text
Theme.php (724 B)

Event Timeline