You are here

function headerimage_eval_nodetype in Header image 7

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

Evaluate content type condition

Return true if type of current node is selected

Parameters

$condition: array of selected content types

Return value

true: current content 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 431
headerimage.module Conditionally display an node in a block.

Code

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