sushma_proach

wordpress update notification (not aaing) that code

Jul 2nd, 2016
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.62 KB | None | 0 0
  1. paste in function.php file
  2.  
  3. function hide_update_notice_to_all_but_admin_users()
  4. {
  5.     if (!current_user_can('update_core')) {
  6.         remove_action( 'admin_notices', 'update_nag', 3 );
  7.     }
  8. }
  9. add_action( 'admin_head', 'hide_update_notice_to_all_but_admin_users', 1 );
  10.  
  11. function remove_core_updates(){
  12.     global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);
  13. }
  14. add_filter('pre_site_transient_update_core','remove_core_updates');
  15. add_filter('pre_site_transient_update_plugins','remove_core_updates');
  16. add_filter('pre_site_transient_update_themes','remove_core_updates');
Add Comment
Please, Sign In to add comment