Is it necessary to declare dependency in second enqueue?
-
I’m enqueuing two js scripts that both depend on jquery. Do I need to declare the $deps array on the second enqueue if it also relies on jquery?
My thought is that declaring it on the first enqueue is sufficient and it would be redundant to declare the dependency if the second script depends on the same library as the first one.
Can anyone confirm this or make any suggestions? I’m just starting to get the hang of enqueuing styles and scripts into themes, and I wonder how this is best handled.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Is it necessary to declare dependency in second enqueue?’ is closed to new replies.