Commit f8bd260
committed
Script Modules: Merge translation overrides into \$registered.
Store the textdomain and translations_path for a script module directly
on its entry in WP_Script_Modules::\$registered, rather than in a
separate \$translations property. This mirrors how WP_Dependency stores
those fields for classic scripts and keeps all data about a module in
one place.
The nested 'translations' key is only set when set_translations() is
called for that module, so the 'optional override' intent is preserved.1 parent 07fbf49 commit f8bd260
1 file changed
Lines changed: 7 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 94 | | |
105 | 95 | | |
106 | 96 | | |
| |||
369 | 359 | | |
370 | 360 | | |
371 | 361 | | |
372 | | - | |
373 | | - | |
374 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
375 | 365 | | |
376 | 366 | | |
377 | 367 | | |
| |||
396 | 386 | | |
397 | 387 | | |
398 | 388 | | |
399 | | - | |
400 | | - | |
401 | | - | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
402 | 392 | | |
403 | 393 | | |
404 | 394 | | |
| |||
0 commit comments