Make WordPress Core


Ignore:
Timestamp:
09/16/2015 10:18:33 PM (10 years ago)
Author:
boonebgorges
Message:

Move new user notification emails to add_action() callbacks.

When a new user is created in various places throughout the interface,
notifications are sent to the site admin and the new user. Previously, these
notifications were fired through direct calls to wp_new_user_notification(),
making it difficult to stop or modify the messages.

This changeset introduces a number of new action hooks in place of direct calls
to wp_new_user_notification(), and hooks the new wrapper function
wp_send_new_user_notifications() to these hooks.

Props dshanske, thomaswm, boonebgorges.
Fixes #33587.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r34124 r34251  
    340340add_action( 'comment_post', 'wp_new_comment_notify_postauthor' );
    341341add_action( 'after_password_reset', 'wp_password_change_notification' );
     342add_action( 'register_new_user',      'wp_send_new_user_notifications' );
     343add_action( 'edit_user_created_user', 'wp_send_new_user_notifications' );
    342344
    343345/**
Note: See TracChangeset for help on using the changeset viewer.