WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/10/2016 03:32:47 AM (4 years ago)
Author:
jeremyfelt
Message:

Ensure consistent dependency order when using wp_add_inline_script()

This disables the concatenation of remaining enqueued scripts once wp_add_inline_script() is invoked, which allows us to reliably print these scripts and their before/after inline scripts in the desired order.

Props gitlost, azaozz, swisspidy, ocean90.
Fixes #36392.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r37164 r37171  
    999999        }
    10001000
    1001         if ( ! empty( $wp_scripts->print_html_before ) ) {
    1002             echo $wp_scripts->print_html_before;
    1003         }
    1004 
    10051001        $concat = str_split( $concat, 128 );
    10061002        $concat = 'load%5B%5D=' . implode( '&load%5B%5D=', $concat );
Note: See TracChangeset for help on using the changeset viewer.