Make WordPress Core

Changeset 42570


Ignore:
Timestamp:
01/23/2018 01:44:25 PM (7 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.
Fixes #42693.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r42451 r42570  
    59945994 */
    59955995function wp_site_admin_email_change_notification( $old_email, $new_email, $option_name ) {
     5996    $send = true;
     5997
     5998    // Don't send the notification to the default 'admin_email' value.
     5999    if ( 'you@example.com' === $old_email ) {
     6000        $send = false;
     6001    }
     6002
    59966003    /**
    59976004     * Filters whether to send the site admin email change notification email.
     
    60036010     * @param string $new_email The new site admin email address.
    60046011     */
    6005     $send = apply_filters( 'send_site_admin_email_change_email', true, $old_email, $new_email );
     6012    $send = apply_filters( 'send_site_admin_email_change_email', $send, $old_email, $new_email );
    60066013
    60076014    if ( ! $send ) {
  • trunk/src/wp-includes/ms-functions.php

    r42343 r42570  
    28432843 */
    28442844function wp_network_admin_email_change_notification( $option_name, $new_email, $old_email, $network_id ) {
     2845    $send = true;
     2846
     2847    // Don't send the notification to the default 'admin_email' value.
     2848    if ( 'you@example.com' === $old_email ) {
     2849        $send = false;
     2850    }
     2851
    28452852    /**
    28462853     * Filters whether to send the network admin email change notification email.
     
    28532860     * @param int    $network_id ID of the network.
    28542861     */
    2855     $send = apply_filters( 'send_network_admin_email_change_email', true, $old_email, $new_email, $network_id );
     2862    $send = apply_filters( 'send_network_admin_email_change_email', $send, $old_email, $new_email, $network_id );
    28562863
    28572864    if ( ! $send ) {
Note: See TracChangeset for help on using the changeset viewer.