Support » Plugin: Social Media Widget » Fix CSS Enqueueing for SSL Compatibility

  • Resolved i3inary


    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 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');

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fix CSS Enqueueing for SSL Compatibility’ is closed to new replies.