DigitalRefresh
9/19/2019 - 7:04 AM

Nag: Update WP for all Users #client #hide

Remove the WordPress update nag e.g. WordPress 3.9.1 is available! Please update now, from the all users dashboard, admin dashboard & from Updates page as well.
Source: https://www.wpoptimus.com/626/7-ways-disable-update-wordpress-notifications/

// Hide WordPress update notification for all users
add_action('after_setup_theme','remove_core_updates');
function remove_core_updates()
{
 if(! current_user_can('update_core')){return;}
   add_action('init', create_function('$a',"remove_action( 'init', 'wp_version_check' );"),2);
   add_filter('pre_option_update_core','__return_null');
   add_filter('pre_site_transient_update_core','__return_null');
}