theme_status_messages

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

includes/theme.inc, строка 513

Версии
5 – 6
theme_status_messages($display = NULL)

Return a themed set of status and/or error messages. The messages are grouped by type.

Параметры

$display (optional) Set to 'status' or 'error' to display only messages of that type.

Возвращаемое значение

A string containing the messages.

Связанные темы

▾ 6 функции вызывают theme_status_messages()

chameleon_page in themes/chameleon/chameleon.theme
phptemplate_page in themes/engines/phptemplate/phptemplate.engine
Prepare the values passed to the theme_page function to be passed into a pluggable template engine. Uses the arg() function to generate a series of page template files suggestions based on the current path. If none are found, the default page.tpl.php...
theme_install_page in includes/theme.inc
theme_maintenance_page in includes/theme.inc
theme_page in includes/theme.inc
Return an entire Drupal page displaying the supplied content.
upload_js in modules/upload/upload.module
Коллбэк меню для JavaScript загрузок файлов.

Код

<?php
function theme_status_messages($display = NULL) {
  $output = '';
  foreach (drupal_get_messages($display) as $type => $messages) {
    $output .= "<div class=\"messages $type\">\n";
    if (count($messages) > 1) {
      $output .= " <ul>\n";
      foreach ($messages as $message) {
        $output .= '  <li>'. $message ."</li>\n";
      }
      $output .= " </ul>\n";
    }
    else {
      $output .= $messages[0];
    }
    $output .= "</div>\n";
  }
  return $output;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему