update to v3.1.4
This commit is contained in:
parent
0b3257b174
commit
e05ee03152
|
@ -7,7 +7,7 @@
|
||||||
-webkit-text-size-adjust: 100%;
|
-webkit-text-size-adjust: 100%;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: #24292e;
|
color: #24292e;
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
/*font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";*/
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
|
|
@ -79,10 +79,6 @@
|
||||||
</table>
|
</table>
|
||||||
<div class="bili-container motion-container">' . push_bili_smilies() . '</div>
|
<div class="bili-container motion-container">' . push_bili_smilies() . '</div>
|
||||||
<div class="menhera-container motion-container" style="display:none;">
|
<div class="menhera-container motion-container" style="display:none;">
|
||||||
<!--<img onclick="grin('."'"."https:\/\/cloud.moezx.cc\/Picture\/emotion\/Menhera-chan\/1.jpg"."'".',type = \'Img\')"
|
|
||||||
src="https://cloud.moezx.cc/Picture/emotion/Menhera-chan/1.jpg"
|
|
||||||
style="width: 200px;display: block;margin-left: auto;margin-right: auto;">
|
|
||||||
<p style="text-align: center;">Menhera 酱施工中... 你知道吗?下面可以直接上传图片啦~</p>-->
|
|
||||||
'.push_emoji_panel().'
|
'.push_emoji_panel().'
|
||||||
</div>
|
</div>
|
||||||
<div class="tieba-container motion-container" style="display:none;">' . push_smilies() . '</div>
|
<div class="tieba-container motion-container" style="display:none;">' . push_smilies() . '</div>
|
||||||
|
@ -91,13 +87,13 @@
|
||||||
'comment_notes_after' => '',
|
'comment_notes_after' => '',
|
||||||
'comment_notes_before' => '',
|
'comment_notes_before' => '',
|
||||||
'fields' => apply_filters( 'comment_form_default_fields', array(
|
'fields' => apply_filters( 'comment_form_default_fields', array(
|
||||||
'avatar' => '<div class="comment-user-avatar"><img src="https://gravatar.shino.cc/avatar/f11f237b3de93c93b24045e71f7f65c6?s=80&d=mm&r=g"><div class="socila-check qq-check"><i class="fa fa-qq" aria-hidden="true"></i></div><div class="socila-check gravatar-check"><i class="fa fa-google" aria-hidden="true"></i></div></div>',
|
'avatar' => '<div class="cmt-info-container"><div class="comment-user-avatar"><img src="https://gravatar.shino.cc/avatar/f11f237b3de93c93b24045e71f7f65c6?s=80&d=mm&r=g"><div class="socila-check qq-check"><i class="fa fa-qq" aria-hidden="true"></i></div><div class="socila-check gravatar-check"><i class="fa fa-google" aria-hidden="true"></i></div></div>',
|
||||||
'author' =>
|
'author' =>
|
||||||
'<div class="popup cmt-popup cmt-author" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -115px;width: 230px;">输入QQ号将自动拉取昵称和头像</span><input type="text" placeholder="' . esc_attr__('昵称或QQ号', 'akina') . ' ' . ( $req ? '(' . esc_attr__('必须 Name* ', 'akina') . ')' : '') . '" name="author" id="author" value="' . esc_attr($comment_author) . '" size="22" autocomplete="off" tabindex="1" ' . ($req ? "aria-required='true'" : '' ). ' /></div>',
|
'<div class="popup cmt-popup cmt-author" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -115px;width: 230px;">输入QQ号将自动拉取昵称和头像</span><input type="text" placeholder="' . esc_attr__('昵称或QQ号', 'akina') . ' ' . ( $req ? '(' . esc_attr__('必须 Name* ', 'akina') . ')' : '') . '" name="author" id="author" value="' . esc_attr($comment_author) . '" size="22" autocomplete="off" tabindex="1" ' . ($req ? "aria-required='true'" : '' ). ' /></div>',
|
||||||
'email' =>
|
'email' =>
|
||||||
'<div class="popup cmt-popup" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -65px;width: 130px;">你将收到回复通知</span><input type="text" placeholder="' . esc_attr__('邮箱', 'akina') . ' ' . ( $req ? '(' . esc_attr__('必须 Email* ', 'akina') . ')' : '') . '" name="email" id="email" value="' . esc_attr($comment_author_email) . '" size="22" tabindex="1" autocomplete="off" ' . ($req ? "aria-required='true'" : '' ). ' /></div>',
|
'<div class="popup cmt-popup" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -65px;width: 130px;">你将收到回复通知</span><input type="text" placeholder="' . esc_attr__('邮箱', 'akina') . ' ' . ( $req ? '(' . esc_attr__('必须 Email* ', 'akina') . ')' : '') . '" name="email" id="email" value="' . esc_attr($comment_author_email) . '" size="22" tabindex="1" autocomplete="off" ' . ($req ? "aria-required='true'" : '' ). ' /></div>',
|
||||||
'url' =>
|
'url' =>
|
||||||
'<div class="popup cmt-popup" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -55px;width: 110px;">禁止小广告😀</span><input type="text" placeholder="' . esc_attr__('网站 (选填 Site)', 'akina') . '" name="url" id="url" value="' . esc_attr($comment_author_url) . '" size="22" autocomplete="off" tabindex="1" /></div>' . $robot_comments . $private_ms ,
|
'<div class="popup cmt-popup" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -55px;width: 110px;">禁止小广告😀</span><input type="text" placeholder="' . esc_attr__('网站 (选填 Site)', 'akina') . '" name="url" id="url" value="' . esc_attr($comment_author_url) . '" size="22" autocomplete="off" tabindex="1" /></div></div>' . $robot_comments . $private_ms ,
|
||||||
'qq' =>
|
'qq' =>
|
||||||
'<input type="text" placeholder="' . esc_attr__('QQ', 'akina') . '" name="new_field_qq" id="qq" value="' . esc_attr($comment_author_url) . '" style="display:none" autocomplete="off"/><!--此栏不可见-->'
|
'<input type="text" placeholder="' . esc_attr__('QQ', 'akina') . '" name="new_field_qq" id="qq" value="' . esc_attr($comment_author_url) . '" style="display:none" autocomplete="off"/><!--此栏不可见-->'
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
* @package Sakura
|
* @package Sakura
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define( 'SAKURA_VERSION', '3.1.3' );
|
define( 'SAKURA_VERSION', '3.1.4' );
|
||||||
|
define( 'BUILD_VERSION', '1' );
|
||||||
define( 'JSDELIVR_VERSION', '3.6.7' );
|
define( 'JSDELIVR_VERSION', '3.6.7' );
|
||||||
|
|
||||||
//ini_set('display_errors', true);
|
//ini_set('display_errors', true);
|
||||||
|
@ -1276,15 +1277,48 @@ function remove_dashboard () {
|
||||||
add_action('admin_menu', 'remove_dashboard');
|
add_action('admin_menu', 'remove_dashboard');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the except length to 20 words. 限制摘要长度(似乎无效)
|
* Filter the except length to 20 words. 限制摘要长度
|
||||||
*
|
*
|
||||||
* @param int $length Excerpt length.
|
* @param int $length Excerpt length.
|
||||||
* @return int (Maybe) modified excerpt length.
|
* @return int (Maybe) modified excerpt length.
|
||||||
*/
|
*/
|
||||||
function wpdocs_custom_excerpt_length( $length ) {
|
|
||||||
return 50;
|
function GBsubstr($string, $start, $length) {
|
||||||
|
if (strlen($string) > $length) {
|
||||||
|
$str = null;
|
||||||
|
$len = 0;
|
||||||
|
$i = $start;
|
||||||
|
while ( $len < $length) {
|
||||||
|
if (ord(substr($string, $i, 1)) > 0xc0) {
|
||||||
|
$str .=substr($string, $i, 3);
|
||||||
|
$i+= 3;
|
||||||
|
}elseif (ord(substr($string, $i, 1)) > 0xa0) {
|
||||||
|
$str .= substr($string, $i, 2);
|
||||||
|
$i+= 2;
|
||||||
|
}else {
|
||||||
|
$str.=substr($string, $i, 1);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
$len ++;
|
||||||
|
}
|
||||||
|
return $str;
|
||||||
|
}else {
|
||||||
|
return $string;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
add_filter( 'excerpt_length', 'wpdocs_custom_excerpt_length', 999 );
|
|
||||||
|
function excerpt_length($exp) {
|
||||||
|
if (!function_exists(mb_substr)) {
|
||||||
|
$exp = GBsubstr($exp, 0, 80);
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* To use mb_substr() function, you should uncomment "extension=php_mbstring.dll" in php.ini
|
||||||
|
*/
|
||||||
|
$exp = mb_substr($exp, 0, 80);
|
||||||
|
}
|
||||||
|
return $exp;
|
||||||
|
}
|
||||||
|
add_filter( 'the_excerpt', 'excerpt_length' );
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1302,6 +1336,7 @@ add_filter('site_url', 'wpadmin_filter', 10, 3);
|
||||||
|
|
||||||
function admin_style() {
|
function admin_style() {
|
||||||
wp_enqueue_style('admin-styles-fix-icon', get_site_url() . '/wp-includes/css/dashicons.css');
|
wp_enqueue_style('admin-styles-fix-icon', get_site_url() . '/wp-includes/css/dashicons.css');
|
||||||
|
wp_enqueue_style('cus-styles-light', get_site_url() . '/wp-content/themes/Sakura/inc/css/dashboard-fix.css');
|
||||||
if ( get_user_option( 'admin_color' ) == "light" ) {
|
if ( get_user_option( 'admin_color' ) == "light" ) {
|
||||||
wp_enqueue_style('cus-styles-light', get_site_url() . '/wp-content/themes/Sakura/inc/css/dashboard-light.css');
|
wp_enqueue_style('cus-styles-light', get_site_url() . '/wp-content/themes/Sakura/inc/css/dashboard-light.css');
|
||||||
}
|
}
|
||||||
|
@ -1309,11 +1344,22 @@ function admin_style() {
|
||||||
add_action('admin_enqueue_scripts', 'admin_style');
|
add_action('admin_enqueue_scripts', 'admin_style');
|
||||||
|
|
||||||
function custom_register_admin_scripts() {
|
function custom_register_admin_scripts() {
|
||||||
wp_enqueue_script( 'lazyload', 'https://cdn.jsdelivr.net/npm/lazyload@2.0.0-beta.2/lazyload.min.js' );
|
wp_enqueue_script( 'lazyload', 'https://cdn.jsdelivr.net/npm/lazyload@2.0.0-beta.2/lazyload.min.js' );
|
||||||
}
|
}
|
||||||
add_action( 'admin_enqueue_scripts', 'custom_register_admin_scripts' );
|
add_action( 'admin_enqueue_scripts', 'custom_register_admin_scripts' );
|
||||||
|
|
||||||
|
function custom_admin_js() {
|
||||||
|
echo '<script>
|
||||||
|
window.onload=function(){
|
||||||
|
lazyload();
|
||||||
|
|
||||||
|
document.querySelector("#scheme-tip .notice-dismiss").addEventListener("click", function(){
|
||||||
|
location.href="?scheme-tip-dismissed'.BUILD_VERSION.'";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>';
|
||||||
|
}
|
||||||
|
add_action('admin_footer', 'custom_admin_js');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 后台通知
|
* 后台通知
|
||||||
|
@ -1357,16 +1403,23 @@ function recommend_light() {
|
||||||
if ( get_user_locale( get_current_user_id() ) == "ja-JP") {
|
if ( get_user_locale( get_current_user_id() ) == "ja-JP") {
|
||||||
$msg = '<b>管理画面の配色「ライト」を使用することをお勧めします。</b>';
|
$msg = '<b>管理画面の配色「ライト」を使用することをお勧めします。</b>';
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
<div class="notice notice-success is-dismissible">
|
$user_id = get_current_user_id();
|
||||||
<p><?php _e( $msg, 'sample-text-domain' ); ?></p>
|
if ( !get_user_meta( $user_id, 'scheme-tip-dismissed'.BUILD_VERSION ) ) {
|
||||||
</div>
|
echo '<div class="notice notice-success is-dismissible" id="scheme-tip"><p><b>'.$msg.'</b></p></div>';
|
||||||
<?php
|
}
|
||||||
}
|
}
|
||||||
if ( get_user_option( 'admin_color' ) != "light" ) {
|
if ( get_user_option( 'admin_color' ) != "light" ) {
|
||||||
add_action( 'admin_notices', 'recommend_light' );
|
add_action( 'admin_notices', 'recommend_light' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function scheme_tip_dismissed() {
|
||||||
|
$user_id = get_current_user_id();
|
||||||
|
if ( isset( $_GET['scheme-tip-dismissed'.BUILD_VERSION] ) )
|
||||||
|
add_user_meta( $user_id, 'scheme-tip-dismissed'.BUILD_VERSION, 'true', true );
|
||||||
|
}
|
||||||
|
add_action( 'admin_init', 'scheme_tip_dismissed' );
|
||||||
|
|
||||||
|
|
||||||
// 阻止垃圾注册
|
// 阻止垃圾注册
|
||||||
add_action( 'register_post', 'codecheese_register_post', 10, 3 );
|
add_action( 'register_post', 'codecheese_register_post', 10, 3 );
|
||||||
|
|
|
@ -0,0 +1,79 @@
|
||||||
|
/* emotion²»ºÍ¾ßÐÞÕý*/
|
||||||
|
/*bilibili񡀂*/
|
||||||
|
.emotion-box {
|
||||||
|
padding-left: 16px;
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-orient: horizontal;
|
||||||
|
-webkit-box-direction: normal;
|
||||||
|
-ms-flex-direction: row;
|
||||||
|
flex-direction: row;
|
||||||
|
-ms-flex-wrap: wrap;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.emotion-inline {
|
||||||
|
padding-left: 0px !important;
|
||||||
|
padding-right: 0px !important;
|
||||||
|
}
|
||||||
|
.emotion-item {
|
||||||
|
margin: 6px;
|
||||||
|
display: inline-block;
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-bottom: -8px;
|
||||||
|
}
|
||||||
|
.emotion-secter {
|
||||||
|
margin: 12px 12px 0 0;
|
||||||
|
}
|
||||||
|
@media (max-width: 860px) {
|
||||||
|
.emotion-box {
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
.emotion-item {
|
||||||
|
transform: scale(0.6);
|
||||||
|
margin-bottom: -10px;
|
||||||
|
}
|
||||||
|
.emotion-secter {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.emotion-item .img {
|
||||||
|
-webkit-animation: im-emotion-step 1.08s steps(27) infinite;
|
||||||
|
animation: im-emotion-step 1.08s steps(27) infinite;
|
||||||
|
animation-duration: 1.08s;
|
||||||
|
animation-timing-function: steps(27);
|
||||||
|
}
|
||||||
|
|
||||||
|
.emotion-item .img {
|
||||||
|
width: 32px;
|
||||||
|
height: 864px;
|
||||||
|
max-width: 32px;
|
||||||
|
background: top/32px no-repeat;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes im-emotion-step {
|
||||||
|
0% {
|
||||||
|
-webkit-transform:translateY(0);
|
||||||
|
transform:translateY(0)
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform:translateY(-100%);
|
||||||
|
transform:translateY(-100%)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes im-emotion-step {
|
||||||
|
0% {
|
||||||
|
-webkit-transform:translateY(0);
|
||||||
|
transform:translateY(0)
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform:translateY(-100%);
|
||||||
|
transform:translateY(-100%)
|
||||||
|
}
|
||||||
|
}
|
|
@ -72,84 +72,4 @@ tr {
|
||||||
|
|
||||||
.wp-submenu .wp-submenu-wrap {
|
.wp-submenu .wp-submenu-wrap {
|
||||||
background: #ffffff !important;
|
background: #ffffff !important;
|
||||||
}
|
|
||||||
|
|
||||||
// emotion²»ºÍ¾ßÐÞÕý
|
|
||||||
/*bilibili񡀂*/
|
|
||||||
.emotion-box {
|
|
||||||
padding-left: 16px;
|
|
||||||
display: -webkit-box;
|
|
||||||
display: -ms-flexbox;
|
|
||||||
display: flex;
|
|
||||||
-webkit-box-orient: horizontal;
|
|
||||||
-webkit-box-direction: normal;
|
|
||||||
-ms-flex-direction: row;
|
|
||||||
flex-direction: row;
|
|
||||||
-ms-flex-wrap: wrap;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.emotion-inline {
|
|
||||||
padding-left: 0px !important;
|
|
||||||
padding-right: 0px !important;
|
|
||||||
}
|
|
||||||
.emotion-item {
|
|
||||||
margin: 6px;
|
|
||||||
display: inline-block;
|
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
overflow: hidden;
|
|
||||||
border-radius: 4px;
|
|
||||||
margin-bottom: -8px;
|
|
||||||
}
|
|
||||||
.emotion-secter {
|
|
||||||
margin: 12px 12px 0 0;
|
|
||||||
}
|
|
||||||
@media (max-width: 860px) {
|
|
||||||
.emotion-box {
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
.emotion-item {
|
|
||||||
transform: scale(0.6);
|
|
||||||
margin-bottom: -10px;
|
|
||||||
}
|
|
||||||
.emotion-secter {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.emotion-item .img {
|
|
||||||
-webkit-animation: im-emotion-step 1.08s steps(27) infinite;
|
|
||||||
animation: im-emotion-step 1.08s steps(27) infinite;
|
|
||||||
animation-duration: 1.08s;
|
|
||||||
animation-timing-function: steps(27);
|
|
||||||
}
|
|
||||||
|
|
||||||
.emotion-item .img {
|
|
||||||
width: 32px;
|
|
||||||
height: 864px;
|
|
||||||
max-width: 32px;
|
|
||||||
background: top/32px no-repeat;
|
|
||||||
background-image: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes im-emotion-step {
|
|
||||||
0% {
|
|
||||||
-webkit-transform:translateY(0);
|
|
||||||
transform:translateY(0)
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform:translateY(-100%);
|
|
||||||
transform:translateY(-100%)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes im-emotion-step {
|
|
||||||
0% {
|
|
||||||
-webkit-transform:translateY(0);
|
|
||||||
transform:translateY(0)
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform:translateY(-100%);
|
|
||||||
transform:translateY(-100%)
|
|
||||||
}
|
|
||||||
}
|
}
|
16
style.css
16
style.css
|
@ -7505,7 +7505,6 @@ a.toc-link {
|
||||||
.comment-user-avatar {
|
.comment-user-avatar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
float: left;
|
|
||||||
width: 64px;
|
width: 64px;
|
||||||
height: 64px;
|
height: 64px;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
@ -7547,7 +7546,7 @@ a.toc-link {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
width: 45px;
|
width: 45px;
|
||||||
height: 55px;
|
height: 55px;
|
||||||
right: 36px
|
right: 11%
|
||||||
}
|
}
|
||||||
.comment-user-avatar .socila-check {
|
.comment-user-avatar .socila-check {
|
||||||
width: 1.5em;
|
width: 1.5em;
|
||||||
|
@ -7563,7 +7562,16 @@ a.toc-link {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
}
|
}
|
||||||
|
@media (min-width: 625px){
|
||||||
|
.cmt-info-container {
|
||||||
|
width: 100%;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row nowrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: stretch
|
||||||
|
}
|
||||||
|
}
|
||||||
.cmt-popup {
|
.cmt-popup {
|
||||||
margin: 0 0 40px 1%;
|
margin: 0 0 40px 1%;
|
||||||
--widthA: 97%;
|
--widthA: 97%;
|
||||||
|
@ -8228,7 +8236,7 @@ td.hljs-ln-numbers {
|
||||||
}
|
}
|
||||||
|
|
||||||
.control-btn-serif {
|
.control-btn-serif {
|
||||||
font-family: 'Noto Serif CJK SC', 'Noto Serif CJK', serif
|
font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Source Han Serif', source-han-serif-sc, 'PT Serif', 'SongTi SC', 'MicroSoft Yahei', Georgia, serif
|
||||||
}
|
}
|
||||||
|
|
||||||
.control-btn-sans-serif {
|
.control-btn-sans-serif {
|
||||||
|
|
Loading…
Reference in New Issue