Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

File name for non-English users #82

Open
murinp opened this issue May 5, 2024 · 0 comments
Open

File name for non-English users #82

murinp opened this issue May 5, 2024 · 0 comments

Comments

@murinp
Copy link

murinp commented May 5, 2024

The final file name is strange for non-English user name.

E.g. user "Karolína Mílová" generates file names "karolana-malova_avatar.jpg" rather than "karolina-milova_avatar.jpg".

Wouldn't be better to use something like $user->user_nicename which is already URL sanitized instead of $user->display_name in unique_filename_callback function?

$name = $base_name = sanitize_file_name( strtolower( $user->display_name ) . '_avatar' );

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant