llms_get_locale( string $domain = 'lifterlms' )
Retrieve the current plugin locale.
Parameters Parameters
- $domain
-
(string) (Optional) Text domain.
Default value: 'lifterlms'
Return Return
(string)
Source Source
File: includes/functions/llms-functions-l10n.php
function llms_get_locale( $domain = 'lifterlms' ) {
if ( function_exists( 'determine_locale' ) ) {
$locale = determine_locale();
} else {
// @TODO: This can be removed when minimum supported version is 5.0.
$locale = is_admin() ? get_user_locale() : get_locale();
}
/**
* Filter the plugin's locale
*
* @since Unknown
*
* @link https://developer.wordpress.org/reference/hooks/plugin_locale/
*
* @param string $locale The plugin's current locale.
* @param string $domain The textdomain.
*/
return apply_filters( 'plugin_locale', $locale, $domain );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 4.9.0 | Introduced. |