Unpredictable JS load order creates undefined function type of errors #520
Labels
good first issue
If you're a first time contributor this is a good issue for you!
hacktoberfest
PRs for this issue count towards Hacktoberfest contributions!
help wanted
Looking for contributors to assist with this issue
Type: Bug
Bugs and errors
Milestone
This is the current order of the js files. Here's an ordered list for convenience:
Often because the
l10n
object is defined inllms.min.js
but used in scripts loaded before that where it throws undefined errors.By using the
$dependecy
parameter ofwp_enqueue_script()
we could control this load order by adding scripts as dependencies of other scripts.The final solution would involve deciding on a correct nested load order and then registering dependencies without explicitly enqueuing them.
This is because enqueueing the final script will surely enqueue scripts listed in the dependencies first.
The text was updated successfully, but these errors were encountered: