On aspect when developing sites for clients is how to handle updates of WordPress and plugins. Should you let your clients do this themselves or should you offer that as a service?
WordPress has a built in function that will let you know when there is a new version that you can update to. A message like the one in the image will be displayed to the user prompting to update.
If your clients are doing the updates themselves, this is a great function for reminding them. However, if you are doing the updates for the clients this can cause trouble for you if they click on the message and attempt to do the update. Of course they can manage to complete to update successfully but sometimes they can get in to trouble and have forgotten to do a proper backup.
There is a easy solution for this. Just put this simple code in your functions.php and the update message will be hidden.
function hideUpdateNag() { remove_action( 'admin_notices', 'update_nag', 3 ); } add_action('admin_menu','hideUpdateNag');
You can optionally put this code with a condition so that the update message will only be shown to the site admin or other user roles depending of the if-statement in the code snippet below.
function hideUpdateNag() { remove_action( 'admin_notices', 'update_nag', 3 ); } if ( !current_user_can('activate_plugins') ) { add_action('admin_menu','hideUpdateNag'); }
Pingback: Ultimate Guide to Update WordPress [Infographic] | Fredrik Malmgren
Just what I needed thanks!
Pingback: WordPress Arena: A Blog for WordPress Developers, Designers and Blogger
Pingback: Script Installation Service
Pingback: WordPress: How do you remove WordPress admin messages? - Quora