rendered paste bodyfunction _create_content_type($properties) { $default = array( 'type' => '', 'name' => st(''), 'module' => 'node', 'description' => st(''), 'custom' => TRUE, 'modified' => TRUE, 'locked' => FALSE, ); $type = array_merge($default, $properties); $type = (object)_node_type_set_defaults($type); node_type_save($type);}function _create_content_field($type_name, $properties) { $default = array( 'label' => 'A field label', // <-- Set this on $properties 'field_widget_type' => '', // <-- Set this on $properties, see list above. 'op' => 'Create field', 'submit' => 'Create field', 'locked' => FALSE, 'field_name' => '', // <-- Set this on $properties, lowercase underscore pls ); $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);}