You are here

public function InstapageCmsPluginWPConnector::getSiteURL in Instapage plugin 8.3

Same name and namespace in other branches
  1. 7.3 core/connectors/InstapageCmsPluginWPConnector.php \InstapageCmsPluginWPConnector::getSiteURL()

Gets the site base URL.

Parameters

bool $protocol Value returned with protocol or not.:

Return value

string Site base URL. With protocol or not.

6 calls to InstapageCmsPluginWPConnector::getSiteURL()
InstapageCmsPluginWPConnector::getPageSlugs in core/connectors/InstapageCmsPluginWPConnector.php
Pulls slugs used by WordPress pages.
InstapageCmsPluginWPConnector::getPostSlugs in core/connectors/InstapageCmsPluginWPConnector.php
Gets the list of slugs used by WP posts.
InstapageCmsPluginWPConnector::getTermSlugs in core/connectors/InstapageCmsPluginWPConnector.php
Gets the list of slugs used by WP terms.
InstapageCmsPluginWPConnector::isProhibitedPageSlug in core/connectors/InstapageCmsPluginWPConnector.php
Checks if given slug is prohibited in terms of publishing a landing page. If it's free - will return false. Otherwise an array with slug details will be returned
InstapageCmsPluginWPConnector::isProhibitedPostSlug in core/connectors/InstapageCmsPluginWPConnector.php
Checks if given slug is prohibited in terms of publishing a landing page. If it's free - will return false. Otherwise an array with slug details will be returned

... See full list

File

core/connectors/InstapageCmsPluginWPConnector.php, line 292

Class

InstapageCmsPluginWPConnector
Class that utilizes native WordPress functions to perform actions like remote requests and DB operations.

Code

public function getSiteURL($protocol = true) {
  $url = get_site_url();
  if (!$protocol) {
    $url = str_replace(array(
      'http://',
      'https://',
    ), '', $url);
  }
  return $url;
}