When we are developing Themes, we are taught to enqueue the jQuery library if necessary, because no jQuery library is available on the front-end of WordPress (if I'm not wrong). But when we are into the Admin Panel of WordPress, WP is using jQuery for various purposes — WordPress back-end, by core, already loading jQuery into its admin area.
So, when we are developing Back-end features for a Theme or Plugin, and we are in need of loading jQuery, is that possible to load jQuery library from WordPress bundle?
I'm asking this because in one of my under-dev. plugin, I added jQuery library-
- from the jQuery CDN,
- and as a fallback, from the plugin bundle (using this SO thread)
Now, on every page-refresh my admin panel hits the jQuery CDN, and takes the jQuery lib file from the CDN. If there's no internet connection the php-file-read throws a debug error, but the jQuery loads from my plugin bundle.
But if we can load jQuery from the WP bundle, it'll save time and load of a page, I think.