function _currency_api_filter_process in Currency 7
Same name and namespace in other branches
- 6 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 - Converts currency tokens.
File
- currency_api/
currency_api.module, line 431 - 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;
}