WordPress 4.1.1 is available! Please update now.

Sometimes you find messages like “WordPress 4.1.1 is available! Please update now.“, in italian it is: “È disponibile WordPress 4.1.1! Aggiorna…

March 16, 2015

Sometimes you find messages like “WordPress 4.1.1 is available! Please update now.“, in italian it is: “È disponibile WordPress 4.1.1! Aggiorna adesso“. Or another message for users with no permissions “WordPress 4.1.1 is available! Please notify the site administrator“.

To stop those annoying messages for users that don’t need them, you can simply add this code at the end of yout functions.php file.

It checks that the connected user has no permission to install plugins, so it doesn’t need those advice:


if ( !current_user_can( 'install_plugins' ) ) {
 add_action('admin_menu','hide_nag_messages');
 function hide_nag_messages() { remove_action( 'admin_notices', 'update_nag', 3 );}
}

Author

I'm a software engineer, an everyday web developer and a maker. I usually build sites with PHP, within or without WordPress. I build Internet of Things with Arduino and ESP8266. I'm the founder of Rockit.it and Dailybest.it and I'm actually the Chief Technical Officer of Better Days web agency.

Recommended

Add filter on wp_title not working with Yoast SEO plugin

For SEO purposes, in a specific template that has a list of items with pagination, I need to have different…

February 22, 2017

How to add rel=”nofollow” to links with preg_replace()

Adding rel="nofollow" to external link is a good SEO practice.

September 22, 2015

Social buttons: the fastest way for WordPress, without plugins

NOTE: the code in this post is written for WordPress but you can easily translate it in any language. You’re here…

September 15, 2015

Optimize WordPress, a long list of tips

In the above image you can see your WordPress before reading this post, and after the optimizations you will make…

Limit the number of categories for posts in WordPress

CHOOSE ONLY ONE CATEGORY WORDPRESS If you need to limit the number of categories used by the authors of your…

September 14, 2015

Remove archive pages in WordPress, how to

I think that in most blogs (that is not all) archive pages are redundant content and there’s no need to…

September 8, 2015