In this series of articles, I am going to introduce each of the plugins I have developed for ClassicPress, a hard-fork of WordPress, which was originally created to provide an alternative, yet compatible, CMS without the Gutenberg block editor.
The 47th plugin is Theme Switcher.
Allows users to easily switch themes (ideal for allowing light/dark mode).
Theme switcher functionality is made available to users via a widget; settings done via widget administration.
Settings available to display available themes as a list or select drop-down; widget admin allows themes with certain prefix to be excluded and/or to include only themes containing a certain word or part of a word.
As an alternative to using the widget, the function azc_ts_theme_switcher() can be called directly; add ‘dropdown’ as a parameter to have the select drop-down, instead of the list, of themes returned.
This plugin is multisite compatible; each site will place and configure the Theme Switcher widget.