function autofloat_filter in AutoFloat 6
Same name and namespace in other branches
- 6.2 autofloat.module \autofloat_filter()
Implements hook_filter_info().
File
- ./
autofloat.module, line 46 - Autofloat module: A filter that floats images left and right automatically.
Code
function autofloat_filter($op, $delta = 0, $format = -1, $text = '') {
if ($op == 'list') {
return array(
0 => t('AutoFloat'),
);
}
switch ($delta) {
case 0:
switch ($op) {
case 'description':
return t('Images will float left and right unless escaped with a class "nofloat".');
case 'prepare':
return $text;
case 'process':
return _autofloat($text, $format);
case 'settings':
$form['autofloat']['notice'] = array(
'#value' => t('<p>These settings are shared by all the input formats where <em>Autofloat</em> is enabled:</p>'),
);
return $form;
}
break;
}
}