You are here

public static function InstapageCmsPluginConnector::isProhibitedLandingPageSlug in Instapage plugin 8.3

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

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

@uses InstapageCmsPluginDBModel::$pagesTable @uses InstapageCmsPluginDBModel::getInstance() @uses InstapageCmsPluginDBModel::getResults()

Parameters

string $slug Slug to be checked:

Return value

bool|array

3 calls to InstapageCmsPluginConnector::isProhibitedLandingPageSlug()
InstapageCmsPluginDrupal7Connector::isProhibitedSlug in core/connectors/InstapageCmsPluginDrupal7Connector.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
InstapageCmsPluginDrupal8Connector::isProhibitedSlug in core/connectors/InstapageCmsPluginDrupal8Connector.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::isProhibitedSlug 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

File

core/connectors/InstapageCmsPluginConnector.php, line 333

Class

InstapageCmsPluginConnector
Main connector class, used to integrate with PHP-based CMSes. It's job is to detect a CMS that executes the code and select proper CMS Connector.

Code

public static function isProhibitedLandingPageSlug($slug) {
  $db = InstapageCmsPluginDBModel::getInstance();
  $sql = 'SELECT id, slug, \'\' AS editUrl FROM ' . $db->pagesTable . ' WHERE type = \'page\' AND slug = \'%s\' LIMIT 1';
  $results = $db
    ->getResults($sql, $slug);
  return $results;
}