You are here

function node_gallery_set_as_cover_action in Node Gallery 6.3

Sets an image to be the cover image.

Parameters

object $node: A populated node object.

$context: (optional) An associative array supplied by the Actions API.

File

./node_gallery.actions.inc, line 51
Contains all actions for node gallery.

Code

function node_gallery_set_as_cover_action(&$node, $context = array()) {
  if (in_array($node->type, (array) node_gallery_get_types('image'))) {
    $node->is_cover = TRUE;
  }
}