Last active
March 22, 2016 01:22
-
-
Save kloon/7150437 to your computer and use it in GitHub Desktop.
WordPress Control Auto Update Features
This file contains hidden or 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
//Allow auto updates of development releases ie alpha, beta and RC | |
add_filter( 'allow_dev_auto_core_updates', 'wp_control_dev_auto_updates' ); | |
function wp_control_dev_auto_updates( $value ) { | |
// return true to enable and false to disable | |
return true; | |
} | |
//Allow auto updates of minor releases ie 3.7.1, 3.7.2 | |
add_filter( 'allow_minor_auto_core_updates', 'wp_control_minor_auto_updates' ); | |
function wp_control_minor_auto_updates( $value ) { | |
// return true to enable and false to disable | |
return true; | |
} | |
//Allow auto updates of major releases ie 3.7, 3.8, 3.9 | |
add_filter( 'allow_major_auto_core_updates', 'wp_control_major_auto_updates' ); | |
function wp_control_major_auto_updates( $value ) { | |
// return true to enable and false to disable | |
return true; | |
} | |
// Allow auto theme updates | |
add_filter( 'auto_update_theme', 'wp_control_theme_auto_updates' ); | |
function function wp_control_theme_auto_updates( $value ) { | |
// return true to enable and false to disable | |
return true; | |
} | |
// Allow auto plugin updates | |
add_filter( 'auto_update_plugin', 'wp_control_plugin_auto_updates' ); | |
function function wp_control_plugin_auto_updates( $value ) { | |
// return true to enable and false to disable | |
return true; | |
} | |
// Allow auto language updates | |
add_filter( 'auto_update_translation', 'wp_control_translation_auto_updates' ); | |
function function wp_control_translation_auto_updates( $value ) { | |
// return true to enable and false to disable | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
__return_false() and __return_true() functions are your friends