Support » Plugins » [Plugin: Use Google Libraries] Changes needed to use secure urls for sites with SSL

  • So far so good with the Use Google Libraries plugin, except that the javascript file loaded by the plugin (use-google-libraries/js/jQnc.js?ver=2.8.3 for me) is not loaded properly using https on my SSL site.

    I’ve made the following change in the plugin to fix this problem, and would appreciate if the plugin can be updated to use the new code as well:

    The code in question is found in the use-google-libraries.php file around line 141.

    old code
    $scripts->add( 'jquery-noconflict', WP_PLUGIN_URL . '/use-google-libraries/js/jQnc.js', array('jquery-core'));

    new code
    $scripts->add( 'jquery-noconflict', plugins_url('/use-google-libraries/js/jQnc.js'), array('jquery-core'));

    http://wordpress.org/extend/plugins/use-google-libraries/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Wow, thanks for this – this issue has been driving me nuts! Very mysterious. A shame it needs hacking. No news about this change making it into the plugin itself?

    Now that IE 8 makes the default choice for “Do you want to display insecure items?” as “NO” (I believe), I think this sort of issue is critical.

    Version 1.0.9.1 should resolve this since it doesn’t use the jQnc.js file any longer.

    Thanks, look forward to the new version!

    Meanwhile, there’s still other plugins that have this issue (Stray Random Quotes and Subscribe2 to mention a couple). A fix I’ve found that deals with these and Use Google Libraries, and avoids hacking, is to add this line to wp-config.php:

    define( 'WP_CONTENT_URL', ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on' ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . '/wp-content' );

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Use Google Libraries] Changes needed to use secure urls for sites with SSL’ is closed to new replies.