plugin_locale хук-фільтрACF 5.7.10

Filters a plugin’s locale.

Використання

add_filter( 'plugin_locale', 'wp_kama_plugin_locale_filter', 10, 2);

/**
 * Function for `plugin_locale` filter-hook.
 *
 * @param string $locale 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
(рядок)
Plugin’s current locale.
$domain
(рядок)
Text domain. Unique identifier for retrieving translated strings.

список змін

З версії 5.7.10Введено.

Де викликається хук

plugin_locale

acf/includes/l10n.php 117

$locale = apply_filters( 'plugin_locale', acf_get_locale(), $domain );

Де використовується хук в Advanced Custom Fields

Використання не знайдено.

Залишити відповідь

Ваша e-mail адреса не оприлюднюватиметься. Обов’язкові поля позначені *