WordPress.org

Make WordPress Core

Changeset 11058


Ignore:
Timestamp:
04/22/09 21:01:36 (5 years ago)
Author:
azaozz
Message:

Queue all default scripts for the head when a custom script lists them as dependencies, fixes #9620

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class.wp-dependencies.php

    r10357 r11058  
    8484            $handle_parts = explode('?', $handle); 
    8585            $handle = $handle_parts[0]; 
     86            $queued = in_array($handle, $this->to_do, true); 
    8687 
    8788            if ( in_array($handle, $this->done, true) ) // Already done 
    8889                continue; 
    8990 
    90             $this->set_group( $handle, $recursion, $group ); 
    91  
    92             if ( in_array($handle, $this->to_do, true) ) // Already grobbed it and its deps 
     91            $moved = $this->set_group( $handle, $recursion, $group ); 
     92             
     93            if ( $queued && !$moved ) // already queued and in the right group 
    9394                continue; 
    94  
    95             if ( isset($handle_parts[1]) ) 
    96                 $this->args[$handle] = $handle_parts[1]; 
    9795 
    9896            $keep_going = true; 
     
    110108                    continue; // We're at the top level.  Move on to the next one. 
    111109            } 
     110 
     111            if ( $queued ) // Already grobbed it and its deps 
     112                continue; 
     113 
     114            if ( isset($handle_parts[1]) ) 
     115                $this->args[$handle] = $handle_parts[1]; 
    112116 
    113117            $this->to_do[] = $handle; 
  • trunk/wp-includes/class.wp-scripts.php

    r10442 r11058  
    147147            $grp = $group; 
    148148 
    149         parent::set_group( $handle, $recursion, $grp ); 
     149        return parent::set_group( $handle, $recursion, $grp ); 
    150150    } 
    151151 
Note: See TracChangeset for help on using the changeset viewer.