0

Currently when logged into the backend, sometimes when a plugin has an update or Wordpress has an update a notification message appears at the top either telling the user to upgrade or if a plugin needs attention like if a setting still needs to be configured or something.

Is there a way to prevent the user for seeing this notification? A function or something?

On a side note, right now I am using: http://wordpress.org/extend/plugins/advanced-access-manager/

Thank you in advance!

2 Answers 2

1

Add this to your functions.php.

if ( !current_user_can( 'edit_users' ) ) { //Change the edit_user" to whatever capability you need to retain the notifications
  add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 );
  add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) );
}

Or if you want to show the notification to a specific user only you may try something like this:

global $user_login;
   get_currentuserinfo();
   if ($user_login !== "admin") { // change admin to the username that retains the notifications
    add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 );
    add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) );
   }
0

The easiest way to do this is by installing a suitable plugin. You would want to search for one that did what you wanted, or maybe you might need to use more than one to achieve your purpose. Here are two examples, the first one hides WordPress update announcements from non admin backend users and the second I think does something similar W.R.T. plugins.

http://wordpress.org/extend/plugins/hide-update-reminder/

http://wordpress.org/extend/plugins/plugin-update-blocker/

I don't know of a single plugin that hides all 3 update messages ( WordPress core, themes and plugins). Also I think 'settings configurations' which you mentioned might be a separate thing entirely and it might be difficult to find a plugin to manipulate them. You may be able to hide that type of warning via css - though to be honest I couldn't advise this for a couple of reasons - it's a bit of a hack I think.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.