function media_gallery_node_load in Media Gallery 7.2
Same name and namespace in other branches
- 7 media_gallery.module \media_gallery_node_load()
Implements hook_node_load().
File
- ./
media_gallery.module, line 247
Code
function media_gallery_node_load($nodes, $types) {
// Store a copy of the media_gallery_file field before mucking with it in
// media_gallery_view(). We use hook_node_load() instead of hook_load(),
// because the latter runs before fields are loaded.
if (in_array('media_gallery', $types)) {
foreach ($nodes as $node) {
if ($node->type == 'media_gallery') {
$node->media_gallery_file_original = $node->media_gallery_file;
}
}
}
}