/**
* Helper function to create a content field (CCK field).
*
* @param $type_name
* The content type for which the content field should be created.
* @param $properties
* An array with field type properties, that override the default ones.
*/
function _create_content_field($type_name, $properties) {
$default = array(
'label' => 'A field label', // Override in $properties
'widget_type' => '', // Override in $properties
'op' => 'Create field',
'submit' => 'Create field',
'locked' => FALSE,
'field_name' => '', // Override in $properties, lowercase underscore
);
$new_field = array_merge($default, $properties);
$new_field['type_name'] = $type_name;
_content_admin_field_add_new_submit('_content_admin_field_add_new', $new_field);
}