Exemplo n.º 1
0
function mc_rss_links($y, $m, $next)
{
    global $wp_rewrite;
    $feed = mc_feed_base() . 'my-calendar-rss';
    $end = "&nyr={$next['yr']}&nmonth={$next['month']}";
    $ics_extend = $wp_rewrite->using_permalinks() ? "my-calendar-ics/?yr={$y}&month={$m}" . $end : "my-calendar-ics&yr={$y}&month={$m}" . $end;
    $ics = mc_feed_base() . $ics_extend;
    $rss = "\n\t<li class='rss'><a href='" . $feed . "'>" . __('Subscribe by <abbr title="Really Simple Syndication">RSS</abbr>', 'my-calendar') . "</a></li>";
    $ical = "\n\t<li class='ics'><a href='" . $ics . "'>" . __('Download as <abbr title="iCal Events Export">iCal</abbr>', 'my-calendar') . "</a></li>";
    $output = "\n\n<div class='mc-export'>\n\t<ul>{$rss}{$ical}</ul>\n</div>\n";
    return $output;
}
Exemplo n.º 2
0
function mc_rss_links($y, $m, $next, $add, $subtract)
{
    global $wp_rewrite;
    $add['yr'] = $y;
    $add['month'] = $m;
    $add['nyr'] = $next['yr'];
    $add['nmonth'] = $next['month'];
    $feed = mc_feed_base() . 'my-calendar-rss';
    $ics = mc_build_url($add, $subtract, mc_feed_base() . 'my-calendar-ics');
    $rss = "\n\t<li class='rss'><a href='" . $feed . "'>" . __('<span class="maybe-hide">Subscribe by </span><abbr title="Really Simple Syndication">RSS</abbr>', 'my-calendar') . "</a></li>";
    $ical = "\n\t<li class='ics'><a href='" . $ics . "'>" . __('<span class="maybe-hide">Download as </span><abbr title="iCal Events Export">iCal</abbr>', 'my-calendar') . "</a></li>";
    $output = "\n\n<div class='mc-export'>\n\t<ul>{$rss}{$ical}</ul>\n</div>\n";
    return $output;
}