WordPress宣告文章或者更新文章会发邮件见告已经注册的站有章宣用户
,已经由测试,新文暗区突围科技网站用户不想给邮箱打扰可能在新闻见告中作废掉文章品评该选项
记患上把代码放在主问题录下functions.php文件中

//邮件见告 function newPostNotify($post_ID) { if( wp_is_post_revision($post_ID) ) return; global $wpdb; $blogurl = get_bloginfo(url); //取患上首页链接 $get_post_info = get_post($post_ID); if ( $get_post_info->post_status == publish && $_POST[original_post_status] != publish ) { // 读数据库 ,发送
暗区突围RAY直装版取患上所实用户的邮件用户
暗区突围RAY开挂辅助器email $wp_user_email = $wpdb->get_results("SELECT DISTINCT * FROM $wpdb->users"); // 挨次给每一个Email发邮件 foreach ( $wp_user_email as $email ) { $user_id = $email->ID; //用户是否接管 if (!zib_msg_is_allow_receive($user_id, posts)) {return;} $fsemail = $email->user_email; // 邮件问题:博客有新文章 $subject = 博客有新文章; // 邮件内容
:新文章网址 :+ URL $message = 您好
!.$email->display_name.您浏览过的见告
RAY暗区直装辅助博客更新了一篇新文章
: . get_permalink($post_ID).若有打扰在新闻见告中封锁掉文章品评选项即可; // 发邮件 wp_mail($fsemail, $subject, $message); } } } add_action(publish_post, newPostNotify);