wp_set_script_module_translations()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
wp_set_script_module_translations( string $id, string $domain = 'default', string $path = '' ): bool
Описание
Русский перевод этого описания пока проверяется. Показан оригинал.
Translations for script modules are loaded automatically from the default text domain and language directory. Use this function only when a module’s text domain differs from 'default' or when translation files live outside the standard location, for example plugin modules using their own text domain.
Параметры
$id
string
обязательный
$domain
string
необязательный
= 'default'
$path
string
необязательный
= ''
Возвращаемое значение
bool
Исходный код
wp-includes/script-modules.php:158
function wp_set_script_module_translations( string $id, string $domain = 'default', string $path = '' ): bool {
return wp_script_modules()->set_translations( $id, $domain, $path );
}
История изменений
| Версия | Описание |
|---|---|
| 7.0.0 | Introduced. |

