by Ermald Billa on WordPress.org
A secure WordPress plugin to add a universal dark/light mode toggle with localStorage support.
Improve Accessibility – Dark Mode Switcher for WP adds a professional dark/light mode toggle to your WordPress website.
Features:
Security:
The plugin implements all WordPress security standards including nonces, sanitization, escape output, and permission checks.
Developer API:
`javascript
// Get current theme
window.iadsAPI.getTheme();
// Change theme
window.iadsAPI.setTheme(‘dark’);
// Toggle theme
window.iadsAPI.toggleTheme();