You are here

function _coder_review_drupal_attributes in Coder 7.2

Replaces default drupal drupal_attributes() for not bootstrapped usage.

1 call to _coder_review_drupal_attributes()
theme_drush_coder_review_warning in coder_review/coder_review.drush.inc
Returns warning message, including source snippet, in format for drush use.

File

coder_review/coder_review.drush.inc, line 723
Command line utility support for Coder_review module.

Code

function _coder_review_drupal_attributes(array $attributes = array()) {
  if (function_exists('drupal_attributes')) {
    return drupal_attributes($attributes);
  }
  foreach ($attributes as $attribute => &$data) {
    $data = implode(' ', (array) $data);
    $data = $attribute . '="' . htmlspecialchars($data, ENT_QUOTES, 'UTF-8') . '"';
  }
  return $attributes ? ' ' . implode(' ', $attributes) : '';
}