So far I’ve been using the following code to remove the dashboard update message (“WordPress 3.5 is available! Please update now.”):
remove_action('wp_version_check', 'wp_version_check');
remove_action('admin_init', '_maybe_update_core');
add_filter('pre_transient_update_core', create_function( '$a', "return null;"));
However, it doesn’t seem to work any more with current WordPress versions. Is there a new way to removing this message that is compatible with later WordPress versions?
How to hide WordPress update mesages
CSS
The low-tech way to hide something is using css:
This more-or-less works, but it is a lot of work to find al the places WordPress shows messages.
Add_action
A better way is using actions. The wordpress-core (core in this context is WordPress itself) update messages are triggered in
wp-admin/includes/update.php
, line 84 core_update_footer, and line 139 with the great name update_nag. We can use actions to disable these:As an alternative to:
You might want to use, for multi-site:
The dashboard notifications are a bit harder, bit this should do the job:
Although the update notices are hidden, it is still possible to see that something needs to be updated on the following pages (and do the updates):
Disabling updates
If you completely want to disable updates, use:
This will completely disable updates for core, plugins and themes.
Plugins
You might put this code in a functionality plugin, so it works in all themes.
Some ready-made plugins:
Bonus
To find out how to exclude specific plugins from updating: