function _filter_tips in Drupal 5
Same name and namespace in other branches
- 8 core/modules/filter/filter.module \_filter_tips()
- 4 modules/filter.module \_filter_tips()
- 6 modules/filter/filter.module \_filter_tips()
- 7 modules/filter/filter.module \_filter_tips()
- 9 core/modules/filter/filter.module \_filter_tips()
Helper function for fetching filter tips.
3 calls to _filter_tips()
- filter_admin_format_form in modules/
filter/ filter.module - Generate a filter format form.
- filter_form in modules/
filter/ filter.module - Generate a selector for choosing a format in a form.
- filter_tips_long in modules/
filter/ filter.module - Menu callback; show a page with long filter tips.
File
- modules/
filter/ filter.module, line 902 - Framework for handling filtering of content.
Code
function _filter_tips($format, $long = FALSE) {
if ($format == -1) {
$formats = filter_formats();
}
else {
$formats = array(
db_fetch_object(db_query("SELECT * FROM {filter_formats} WHERE format = %d", $format)),
);
}
$tips = array();
foreach ($formats as $format) {
$filters = filter_list_format($format->format);
$tips[$format->name] = array();
foreach ($filters as $id => $filter) {
if ($tip = module_invoke($filter->module, 'filter_tips', $filter->delta, $format->format, $long)) {
$tips[$format->name][] = array(
'tip' => $tip,
'id' => $id,
);
}
}
}
return $tips;
}