function template_preprocess_calendar_month_multiple_entity in Calendar 7.3
Same name and namespace in other branches
- 8 calendar.theme.inc \template_preprocess_calendar_month_multiple_entity()
Format an calendar month node for display.
File
- theme/
theme.inc, line 579 - Theme functions for the Calendar module.
Code
function template_preprocess_calendar_month_multiple_entity(&$vars) {
$view = $vars['view'];
$curday = $vars['curday'];
$count = $vars['count'];
$ids = $vars['ids'];
// Get the year month and date.
$parts = explode('-', substr($curday, 0, 10));
$year = $parts[0];
$month = intval($parts[1]);
$day = intval($parts[2]);
// Create the link to the day.
$month_path = calendar_granularity_path($view, 'month');
$day_path = calendar_granularity_path($view, 'day');
$vars['link'] = str_replace($month_path, $day_path, date_pager_url($view, NULL, date_pad($year, 4) . '-' . date_pad($month) . '-' . date_pad($day)));
}