Support » Plugin: WP Fluid Images » HTTPS please

Viewing 3 replies - 1 through 3 (of 3 total)
  • I found this topic on the subject:
    http://wordpress.org/ideas/topic/wp_plugin_url-doesnt-take-ssl-into-account

    Would be great to see this fixed in your otherwise excellent plugin.

    OK, I just went and figured out the fix myself. If anyone else would like to avoid “mixed content” warnings for sites that use SSL and want to use this plugin the fix is pretty easy:

    Go into wp-fluid-images/plugin.php and find this at line 19(ish)

    if ( !is_admin() ) { // instruction to only load if it is not the admin area
    		$foo_loc = WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__));
    		$js_loc = $foo_loc . '/lib/';
    		wp_register_script('fluidimage', $js_loc.'fluidimage.js', array('jquery'), '1.0',false);
    		wp_enqueue_script('fluidimage');
    	}

    Change it to this and you’ve got your green padlock back!

    if ( !is_admin() ) { // instruction to only load if it is not the admin area
    		$js_loc = plugins_url( 'lib/', __FILE__ );
    		wp_register_script('fluidimage', $js_loc.'fluidimage.js', array('jquery'), '1.0',false);
    		wp_enqueue_script('fluidimage');
    	}

    Hope that’s useful for someone!

    cool

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HTTPS please’ is closed to new replies.