хук-фильтр
since 6.5.0
load_translation_file
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
apply_filters( 'load_translation_file', string $file, string $domain, string $locale )
Описание
Аналогичен фильтру 'load_textdomain_mofile', но с тем отличием, что путь может указывать на MO- или PHP-файл.
Оригинал (английский)
Similar to the ‘load_textdomain_mofile’ filter with the difference that the file path could be for an MO or PHP file.
Фильтруемое значение
Путь к загружаемому файлу перевода.
Параметры
$file
string
обязательный
Путь к загружаемому файлу перевода.
$domain
string
обязательный
Текстовый домен.
$locale
string
обязательный
Локаль.
Исходный код
wp-includes/l10n.php:843
$file = (string) apply_filters( 'load_translation_file', $file, $domain, $locale );
История изменений
| Версия | Описание |
|---|---|
| 6.6.0 | Added the $locale parameter. |
| 6.5.0 | Introduced. |

