You are here

function better_messages_add_files in Better Messages 6.2

Same name and namespace in other branches
  1. 6 better_messages.module \better_messages_add_files()
  2. 7 better_messages.module \better_messages_add_files()
1 call to better_messages_add_files()
theme_better_messages in ./better_messages.module

File

./better_messages.module, line 184

Code

function better_messages_add_files($disable_autoclose) {
  $settings = better_messages_get_settings();
  drupal_add_css($settings['extra']['skin']);
  drupal_add_js(drupal_get_path('module', 'better_messages') . '/better_messages.js');

  // Remove extra info from JS
  unset($settings['extra']);
  if ($disable_autoclose) {
    $settings['autoclose'] = 0;
  }
  drupal_add_js(array(
    'betterMessages' => $settings,
  ), 'setting');
}