You are here

function site_audit_env_is_dev in Site Audit 7

Same name and namespace in other branches
  1. 8.3 site_audit.module \site_audit_env_is_dev()
  2. 8.2 site_audit.drush.inc \site_audit_env_is_dev()

Determine if in a development environment.

Return value

bool Whether site is in a development environment.

10 calls to site_audit_env_is_dev()
SiteAuditCheckBlockCache::calculateScore in Check/Block/Cache.php
Implements \SiteAudit\Check\Abstract\calculateScore().
SiteAuditCheckCacheAnon::calculateScore in Check/Cache/Anon.php
Implements \SiteAudit\Check\Abstract\calculateScore().
SiteAuditCheckCachePageExpire::calculateScore in Check/Cache/PageExpire.php
Implements \SiteAudit\Check\Abstract\calculateScore().
SiteAuditCheckCachePreprocessCss::calculateScore in Check/Cache/PreprocessCss.php
Implements \SiteAudit\Check\Abstract\calculateScore().
SiteAuditCheckCachePreprocessJs::calculateScore in Check/Cache/PreprocessJs.php
Implements \SiteAudit\Check\Abstract\calculateScore().

... See full list

File

./site_audit.drush.inc, line 506
Drupal site auditing commands.

Code

function site_audit_env_is_dev() {

  // Pantheon.
  if (drush_get_option('vendor') == 'pantheon') {
    return defined('PANTHEON_ENVIRONMENT') && !in_array(PANTHEON_ENVIRONMENT, array(
      'test',
      'live',
    ));
  }

  // Your host could be here! Submit an issue and/or a patch.
  return FALSE;
}