X7ROOT File Manager
Current Path:
/home/notabjze/hourglass.life/wp-content/themes/smart-mag/inc
home
/
notabjze
/
hourglass.life
/
wp-content
/
themes
/
smart-mag
/
inc
/
ðŸ“
..
ðŸ“
admin
📄
admin.php
(6.3 KB)
ðŸ“
amp
📄
archives.php
(3.35 KB)
📄
authenticate.php
(3.25 KB)
📄
bunyad.php
(711 B)
ðŸ“
core
📄
custom-codes.php
(8.22 KB)
📄
custom-css.php
(5.5 KB)
📄
customizer.php
(1.5 KB)
📄
dark-mode.php
(1.61 KB)
ðŸ“
demos
ðŸ“
integrations
📄
lazyload.php
(9.45 KB)
📄
legacy.php
(5.03 KB)
📄
media.php
(22.27 KB)
📄
navigation.php
(1.15 KB)
📄
schema.php
(6.7 KB)
📄
search.php
(2 KB)
📄
social.php
(3.71 KB)
📄
theme.php
(30.59 KB)
Editing: dark-mode.php
<?php /** * Extra functions related to dark mode. */ class Bunyad_Theme_DarkMode { public function __construct() { add_action('bunyad_theme_init', [$this, 'init']); } public function init() { add_action('wp_head', [$this, 'add_js']); // Add the root class. add_filter('bunyad_html_root_class', [$this, 'add_root_class']); } /** * This CANNOT be an enqueue as it's required inline early as possible. Otherwise * the dark mode will have a flash of light mode. */ public function add_js() { if (Bunyad::amp()->active()) { return; } $scheme_key = esc_js( apply_filters('bunyad_scheme_store_key', 'bunyad-scheme') ); echo " <script> var BunyadSchemeKey = '{$scheme_key}'; (() => { const d = document.documentElement; const c = d.classList; const scheme = localStorage.getItem(BunyadSchemeKey); if (scheme) { d.dataset.origClass = c; scheme === 'dark' ? c.remove('s-light', 'site-s-light') : c.remove('s-dark', 'site-s-dark'); c.add('site-s-' + scheme, 's-' + scheme); } })(); </script> "; } /** * Filter callback: Add scheme classes for the HTML root element. * * @param string $classes * @return string */ public function add_root_class($classes) { $scheme_class = 's-light site-s-light'; if (Bunyad::options()->color_scheme === 'dark') { $scheme_class = 's-dark site-s-dark'; } if ($scheme_class) { $classes .= $classes ? ' ' : ''; $classes .= $scheme_class; } return $classes; } } // init and make available in Bunyad::get('dark_mode') Bunyad::register('dark_mode', [ 'class' => 'Bunyad_Theme_DarkMode', 'init' => true ]);
Upload File
Create Folder