WordPress.org

Ready to get started?Download WordPress

Forums

Social Media Widget
[resolved] Fix CSS Enqueueing for SSL Compatibility (4 posts)

  1. i3inary
    Member
    Posted 1 year ago #

    Hey nice plugin been using it for over a year. One issue I just came across this week was for a client that had an ecommerce site and required an SSL checkout page.

    I couldn't figure out how to get the SSL lock icon in the address bar to show up on Safari and Chrome console keep telling me "ran insecure content from plugins/social-media-widget/social_widget.css" so I found this plugin http://wordpress.org/extend/plugins/ssl-insecure-content-fixer/ with the hopes of it solving the issue for me but it didn't. After reading the notes on it I noticed "stylesheets that are registered using wp_register_style or wp_enqueue_style" and then took a look at the way you were including your style and it was not using wp_enqueue_style.

    I went ahead and updated the plugin for myself and it works fine now but it would be awesome if you updated your plugin so updates wouldn't break my install and you would be compliant with SSL sites also.

    social-widget.php - starting on line 21

    function Social_Widget_Scripts(){
    	// Respects SSL, css is relative to the current file
    	wp_register_style( 'social-widget', plugins_url('social_widget.css', __FILE__) );
    	wp_enqueue_style( 'social-widget' );
    }
    /* Add scripts to header */
    add_action('wp_enqueue_scripts', 'Social_Widget_Scripts');

    http://wordpress.org/extend/plugins/social-media-widget/

  2. Blink Web Effects
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for pointing this out, will fix this in the next update release.

  3. i3inary
    Member
    Posted 1 year ago #

    Awesome thanks!

  4. Blink Web Effects
    Member
    Plugin Author

    Posted 1 year ago #

    Fixed in 3.2.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags