Ticket #49311: 49311.patch
| File 49311.patch, 1.4 KB (added by , 7 years ago) |
|---|
-
src/wp-includes/script-loader.php
287 287 288 288 foreach ( $packages as $package ) { 289 289 $handle = 'wp-' . $package; 290 $path = "/wp-includes/js/dist/$package$suffix.js"; 290 $path = WPINC . '/js/dist/$package$suffix.js'; 291 $dependencies = array(); 292 $version = false; 291 293 292 294 if ( ! file_exists( ABSPATH . $path ) ) { 293 295 continue; 294 296 } 295 297 296 $asset_file = include ABSPATH . WPINC . "/assets/dist/$package$suffix.asset.php"; 297 $dependencies = $asset_file['dependencies']; 298 $php_support_file_path = ABSPATH . WPINC . '/assets/dist/$package$suffix.asset.php'; 299 if( file_exists( $php_support_file_path ) ){ 300 $asset_file = include $php_support_file_path; 301 $dependencies = $asset_file['dependencies']; 302 $version = $asset_file['version']; 303 } 298 304 299 305 // Add dependencies that cannot be detected and generated by build tools. 300 306 switch ( $handle ) { … … 305 311 array_push( $dependencies, 'media-models', 'media-views', 'postbox', 'wp-dom-ready' ); 306 312 break; 307 313 } 314 $scripts->add( $handle, $path, $dependencies, $version, 1 ); 308 315 309 $scripts->add( $handle, $path, $dependencies, $asset_file['version'], 1 );310 311 316 if ( in_array( $package, $package_translations, true ) ) { 312 317 $scripts->set_translations( $handle ); 313 318 }
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)