function filetree_filter in File Tree 6
Same name and namespace in other branches
- 6.2 filetree.module \filetree_filter()
Implementation of hook_filter().
File
- ./
filetree.module, line 25
Code
function filetree_filter($op, $delta = 0, $format = -1, $text = '', $cache_id = 0) {
switch ($op) {
case 'list':
return array(
0 => t('File tree'),
);
case 'description':
return t('Replaces [filetree dir="some-directory"] with an inline list of files.');
case 'settings':
$form['filetree'] = array(
'#type' => 'fieldset',
'#title' => t('File tree'),
'#collapsible' => TRUE,
);
$form['filetree']['filetree_folders_' . $format] = array(
'#type' => 'textarea',
'#title' => t('Allowed folder paths'),
'#description' => t('Enter one folder per line as paths which are allowed to be rendered as a list of files (relative to your <a href="@url">file system path</a>). The "*" character is a wildcard. Example paths are "*", "some-folder", and "some-folder/*".', array(
'@url' => url('admin/settings/file-system'),
)),
'#default_value' => variable_get('filetree_folders_' . $format, '*'),
);
return $form;
case 'prepare':
return $text;
case 'process':
$text = _filetree_process($text, $format);
return $text;
}
}