diff --git a/addthis_displays/addthis_displays.addthis.inc b/addthis_displays/addthis_displays.addthis.inc index 4c02e84..30aef52 100644 --- a/addthis_displays/addthis_displays.addthis.inc +++ b/addthis_displays/addthis_displays.addthis.inc @@ -114,11 +114,10 @@ function addthis_displays_addthis_display_markup__addthis_basic_button($options $addthis = AddThis::getInstance(); $settings = $options['#display']['settings']; - $button_img = 'http://s7.addthis.com/static/btn/sm-share-en.gif'; + $button_img = '//s7.addthis.com/static/btn/sm-share-en.gif'; if (isset($settings['buttons_size']) && $settings['buttons_size'] == 'big') { - $button_img = 'http://s7.addthis.com/static/btn/v2/lg-share-en.gif'; + $button_img = '//s7.addthis.com/static/btn/v2/lg-share-en.gif'; } - $button_img = $addthis->transformToSecureUrl($button_img); $extra_css = isset($settings['extra_css']) ? $settings['extra_css'] : ''; $element = array( diff --git a/classes/AddThis.php b/classes/AddThis.php index c558a8e..1dc623c 100644 --- a/classes/AddThis.php +++ b/classes/AddThis.php @@ -56,10 +56,10 @@ class AddThis { const TWITTER_TEMPLATE_DEFAULT = '{{title}} {{url}} via @AddThis'; // External resources. - const DEFAULT_BOOKMARK_URL = 'http://www.addthis.com/bookmark.php?v=300'; - const DEFAULT_SERVICES_CSS_URL = 'http://cache.addthiscdn.com/icons/v1/sprites/services.css'; - const DEFAULT_SERVICES_JSON_URL = 'http://cache.addthiscdn.com/services/v1/sharing.en.json'; - const DEFAULT_WIDGET_JS_URL = 'http://s7.addthis.com/js/300/addthis_widget.js'; + const DEFAULT_BOOKMARK_URL = '//www.addthis.com/bookmark.php?v=300'; + const DEFAULT_SERVICES_CSS_URL = '//cache.addthiscdn.com/icons/v1/sprites/services.css'; + const DEFAULT_SERVICES_JSON_URL = '//cache.addthiscdn.com/services/v1/sharing.en.json'; + const DEFAULT_WIDGET_JS_URL = '//s7.addthis.com/js/300/addthis_widget.js'; const DEFAULT_WIDGET_JS_LOAD_TYPE = 'async'; // Internal resources. @@ -211,7 +211,7 @@ class AddThis { * Add the AddThis Widget JavaScript to the page. */ public function addWidgetJs() { - $widgetjs = new AddThisWidgetJs(self::getWidgetUrl()); + $widgetjs = new AddThisWidgetJs(self::getBaseWidgetUrl()); $widgetjs->addAttribute('pubid', $this->getProfileId()); if (self::getWidgetJsLoadType() != 'include') { @@ -452,11 +452,11 @@ class AddThis { } public function getBaseWidgetJsUrl() { - return check_url(variable_get(self::WIDGET_JS_URL_KEY, self::DEFAULT_WIDGET_JS_URL)); + return variable_get(self::WIDGET_JS_URL_KEY, self::DEFAULT_WIDGET_JS_URL); } public function getBaseBookmarkUrl() { - return check_url(variable_get(self::BOOKMARK_URL_KEY, self::DEFAULT_BOOKMARK_URL)); + return variable_get(self::BOOKMARK_URL_KEY, self::DEFAULT_BOOKMARK_URL); } public function getCoBrand() { @@ -552,18 +552,16 @@ class AddThis { /** * Get the url for the AddThis Widget. + * @deprecated */ private function getWidgetUrl() { - $url = ($this->currentlyOnHttps() ? - $this->getBaseWidgetJsUrl() : // Not https url. - $this->transformToSecureUrl($this->getBaseWidgetJsUrl()) // Transformed to https url. - ); - return check_url($url); + return $this->getBaseWidgetJsUrl(); } /** * Request if we are currently on a https connection. * + * @deprecated No longer used. * @return True if we are currently on a https connection. */ public function currentlyOnHttps() { @@ -573,6 +571,8 @@ class AddThis { /** * Transform a url to secure url with https prefix. + * + * @deprecated No longer used. */ public function transformToSecureUrl($url) { if ($this->currentlyOnHttps()) {