Created
August 24, 2022 20:03
-
-
Save afragen/3681fa4932c773cb8f2a6e24dbc2db17 to your computer and use it in GitHub Desktop.
Allows one to mash the WP Crontrol 'Run now' link with abandon.
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
/** | |
* Trick `WP_Automatic_Updater` into thinking there is no existing lock. | |
* | |
* By default, the auto-updater will only run once every hour even if | |
* the cron job is manually fired. That makes it hard to run multiple tests | |
* in a short period of time. | |
*/ | |
add_filter( | |
'option_auto_updater.lock', | |
function ($value) { | |
return 1; | |
} | |
); | |
delete_option('option_auto_updater.lock'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment