This disables all global admin emails for 'new user', 'password changed' and 'site admin email requested/changed'. This should still send out the mails to the requester or the one who should take action, but not to the global site admin.
Hopefully prevents sending more local/testing emails. I've left it on for production.
Good idea?
I placed this in a MU-plugin for now, since there's also the disallow-indexing.php one. But a lot of stuff like this is also place in the Utils\ namespace. Thoughts/preferences?
Should we base this on WP_ENV? Something like ALLOW_ADMIN_EMAILS is less implicit, but I'm not sure if it's something you'd really would like to control (and people forget stuff in the .envs all the time...).
This disables all global admin emails for 'new user', 'password changed' and 'site admin email requested/changed'. This should still send out the mails to the requester or the one who should take action, but not to the global site admin.
Hopefully prevents sending more local/testing emails. I've left it on for production.
disallow-indexing.php
one. But a lot of stuff like this is also place in theUtils\
namespace. Thoughts/preferences?WP_ENV
? Something likeALLOW_ADMIN_EMAILS
is less implicit, but I'm not sure if it's something you'd really would like to control (and people forget stuff in the.env
s all the time...).