Changes between Initial Version and Version 1 of Ticket #12009, comment 35
- Timestamp:
- 05/21/2017 05:22:37 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #12009, comment 35
initial v1 1 Personally I would appreciate the allowance for setting script tag attributes when the script itself is registered but I can also see the need for filtering that. For that reason I put together this little bit of code to append do (and rewrite) the section of do_item in class.wp-scripts.phpthat does the actual generation of the tag.1 Personally I would appreciate the allowance for setting script tag attributes when the script itself is registered but I can also see the need for allowing filtering of it. For that reason I put together this little bit of code to append to (and rewrite) the section of do_item in ` class.wp-scripts.php` that does the actual generation of the tag. 2 2 3 My thinking is that the <script>is the actual tag, and everything else including the src and type are attributes. We should be treating attributes similarly and thus I felt it best to generate all of the attributes at the same time. This could also allow plugins to filter the order in which they are output.3 My thinking is that the `<script>` is the actual tag, and everything else including the src and type are attributes. We should be treating attributes similarly and thus I felt it best to generate all of the attributes at the same time. This could also allow plugins to filter the order in which they are output. 4 4 5 5 It is somewhat of a combination of the methods suggested in #22249 and @Otto42 's suggestions