function commons_core_content_default_fields_alter in Drupal Commons 6.2
Implementation of hook_content_default_fields_alter()
Alter the default cck fields right before they are cached into the database.
Parameters
&$fields: By reference. The fields that have been declared by another feature.
File
- modules/
features/ commons_core/ commons_core.module, line 320
Code
function commons_core_content_default_fields_alter(&$fields) {
// Dynamically set the group default image path to the
// current files directory
if (isset($fields['group-field_group_image'])) {
$fields['group-field_group_image']['widget']['default_image']['filepath'] = file_directory_path() . '/default-group.png';
$fields['group-field_group_image']['widget']['default_image']['destination'] = file_directory_path() . '/default-group.png';
}
}