function calendar_systems_preprocess_node in Calendar Systems 8
Same name and namespace in other branches
- 7 calendar_systems.module \calendar_systems_preprocess_node()
- 7.2 calendar_systems.module \calendar_systems_preprocess_node()
The usage is to improve compatibility when the core patch is not available Implements hook_preprocess_node().
File
- ./
calendar_systems.module, line 250 - Contains Calendar Systems hook implementations and helpers.
Code
function calendar_systems_preprocess_node(&$variables) {
if (!_calendar_systems_is_patch_applied()) {
$calendar = calendar_systems_get_calendar_instance();
if ($calendar) {
$format = variable_get('date_format_medium');
$variables['date'] = $calendar
->smartGet($format, $variables['created']);
if ($variables['display_submitted']) {
$variables['submitted'] = t('Submitted by !username on !datetime', array(
'!username' => $variables['name'],
'!datetime' => $variables['date'],
));
}
}
}
}