Skip to content

Instantly share code, notes, and snippets.

@kloon

kloon/functions.php

Last active Mar 22, 2016
Embed
What would you like to do?
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

This comment has been minimized.

Copy link

@derimagia derimagia commented Mar 22, 2016

__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
You can’t perform that action at this time.