WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/23/2018 01:46:32 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Email: Don't send notifications for site or network admin email address change to the default 'admin_email' value.

Props tigertech, MattyRob, seanchayes.
Merges [42570] to the 4.9 branch.
Fixes #42693.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/functions.php

    r42452 r42571  
    57395739 */
    57405740function wp_site_admin_email_change_notification( $old_email, $new_email, $option_name ) {
     5741    $send = true;
     5742
     5743    // Don't send the notification to the default 'admin_email' value.
     5744    if ( 'you@example.com' === $old_email ) {
     5745        $send = false;
     5746    }
     5747
    57415748    /**
    57425749     * Filters whether to send the site admin email change notification email.
     
    57485755     * @param string $new_email The new site admin email address.
    57495756     */
    5750     $send = apply_filters( 'send_site_admin_email_change_email', true, $old_email, $new_email );
     5757    $send = apply_filters( 'send_site_admin_email_change_email', $send, $old_email, $new_email );
    57515758
    57525759    if ( ! $send ) {
Note: See TracChangeset for help on using the changeset viewer.