function headerimage_node_conditions in Header image 7
Get conditions for node operations.
2 calls to headerimage_node_conditions()
- headerimage_node_insert in ./
headerimage.module - Implementation of hook_node_insert().
- headerimage_node_update in ./
headerimage.module - Implementation of hook_node_update().
File
- ./
headerimage.module, line 685 - headerimage.module Conditionally display an node in a block.
Code
function headerimage_node_conditions($node) {
// Pack all conditions into one array
$conditions = variable_get('headerimage_condition_types', array(
'nid' => 'nid',
));
if (!empty($conditions)) {
foreach ($conditions as $condition) {
if ($condition != '0') {
$name = 'headerimage_condition_' . $condition;
$conditions[$condition] = $node->{$name};
}
}
}
return $conditions;
}