function insert_view_filter in Insert View 5
Same name and namespace in other branches
- 6.2 insert_view.module \insert_view_filter()
- 6 insert_view.module \insert_view_filter()
File
- ./
insert_view.module, line 3
Code
function insert_view_filter($op, $delta = 0, $format = -1, $text = '') {
// The "list" operation provides the module an opportunity to declare both how
// many filters it defines and a human-readable name for each filter. Note that
// the returned name should be passed through t() for translation.
if ($op == 'list') {
return array(
0 => t('insert view filter'),
);
}
// All operations besides "list" provide a $delta argument so we know which
// filter they refer to. We'll switch on that argument now so that we can
// discuss each filter in turn.
switch ($op) {
case 'description':
return t('Inserts content lists into nodes using [view:myview] tags.');
case 'prepare':
return $text;
case 'process':
return _insert_view_substitute_tags($text);
case 'no cache':
return TRUE;
}
}