This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function batuvalve_darklight_page() { | |
| if ( ! current_user_can( 'manage_options' ) ) return; | |
| // Presets and defaults (korundu) | |
| $presets = [ | |
| 'dark' => [ | |
| 'primary_color'=>'#3D42FF','secondary_color'=>'#6901FF','accent_color'=>'#2382C4', | |
| 'headline_color'=>'#F6F6F6','body_color'=>'#F6F6F6','dark_color'=>'#08051C', | |
| 'light_color'=>'#FFFFFF','white_color'=>'#FFFFFF','global_colors'=>[] | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function batuvalve_darklight_page() { | |
| if ( ! current_user_can( 'manage_options' ) ) return; | |
| // Presets and defaults (korundu) | |
| $presets = [ | |
| 'dark' => [ | |
| 'primary_color'=>'#3D42FF','secondary_color'=>'#6901FF','accent_color'=>'#2382C4', | |
| 'headline_color'=>'#F6F6F6','body_color'=>'#F6F6F6','dark_color'=>'#08051C', | |
| 'light_color'=>'#FFFFFF','white_color'=>'#FFFFFF','global_colors'=>[] | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function btvlv_darklight_activate() { | |
| $defaults_dark = [ | |
| 'default_theme' => 'dark', | |
| 'primary_color' => '#072A6B', | |
| 'secondary_color' => '#3676F1', | |
| 'accent_color' => '#2382C4', | |
| 'headline_color' => '#1F1F1E99', | |
| 'body_color' => '#1F1F1E', | |
| 'dark_color' => '#F4F4F1', | |
| 'light_color' => '#FFFFFF', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function batuvalve_darklight_page() { | |
| // Presets (used by JS) | |
| $presets = [ | |
| 'dark' => [ | |
| 'primary_color' => '#072A6B', | |
| 'secondary_color' => '#3676F1', | |
| 'accent_color' => '#2382C4', | |
| 'headline_color' => '#1F1F1E99', | |
| 'body_color' => '#1F1F1E', | |
| 'dark_color' => '#F4F4F1', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if (!defined('ABSPATH')) exit; | |
| // include the global color file (adjust path if in subfolder) | |
| require_once plugin_dir_path( __FILE__ ) . 'batuvalve-global-color.php'; | |
| // CSS ve JS enqueue | |
| add_action('wp_enqueue_scripts', function() { | |
| wp_enqueue_style( | |
| 'batuvalve-dark-light-style', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Render a Global Colors list using WordPress theme.json / global settings when available, | |
| * falling back to plugin settings/defaults. | |
| * | |
| * Paste this into your admin page function (e.g. inside batuvalve_darklight_page()). | |
| */ | |
| /** 1) Try to read the theme/global palette from WP (theme.json + user settings merged) */ | |
| $palette = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if (!defined('ABSPATH')) exit; | |
| // CSS ve JS enqueue | |
| add_action('wp_enqueue_scripts', function() { | |
| wp_enqueue_style( | |
| 'batuvalve-dark-light-style', | |
| plugin_dir_url(__DIR__) . 'assets/css/dark-light.css', | |
| array(), | |
| '1.0' |