get_available_languages filter-hookWP 4.7.0

Filters the list of available language codes.

Usage

add_filter( 'get_available_languages', 'wp_kama_get_available_languages_filter', 10, 2 );

/**
 * Function for `get_available_languages` filter-hook.
 * 
 * @param string[] $languages An array of available language codes.
 * @param string   $dir       The directory where the language files were found.
 *
 * @return string[]
 */
function wp_kama_get_available_languages_filter( $languages, $dir ){

	// filter...
	return $languages;
}
$languages(string[])
An array of available language codes.
$dir(string)
The directory where the language files were found.

Changelog

Since 4.7.0 Introduced.

Where the hook is called

get_available_languages()
get_available_languages
wp-includes/l10n.php 1400
return apply_filters( 'get_available_languages', $languages, $dir );

Where the hook is used in WordPress

Usage not found.