:如何让wordpress支持中文用户名

:
>

  $username = preg_replace ('|[^a-z\p{Han}0-9 _.\-@]|iu', '', $username);

  }

  $username = trim( $username );

  // Consolidate contiguous whitespace

  $username = preg_replace( '|\s+|', ' ', $username );

  return $username;

  }

  add_filter ('sanitize_user', 'ludou_sanitize_user', 10, 3);

>
显示更多

上一篇: WordPress获取指定分类及其子分类文章数

下一篇: WordPress 获取当前文章ID的方法

最新文章

热门文章

闽ICP备12022453号-17

快读网 轻松阅读 享受快乐生活

网站邮箱:wodd7@hotmail.com