Skip to content

Commit

Permalink
Merge pull request #24 from shadyvb/9
Browse files Browse the repository at this point in the history
Prevent default built-in scripts from breaking minification groups

Fixes #9. Props @shadyvb
  • Loading branch information
westonruter committed Aug 25, 2013
2 parents 0f53159 + cf11bd0 commit 9ebf5bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dependency-minification.php
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,10 @@ static function group_handles_by_extra( array $handles, WP_Dependencies $wp_deps
unset($extra['suffix']);
unset($extra['rtl']);
unset($extra['data']);
// Default scripts are not assigned 'group', so we use the original 'deps->args' value
if ( is_a( $wp_deps, 'WP_Scripts' ) && empty( $extra['group'] ) && is_int( $dep->args ) ) {
$extra['group'] = $dep->args;
}
ksort($extra);
$key = serialize($extra);
$bundles[$key][] = $handle;
Expand Down

0 comments on commit 9ebf5bb

Please sign in to comment.