# ============================================================
# Default appearance — NIGHT (dark) mode (added 2026-07-31)
# ------------------------------------------------------------
# Vector 2022 ships night mode, but skins/Vector/skin.json defaults it to:
# "VectorNightMode": { "logged_out": false, "logged_in": true, "beta": false }
# "DefaultUserOptions": { ..., "vector-theme": "day" }
# i.e. anonymous readers (nearly everyone here) never even get the option, and
# the default is light. Enable it for logged-out visitors as well and flip the
# default to night, so the wiki is dark out of the box for everybody.
#
# Readers can still switch back: the Appearance menu writes the choice
# client-side (a cookie for anonymous visitors, a real user preference for
# accounts), so this only sets the DEFAULT, it does not force anyone.
#
# 'vector-theme' accepts 'day' | 'night' | 'os' ('os' = follow the visitor's
# system setting — swap that in here if respecting the OS is ever preferred).
#
# NB: set via an extension function, not a bare assignment. Skin/extension
# DefaultUserOptions are merged into $wgDefaultUserOptions in Setup.php AFTER
# LocalSettings.php has been evaluated, so a plain assignment here can be
# clobbered by skin.json's "day". Extension functions run after that merge.
# ============================================================
$wgVectorNightMode = [ 'logged_in' => true, 'logged_out' => true, 'beta' => false ];
$wgExtensionFunctions[] = static function () {
$GLOBALS['wgDefaultUserOptions']['vector-theme'] = 'night';
};
MediaWiki internal error.
Original exception: [f74c607a3b122998d8104ef5] 2026-07-31 02:45:24: Fatal exception of type "FatalError"
Exception caught inside exception handler.
Set $wgShowExceptionDetails = true; at the bottom of LocalSettings.php to show detailed debugging information.