Changeset 62278 for trunk/src/wp-includes/script-modules.php
- Timestamp:
- 04/27/2026 06:29:17 PM (7 weeks ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/script-modules.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/script-modules.php
r62081 r62278 137 137 function wp_deregister_script_module( string $id ) { 138 138 wp_script_modules()->deregister( $id ); 139 } 140 141 /** 142 * Overrides the text domain and path used to load translations for a script module. 143 * 144 * Translations for script modules are loaded automatically from the default 145 * text domain and language directory. Use this function only when a module's 146 * text domain differs from `'default'` or when translation files live outside 147 * the standard location, for example plugin modules using their own text domain. 148 * 149 * @since 7.0.0 150 * 151 * @see WP_Script_Modules::set_translations() 152 * 153 * @param string $id The identifier of the script module. 154 * @param string $domain Optional. Text domain. Default 'default'. 155 * @param string $path Optional. The full file path to the directory containing translation files. 156 * @return bool True if the text domain was registered, false if the module is not registered. 157 */ 158 function wp_set_script_module_translations( string $id, string $domain = 'default', string $path = '' ): bool { 159 return wp_script_modules()->set_translations( $id, $domain, $path ); 139 160 } 140 161
Note: See TracChangeset
for help on using the changeset viewer.