Problème:
C'est un cas très particulier ici car le client utilisé un code personnalisé pour changer de langue.
1
$sitepress->switch_lang('en');
Solution:
La solution est spécifique à ce cas. J'ai offert au client un code pour retourner sur la langue actuelle après avoir basculer (voir documentation plus bas). Cependant le client a préféré utiliser un conditionnel avec la fonction is_admin() pour n'appliquer le code que dans le backend admin car cela correspondait mieux à sa situation.
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.