Skip to content

Instantly share code, notes, and snippets.

@donini
Created September 7, 2019 21:08
Show Gist options
  • Save donini/4302393ce283d5c62c3baf65a8c7ae20 to your computer and use it in GitHub Desktop.
Save donini/4302393ce283d5c62c3baf65a8c7ae20 to your computer and use it in GitHub Desktop.
8-hide-wordpress-updates.php
<?php
add_filter( 'pre_site_transient_update_core', 'remove_core_updates' ); /* Hide WordPress Core updates */
add_filter( 'pre_site_transient_update_plugins', 'remove_core_updates' ); /* Hide Plugins updates */
add_filter( 'pre_site_transient_update_themes', 'remove_core_updates' ); /* Hide Theme updates */
/* Hide update notifications */
function remove_core_updates(){
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