=== Adminight – Dark Mode for the Dashboard === Contributors: jbosnakis Tags: dark mode, admin, dashboard, night mode, accessibility Requires at least: 6.2 Tested up to: 7.1 Requires PHP: 7.4 Stable tag: 1.1.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html A dark mode for wp-admin that each user switches on for themselves: Light, Dark, or Auto to follow the device. You choose where it applies. == Description == Adminight gives the WordPress dashboard a dark theme that is easy on the eyes late at night. It changes only the admin screens: your site's front end stays exactly as it is. * **Each user chooses.** Light, Dark, or Auto. Auto follows the device's setting and switches by itself when the device does. * **One click from the toolbar.** A small sun, moon or half-moon icon next to "Howdy" switches modes right away, without reloading the page. The same choice is in **Users → Profile**. * **You choose where.** In **Settings → Adminight**, turn dark mode on or off for each part of WordPress: the dashboard and content screens, the editors, Appearance, the login screen and WooCommerce. * **Other plugins, one at a time.** Adminight lists the plugins that add screens to your admin menu. Each one stays as it is until you pick "Dark" or the experimental "Inverted colours" for it. * **Every user can opt out.** In their profile, each user can turn off any of these places for themselves. * **No white flash.** The mode is set before the page is drawn, so a dark screen stays dark while it loads. * **Designed, not inverted.** WordPress's own screens are styled with real colours, not a filter that flips them, so images, media thumbnails and colour pickers look right. * **Light.** Plain CSS and a few lines of script, loaded only in the admin and on the login screen. No database tables. = Safe with other plugins = * Screens added by other plugins are never touched until an administrator turns that plugin on. * "Dark" styles the standard WordPress parts those screens use (tables, boxes, fields, buttons). A contrast guard watches those screens and gives text back its dark colour wherever a plugin draws its own light panel, so nothing turns into white text on white. * "Inverted colours" flips the whole screen and turns images, videos and colour swatches back to their real colours. It suits plugins with a design of their own, such as page builders. It is marked experimental: open the plugin after saving and check it. * Page builders that open their own full-screen editor are left alone. * If a screen ever looks wrong, add `?adminight=off` to its address to see it without dark mode, then turn that place off in the settings. * Adminight never changes another plugin's files or settings. = Why another dark mode plugin? = Because a dark dashboard should not need an account, a trial, or a paid tier. * **Everything is free.** There is no Pro version, no locked feature and no upgrade notice. * **It stays out of your way.** Adminight adds no notices and no dashboard widget. It adds one icon to the toolbar, one settings page under Settings and one setting to your profile. * **It respects the front end.** Visitors never see a change. It touches wp-admin and the login screen only. = In the block editor = The editor's panels, toolbars, sidebars and dialogs are dark. The writing area itself keeps your theme's own editor styles, so you still see your content in the colours it will have on the site. = Accessibility = The colours were chosen for WCAG AA: text, links and placeholders keep a contrast ratio of at least 4.5:1 against their background. Focus outlines remain visible, and the toolbar switch has a text label for screen readers. == External services == Adminight contacts no external service and loads nothing from other sites. == Privacy == Adminight stores each user's chosen mode, and any places they turned off, in their user profile, and the site's choices in the site's options. It collects nothing about you or your visitors and sends nothing anywhere. == Installation == 1. Install the plugin from **Plugins → Add Plugin**, or upload the folder to `/wp-content/plugins/`. 2. Activate it. The dashboard follows your device's setting straight away. 3. To choose a mode, click the icon next to "Howdy" in the toolbar, or open **Users → Profile**. 4. To choose where dark mode applies, open **Settings → Adminight**. == Frequently Asked Questions == = Does it change my website for visitors? = No. Only the admin screens and the login screen change. = How does Auto work? = Your browser tells the page whether the device is in dark mode (the `prefers-color-scheme` setting of Windows, macOS, iOS, Android and Linux desktops). In Auto, the dashboard follows it, and changes with it while the page is open. = Can I set it for every user at once? = Yes. **Settings → Adminight → Admin dark mode** sets the mode for everyone who has not picked one. Each user can still change their own. Developers can also use the `adminight_default_mode` filter. = Can I use dark mode only in some places? = Yes. In **Settings → Adminight**, turn each part of WordPress on or off, and choose for each plugin. Each user can also turn off places for themselves in **Users → Profile**. = A plugin's screens are not dark. What can I do? = Open **Settings → Adminight** and choose "Dark" or "Inverted colours" for that plugin. Plugins built from WordPress's own parts look best with "Dark"; plugins with a design of their own usually look better with "Inverted colours". If neither looks right, tell us in the support forum which plugin and screen, ideally with a screenshot. = Why is the writing area of the block editor not dark? = It shows your post with your theme's editor styles, so what you see matches the published page. If your theme has a dark style, the writing area follows it. = What happens when I delete the plugin? = Everything it stored is removed: the site's choices and each user's choices. = Does it work on multisite? = Yes. Each user's mode applies on every site of the network, and each site has its own settings. == Screenshots == 1. The dashboard in dark mode. 2. The posts list, with the toolbar switch open. 3. The block editor: dark panels and toolbars, and the writing area in the theme's colours. 4. A WooCommerce product in the classic editor, with its writing area dark too. 5. Settings → Adminight: the default mode, the parts of WordPress, and other plugins one by one. 6. The login screen follows the site default. 7. The media library. 8. Each user can turn off places for themselves in their profile. == Changelog == = 1.1.0 = * New: Settings → Adminight. Choose the parts of WordPress where dark mode applies: dashboard and content, editors, Appearance, login screen, WooCommerce. * New: other plugins' screens, one plugin at a time, with "Dark" or the experimental "Inverted colours". Off until you choose. * New: a contrast guard keeps text readable on light panels drawn by other plugins. * New: each user can turn off places for themselves in their profile. * New: add `?adminight=off` to any admin address to see that page without dark mode. * Changed: the site default moved from Settings → General to Settings → Adminight. Your choice is kept. * Changed: other plugins' screens are no longer darkened unless you turn them on. * Fixed: page builders' own full-screen editors are left alone. = 1.0.0 = * First release: Light, Dark and Auto modes per user, toolbar switch, profile setting, site default on Settings → General, dark login screen. == Upgrade Notice == = 1.1.0 = Choose where dark mode applies, including other plugins one by one. Other plugins' screens are no longer darkened until you turn them on in Settings → Adminight.