这对于特定的用户登录非常有效:
global $user_login;
get_currentuserinfo();
if ($user_login !== "admin") { // change admin to the username that gets the updates
add_action( \'init\', create_function( \'$a\', "remove_action( \'init\', \'wp_version_check\' );" ), 2 );
add_filter( \'pre_option_update_core\', create_function( \'$a\', "return null;" ) );
}
对于特定的用户id:
global $user_ID;
get_currentuserinfo();
if ($user_ID !== 1) { // change 1 to the id number that gets the updates
add_action( \'init\', create_function( \'$a\', "remove_action( \'init\', \'wp_version_check\' );" ), 2 );
add_filter( \'pre_option_update_core\', create_function( \'$a\', "return null;" ) );
}