Making WordPress.org

Changeset 108


Ignore:
Timestamp:
10/22/2013 09:48:08 PM (12 years ago)
Author:
iandunn
Message:

EPC Specific Post: Prevent EPC from forcing the admin_email into the outbound recipients list.

By default EPC will add the admin_email to outbound messages if the list of recipients would otherwise be empty, but their check runs before we add our addresses via the email_post_changes_emails filter. This results in administrators getting emails for all post changes, even if they didn't sign up for them. Setting the email_post_changes_admin_email_fallback filter to false tells EPC to not add the admin_email. Admins can still subscribe themselves if they do want to receive updates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/email-post-changes-specific-post/email-post-changes-specific-post.php

    r106 r108  
    1414     */
    1515    public function __construct() {
    16         add_action( 'widgets_init',                       array( $this, 'register_widgets' ) );
    17         add_filter( 'email_post_changes_default_options', array( $this, 'set_default_epc_options' ) );
    18         add_filter( 'email_post_changes_emails',          array( $this, 'insert_subscribed_emails' ), 10, 3 );
     16        add_action( 'widgets_init',                            array( $this, 'register_widgets' ) );
     17        add_filter( 'email_post_changes_default_options',      array( $this, 'set_default_epc_options' ) );
     18        add_filter( 'email_post_changes_admin_email_fallback', '__return_false' );
     19        add_filter( 'email_post_changes_emails',               array( $this, 'insert_subscribed_emails' ), 10, 3 );
    1920    }
    2021
Note: See TracChangeset for help on using the changeset viewer.