WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #36392


Ignore:
Timestamp:
04/01/2016 04:48:11 AM (4 years ago)
Author:
westonruter
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36392 – Description

    initial v1  
    1 I've found that if an inline script is added via `wp_add_inline_script()` for a JS file registered in a plugin, if this script has a dependency on a core script that gets concatenated via `load-scripts.php`, the script dependency and the inline script will erroneously get printed ''before'' the the script tag referencing `load-scripts.php` and the script it depends on.
     1I've found that if an inline script is added via `wp_add_inline_script()` for a JS file registered in a plugin, if this script has a dependency on a core script that gets concatenated via `load-scripts.php`, the script dependency and the inline script will erroneously get printed ''before'' the the script tag referencing `load-scripts.php` and the script it depends on. This error only occurs when `SCRIPT_DEBUG` is `false`, since this is when `load-scripts.php` is used.
    22
    33Here is a minimal test case: https://gist.github.com/westonruter/c8968edc125fd31ae2da4171ced8c62b
     4
     5`wp_add_inline_script()` introduced in #14853.