Recurring Event Link Filter
-
Would it be possible to add an additional filter to the recurring events link on the calendar?
I have modified it to the following for a project I’m working on:
function sc_show_recurring_events( $timestamp, $size, $category = null ) { $yearly = sc_get_recurring_events( $timestamp, 'yearly', $category ); $monthly = sc_get_recurring_events( $timestamp, 'monthly', $category ); $weekly = sc_get_recurring_events( $timestamp, 'weekly', $category ); $events = ''; $recurring = array_merge( $yearly, $monthly, $weekly ); if ( ! empty( $recurring ) ) { foreach ( $recurring as $event ) { $stop_day = sc_get_recurring_stop_date( $event ); if( $stop_day !== false && $stop_day > $timestamp ) { if ( $size == 'small' ) { $link = '<a href="'. get_permalink( $event ) .'" title="' . get_the_title( $event ) . '">•</a>'; $events .= apply_filters( 'sc_event_calendar_recurring_link', $link, $event, $size, $timestamp ); } else { $link = '<a href="'. get_permalink( $event ) .'">'. get_the_title( $event ) .'</a><br/>'; $events .= apply_filters( 'sc_event_calendar_recurring_link', $link, $event, $size, $timestamp ); } } } } return $events; }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Recurring Event Link Filter’ is closed to new replies.