function headerimage_eval_taxonomy in Header image 5
Same name and namespace in other branches
- 6 headerimage.module \headerimage_eval_taxonomy()
- 7 headerimage.module \headerimage_eval_taxonomy()
Evaluate taxonomy condition
Check if current page has selected taxonomy terms
Parameters
$condition: array of taxonomy term tid's
Return value
true: current page contains one of $condition's tags false: if not null: current page is not a node
1 call to headerimage_eval_taxonomy()
- headerimage_select_node in ./
headerimage.module - Select a node to be displayed in the block
File
- ./
headerimage.module, line 422 - headerimage.module Conditionally display an node in a block.
Code
function headerimage_eval_taxonomy($condition) {
if (arg(0) == 'node' && is_numeric(arg(1))) {
$node = node_load(arg(1));
foreach (array_keys($node->taxonomy) as $key) {
if (isset($condition[$key])) {
return true;
}
}
return false;
}
return null;
}