Created
February 5, 2015 01:43
-
-
Save mindctrl/ed6c88f0676c1dee5693 to your computer and use it in GitHub Desktop.
Force WordPress to check for plugin and theme updates on every page load. Obviously used for testing. Do not use this full time as it will slow your site down.
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: Updates Transient Flusher | |
Description: Deletes the update_themes and update_plugins transients. Forces WordPress to check for plugin and theme updates on every page load. FOR TESTING ONLY. | |
*/ | |
function jp_delete_update_transients() { | |
delete_transient( 'update_themes' ); | |
delete_transient( 'update_plugins' ); | |
delete_site_transient( 'update_plugins' ); | |
delete_site_transient( 'update_themes' ); | |
} | |
add_action( 'init', 'jp_delete_update_transients' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With WP CLI: