最后我用了这个。这绝对是一个黑客。。。如果其他人知道如何更好地修改wp-admin/js/user-profile.js 没有黑客核心,请让我知道。我不想注销整个脚本,因为我喜欢里面的所有密码强度检查等。
// add some js to the login page
function squarecandy_login_stylesheet() {
wp_enqueue_script( \'custom-login-js\', get_stylesheet_directory_uri() . \'/js/login.js\' );
}
add_action( \'login_enqueue_scripts\', \'squarecandy_login_stylesheet\' );
登录名。js公司
jQuery(document).ready(function($){
// wait half a second so WP can fill the suggestion first
setTimeout( function(){
// Switch to the non-visible entry mode
$(\'.wp-hide-pw\').click();
// clear the password fields, put the cursor in the field
$(\'#pass1, #pass1-text\').val(\'\').focus();
}, 500 );
});