Notice

If you are going to submit ticket for our themes support , then make sure we are not providing support for any Porn/Adult related websites.
When You Submit Ticket Please Include Your WordPress & FTP login info with Website URL so When our team will see any error then there was no need to wait for login info, Our Team will fix that ASAP.
We are offering Designing services like LOGO Design and Banner Design etc.

Okay
  Print

Allow Arabic username in classiera

If you want to allow your user's to signup with arabic username, Then please code this code and paste is your child theme functions.php file.

function classiera_allow_arabic_username($username, $raw_username, $strict) {
    $username = wp_strip_all_tags( $raw_username );
    $username = remove_accents( $username );
    $username = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '', $username );
    $username = preg_replace( '/&.+?;/', '', $username ); // Kill entities
    // If strict, reduce to ASCII and Arabic characters for max portability.
    if ( $strict )
    $username = preg_replace( '|[^a-z\p{Arabic}0-9 _.\-@]|iu', '', $username );
    $username = trim( $username );
    // Consolidate contiguous whitespace
    $username = preg_replace( '|\s+|', ' ', $username );
    return $username;
}
add_filter('sanitize_user', 'classiera_allow_arabic_username', 10, 3);