diff --git a/templates/event-calendar.php b/templates/event-calendar.php index 2a764652..f07b7c22 100644 --- a/templates/event-calendar.php +++ b/templates/event-calendar.php @@ -222,13 +222,19 @@ for ( $day = 1; $day <= $daysinmonth; ++$day ) { $calendar_output .= "\n\t\n\t\n\t\t"; $newrow = false; - if ( $day == gmdate('j', current_time('timestamp')) && $thismonth == gmdate('m', current_time('timestamp')) && $thisyear == gmdate('Y', current_time('timestamp')) ) - $calendar_output .= ''; - else - $calendar_output .= ''; + $day_has_posts = array_key_exists($day, $daywithpost); + $td_properties = ''; - if ( array_key_exists($day, $daywithpost) ) // any posts today? - $calendar_output .= '$day"; + if ( $day == gmdate('j', current_time('timestamp')) && $thismonth == gmdate('m', current_time('timestamp')) && $thisyear == gmdate('Y', current_time('timestamp')) ) + $td_properties .= ' id="today" class="sp-highlight"'; + + if ( $day_has_posts ) + $td_properties .= ' itemscope itemtype="http://schema.org/SportsEvent"'; + + $calendar_output .= ''; + + if ( $day_has_posts ) // any posts today? + $calendar_output .= '$day"; else $calendar_output .= $day; $calendar_output .= '';