Skip to content

Commit e9345df

Browse files
committed
Script Modules: Drop redundant translations_ prefix from nested path key.
1 parent 8c14a86 commit e9345df

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/wp-includes/class-wp-script-modules.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* dependencies: array<int, array{ id: string, import: 'static'|'dynamic' }>,
2020
* in_footer: bool,
2121
* fetchpriority: 'auto'|'low'|'high',
22-
* translations?: array{ textdomain: string, translations_path: string },
22+
* translations?: array{ textdomain: string, path: string },
2323
* }
2424
*/
2525
class WP_Script_Modules {
@@ -360,8 +360,8 @@ public function set_translations( string $id, string $domain = 'default', string
360360
}
361361

362362
$this->registered[ $id ]['translations'] = array(
363-
'textdomain' => $domain,
364-
'translations_path' => $path,
363+
'textdomain' => $domain,
364+
'path' => $path,
365365
);
366366

367367
return true;
@@ -388,7 +388,7 @@ public function print_script_module_translations(): void {
388388
foreach ( $module_ids as $id ) {
389389
if ( isset( $this->registered[ $id ]['translations'] ) ) {
390390
$domain = $this->registered[ $id ]['translations']['textdomain'];
391-
$path = $this->registered[ $id ]['translations']['translations_path'];
391+
$path = $this->registered[ $id ]['translations']['path'];
392392
} else {
393393
$domain = 'default';
394394
$path = '';

0 commit comments

Comments
 (0)