function theme_mobile_codes_formatter in Mobile Codes 6
1 string reference to 'theme_mobile_codes_formatter'
- mobile_codes_theme in ./
mobile_codes.module - Implementation of hook_theme().
File
- ./
mobile_codes.formatter.inc, line 26
Code
function theme_mobile_codes_formatter($element) {
preg_match('/^mobile_codes_(.*)_(.*)$/', $element['#formatter'], $matches);
$arguments = array(
'data' => 'text',
'preset' => $matches[1],
);
switch ($matches[2]) {
case 'path':
$output = mobile_codes_generate($element['#item']['safe'], $arguments);
break;
default:
$output = theme('mobilecode', $element['#item']['safe'], $arguments);
break;
}
return $output;
}