You are here

function _ca_custom_php_eval in Ubercart 6.2

Evaluate a custom PHP condition or action with trigger arguments available as variables.

2 calls to _ca_custom_php_eval()
ca_action_custom_php in ca/ca.ca.inc
Perform a custom PHP action.
ca_condition_custom_php in ca/ca.ca.inc
Evaluate a custom PHP condition.

File

ca/ca.ca.inc, line 508
This file includes some generic conditions and actions.

Code

function _ca_custom_php_eval($php, $arguments) {
  $argument_data = array();

  // Convert the arguments to an array of data that we can extract.
  foreach ($arguments as $key => $value) {
    $argument_data[$key] = $value['#data'];
  }
  extract($argument_data);
  return eval($php);
}