function theme_date_ical_icon in Date iCal 7.2
Same name and namespace in other branches
- 7.3 date_ical.module \theme_date_ical_icon()
- 7 date_ical.module \theme_date_ical_icon()
The theme for the ical icon. Available variables are: $variables['tooltip'] - The tooltip to be used for the ican feed icon. $variables['url'] - The url to the actual iCal feed. $variables['view'] - The view object from which the iCal feed is being built (useful for contextual information).
1 theme call to theme_date_ical_icon()
File
- ./
date_ical.module, line 50 - Adds ical functionality to Views, and an iCal parser to Feeds.
Code
function theme_date_ical_icon($variables) {
if (empty($variables['tooltip'])) {
$variables['tooltip'] = t('Add this event to my calendar');
}
$variables['path'] = drupal_get_path('module', 'date_ical') . '/images/ical-feed-icon-34x14.png';
$variables['alt'] = $variables['title'] = $variables['tooltip'];
if ($image = theme('image', $variables)) {
return "<a href='{$variables['url']}' class='ical-icon'>{$image}</a>";
}
else {
return "<a href='{$variables['url']}' class='ical-icon'>{$variables['tooltip']}</a>";
}
}