function insert_block_filter in Insert Block 5
Same name and namespace in other branches
- 6 insert_block.module \insert_block_filter()
File
- ./
insert_block.module, line 20
Code
function insert_block_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 block 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 the contents of a block into a node using [block:module=delta] tags.');
case 'prepare':
return $text;
case 'process':
return $text;
}
}