Skip to:
Content

Changeset 6898


Ignore:
Timestamp:
01/31/2019 09:11:21 PM (3 weeks ago)
Author:
johnjamesjacoby
Message:

Subscriptions: do not send subscription emails during WordPress imports.

This change adds checks to the WP_IMPORTING global constant inside of forum & topic subscription notification functions, to prevent sending emails during the import process.

Because hooks still fire during imports, this sanity check avoids a potentially hugely annoying situation for users during forum migrations by any import tool that obeys the use of this core constant.

Fixes #3248. Props danielbachhuber.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/functions.php

    r6881 r6898  
    10291029    }
    10301030
     1031    // Bail if importing
     1032    if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) {
     1033        return false;
     1034    }
     1035
    10311036    /** Validation ************************************************************/
    10321037
     
    11831188    // Bail if subscriptions are turned off
    11841189    if ( ! bbp_is_subscriptions_active() ) {
     1190        return false;
     1191    }
     1192
     1193    // Bail if importing
     1194    if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) {
    11851195        return false;
    11861196    }
Note: See TracChangeset for help on using the changeset viewer.