public function InstapageCmsPluginDrupal7Connector::isAdmin in Instapage plugin 7.3
Same name and namespace in other branches
- 8.3 core/connectors/InstapageCmsPluginDrupal7Connector.php \InstapageCmsPluginDrupal7Connector::isAdmin()
Checks if current URL is admin page.
Return value
bool True if current URL is admin page.
1 call to InstapageCmsPluginDrupal7Connector::isAdmin()
- InstapageCmsPluginDrupal7Connector::isHtmlReplaceNecessary in core/
connectors/ InstapageCmsPluginDrupal7Connector.php - Checks if there is a need to replace content of CMS with a landing page. Prevents content replacement on admin/login pages.
File
- core/
connectors/ InstapageCmsPluginDrupal7Connector.php, line 612
Class
- InstapageCmsPluginDrupal7Connector
- Class that utilizes native Drupal 7 functions to perform actions like remote requests and DB operations.
Code
public function isAdmin() {
$requestUrl = $_SERVER['REQUEST_URI'];
if (strpos($requestUrl, '/admin') === 0 || $_GET['q'] == 'admin') {
return true;
}
return false;
}