This issue is a follow-up to http://drupal.org/node/118863, Allow modules to expose default fields for node types. I'm opening a new issue because the approach and scope are very different.
At the data archictecture design spring in Chicago in February, to facilitate fields in core we mapped out a proposed new Field module implementing the ability for field instances to be defined at the code level.
This might work a lot like hook_node_info(), where we can define multiple content types, but some of their properties (e.g., the title field label) can be admin overridden. Possibly we would create then a hook_field_instance_info(). Sample implementation:
function example_field_instance_info() {
$fields = array();
$fields['body'] = array (
// Properties that are the same for all content types.
'widget_type' => 'text',
'field_type' => 'text',
'module' => 'text',
'required' => 0,
'multiple' => 0,
'text_processing' => 1,
'max_length' => NULL,
'instances' => array(
// Key is the content type the instance attaches to.
'story' => array(
// Properties specific to the content type.
'title' => t('Title'),
'description' => t(''),
'widget' => 'text_textfield',
'weight' => 0,
'rows' => 2,
),
),
);
return $fields;
}
The field module should replace a lot of what is currently in content_copy. Possibly some of the code could learn from the current content_copy implementations.