theme_locale filter-hookWP 3.0.0

Filters a theme's locale.

Usage

add_filter( 'theme_locale', 'wp_kama_theme_locale_filter', 10, 2 );

/**
 * Function for `theme_locale` filter-hook.
 * 
 * @param string $locale The theme's current locale.
 * @param string $domain Text domain. Unique identifier for retrieving translated strings.
 *
 * @return string
 */
function wp_kama_theme_locale_filter( $locale, $domain ){

	// filter...
	return $locale;
}
$locale(string)
The theme'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_theme_textdomain()
theme_locale
wp-includes/l10n.php 1087
$locale = apply_filters( 'theme_locale', determine_locale(), $domain );

Where the hook is used in WordPress

Usage not found.