WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #25277, comment 6


Ignore:
Timestamp:
01/06/2015 01:51:19 AM (6 years ago)
Author:
wonderboymusic
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25277, comment 6

    initial v1  
    1717This works great when the file in the middle doesn't produce side-effects (most of the WP files produce side-effects ... )
    1818
    19 Passing in JS as a string to `$wp_scripts->add_data()` sucks, might better if it also took a `callable`, which `wp_localize_script()` now does.
     19Passing in JS as a string to `$wp_scripts->add_data()` sucks, might be better if it also took a `callable`, which `wp_localize_script()` now does.
    2020
    2121When concatenation is used, the choices are:
    22 * Output the data right after the script in the concat blob
    23 * Output all data at once (which I have done) - once again, could get weird if files produce side effects.
     22* Output the data right after the script within the concat blob
     23* Output all data at once after the concatenated script (which I have done) - once again, could get weird if files produce side effects.
    2424
    25 Another potential issue - if some enqueues the script but doesn't want the data.
     25Another potential issue - if someone enqueues the script but doesn't want the data.
    2626
    2727I'll leave the decision here to you @azaozz. I am not married to this, a revert would not hurt my feelings.