You are here

function headerimage_eval_nodetype in Header image 6

Same name and namespace in other branches
  1. 5 headerimage.module \headerimage_eval_nodetype()
  2. 7 headerimage.module \headerimage_eval_nodetype()

Evaluate node type condition

Return true if type of current node is selected

Parameters

$condition: array of selected node types

Return value

true: current node type is selected false: if not null: current page is not a node

1 call to headerimage_eval_nodetype()
headerimage_select_node in ./headerimage.module
Select a node to be displayed in the block

File

./headerimage.module, line 332
headerimage.module Conditionally display an node in a block.

Code

function headerimage_eval_nodetype($condition) {
  $match = FALSE;
  if (arg(0) == 'node' && is_numeric(arg(1))) {
    $node = menu_get_object();
    $match = in_array($node->type, $condition);
  }
  return $match;
}