管理员评论回复通知可选
This commit is contained in:
parent
8d5e6a8fa5
commit
a1f8da8569
|
@ -871,7 +871,8 @@ function comment_mail_notify($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;
|
||||||
$mail_notify = akina_option('mail_notify') ? get_comment_meta($parent_id,'mail_notify',false) : false;
|
$mail_notify = akina_option('mail_notify') ? get_comment_meta($parent_id,'mail_notify',false) : false;
|
||||||
if(($parent_id != '') && ($spam_confirmed != 'spam') && (!$mail_notify)){
|
$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") . '] 的留言有了回应';
|
||||||
|
|
|
@ -1062,6 +1062,13 @@ function optionsframework_options() {
|
||||||
'std' => '0',
|
'std' => '0',
|
||||||
'type' => 'checkbox');
|
'type' => 'checkbox');
|
||||||
|
|
||||||
|
$options[] = array(
|
||||||
|
'name' => __('邮件回复通知管理员', 'options_framework_theme'),
|
||||||
|
'desc' => __('当管理员评论收到回复时是否使用邮件通知', 'options_framework_theme'),
|
||||||
|
'id' => 'admin_notify',
|
||||||
|
'std' => '0',
|
||||||
|
'type' => 'checkbox');
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
'name' => __('允许私密评论', 'options_framework_theme'),
|
'name' => __('允许私密评论', 'options_framework_theme'),
|
||||||
'desc' => __('允许用户设置自己的评论对其他人不可见', 'options_framework_theme'),
|
'desc' => __('允许用户设置自己的评论对其他人不可见', 'options_framework_theme'),
|
||||||
|
|
Loading…
Reference in New Issue