【www.bbyears.com--WordPress】
代码如下function ludou_non_strict_login( $username, $raw_username, $strict ) {
if( !$strict )
return $username;
return sanitize_user(stripslashes($raw_username), false);
}
add_filter("sanitize_user", "ludou_non_strict_login", 10, 3);
将以下php代码复制到当前主题目录下的functions.php中,即可让WordPress支持使用中文用户名注册和登录