Disabling all WordPress Update Notification

By default WordPress always pushes the core update notification through the admin panel. Even though I always recommend my customers to keep their WP up to date, there are times when these notification causes irritation. Well, at least it does to me. Whenever WP sends such notification, it means WP made some changes on it’s core files for various reason. Such changes may or may not be a serious one all the time.

WordPress Update NotificationWordPress Update Notification.

I personally tend to go through the list of change log before I perform any core update on my site. Unless it’s related with any serious security issue, I prefer not to update the core as it always involves risking “incompatibility” issue with my custom designed theme.

WP users also gets update notification for their Themes and Plugins in most cases. Today in this post I will show you how to disable all these update notification using simple snippet.

<?php
function remove_core_updates(){
   global $wp_version;
   return(object) array(
      'last_checked'=> time(),
      'version_checked'=> $wp_version,); }
// disable core update notification  
add_filter('pre_site_transient_update_core','remove_core_updates');
// disable plugin update notification
add_filter('pre_site_transient_update_plugins','remove_core_updates');
// disable theme update notification
add_filter('pre_site_transient_update_themes','remove_core_updates');
?>

Simply copy and paste this snippet on your current theme’s functions.php page and update it. That should do the job.
Note: Now, you might ask what about if I want to disable certain (WP Core, Plugin or Theme) update notification only? Well, as you can see from the snippet, I made comments before every single “filter” action that hooks with our main function. Simply remove the filter that you don’t need. Now you are good to go.

Today In History

  •  
  •  

Comment

Leave a Reply

Note: Convet HTML, PHP, JavaScripts from Postable, before posting from comment section.
License: By submitting a comment here you grant this site a perpetual license to reproduce your words and name/Web site in attribution. Please use your real name or a pseudonym (i.e., pen name, alias, nom de plume) when commenting. If you add your site name, company name, or something completely random, I'll likely change it to whatever I want.