WordPress.org

Make WordPress Core

Ticket #22757: 22757.3.diff

File 22757.3.diff, 978 bytes (added by georgestephanis, 17 months ago)
  • wp-includes/script-loader.php

     
    699699                        echo "</script>\n"; 
    700700                } 
    701701 
     702                while( strlen( trim( $wp_scripts->concat, ', ' ) ) > 500 ) { 
     703                        $index = strrpos( $wp_scripts->concat, ',', 500 ); 
     704                        $segment = substr( $wp_scripts->concat, 0, $index ); 
     705                        $wp_scripts->concat = substr( $wp_scripts->concat, $index ); 
     706                        $src = $wp_scripts->base_url . "/wp-admin/load-scripts.php?c={$zip}&load=" . trim( $segment, ', ' ) . '&ver=' . $wp_scripts->default_version; 
     707                        echo "<script type='text/javascript' src='" . esc_attr( $src ) . "'></script>\n"; 
     708                } 
     709 
    702710                $src = $wp_scripts->base_url . "/wp-admin/load-scripts.php?c={$zip}&load=" . trim($wp_scripts->concat, ', ') . '&ver=' . $wp_scripts->default_version; 
    703711                echo "<script type='text/javascript' src='" . esc_attr($src) . "'></script>\n"; 
    704712        }