Implements hook_enable().
Creates the 'private' field, which allows the node to be marked as private (restricted access) in a given translation.
function node_access_test_language_enable() {
$field_private = array(
'field_name' => 'field_private',
'type' => 'list_boolean',
'cardinality' => 1,
'translatable' => TRUE,
'settings' => array(
'allowed_values' => array(
0 => 'Not private',
1 => 'Private',
),
),
);
$field_private = field_create_field($field_private);
$instance = array(
'field_name' => $field_private['field_name'],
'entity_type' => 'node',
'bundle' => 'page',
'widget' => array(
'type' => 'options_buttons',
),
);
$instance = field_create_instance($instance);
}