Hide update warning for every user but admin


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. function wp_hide_update() {
  3. global $current_user;
  4. get_currentuserinfo();
  5.  
  6. if ($current_user->ID != 1) { // only admin will see it
  7. remove_action( 'admin_notices', 'update_nag', 3 );
  8. }
  9. }
  10. add_action('admin_menu','wp_hide_update');
  11. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.