Generalized to dynamic-theme-style

This commit is contained in:
2025-12-14 19:46:13 +01:00
parent 83f1d8f315
commit 10b7d2b261
7 changed files with 114 additions and 74 deletions

44
dynamic-theme-style.php Normal file
View File

@@ -0,0 +1,44 @@
<?php
/**
* Plugin Name: LL Dynamic Theme Style
* Plugin URI: https://git.laslie.de/wp/plugin-dynamic-theme-style
* Description: Dynamic selection of theme style variants. Supports URL-based selection and automatic switching based on browser preference.
* 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: dynamic-theme-style
* Domain Path: /languages
* Network:
* Update URI: https://git.laslie.de/wp/plugin-dynamic-theme-style
* Requires Plugins:
*/
namespace LasLie\DynamicThemeStyle;
// Abort if accessed directly.
if ( ! defined( 'ABSPATH' ) ) exit;
// Define constants for Config class.
if ( ! defined( 'LasLie\DynamicThemeStyle\DIRNAME' ) ) {
define( 'LasLie\DynamicThemeStyle\DIRNAME', plugin_dir_path( __FILE__ ) );
define( 'LasLie\DynamicThemeStyle\DIRURL', plugin_dir_url( __FILE__ ) );
}
// Load config and main plugin file.
require_once plugin_dir_path( __FILE__ ) . 'src/Config.php';
require_once plugin_dir_path( __FILE__ ) . 'src/Plugin.php';
// Initialize the plugin.
$plugin = new Plugin();
$plugin->init();