You are here

public function AddThis::transformToSecureUrl in AddThis 7.4

Transform a url to secure url with https prefix.

1 call to AddThis::transformToSecureUrl()
AddThis::getWidgetUrl in classes/AddThis.php
Get the url for the AddThis Widget.

File

classes/AddThis.php, line 458
An AddThis-class.

Class

AddThis
@file An AddThis-class.

Code

public function transformToSecureUrl($url) {
  if ($this
    ->currentlyOnHttps()) {
    $url = strpos($url, 'http://') === 0 ? 'https://' . substr($url, 7) : $url;
  }
  return $url;
}