
When a new version of WordPress is available, a message asking you to update your WP installation is displayed on your dashboard. Even if you better update, sometimes you may want to hide this message. Here is how to do it.

When a new version of WordPress is available, a message asking you to update your WP installation is displayed on your dashboard. Even if you better update, sometimes you may want to hide this message. Here is how to do it.
To get rid of the "Please update now" message in your WordPress dashboard, simply paste the following code on your functions.php file.
if ( !current_user_can( 'edit_users' ) ) {
add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 );
add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) );
}
Thanks to Joost de Valk for this great code snippet!
28 Responses
Thanks for the tip. However, your code is missing a the closing right curly bracket “}”.
For some reason it still does not work in version 2.7.
This isn’t working in WordPress v2.6.3 … Does anybody know the solution?
It’s a nice snippet. But it will be better if somebody can make it into a plugin so that non-technical person can enjoy it.
Very useful tip, as that update massage knows to be very annoying and boring if you sometimes don’t have time to do the update right away.
I think there is a default plugin for the same.
This is a very nice website, with useful tips, but since it has been pointed out by a few people that your advice does not work correctly it would be good if you modified it or explained why it does not work.
Very useful tip, as that update massage knows to be very annoying and boring if you sometimes don’t have time to do the update right away.
The update message is one of the most annoying things ever. Thanks for this tutorial I’ll have to disable it right away – it was driving me crazy!
thanks but i doesn’t work for me
Great Idea, but does not work in 2.8.4.
@Guillemo: That’s possible, this post was published a while ago…
For WP 2.8.x (functions.php):
if ( !current_user_can( ‘edit_users’ ) ) {
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;” ) );
}
Tnx rotor, your code did the job!
Thanks rotor,
That worked for me aswell (WP 2.8.4)
Just for everyone else:
If the snippet doesn’t work, then don’t forget to replace the curly apostophes ( ‘these’ and “these”) with normal ones (simple remove and re-type them) because WordPress’ comments converted them.
That’s the most likely reason the code didn’t work, and will work !
How can we do it for the plugins page?
I’ve been using the following code to get around this problem, and it fixes the concern that Jitendra had:
Code is as follows :
add_action(‘admin_menu’,'bhhidenag’);
function bhhidenag()
{
echo “ “;
}
Drop into your functions.php file, or create a little plugin and insert the code into there.
It works by hiding the nag using some CSS, so it works on all pages. I have no idea about how backward compatible it is, but it works for me.
Hoep this helps someone..
Bruce
Oops it looks like the Javascript code was stripped out.. Here it is again
add_action(‘admin_menu’,'bhhidenag’);
function bhhidenag()
{
echo “[style type=\"text/css\"][!-- #update-nag { display: none; height:0px;} --> [/style]“;
}
Replace all [ with
Sorry about that..
Trackbacks: