From be29d8f0c6c63534ea50f55d23b8ca392105a3a6 Mon Sep 17 00:00:00 2001 From: n0099 Date: Sat, 26 Jun 2021 09:27:09 +0800 Subject: [PATCH] fix: child theme style.css loading rules (#389) --- inc/theme-core.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/inc/theme-core.php b/inc/theme-core.php index 55012ee..2d18504 100644 --- a/inc/theme-core.php +++ b/inc/theme-core.php @@ -45,10 +45,9 @@ function theme_autoload() if (kratos_option('g_fontawesome', false)) { wp_enqueue_style('fontawesome', ASSET_PATH . '/assets/css/fontawesome.min.css', array(), '5.15.2'); } - if (kratos_option('g_cdn', false) && !is_child_theme()) { - wp_enqueue_style('kratos', 'https://cdn.jsdelivr.net/gh/vtrois/kratos@' . THEME_VERSION . '/style.css' , array(), THEME_VERSION); - } else { - wp_enqueue_style('kratos', get_stylesheet_uri(), array(), THEME_VERSION); + wp_enqueue_style('kratos', ASSET_PATH . '/style.css', array(), THEME_VERSION); + if (is_child_theme()) { + wp_enqueue_style('kratos-child', get_stylesheet_uri(), array(), wp_get_theme()->get('Version')); } if (kratos_option('g_adminbar', true)) { $admin_bar_css = "