function img_assist_filter in Image Assist 5
Same name and namespace in other branches
- 5.3 img_assist.module \img_assist_filter()
- 5.2 img_assist.module \img_assist_filter()
- 6.2 img_assist.module \img_assist_filter()
- 6 img_assist.module \img_assist_filter()
Implementation of hook_filter().
File
- ./
img_assist.module, line 381 - Image Assist module
Code
function img_assist_filter($op, $delta = 0, $format = -1, $text = '') {
switch ($op) {
case 'list':
return array(
0 => t('Inline images'),
);
case 'description':
return t('Add images to your posts with Image assist.');
case 'process':
$processed = FALSE;
foreach (img_assist_get_macros($text) as $unexpanded_macro => $macro) {
$expanded_macro = img_assist_render_image($macro);
$text = str_replace($unexpanded_macro, $expanded_macro, $text);
$processed = TRUE;
}
return $processed ? theme('img_assist_filter', $text) : $text;
default:
return $text;
}
}