public function InstapageCmsPluginLPAjaxLoaderController::shouldBeUsed in Instapage plugin 7.3
Same name and namespace in other branches
- 8.3 core/modules/lpAjaxLoader/InstapageCmsPluginLPAjaxLoaderController.php \InstapageCmsPluginLPAjaxLoaderController::shouldBeUsed()
Check if it is pantheon hosting platform and check if utm_ variables are replaced Also Check if it is WP Engine hosting and if it is not already request from Ajax Loader JS Also Check if client manually enabled LP Ajax Loader
Parameters
string $url URL of landing page that plugin tries to load:
Return value
bool
File
- core/
modules/ lpAjaxLoader/ InstapageCmsPluginLPAjaxLoaderController.php, line 22
Class
- InstapageCmsPluginLPAjaxLoaderController
- Class InstapageCmsPluginLPAjaxLoaderController
Code
public function shouldBeUsed($url) {
return isset($_ENV['PANTHEON_ENVIRONMENT']) && strpos($url, self::PANTHEON_STRIPPED) !== false || isset($_ENV['WPENGINE_ACCOUNT']) && strpos($url, self::AJAX_REQUEST_FLAG_NAME) === false || InstapageCmsPluginHelper::getMetadata('lpAjaxLoader', false) && strpos($url, self::AJAX_REQUEST_FLAG_NAME) === false;
}