plugin_locale
Filters a plugin's locale.
Usage
add_filter( 'plugin_locale', 'wp_kama_plugin_locale_filter', 10, 2 ); /** * Function for `plugin_locale` filter-hook. * * @param string $locale The plugin's current locale. * @param string $domain Text domain. Unique identifier for retrieving translated strings. * * @return string */ function wp_kama_plugin_locale_filter( $locale, $domain ){ // filter... return $locale; }
- $locale(string)
- The plugin's current locale.
- $domain(string)
- Text domain. Unique identifier for retrieving translated strings.
Changelog
Since 3.0.0 | Introduced. |
Where the hook is called
plugin_locale
plugin_locale
wp-includes/l10n.php 1010
$locale = apply_filters( 'plugin_locale', determine_locale(), $domain );
wp-includes/l10n.php 1055
$locale = apply_filters( 'plugin_locale', determine_locale(), $domain );