theme_locale хук-фильтрWP 3.0.0

Filters a theme's locale.

Использование

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(строка)
The theme's current locale.
$domain(строка)
Text domain. Unique identifier for retrieving translated strings.

Список изменений

С версии 3.0.0 Введена.

Где вызывается хук

load_theme_textdomain()
theme_locale
wp-includes/l10n.php 1087
$locale = apply_filters( 'theme_locale', determine_locale(), $domain );

Где используется хук в WordPress

Использование не найдено.