Overrides the text domain and path used to load translations for a script module.
Description
This is only needed for modules whose text domain differs from 'default' or whose translation files live outside the standard locations, for example plugin modules that register their own text domain. Translations for modules that use the default domain are loaded automatically by WP_Script_Modules::print_script_module_translations().
Parameters
$idstring
The identifier of the script module.
$domainstringoptional
Text domain. Default 'default'.Default: 'default'
$pathstringoptional
The full file path to the directory containing translation files.Default: ''
Return
bool
True if the text domain was registered, false if the module is not registered.
Signature, return type and hooks compared across 2 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-includes/class-wp-script-modules.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.