/** * Get HTTPS Url * * @param none * @return WordPressHTTPS_Url */ public function getHttpsUrl() { if (!isset($this->_https_url)) { $this->_https_url = clone $this->getHttpUrl(); $this->_https_url->setScheme('https'); if (is_string($this->getSetting('ssl_host')) && $this->getSetting('ssl_host') != '') { $ssl_host = rtrim($this->getSetting('ssl_host'), '/') . '/'; // If using a different host for SSL if ($ssl_host != $this->_https_url->toString()) { // Assign HTTPS URL to SSL Host $this->setSetting('ssl_host_diff', 1); if (strpos($ssl_host, 'http://') === false && strpos($ssl_host, 'https://') === false) { $ssl_host = 'https://' . $ssl_host; } $this->_https_url = WordPressHTTPS_Url::fromString($ssl_host); } else { $this->setSetting('ssl_host_diff', 0); } } // Prepend SSL Host path if (strpos($this->_https_url->getPath(), $this->getHttpUrl()->getPath()) === false) { $this->_https_url->setPath($this->_https_url->getPath() . $this->getHttpUrl()->getPath()); } // Add SSL Port to HTTPS URL $this->_https_url->setPort($this->getSetting('ssl_port')); } return $this->_https_url; }