View source
<?php
function language_hierarchy_test_install() {
$field = array(
'field_name' => 'field_title',
'type' => 'text',
'entity_types' => array(
'node',
),
'translatable' => TRUE,
);
field_create_field($field);
$instance = array(
'field_name' => 'field_title',
'entity_type' => 'node',
'bundle' => 'page',
'label' => t('Title'),
'widget' => array(
'type' => 'text_textfield',
),
'settings' => array(
'display_summary' => TRUE,
),
'display' => array(
'default' => array(
'label' => 'hidden',
'type' => 'text_plain',
),
),
);
field_create_instance($instance);
$field = array(
'field_name' => 'field_not_title',
'type' => 'text',
'entity_types' => array(
'node',
),
'translatable' => TRUE,
);
field_create_field($field);
$instance = array(
'field_name' => 'field_not_title',
'entity_type' => 'node',
'bundle' => 'page',
'label' => t('Not Title'),
'widget' => array(
'type' => 'text_textfield',
),
'settings' => array(
'display_summary' => TRUE,
),
'display' => array(
'default' => array(
'label' => 'hidden',
'type' => 'text_plain',
),
),
);
field_create_instance($instance);
}