| Versions | |
|---|---|
| 4.7 | _filter_tips($format, $long = false) |
| 5 – 6 | _filter_tips( |
| 7 | _filter_tips($format_id, $long = FALSE) |
Helper function for fetching filter tips.
modules/
<?php
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;
}
?>