Inpsyde\MultilingualPress\Module\UserAdminLanguage\LocaleFilter::filter_locale PHP Method

filter_locale() public method

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.
return string The (filtered) locale.
    public function filter_locale($locale)
    {
        $user_language = $this->language_repository->get_user_language();
        return $user_language ?: (string) $locale;
    }