Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
$nodes = node_load_multiple(NULL, array("type" => "webform"));
foreach ($nodes as $node) {
$save_node = new stdClass();
$save_node->nid = $node->nid;
$save_node->vid = $node->vid;
$save_node->type = $node->type;
$save_node->field_slsa_category = $node->field_slsa_category_1;
entity_get_controller("node")->resetCache(array($node->nid));
field_attach_presave("node", $save_node);
field_attach_update("node", $save_node);
}
if ($field_instance = field_info_instance("node", "field_slsa_category_1", "webform")) {
field_delete_instance($field_instance);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.