function theme_date_repeat_display in Date 6
Same name and namespace in other branches
- 8 date_repeat_field/date_repeat_field.module \theme_date_repeat_display()
- 5.2 date/date.theme \theme_date_repeat_display()
- 6.2 date/date.theme \theme_date_repeat_display()
- 7.3 date_repeat_field/date_repeat_field.module \theme_date_repeat_display()
- 7 date.theme \theme_date_repeat_display()
- 7.2 date_repeat_field/date_repeat_field.module \theme_date_repeat_display()
Theme the human-readable description for a Date Repeat rule.
TODO - add in ways to store the description in the date so it isn't regenerated over and over and find a way to allow description to be shown or hidden.
1 theme call to theme_date_repeat_display()
- theme_date_display_combination in date/
date.theme - Theme from/to date combination in the view.
File
- date/
date.theme, line 112 - Theme functions.
Code
function theme_date_repeat_display($field, $item, $node = NULL, $dates) {
// If $field['field_name'] isn't set, this isn't a node, and is
// probably on a calendar view. The description is too expensive an
// operation to run on every field in a view, so don't do it.
if (isset($node->{$field}['field_name'])) {
$output = date_repeat_rrule_description($item['rrule'], $dates['value']['local']['object']);
$output = '<div>' . $output . '</div>';
}
return $output;
}