load_script_translation_file filter-hookWP 5.0.2

Filters the file path for loading script translations for the given script handle and text domain.

Usage

add_filter( 'load_script_translation_file', 'wp_kama_load_script_translation_file_filter', 10, 3 );

/**
 * Function for `load_script_translation_file` filter-hook.
 * 
 * @param string|false $file   Path to the translation file to load. False if there isn't one.
 * @param string       $handle Name of the script to register a translation domain to.
 * @param string       $domain The text domain.
 *
 * @return string|false
 */
function wp_kama_load_script_translation_file_filter( $file, $handle, $domain ){

	// filter...
	return $file;
}
$file(string|false)
Path to the translation file to load. False if there isn't one.
$handle(string)
Name of the script to register a translation domain to.
$domain(string)
The text domain.

Changelog

Since 5.0.2 Introduced.

Where the hook is called

load_script_translations()
load_script_translation_file
wp-includes/l10n.php 1170
$file = apply_filters( 'load_script_translation_file', $file, $handle, $domain );

Where the hook is used in WordPress

Usage not found.