function node_gallery_api_gallery_load in Node Gallery 7
Object replacement function for hook_menu().
Parameters
int $nid: The nid of a node.
Return value
object A populated node object if the $nid passed in corresponds to a gallery, FALSE if not.
File
- ./node_gallery_api.module, line 243 
- Node Gallery module.
Code
function node_gallery_api_gallery_load($nid) {
  $types = node_gallery_api_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;
}