-
Notifications
You must be signed in to change notification settings - Fork 616
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add child theme support (#385)
- Loading branch information
1 parent
b18299b
commit 6883a9e
Showing
11 changed files
with
2,509 additions
and
2,518 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,10 @@ | |
* 模板函数 | ||
* @author Seaton Jiang <[email protected]> | ||
* @license MIT License | ||
* @version 2020.06.05 | ||
* @version 2020.06.25 | ||
*/ | ||
|
||
define('THEME_VERSION', wp_get_theme()->get('Version')); | ||
define('THEME_VERSION', '3.3.2'); | ||
|
||
// 主题配置 | ||
require get_template_directory() . '/inc/options-framework/autoload.php'; | ||
|
@@ -39,7 +39,4 @@ | |
require get_template_directory() . '/inc/theme-volcengine.php'; | ||
|
||
// SMTP 配置 | ||
require get_template_directory() . '/inc/theme-smtp.php'; | ||
|
||
// 自定义函数 | ||
require get_template_directory() . '/custom/custom.php'; | ||
require get_template_directory() . '/inc/theme-smtp.php'; |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* 核心函数 | ||
* @author Seaton Jiang <[email protected]> | ||
* @license MIT License | ||
* @version 2021.06.05 | ||
* @version 2021.06.25 | ||
*/ | ||
|
||
if (kratos_option('g_cdn', false)) { | ||
|
@@ -45,7 +45,11 @@ function theme_autoload() | |
if (kratos_option('g_fontawesome', false)) { | ||
wp_enqueue_style('fontawesome', ASSET_PATH . '/assets/css/fontawesome.min.css', array(), '5.15.2'); | ||
} | ||
wp_enqueue_style('kratos', ASSET_PATH . '/assets/css/kratos.min.css', array(), THEME_VERSION); | ||
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); | ||
} | ||
if (kratos_option('g_adminbar', true)) { | ||
$admin_bar_css = " | ||
@media screen and (min-width: 782px) { | ||
|
@@ -67,7 +71,6 @@ function theme_autoload() | |
wp_add_inline_style('kratos', $admin_bar_css); | ||
} | ||
} | ||
wp_enqueue_style('custom', get_template_directory_uri() . '/custom/custom.css', array(), THEME_VERSION); | ||
// js | ||
wp_deregister_script('jquery'); | ||
wp_enqueue_script('jquery', ASSET_PATH . '/assets/js/jquery.min.js', array(), '3.4.1', false); | ||
|
@@ -76,7 +79,6 @@ function theme_autoload() | |
wp_enqueue_script('sticky', ASSET_PATH . '/assets/js/theia-sticky-sidebar.min.js', array(), '1.5.0', true); | ||
wp_enqueue_script('dplayer', ASSET_PATH . '/assets/js/DPlayer.min.js', array(), THEME_VERSION, true); | ||
wp_enqueue_script('kratos', ASSET_PATH . '/assets/js/kratos.min.js', array(), THEME_VERSION, true); | ||
wp_enqueue_script('custom', get_template_directory_uri() . '/custom/custom.js', array(), THEME_VERSION, true); | ||
|
||
$data = array( | ||
'site' => home_url(), | ||
|
Oops, something went wrong.