Created
February 19, 2015 01:21
-
-
Save norcross/05c1a1d82159ca2814f7 to your computer and use it in GitHub Desktop.
prevent WordPress from sending emails when the auto update is successful
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* bypass the notification email on successful auto-updates | |
* | |
* @param [type] $send [description] | |
* @param [type] $type [description] | |
* @param [type] $core_update [description] | |
* @param [type] $result [description] | |
* @return [type] [description] | |
*/ | |
function rkv_bypass_auto_update_email( $send, $type, $core_update, $result ) { | |
return ! empty( $type ) && $type == 'success' ? false : true; | |
} | |
add_filter( 'auto_core_update_send_email', 'rkv_bypass_auto_update_email', 10, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment