function variable_file_variable_info in Variable Extra 7
Implements hook_variable_info().
File
- variable_file/
variable_file.variable.inc, line 10 - Variable module hook implementations
Code
function variable_file_variable_info($options) {
$variables = array();
if (module_exists('variable_example')) {
// File and image upload.
$variables['variable_example_upload_file'] = array(
'type' => 'file_upload',
'title' => t('Example file upload', array(), $options),
'description' => t('Upload my config file.', array(), $options),
'upload_location' => 'public://myuploaddir',
'group' => 'variable_example',
);
$variables['variable_example_upload_image'] = array(
'type' => 'image_upload',
'title' => t('Example image upload', array(), $options),
'description' => t('Upload my config file.', array(), $options),
'upload_location' => 'public://myuploaddir',
'group' => 'variable_example',
);
$variables['variable_example_managed_file'] = array(
'type' => 'file_managed',
'title' => t('Example file managed', array(), $options),
'description' => t('Upload my config file.', array(), $options),
'upload_location' => 'public://myuploaddir',
'group' => 'variable_example',
);
$variables['variable_example_managed_image'] = array(
'type' => 'image_managed',
'title' => t('Example image managed', array(), $options),
'description' => t('Upload my config file.', array(), $options),
'upload_location' => 'public://myuploaddir',
'group' => 'variable_example',
);
}
return $variables;
}