swissspidy/preferred-languages

Don't use preferred_languages_get_list() upon save

Closed this issue · 0 comments

preferred_languages_update_user_meta() uses preferred_languages_get_list(). That function only returns the user's language(s) when is_admin(). However, user meta could also be changed via CLI or the frontend. It's better to use preferred_languages_get_user_list() directly.

The same goes for preferred_languages_update_option() and preferred_languages_get_site_list()