• The Logo Slider plugin serves images as HTTP which is throwing warnings to browsers on my HTTPS pages.

    Some examples:

    #prev{
    background:url(<?php echo WP_CONTENT_URL.'/plugins/logo-slider/arrows/arrow'. $wp_logo_slider_settings['arrow'].'.png'; ?>) no-repeat center;
    float:right;
    margin-right:-50px;
    }

    and

    echo '<img src="'.$data['file_url'].'" class="logo-img" alt="" />';

    I can edit logo-slider.php to fix this but it will get overwritten during an update, right?

    What is the right way to fix this? Maybe a rewrite rule in .htaccess?

    I’m returning to WP after having worked on other platforms for several years so if you don’t have the time for a full explaination, just pointing me in the right direction would be a huge help.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter TheDamian

    (@thedamian)

    Here is the filter I created to fix the http:// links in the slider itself:

    /** change logo slider image sources to https when pages is viewed from SSL */
    add_filter('widget_text', 'https_for_slider');
    function https_for_slider($text) {
    	if (is_ssl()) {
    		$text = str_replace('http://', 'https://', $text);
      }
    	return $text;
    }

    The CSS insertion uses wp_head() which doesn’t allow for filtering, just actions. For now I edited the plugin file.

    Using ob_start() as described here: http://wordpress.org/support/topic/filter-to-grab-wp_head-contents is an option, but I decided not to get into that for now.

    Thanks, TheDamian. That worked perfectly.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Logo Slider] Images HTTP on HTTPS Pages’ is closed to new replies.