-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imagesloaded.js is included in wordpress #19
Comments
I agree. This has been on my list of things to do for a while. I'll switch over to the bundled version and, assuming there are no problems, have this included in the next release. |
I haven't included this in version 1.5.0, as although it worked in my local environment I encountered an error with the bundled WordPress imagesLoaded script not enqueuing in a staging environment. I'm not sure, but on that server it looked like the script was bundled with masonry.js (which I'm not using). Can imagesloaded definitely be enqueued using its own handle in the latest version of WordPress? |
imagesloaded is a masonry dependency. I think in WordPress 4.5 they were in the same file, but in 4.6 they were separated, so if masonry is used then imagesloaded will also be enqueued. You can see where they discuss this change here: https://core.trac.wordpress.org/ticket/32802#comment:20 |
As previous prior to 4.6 need to be supported, I've kept a local copy of imagesloaded around just in case. The bundled version will be used when available, but as I am not using the masonry.js script, it would be overkill to load it just for the benefit of using the bundled imagesloaded script. Does that sound like a reasonable solution? |
sounds good! :) |
Great! That solution is in place now with Tailor 1.5.1. I'll close out this issue :) |
I noticed tailor has bundled it's own version of imagesloaded.
It's best practice to make use of scripts in WordPress so that the same scripts don't get loaded multiple times.
The WordPress script is registered with the handle imagesloaded.
The text was updated successfully, but these errors were encountered: