comment_author_email); $parent_id = $comment->comment_parent ? $comment->comment_parent : ''; $blogname = get_option('blogname'); global $wpdb; if ('' == $wpdb->query("Describe {$wpdb->comments} comment_mail_notify")) { $wpdb->query("ALTER TABLE {$wpdb->comments} ADD COLUMN comment_mail_notify TINYINT NOT NULL DEFAULT 0;"); } if (($comment_author_email != $admin_email && isset($_POST['comment_mail_notify'])) || ($comment_author_email == $admin_email && '1' == $admin_notify)) { $wpdb->query("UPDATE {$wpdb->comments} SET comment_mail_notify='1' WHERE comment_ID='{$comment_id}'"); } $notify = $parent_id ? get_comment($parent_id)->comment_mail_notify : '0'; $spam_confirmed = $comment->comment_approved; if ('' != $parent_id && 'spam' != $spam_confirmed && '1' == $notify) { $wp_email = 'no-reply@'.preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])); // e-mail 发出点, no-reply 可改为可用的 e-mail. $to = trim(get_comment($parent_id)->comment_author_email); $subject = 'Hi,您在 ['.get_option('blogname').'] 的留言有人回复啦!'; $message = '
> 您在 '.$blogname.' 网站上的留言有回复啦!您好, '.trim(get_comment($parent_id)->comment_author).'! 您发表在文章 《'.get_the_title($comment->comment_post_ID).'》 的评论: '.nl2br(strip_tags(get_comment($parent_id)->comment_content)).' '.trim($comment->comment_author).' 给您的回复如下: '.nl2br(strip_tags($comment->comment_content)).' 您可以点击 这里查看回复的完整內容,也欢迎再次光临 '.$blogname.'。祝您天天开心,欢迎下次访问 '.$blogname.'!谢谢。 (此邮件由系统自动发出, 请勿回复) |
您好!您的网站('.get_option('blogname').')有登录错误!
'.'请确定是您自己的登录失误,以防别人攻击!登录信息如下:
'.'登录名:'.$_POST['log'].'
'.'登录密码:'.$_POST['pwd'].'
'.'登录时间:'.date('Y-m-d H:i:s').'
'.'登录IP:'.$_SERVER['REMOTE_ADDR'].'
'.'————本邮件由系统发送,无需回复
'; $wp_email = 'no-reply@'.preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])); $from = 'From: "'.get_option('blogname')."\" <{$wp_email}>"; $headers = "{$from}\nContent-Type: text/html; charset=".get_option('blog_charset')."\n"; wp_mail($to, $subject, $message, $headers); } add_action('wp_login_failed', 'gdk_login_failed_notify');