Created
March 31, 2021 13:20
-
-
Save wpmark/a2ec48df506f46fcbf6ba9ee7788b416 to your computer and use it in GitHub Desktop.
Allow WordPress to auto update eveything.
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 | |
/* | |
Plugin Name: Highrise Digital Auto Updater | |
Plugin URI: https://highrise.digital/ | |
Description: A plugin to set WordPress to auto update everything. | |
Version: 1.0 | |
License: GPL-2.0+ | |
Author: Highrise Digital | |
Author URI: https://highrise.digital/ | |
Text domain: highrise-auto-updater | |
This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License, version 2, as | |
published by the Free Software Foundation. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. | |
You should have received a copy of the GNU General Public License | |
along with this program; if not, write to the Free Software | |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
*/ | |
// allows WP plugins to automatically update. | |
add_filter( 'auto_update_plugin', '__return_true' ); | |
// allow themes to automatically update. | |
add_filter( 'auto_update_theme', '__return_true' ); | |
// allow WP core updates. | |
add_filter( 'allow_minor_auto_core_updates', '__return_true' ); // Enable minor updates. | |
add_filter( 'allow_major_auto_core_updates', '__return_true' ); // Enable major updates. | |
// force auto updates even for version controlled code environments. | |
add_filter( 'automatic_updates_is_vcs_checkout', '__return_false', 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment