function prev_next_views_node_load in Previous/Next API 7.2
Same name and namespace in other branches
- 7 prev_next_views.module \prev_next_views_node_load()
Implements hook_node_load().
File
- ./
prev_next_views.module, line 69
Code
function prev_next_views_node_load($nodes, $types) {
if (isset($_SESSION['prev_next_views']) && is_array($_SESSION['prev_next_views'])) {
foreach ($nodes as $node) {
if (array_search($node->nid, $_SESSION['prev_next_views']) === FALSE) {
// The node being loaded is no longer part of the views results, so forget about it
unset($_SESSION['prev_next_views']);
break;
}
}
}
}