Inpsyde\MultilingualPress\Module\UserAdminLanguage\LocaleFilter::filter_locale PHP Méthode

filter_locale() public méthode

Filters the locale and returns the user admin language of the current user, if set.
Since: 3.0.0
public filter_locale ( string $locale ) : string
$locale string The current locale.
Résultat string The (filtered) locale.
    public function filter_locale($locale)
    {
        $user_language = $this->language_repository->get_user_language();
        return $user_language ?: (string) $locale;
    }