function theme_date_ical_icon in Date iCal 7.3
Same name and namespace in other branches
- 7 date_ical.module \theme_date_ical_icon()
- 7.2 date_ical.module \theme_date_ical_icon()
Theme function for the ical icon used by attached iCal feed.
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()
- date_ical_plugin_style_ical_feed::attach_to in includes/
date_ical_plugin_style_ical_feed.inc - Sets up the iCal feed icon on calendar pages.
File
- ./
date_ical.module, line 90 - 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['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>";
}
}