function node_gallery_gallery_load in Node Gallery 6.3
Same name and namespace in other branches
- 6 node_gallery.module \node_gallery_gallery_load()
- 6.2 node_gallery.module \node_gallery_gallery_load()
Object replacement function for hook_menu().
Parameters
$nid: The nid of a node.
Return value
A populated node object if the $nid passed in corresponds to a gallery, FALSE if not.
1 call to node_gallery_gallery_load()
File
- ./
node_gallery.module, line 1016 - Node gallery module file.
Code
function node_gallery_gallery_load($nid) {
$types = node_gallery_get_types('gallery');
if (is_numeric($nid)) {
$node = node_load($nid);
// is the current node used in any ng relationships?
if (in_array($node->type, $types)) {
return $node;
}
else {
// this is not a ng node
return FALSE;
}
}
return FALSE;
}