function accessibility_accessibility_guidelines

cis7 accessibility.module accessibility_accessibility_guidelines($tests = FALSE)
cle7 accessibility.module accessibility_accessibility_guidelines($tests = FALSE)
elmsmedia7 accessibility.module accessibility_accessibility_guidelines($tests = FALSE)
icor7 accessibility.module accessibility_accessibility_guidelines($tests = FALSE)
meedjum_blog7 accessibility.module accessibility_accessibility_guidelines($tests = FALSE)
mooc7 accessibility.module accessibility_accessibility_guidelines($tests = FALSE)

Implements hook_accessibility_guidelines().

File

sites/all/modules/ulmus/accessibility/accessibility.module, line 714

Code

function accessibility_accessibility_guidelines($tests = FALSE) {
  $guidelines = array(
    '508' => array('title' => 'Section 508'),
    'wcag1a' => array('title' => 'WCAG 1.0 A'),
    'wcag1aa' => array('title' => 'WCAG 1.0 AA'),
    'wcag1aaa' => array('title' => 'WCAG 1.0 AAA'),
    'wcag2a' => array('title' => 'WCAG 2.0 A'),
    'wcag2aa' => array('title' => 'WCAG 2.0 AA'),
    'wcag2aaa' => array('title' => 'WCAG 2.0 AAA'),
  );
  if (!$tests) {
    return $guidelines;
  }
  if ($cache = cache_get('accessibility_guidelines')) {
    return $cache->data;
  }
  $library_path = libraries_get_path('quail');
  foreach ($guidelines as $key => &$guideline) {
    $guideline['tests'] = json_decode(file_get_contents($library_path . '/src/resources/guidelines/' . $key . '.json'));
  }
  cache_set('accessibility_guidelines', $guidelines);
  return $guidelines;
}