You are here

function metatag_import_export_csv_start_batch_download in Metatag Import Export CSV 7

Batch Callback to processs Each node.

1 string reference to 'metatag_import_export_csv_start_batch_download'
metatag_import_export_csv_download_nid in ./metatag_import_export_csv_download_admin.inc
Gets the list of nid's according to content type.

File

./metatag_import_export_csv_download_admin.inc, line 128
Stores the code for export process.

Code

function metatag_import_export_csv_start_batch_download($nid, $type_name, $delimter, &$context) {
  $node = node_load($nid);
  $node_title = $node->title;
  $path = "node/" . $nid;
  $meta_fields = metatag_import_export_csv_download_fields_name($type);
  foreach ($meta_fields as $keys => $values) {
    $meta_resutls[$values] = isset($node->metatags[$node->language][$values]['value']) ? metatag_import_export_csv_token_change($node, $node->metatags[$node->language][$values]['value']) : metatag_import_export_csv_default_token($node, $type, $values);
  }
  array_unshift($meta_resutls, $node_title, $path, $node->type);
  $context['results']['row'][] = $meta_resutls;
  $context['results']['delimeter'] = $delimter;
  $context['results']['type'] = $type_name;
}