Disable the “please upgrade now” message

Disable the “please upgrade now” message

WordPress constantly release new versions. Although for obvious security concerns you should always upgrade; disabling the “Please upgrade now” message on client sites can be a good idea because the client doesn’t necessarily have to know about this, this is a developer’s job.

One more time, nothing hard: paste the code in your functions.php, save it, and it’s all good.

if ( !current_user_can( ‘edit_users’ ) ) {

add_action( ‘init’, create_function( ‘$a’, “remove_action( ‘init’, ‘wp_version_check’ );” ), 2 );

add_filter( ‘pre_option_update_core’, create_function( ‘$a’, “return null;” ) );

}