plugin_locale filter-hookWP 3.0.0

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

load_plugin_textdomain()
plugin_locale
load_muplugin_textdomain()
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 );

Where the hook is used in WordPress

Usage not found.