Ticket #45161: 45161.diff
File 45161.diff, 1.3 KB (added by , 6 years ago) |
---|
-
src/wp-includes/script-loader.php
321 321 'html-entities' => array( 'wp-polyfill' ), 322 322 'i18n' => array( 'wp-polyfill' ), 323 323 'is-shallow-equal' => array( 'wp-polyfill' ), 324 'keycodes' => array( 'lodash', 'wp-polyfill' ),324 'keycodes' => array( 'lodash', 'wp-polyfill', 'wp-i18n' ), 325 325 'list-reusable-blocks' => array( 326 326 'lodash', 327 327 'wp-api-fetch', … … 363 363 'wordcount' => array( 'wp-polyfill' ), 364 364 ); 365 365 366 $package_translations = array( 367 'api-fetch' => 'default', 368 'blocks' => 'default', 369 'block-library' => 'default', 370 'components' => 'default', 371 'edit-post' => 'default', 372 'editor' => 'default', 373 'format-library' => 'default', 374 'keycodes' => 'default', 375 'list-reusable-blocks' => 'default', 376 'nux' => 'default', 377 ); 378 366 379 foreach ( $packages_dependencies as $package => $dependencies ) { 367 380 $handle = 'wp-' . $package; 368 381 $path = "/wp-includes/js/dist/$package$suffix.js"; 369 382 370 383 $scripts->add( $handle, $path, $dependencies, false, 1 ); 384 385 if ( array_key_exists( $package, $package_translations ) ) { 386 $scripts->set_translations( $handle, $package_translations[ $package ] ); 387 } 371 388 } 372 389 } 373 390