My Calendar - Version 3.2.10

Version Description

  • Change: Fallback text should have a stylable wrapper.
  • Bug fix: Missing translatable string.
  • Bug fix: When multiple categories selected, events in more than one category would appear multiple times.
  • Bug fix: Missing space in MySQL filters in event manager.
  • Bug fix: PHP Notice thrown in location manager.
  • Bug fix: Add note to open events link field if no URI configured.
  • Layout fix: Ensure there's always a space between date & time.
Download this release

Release Info

Developer joedolson
Plugin Icon 128x128 My Calendar
Version 3.2.10
Comparing to
See all releases

Code changes from version 3.2.9 to 3.2.10

js/mcjs.js CHANGED
@@ -3,7 +3,6 @@
3
  $(function () {
4
  $( '.mc-main' ).removeClass( 'mcjs' );
5
  });
6
-
7
- $('.mc-main a[target=_blank]').append( ' <span class="dashicons dashicons-external" aria-hidden="true"></span><span class="screen-reader-text"> ' + my_calendar.newWindow + '</span>' );
8
 
 
9
  }(jQuery));
3
  $(function () {
4
  $( '.mc-main' ).removeClass( 'mcjs' );
5
  });
 
 
6
 
7
+ $('.mc-main a[target=_blank]').append( ' <span class="dashicons dashicons-external" aria-hidden="true"></span><span class="screen-reader-text"> ' + my_calendar.newWindow + '</span>' );
8
  }(jQuery));
my-calendar-core.php CHANGED
@@ -1552,6 +1552,7 @@ add_filter( 'post_updated_messages', 'mc_posttypes_messages' );
1552
  add_filter( 'tmp_grunion_allow_editor_view', '__return_false' );
1553
  add_filter( 'next_post_link', 'mc_next_post_link', 10, 2 );
1554
  add_filter( 'previous_post_link', 'mc_previous_post_link', 10, 2 );
 
1555
 
1556
  // Actions.
1557
  add_action( 'init', 'mc_taxonomies', 0 );
@@ -1582,9 +1583,9 @@ function mc_previous_post_link( $output, $format ) {
1582
  if ( is_singular( 'mc-events' ) && isset( $_GET['mc_id'] ) ) {
1583
  $mc_id = (int) $_GET['mc_id'];
1584
  $event = mc_adjacent_event( $mc_id, 'previous' );
1585
- remove_filter( 'the_title', 'mc_category_icon_title', 10, 2 );
1586
  $title = apply_filters( 'the_title', $event['title'], $event['post'] );
1587
- add_filter( 'the_title', 'mc_category_icon_title', 10, 2 );
1588
  $link = add_query_arg( 'mc_id', $event['dateid'], $event['details_link'] );
1589
  $date = ' <span class="mc-event-date">' . $event['date'] . '</span>';
1590
 
@@ -1606,9 +1607,9 @@ function mc_next_post_link( $output, $format ) {
1606
  if ( is_singular( 'mc-events' ) && isset( $_GET['mc_id'] ) ) {
1607
  $mc_id = (int) $_GET['mc_id'];
1608
  $event = mc_adjacent_event( $mc_id, 'next' );
1609
- remove_filter( 'the_title', 'mc_category_icon_title', 10, 2 );
1610
  $title = apply_filters( 'the_title', $event['title'], $event['post'] );
1611
- add_filter( 'the_title', 'mc_category_icon_title', 10, 2 );
1612
  $link = add_query_arg( 'mc_id', $event['dateid'], $event['details_link'] );
1613
  $date = ' <span class="mc-event-date">' . $event['date'] . '</span>';
1614
 
@@ -1618,6 +1619,40 @@ function mc_next_post_link( $output, $format ) {
1618
  return $output;
1619
  }
1620
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1621
 
1622
  /**
1623
  * Custom field callback for permalinks settings
1552
  add_filter( 'tmp_grunion_allow_editor_view', '__return_false' );
1553
  add_filter( 'next_post_link', 'mc_next_post_link', 10, 2 );
1554
  add_filter( 'previous_post_link', 'mc_previous_post_link', 10, 2 );
1555
+ add_filter( 'the_title', 'mc_the_title', 10, 2 );
1556
 
1557
  // Actions.
1558
  add_action( 'init', 'mc_taxonomies', 0 );
1583
  if ( is_singular( 'mc-events' ) && isset( $_GET['mc_id'] ) ) {
1584
  $mc_id = (int) $_GET['mc_id'];
1585
  $event = mc_adjacent_event( $mc_id, 'previous' );
1586
+ remove_filter( 'the_title', 'mc_the_title', 10, 2 );
1587
  $title = apply_filters( 'the_title', $event['title'], $event['post'] );
1588
+ add_filter( 'the_title', 'mc_the_title', 10, 2 );
1589
  $link = add_query_arg( 'mc_id', $event['dateid'], $event['details_link'] );
1590
  $date = ' <span class="mc-event-date">' . $event['date'] . '</span>';
1591
 
1607
  if ( is_singular( 'mc-events' ) && isset( $_GET['mc_id'] ) ) {
1608
  $mc_id = (int) $_GET['mc_id'];
1609
  $event = mc_adjacent_event( $mc_id, 'next' );
1610
+ remove_filter( 'the_title', 'mc_the_title', 10, 2 );
1611
  $title = apply_filters( 'the_title', $event['title'], $event['post'] );
1612
+ add_filter( 'the_title', 'mc_the_title', 10, 2 );
1613
  $link = add_query_arg( 'mc_id', $event['dateid'], $event['details_link'] );
1614
  $date = ' <span class="mc-event-date">' . $event['date'] . '</span>';
1615
 
1619
  return $output;
1620
  }
1621
 
1622
+ /**
1623
+ * Add category icon into title on individual event pages.
1624
+ *
1625
+ * @param string $title Original title.
1626
+ * @param int $post_id Post ID.
1627
+ *
1628
+ * @return string new title string
1629
+ */
1630
+ function mc_the_title( $title, $post_id = null ) {
1631
+ if ( is_singular( 'mc-events' ) && in_the_loop() ) {
1632
+ if ( $post_id ) {
1633
+ $event_id = ( isset( $_GET['mc_id'] ) && is_numeric( $_GET['mc_id'] ) ) ? $_GET['mc_id'] : get_post_meta( $post_id, '_mc_event_id', true );
1634
+ if ( is_numeric( $event_id ) ) {
1635
+ $event = mc_get_event( $event_id );
1636
+ if ( ! is_object( $event ) ) {
1637
+ $event = mc_get_first_event( $event_id );
1638
+ } else {
1639
+ $event_title = $event->event_title;
1640
+ if ( $event_title !== $title ) {
1641
+ $title = $event_title;
1642
+ }
1643
+ }
1644
+ if ( is_object( $event ) && property_exists( $event, 'category_icon' ) ) {
1645
+ $icon = mc_category_icon( $event );
1646
+ } else {
1647
+ $icon = '';
1648
+ }
1649
+ $title = $icon . ' ' . strip_tags( $title, mc_strip_tags() );
1650
+ }
1651
+ }
1652
+ }
1653
+
1654
+ return $title;
1655
+ }
1656
 
1657
  /**
1658
  * Custom field callback for permalinks settings
my-calendar-event-manager.php CHANGED
@@ -120,7 +120,10 @@ function mc_add_post_meta_data( $post_id, $post, $data, $event_id ) {
120
  }
121
  update_post_meta( $post_id, '_mc_event_shortcode', $data['shortcode'] );
122
  update_post_meta( $post_id, '_mc_event_access', ( isset( $_POST['events_access'] ) ) ? $_POST['events_access'] : '' );
123
- update_post_meta( $post_id, '_mc_event_id', $event_id );
 
 
 
124
  update_post_meta( $post_id, '_mc_event_desc', $description );
125
  update_post_meta( $post_id, '_mc_event_image', $image );
126
  // This is only used by My Tickets, so only the first date occurrence is required.
@@ -2001,7 +2004,7 @@ function mc_list_events() {
2001
  if ( '' === $limit && '' !== $filter ) {
2002
  $limit = "WHERE $restrict = $filter";
2003
  } elseif ( '' !== $limit && '' !== $filter ) {
2004
- $limit .= "AND $restrict = $filter";
2005
  }
2006
  if ( '' === $filter || ! $allow_filters ) {
2007
  $filtered = '';
120
  }
121
  update_post_meta( $post_id, '_mc_event_shortcode', $data['shortcode'] );
122
  update_post_meta( $post_id, '_mc_event_access', ( isset( $_POST['events_access'] ) ) ? $_POST['events_access'] : '' );
123
+ $mc_event_id = get_post_meta( $post_id, '_mc_event_id', true );
124
+ if ( ! $mc_event_id ) {
125
+ update_post_meta( $post_id, '_mc_event_id', $event_id );
126
+ }
127
  update_post_meta( $post_id, '_mc_event_desc', $description );
128
  update_post_meta( $post_id, '_mc_event_image', $image );
129
  // This is only used by My Tickets, so only the first date occurrence is required.
2004
  if ( '' === $limit && '' !== $filter ) {
2005
  $limit = "WHERE $restrict = $filter";
2006
  } elseif ( '' !== $limit && '' !== $filter ) {
2007
+ $limit .= " AND $restrict = $filter";
2008
  }
2009
  if ( '' === $filter || ! $allow_filters ) {
2010
  $filtered = '';
my-calendar-events.php CHANGED
@@ -155,7 +155,7 @@ function my_calendar_get_events( $args ) {
155
  OR ( DATE('$from') BETWEEN DATE(occur_begin) AND DATE(occur_end) )
156
  OR ( DATE('$to') BETWEEN DATE(occur_begin) AND DATE(occur_end) ) )
157
  $exclude_categories
158
- ORDER BY " . apply_filters( 'mc_primary_sort', 'occur_begin' ) . ', ' . apply_filters( 'mc_secondary_sort', 'event_title ASC' );
159
 
160
  $events = $mcdb->get_results( $event_query );
161
 
@@ -190,7 +190,7 @@ function my_calendar_get_events( $args ) {
190
  } else {
191
  $event_query = '
192
  SELECT *, ' . $ts_string . '
193
- FROM ' . my_calendar_event_table( $site ) . '
194
  JOIN ' . my_calendar_table( $site ) . ' AS e
195
  ON (event_id=occur_event_id)
196
  JOIN ' . my_calendar_categories_table( $site ) . " AS c
@@ -202,7 +202,7 @@ function my_calendar_get_events( $args ) {
202
  OR ( DATE('$from') BETWEEN DATE(occur_begin) AND DATE(occur_end) )
203
  OR ( DATE('$to') BETWEEN DATE(occur_begin) AND DATE(occur_end) ) )
204
  $exclude_categories
205
- ORDER BY " . apply_filters( 'mc_primary_sort', 'occur_begin' ) . ', ' . apply_filters( 'mc_secondary_sort', 'event_title ASC' );
206
 
207
  $events = $mcdb->get_results( $event_query );
208
 
155
  OR ( DATE('$from') BETWEEN DATE(occur_begin) AND DATE(occur_end) )
156
  OR ( DATE('$to') BETWEEN DATE(occur_begin) AND DATE(occur_end) ) )
157
  $exclude_categories
158
+ GROUP BY o.occur_id ORDER BY " . apply_filters( 'mc_primary_sort', 'occur_begin' ) . ', ' . apply_filters( 'mc_secondary_sort', 'event_title ASC' );
159
 
160
  $events = $mcdb->get_results( $event_query );
161
 
190
  } else {
191
  $event_query = '
192
  SELECT *, ' . $ts_string . '
193
+ FROM ' . my_calendar_event_table( $site ) . ' AS o
194
  JOIN ' . my_calendar_table( $site ) . ' AS e
195
  ON (event_id=occur_event_id)
196
  JOIN ' . my_calendar_categories_table( $site ) . " AS c
202
  OR ( DATE('$from') BETWEEN DATE(occur_begin) AND DATE(occur_end) )
203
  OR ( DATE('$to') BETWEEN DATE(occur_begin) AND DATE(occur_end) ) )
204
  $exclude_categories
205
+ GROUP BY o.occur_id ORDER BY " . apply_filters( 'mc_primary_sort', 'occur_begin' ) . ', ' . apply_filters( 'mc_secondary_sort', 'event_title ASC' );
206
 
207
  $events = $mcdb->get_results( $event_query );
208
 
my-calendar-location-manager.php CHANGED
@@ -61,6 +61,7 @@ function my_calendar_manage_locations() {
61
  */
62
  function mc_default_location() {
63
  $default = get_option( 'mc_default_location' );
 
64
  if ( $default ) {
65
  $location = mc_get_location( $default );
66
  $output = mc_hcard( $location, 'true', false, 'location' );
61
  */
62
  function mc_default_location() {
63
  $default = get_option( 'mc_default_location' );
64
+ $output = '';
65
  if ( $default ) {
66
  $location = mc_get_location( $default );
67
  $output = mc_hcard( $location, 'true', false, 'location' );
my-calendar-output.php CHANGED
@@ -83,15 +83,15 @@ function mc_time_html( $e, $type ) {
83
  $time_content = ( 'list' === $type ) ? '' : "<span class='mc-event-date dtstart' itemprop='startDate' title='" . $dtstart . "' content='" . $dtstart . "'>$current</span>";
84
  // Handle cases.
85
  if ( $has_time ) {
86
- $time_content .= "<span class='event-time dtstart'><time class='value-title' datetime='" . $dtstart . "' title='" . $dtstart . "'>" . date_i18n( $time_format, strtotime( $e->occur_begin ) ) . '</time></span>';
87
  if ( 0 === (int) $e->event_hide_end ) {
88
  if ( '' !== $e->event_endtime && $e->event_endtime !== $e->event_time ) {
89
- $time_content .= "<span class='time-separator'> &ndash; </span>$final<span class='end-time dtend'><time class='value-title' datetime='" . $dtend . "' title='" . $dtend . "'>" . date_i18n( $time_format, strtotime( $e->occur_end ) ) . '</time></span>';
90
  }
91
  }
92
  } else {
93
  $notime = mc_notime_label( $e );
94
- $time_content .= "<span class='event-time'>";
95
  $time_content .= ( 'N/A' === $notime ) ? "<abbr title='" . __( 'Not Applicable', 'my-calendar' ) . "'>" . __( 'N/A', 'my-calendar' ) . "</abbr>\n" : esc_html( $notime );
96
  $time_content .= '</span>';
97
  }
@@ -139,42 +139,6 @@ function mc_category_icon( $event, $type = 'html' ) {
139
  return '';
140
  }
141
 
142
- add_filter( 'the_title', 'mc_category_icon_title', 10, 2 );
143
- /**
144
- * Add category icon into title on individual event pages.
145
- *
146
- * @param string $title Original title.
147
- * @param int $post_id Post ID.
148
- *
149
- * @return string new title string
150
- */
151
- function mc_category_icon_title( $title, $post_id = null ) {
152
- if ( is_singular( 'mc-events' ) && in_the_loop() ) {
153
- if ( $post_id ) {
154
- $event_id = ( isset( $_GET['mc_id'] ) && is_numeric( $_GET['mc_id'] ) ) ? $_GET['mc_id'] : get_post_meta( $post_id, '_mc_event_id', true );
155
- if ( is_numeric( $event_id ) ) {
156
- $event = mc_get_event( $event_id );
157
- if ( ! is_object( $event ) ) {
158
- $event = mc_get_first_event( $event_id );
159
- } else {
160
- $event_title = $event->event_title;
161
- if ( $event_title !== $title ) {
162
- $title = $event_title;
163
- }
164
- }
165
- if ( is_object( $event ) && property_exists( $event, 'category_icon' ) ) {
166
- $icon = mc_category_icon( $event );
167
- } else {
168
- $icon = '';
169
- }
170
- $title = $icon . ' ' . strip_tags( $title, mc_strip_tags() );
171
- }
172
- }
173
- }
174
-
175
- return $title;
176
- }
177
-
178
  /**
179
  * Generate the set of events for a given day
180
  *
@@ -1418,7 +1382,7 @@ function mc_valid_id( $mc_id ) {
1418
  $mcdb = mc_remote_db();
1419
  }
1420
 
1421
- $result = $mcdb->get_row( $mcdb->prepare( 'SELECT * FROM ' . my_calendar_event_table() . ' WHERE occur_id = %d', $mc_id ) );
1422
 
1423
  if ( is_object( $result ) ) {
1424
  return true;
@@ -1441,14 +1405,13 @@ function mc_show_event_template( $content ) {
1441
  // Some early versions of this placed the shortcode into the post content. Strip that out.
1442
  $new_content = $content;
1443
  if ( 'mc-events' === $post->post_type ) {
 
1444
  if ( isset( $_GET['mc_id'] ) && mc_valid_id( $_GET['mc_id'] ) ) {
1445
  $mc_id = intval( $_GET['mc_id'] );
1446
- $event_id = get_post_meta( $post->ID, '_mc_event_id', true );
1447
  $event = mc_get_event( $mc_id, 'object' );
1448
  $date = mc_date( 'Y-m-d', strtotime( $event->occur_begin ), false );
1449
  $time = mc_date( 'H:i:00', strtotime( $event->occur_begin ), false );
1450
  } else {
1451
- $event_id = get_post_meta( $post->ID, '_mc_event_id', true );
1452
  if ( is_numeric( $event_id ) ) {
1453
  $event = mc_get_nearest_event( $event_id );
1454
  $date = mc_date( 'Y-m-d', strtotime( $event->occur_begin ), false );
@@ -1688,7 +1651,8 @@ function my_calendar( $args ) {
1688
  $show_months = ( '0' === $show_months ) ? 1 : $show_months;
1689
  $caption_text = ' ' . stripslashes( trim( get_option( 'mc_caption' ) ) );
1690
  $week_format = ( ! get_option( 'mc_week_format' ) ) ? 'M j, \'y' : get_option( 'mc_week_format' );
1691
- $week_template = ( get_option( 'mc_week_caption', '' ) !== '' ) ? get_option( 'mc_week_caption' ) : 'Week of {date format="M jS"}';
 
1692
  $day_uri = ( ! get_option( 'mc_open_day_uri' ) ) ? 'false' : get_option( 'mc_open_day_uri' ); // This is not a URL. It's a behavior reference.
1693
  $list_info = get_option( 'mc_show_list_info' );
1694
  $list_events = get_option( 'mc_show_list_events' );
@@ -2666,9 +2630,9 @@ function my_calendar_next_link( $date, $format, $time = 'month', $months = 1 ) {
2666
  }
2667
  $day = '';
2668
  if ( (int) $yr !== (int) $cur_year ) {
2669
- $format = 'F, Y';
2670
  } else {
2671
- $format = 'F';
2672
  }
2673
  $date = date_i18n( $format, mktime( 0, 0, 0, $month, 1, $yr ) );
2674
  if ( 'week' === $time ) {
@@ -2745,9 +2709,9 @@ function my_calendar_prev_link( $date, $format, $time = 'month', $months = 1 ) {
2745
  }
2746
  }
2747
  if ( (int) $yr !== (int) $cur_year ) {
2748
- $format = 'F, Y';
2749
  } else {
2750
- $format = 'F';
2751
  }
2752
  $date = date_i18n( $format, mktime( 0, 0, 0, $month, 1, $yr ) );
2753
  $day = '';
83
  $time_content = ( 'list' === $type ) ? '' : "<span class='mc-event-date dtstart' itemprop='startDate' title='" . $dtstart . "' content='" . $dtstart . "'>$current</span>";
84
  // Handle cases.
85
  if ( $has_time ) {
86
+ $time_content .= " <span class='event-time dtstart'><time class='value-title' datetime='" . $dtstart . "' title='" . $dtstart . "'>" . date_i18n( $time_format, strtotime( $e->occur_begin ) ) . '</time></span>';
87
  if ( 0 === (int) $e->event_hide_end ) {
88
  if ( '' !== $e->event_endtime && $e->event_endtime !== $e->event_time ) {
89
+ $time_content .= " <span class='time-separator'> &ndash; </span>$final<span class='end-time dtend'><time class='value-title' datetime='" . $dtend . "' title='" . $dtend . "'>" . date_i18n( $time_format, strtotime( $e->occur_end ) ) . '</time></span>';
90
  }
91
  }
92
  } else {
93
  $notime = mc_notime_label( $e );
94
+ $time_content .= " <span class='event-time'>";
95
  $time_content .= ( 'N/A' === $notime ) ? "<abbr title='" . __( 'Not Applicable', 'my-calendar' ) . "'>" . __( 'N/A', 'my-calendar' ) . "</abbr>\n" : esc_html( $notime );
96
  $time_content .= '</span>';
97
  }
139
  return '';
140
  }
141
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  /**
143
  * Generate the set of events for a given day
144
  *
1382
  $mcdb = mc_remote_db();
1383
  }
1384
 
1385
+ $result = $mcdb->get_row( $mcdb->prepare( 'SELECT occur_id FROM ' . my_calendar_event_table() . ' WHERE occur_id = %d', $mc_id ) );
1386
 
1387
  if ( is_object( $result ) ) {
1388
  return true;
1405
  // Some early versions of this placed the shortcode into the post content. Strip that out.
1406
  $new_content = $content;
1407
  if ( 'mc-events' === $post->post_type ) {
1408
+ $event_id = get_post_meta( $post->ID, '_mc_event_id', true );
1409
  if ( isset( $_GET['mc_id'] ) && mc_valid_id( $_GET['mc_id'] ) ) {
1410
  $mc_id = intval( $_GET['mc_id'] );
 
1411
  $event = mc_get_event( $mc_id, 'object' );
1412
  $date = mc_date( 'Y-m-d', strtotime( $event->occur_begin ), false );
1413
  $time = mc_date( 'H:i:00', strtotime( $event->occur_begin ), false );
1414
  } else {
 
1415
  if ( is_numeric( $event_id ) ) {
1416
  $event = mc_get_nearest_event( $event_id );
1417
  $date = mc_date( 'Y-m-d', strtotime( $event->occur_begin ), false );
1651
  $show_months = ( '0' === $show_months ) ? 1 : $show_months;
1652
  $caption_text = ' ' . stripslashes( trim( get_option( 'mc_caption' ) ) );
1653
  $week_format = ( ! get_option( 'mc_week_format' ) ) ? 'M j, \'y' : get_option( 'mc_week_format' );
1654
+ // Translators: Template tag with date format.
1655
+ $week_template = ( get_option( 'mc_week_caption', '' ) !== '' ) ? get_option( 'mc_week_caption' ) : sprintf( __( 'Week of %s', 'my-calendar' ), '{date format="M jS"}' );
1656
  $day_uri = ( ! get_option( 'mc_open_day_uri' ) ) ? 'false' : get_option( 'mc_open_day_uri' ); // This is not a URL. It's a behavior reference.
1657
  $list_info = get_option( 'mc_show_list_info' );
1658
  $list_events = get_option( 'mc_show_list_events' );
2630
  }
2631
  $day = '';
2632
  if ( (int) $yr !== (int) $cur_year ) {
2633
+ $format = apply_filters( 'mc_month_year_format', 'F, Y', $date, $format, $time, $month );
2634
  } else {
2635
+ $format = apply_filters( 'mc_month_format', 'F, Y', $date, $format, $time, $month );
2636
  }
2637
  $date = date_i18n( $format, mktime( 0, 0, 0, $month, 1, $yr ) );
2638
  if ( 'week' === $time ) {
2709
  }
2710
  }
2711
  if ( (int) $yr !== (int) $cur_year ) {
2712
+ $format = apply_filters( 'mc_month_year_format', 'F, Y', $date, $format, $time, $month );
2713
  } else {
2714
+ $format = apply_filters( 'mc_month_format', 'F, Y', $date, $format, $time, $month );
2715
  }
2716
  $date = date_i18n( $format, mktime( 0, 0, 0, $month, 1, $yr ) );
2717
  $day = '';
my-calendar-settings.php CHANGED
@@ -709,7 +709,15 @@ function mc_remote_db() {
709
  <fieldset>
710
  <legend><?php _e( 'Calendar Link Targets', 'my-calendar' ); ?></legend>
711
  <ul>
712
- <li><?php mc_settings_field( 'mc_open_uri', __( 'Open calendar links to event details', 'my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>
 
 
 
 
 
 
 
 
713
  <li><?php mc_settings_field( 'mc_no_link', __( 'Disable calendar links', 'my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>
714
  <li><?php mc_settings_field( 'mc_mini_uri', __( 'Target <abbr title="Uniform resource locator">URL</abbr> for mini calendar date links:', 'my-calendar' ), '', '', array( 'size' => '60' ), 'url' ); ?></li>
715
  <?php
709
  <fieldset>
710
  <legend><?php _e( 'Calendar Link Targets', 'my-calendar' ); ?></legend>
711
  <ul>
712
+ <?php
713
+ $atts = array();
714
+ $note = '';
715
+ if ( '' === get_option( 'mc_uri_id', '' ) || '0' === get_option( 'mc_uri_id' ) ) {
716
+ $atts = array( 'disabled' => 'disabled' );
717
+ $note = ' (' . __( 'Set a main calendar page first.', 'my-calendar' ) . ')';
718
+ }
719
+ ?>
720
+ <li><?php mc_settings_field( 'mc_open_uri', __( 'Open calendar links to event details', 'my-calendar' ), '', $note, $atts, 'checkbox-single' ); ?></li>
721
  <li><?php mc_settings_field( 'mc_no_link', __( 'Disable calendar links', 'my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>
722
  <li><?php mc_settings_field( 'mc_mini_uri', __( 'Target <abbr title="Uniform resource locator">URL</abbr> for mini calendar date links:', 'my-calendar' ), '', '', array( 'size' => '60' ), 'url' ); ?></li>
723
  <?php
my-calendar-widgets.php CHANGED
@@ -244,7 +244,7 @@ function my_calendar_upcoming_events( $args ) {
244
  $output = apply_filters( 'mc_upcoming_events_header', $header ) . $output . apply_filters( 'mc_upcoming_events_footer', $footer );
245
  $return = mc_run_shortcodes( $output );
246
  } else {
247
- $return = stripcslashes( $no_event_text );
248
  }
249
 
250
  if ( $site ) {
@@ -574,10 +574,10 @@ function my_calendar_todays_events( $args ) {
574
  if ( 0 !== count( $events ) ) {
575
  $return = apply_filters( 'mc_todays_events_header', $header ) . $output . apply_filters( 'mc_todays_events_footer', $footer );
576
  } else {
577
- $return = stripcslashes( $no_event_text );
578
  }
579
  } else {
580
- $return = stripcslashes( $no_event_text );
581
  }
582
 
583
  if ( $site ) {
244
  $output = apply_filters( 'mc_upcoming_events_header', $header ) . $output . apply_filters( 'mc_upcoming_events_footer', $footer );
245
  $return = mc_run_shortcodes( $output );
246
  } else {
247
+ $return = '<div class="no-events-fallback upcoming-events">' . stripcslashes( $no_event_text ) . '</div>';
248
  }
249
 
250
  if ( $site ) {
574
  if ( 0 !== count( $events ) ) {
575
  $return = apply_filters( 'mc_todays_events_header', $header ) . $output . apply_filters( 'mc_todays_events_footer', $footer );
576
  } else {
577
+ $return = '<div class="no-events-fallback todays-events">' . stripcslashes( $no_event_text ) . '</div>';
578
  }
579
  } else {
580
+ $return = '<div class="no-events-fallback todays-events">' . stripcslashes( $no_event_text ) . '</div>';
581
  }
582
 
583
  if ( $site ) {
my-calendar.php CHANGED
@@ -17,7 +17,7 @@
17
  * License: GPL-2.0+
18
  * License URI: http://www.gnu.org/license/gpl-2.0.txt
19
  * Domain Path: lang
20
- * Version: 3.2.9
21
  */
22
 
23
  /*
@@ -42,7 +42,7 @@ if ( ! defined( 'ABSPATH' ) ) {
42
  }
43
 
44
  global $mc_version, $wpdb;
45
- $mc_version = '3.2.9';
46
 
47
  define( 'MC_DEBUG', false );
48
 
17
  * License: GPL-2.0+
18
  * License URI: http://www.gnu.org/license/gpl-2.0.txt
19
  * Domain Path: lang
20
+ * Version: 3.2.10
21
  */
22
 
23
  /*
42
  }
43
 
44
  global $mc_version, $wpdb;
45
+ $mc_version = '3.2.10';
46
 
47
  define( 'MC_DEBUG', false );
48
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: calendar, dates, times, event, events, scheduling, schedule, event manager
5
  Requires at least: 4.4
6
  Tested up to: 5.5
7
  Requires PHP: 5.6
8
- Stable tag: 3.2.9
9
  Text domain: my-calendar
10
  License: GPLv2 or later
11
 
@@ -21,7 +21,7 @@ Easy to use for anybody, My Calendar provides enormous flexibility for designers
21
  Looking for more? [Buy My Calendar Pro](https://www.joedolson.com/my-calendar/pro/), the premium extension for My Calendar to add support for user-submitted events, integration between posting and event creation, and import events from outside sources.
22
 
23
  = Selling event tickets? =
24
- Do you need to sell tickets for events? [Use My Tickets](https://wordpress.org/plugins/my-tickets/) and sell tickets for your My Calendar events. Set prices, ticket availability, and sell multiple events at the same time using My Tickets.
25
 
26
  = Features: =
27
 
@@ -45,14 +45,14 @@ Do you need to sell tickets for events? [Use My Tickets](https://wordpress.org/p
45
 
46
  = What's in My Calendar Pro? =
47
 
48
- > * Let your site visitors submit events to your site (pay to post or free!).
49
- > * Let logged-in users edit their events from the front-end.
50
- > * Create events when you publish a blog post
51
- > * Publish a blog post when you create an event
52
- > * Advanced search features
53
- > * Responsive mode
54
- > * Import events from .ics or .csv formats via file or URL.
55
- > * REST API support for sharing events between multiple sites.
56
 
57
  = Translations =
58
 
@@ -84,6 +84,16 @@ Translating my plug-ins is always appreciated. Visit <a href="https://translate.
84
 
85
  == Changelog ==
86
 
 
 
 
 
 
 
 
 
 
 
87
  = 3.2.9 =
88
 
89
  * Bug fix: Additional of required fields testing erased error messages generated prior to required fields testing.
5
  Requires at least: 4.4
6
  Tested up to: 5.5
7
  Requires PHP: 5.6
8
+ Stable tag: 3.2.10
9
  Text domain: my-calendar
10
  License: GPLv2 or later
11
 
21
  Looking for more? [Buy My Calendar Pro](https://www.joedolson.com/my-calendar/pro/), the premium extension for My Calendar to add support for user-submitted events, integration between posting and event creation, and import events from outside sources.
22
 
23
  = Selling event tickets? =
24
+ Do you sell tickets for your events? [Use My Tickets](https://wordpress.org/plugins/my-tickets/) and sell tickets for My Calendar events. Set prices, ticket availability, and sell multiple events at the same time using My Tickets.
25
 
26
  = Features: =
27
 
45
 
46
  = What's in My Calendar Pro? =
47
 
48
+ * Let your site visitors submit events to your site (pay to post or free!).
49
+ * Let logged-in users edit their events from the front-end.
50
+ * Create events when you publish a blog post
51
+ * Publish a blog post when you create an event
52
+ * Advanced search features
53
+ * Responsive mode
54
+ * Import events from .ics or .csv formats via file or URL.
55
+ * REST API support for sharing events between multiple sites.
56
 
57
  = Translations =
58
 
84
 
85
  == Changelog ==
86
 
87
+ = 3.2.10 =
88
+
89
+ * Change: Fallback text should have a stylable wrapper.
90
+ * Bug fix: Missing translatable string.
91
+ * Bug fix: When multiple categories selected, events in more than one category would appear multiple times.
92
+ * Bug fix: Missing space in MySQL filters in event manager.
93
+ * Bug fix: PHP Notice thrown in location manager.
94
+ * Bug fix: Add note to open events link field if no URI configured.
95
+ * Layout fix: Ensure there's always a space between date & time.
96
+
97
  = 3.2.9 =
98
 
99
  * Bug fix: Additional of required fields testing erased error messages generated prior to required fields testing.