jQuery CDN?
-
Hi,
I was taking a closer look at the WAH code to see if it would be practical to switch from Google Hosted Libraries to local jQuery libraries (for privacy reasons), and I discovered that the plugin also appears to have a hard-coded link to an external script via the jQuery CDN. In
\admin\pages\wah-sidebar-controls.php
, Line 91 says:<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
This looks like the same library that the plugin has registered and enqueued from Google Hosted Libraries, just not in minified form.
If the plugin is calling external scripts, shouldn’t they be registered and enqueued through WordPress, the way the Google scripts are? Also, if this is indeed the same library, why call it from two different external sources? (I had no idea the plugin was connecting to jquery.com until I searched the source code.) I admit my understanding of jQuery is very limited, but I’m wondering what your rationale might be in setting it up this way.
Thanks!
- The topic ‘jQuery CDN?’ is closed to new replies.