Optimize script-loader a bit, see #11520

git-svn-id: https://develop.svn.wordpress.org/trunk@18496 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2011-08-03 01:54:29 +00:00
parent 6ed41b7ed1
commit 27e866dfd1
2 changed files with 64 additions and 135 deletions

View File

@@ -173,7 +173,11 @@ class WP_Scripts extends WP_Dependencies {
}
function set_group( $handle, $recursion, $group = false ) {
$grp = (int) $this->get_data( $handle, 'group' );
if ( $this->registered[$handle]->args === 1 )
$grp = 1;
else
$grp = (int) $this->get_data( $handle, 'group' );
if ( false !== $group && $grp > $group )
$grp = $group;