Last active
December 4, 2015 14:46
-
-
Save rang501/6db8b6f59b40a8a535d5 to your computer and use it in GitHub Desktop.
Revisions
-
rang501 revised this gist
Dec 4, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ <?php $query = new EntityFieldQuery(); $query->entityCondition('entity_type', 'node') -
rang501 renamed this gist
Dec 4, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
rang501 created this gist
Dec 4, 2015 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ $query = new EntityFieldQuery(); $query->entityCondition('entity_type', 'node') ->entityCondition('bundle', 'article'); $result = $query->execute(); if (isset($result['node'])) { $nodes = entity_load('node', array_keys($result['node'])); foreach ($nodes as $node) { $node->field_show_feedback[LANGUAGE_NONE][0]['value'] = 1; $node->field_show_updated_date[LANGUAGE_NONE][0]['value'] = 1; node_save($node); } }