5 | | Yep, `do_concat` can be reused for this. I mostly added another "toggle" as if it is local (at the top of `WP_Scripts::do_item()`) it will act as a "break" in concatenating. That would make it work as described above: concat scripts as usual, when there is a script with "before" or "after", output all already concatenated scripts, then output the current script with the extras, and after that continue concatenating. Something to try next release :) |
| 5 | Yep, `do_concat` can be reused for this. I mostly added another "toggle" as if it is local (at the top of `WP_Scripts::do_item()`) it will act as a "break" in concatenating. That would make it work as described above: concat scripts as usual, when there is a script with "before" or "after", output all already concatenated scripts, then output the current script with the extras, and after that continue concatenating. That was actually the initial patch, perhaps something to try next release :) |