Files
plugin-dynamic-theme-style/theme-style-darkmode.php
2025-12-14 15:17:06 +01:00

44 lines
1.3 KiB
PHP

<?php
/**
* Plugin Name: LL Theme Style Darkmode
* Plugin URI: https://git.laslie.de/wp/plugin-theme-style-darkmode
* Description: Enables automatic switching the theme style variant between light and dark based on the system/browser default.
* Version: 1.0.0
* Requires at least:
* Requires PHP:
* Author: Lasse Liebler
* Author URI: https://dev.laslie.de
* License: GPLv3
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Text Domain: theme-style-darkmode
* Domain Path: /languages
* Network:
* Update URI: https://git.laslie.de/wp/plugin-theme-style-darkmode
* Requires Plugins:
*/
namespace LasLie\ThemeStyleDarkmode;
// Abort if accessed directly.
if ( ! defined( 'ABSPATH' ) ) exit;
// Define constants for Config class.
if ( ! defined( 'LasLie\ThemeStyleDarkmode\DIRNAME' ) ) {
define( 'LasLie\ThemeStyleDarkmode\DIRNAME', plugin_dir_path( __FILE__ ) );
define( 'LasLie\ThemeStyleDarkmode\DIRURL', plugin_dir_url( __FILE__ ) );
}
// Load config and main plugin file.
require_once plugin_dir_path( __FILE__ ) . 'includes/Config.php';
require_once plugin_dir_path( __FILE__ ) . 'includes/Plugin.php';
// Initialize the plugin.
$plugin = new Plugin();
$plugin->init();