function asset_filter in Asset 6
Same name and namespace in other branches
- 5.2 asset.module \asset_filter()
- 5 asset.module \asset_filter()
Implementation of hook_filter().
File
- inc/
asset.node.inc, line 223
Code
function asset_filter($op, $delta = 0, $format = -1, $text = '') {
switch ($op) {
case 'list':
return array(
0 => t('Inline file assets'),
);
case 'description':
return t('Add formatted file assets to your posts.');
case 'process':
foreach (asset_get_macros($text) as $unexpanded_macro => $macro) {
$expanded_macro = asset_render_macro($macro);
$text = str_replace($unexpanded_macro, $expanded_macro, $text);
}
return $text;
default:
return $text;
}
}