Outputting different class other than default for status messages
This is just some good old PHP logic, is this what you're after?

function theme_status_messages($variables) {
  $display = $variables['display'];
  $output = '';

  $status_heading = array(
    'status' =&gt; t('Status message'),
    'error' =&gt; t('Error message'),
    'warning' =&gt; t('Warning message'),
  );

  // Map our drupal statuses to bootstrap classes
  $bootstrap_statuses = array(
    'status' =&gt; 'alert-success',
    'error' =&gt; 'alert-error',
    'warning' =&gt; 'alert-warning',
  );

  foreach (drupal_get_messages($display) as $type =&gt; $messages) {
    // Grab the bootstrap class that corresponds to $type
    $bootstrap_class = $bootstrap_statuses[$type];
    $output .= "&lt;div class=\"alert $bootstrap_class\"&gt;\n";
    if (!empty($status_heading[$type])) {
      $output .= '&lt;h2 class="element-invisible"&gt;' . $status_heading[$type] . "&lt;/h2&gt;\n";
    }
    if (count($messages) &gt; 1) {
      $output .= " &lt;ul&gt;\n";
      foreach ($messages as $message) {
        $output .= '  &lt;li&gt;' . $message . "&lt;/li&gt;\n";
      }
      $output .= " &lt;/ul&gt;\n";
    }
    else {
      $output .= $messages[0];
    }
    $output .= "&lt;/div&gt;\n";
  }
  return $output;
}


You could even put the $bootstrap_classes and $status_heading arrays together. But I separated them for simplicity