You are here

function _currency_api_filter_process in Currency 6

Same name and namespace in other branches
  1. 7 currency_api/currency_api.module \_currency_api_filter_process()

Processes values for the currency api filter.

1 string reference to '_currency_api_filter_process'
currency_api_filter in currency_api/currency_api.module
Implementation of hook_filter().

File

currency_api/currency_api.module, line 440
This module provides an API for currency conversion.

Code

function _currency_api_filter_process($matches) {
  $return = $matches[1];
  $convert = explode(':', $matches[1]);
  $result = currency_api_convert($convert[0], $convert[1], $convert[2], $convert[3]);
  if ($result['status']) {
    $return = $result['value'];
  }
  return $return;
}