function accessibility_content_init

cis7 accessibility_content.inc accessibility_content_init($options = array())
cle7 accessibility_content.inc accessibility_content_init($options = array())
elmsmedia7 accessibility_content.inc accessibility_content_init($options = array())
icor7 accessibility_content.inc accessibility_content_init($options = array())
meedjum_blog7 accessibility_content.inc accessibility_content_init($options = array())
mooc7 accessibility_content.inc accessibility_content_init($options = array())
2 calls to accessibility_content_init()
accessibility_content_field_attach_view_alter in sites/all/modules/ulmus/accessibility/modules/accessibility_content/accessibility_content.module
Implements hook_field_attach_view_alter().
accessibility_content_field_widget_form_alter in sites/all/modules/ulmus/accessibility/modules/accessibility_content/accessibility_content.module
Implements field_widget_form_alter().

File

sites/all/modules/ulmus/accessibility/modules/accessibility_content/accessibility_content.inc, line 16

Code

function accessibility_content_init($options = array()) {
  static $init;
  if ($init) {
    return;
  }
  $init = TRUE;
  if (!user_access('check content for accessibility')) {
    return;
  }

  $settings = array();
  $settings['show_default'] = variable_get('accessibility_content_auto_check', FALSE);
  $settings['show_toggle'] = variable_get('accessibility_content_show_toggle', TRUE);
  $settings['toggle']['off_message'] = variable_get('accessibility_content_toggle_message_off', t('Check page for accessibility'));
  $settings['toggle']['on_message'] = variable_get('accessibility_content_toggle_message_on', t('Hide checks for accessibility'));
  $settings['options'] = $options;

  accessibility_load();
  drupal_add_js(array('accessibility_content' => $settings), 'setting');
  drupal_add_js(drupal_get_path('module', 'accessibility_content') . '/js/accessibility_content.js');
  drupal_add_css(drupal_get_path('module', 'accessibility_content') . '/css/accessibility_content.css');
}