A lightweight WordPress dark/light mode toggle plugin with admin controls, block-theme compatibility, accessibility-focused behavior, and local preference persistence.
- Frontend dark/light mode toggle with OS preference detection (
prefers-color-scheme) - User preference storage via local storage and/or cookie modes
- Configurable button theme, shape, position, size, and animation
- Color scheme controls with presets and custom colors
- Optional filters for images, videos, and slide embeds
- Display rules, user targeting, schedule controls, and theme exclusions
- Optional local analytics dashboard (stored in WordPress options)
- Admin UI mode and dashboard widget controls
- WordPress Consent API compatibility via
wp_set_consent_type('preferences')when available - Translation-ready text domain with POT file in
languages/ - Automatic update notifications via GitHub Releases — bump the version and push a tagged release to have every site prompt the one-click WordPress update
- WordPress 5.0+
- PHP 7.2+
- In WordPress admin, go to Plugins → Add New → Upload Plugin.
- Upload the plugin ZIP and activate it.
- Open Toggle from the admin sidebar.
- Configure settings as needed.
- Clone this repository:
git clone https://github.com/syntekpro/Syntekpro-Toggle.git
- Place the plugin folder in
/wp-content/plugins/. - Activate from Plugins.
- Open Toggle from the admin sidebar.
- Default mode options:
Auto,Light,Dark,Manual. - If
Autois enabled, OS preference can be used as source. - Display and targeting rules can restrict where the toggle renders.
- Analytics data remains local to your WordPress site.
- Consent category is declared as
preferencesfor compatible WordPress versions, with safe fallback when the Consent API function is unavailable.
- Main plugin file:
syntekpro-toggle.php - Admin logic:
admin/admin.php - Frontend CSS/JS:
public/css/style.css,public/js/script.js - Uninstall cleanup:
uninstall.php - Translation template:
languages/syntekpro-toggle.pot - GitHub updater:
includes/class-github-updater.php
- Bump
Version:in the plugin header (syntekpro-toggle.php) and theSYNTEKPRO_TOGGLE_VERSIONconstant. - Add an entry to
CHANGELOG.md. - Commit and push to
main. - Create and push a tag matching the version (prefix
v), e.g.git tag v1.6.2 && git push origin v1.6.2. - Create a GitHub Release for that tag (attach a plugin ZIP as a release asset).
- Every site running the plugin will see the standard WordPress update notice within 12 hours (or on the next manual check).
See CHANGELOG.md for full release history.
GPL v2 or later. See LICENSE.
Syntekpro
- Website: https://syntekpro.com
- Plugin Page: https://plugins.syntekpro.com/toggle
- Support: development@syntekpro.com