load_script_translation_file
Filters the file path for loading script translations for the given script handle and text domain.
Использование
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(строка|false)
- Path to the translation file to load. False if there isn't one.
- $handle(строка)
- Name of the script to register a translation domain to.
- $domain(строка)
- The text domain.
Список изменений
| С версии 5.0.2 | Введена. |
Где вызывается хук
wp-includes/l10n.php 1386
$file = apply_filters( 'load_script_translation_file', $file, $handle, $domain );