Last active
August 29, 2015 14:23
-
-
Save Frique/f124e4f7bb93ba8dd105 to your computer and use it in GitHub Desktop.
Prevent WP update checking
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
// Tell WP everything is up to date | |
add_filter( 'pre_site_transient_update_core', 'le_prevent_update_checks' ); | |
add_filter( 'pre_site_transient_update_plugins', 'le_prevent_update_checks' ); | |
add_filter( 'pre_site_transient_update_themes', 'le_prevent_update_checks' ); | |
function le_prevent_update_checks() { | |
global $wp_version; | |
return (object) array( | |
'last_checked' => time(), | |
'version_checked' => $wp_version | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my local development projects the WP update checks tend to time out and cause admin screens to load slowly. This prevents update checking, but it does mean you should disable it occasionally to receive updates.