Gytis Repecka
Member
Posted 10 months 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/
EmmanuelG
Member
Posted 10 months 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.
EmmanuelG
Member
Posted 10 months ago #
Version 1.8.2 published with requested modification.
Gytis Repecka
Member
Posted 10 months ago #
Great, works smooth now :)
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__));
}