Make WordPress Core

Changeset 42571


Ignore:
Timestamp:
01/23/2018 01:46:32 PM (6 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:
3 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 ) {
  • branches/4.9/src/wp-includes/ms-functions.php

    r41753 r42571  
    26632663 */
    26642664function wp_network_admin_email_change_notification( $option_name, $new_email, $old_email, $network_id ) {
     2665    $send = true;
     2666
     2667    // Don't send the notification to the default 'admin_email' value.
     2668    if ( 'you@example.com' === $old_email ) {
     2669        $send = false;
     2670    }
     2671
    26652672    /**
    26662673     * Filters whether to send the network admin email change notification email.
     
    26732680     * @param int    $network_id ID of the network.
    26742681     */
    2675     $send = apply_filters( 'send_network_admin_email_change_email', true, $old_email, $new_email, $network_id );
     2682    $send = apply_filters( 'send_network_admin_email_change_email', $send, $old_email, $new_email, $network_id );
    26762683
    26772684    if ( ! $send ) {
Note: See TracChangeset for help on using the changeset viewer.