You are here

function node_node_import_fields in Node import 5

Same name and namespace in other branches
  1. 6 supported/node.inc \node_node_import_fields()

Implementation of hook_node_import_fields().

File

supported/node.inc, line 20

Code

function node_node_import_fields($type) {
  $fields = array();
  if (user_access('administer nodes')) {
    $fields = array(
      'name' => t('Node: Authored by'),
      'date' => t('Node: Authored on'),
      'updated' => t('Node: Last updated on'),
      'status' => t('Node: Published'),
      'moderate' => t('Node: In moderation queue'),
      'promote' => t('Node: Promoted to front page'),
      'sticky' => t('Node: Sticky at top of lists'),
      'revision' => t('Node: Create new revision'),
    );
  }
  $type_info = node_get_types('type', $type);
  if ($type_info->has_title) {
    $fields['title'] = $type_info->title_label;
  }
  if ($type_info->has_body) {
    $fields['body'] = $type_info->body_label;
  }
  return $fields;
}