=== 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.0.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.

== 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**.
* **A default for the whole site.** In **Settings → General**, pick the mode for everyone who has not chosen one yet. The login screen follows it too.
* **No white flash.** The mode is set before the page is drawn, so a dark screen stays dark while it loads.
* **Designed, not inverted.** Every screen is styled with real colours, not a filter that flips them, so images, media thumbnails and colour pickers look right.
* **Covers what you use most.** Dashboard widgets, posts and pages, the block editor's panels and toolbars, the classic editor (writing area included), media library, comments, plugins, themes, users, settings, Site Health, menus, the Customizer, and the common WooCommerce screens (products, orders, settings).
* **Light.** Plain CSS and a few lines of script, loaded only in the admin and on the login screen. No settings page of its own, no database tables.

= 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 menu item, no notices and no dashboard widget. It adds one icon to the toolbar and one setting each to your profile and to Settings → General.
* **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 in their user profile and the site default 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**.

== 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 → General → 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.

= A screen from another plugin still has white areas. What can I do? =

Adminight styles the WordPress screens and the most common WooCommerce ones. Plugins that draw their own screens with their own colours may keep some light areas. Please tell us in the support forum which plugin and screen, ideally with a screenshot, and we will add it.

= 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 default and each user's choice.

= Does it work on multisite? =

Yes. Each user's choice applies on every site of the network, and each site has its own default.

== 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. The site default on Settings → General.
6. The login screen follows the site default.
7. The media library.

== Changelog ==

= 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.0.0 =
First release.
