function headerimage_eval_nid in Header image 7
Same name and namespace in other branches
- 5 headerimage.module \headerimage_eval_nid()
- 6 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 325 - headerimage.module Conditionally display an node in a block.
Code
function headerimage_eval_nid($condition) {
$match = NULL;
if (arg(0) == 'node' && is_numeric(arg(1))) {
$nids = explode(',', $condition);
$match = in_array(arg(1), $nids);
}
return $match;
}