-
Notifications
You must be signed in to change notification settings - Fork 9
/
site_audit.module
43 lines (36 loc) · 1018 Bytes
/
site_audit.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* @file
* Contains hooks and functions for the site_audit.module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function site_audit_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the site_audit module.
case 'help.page.site_audit':
$output = '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Site Audit is a Drupal site analysis platform that generates reports with actionable best practice recommendations.') . '</p>';
return $output;
default:
}
}
/**
* Determine if in a development environment.
*
* @return bool
* Whether the site is in a development environment.
*/
function site_audit_env_is_dev() {
// Acquia.
if (defined('AH_SITE_ENVIRONMENT')) {
return !in_array(PANTHEON_ENVIRONMENT, ['test', 'prod']);
}
// Pantheon.
if (defined('PANTHEON_ENVIRONMENT')) {
return !in_array(PANTHEON_ENVIRONMENT, ['test', 'live']);
}
return FALSE;
}