Skip to content

Commit

Permalink
Add overriding to debug emails, when it lands in core.
Browse files Browse the repository at this point in the history
I've also added a note to the readme about it.
  • Loading branch information
pento committed Oct 29, 2013
1 parent 85b74e3 commit 001d2b3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion automatic-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ function __construct() {
else
add_filter( 'auto_core_update_send_email', '__return_true', 1 );

if ( ! empty( $this->options['override-email'] ) )
if ( ! empty( $this->options['override-email'] ) ) {
add_filter( 'auto_core_update_email', array( $this, 'override_update_email' ), 1, 1 );
add_filter( 'auto_update_debug_email', array( $this, 'override_update_email' ), 1, 1 );
}

if ( $this->options['debug'] )
add_filter( 'automatic_updates_send_debug_email', '__return_true', 1 );
Expand Down
11 changes: 11 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ There are some Actions and Filters provided, check the [Documentation](http://pe
1. Checkout the current development version from http://plugins.svn.wordpress.org/automatic-updater/trunk/
1. Subscribe to the [RSS feed](http://plugins.trac.wordpress.org/log/automatic-updater?limit=100&mode=stop_on_copy&format=rss) to be notified of changes

== Frequently Asked Questions ==

= Why is the debug email going to the admin email address, instead of the override email address? =

The debug email doesn't provide a filter to allow changing the email address it's being sent to. This will hopefully change in a future release of WordPress, you can follow progress in [this ticket](http://core.trac.wordpress.org/ticket/25756).

== Changelog ==

= 1.0 =
Expand Down Expand Up @@ -181,3 +187,8 @@ With the release of WordPress 3.7, Automatic Updater is now know as Advanced Aut

= 0.1 =
* Initial release

== Upgrade Notice ==

= 1.0 =
With the release of WordPress 3.7, Automatic Updater is now know as Advanced Automatic Updates!

0 comments on commit 001d2b3

Please sign in to comment.