mirror of
https://github.com/mashirozx/sakura.git
synced 2025-05-29 01:49:21 +08:00
commit
7eb741fd87
@ -52,6 +52,7 @@
|
|||||||
if(comments_open()){
|
if(comments_open()){
|
||||||
if(akina_option('norobot')) $robot_comments = '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="no-robot"><span class="siren-no-robot-checkbox siren-checkbox-radioInput"></span>滴,学生卡 | I\'m not a robot</label>';
|
if(akina_option('norobot')) $robot_comments = '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="no-robot"><span class="siren-no-robot-checkbox siren-checkbox-radioInput"></span>滴,学生卡 | I\'m not a robot</label>';
|
||||||
$private_ms = akina_option('open_private_message') ? '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="is-private"><span class="siren-is-private-checkbox siren-checkbox-radioInput"></span>悄悄话 | Comment in private</label>' : '';
|
$private_ms = akina_option('open_private_message') ? '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="is-private"><span class="siren-is-private-checkbox siren-checkbox-radioInput"></span>悄悄话 | Comment in private</label>' : '';
|
||||||
|
$mail_notify = akina_option('mail_notify') ? '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="mail-notify"><span class="siren-mail-notify-checkbox siren-checkbox-radioInput"></span>邮件通知 | Comment reply notify</label>' : '';
|
||||||
$args = array(
|
$args = array(
|
||||||
'id_form' => 'commentform',
|
'id_form' => 'commentform',
|
||||||
'id_submit' => 'submit',
|
'id_submit' => 'submit',
|
||||||
@ -93,7 +94,7 @@
|
|||||||
'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></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 . $mail_notify ,
|
||||||
'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"/><!--此栏不可见-->'
|
||||||
)
|
)
|
||||||
|
@ -37,7 +37,7 @@ function akina_setup() {
|
|||||||
* If you're building a theme based on Akina, use a find and replace
|
* If you're building a theme based on Akina, use a find and replace
|
||||||
* to change 'akina' to the name of your theme in all the template files.
|
* to change 'akina' to the name of your theme in all the template files.
|
||||||
*/
|
*/
|
||||||
load_theme_textdomain( 'akina', get_template_directory() . '/languages' );
|
load_theme_textdomain( 'sakura', get_template_directory() . '/languages' );
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -113,14 +113,14 @@ function akina_setup() {
|
|||||||
* Disable the emoji's
|
* Disable the emoji's
|
||||||
*/
|
*/
|
||||||
function disable_emojis() {
|
function disable_emojis() {
|
||||||
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
|
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
|
||||||
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
|
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
|
||||||
remove_action( 'wp_print_styles', 'print_emoji_styles' );
|
remove_action( 'wp_print_styles', 'print_emoji_styles' );
|
||||||
remove_action( 'admin_print_styles', 'print_emoji_styles' );
|
remove_action( 'admin_print_styles', 'print_emoji_styles' );
|
||||||
remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
|
remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
|
||||||
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
|
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
|
||||||
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
|
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
|
||||||
add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
|
add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
|
||||||
}
|
}
|
||||||
add_action( 'init', 'disable_emojis' );
|
add_action( 'init', 'disable_emojis' );
|
||||||
|
|
||||||
@ -870,7 +870,9 @@ function comment_mail_notify($comment_id){
|
|||||||
$comment = get_comment($comment_id);
|
$comment = get_comment($comment_id);
|
||||||
$parent_id = $comment->comment_parent ? $comment->comment_parent : '';
|
$parent_id = $comment->comment_parent ? $comment->comment_parent : '';
|
||||||
$spam_confirmed = $comment->comment_approved;
|
$spam_confirmed = $comment->comment_approved;
|
||||||
if(($parent_id != '') && ($spam_confirmed != 'spam')){
|
$mail_notify = akina_option('mail_notify') ? get_comment_meta($parent_id,'mail_notify',false) : false;
|
||||||
|
$admin_notify = akina_option('admin_notify') ? '1' : (get_comment($parent_id)->comment_author_email != get_bloginfo('admin_email') ? '1' : '0');
|
||||||
|
if(($parent_id != '') && ($spam_confirmed != 'spam') && ($admin_notify != '0') && (!$mail_notify)){
|
||||||
$wp_email = $mail_user_name . '@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));
|
$wp_email = $mail_user_name . '@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));
|
||||||
$to = trim(get_comment($parent_id)->comment_author_email);
|
$to = trim(get_comment($parent_id)->comment_author_email);
|
||||||
$subject = '你在 [' . get_option("blogname") . '] 的留言有了回应';
|
$subject = '你在 [' . get_option("blogname") . '] 的留言有了回应';
|
||||||
@ -1691,4 +1693,11 @@ if(akina_option('live_search')){
|
|||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//评论回复
|
||||||
|
function sakura_comment_notify($comment_id){
|
||||||
|
if ( !$_POST['mail-notify'] )
|
||||||
|
update_comment_meta($comment_id,'mail_notify','false');
|
||||||
|
}
|
||||||
|
add_action('comment_post', 'sakura_comment_notify');
|
||||||
|
|
||||||
//code end
|
//code end
|
||||||
|
BIN
languages/en_US.mo
Normal file
BIN
languages/en_US.mo
Normal file
Binary file not shown.
1424
languages/en_US.po
Normal file
1424
languages/en_US.po
Normal file
File diff suppressed because it is too large
Load Diff
BIN
languages/zh_CN.mo
Normal file
BIN
languages/zh_CN.mo
Normal file
Binary file not shown.
1422
languages/zh_CN.po
Normal file
1422
languages/zh_CN.po
Normal file
File diff suppressed because it is too large
Load Diff
486
options.php
486
options.php
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@ Description: Akina主题分支(原版地址 http://www.akina.pw/themeakina)
|
|||||||
Version: 3.2.7
|
Version: 3.2.7
|
||||||
License: GNU General Public License v2 or later
|
License: GNU General Public License v2 or later
|
||||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
Text Domain: Sakura
|
Text Domain: sakura
|
||||||
Tags: 樱花庄的白猫
|
Tags: 樱花庄的白猫
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user