pre_determine_locale хук-фильтрACF 5.0.0

Это хук WordPress - pre_determine_locale. Плагин его просто использует.

Filters the locale for the current request prior to the default determination process.

Using this filter allows to override the default logic, effectively short-circuiting the function.

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

add_filter( 'pre_determine_locale', 'wp_kama_pre_determine_locale_filter' );

/**
 * Function for `pre_determine_locale` filter-hook.
 * 
 * @param string|null $locale The locale to return and short-circuit.
 *
 * @return string|null
 */
function wp_kama_pre_determine_locale_filter( $locale ){

	// filter...
	return $locale;
}
$locale(строка|null)
The locale to return and short-circuit.
По умолчанию: null

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

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

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

determine_locale()
pre_determine_locale
acf/includes/l10n.php 23
$determined_locale = apply_filters( 'pre_determine_locale', null );

Где используется хук в Advanced Custom Fields PRO

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