Plugin Directory

Changeset 3139316


Ignore:
Timestamp:
08/21/2024 10:25:15 PM (19 months ago)
Author:
mdawaffe
Message:

Don't send notifications when importing content.

Don't try to send email messages to broken email addresses.

Props xknown.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • email-post-changes/trunk/class.email-post-changes.php

    r3139315 r3139316  
    6868    // The meat of the plugin
    6969    function post_updated( $post_id, $post_after, $post_before ) {
     70        if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) {
     71            return;
     72        }
     73
    7074        $options = $this->get_options();
    7175
     
    162166
    163167        foreach ( $emails as $email ) {
     168            if ( empty( $email ) || ! is_email( $email ) ) {
     169                continue;
     170            }
    164171            do_action( 'email_post_changes_before_email_generation', $email );
    165172
Note: See TracChangeset for help on using the changeset viewer.