外贸独立站的底层设计密码WordPress 成品站模板
当前位置:首页>WordPress建站>网站维护>修改 WordPress 后台自动更新后接收通知的邮箱地址

修改 WordPress 后台自动更新后接收通知的邮箱地址

从 WordPress 3.7 开始,WordPress就支持后台静默更新了,你可以根据 WordPress 3.7+ 配置后台自动更新 或 通过 Update Control 插件配置更新选项。默认情况下,WordPress自动更新后,会发送一封邮件到 后台 >设置>常规 中的 电子邮件地址,可能你并不想发送到这里设置的邮箱,也不想修改这里的设置,下面我们就来单独设置一个接收邮箱。

你可以将下面代码保存为一个 php 文件,然后上传到WP的插件目录,启用即可:

<?php
/*
Plugin Name: Change WordPress auto update email address
Plugin URI: http://www.iweb.co.uk/
Description: Change the email address auto update notifications are sent to following an automatic update.
Version: 1.0
Author: iWeb
Author URI: http://www.iweb.co.uk/
*/
function iweb_filter_auto_update_email( $email ) {
	$email['to'] = 'username@example.com'; // 修改这里的邮箱地址
	return $email;
}
add_filter( 'auto_core_update_email', 'iweb_filter_auto_update_email', 1 );

或者可以尝试将代码(记得去掉代码第一行的 <?php 哦)添加到当前主题的 functions.php ,下同。(该操作未经测试,请热心朋友测试后反馈一下哦)

你还可以下载安装 Background Update Notification Email Address 插件,启用后在后台就可以设置接收邮箱。

如果你想禁止发送邮件通知,可以将下面代码保存为一个 php 文件,然后上传到WP的插件目录,启用即可:

<?php
/*
Plugin Name: Disable all WordPress auto update email notifications
Plugin URI: http://www.iweb.co.uk/
Description: Disable all WordPress auto update email notifications following an automatic update.
Version: 1.0
Author: iWeb
Author URI: http://www.iweb.co.uk/
*/
add_filter( 'auto_core_update_send_email', '__return_false' );

参考资料:http://www.iwebsolutions.co.uk/blog/change-wordpress-auto-update-email-address/

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

给TA打赏
共{{data.count}}人
人已打赏
欢迎关注WordPress大学公众号 WPDAXUE
网站维护

通过 functions.php 文件删除 WordPress 的文章版本

2014-2-12 10:49:16

网站维护

让移动主题显示切换到“桌面版(电脑版)”链接(Any Mobile Theme Switcher)

2014-4-21 7:50:25

2 条回复 A文章作者 M管理员
  1. 超級efly

    支持一下~

  2. 不错,自动更新最强大.

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索