function datex_preprocess_node in Datex 7
Same name and namespace in other branches
- 7.3 datex.module \datex_preprocess_node()
- 7.2 datex.module \datex_preprocess_node()
Implements hook_preprocess_node().
File
- ./
datex.module, line 129 - Convert output of date_format() to Jalali in a patched drupal installation.
Code
function datex_preprocess_node(&$variables) {
if (_datex_skip_language() || _datex_integration_mode(DATEX_PATCHING_METHOD)) {
return;
}
$format = variable_get('datex_node_format', variable_get('date_format_medium'));
$variables['date'] = DatexFormatter::format(intval($variables['created']), $format, drupal_get_user_timezone(), _datex_intl());
if ($variables['display_submitted']) {
$variables['submitted'] = t('Submitted by !username on !datetime', array(
'!username' => $variables['name'],
'!datetime' => $variables['date'],
));
}
}