function content_rules_field_has_value in Content Construction Kit (CCK) 6.3
Same name and namespace in other branches
- 6.2 includes/content.rules.inc \content_rules_field_has_value()
Condition: Check the value of a field.
File
- includes/
content.rules.inc, line 232 - Provides basic rules module support.
Code
function content_rules_field_has_value($node, $settings) {
// Get information about the field.
$field = content_fields($settings['field_name'], $node->type);
$value = _content_rules_get_field_value($settings, $state);
if (empty($field) || !is_array($value)) {
return FALSE;
}
return _content_rules_field_has_value($node->{$settings}['field_name'], $value);
}