WordPress.org

Ready to get started?Download WordPress

Forums

WTI Like Post
[resolved] SSL insecure content (2 posts)

  1. webaware
    Member
    Posted 1 year ago #

    G'day,

    This plugin is loading its CSS using the WP_PLUGIN_URL constant instead of the plugin_dir_url() function, so it triggers insecure content warnings on SSL pages. It's also loading an image (pixel.gif) using WP_PLUGIN_URL. I looked at providing a "fix" (hack) for your plugin with my SSL Insecure Content Fixer but I can't because of the image being in the content generation (I don't/won't filter the content, for performance reasons; WordPress HTTPS does that job).

    Fixing this in your plugin is easy though:

    * use the wp_enqueue_scripts action to enqueue your CSS, instead of printing it from wp_head action
    * use plugin_dir_url() to get your plugin dir, instead of WP_PLUGIN_URL, so that it handles the transition to SSL (HTTPS)
    * you could also use wp_localize_script() instead of the script block in your WtiLikePostAddHeaderLinks() function, and change your scripts to access blog_url through your namespace (see link)

    cheers,
    Ross

    http://wordpress.org/extend/plugins/wti-like-post/

  2. webtechideas
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Ross,
    These are really some handy points and thanks for putting them here. Frankly speaking SSL was never in my mind at the time of development. These findings will surely improve the plugin.

    Thanks
    Chitta

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.