Skip to content

Instantly share code, notes, and snippets.

@kloon
Last active March 22, 2016 01:22
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 kloon/7150437 to your computer and use it in GitHub Desktop.
Save kloon/7150437 to your computer and use it in GitHub Desktop.
WordPress Control Auto Update Features
//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;
}
@derimagia
Copy link

__return_false() and __return_true() functions are your friends

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment