You are here

function headerimage_eval_nid in Header image 5

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

Evaluate nid condition

Checks if current page is in list of nids

Parameters

$condition: comma separated list of nids

Return value

true: current page is in $condition false: if not null: current page is not a node

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

File

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

Code

function headerimage_eval_nid($condition) {
  if (arg(0) == 'node' && is_numeric(arg(1))) {
    $nids = explode(',', $condition);
    $match = in_array(arg(1), $nids);
  }
  return $match;
}