function _content_rules_get_field_value in Content Construction Kit (CCK) 6.3
Same name and namespace in other branches
- 6.2 includes/content.rules.inc \_content_rules_get_field_value()
2 calls to _content_rules_get_field_value()
- content_rules_action_populate_field in includes/
content.rules.inc - Action: populate a field.
- content_rules_field_has_value in includes/
content.rules.inc - Condition: Check the value of a field.
File
- includes/
content.rules.inc, line 303 - Provides basic rules module support.
Code
function _content_rules_get_field_value($settings, &$state) {
if ($settings['code']) {
if (function_exists('rules_input_evaluator_php_apply')) {
// Support adding variables to the php code, if php module is present.
$value = rules_input_evaluator_php_apply($settings['code'], $settings['vars'], $state, FALSE);
}
else {
ob_start();
$value = eval($settings['code']);
ob_end_clean();
}
}
else {
$value = $settings['value'];
}
return $value;
}