Ticket #22757: 22757.2.diff
File 22757.2.diff, 1.5 KB (added by , 12 years ago) |
---|
-
wp-includes/script-loader.php
689 689 if ( $zip && defined('ENFORCE_GZIP') && ENFORCE_GZIP ) 690 690 $zip = 'gzip'; 691 691 692 if ( !empty($wp_scripts->concat) ) {692 if ( $concat = trim( $wp_scripts->concat, ', ' ) ) { 693 693 694 694 if ( !empty($wp_scripts->print_code) ) { 695 695 echo "\n<script type='text/javascript'>\n"; … … 699 699 echo "</script>\n"; 700 700 } 701 701 702 $src = $wp_scripts->base_url . "/wp-admin/load-scripts.php?c={$zip}&load=" . trim($wp_scripts->concat, ', ') . '&ver=' . $wp_scripts->default_version; 702 $concat = str_split( $concat, 128 ); 703 $concat = 'load[]=' . implode( '&load[]=', $concat ); 704 705 $src = $wp_scripts->base_url . "/wp-admin/load-scripts.php?c={$zip}&" . $concat . '&ver=' . $wp_scripts->default_version; 703 706 echo "<script type='text/javascript' src='" . esc_attr($src) . "'></script>\n"; 704 707 } 705 708 -
wp-admin/load-scripts.php
114 114 return @file_get_contents($path); 115 115 } 116 116 117 $load = preg_replace( '/[^a-z0-9,_-]+/i', '', $_GET['load'] ); 117 $load = $_GET['load']; 118 if ( is_array( $load ) ) 119 $load = implode( '', $load ); 120 121 $load = preg_replace( '/[^a-z0-9,_-]+/i', '', $load ); 118 122 $load = explode(',', $load); 119 123 120 124 if ( empty($load) )