function _message_rules_get_php_value in Message 6
1 call to _message_rules_get_php_value()
- message_action_create_message_instance in includes/
message.rules.inc - Action: Create a message instance.
File
- includes/
message.rules.inc, line 192 - Rules integration for the Message module.
Code
function _message_rules_get_php_value($settings, &$state) {
$value = '';
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();
}
}
return $value;
}