You are here

function calendar_ical_add_ical in Calendar 5

Same name and namespace in other branches
  1. 5.2 calendar_ical.module \calendar_ical_add_ical()
1 call to calendar_ical_add_ical()
calendar_ical_views_feed_argument in ./calendar_ical.module
feed argument hook that will convert us to ical or display an icon. the 4th argument isn't part of the hook, but we use it to differentiate when called as a hook or when called manually from calendar_ical_views_post_view

File

./calendar_ical.module, line 393
Adds ical functionality to Calendar.

Code

function calendar_ical_add_ical($url = NULL, $title = '') {
  if (!is_null($url)) {
    $stored_feed_links[$url] = theme('ical_icon', $url);
    drupal_add_link(array(
      'rel' => 'alternate',
      'type' => 'application/calendar',
      'title' => $title,
      'href' => $url,
    ));
  }
  return $stored_feed_links;
}