public function InstapageCmsPluginWPConnector::getHomeURL in Instapage plugin 8.3
Same name and namespace in other branches
- 7.3 core/connectors/InstapageCmsPluginWPConnector.php \InstapageCmsPluginWPConnector::getHomeURL()
 
Gets the site home URL.
Parameters
bool $protocol Value returned with protocol or not.:
Return value
string Site home URL. With protocol or not.
2 calls to InstapageCmsPluginWPConnector::getHomeURL()
- InstapageCmsPluginWPConnector::checkCustomUrl in core/
connectors/ InstapageCmsPluginWPConnector.php  - Checks (and displays) if a landing page hould be displayed instead of normal CMS page under current URL.
 - InstapageCmsPluginWPConnector::checkHomepage in core/
connectors/ InstapageCmsPluginWPConnector.php  - Checks (and displays) if a landing page marked as homepage should be displayed instead of normal CMS homepage.
 
File
- core/
connectors/ InstapageCmsPluginWPConnector.php, line 309  
Class
- InstapageCmsPluginWPConnector
 - Class that utilizes native WordPress functions to perform actions like remote requests and DB operations.
 
Code
public function getHomeURL($protocol = true) {
  $url = get_home_url();
  if (!$protocol) {
    $url = str_replace(array(
      'http://',
      'https://',
    ), '', $url);
  }
  return $url;
}