mirror of https://github.com/vtrois/kratos
fix: centbrowser gutenberg (#492)
parent
46eec958c7
commit
8abed76f89
|
@ -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);
|
||||||
|
}
|
|
@ -4,7 +4,7 @@
|
||||||
* 文章相关函数
|
* 文章相关函数
|
||||||
* @author Seaton Jiang <hi@seatonjiang.com>
|
* @author Seaton Jiang <hi@seatonjiang.com>
|
||||||
* @license GPL-3.0 License
|
* @license GPL-3.0 License
|
||||||
* @version 2022.02.20
|
* @version 2022.05.01
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// 文章链接添加 target 和 rel
|
// 文章链接添加 target 和 rel
|
||||||
|
@ -455,9 +455,10 @@ function post_seo_callback($post)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kratos_option('g_image_filter', true)) {
|
if (kratos_option('g_image_filter', true)) {
|
||||||
add_action( 'admin_footer-post-new.php', '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' );
|
add_action('admin_footer-post.php', 'fanly_mediapanel_lock_uploaded');
|
||||||
function 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>';
|
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>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* 核心函数
|
* 核心函数
|
||||||
* @author Seaton Jiang <hi@seatonjiang.com>
|
* @author Seaton Jiang <hi@seatonjiang.com>
|
||||||
* @license GPL-3.0 License
|
* @license GPL-3.0 License
|
||||||
* @version 2022.04.30
|
* @version 2022.05.01
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// CDN 资源地址
|
// CDN 资源地址
|
||||||
|
@ -76,10 +76,10 @@ function theme_autoload()
|
||||||
wp_add_inline_style('kratos', "
|
wp_add_inline_style('kratos', "
|
||||||
@media screen and (min-width: 992px) {
|
@media screen and (min-width: 992px) {
|
||||||
.k-nav .navbar-brand h1 {
|
.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 {
|
.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');
|
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)) {
|
if (!kratos_option('g_adminbar', true)) {
|
||||||
add_filter('show_admin_bar', '__return_false');
|
add_filter('show_admin_bar', '__return_false');
|
||||||
|
|
Loading…
Reference in New Issue