Changes between Initial Version and Version 1 of Ticket #25277, comment 6
- Timestamp:
- 01/06/2015 01:51:19 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #25277, comment 6
initial v1 17 17 This works great when the file in the middle doesn't produce side-effects (most of the WP files produce side-effects ... ) 18 18 19 Passing in JS as a string to `$wp_scripts->add_data()` sucks, might be tter if it also took a `callable`, which `wp_localize_script()` now does.19 Passing 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. 20 20 21 21 When concatenation is used, the choices are: 22 * Output the data right after the script in the concat blob23 * 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. 24 24 25 Another potential issue - if some enqueues the script but doesn't want the data.25 Another potential issue - if someone enqueues the script but doesn't want the data. 26 26 27 27 I'll leave the decision here to you @azaozz. I am not married to this, a revert would not hurt my feelings.