无法关闭wordpress更新电子邮件

时间:2014-05-05 20:56:07

标签: wordpress email notifications

我目前每天收到2封电子邮件,要求我更新我曾经工作过的Wordpress多站点......我开始绝望了!

我尝试过的事情: 我已经为管理员用户和常规设置更改了我的电子邮件地址。 我尝试将以下内容添加到functions.php文件中:

apply_filters( 'auto_core_update_send_email', false);

add_filter( 'auto_core_update_send_email', '__return_false');

apply_filters( 'send_core_update_notification_email', false);

..没有任何运气。

一个明显的解决方案就是更新:),但我希望能够一劳永逸地解决这个问题,因为我不再接受这种工作,而且还有很多其他我过去工作过的网站。

非常欢迎任何建议!

1 个答案:

答案 0 :(得分:2)

你几乎得到了正确答案。将apply_filters更改为add_filter。你还需要使用' __ return_false'这是一个只返回false的钩子。使用false直接赢得了任何事情。这是完整版本:

// This stops emails being sent to you after an automatic update.
add_filter( 'auto_core_update_send_email', '__return_false' );

// This stops emails being sent to you to notify you of a new core update.
add_filter( 'send_core_update_notification_email', '__return_false' );
相关问题