function theme_filter_tips
7.x filter.pages.inc | theme_filter_tips( |
6.x filter.pages.inc | theme_filter_tips($tips, $long = FALSE, $extra = '') |
Format a set of filter tips.
Related topics
3 theme calls to theme_filter_tips()
- filter_admin_format_form in drupal-6.x/
modules/ filter/ filter.admin.inc - Generate a filter format form.
- filter_form in drupal-6.x/
modules/ filter/ filter.module - Generates a selector for choosing a format in a form.
- filter_tips_long in drupal-6.x/
modules/ filter/ filter.pages.inc - Menu callback; show a page with long filter tips.
File
- drupal-6.x/
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;
}