My Calendar - Version 3.0.9

Version Description

  • Bug fix: Error thrown if Akismet had previously been configured, then deleted.
  • Bug fix: location type was added to params if category key was set.
  • Bug fix: remove a couple notices
  • Bug fix: category relationships not carried over when recurring events split
Download this release

Release Info

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

Code changes from version 3.0.0 to 3.0.9

css/reset.css CHANGED
@@ -80,9 +80,14 @@
80
  button.mc-toggle {
81
  border: 0;
82
  padding: 4px;
83
- background-color: transparent;
84
  font-size: 20px;
85
- color: #a00;
 
 
 
 
 
86
  }
87
 
88
  button.mc-toggle:hover, button.mc-toggle:focus {
80
  button.mc-toggle {
81
  border: 0;
82
  padding: 4px;
83
+ background-color: transparent !important;
84
  font-size: 20px;
85
+ color: #a00 !important;
86
+ font-family: dashicons !important;
87
+ }
88
+
89
+ button .mc-toggle:before {
90
+ font-family: dashicons !important;
91
  }
92
 
93
  button.mc-toggle:hover, button.mc-toggle:focus {
includes/date-utilities.php CHANGED
@@ -380,7 +380,8 @@ function mc_exit_early( $event, $process_date ) {
380
  $end = date( 'Y-m-d', strtotime( $event->occur_end ) );
381
  // if event ends at midnight today (e.g., very first thing of the day), exit without re-drawing.
382
  // or if event started yesterday & has event_hide_end checked.
383
- $ends_at_midnight = ( '00:00:00' == $event->event_endtime && $end == $process_date && $current != $process_date ) ? true : false;
 
384
  // hides events if hiding end time & not first day.
385
  $hide_day_two = ( $hide_days && ( $today != $current ) ) ? true : false;
386
 
380
  $end = date( 'Y-m-d', strtotime( $event->occur_end ) );
381
  // if event ends at midnight today (e.g., very first thing of the day), exit without re-drawing.
382
  // or if event started yesterday & has event_hide_end checked.
383
+ $ends_at_midnight = ( '00:00:00' == $event->event_endtime && $end == $process_date && $current != $today ) ? true : false;
384
+
385
  // hides events if hiding end time & not first day.
386
  $hide_day_two = ( $hide_days && ( $today != $current ) ) ? true : false;
387
 
includes/general-utilities.php CHANGED
@@ -105,7 +105,7 @@ function mc_add_inner_box() {
105
  */
106
  function mc_strip_tags() {
107
 
108
- return '<strong><em><i><b><span>';
109
  }
110
 
111
  /**
105
  */
106
  function mc_strip_tags() {
107
 
108
+ return apply_filters( 'mc_strip_tags', '<strong><em><i><b><span><br><a>' );
109
  }
110
 
111
  /**
includes/widgets/class-my-calendar-filters.php CHANGED
@@ -32,7 +32,10 @@ class My_Calendar_Filters extends WP_Widget {
32
  parent::__construct(
33
  false,
34
  $name = __( 'My Calendar: Event Filters', 'my-calendar' ),
35
- array( 'customize_selective_refresh' => true )
 
 
 
36
  );
37
  }
38
 
32
  parent::__construct(
33
  false,
34
  $name = __( 'My Calendar: Event Filters', 'my-calendar' ),
35
+ array(
36
+ 'customize_selective_refresh' => true,
37
+ 'description' => __( 'Filter displayed events.', 'my-calendar' ),
38
+ )
39
  );
40
  }
41
 
includes/widgets/class-my-calendar-mini-widget.php CHANGED
@@ -32,7 +32,10 @@ class My_Calendar_Mini_Widget extends WP_Widget {
32
  parent::__construct(
33
  false,
34
  $name = __( 'My Calendar: Mini Calendar', 'my-calendar' ),
35
- array( 'customize_selective_refresh' => true )
 
 
 
36
  );
37
  }
38
 
32
  parent::__construct(
33
  false,
34
  $name = __( 'My Calendar: Mini Calendar', 'my-calendar' ),
35
+ array(
36
+ 'customize_selective_refresh' => true,
37
+ 'description' => __( 'Show events in a compact grid.', 'my-calendar' ),
38
+ )
39
  );
40
  }
41
 
includes/widgets/class-my-calendar-simple-search.php CHANGED
@@ -32,7 +32,10 @@ class My_Calendar_Simple_Search extends WP_Widget {
32
  parent::__construct(
33
  false,
34
  $name = __( 'My Calendar: Simple Event Search', 'my-calendar' ),
35
- array( 'customize_selective_refresh' => true )
 
 
 
36
  );
37
  }
38
 
32
  parent::__construct(
33
  false,
34
  $name = __( 'My Calendar: Simple Event Search', 'my-calendar' ),
35
+ array(
36
+ 'customize_selective_refresh' => true,
37
+ 'description' => __( 'Search your events.', 'my-calendar' ),
38
+ )
39
  );
40
  }
41
 
includes/widgets/class-my-calendar-today-widget.php CHANGED
@@ -32,7 +32,10 @@ class My_Calendar_Today_Widget extends WP_Widget {
32
  parent::__construct(
33
  false,
34
  $name = __( 'My Calendar: Today\'s Events', 'my-calendar' ),
35
- array( 'customize_selective_refresh' => true )
 
 
 
36
  );
37
  }
38
 
32
  parent::__construct(
33
  false,
34
  $name = __( 'My Calendar: Today\'s Events', 'my-calendar' ),
35
+ array(
36
+ 'customize_selective_refresh' => true,
37
+ 'description' => __( 'A list of events today.', 'my-calendar' ),
38
+ )
39
  );
40
  }
41
 
includes/widgets/class-my-calendar-upcoming-widget.php CHANGED
@@ -32,7 +32,10 @@ class My_Calendar_Upcoming_Widget extends WP_Widget {
32
  parent::__construct(
33
  false,
34
  $name = __( 'My Calendar: Upcoming Events', 'my-calendar' ),
35
- array( 'customize_selective_refresh' => true )
 
 
 
36
  );
37
  }
38
 
@@ -88,7 +91,7 @@ class My_Calendar_Upcoming_Widget extends WP_Widget {
88
  'type' => $type,
89
  'category' => $the_category,
90
  'template' => $the_template,
91
- 'substitute' => $the_substitute,
92
  'order' => $order,
93
  'skip' => $skip,
94
  'show_today' => $show_today,
@@ -164,9 +167,6 @@ class My_Calendar_Upcoming_Widget extends WP_Widget {
164
  <label for="<?php echo $this->get_field_id( 'my_calendar_upcoming_template' ); ?>"><?php _e( 'Template', 'my-calendar' ); ?></label><br/>
165
  <textarea class="widefat" rows="6" cols="20" id="<?php echo $this->get_field_id( 'my_calendar_upcoming_template' ); ?>" name="<?php echo $this->get_field_name( 'my_calendar_upcoming_template' ); ?>"><?php echo esc_attr( $template ); ?></textarea>
166
  </p>
167
- <fieldset>
168
- <legend><?php _e( 'Widget Options', 'my-calendar' ); ?></legend>
169
- <?php $config_url = admin_url( 'admin.php?page=my-calendar-config' ); ?>
170
  <p>
171
  <label for="<?php echo $this->get_field_id( 'mc_link' ); ?>"><?php _e( 'Widget title links to:', 'my-calendar' ); ?></label><br/>
172
  <input class="widefat" type="text" id="<?php echo $this->get_field_id( 'mc_link' ); ?>" name="<?php echo $this->get_field_name( 'mc_link' ); ?>" value="<?php echo $link; ?>"/>
32
  parent::__construct(
33
  false,
34
  $name = __( 'My Calendar: Upcoming Events', 'my-calendar' ),
35
+ array(
36
+ 'customize_selective_refresh' => true,
37
+ 'description' => __( 'List recent and future events.', 'my-calendar' ),
38
+ )
39
  );
40
  }
41
 
91
  'type' => $type,
92
  'category' => $the_category,
93
  'template' => $the_template,
94
+ 'fallback' => $the_substitute,
95
  'order' => $order,
96
  'skip' => $skip,
97
  'show_today' => $show_today,
167
  <label for="<?php echo $this->get_field_id( 'my_calendar_upcoming_template' ); ?>"><?php _e( 'Template', 'my-calendar' ); ?></label><br/>
168
  <textarea class="widefat" rows="6" cols="20" id="<?php echo $this->get_field_id( 'my_calendar_upcoming_template' ); ?>" name="<?php echo $this->get_field_name( 'my_calendar_upcoming_template' ); ?>"><?php echo esc_attr( $template ); ?></textarea>
169
  </p>
 
 
 
170
  <p>
171
  <label for="<?php echo $this->get_field_id( 'mc_link' ); ?>"><?php _e( 'Widget title links to:', 'my-calendar' ); ?></label><br/>
172
  <input class="widefat" type="text" id="<?php echo $this->get_field_id( 'mc_link' ); ?>" name="<?php echo $this->get_field_name( 'mc_link' ); ?>" value="<?php echo $link; ?>"/>
js/mc-mini.js CHANGED
@@ -1,19 +1,19 @@
1
  (function ($) {
2
- 'use strict';
3
- $(function () {
4
- $( ".mini .has-events" ).children().not( ".trigger, .mc-date, .event-date" ).hide();
5
- $( document ).on( "click", ".mini .has-events .trigger", function (e) {
6
- e.preventDefault();
7
  var current_date = $(this).parent().children();
8
- current_date.not(".trigger").toggle().attr( "tabindex", "-1" ).focus();
9
  $( '.mini .has-events' ).children( '.trigger' ).removeClass( 'active-toggle' );
10
  $( '.mini .has-events' ).children().not( '.trigger, .mc-date, .event-date' ).not( current_date ).hide();
11
  $( this ).addClass( 'active-toggle' );
12
- } );
13
- $( document ).on( "click", ".mini-event .close", function (e) {
14
- e.preventDefault();
15
  $(this).closest( '.mini .has-events' ).children( '.trigger' ).removeClass( 'active-toggle' );
16
- $(this).closest( 'div.calendar-events' ).toggle();
17
- } );
18
- });
19
- }(jQuery));
1
  (function ($) {
2
+ 'use strict';
3
+ $(function () {
4
+ $( ".mini .has-events" ).children().not( ".trigger, .mc-date, .event-date" ).hide();
5
+ $( document ).on( "click", ".mini .has-events .trigger", function (e) {
6
+ e.preventDefault();
7
  var current_date = $(this).parent().children();
8
+ current_date.not(".trigger").toggle().attr( "tabindex", "-1" ).focus();
9
  $( '.mini .has-events' ).children( '.trigger' ).removeClass( 'active-toggle' );
10
  $( '.mini .has-events' ).children().not( '.trigger, .mc-date, .event-date' ).not( current_date ).hide();
11
  $( this ).addClass( 'active-toggle' );
12
+ } );
13
+ $( document ).on( "click", ".mini-event .close", function (e) {
14
+ e.preventDefault();
15
  $(this).closest( '.mini .has-events' ).children( '.trigger' ).removeClass( 'active-toggle' );
16
+ $(this).closest( 'div.calendar-events' ).toggle();
17
+ } );
18
+ });
19
+ }(jQuery));
my-calendar-categories.php CHANGED
@@ -38,6 +38,9 @@ function mc_update_category( $field, $data, $category ) {
38
  * @return array images in directory.
39
  */
40
  function mc_directory_list( $directory ) {
 
 
 
41
  $results = array();
42
  $handler = opendir( $directory );
43
  // keep going until all files in directory have been read.
@@ -70,7 +73,7 @@ function mc_private_categories() {
70
  $categories = mc_get_private_categories();
71
  $cats = implode( ',', $categories );
72
  if ( '' != $cats ) {
73
- $cats = " AND category_id NOT IN ($cats)";
74
  }
75
  }
76
 
@@ -885,6 +888,12 @@ function mc_get_categories( $event, $ids = true ) {
885
  }
886
  } elseif ( 'html' == $ids ) {
887
  $return = mc_categories_html( $results, $primary );
 
 
 
 
 
 
888
  } else {
889
  $return = ( is_array( $results ) ) ? $results : array( $event->event_category );
890
  }
38
  * @return array images in directory.
39
  */
40
  function mc_directory_list( $directory ) {
41
+ if ( ! file_exists( $directory ) ) {
42
+ return array();
43
+ }
44
  $results = array();
45
  $handler = opendir( $directory );
46
  // keep going until all files in directory have been read.
73
  $categories = mc_get_private_categories();
74
  $cats = implode( ',', $categories );
75
  if ( '' != $cats ) {
76
+ $cats = " AND c.category_id NOT IN ($cats)";
77
  }
78
  }
79
 
888
  }
889
  } elseif ( 'html' == $ids ) {
890
  $return = mc_categories_html( $results, $primary );
891
+ } elseif ( 'testing' == $ids ) {
892
+ if ( $results ) {
893
+ foreach ( $results as $result ) {
894
+ $return[] = $result->category_id;
895
+ }
896
+ }
897
  } else {
898
  $return = ( is_array( $results ) ) ? $results : array( $event->event_category );
899
  }
my-calendar-core.php CHANGED
@@ -138,8 +138,8 @@ function mc_register_styles() {
138
  global $wp_query;
139
  $this_post = $wp_query->get_queried_object();
140
  $stylesheet = apply_filters( 'mc_registered_stylesheet', mc_get_style_path( get_option( 'mc_css_file' ), 'url' ) );
141
- wp_register_style( 'my-calendar-reset', plugins_url( 'css/reset.css', __FILE__ ) );
142
- wp_register_style( 'my-calendar-style', $stylesheet, array( 'dashicons', 'my-calendar-reset' ) );
143
 
144
  $admin_stylesheet = plugins_url( 'css/mc-admin.css', __FILE__ );
145
  wp_register_style( 'my-calendar-admin-style', $admin_stylesheet );
@@ -648,7 +648,7 @@ function my_calendar_check() {
648
  if ( ! $my_calendar_exists ) {
649
  $new_install = true;
650
  } else {
651
- // for each release requiring an upgrade path, add a version compare.
652
  // Loop will run every relevant upgrade cycle.
653
  $valid_upgrades = array( '2.0.0', '2.2.10', '2.3.0', '2.3.11', '2.3.15', '2.4.4', '3.0.0' );
654
  foreach ( $valid_upgrades as $upgrade ) {
@@ -657,11 +657,11 @@ function my_calendar_check() {
657
  }
658
  }
659
  }
660
- // having determined upgrade path, assign new version number.
661
  update_option( 'mc_version', $mc_version );
662
- // Now we've determined what the current install is or isn't.
663
  if ( true == $new_install ) {
664
- // add default settings.
665
  mc_default_settings();
666
  mc_create_category(
667
  array(
@@ -902,7 +902,7 @@ function mc_spam( $event_url = '', $description = '', $post = array() ) {
902
  $akismet = false;
903
  $c = array();
904
  // check for Akismet.
905
- if ( function_exists( 'akismet_http_post' ) || ( get_option( 'wordpress_api_key' ) || $wpcom_api_key ) ) {
906
  $akismet = true;
907
  }
908
  if ( $akismet ) {
@@ -1218,7 +1218,7 @@ function mc_guess_calendar() {
1218
  }
1219
 
1220
  if ( ! $has_uri ) {
1221
- $post_ID = $wpdb->get_var( "SELECT id FROM $wpdb->posts WHERE post_name LIKE '%my-calendar%' AND post_status = 'publish'" );
1222
  if ( $post_ID ) {
1223
  $link = get_permalink( $post_ID );
1224
  $content = get_post( $post_ID )->post_content;
138
  global $wp_query;
139
  $this_post = $wp_query->get_queried_object();
140
  $stylesheet = apply_filters( 'mc_registered_stylesheet', mc_get_style_path( get_option( 'mc_css_file' ), 'url' ) );
141
+ wp_register_style( 'my-calendar-reset', plugins_url( 'css/reset.css', __FILE__ ), array( 'dashicons' ) );
142
+ wp_register_style( 'my-calendar-style', $stylesheet, array( 'my-calendar-reset' ) );
143
 
144
  $admin_stylesheet = plugins_url( 'css/mc-admin.css', __FILE__ );
145
  wp_register_style( 'my-calendar-admin-style', $admin_stylesheet );
648
  if ( ! $my_calendar_exists ) {
649
  $new_install = true;
650
  } else {
651
+ // For each release requiring an upgrade path, add a version compare.
652
  // Loop will run every relevant upgrade cycle.
653
  $valid_upgrades = array( '2.0.0', '2.2.10', '2.3.0', '2.3.11', '2.3.15', '2.4.4', '3.0.0' );
654
  foreach ( $valid_upgrades as $upgrade ) {
657
  }
658
  }
659
  }
660
+ // Having determined upgrade path, assign new version number.
661
  update_option( 'mc_version', $mc_version );
662
+ // Now we've determined what the current install is.
663
  if ( true == $new_install ) {
664
+ // Add default settings.
665
  mc_default_settings();
666
  mc_create_category(
667
  array(
902
  $akismet = false;
903
  $c = array();
904
  // check for Akismet.
905
+ if ( function_exists( 'akismet_http_post' ) && ( get_option( 'wordpress_api_key' ) || $wpcom_api_key ) ) {
906
  $akismet = true;
907
  }
908
  if ( $akismet ) {
1218
  }
1219
 
1220
  if ( ! $has_uri ) {
1221
+ $post_ID = $wpdb->get_var( "SELECT id FROM $wpdb->posts WHERE post_name LIKE '%my-calendar%' AND post_name NOT LIKE '%-my-calendar%' AND post_status = 'publish'" );
1222
  if ( $post_ID ) {
1223
  $link = get_permalink( $post_ID );
1224
  $content = get_post( $post_ID )->post_content;
my-calendar-event-manager.php CHANGED
@@ -722,7 +722,8 @@ function my_calendar_save( $action, $output, $event_id = false ) {
722
  $wpdb->insert( my_calendar_table(), $update, $formats );
723
  // need to get this variable into URL for form submit.
724
  $new_event = $wpdb->insert_id;
725
- $result = mc_update_instance( $event_instance, $new_event, $update );
 
726
  } else {
727
  if ( $update['event_begin'][0] == $_POST['prev_event_begin'] && $update['event_end'][0] == $_POST['prev_event_end'] ) {
728
  // There were no changes at all.
@@ -799,7 +800,7 @@ function mc_set_category_relationships( $cats, $event_id ) {
799
  */
800
  function mc_update_category_relationships( $cats, $event_id ) {
801
  global $wpdb;
802
- $old_cats = mc_get_categories( $event_id );
803
  if ( $old_cats == $cats ) {
804
  return;
805
  }
@@ -1958,7 +1959,7 @@ function mc_list_events() {
1958
  href="<?php echo admin_url( 'admin.php?page=my-calendar-manage&amp;restrict=archived' ); ?>"><?php _e( 'Archived', 'my-calendar' ); ?></a>
1959
  </li>
1960
  <?php
1961
- if ( ( function_exists( 'akismet_http_post' ) || function_exists( 'bs_checker' ) ) && $allow_filters ) {
1962
  ?>
1963
  <li>
1964
  <a <?php echo ( isset( $_GET['restrict'] ) && 'flagged' == $_GET['restrict'] ) ? 'class="active-link" aria-current="true"' : ''; ?> href="<?php echo admin_url( 'admin.php?page=my-calendar-manage&amp;restrict=flagged&amp;filter=1' ); ?>"><?php _e( 'Spam', 'my-calendar' ); ?></a>
@@ -2247,7 +2248,7 @@ function mc_list_events() {
2247
  href="<?php echo admin_url( 'admin.php?page=my-calendar-manage&amp;restrict=archived' ); ?>"><?php _e( 'Archived', 'my-calendar' ); ?></a>
2248
  </li>
2249
  <?php
2250
- if ( ( function_exists( 'akismet_http_post' ) || function_exists( 'bs_checker' ) ) && $allow_filters ) {
2251
  ?>
2252
  <li>
2253
  <a <?php echo ( isset( $_GET['restrict'] ) && 'flagged' == $_GET['restrict'] ) ? 'class="active-link" aria-current="true"' : ''; ?>
@@ -2427,6 +2428,10 @@ function mc_check_data( $action, $post, $i ) {
2427
  if ( '' != $time ) {
2428
  $default_modifier = apply_filters( 'mc_default_event_length', '1 hour' );
2429
  $endtime = ! empty( $post['event_endtime'][ $i ] ) ? trim( $post['event_endtime'][ $i ] ) : date( 'H:i:s', mc_strtotime( $time . ' +' . $default_modifier ) );
 
 
 
 
2430
  } else {
2431
  $endtime = ! empty( $post['event_endtime'][ $i ] ) ? trim( $post['event_endtime'][ $i ] ) : '';
2432
  }
@@ -2790,7 +2795,7 @@ function mc_compare( $update, $id ) {
2790
  * Update a single event instance.
2791
  *
2792
  * @param int $event_instance Instance ID.
2793
- * @param int $event_id Event ID.
2794
  * @param array $update New date array.
2795
  *
2796
  * Return query result.
@@ -3276,7 +3281,10 @@ function mc_related_events( $id ) {
3276
  $results = mc_get_related( $id );
3277
  if ( is_array( $results ) && ! empty( $results ) ) {
3278
  foreach ( $results as $result ) {
3279
- $result = mc_get_first_event( $result->event_id );
 
 
 
3280
  $event = $result->occur_event_id;
3281
  $current = '<a href="' . admin_url( 'admin.php?page=my-calendar' ) . '&amp;mode=edit&amp;event_id=' . $event . '">';
3282
  $end = '</a>';
@@ -3785,7 +3793,7 @@ function mc_increment_event( $id, $post = array(), $test = false, $instances = a
3785
  for ( $i = 0; $i <= $numforward; $i ++ ) {
3786
  $next_week_diff = ( date( 'm', $newbegin ) == date( 'm', my_calendar_add_date( date( 'Y-m-d', $newbegin ), 7, 0, 0 ) ) ) ? false : true;
3787
  $move_event = ( ( 1 == $fifth_week ) && ( ( week_of_month( date( 'd', $newbegin ) ) + 1 ) == $week_of_event ) && true == $next_week_diff ) ? true : false;
3788
- if ( week_of_month( date( 'd', $newbegin ) == $week_of_event ) || true == $move_event ) {
3789
  } else {
3790
  $newbegin = my_calendar_add_date( date( 'Y-m-d H:i:s', $newbegin ), 7, 0, 0 );
3791
  $newend = my_calendar_add_date( date( 'Y-m-d H:i:s', $newend ), 7, 0, 0 );
722
  $wpdb->insert( my_calendar_table(), $update, $formats );
723
  // need to get this variable into URL for form submit.
724
  $new_event = $wpdb->insert_id;
725
+ mc_update_category_relationships( $cats, $new_event );
726
+ $result = mc_update_instance( $event_instance, $new_event, $update );
727
  } else {
728
  if ( $update['event_begin'][0] == $_POST['prev_event_begin'] && $update['event_end'][0] == $_POST['prev_event_end'] ) {
729
  // There were no changes at all.
800
  */
801
  function mc_update_category_relationships( $cats, $event_id ) {
802
  global $wpdb;
803
+ $old_cats = mc_get_categories( $event_id, 'testing' );
804
  if ( $old_cats == $cats ) {
805
  return;
806
  }
1959
  href="<?php echo admin_url( 'admin.php?page=my-calendar-manage&amp;restrict=archived' ); ?>"><?php _e( 'Archived', 'my-calendar' ); ?></a>
1960
  </li>
1961
  <?php
1962
+ if ( function_exists( 'akismet_http_post' ) && $allow_filters ) {
1963
  ?>
1964
  <li>
1965
  <a <?php echo ( isset( $_GET['restrict'] ) && 'flagged' == $_GET['restrict'] ) ? 'class="active-link" aria-current="true"' : ''; ?> href="<?php echo admin_url( 'admin.php?page=my-calendar-manage&amp;restrict=flagged&amp;filter=1' ); ?>"><?php _e( 'Spam', 'my-calendar' ); ?></a>
2248
  href="<?php echo admin_url( 'admin.php?page=my-calendar-manage&amp;restrict=archived' ); ?>"><?php _e( 'Archived', 'my-calendar' ); ?></a>
2249
  </li>
2250
  <?php
2251
+ if ( function_exists( 'akismet_http_post' ) && $allow_filters ) {
2252
  ?>
2253
  <li>
2254
  <a <?php echo ( isset( $_GET['restrict'] ) && 'flagged' == $_GET['restrict'] ) ? 'class="active-link" aria-current="true"' : ''; ?>
2428
  if ( '' != $time ) {
2429
  $default_modifier = apply_filters( 'mc_default_event_length', '1 hour' );
2430
  $endtime = ! empty( $post['event_endtime'][ $i ] ) ? trim( $post['event_endtime'][ $i ] ) : date( 'H:i:s', mc_strtotime( $time . ' +' . $default_modifier ) );
2431
+ if ( empty( $post['event_endtime'][ $i ] ) && date( 'H', mc_strtotime( $endtime ) ) == '00' ) {
2432
+ // If one hour pushes event into next day, reset to 11:59pm.
2433
+ $endtime = '23:59:00';
2434
+ }
2435
  } else {
2436
  $endtime = ! empty( $post['event_endtime'][ $i ] ) ? trim( $post['event_endtime'][ $i ] ) : '';
2437
  }
2795
  * Update a single event instance.
2796
  *
2797
  * @param int $event_instance Instance ID.
2798
+ * @param int $event_id New event ID.
2799
  * @param array $update New date array.
2800
  *
2801
  * Return query result.
3281
  $results = mc_get_related( $id );
3282
  if ( is_array( $results ) && ! empty( $results ) ) {
3283
  foreach ( $results as $result ) {
3284
+ $result = mc_get_first_event( $result->event_id );
3285
+ if ( ! is_object( $result ) ) {
3286
+ continue;
3287
+ }
3288
  $event = $result->occur_event_id;
3289
  $current = '<a href="' . admin_url( 'admin.php?page=my-calendar' ) . '&amp;mode=edit&amp;event_id=' . $event . '">';
3290
  $end = '</a>';
3793
  for ( $i = 0; $i <= $numforward; $i ++ ) {
3794
  $next_week_diff = ( date( 'm', $newbegin ) == date( 'm', my_calendar_add_date( date( 'Y-m-d', $newbegin ), 7, 0, 0 ) ) ) ? false : true;
3795
  $move_event = ( ( 1 == $fifth_week ) && ( ( week_of_month( date( 'd', $newbegin ) ) + 1 ) == $week_of_event ) && true == $next_week_diff ) ? true : false;
3796
+ if ( week_of_month( date( 'd', $newbegin ) ) == $week_of_event || true == $move_event ) {
3797
  } else {
3798
  $newbegin = my_calendar_add_date( date( 'Y-m-d H:i:s', $newbegin ), 7, 0, 0 );
3799
  $newend = my_calendar_add_date( date( 'Y-m-d H:i:s', $newend ), 7, 0, 0 );
my-calendar-events.php CHANGED
@@ -46,7 +46,7 @@ function my_calendar_get_events( $args ) {
46
  $from = isset( $args['from'] ) ? $args['from'] : '';
47
  $to = isset( $args['to'] ) ? $args['to'] : '';
48
  $category = isset( $args['category'] ) ? $args['category'] : 'all';
49
- $ltype = isset( $args['category'] ) ? $args['ltype'] : 'all';
50
  $lvalue = isset( $args['lvalue'] ) ? $args['lvalue'] : 'all';
51
  $source = isset( $args['source'] ) ? $args['source'] : 'calendar';
52
  $author = isset( $args['author'] ) ? $args['author'] : 'all';
@@ -101,7 +101,7 @@ SELECT *, UNIX_TIMESTAMP(occur_begin) AS ts_occur_begin, UNIX_TIMESTAMP(occur_en
101
  FROM ' . my_calendar_event_table( $site ) . '
102
  JOIN ' . my_calendar_table( $site ) . ' AS e
103
  ON (event_id=occur_event_id)
104
- JOIN ' . my_calendar_categories_table( $site ) . "
105
  ON (event_category=category_id)
106
  $join
107
  WHERE $select_published $select_category $select_location $select_author $select_host $select_access $search
@@ -302,7 +302,7 @@ function mc_get_rss_events( $cat_id = false ) {
302
  'SELECT *, UNIX_TIMESTAMP(occur_begin) AS ts_occur_begin, UNIX_TIMESTAMP(occur_end) AS ts_occur_end
303
  FROM ' . my_calendar_event_table() . '
304
  JOIN ' . my_calendar_table() . ' ON (event_id=occur_event_id)
305
- JOIN ' . my_calendar_categories_table() . " ON (event_category=category_id) $cat
306
  $exclude_categories
307
  ORDER BY event_added DESC LIMIT 0,$limit" );
308
  $groups = array();
46
  $from = isset( $args['from'] ) ? $args['from'] : '';
47
  $to = isset( $args['to'] ) ? $args['to'] : '';
48
  $category = isset( $args['category'] ) ? $args['category'] : 'all';
49
+ $ltype = isset( $args['ltype'] ) ? $args['ltype'] : 'all';
50
  $lvalue = isset( $args['lvalue'] ) ? $args['lvalue'] : 'all';
51
  $source = isset( $args['source'] ) ? $args['source'] : 'calendar';
52
  $author = isset( $args['author'] ) ? $args['author'] : 'all';
101
  FROM ' . my_calendar_event_table( $site ) . '
102
  JOIN ' . my_calendar_table( $site ) . ' AS e
103
  ON (event_id=occur_event_id)
104
+ JOIN ' . my_calendar_categories_table( $site ) . " AS c
105
  ON (event_category=category_id)
106
  $join
107
  WHERE $select_published $select_category $select_location $select_author $select_host $select_access $search
302
  'SELECT *, UNIX_TIMESTAMP(occur_begin) AS ts_occur_begin, UNIX_TIMESTAMP(occur_end) AS ts_occur_end
303
  FROM ' . my_calendar_event_table() . '
304
  JOIN ' . my_calendar_table() . ' ON (event_id=occur_event_id)
305
+ JOIN ' . my_calendar_categories_table() . " AS c ON (event_category=category_id) $cat
306
  $exclude_categories
307
  ORDER BY event_added DESC LIMIT 0,$limit" );
308
  $groups = array();
my-calendar-install.php CHANGED
@@ -229,8 +229,8 @@ function mc_default_settings() {
229
  foreach ( $globals as $key => $global ) {
230
  ${$key} = $global;
231
  }
 
232
  add_option( 'mc_display_author', 'false' );
233
- add_option( 'mc_version', $mc_version );
234
  add_option( 'mc_use_styles', 'false' );
235
  add_option( 'mc_show_months', 1 );
236
  add_option( 'mc_show_map', 'false' );
@@ -306,7 +306,7 @@ function mc_default_settings() {
306
  $has_uri = mc_guess_calendar();
307
  if ( false == $has_uri['response'] ) {
308
  // if mc_guess_calendar returns a string, no valid URI was found.
309
- $slug = sanitize_title( __( 'my-calendar', 'my-calendar' ) );
310
  mc_generate_calendar_page( $slug );
311
  }
312
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
@@ -561,36 +561,19 @@ function mc_transition_categories() {
561
  * @return boolean.
562
  */
563
  function my_calendar_copyr( $source, $dest ) {
564
- // Sanity check.
 
 
 
565
  if ( ! file_exists( $source ) ) {
566
  return false;
567
  }
568
- // Check for symlinks.
569
- if ( is_link( $source ) ) {
570
- return symlink( readlink( $source ), $dest );
571
- }
572
- // Simple copy for a file.
573
- if ( is_file( $source ) ) {
574
- return copy( $source, $dest );
575
- }
576
- // Make destination directory.
577
  if ( ! is_dir( $dest ) ) {
578
- mkdir( $dest );
579
- }
580
- // Loop through the folder.
581
- $dir = dir( $source );
582
- $entry = $dir->read();
583
- while ( false !== $entry ) {
584
- // Skip pointers.
585
- if ( '.' == $entry || '..' == $entry ) {
586
- continue;
587
- }
588
- // Deep copy directories.
589
- my_calendar_copyr( "$source/$entry", "$dest/$entry" );
590
- $entry = $dir->read;
591
  }
592
- // Clean up.
593
- $dir->close();
594
 
595
  return true;
596
  }
@@ -611,20 +594,15 @@ function my_calendar_rmdirr( $dirname ) {
611
  if ( is_file( $dirname ) ) {
612
  return unlink( $dirname );
613
  }
614
- // Loop through the folder.
615
- $dir = dir( $dirname );
616
- $entry = $dir->read();
617
- while ( false !== $entry ) {
618
- // Skip pointers.
619
- if ( '.' == $entry || '..' == $entry ) {
620
- continue;
621
  }
622
- // Recurse.
623
- my_calendar_rmdirr( "$dirname/$entry" );
624
- $entry = $dir->read();
625
  }
626
- // Clean up.
627
- $dir->close();
628
 
629
  return rmdir( $dirname );
630
  }
229
  foreach ( $globals as $key => $global ) {
230
  ${$key} = $global;
231
  }
232
+
233
  add_option( 'mc_display_author', 'false' );
 
234
  add_option( 'mc_use_styles', 'false' );
235
  add_option( 'mc_show_months', 1 );
236
  add_option( 'mc_show_map', 'false' );
306
  $has_uri = mc_guess_calendar();
307
  if ( false == $has_uri['response'] ) {
308
  // if mc_guess_calendar returns a string, no valid URI was found.
309
+ $slug = sanitize_title( __( 'My Calendar', 'my-calendar' ) );
310
  mc_generate_calendar_page( $slug );
311
  }
312
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
561
  * @return boolean.
562
  */
563
  function my_calendar_copyr( $source, $dest ) {
564
+ if ( ! WP_Filesystem() ) {
565
+ exit;
566
+ }
567
+ global $wp_filesystem;
568
  if ( ! file_exists( $source ) ) {
569
  return false;
570
  }
571
+
 
 
 
 
 
 
 
 
572
  if ( ! is_dir( $dest ) ) {
573
+ $wp_filesystem->mkdir( $dest );
 
 
 
 
 
 
 
 
 
 
 
 
574
  }
575
+ // Copy directory into backup location.
576
+ copy_dir( $source, $dest );
577
 
578
  return true;
579
  }
594
  if ( is_file( $dirname ) ) {
595
  return unlink( $dirname );
596
  }
597
+ // List files for deletion.
598
+ $files = list_files( $dirname, 2 );
599
+ foreach ( $files as $file ) {
600
+ if ( is_dir( $file ) ) {
601
+ rmdir( $file );
602
+ } elseif ( is_file( $file ) ) {
603
+ unlink( $file );
604
  }
 
 
 
605
  }
 
 
606
 
607
  return rmdir( $dirname );
608
  }
my-calendar-limits.php CHANGED
@@ -95,10 +95,11 @@ function mc_category_select_ids( $category ) {
95
  }
96
  $numcat = count( $categories );
97
  foreach ( $categories as $key ) {
 
98
  if ( is_numeric( $key ) ) {
99
  $add = (int) $key;
100
  } else {
101
- $key = esc_sql( trim( $key ) );
102
  $cat = $mcdb->get_row( 'SELECT category_id FROM ' . my_calendar_categories_table() . " WHERE category_name = '$key'" );
103
  if ( is_object( $cat ) ) {
104
  $add = $cat->category_id;
@@ -107,6 +108,7 @@ function mc_category_select_ids( $category ) {
107
  $select[] = $add;
108
  }
109
  } else {
 
110
  if ( is_numeric( $category ) ) {
111
  $select[] = absint( $category );
112
  } else {
@@ -166,10 +168,10 @@ function mc_author_select_ids( $author ) {
166
  $authors = explode( ',', $author );
167
  }
168
  foreach ( $authors as $key ) {
 
169
  if ( is_numeric( $key ) ) {
170
  $add = absint( $key );
171
  } else {
172
- $key = trim( $key );
173
  $author = get_user_by( 'login', $key ); // Get author by username.
174
  $add = $author->ID;
175
  }
@@ -250,6 +252,7 @@ function mc_select_location( $ltype = '', $lvalue = '' ) {
250
  }
251
  if ( in_array( $location_type, array( 'event_label', 'event_city', 'event_state', 'event_postcode', 'event_country', 'event_region', 'event_location', 'event_street', 'event_street2', 'event_url', 'event_longitude', 'event_latitude', 'event_zoom', 'event_phone', 'event_phone2' ) ) ) {
252
  if ( 'all' != $current_location && '' != $current_location ) {
 
253
  if ( is_numeric( $current_location ) ) {
254
  $limit_string = 'AND ' . $location_type . ' = ' . absint( $current_location );
255
  } else {
95
  }
96
  $numcat = count( $categories );
97
  foreach ( $categories as $key ) {
98
+ $key = trim( $key );
99
  if ( is_numeric( $key ) ) {
100
  $add = (int) $key;
101
  } else {
102
+ $key = esc_sql( $key );
103
  $cat = $mcdb->get_row( 'SELECT category_id FROM ' . my_calendar_categories_table() . " WHERE category_name = '$key'" );
104
  if ( is_object( $cat ) ) {
105
  $add = $cat->category_id;
108
  $select[] = $add;
109
  }
110
  } else {
111
+ $category = trim( $category );
112
  if ( is_numeric( $category ) ) {
113
  $select[] = absint( $category );
114
  } else {
168
  $authors = explode( ',', $author );
169
  }
170
  foreach ( $authors as $key ) {
171
+ $key = trim( $key );
172
  if ( is_numeric( $key ) ) {
173
  $add = absint( $key );
174
  } else {
 
175
  $author = get_user_by( 'login', $key ); // Get author by username.
176
  $add = $author->ID;
177
  }
252
  }
253
  if ( in_array( $location_type, array( 'event_label', 'event_city', 'event_state', 'event_postcode', 'event_country', 'event_region', 'event_location', 'event_street', 'event_street2', 'event_url', 'event_longitude', 'event_latitude', 'event_zoom', 'event_phone', 'event_phone2' ) ) ) {
254
  if ( 'all' != $current_location && '' != $current_location ) {
255
+ $current_location = trim( $current_location );
256
  if ( is_numeric( $current_location ) ) {
257
  $limit_string = 'AND ' . $location_type . ' = ' . absint( $current_location );
258
  } else {
my-calendar-output.php CHANGED
@@ -518,7 +518,7 @@ function mc_get_event_image( $event, $data ) {
518
  $image = ( '' != $event->event_image ) ? "<img src='$event->event_image' alt='$alt' class='mc-image photo' />" : '';
519
  }
520
 
521
- $meta = ( $image ) ? "<meta itemprop='image' content='$image_url'/>" : '';
522
 
523
  return $meta . $image;
524
  }
@@ -980,8 +980,8 @@ function mc_list_title( $events ) {
980
  $now = $events[0];
981
  $count = count( $events ) - 1;
982
  $event_title = strip_tags( stripcslashes( $now->event_title ), mc_strip_tags() );
983
- if ( 0 == $count ) {
984
- $cstate = '';
985
  } elseif ( 1 == $count ) {
986
  // Translators: %s Title of event.
987
  $cstate = sprintf( __( '%s<span class="mc-list-extended"> and 1 other event</span>', 'my-calendar' ), $event_title );
@@ -1467,7 +1467,7 @@ function my_calendar( $args ) {
1467
  $caption_text = ' ' . stripslashes( trim( get_option( 'mc_caption' ) ) );
1468
  $week_format = ( ! get_option( 'mc_week_format' ) ) ? 'M j, \'y' : get_option( 'mc_week_format' );
1469
  $week_template = ( get_option( 'mc_week_caption' ) != '' ) ? get_option( 'mc_week_caption' ) : 'Week of {date format="M jS"}';
1470
- $day_uri = get_option( 'mc_open_day_uri' );
1471
  $list_info = get_option( 'mc_show_list_info' );
1472
  $list_events = get_option( 'mc_show_list_events' );
1473
 
@@ -1677,7 +1677,7 @@ function my_calendar( $args ) {
1677
  $events_class = mc_events_class( $events, $date_is );
1678
  $monthclass = ( date( 'n', $start ) == $date['month'] || 'month' != $params['time'] ) ? '' : 'nextmonth';
1679
  $dateclass = mc_dateclass( $start );
1680
- $ariacurrent = ( 'current-day' == $dateclass ) ? ' aria-current="date"' : '';
1681
 
1682
  $td = apply_filters( 'mc_grid_day_wrapper', 'td', $params['format'] );
1683
  if ( ! $week_number_shown ) {
@@ -2251,7 +2251,7 @@ function mc_category_key( $category ) {
2251
  }
2252
  $key = '';
2253
  $cat_limit = mc_select_category( $category, 'all', 'category' );
2254
- $select_category = ( isset( $cat_limit[1] ) ) ? $cat_limit[1] : '';
2255
 
2256
  $sql = 'SELECT * FROM ' . my_calendar_categories_table() . " $select_category ORDER BY category_name ASC";
2257
  $categories = $mcdb->get_results( $sql );
518
  $image = ( '' != $event->event_image ) ? "<img src='$event->event_image' alt='$alt' class='mc-image photo' />" : '';
519
  }
520
 
521
+ $meta = ( $image ) ? "<meta itemprop='image' content='$image_url' />" : '';
522
 
523
  return $meta . $image;
524
  }
980
  $now = $events[0];
981
  $count = count( $events ) - 1;
982
  $event_title = strip_tags( stripcslashes( $now->event_title ), mc_strip_tags() );
983
+ if ( 0 === $count ) {
984
+ $cstate = $event_title;
985
  } elseif ( 1 == $count ) {
986
  // Translators: %s Title of event.
987
  $cstate = sprintf( __( '%s<span class="mc-list-extended"> and 1 other event</span>', 'my-calendar' ), $event_title );
1467
  $caption_text = ' ' . stripslashes( trim( get_option( 'mc_caption' ) ) );
1468
  $week_format = ( ! get_option( 'mc_week_format' ) ) ? 'M j, \'y' : get_option( 'mc_week_format' );
1469
  $week_template = ( get_option( 'mc_week_caption' ) != '' ) ? get_option( 'mc_week_caption' ) : 'Week of {date format="M jS"}';
1470
+ $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.
1471
  $list_info = get_option( 'mc_show_list_info' );
1472
  $list_events = get_option( 'mc_show_list_events' );
1473
 
1677
  $events_class = mc_events_class( $events, $date_is );
1678
  $monthclass = ( date( 'n', $start ) == $date['month'] || 'month' != $params['time'] ) ? '' : 'nextmonth';
1679
  $dateclass = mc_dateclass( $start );
1680
+ $ariacurrent = ( false !== strpos( $dateclass, 'current-day' ) ) ? ' aria-current="date"' : '';
1681
 
1682
  $td = apply_filters( 'mc_grid_day_wrapper', 'td', $params['format'] );
1683
  if ( ! $week_number_shown ) {
2251
  }
2252
  $key = '';
2253
  $cat_limit = mc_select_category( $category, 'all', 'category' );
2254
+ $select_category = str_replace( 'AND', 'WHERE', ( isset( $cat_limit[1] ) ) ? $cat_limit[1] : '' );
2255
 
2256
  $sql = 'SELECT * FROM ' . my_calendar_categories_table() . " $select_category ORDER BY category_name ASC";
2257
  $categories = $mcdb->get_results( $sql );
my-calendar-settings.php CHANGED
@@ -553,7 +553,7 @@ function mc_remote_db() {
553
  '1' => __( 'Currently editing the network calendar', 'my-calendar' ),
554
  ), '0', '', array(), 'radio' );
555
  } else {
556
- if ( get_option( 'mc_remote' ) != 'true' && current_user_can( 'manage_network' ) && is_multisite() ) {
557
  ?>
558
  <li><?php _e( 'You are currently working in the primary site for this network; your local calendar is also the global table.', 'my-calendar' ); ?></li>
559
  <?php
@@ -612,7 +612,6 @@ function mc_remote_db() {
612
  $date_format = ( '' == get_option( 'mc_date_format' ) ) ? date_i18n( get_option( 'date_format' ) ) : date_i18n( get_option( 'mc_date_format' ) );
613
  $tomorrow = date( 'j' ) + 1;
614
  $multi_format = ( '' == get_option( 'mc_multidate_format' ) ) ? date_i18n( str_replace( '%d', $tomorrow, 'F j-%d, Y' ) ) : date_i18n( str_replace( '%j', $tomorrow, get_option( 'mc_multidate_format' ) ) );
615
- echo $multi_format;
616
  ?>
617
  <li><?php mc_settings_field( 'mc_month_format', __( 'Month format (calendar headings)', 'my-calendar' ), '', $month_format ); ?></li>
618
  <li><?php mc_settings_field( 'mc_time_format', __( 'Time format', 'my-calendar' ), '', $time_format ); ?></li>
@@ -655,6 +654,10 @@ function mc_remote_db() {
655
  <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>
656
  <?php
657
  $disabled = ( ! get_option( 'mc_uri' ) && ! get_option( 'mc_mini_uri' ) ) ? array( 'disabled' => 'disabled' ) : array();
 
 
 
 
658
  ?>
659
  <li>
660
  <?php
553
  '1' => __( 'Currently editing the network calendar', 'my-calendar' ),
554
  ), '0', '', array(), 'radio' );
555
  } else {
556
+ if ( get_option( 'mc_remote' ) != 'true' && current_user_can( 'manage_network' ) && is_multisite() && is_main_site() ) {
557
  ?>
558
  <li><?php _e( 'You are currently working in the primary site for this network; your local calendar is also the global table.', 'my-calendar' ); ?></li>
559
  <?php
612
  $date_format = ( '' == get_option( 'mc_date_format' ) ) ? date_i18n( get_option( 'date_format' ) ) : date_i18n( get_option( 'mc_date_format' ) );
613
  $tomorrow = date( 'j' ) + 1;
614
  $multi_format = ( '' == get_option( 'mc_multidate_format' ) ) ? date_i18n( str_replace( '%d', $tomorrow, 'F j-%d, Y' ) ) : date_i18n( str_replace( '%j', $tomorrow, get_option( 'mc_multidate_format' ) ) );
 
615
  ?>
616
  <li><?php mc_settings_field( 'mc_month_format', __( 'Month format (calendar headings)', 'my-calendar' ), '', $month_format ); ?></li>
617
  <li><?php mc_settings_field( 'mc_time_format', __( 'Time format', 'my-calendar' ), '', $time_format ); ?></li>
654
  <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>
655
  <?php
656
  $disabled = ( ! get_option( 'mc_uri' ) && ! get_option( 'mc_mini_uri' ) ) ? array( 'disabled' => 'disabled' ) : array();
657
+ if ( ! empty( $disabled ) ) {
658
+ // Ensure that this option is set to a valid value if no URI configured.
659
+ update_option( 'mc_open_day_uri', 'false' );
660
+ }
661
  ?>
662
  <li>
663
  <?php
my-calendar-shortcodes.php CHANGED
@@ -155,7 +155,7 @@ function my_calendar_locations( $atts ) {
155
  'target_url' => '',
156
  ), $atts, 'my_calendar_locations' );
157
 
158
- return my_calendar_locations_list( $args['show'], $args['datatype'], $args['target_url'] );
159
  }
160
 
161
  /**
155
  'target_url' => '',
156
  ), $atts, 'my_calendar_locations' );
157
 
158
+ return my_calendar_locations_list( $args['show'], $args['datatype'], 'single', $args['target_url'] );
159
  }
160
 
161
  /**
my-calendar-styles.php CHANGED
@@ -345,6 +345,9 @@ function mc_default_style( $filename = false, $return = 'content' ) {
345
  * @return array list of CSS files
346
  */
347
  function mc_css_list( $directory ) {
 
 
 
348
  $results = array();
349
  $handler = opendir( $directory );
350
  // Keep going until all files in directory have been read.
345
  * @return array list of CSS files
346
  */
347
  function mc_css_list( $directory ) {
348
+ if ( ! file_exists( $directory ) ) {
349
+ return array();
350
+ }
351
  $results = array();
352
  $handler = opendir( $directory );
353
  // Keep going until all files in directory have been read.
my-calendar-templating.php CHANGED
@@ -303,7 +303,7 @@ function mc_get_custom_template( $key ) {
303
  */
304
  function mc_key_exists( $key ) {
305
  // Keys are md5 hashed, so should always be 32 chars.
306
- if ( 25 != strlen( $key ) ) {
307
  return false;
308
  }
309
 
303
  */
304
  function mc_key_exists( $key ) {
305
  // Keys are md5 hashed, so should always be 32 chars.
306
+ if ( 32 != strlen( $key ) ) {
307
  return false;
308
  }
309
 
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.0.0
21
  */
22
 
23
  /*
@@ -42,7 +42,7 @@ if ( ! defined( 'ABSPATH' ) ) {
42
  }
43
 
44
  global $mc_version, $wpdb;
45
- $mc_version = '3.0.0';
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.0.9
21
  */
22
 
23
  /*
42
  }
43
 
44
  global $mc_version, $wpdb;
45
+ $mc_version = '3.0.9';
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: 4.9
7
  Requires PHP: 5.3
8
- Stable tag: 3.0.0
9
  Text domain: my-calendar
10
  License: GPLv2 or later
11
 
@@ -83,6 +83,55 @@ Translating my plug-ins is always appreciated. Visit <a href="https://translate.
83
 
84
  == Changelog ==
85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  = 3.0.0 =
87
 
88
  * Bug fix: If category deleted, set events with that category to default cat, not cat ID 1.
@@ -971,17 +1020,15 @@ The search feature in My Calendar is pretty basic; but buying My Calendar Pro gi
971
 
972
  == Screenshots ==
973
 
974
- 1. Calendar using calendar list format.
975
- 2. Calendar using monthly calendar format.
976
  3. Event management page
977
  4. Category management page
978
  5. Settings page
979
  6. Location management
980
  7. Style editing
981
- 8. Mini calendar
982
- 9. Script/behavior editing
983
- 10. Template editing
984
 
985
  == Upgrade Notice ==
986
 
987
- * 2.5.0 Major update! New features, many bug fixes and improvements.
5
  Requires at least: 4.4
6
  Tested up to: 4.9
7
  Requires PHP: 5.3
8
+ Stable tag: 3.0.9
9
  Text domain: my-calendar
10
  License: GPLv2 or later
11
 
83
 
84
  == Changelog ==
85
 
86
+ = 3.0.9 =
87
+
88
+ * Bug fix: Error thrown if Akismet had previously been configured, then deleted.
89
+ * Bug fix: location type was added to params if category key was set.
90
+ * Bug fix: remove a couple notices
91
+ * Bug fix: category relationships not carried over when recurring events split
92
+
93
+ = 3.0.8 =
94
+
95
+ * Bug fix: need to allow <a> elements in mc_strip_tags so calendar linkscan point to non-calendar URLs
96
+
97
+ = 3.0.7 =
98
+
99
+ * Bug fix: Case where events ending at midnight (AM) of current day were displayed
100
+ * Bug fix: trim spaces from values earlier when parsing filter elements
101
+ * Change: don't declare font-family in older stylesheets.
102
+
103
+ = 3.0.6 =
104
+
105
+ * Bug fix: Shortcode for locations forms always rendered as if in a group filter.
106
+ * Bug fix: If the default length 1 hr event pushes into next day, adjust length.
107
+ * Bug fix: Incorrectly nested parentheses caused math error in months-by-day recurrence
108
+
109
+ = 3.0.5 =
110
+
111
+ * Bug fix: If only one event on a day, event title did not show in list view with show title option.
112
+ * Bug fix: Incorrect array key for fallback parameter in widget
113
+ * Bug fix: custom template query expected 25 chars instead of 32
114
+ * Re-allow <br> in event titles.
115
+
116
+ = 3.0.4 =
117
+
118
+ * Bug fix: aria-current test was broken for current date
119
+ * Bug fix: Private categories not disambiguated in MySQL query when excluded
120
+ * Improve: Rewrite my_calendar_copyr backup functions to use WP core functions.
121
+
122
+ = 3.0.3 =
123
+
124
+ * Bug fix: Category key needed to use a 'WHERE' not an 'AND'; broke output if limiting by category
125
+ * Bug fix: Error thrown in style editor & category editor if custom directory did not exist
126
+
127
+ = 3.0.2 =
128
+
129
+ * 3.0.1 did not correct the right error. Correct fix.
130
+
131
+ = 3.0.1 =
132
+
133
+ * Bug fix: install error on update.
134
+
135
  = 3.0.0 =
136
 
137
  * Bug fix: If category deleted, set events with that category to default cat, not cat ID 1.
1020
 
1021
  == Screenshots ==
1022
 
1023
+ 1. Monthly Grid View
1024
+ 2. List View
1025
  3. Event management page
1026
  4. Category management page
1027
  5. Settings page
1028
  6. Location management
1029
  7. Style editing
1030
+ 8. Template editing
 
 
1031
 
1032
  == Upgrade Notice ==
1033
 
1034
+ * 3.0.0 Major update! New features, many bug fixes and improvements.
styles/dark.css CHANGED
@@ -394,7 +394,7 @@
394
  }
395
 
396
  .mc-main.mini .day-with-date span, .mc-main.mini .day-with-date a {
397
- font: .9em Arial, Verdana, sans-serif;
398
  padding: 1px;
399
  color: #fff;
400
  text-align: center;
394
  }
395
 
396
  .mc-main.mini .day-with-date span, .mc-main.mini .day-with-date a {
397
+ font-size: .9em;
398
  padding: 1px;
399
  color: #fff;
400
  text-align: center;
styles/inherit.css CHANGED
@@ -272,7 +272,7 @@
272
  }
273
 
274
  .mc-main.mini .day-with-date span, .mc-main.mini .day-with-date a {
275
- font: .9em Arial, Verdana, sans-serif;
276
  padding: 1px;
277
  text-align: center;
278
  }
272
  }
273
 
274
  .mc-main.mini .day-with-date span, .mc-main.mini .day-with-date a {
275
+ font-size: .9em;
276
  padding: 1px;
277
  text-align: center;
278
  }
styles/light.css CHANGED
@@ -350,7 +350,7 @@
350
  }
351
 
352
  .mc-main.mini .day-with-date span, .mc-main.mini .day-with-date a {
353
- font: .9em Arial, Verdana, sans-serif;
354
  padding: 1px;
355
  text-align: center;
356
  }
350
  }
351
 
352
  .mc-main.mini .day-with-date span, .mc-main.mini .day-with-date a {
353
+ font-size: .9em;
354
  padding: 1px;
355
  text-align: center;
356
  }
styles/my-calendar.css CHANGED
@@ -373,7 +373,6 @@
373
  }
374
 
375
  .mc-main.mini .day-with-date span, .mc-main.mini .day-with-date a {
376
- font-family: Arial, Verdana, sans-serif;
377
  font-size: .9em;
378
  padding: 1px;
379
  text-align: center;
373
  }
374
 
375
  .mc-main.mini .day-with-date span, .mc-main.mini .day-with-date a {
 
376
  font-size: .9em;
377
  padding: 1px;
378
  text-align: center;
styles/refresh.css CHANGED
@@ -404,7 +404,6 @@
404
  }
405
 
406
  .mc-main.mini .day-with-date span, .mc-main.mini .day-with-date a, .mc-main.mini .current-day span, .mc-main.mini .current-day a {
407
- font-family: Arial, sans-serif;
408
  font-size: .9em;
409
  padding: 1px;
410
  text-align: center;
404
  }
405
 
406
  .mc-main.mini .day-with-date span, .mc-main.mini .day-with-date a, .mc-main.mini .current-day span, .mc-main.mini .current-day a {
 
407
  font-size: .9em;
408
  padding: 1px;
409
  text-align: center;