WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Declan O'Neill
    Member
    Posted 2 years 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
    Plugin Author

    Posted 2 years 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. Declan O'Neill
    Member
    Posted 2 years ago #

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

    Thanks, Declan

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic