/auto-update-filters.php Secret
Created
October 31, 2016 21:47
Set automatic updates for WordPress site.
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 | |
/* Copy the Content Below this line - DO NOT INCLUDE THE <?php ABOVE */ | |
//----------------------------------------------------- | |
// Set Automatic Updates for Your Site | |
//----------------------------------------------------- | |
add_filter( 'allow_major_auto_core_updates', '__return_true' ); // automatic WordPress major updates | |
add_filter( 'auto_update_theme', '__return_true' ); // automatic theme updates | |
add_filter( 'auto_update_plugin', '__return_true' ); // automatic plugin updates | |
add_filter( 'auto_update_translation', '__return_true' ); // automatic translation file updates | |
//* Disable success mail notifications | |
function cuefox_auto_core_update_send_email ( $send, $type, $core_update, $result ) { | |
if ( !empty( $type ) && $type == 'success' ) { | |
return false; | |
} | |
//* Use default settings | |
return $send; | |
} | |
add_filter( 'auto_core_update_send_email', 'cuefox_auto_core_update_send_email', 10, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment