Как подкоректировать плагин Allow Cyrillic Usernames
-
Плагин Allow Cyrillic Usernames наполовину решил мою проблему. Теперь на сайте при регистрации можно вводить русский алфавит. Но что здесь подкоректировать:
function acu_sanitize_user($username, $raw_username, $strict) { $username = wp_strip_all_tags( $raw_username ); $username = remove_accents( $username ); // Kill octets $username = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '', $username ); $username = preg_replace( '/&.+?;/', '', $username ); // Kill entities // If strict, reduce to ASCII and Cyrillic characters for max portability. if ( $strict ) $username = preg_replace( '|[^a-zа-я0-9 _.\-@]|iu', '', $username ); $username = trim( $username ); // Consolidate contiguous whitespace $username = preg_replace( '|\s+|', ' ', $username ); return $username;
чтобы добавить украинские буквы: і, й, ї, є. А то он их не воспринимает и считает недопустимыми по прежнему
Просмотр 3 ответов — с 1 по 3 (всего 3)
Просмотр 3 ответов — с 1 по 3 (всего 3)
- Тема «Как подкоректировать плагин Allow Cyrillic Usernames» закрыта для новых ответов.