function image_filefield_paths_form_alter in File (Field) Paths 6
Implements hook_filefield_paths_form_alter().
File
- modules/
image.inc, line 10 - Provides FileField Paths integration with the Image module.
Code
function image_filefield_paths_form_alter(&$form, &$ffp) {
if (isset($form['#id']) && $form['#id'] == 'image-admin-settings') {
$ffp['image'] = array(
'type' => 'image',
'form_path' => &$form['files']['ffp_image'],
'file_path_default' => $form['files']['image_default_path']['#default_value'],
);
// Create path settings fieldset
$ffp['image']['form_path'] = array(
'#type' => 'fieldset',
'#title' => t('Image Path settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#weight' => 0,
);
$ffp['image']['form_path']['file_path'] = $form['files']['image_default_path'];
$ffp['image']['form_path']['file_path']['#title'] = t('File path');
$form['files']['image_default_path']['#access'] = FALSE;
}
}