Ricardo
Member
Posted 2 years ago #
I'm using version 1.1.2 over WP 3.1 Multisite.
The plugin activates normally and successfully removes the lines pointing to the local jQuery versions, but it never replaces them with the lines pointing to Google servers.
I've been using it for a while and it worked fine until WP 3.0.
Does anyone else have this problem?
http://wordpress.org/extend/plugins/use-google-libraries/
Ricardo
Member
Posted 2 years ago #
Never mind, it was my bad. I wasn't manually loading the scripts! I guess they used to be automatically loaded but that changed since 3.1.
In case anyone else runs into the same problem, this is the way to load the scripts (i.e. jQuery and jQuery UI):
function load_scripts () {
wp_enqueue_script('jquery');
wp_enqueue_script('jquery-ui-core');
}
add_action('init', 'load_scripts');
Glad you got it sorted out. Be sure to load the actual library you need (jquery-ui-whatever, rather that jquery-ui-core), so if you disable UGL your script will still work. Also, no need to enqueue jquery itself as dependencies in WordPress will handle that if parts of jquery-ui are loaded.