WordPress.org

Make WordPress Core

Ticket #25247: #25247_bugfix.diff

File #25247_bugfix.diff, 984 bytes (added by nmarks, 5 years ago)

Patch for #25247

  • wp-includes/class.wp-dependencies.php

    diff --git wp-includes/class.wp-dependencies.php wp-includes/class.wp-dependencies.php
    index c1bac65..692d04e 100644
    class WP_Dependencies { 
    107107                                 *   <code>add( 'scriptaculous', false, array( 'scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls' ) );</code>
    108108                                 *
    109109                                 * The src property is false.
     110                                 *
     111                                 * If the item has a group set, it may need to be deferred and loaded in the footer.
     112                                 * If it is put in the done array, the dependencies won't be loaded in the footer.
    110113                                **/
    111                                 if ( ! $this->registered[$handle]->src ) {
     114                                if ( ( ! $this->registered[$handle]->src && ! isset($this->registered[$handle]->extra['group'] ) ) || ( ! $this->registered[$handle]->src && isset($this->registered[$handle]->extra['group']) && $this->registered[$handle]->extra['group'] == $group ) ) {
    112115                                        $this->done[] = $handle;
    113116                                        continue;
    114117                                }