function theme_filter_tips in Drupal 4
Same name and namespace in other branches
- 5 modules/filter/filter.module \theme_filter_tips()
- 6 modules/filter/filter.pages.inc \theme_filter_tips()
- 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.module - Generate a filter format form.
- filter_form in modules/
filter.module - Generate a selector for choosing a format in a form.
- filter_tips_long in modules/
filter.module - Menu callback; show a page with long filter tips.
File
- modules/
filter.module, line 911 - Framework for handling filtering of content.
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 />';
}
$tips = '';
foreach ($tiplist as $tip) {
$tips .= '<li' . ($long ? ' id="filter-' . str_replace("/", "-", $tip['id']) . '">' : '>') . $tip['tip'] . '</li>';
}
if ($tips) {
$output .= "<ul class=\"tips\">{$tips}</ul>";
}
if ($multiple) {
$output .= '</li>';
}
}
if ($multiple) {
$output .= '</ul>';
}
}
return $output;
}