Title: Hello! Big priority problem
Last modified: December 19, 2023

---

# Hello! Big priority problem

 *  [equaltozero](https://wordpress.org/support/users/equaltozero/)
 * (@equaltozero)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/hello-big-priority-problem/)
 * Hello! Priority problem!
 * It’s **very, but very important** to have somewhere on the body or on the html
   elements, a class name for activate/deactivate detection. And the plugin does
   not have this option, directly from PHP, not from JS…
 * This made for developers, an issue, regarding the CSS and other code priority
   and order , to execute some other conditions.
 * **Please fix this, it’s important.**

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [princeahmed](https://wordpress.org/support/users/princeahmed/)
 * (@princeahmed)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/hello-big-priority-problem/#post-17289988)
 * 
   Hello,
 * First and foremost, we sincerely apologize for any inconvenience you may have
   experienced.
 * I’d like to provide some insights regarding the usage of our plugin. When dark
   mode is activated, the plugin automatically appends the attribute `data-dracula-
   scheme="dark"` to the HTML tag. This allows you to tailor your CSS specifically
   for dark mode by utilizing the data attribute in the following manner:
 * html[data-dracula-scheme=”dark”] {
   /* Insert your Dark Mode-specific CSS here*/}
 * Additionally, our plugin triggers JavaScript events to signify the activation
   or deactivation of dark mode. You can detect these changes in your JavaScript
   code using event listeners, as shown below:
 * document.addEventListener(‘dracula:enable’, function () {
   console.log(‘Dark mode
   enabled’);});
 * document.addEventListener(‘dracula:disable’, function () {
   console.log(‘Dark 
   mode disabled’);});
 * We hope this information assists you in effectively using our plugin. If you 
   have any further questions or encounter any issues, please don’t hesitate to 
   reach out. You can either post your query on our plugin forum at [Dracula Dark Mode Support](https://wordpress.org/support/plugin/dracula-dark-mode/)
   or contact us directly through our support system at [SoftLab Support](https://softlabbd.com/support)
   for a prompt response.
 *  Thread Starter [equaltozero](https://wordpress.org/support/users/equaltozero/)
 * (@equaltozero)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/hello-big-priority-problem/#post-17291881)
 * Hello!
 * Thanks for your reply.
 * The problems are because that custom HTML “data-” is activated wi5 JS, not with
   PHP, direct from the server.
 * So… it’s very important to be in php, because in custom development when you 
   have situations to use something before your JS is doing something , in that 
   case the dark mode is activated only on you JS function…
 * I’m waiting for news.
 * —————————————
 * – Kind Regards!
 * Giurgiu Radu
   Web Developer
 * ◉ E-mail: [radukam@gmail.com](https://wordpress.org/support/topic/hello-big-priority-problem/radukam@gmail.com?output_format=md)
   
   ◉ Skype id: radukam◉ Phone/Whatsapp: +40755273136
 *  Plugin Author [princeahmed](https://wordpress.org/support/users/princeahmed/)
 * (@princeahmed)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/hello-big-priority-problem/#post-17293250)
 * Hi Giurgiu Radu,
   You are correct, the dark mode is activated and deactivated 
   using JS and there is no usage of PHP on the dark mode usage.So, it is impossible
   to detect if the dark mode is enabled/ disabled using php from the server.And,
   there is no way to implement this using PHP.I hope you will get this.
 *  Thread Starter [equaltozero](https://wordpress.org/support/users/equaltozero/)
 * (@equaltozero)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/hello-big-priority-problem/#post-17294316)
 * What? There’s no way to what? 🫣🙂
 * Just as a simple class to the body, that’s it!
 * And based on that, you can do anything after!
 * So…
 * 😉

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Hello! Big priority problem’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/dracula-dark-mode_8585a4.svg)
 * [Dracula Dark Mode – Accessibility, Reading Mode & Dark Mode for WordPress](https://wordpress.org/plugins/dracula-dark-mode/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dracula-dark-mode/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dracula-dark-mode/)
 * [Active Topics](https://wordpress.org/support/plugin/dracula-dark-mode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dracula-dark-mode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dracula-dark-mode/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [equaltozero](https://wordpress.org/support/users/equaltozero/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/hello-big-priority-problem/#post-17294316)