Skip to content

Commit b30b3a4

Browse files
committed
break up asset groups of over 100
1 parent cecc68c commit b30b3a4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

cssconcat.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ function do_items( $handles = false, $group = false ) {
9898
$stylesheets[ $stylesheet_group_index ] = array();
9999

100100
$stylesheets[ $stylesheet_group_index ][ $media ][ $handle ] = $css_url_parsed['path'];
101+
102+
if ( count( $stylesheets[ $stylesheet_group_index ][ $media ] ) > 100 ) {
103+
$stylesheet_group_index++;
104+
}
101105
$this->done[] = $handle;
102106
} else {
103107
$stylesheet_group_index++;

jsconcat.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ function do_items( $handles = false, $group = false ) {
129129
$javascripts[$level]['paths'][] = $js_url_parsed['path'];
130130
$javascripts[$level]['handles'][] = $handle;
131131

132+
if ( count( $javascripts[$level]['paths'] ) > 100 ) {
133+
$level++;
134+
}
135+
132136
} else {
133137
$level++;
134138
$javascripts[$level]['type'] = 'do_item';

0 commit comments

Comments
 (0)