lang_codes filter-hookWP 3.0.0

Filters the language codes.

Usage

add_filter( 'lang_codes', 'wp_kama_lang_codes_filter', 10, 2 );

/**
 * Function for `lang_codes` filter-hook.
 * 
 * @param string[] $lang_codes Array of key/value pairs of language codes where key is the short version.
 * @param string   $code       A two-letter designation of the language.
 *
 * @return string[]
 */
function wp_kama_lang_codes_filter( $lang_codes, $code ){

	// filter...
	return $lang_codes;
}
$lang_codes(string[])
Array of key/value pairs of language codes where key is the short version.
$code(string)
A two-letter designation of the language.

Changelog

Since 3.0.0 Introduced.

Where the hook is called

format_code_lang()
lang_codes
wp-admin/includes/ms.php 550
$lang_codes = apply_filters( 'lang_codes', $lang_codes, $code );

Where the hook is used in WordPress

Usage not found.