t('Status message'), 'error' => t('Error message'), 'warning' => t('Warning message'), 'info' => t('Informative message'), ); // Map Drupal message types to their corresponding Bootstrap classes. // @see http://twitter.github.com/bootstrap/components.html#alerts $status_class = array( 'status' => 'success', 'error' => 'danger', 'warning' => 'warning', // Not supported, but in theory a module could send any type of message. // @see drupal_set_message() // @see theme_status_messages() 'info' => 'info', ); foreach (drupal_get_messages($display) as $type => $messages) { $class = (isset($status_class[$type])) ? ' alert-' . $status_class[$type] : ''; $output .= "