Skip to content

Instantly share code, notes, and snippets.

diff --recursive -u the-events-calendar-orig/lib/the-events-calendar.class.php the-events-calendar/lib/the-events-calendar.class.php
--- the-events-calendar-orig/lib/the-events-calendar.class.php 2012-12-11 00:35:12.000000000 +0100
+++ the-events-calendar/lib/the-events-calendar.class.php 2012-12-26 16:53:00.000000000 +0100
@@ -1461,6 +1461,7 @@
$newRules[$base . $upcoming] = 'index.php?post_type=' . self::POSTTYPE . '&eventDisplay=upcoming';
$newRules[$base . $past . '/page/(\d+)'] = 'index.php?post_type=' . self::POSTTYPE . '&eventDisplay=past&paged=' . $wp_rewrite->preg_index(1);
$newRules[$base . $past] = 'index.php?post_type=' . self::POSTTYPE . '&eventDisplay=past';
+ $newRules[$base . '(\d{4})$'] = 'index.php?post_type=' . self::POSTTYPE . '&eventDisplay=year' .'&eventDate=' . $wp_rewrite->preg_index(1);
$newRules[$base . '(\d{4}-\d{2})$'] = 'index.php?post_type=' . self::POSTTYPE . '&eventDisplay=month' .'&eventDate=' . $wp_rewrite->preg_index(1);
$newRules[$base . '(\d{4}-\d{2}