WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/17/2016 05:10:53 PM (5 years ago)
Author:
ocean90
Message:

Script/Style Dependencies: Make sure that inline styles for handles without a source are printed.

This prevents breaking plugins which are adding inline styles to the wp-admin handle after [36341].

Props dd32, ocean90.
Fixes #35229.

File:
1 edited

Legend:

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

    r33734 r36550  
    9999        foreach ( $this->to_do as $key => $handle ) {
    100100            if ( !in_array($handle, $this->done, true) && isset($this->registered[$handle]) ) {
    101 
    102                 /*
    103                  * A single item may alias a set of items, by having dependencies,
    104                  * but no source. Queuing the item queues the dependencies.
    105                  *
    106                  * Example: The extending class WP_Scripts is used to register 'scriptaculous' as a set of registered handles:
    107                  *   <code>add( 'scriptaculous', false, array( 'scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls' ) );</code>
    108                  *
    109                  * The src property is false.
    110                  */
    111                 if ( ! $this->registered[$handle]->src ) {
    112                     $this->done[] = $handle;
    113                     continue;
    114                 }
    115 
    116101                /*
    117102                 * Attempt to process the item. If successful,
Note: See TracChangeset for help on using the changeset viewer.