WordPress.org

Ready to get started?Download WordPress

Forums

WP Fluid Images
HTTPS please (4 posts)

  1. webdevmattcrom
    Member
    Posted 8 months ago #

    Can you update your code to load as https? The plugin is causing mixed content errors in ecommerce sites. Thanks!

    http://wordpress.org/plugins/wp-fluid-images/

  2. webdevmattcrom
    Member
    Posted 8 months ago #

    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.

  3. webdevmattcrom
    Member
    Posted 8 months ago #

    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!

  4. Svetoslav Marinov
    Member
    Posted 8 months ago #

    cool

Reply

You must log in to post.

About this Plugin

About this Topic