function book_node_import_fields in Node import 6
Same name and namespace in other branches
- 5 supported/book.inc \book_node_import_fields()
Implementation of hook_node_import_fields().
File
- supported/
book.inc, line 11 - Support file for the core book module.
Code
function book_node_import_fields($type) {
$fields = array();
if (($node_type = node_import_type_is_node($type)) !== FALSE && book_type_is_allowed($node_type) && (user_access('administer book outlines') || user_access('add content to books'))) {
$fields['book:book'] = array(
'title' => t('Book'),
'group' => t('Book outline'),
'module' => 'book',
'input_format' => 'book_reference',
);
$fields['book:parent'] = array(
'title' => t('Parent item'),
'group' => t('Book outline'),
'module' => 'book',
'input_format' => 'book_page_reference',
);
$fields['book:weight'] = array(
'title' => t('Weight'),
'group' => t('Book outline'),
'module' => 'book',
'input_format' => 'weight',
'delta' => 15,
);
}
return $fields;
}