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