Skip to content

Instantly share code, notes, and snippets.

@fritids
Last active August 29, 2015 14:09
Show Gist options
  • Save fritids/f04b52c2c40940f3e9ef to your computer and use it in GitHub Desktop.
Save fritids/f04b52c2c40940f3e9ef to your computer and use it in GitHub Desktop.
Files/functions where wp_mail() is used
=======================================
retrieve_password() in wp-login.php
subject filter: 'retrieve_password_title'
content filter: 'retrieve_password_message' (content, key)
disable with: 'allow_password_reset' filter (boolean)
wp-admin/ms-delete-site.php
subject filter: none
content filter: 'delete_site_email_content'
disable with: none
wp-admin/user-new.php
subject filter: none
content filter: none
disable with: Check the "Add the user without sending them a confirmation email" checkbox when adding user ($_POST['noconfirmation'])
update_option_new_admin_email() in wp-admin/includes/ms.php
subject filter: none
content filter: 'new_admin_email_content'
disable with: none (disabling will prevent change of email address) @TODO not techincally true if the filter sends the email
send_confirmation_on_profile_email() in wp-admin/includes/ms.php
subject filter: none
content filter: 'new_user_email_content'
disable with: none (disabling will prevent change of email address) @TODO not techincally true if the filter sends the email
wp_new_blog_notification() in wp-admin/includes/upgrade.php
pluggable in wp-content/install.php
wp-admin/network/site-new.php
subject filter: none
content filter: none
disable with: none (ffs)
wpmu_signup_blog_notification() in wp-includes/ms-functions.php
subject filter: 'wpmu_signup_blog_notification_subject'
content filter: 'wpmu_signup_blog_notification_email'
disable with: 'wpmu_signup_blog_notification' filter (boolean)
wpmu_signup_user_notification() in wp-includes/ms-functions.php
subject filter: 'wpmu_signup_user_notification_subject'
content filter: 'wpmu_signup_user_notification_email'
disable with: 'wpmu_signup_user_notification' filter (boolean)
newblog_notify_siteadmin() in wp-includes/ms-functions.php
subject filter: none
content filter: 'newblog_notify_siteadmin'
disable with: "Registration notification" setting in network admin ('registrationnotification' option)
newuser_notify_siteadmin() in wp-includes/ms-functions.php
subject filter: none
content filter: 'newuser_notify_siteadmin'
disable with: "Registration notification" setting in network admin ('registrationnotification' option)
wpmu_welcome_notification() in wp-includes/ms-functions.php
subject filter: 'update_welcome_subject'
content filter: 'update_welcome_email' (content, blog_id, user_id, password, blog title, meta)
disable with: 'wpmu_welcome_notification' filter (boolean)
wpmu_welcome_user_notification() in wp-includes/ms-functions.php
subject filter: 'update_welcome_suser_ubject'
content filter: 'update_welcome_user_email' (content, user_id, password, meta)
disable with: 'wpmu_welcome_user_notification' filter (boolean)
wp_notify_postauthor() in wp-includes/pluggable.php
pluggable
subject filter: 'comment_notification_subject' (subject, comment_id)
content filter: 'comment_notification_text' (content, comment_id)
disable with: "E-mail me whenever" setting on Settings -> Discussion screen ('comments_notify' option)
wp_notify_moderator() in wp-includes/pluggable.php
pluggable
subject filter: 'comment_moderation_subject' (subject, comment_id)
content filter: 'comment_moderation_text' (content, comment_id)
disable with: "E-mail me whenever" setting on Settings -> Discussion screen ('moderation_notify' option)
wp_password_change_notification() in wp-includes/pluggable.php
pluggable
wp_new_user_notification() (x2) in wp-includes/pluggable.php
pluggable
Installation
============
New blog notification:
sent to admin user created during install
wp_new_blog_notification()
Login
=====
Password retrieval:
sent to user retrieving password
retrieve_password()
Password changed:
Notification that a user changed their password via password retrieval, sent to admin email
wp_password_change_notification()
New Comments
============
A comment is added
and comment is not approved
and comment moderation notifications are on
Send 'awaiting approval' notification to admin email and to post author if they can edit comments
wp_notify_moderator()
A comment is added
and comment is approved
and comment notifications are on
and comment author isn't post author
Send new comment notification to post author
wp_notify_postauthor()
An unapproved comment is moderated
and comment is approved
and comment notifications are on
and comment author isn't post author
and post author isn't current logged in user
Send new comment notification to post author
wp_notify_postauthor()
New Users
=========
Add New User - New user registration
sent to admin email
wp_new_user_notification()
sent to new user if "Send this password to the new user by email" is checked:
wp_new_user_notification()
Multisite-specific
==================
@TODO split this list into sites with registration open
= delete site confirmation =
sent to site admin when deleting site from tools -> delete site
not in a function (wp-admin/ms-delete-site.php)
= Adding an existing user to a blog from users -> add new =
invitation email sent to new user unless "Add the user without sending them a confirmation email" is checked
not in a function (wp-admin/user-new.php)
= Change site admin email address from settings =
Sent to the new site admin in order to confirm the change of email address
update_option_new_admin_email()
= Change profile email address from profile =
Sent to the new email address in order to confirm the change of profile email address
send_confirmation_on_profile_email()
= New site created from network admin -> sites -> add new =
Sent to site admin email to notify that a new site has been created
not in a function (wp-admin/network/site-new.php)
Also does 'Activate new blog' actions below
= New user acccount created from front-end (with user registration open) =
Sent to new user to verify their email address
wpmu_signup_user_notification()
= New user account and new blog created from front-end (with blog registration open) =
Sent to new user to verify their email address
wpmu_signup_blog_notification()
= Activate new user acccount =
Sent to site admin email
newuser_notify_siteadmin()
Sent to new user email
wpmu_welcome_user_notification()
= Activate new blog =
Sent to site admin email
newblog_notify_siteadmin()
Sent to new blog admin email
wpmu_welcome_notification()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment