代码拉取完成,页面将自动刷新
<?php
/*
* @Description: Color scheme
* @Version: 1.1.9
* @Author: ZAXU
* @Link: https://www.zaxu.com
* @Package: ZAXU
*/
if ( !defined('ABSPATH') ) exit;
add_action('wp_enqueue_scripts', function() {
// Color scheme value start
if ( function_exists('zaxu_color_scheme_value') ) {
$bg_color = zaxu_color_scheme_value()[0];
$txt_color = zaxu_color_scheme_value()[1];
$acc_color = zaxu_color_scheme_value()[2];
} else {
$bg_color = null;
$txt_color = null;
$acc_color = null;
}
// Color scheme value end
if (get_theme_mod('zaxu_dynamic_color', 'disabled') == 'disabled') {
// General color start
$custom_css = "
/* General color css code starts here */
";
// General color end
} else {
// Dynamic color start
$custom_css = "
/* Dynamic color css code starts here */
";
// Dynamic color end
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
if ( strpos($_SERVER['HTTP_USER_AGENT'], "Triden") ) {
// IE browser start
$custom_css = "
/* IE browser css code starts here */
";
// IE browser end
}
}
}
if (get_theme_mod('zaxu_minify_engine', 'enabled') == 'enabled') {
$custom_css = str_replace(
array(
"\rn",
"\r",
"\n",
"\t",
' ',
' ',
' '
),
'',
$custom_css
);
$custom_css = preg_replace('/\/\*.*?\*\//s', '', $custom_css);
}
wp_register_style('zaxu-child-color-scheme', false);
wp_enqueue_style('zaxu-child-color-scheme');
wp_add_inline_style('zaxu-child-color-scheme', $custom_css);
}, 999);
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。