signup_get_available_languages хук-фильтрWP 4.4.0

Filters the list of available languages for front-end site sign-ups.

Passing an empty array to this hook will disable output of the setting on the sign-up form, and the default language will be used when creating the site.

Languages not already installed will be stripped.

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

add_filter( 'signup_get_available_languages', 'wp_kama_signup_get_available_languages_filter' );

/**
 * Function for `signup_get_available_languages` filter-hook.
 * 
 * @param string[] $languages Array of available language codes. Language codes are formed by stripping the .mo extension from the language file names.
 *
 * @return string[]
 */
function wp_kama_signup_get_available_languages_filter( $languages ){

	// filter...
	return $languages;
}
$languages(string[])
Array of available language codes. Language codes are formed by stripping the .mo extension from the language file names.

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

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

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

signup_get_available_languages()
signup_get_available_languages
wp-signup.php 886
$languages = (array) apply_filters( 'signup_get_available_languages', get_available_languages() );

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

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