WordPress.org

Ready to get started?Download WordPress

Forums

EG-Attachments
[resolved] SSL compatibility (5 posts)

  1. Gytis Repecka
    Member
    Posted 3 years ago #

    EG Attachments can cause error on SSL-enabled site, because it loads CSS file via HTTP regardless enabled HTTPS. To fix this, lib/eg-plugin.inc.php has to be edited:
    Find:
    $this->plugin_url = trailingslashit(WP_PLUGIN_URL.'/'.$plugin_base_path);
    And replace with:
    $this->plugin_url=trailingslashit(plugins_url().'/'.$plugin_base_path);

    This is because WP_PLUGIN_URL is legacy constant that does not take into account SSL. Would be great if author include this with updates.

    http://wordpress.org/extend/plugins/eg-attachments/

  2. EmmanuelG
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Gytis

    Thanks for the information. I will modify the file lib/eg-plugin.inc.php. The version 1.8.2 should be published soon.

    Emmanuel.

  3. EmmanuelG
    Member
    Plugin Author

    Posted 3 years ago #

    Version 1.8.2 published with requested modification.

  4. Gytis Repecka
    Member
    Posted 3 years ago #

    Great, works smooth now :)

  5. Mvied
    Member
    Posted 2 years ago #

    I'm not sure how backwards compatible you'd like to keep your plugin, but in my plugins I usually do something like this.

    if ( version_compare( get_bloginfo('version'), '2.8', '>=' ) ) {
    	$this->plugin_url = plugins_url('', __FILE__);
    } else {
    	$this->plugin_url = WP_PLUGIN_URL . '/' . plugin_basename(dirname(__FILE__));
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic