Skip to content

Instantly share code, notes, and snippets.

@norcross
Created February 19, 2015 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norcross/05c1a1d82159ca2814f7 to your computer and use it in GitHub Desktop.
Save norcross/05c1a1d82159ca2814f7 to your computer and use it in GitHub Desktop.
prevent WordPress from sending emails when the auto update is successful
<?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