You are here

function theme_filter_tips in Drupal 6

Same name and namespace in other branches
  1. 4 modules/filter.module \theme_filter_tips()
  2. 5 modules/filter/filter.module \theme_filter_tips()
  3. 7 modules/filter/filter.pages.inc \theme_filter_tips()

Format a set of filter tips.

Related topics

3 theme calls to theme_filter_tips()
filter_admin_format_form in modules/filter/filter.admin.inc
Generate a filter format form.
filter_form in modules/filter/filter.module
Generates a selector for choosing a format in a form.
filter_tips_long in modules/filter/filter.pages.inc
Menu callback; show a page with long filter tips.

File

modules/filter/filter.pages.inc, line 29
User page callbacks for the filter module.

Code

function theme_filter_tips($tips, $long = FALSE, $extra = '') {
  $output = '';
  $multiple = count($tips) > 1;
  if ($multiple) {
    $output = t('input formats') . ':';
  }
  if (count($tips)) {
    if ($multiple) {
      $output .= '<ul>';
    }
    foreach ($tips as $name => $tiplist) {
      if ($multiple) {
        $output .= '<li>';
        $output .= '<strong>' . $name . '</strong>:<br />';
      }
      if (count($tiplist) > 0) {
        $output .= '<ul class="tips">';
        foreach ($tiplist as $tip) {
          $output .= '<li' . ($long ? ' id="filter-' . str_replace("/", "-", $tip['id']) . '">' : '>') . $tip['tip'] . '</li>';
        }
        $output .= '</ul>';
      }
      if ($multiple) {
        $output .= '</li>';
      }
    }
    if ($multiple) {
      $output .= '</ul>';
    }
  }
  return $output;
}