WordPress.org

Ready to get started?Download WordPress

Forums

Use Google Libraries
[resolved] Seems not to work in 3.1 (3 posts)

  1. Ricardo
    Member
    Posted 3 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/

  2. Ricardo
    Member
    Posted 3 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');
  3. Jason Penney
    Member
    Plugin Author

    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic