Skip to content

Instantly share code, notes, and snippets.

@chipbennett
Created January 25, 2014 16:37
Show Gist options
  • Save chipbennett/8619087 to your computer and use it in GitHub Desktop.
Save chipbennett/8619087 to your computer and use it in GitHub Desktop.
WordPress Automatic Update Filters
<?php
/*
* Plugin Name: Site Plugin - Control Automatic Updates
* Description: Site Plugin to add filters to control automatic updates
*/
/**
* To disable all automatic updates, use this filter
*/
//add_filter( 'auto_updater_disabled', '__return_true', 1 );
/**
* Disable core updates for minor versions
*
* Unless the above filter is enabled, WordPress will automatically perform core updates
* for minor WordPress versions (i.e. version X.Y.Z to version X.Y.Z+1, which are
* security/bugfix releases). These releases *should* always be safe, as they make no
* API changes and add no functionality. Nevertheless, you can disable them with the
* filter below.
*
* Default: true
*/
//add_filter( 'allow_minor_auto_core_updates', '__return_false', 1 );
/**
* Enable WordPress core updates for major versions
*
* By default, WordPress does not automatically update core for major versions,
* i.e. version X.Y to version X.Y+1. You can enable them with the filter below.
*
* Default: false
*/
//add_filter( 'allow_major_auto_core_updates', '__return_true', 1 );
/**
* Enable WordPress core updates for development versions
*
* By default, WordPress does not automatically update core for development versions,
* i.e. bleeding-edge nightly versions. You can enable them with the filter below.
* WARNING: development versions are not intended for production servers. Use at
* your own risk.
*
* Default: false
*/
//add_filter( 'allow_dev_auto_core_updates', '__return_true', 1 );
/**
* Enable WordPress updates for Themes
*
* By default, WordPress does not automatically update Themes. You can enable them
* using the filter below.
*
* Default: false
*/
//add_filter( 'auto_update_theme', '__return_true', 1 );
/**
* Enable WordPress updates for Plugins
*
* By default, WordPress does not automatically update Plugins. You can enable them
* using the filter below.
*
* Default: false
*/
//add_filter( 'auto_update_plugin', '__return_true', 1 );
/**
* Enable WordPress updates for Translation Files
*
* By default, WordPress does not automatically update Translation files. You can enable them
* using the filter below.
*
* Default: false
*/
//add_filter( 'auto_update_translation', '__return_true', 1 );
/**
* Enable Updates for VCS Checkouts
*
* By default, WordPress will not perform automatic updates if it detects that
* the install is a VCS checkout. You can bypass the check with the filter below.
*
* Default: false
*/
//add_filter( 'automatic_updates_is_vcs_checkout', '__return_true', 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment