-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
46eec95
commit 8abed76
Showing
3 changed files
with
27 additions
and
7 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.editor-styles-wrapper .wp-site-blocks, | ||
.editor-styles-wrapper>.is-root-container, | ||
.editor-styles-wrapper .edit-post-visual-editor__post-title-wrapper, | ||
.editor-styles-wrapper .wp-block-group.alignfull, | ||
.editor-styles-wrapper .wp-block-group.has-background, | ||
.editor-styles-wrapper .wp-block-cover.alignfull, | ||
.editor-styles-wrapper .is-root-container .wp-block[data-align="full"]>.wp-block-group, | ||
.editor-styles-wrapper .is-root-container .wp-block[data-align="full"]>.wp-block-cover { | ||
padding-left: max(1.25rem, 5vw); | ||
padding-right: max(1.25rem, 5vw); | ||
} |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* 文章相关函数 | ||
* @author Seaton Jiang <[email protected]> | ||
* @license GPL-3.0 License | ||
* @version 2022.02.20 | ||
* @version 2022.05.01 | ||
*/ | ||
|
||
// 文章链接添加 target 和 rel | ||
|
@@ -455,9 +455,10 @@ function post_seo_callback($post) | |
} | ||
|
||
if (kratos_option('g_image_filter', true)) { | ||
add_action( 'admin_footer-post-new.php', 'fanly_mediapanel_lock_uploaded' ); | ||
add_action( 'admin_footer-post.php', 'fanly_mediapanel_lock_uploaded' ); | ||
function fanly_mediapanel_lock_uploaded() { | ||
add_action('admin_footer-post-new.php', 'fanly_mediapanel_lock_uploaded'); | ||
add_action('admin_footer-post.php', 'fanly_mediapanel_lock_uploaded'); | ||
function fanly_mediapanel_lock_uploaded() | ||
{ | ||
echo '<script type="text/javascript">var $i=0;jQuery(document).on("DOMNodeInserted", function(){if(jQuery("#media-attachment-filters").length>0&&$i==0){jQuery(\'select.attachment-filters [value="uploaded"]\').attr(\'selected\',true).parent().trigger(\'change\');$i++;}});</script>'; | ||
} | ||
} | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* 核心函数 | ||
* @author Seaton Jiang <[email protected]> | ||
* @license GPL-3.0 License | ||
* @version 2022.04.30 | ||
* @version 2022.05.01 | ||
*/ | ||
|
||
// CDN 资源地址 | ||
|
@@ -76,10 +76,10 @@ function theme_autoload() | |
wp_add_inline_style('kratos', " | ||
@media screen and (min-width: 992px) { | ||
.k-nav .navbar-brand h1 { | ||
color: ". kratos_option('g_nav', '#ffffff') ."; | ||
color: " . kratos_option('g_nav', '#ffffff') . "; | ||
} | ||
.k-nav .navbar-nav > li.nav-item > a { | ||
color: ". kratos_option('g_nav', '#ffffff') ."; | ||
color: " . kratos_option('g_nav', '#ffffff') . "; | ||
} | ||
} | ||
"); | ||
|
@@ -114,6 +114,14 @@ function theme_autoload() | |
} | ||
add_action('wp_enqueue_scripts', 'theme_autoload'); | ||
|
||
// 后台资源加载 | ||
function kratos_admin_enqueue() | ||
{ | ||
wp_enqueue_style('admin-custom-css', get_template_directory_uri() . '/assets/css/admin.css', array(), filemtime(get_stylesheet_directory() . '/assets/css/admin.css')); | ||
} | ||
|
||
add_action('admin_enqueue_scripts', 'kratos_admin_enqueue', 20); | ||
|
||
// 前台管理员导航 | ||
if (!kratos_option('g_adminbar', true)) { | ||
add_filter('show_admin_bar', '__return_false'); | ||
|