Replace all whitespace characters with a basic space (U+0020). The “Zs” in the pattern selects characters in the `Space_Separator` category, which is what Unicode considers space characters.
Remplacer tous les caractères d'espacement par un espace de base (U+0020). Les "Z" du motif sélectionnent les caractères de la catégorie `Space_Separator`, qui sont considérés par Unicode comme des caractères d'espacement.
$username, $strict = false
Sortie :
@param string[] $special_chars Array of characters to remove. @param string $filename_raw The original filename to be sanitized. @param string $filename Sanitized filename. @param string $filename_raw The filename prior to sanitization. @param string $username The username to be sanitized. @param bool $strict Optional. If set to true, limits $username to specific characters. @return string The sanitized username, after passing through filters.
add_filter('sanitize_user', 'custom_user_sanitize');
function custom_user_sanitize($username, $raw_username, $strict) {
return strtolower(trim($username));
}
Chargement des actualités...