Forums

jQuery Colorbox
[resolved] jquery-colorbox breaking HTTPS (3 posts)

  1. declanon
    Member
    Posted 5 months ago #

    Hi Folks, I have jquery-colorbox installed on a site I am managing. The website takes donations online so it has a SSL installed. The problem is when the user navigates to the checkout page, they are redirected to a HTTPS page. But the HTTPS is broken because of the following line of code.

    Does anyone know how I can update the plugin so this line is HTTPS?

    <link rel='stylesheet' id='colorbox-theme10-css' href='http://www.naha-inc.org/wp-content/plugins/jquery-colorbox/themes/theme10/colorbox.css?ver=4.2' type='text/css' media='screen' />

    Thanks Declan

    http://wordpress.org/extend/plugins/jquery-colorbox/

  2. techotronic
    Member
    Posted 3 months ago #

    you're right about that, all URLs generated by the plugin for JS or CSS are HTTP only.
    This will be fixed in the next version of the plugin.

    The secret is to use the "plugins_url" function instead of the "WP_PLUGIN_URL" constant.
    Change the declaration of "JQUERYCOLORBOX_PLUGIN_URL" in jquery-colorbox.php

    from:
    define('JQUERYCOLORBOX_PLUGIN_URL', WP_PLUGIN_URL . '/' . JQUERYCOLORBOX_PLUGIN_NAME);

    to:
    define('JQUERYCOLORBOX_PLUGIN_URL', plugins_url('', __FILE__));

    Cheers,
    Arne

  3. declanon
    Member
    Posted 3 months ago #

    Hi Arne, we figured it out a while ago. I should've posted the solution here for others :)

    Thanks, Declan

Reply

You must log in to post.

About this Plugin

About this Topic