Created
June 12, 2025 23:48
-
-
Save chrisdavidmiles/1891277ecaf1e0c1f310cc5bfae26063 to your computer and use it in GitHub Desktop.
WordPress Plugin: Enforce Auto Update
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
<?php | |
/** | |
* Plugin Name: Enforce Auto Update | |
* Description: Enables automatic updates for WordPress core (minor and major stable releases), plugins, and themes. | |
* Version: 1.0 | |
* Update URI: false | |
*/ | |
// Enable automatic updates for WordPress core (minor and major stable releases, excluding development releases) | |
add_filter( 'allow_dev_auto_core_updates', '__return_false' ); | |
add_filter( 'allow_minor_auto_core_updates', '__return_true' ); | |
add_filter( 'allow_major_auto_core_updates', '__return_true' ); | |
// Enable automatic updates for plugins | |
add_filter( 'auto_update_plugin', '__return_true' ); | |
// Enable automatic updates for themes | |
add_filter( 'auto_update_theme', '__return_true' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment