WordPress.org

Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #25277, comment 7


Ignore:
Timestamp:
01/07/2015 07:23:55 PM (6 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25277, comment 7

    v2 v3  
    1717- "Duck punching" that `API`. Very undesirable.
    1818
    19 In both cases it is crucial for the "after" to be immediately after the <script> tag. However when concatenating the default scripts, we cannot add in inside the blob. The reason is WP doesn't run when outputting concatenated scripts and styles, or it would have to run three times on every page load (load-scripts.php and load-styles.php use script-loader as a whitelist only). So if a plugin adds/removes/changes the "after", we cannot catch that.
     19In both cases it is crucial for the "after" to be immediately after the <script> tag. However when concatenating the default scripts, we cannot add it inside the blob. The reason is WP doesn't run when outputting concatenated scripts and styles, or it would have to run three times on every page load (load-scripts.php and load-styles.php use script-loader as a whitelist only). So if a plugin adds/removes/changes the "after", we cannot catch that.
    2020
    2121In that terms I don't think we need to have this functionality for scripts. On the other hand this is useful for styles (was added in 3.3), and the placement there is not that critical.