You are here

function theme_date_repeat_display in Date 7

Same name and namespace in other branches
  1. 8 date_repeat_field/date_repeat_field.module \theme_date_repeat_display()
  2. 5.2 date/date.theme \theme_date_repeat_display()
  3. 6.2 date/date.theme \theme_date_repeat_display()
  4. 6 date/date.theme \theme_date_repeat_display()
  5. 7.3 date_repeat_field/date_repeat_field.module \theme_date_repeat_display()
  6. 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 string reference to 'theme_date_repeat_display'
date_theme in ./date.module
Implements hook_theme().
1 theme call to theme_date_repeat_display()
theme_date_display_combination in ./date.theme
Theme from/to date combination in the view.

File

./date.theme, line 217
Theme functions.

Code

function theme_date_repeat_display($vars) {
  $field = $vars['field'];
  $item = $vars['item'];
  $entity = !empty($vars['node']) ? $vars['node'] : NULL;
  $output = '';
  if (!empty($item['rrule'])) {
    $output = date_repeat_rrule_description($item['rrule']);
    $output = '<div>' . $output . '</div>';
  }
  return $output;
}