Loading...
bs Dark Mode v6 is here! Learn more

Blog

bs Dark Mode v6

Bootstrap 5.3, Dark-mode Plugin

The v6 update rewrites bs Dark Mode with class-based togglers, new filters, and customizable templates. This release contains breaking changes and requires migration from v5.

This update includes breaking changes and requires migration. Read through this blog post in its entirety first and follow the update guide if you want to migrate your existing bs Dark Mode v5 to v6.

Rewritten script by class

The core of this update is a completely rewritten script that toggles the dark theme by class instead of by ID. As a result, you can add as many dark-mode togglers to a widget/page as needed.

Filters

Each element now has a filter that allows you to fully customize the dropdown template’s classes, texts and icons without the need to override template file in child-theme.

Custom HTML togglers

Instead using a shortcode template, its now possible to use custom HTML as well to toggle theme with a simple checkbox, radios or buttons. Check out the documentation for this examples.

Update

The latest v5.6.2 (Nov. 13, 2024) has disabled the auto-updater to prevent accidentally updating to v6. This update must be done manually by first removing your plugin and then uploading the new one. Existing shortcodes and filters remain, but there are changes in the template files.

  • Check if your child theme contains a folder with overridden templates named bs-dark-mode or bs-dark-mode-main. In either case, delete the entire folder, including the templates inside. The fallback for older versions (bs-dark-mode-main) has been removed, and the templates have changed in ways that are not compatible with the new script.
  • In your WordPress backend, go to Plugins and delete the bs Dark Mode plugin. Then, download the latest bs-dark-mode.zip file and install the plugin.
  • Start customizing the plugin using the new filters or by overriding templates via your child theme.

If you accidentally updated from v5 to v6 via the auto-updater or need help, feel free to drop a comment below.

Have a great day!

To top