Disable The “Please Update Now” Message On WordPress Dashboard

Smashing MagaziDisable The “Please Update Now” Message On WordPress Dashboard

The problem.
Your dashboard automatically lets you know when a new version of WordPress is released by inserting a message at the top of admin pages. This is definitely a good thing, because updating gives your blog the latest functions and security fixes. But if the blog is a client project, letting the client control updates may not be a good idea.

The solution.
Just paste these four lines of code in your functions.php file:

1 if (!current_user_can('edit_users')) {
2   add_action( 'init', create_function( '$a'"remove_action( 'init', 'wp_version_check' );" ), 2 );
3   add_filter( 'pre_option_update_core', create_function( '$a'"return null;" ) );
4 }

Once you save functions.php, you won’t see the message on the dashboard.

Code explanation.
The first thing we do here is make sure the current user has sufficient administrative rights to update WordPress. Once we do that, we just create two hooks to overwrite the automatic check for updates and message display.



1 thought on “Disable The “Please Update Now” Message On WordPress Dashboard”

  1. Do you also know how to change that message? I would like to show a message when WordPress needs an update, but something like “Ask your webmaster to update WordPress”.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s