Changes between Initial Version and Version 1 of Ticket #36791, comment 4
- Timestamp:
- 05/10/2016 01:25:32 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #36791, comment 4
initial v1 1 In addition, another reason for controlling the script or style queue directly is to prevent the same script or style from being loaded again. For example, if I used the priority in action as you suggested, I would effectively have a different script queue from the main one (via wp_enqueue_script). If the main one loaded jquery and my action that contained a script that also needed to load jquery , I would effectively load jquery twice.1 In addition, another reason for controlling the script or style queue directly is to prevent the same script or style from being loaded again. For example, if I used the priority in action as you suggested, I would effectively have a different script queue from the main one (via wp_enqueue_script). If the main one loaded jquery and my action that contained a script that also needed to load jquery and loaded it, I would effectively load jquery twice.