You are here

function emfield_reload in Embedded Media Field 6.3

Same name in this branch
  1. 6.3 emfield.admin.inc \emfield_reload()
  2. 6.3 deprecated/emfield-deprecated.admin.inc \emfield_reload()
Same name and namespace in other branches
  1. 6 emfield.admin.inc \emfield_reload()
  2. 6.2 emfield.admin.inc \emfield_reload()

This reloads and saves the data for a single node.

2 string references to 'emfield_reload'
emfield_settings_jobqueue_submit in ./emfield.admin.inc
For each selected content type, add all of its nodes to the job queue for reloading.
emfield_settings_jobqueue_submit in deprecated/emfield-deprecated.admin.inc
For each selected content type, add all of its nodes to the job queue for reloading.

File

deprecated/emfield-deprecated.admin.inc, line 245
The administrative settings page.

Code

function emfield_reload($nid) {
  if ($node = node_load($nid)) {
    $type = content_types($node->type);
    foreach ($type['fields'] as $field) {
      if (module_hook($field['type'], 'emfield_info')) {
        $items = $node->{$field['field_name']};
        emfield_emfield_field('submit', $node, $field, $items, FALSE, FALSE, $field['type']);
        $node->{$field['field_name']} = $items;
        node_save($node);
      }
    }
  }
}