My Calendar - Version 3.1.3

Version Description

  • New filter: 'mc_list_titles_separator'
  • Bug fix: Help support data not displayed.
  • Override content overflow in Twentynineteen
  • Add support for iCal format in API exports
Download this release

Release Info

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

Code changes from version 3.1.1 to 3.1.3

css/reset.css CHANGED
@@ -8,6 +8,11 @@
8
  padding: 0;
9
  }
10
 
 
 
 
 
 
11
  .mc-main {
12
  line-height: 1;
13
  }
@@ -16,6 +21,10 @@
16
  display: block;
17
  }
18
 
 
 
 
 
19
  .mc-main nav ul {
20
  list-style: none;
21
  }
8
  padding: 0;
9
  }
10
 
11
+ /* Override overflow:hidden */
12
+ div.site-content {
13
+ overflow: visible;
14
+ }
15
+
16
  .mc-main {
17
  line-height: 1;
18
  }
21
  display: block;
22
  }
23
 
24
+ .mc-main h2:before {
25
+ display: none;
26
+ }
27
+
28
  .mc-main nav ul {
29
  list-style: none;
30
  }
includes/kses.php CHANGED
@@ -41,28 +41,42 @@ add_filter( 'wp_kses_allowed_html', 'mc_allowed_tags', 10, 2 );
41
  function mc_allowed_tags( $tags, $context ) {
42
  if ( 'mycalendar' == $context ) {
43
  global $allowedposttags;
44
- $tags = $allowedposttags;
45
- $tags['input'] = array(
46
- 'type' => true,
47
- 'value' => true,
48
- 'name' => true,
49
- 'class' => true,
50
- 'aria-labelledby' => true,
51
- 'aria-describedby' => true,
52
- 'disabled' => true,
53
- 'readonly' => true,
54
- 'min' => true,
55
- 'max' => true,
56
- 'id' => true,
57
- 'checked' => true,
58
- 'required' => true,
59
- );
60
 
61
- $tags['select'] = array(
62
- 'name' => true,
63
- 'id' => true,
64
- 'class' => true,
65
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
 
67
  $tags['span'] = array_merge(
68
  $tags['span'],
@@ -83,17 +97,6 @@ function mc_allowed_tags( $tags, $context ) {
83
  )
84
  );
85
 
86
- $tags['form'] = array_merge(
87
- $tags['form'],
88
- array(
89
- 'action' => true,
90
- 'method' => true,
91
- 'class' => true,
92
- 'id' => true,
93
- 'tabindex' => true,
94
- )
95
- );
96
-
97
  $tags['div'] = array_merge(
98
  $tags['div'],
99
  array(
@@ -138,6 +141,7 @@ function mc_allowed_tags( $tags, $context ) {
138
  'aria-describedby' => true,
139
  'href' => true,
140
  'class' => true,
 
141
  );
142
  }
143
 
41
  function mc_allowed_tags( $tags, $context ) {
42
  if ( 'mycalendar' == $context ) {
43
  global $allowedposttags;
44
+ $tags = $allowedposttags;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
+ if ( current_user_can( 'unfiltered_html' ) ) {
47
+ $tags['input'] = array(
48
+ 'type' => true,
49
+ 'value' => true,
50
+ 'name' => true,
51
+ 'class' => true,
52
+ 'aria-labelledby' => true,
53
+ 'aria-describedby' => true,
54
+ 'disabled' => true,
55
+ 'readonly' => true,
56
+ 'min' => true,
57
+ 'max' => true,
58
+ 'id' => true,
59
+ 'checked' => true,
60
+ 'required' => true,
61
+ );
62
+
63
+ $tags['select'] = array(
64
+ 'name' => true,
65
+ 'id' => true,
66
+ 'class' => true,
67
+ );
68
+
69
+ $formtags = ( isset( $tags['form'] ) && is_array( $tags['form'] ) ) ? $tags['form'] : array();
70
+ $tags['form'] = array_merge(
71
+ $formtags,
72
+ array(
73
+ 'action' => true,
74
+ 'method' => true,
75
+ 'class' => true,
76
+ 'id' => true,
77
+ )
78
+ );
79
+ }
80
 
81
  $tags['span'] = array_merge(
82
  $tags['span'],
97
  )
98
  );
99
 
 
 
 
 
 
 
 
 
 
 
 
100
  $tags['div'] = array_merge(
101
  $tags['div'],
102
  array(
141
  'aria-describedby' => true,
142
  'href' => true,
143
  'class' => true,
144
+ 'target' => true,
145
  );
146
  }
147
 
js/mcjs.js CHANGED
@@ -1 +1,9 @@
1
- (function ($) { 'use strict'; $(function () { $( '.mc-main' ).removeClass( 'mcjs' ); });}(jQuery));
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+ 'use strict';
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));
my-calendar-api.php CHANGED
@@ -72,6 +72,9 @@ function mc_format_api( $data, $format ) {
72
  case 'csv':
73
  mc_api_format_csv( $data );
74
  break;
 
 
 
75
  }
76
  }
77
 
@@ -351,46 +354,9 @@ function mc_ics_subscribe( $source ) {
351
  } else {
352
  $cat_id = false;
353
  }
 
354
 
355
- $events = mc_get_rss_events( $cat_id );
356
- $templates = mc_ical_template();
357
- $template = apply_filters( 'mc_filter_ical_template', $templates['template'] );
358
-
359
- if ( is_array( $events ) && ! empty( $events ) ) {
360
- foreach ( $events as $date ) {
361
- foreach ( array_keys( $date ) as $key ) {
362
- $event =& $date[ $key ];
363
- if ( is_object( $event ) ) {
364
- if ( ! mc_private_event( $event ) ) {
365
- $array = mc_create_tags( $event, $source );
366
-
367
- $alarm = apply_filters( 'mc_event_has_alarm', array(), $event->event_id, $array['post'] );
368
- $alert = '';
369
- if ( ! empty( $alarm ) ) {
370
- $alert = mc_generate_alert_ical( $alarm );
371
- }
372
- $all_day = '';
373
- if ( mc_is_all_day( $event ) ) {
374
- $all_day = PHP_EOL . 'X-FUNAMBOL-ALLDAY: 1' . PHP_EOL . 'X-MICROSOFT-CDO-ALLDAYEVENT: TRUE' . PHP_EOL;
375
- }
376
- $parse = str_replace( array( '{alert}', '{all_day}' ), array( $alert, $all_day ), $template );
377
-
378
- $output .= "\n" . mc_draw_template( $array, $parse, 'ical' );
379
- }
380
- }
381
- }
382
- }
383
- }
384
- $output = html_entity_decode( preg_replace( '~(?<!\r)\n~', "\r\n", $templates['head'] . $output . $templates['foot'] ) );
385
- if ( ! ( isset( $_GET['sync'] ) && 'true' == $_GET['sync'] ) ) {
386
- $sitename = sanitize_title( get_bloginfo( 'name' ) );
387
- header( 'Content-Type: text/calendar; charset=UTF-8' );
388
- header( 'Pragma: no-cache' );
389
- header( 'Expires: 0' );
390
- header( "Content-Disposition: inline; filename=my-calendar-$sitename-$source.ics" );
391
- }
392
-
393
- echo $output;
394
  }
395
 
396
  /**
@@ -430,9 +396,6 @@ function my_calendar_ical() {
430
  $to = apply_filters( 'mc_ical_download_to', $to, $p );
431
  $category = ( isset( $_GET['mcat'] ) ) ? intval( $_GET['mcal'] ) : null;
432
 
433
- $templates = mc_ical_template();
434
- $template = apply_filters( 'mc_filter_ical_template', $templates['template'] );
435
-
436
  $site = ( ! isset( $_GET['site'] ) ) ? get_current_blog_id() : intval( $_GET['site'] );
437
  $args = array(
438
  'from' => $from,
@@ -454,8 +417,20 @@ function my_calendar_ical() {
454
  } else {
455
  $data = my_calendar_events( $args );
456
  }
457
- $events = mc_flatten_array( $data );
458
 
 
 
 
 
 
 
 
 
 
 
 
 
 
459
  if ( is_array( $events ) && ! empty( $events ) ) {
460
  foreach ( array_keys( $events ) as $key ) {
461
  $event =& $events[ $key ];
@@ -468,7 +443,7 @@ function my_calendar_ical() {
468
  $alert = mc_generate_alert_ical( $alarm );
469
  }
470
  $all_day = '';
471
- if ( 1 == $event->event_allday ) {
472
  $all_day = PHP_EOL . 'X-FUNAMBOL-ALLDAY: 1' . PHP_EOL . 'X-MICROSOFT-CDO-ALLDAYEVENT: TRUE' . PHP_EOL;
473
  }
474
  $parse = str_replace( array( '{alert}', '{all_day}' ), array( $alert, $all_day ), $template );
@@ -478,7 +453,6 @@ function my_calendar_ical() {
478
  }
479
  }
480
  }
481
-
482
  $output = html_entity_decode( preg_replace( "~(?<!\r)\n~", "\r\n", $templates['head'] . $output . $templates['foot'] ) );
483
  if ( ! ( isset( $_GET['sync'] ) && 'true' == $_GET['sync'] ) ) {
484
  $sitename = sanitize_title( get_bloginfo( 'name' ) );
72
  case 'csv':
73
  mc_api_format_csv( $data );
74
  break;
75
+ case 'ical':
76
+ mc_api_format_ical( $data );
77
+ break;
78
  }
79
  }
80
 
354
  } else {
355
  $cat_id = false;
356
  }
357
+ $events = mc_get_rss_events( $cat_id );
358
 
359
+ mc_api_format_ical( $events );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
360
  }
361
 
362
  /**
396
  $to = apply_filters( 'mc_ical_download_to', $to, $p );
397
  $category = ( isset( $_GET['mcat'] ) ) ? intval( $_GET['mcal'] ) : null;
398
 
 
 
 
399
  $site = ( ! isset( $_GET['site'] ) ) ? get_current_blog_id() : intval( $_GET['site'] );
400
  $args = array(
401
  'from' => $from,
417
  } else {
418
  $data = my_calendar_events( $args );
419
  }
 
420
 
421
+ mc_api_format_ical( $data );
422
+ }
423
+
424
+ /**
425
+ * Output iCal formatted events
426
+ *
427
+ * @param array $data array of event objects.
428
+ */
429
+ function mc_api_format_ical( $data ) {
430
+ $templates = mc_ical_template();
431
+ $template = apply_filters( 'mc_filter_ical_template', $templates['template'] );
432
+ $events = mc_flatten_array( $data );
433
+ $output = '';
434
  if ( is_array( $events ) && ! empty( $events ) ) {
435
  foreach ( array_keys( $events ) as $key ) {
436
  $event =& $events[ $key ];
443
  $alert = mc_generate_alert_ical( $alarm );
444
  }
445
  $all_day = '';
446
+ if ( mc_is_all_day( $event ) ) {
447
  $all_day = PHP_EOL . 'X-FUNAMBOL-ALLDAY: 1' . PHP_EOL . 'X-MICROSOFT-CDO-ALLDAYEVENT: TRUE' . PHP_EOL;
448
  }
449
  $parse = str_replace( array( '{alert}', '{all_day}' ), array( $alert, $all_day ), $template );
453
  }
454
  }
455
  }
 
456
  $output = html_entity_decode( preg_replace( "~(?<!\r)\n~", "\r\n", $templates['head'] . $output . $templates['foot'] ) );
457
  if ( ! ( isset( $_GET['sync'] ) && 'true' == $_GET['sync'] ) ) {
458
  $sitename = sanitize_title( get_bloginfo( 'name' ) );
my-calendar-core.php CHANGED
@@ -434,6 +434,13 @@ function mc_footer_js() {
434
  }
435
  if ( $enqueue_mcjs ) {
436
  wp_enqueue_script( 'mc.mcjs', plugins_url( 'js/mcjs.js', __FILE__ ), array( 'jquery' ) );
 
 
 
 
 
 
 
437
  }
438
  }
439
  }
@@ -1336,13 +1343,12 @@ function mc_get_support_form() {
1336
  // Pro license status.
1337
  $license = ( '' != get_option( 'mcs_license_key' ) ) ? get_option( 'mcs_license_key' ) : '';
1338
  $license_valid = get_option( 'mcs_license_key_valid' );
1339
- $checked = ( 'valid' == get_option( 'mcs_license_key_valid' ) ) ? true : false;
1340
 
1341
  if ( $license ) {
1342
  $license = "
1343
  License: $license, $license_valid";
1344
  }
1345
-
1346
  // send fields for all plugins.
1347
  $wp_version = get_bloginfo( 'version' );
1348
  $home_url = home_url();
@@ -1373,7 +1379,7 @@ function mc_get_support_form() {
1373
  $plugins_string .= "$plugin_name: $plugin_version; $plugin_uri\n";
1374
  }
1375
  }
1376
- $data = "
1377
  ================ Installation Data ====================
1378
  ==My Calendar:==
1379
  Version: $version
@@ -1404,68 +1410,70 @@ Version: $theme_version
1404
 
1405
  ==Active Plugins:==
1406
  $plugins_string
1407
- ";
1408
- $request = '';
1409
- if ( isset( $_POST['mc_support'] ) ) {
1410
- $nonce = $_REQUEST['_wpnonce'];
1411
- if ( ! wp_verify_nonce( $nonce, 'my-calendar-nonce' ) ) {
1412
- wp_die( 'Security check failed' );
1413
- }
1414
- $request = ( ! empty( $_POST['support_request'] ) ) ? stripslashes( $_POST['support_request'] ) : false;
1415
- $has_donated = ( 'on' == $_POST['has_donated'] ) ? 'Donor' : 'No donation';
1416
- $has_purchased = ( $checked ) ? 'Purchaser' : 'No purchase';
1417
- $has_read_faq = ( 'on' == $_POST['has_read_faq'] ) ? 'Read FAQ' : false;
1418
- $subject = "My Calendar support request. $has_donated; $has_purchased";
1419
- $message = $request . "\n\n" . $data;
1420
- // Get the site domain and get rid of www. from pluggable.php.
1421
- $sitename = strtolower( $_SERVER['SERVER_NAME'] );
1422
- if ( 'www.' == substr( $sitename, 0, 4 ) ) {
1423
- $sitename = substr( $sitename, 4 );
1424
- }
1425
- $from_email = 'wordpress@' . $sitename;
1426
- $from = "From: \"$current_user->username\" <$from_email>\r\nReply-to: \"$current_user->username\" <$current_user->user_email>\r\n";
1427
 
1428
- if ( ! $has_read_faq ) {
1429
- echo '<div class="message error"><p>' . __( 'Please read the FAQ and other Help documents before making a support request.', 'my-calendar' ) . '</p></div>';
1430
- } elseif ( ! $request ) {
1431
- echo '<div class="message error"><p>' . __( 'Please describe your problem in detail. I\'m not psychic.', 'my-calendar' ) . '</p></div>';
1432
- } else {
1433
- $sent = wp_mail( 'plugins@joedolson.com', $subject, $message, $from );
1434
- if ( $sent ) {
1435
- if ( 'Donor' == $has_donated || 'Purchaser' == $has_purchased ) {
1436
- mc_show_notice( __( 'Thank you for supporting the continuing development of this plug-in! I\'ll get back to you as soon as I can.', 'my-calendar' ) );
 
 
 
1437
  } else {
1438
- mc_show_notice( __( 'I\'ll get back to you as soon as I can, after dealing with any support requests from plug-in supporters.', 'my-calendar' ) . __( 'You should receive an automatic response to your request when I receive it. If you do not receive this notice, then either I did not receive your message or the email it was sent from was not a valid address.', 'my-calendar' ) );
 
1439
  }
1440
- } else {
1441
- // Translators: Support form URL.
1442
- echo '<div class="message error"><p>' . __( "Sorry! I couldn't send that message. Here's the text of your request:", 'my-calendar' ) . '</p><p>' . sprintf( __( '<a href="%s">Contact me here</a>, instead', 'my-calendar' ), 'https://www.joedolson.com/contact/get-support/' ) . "</p><pre>$request</pre></div>";
1443
  }
1444
  }
1445
- }
1446
 
1447
- echo '
1448
- <form method="post" action="' . admin_url( 'admin.php?page=my-calendar-help' ) . '">
1449
- <div><input type="hidden" name="_wpnonce" value="' . wp_create_nonce( 'my-calendar-nonce' ) . '" /></div>
1450
- <div>
1451
- <code>' . __( 'From:', 'my-calendar' ) . " \"$current_user->display_name\" &lt;$current_user->user_email&gt;</code>
1452
- </p>
1453
- <p>
1454
- <input type='checkbox' name='has_read_faq' id='has_read_faq' value='on' required='required' aria-required='true' /> <label for='has_read_faq'>" . __( 'I have read <a href="http://www.joedolson.com/my-calendar/faq/">the FAQ for this plug-in</a>.', 'my-calendar' ) . " <span>(required)</span></label>
1455
- </p>
1456
- <p>
1457
- <input type='checkbox' name='has_donated' id='has_donated' value='on' $checked /> <label for='has_donated'>" . __( 'I made a donation to help support this plug-in.', 'my-calendar' ) . "</label>
1458
- </p>
1459
- <p>
1460
- <label for='support_request'>Support Request:</label><br /><textarea name='support_request' id='support_request' required aria-required='true' cols='80' rows='10' class='widefat'>" . stripslashes( $request ) . "</textarea>
1461
- </p>
1462
- <p>
1463
- <input type='submit' value='" . __( 'Send Support Request', 'my-calendar' ) . "' name='mc_support' class='button-primary' />
1464
- </p>
1465
- <p>" . __( 'The following additional information will be sent with your support request:', 'my-calendar' ) . '</p>
1466
- <div class="mc_support">' . wpautop( $data ) . '</div>
1467
- </div>
1468
- </form>';
 
 
 
1469
  }
1470
 
1471
  add_action( 'init', 'mc_register_actions' );
434
  }
435
  if ( $enqueue_mcjs ) {
436
  wp_enqueue_script( 'mc.mcjs', plugins_url( 'js/mcjs.js', __FILE__ ), array( 'jquery' ) );
437
+ wp_localize_script(
438
+ 'mc.mcjs',
439
+ 'my_calendar',
440
+ array(
441
+ 'newWindow' => __( 'Opens in new tab', 'my-calendar' ),
442
+ )
443
+ );
444
  }
445
  }
446
  }
1343
  // Pro license status.
1344
  $license = ( '' != get_option( 'mcs_license_key' ) ) ? get_option( 'mcs_license_key' ) : '';
1345
  $license_valid = get_option( 'mcs_license_key_valid' );
1346
+ $checked = ( 'valid' == $license_valid ) ? true : false;
1347
 
1348
  if ( $license ) {
1349
  $license = "
1350
  License: $license, $license_valid";
1351
  }
 
1352
  // send fields for all plugins.
1353
  $wp_version = get_bloginfo( 'version' );
1354
  $home_url = home_url();
1379
  $plugins_string .= "$plugin_name: $plugin_version; $plugin_uri\n";
1380
  }
1381
  }
1382
+ $data = "
1383
  ================ Installation Data ====================
1384
  ==My Calendar:==
1385
  Version: $version
1410
 
1411
  ==Active Plugins:==
1412
  $plugins_string
1413
+ ";
1414
+ if ( $checked ) {
1415
+ $request = '';
1416
+ if ( isset( $_POST['mc_support'] ) ) {
1417
+ $nonce = $_REQUEST['_wpnonce'];
1418
+ if ( ! wp_verify_nonce( $nonce, 'my-calendar-nonce' ) ) {
1419
+ wp_die( 'Security check failed' );
1420
+ }
1421
+ $request = ( ! empty( $_POST['support_request'] ) ) ? stripslashes( $_POST['support_request'] ) : false;
1422
+ $has_read_faq = ( 'on' == $_POST['has_read_faq'] ) ? 'Read FAQ' : false;
1423
+ $subject = 'My Calendar Pro support request.';
1424
+ $message = $request . "\n\n" . $data;
1425
+ // Get the site domain and get rid of www. from pluggable.php.
1426
+ $sitename = strtolower( $_SERVER['SERVER_NAME'] );
1427
+ if ( 'www.' == substr( $sitename, 0, 4 ) ) {
1428
+ $sitename = substr( $sitename, 4 );
1429
+ }
1430
+ $from_email = 'wordpress@' . $sitename;
1431
+ $from = "From: \"$current_user->username\" <$from_email>\r\nReply-to: \"$current_user->username\" <$current_user->user_email>\r\n";
 
1432
 
1433
+ if ( ! $has_read_faq ) {
1434
+ echo '<div class="message error"><p>' . __( 'Please read the FAQ and other Help documents before making a support request.', 'my-calendar' ) . '</p></div>';
1435
+ } elseif ( ! $request ) {
1436
+ echo '<div class="message error"><p>' . __( 'Please describe your problem in detail. I\'m not psychic.', 'my-calendar' ) . '</p></div>';
1437
+ } else {
1438
+ $sent = wp_mail( 'plugins@joedolson.com', $subject, $message, $from );
1439
+ if ( $sent ) {
1440
+ if ( 'Donor' == $has_donated || 'Purchaser' == $has_purchased ) {
1441
+ mc_show_notice( __( 'Thank you for supporting the continuing development of this plug-in! I\'ll get back to you as soon as I can.', 'my-calendar' ) );
1442
+ } else {
1443
+ mc_show_notice( __( 'I\'ll get back to you as soon as I can, after dealing with any support requests from plug-in supporters.', 'my-calendar' ) . __( 'You should receive an automatic response to your request when I receive it. If you do not receive this notice, then either I did not receive your message or the email it was sent from was not a valid address.', 'my-calendar' ) );
1444
+ }
1445
  } else {
1446
+ // Translators: Support form URL.
1447
+ echo '<div class="message error"><p>' . __( "Sorry! I couldn't send that message. Here's the text of your request:", 'my-calendar' ) . '</p><p>' . sprintf( __( '<a href="%s">Contact me here</a>, instead', 'my-calendar' ), 'https://www.joedolson.com/contact/get-support/' ) . "</p><pre>$request</pre></div>";
1448
  }
 
 
 
1449
  }
1450
  }
 
1451
 
1452
+ echo '
1453
+ <form method="post" action="' . admin_url( 'admin.php?page=my-calendar-help' ) . '">
1454
+ <div><input type="hidden" name="_wpnonce" value="' . wp_create_nonce( 'my-calendar-nonce' ) . '" /></div>
1455
+ <div>
1456
+ <code>' . __( 'From:', 'my-calendar' ) . " \"$current_user->display_name\" &lt;$current_user->user_email&gt;</code>
1457
+ </p>
1458
+ <p>
1459
+ <input type='checkbox' name='has_read_faq' id='has_read_faq' value='on' required='required' aria-required='true' /> <label for='has_read_faq'>" . __( 'I have read <a href="http://www.joedolson.com/my-calendar/faq/">the FAQ for this plug-in</a>.', 'my-calendar' ) . " <span>(required)</span></label>
1460
+ </p>
1461
+ <p>
1462
+ <input type='checkbox' name='has_donated' id='has_donated' value='on' $checked /> <label for='has_donated'>" . __( 'I made a donation to help support this plug-in.', 'my-calendar' ) . "</label>
1463
+ </p>
1464
+ <p>
1465
+ <label for='support_request'>Support Request:</label><br /><textarea name='support_request' id='support_request' required aria-required='true' cols='80' rows='10' class='widefat'>" . stripslashes( $request ) . "</textarea>
1466
+ </p>
1467
+ <p>
1468
+ <input type='submit' value='" . __( 'Send Support Request', 'my-calendar' ) . "' name='mc_support' class='button-primary' />
1469
+ </p>
1470
+ <p>" . __( 'The following additional information will be sent with your support request:', 'my-calendar' ) . '</p>
1471
+ <div class="mc_support">' . wpautop( $data ) . '</div>
1472
+ </div>
1473
+ </form>';
1474
+ } else {
1475
+ echo '<p><a href="https://wordpress.org/support/plugin/my-calendar/">' . __( 'Request support at the WordPress.org Support Forums', 'my-calendar' ) . '</a> &bull; <a href="https://www.joedolson.com/my-calendar/pro/">' . __( 'Upgrade to Pro for direct plugin support!', 'my-calendar' ) . '</a></p><div class="mc_support">' . wpautop( $data ) . '</div>';
1476
+ }
1477
  }
1478
 
1479
  add_action( 'init', 'mc_register_actions' );
my-calendar-event-manager.php CHANGED
@@ -1179,8 +1179,12 @@ function mc_show_block( $field, $has_data, $data, $echo = true, $default = '' )
1179
  } else {
1180
  $categories = mc_get_categories( $data );
1181
  $return = '<div>';
1182
- foreach ( $categories as $category ) {
1183
- $return .= '<input type="hidden" name="event_category[]" value="' . absint( $category ) . '" />';
 
 
 
 
1184
  }
1185
  $return .= '</div>';
1186
  }
1179
  } else {
1180
  $categories = mc_get_categories( $data );
1181
  $return = '<div>';
1182
+ if ( is_array( $categories ) ) {
1183
+ foreach ( $categories as $category ) {
1184
+ $return .= '<input type="hidden" name="event_category[]" value="' . absint( $category ) . '" />';
1185
+ }
1186
+ } else {
1187
+ $return .= '<input type="hidden" name="event_category[]" value="1" />';
1188
  }
1189
  $return .= '</div>';
1190
  }
my-calendar-generator.php CHANGED
@@ -77,7 +77,7 @@ function mc_generate() {
77
  */
78
  function mc_generator( $type ) {
79
  ?>
80
- <form action="<?php echo admin_url( 'admin.php?page=my-calendar-help' ); ?>" method="POST" id="my-calendar-generate">
81
  <fieldset>
82
  <legend><strong><?php echo ucfirst( $type ); ?></strong>: <?php _e( 'Shortcode Attributes', 'my-calendar' ); ?></legend>
83
  <div id="mc-generator" class="generator">
77
  */
78
  function mc_generator( $type ) {
79
  ?>
80
+ <form action="<?php echo esc_url( admin_url( 'admin.php?page=my-calendar-help' ) ) . '#mc_' . $type; ?>" method="POST" id="my-calendar-generate">
81
  <fieldset>
82
  <legend><strong><?php echo ucfirst( $type ); ?></strong>: <?php _e( 'Shortcode Attributes', 'my-calendar' ); ?></legend>
83
  <div id="mc-generator" class="generator">
my-calendar-install.php CHANGED
@@ -190,7 +190,7 @@ function mc_globals() {
190
  $initial_rel_db = 'CREATE TABLE ' . my_calendar_category_relationships_table() . " (
191
  relationship_id INT(11) NOT NULL AUTO_INCREMENT,
192
  event_id INT(11) NOT NULL,
193
- category_id INT(11) NOT NULL DEFAULT '0',
194
  PRIMARY KEY (relationship_id),
195
  KEY event_id (event_id)
196
  ) $charset_collate;";
@@ -252,6 +252,7 @@ function mc_default_settings() {
252
  add_option( 'mc_ajax_javascript', 0 );
253
  add_option( 'mc_notime_text', 'All day' );
254
  add_option( 'mc_hide_icons', 'true' );
 
255
  add_option( 'mc_event_link_expires', 'false' );
256
  add_option( 'mc_apply_color', 'background' );
257
  add_option( 'mc_inverse_color', 'true' );
190
  $initial_rel_db = 'CREATE TABLE ' . my_calendar_category_relationships_table() . " (
191
  relationship_id INT(11) NOT NULL AUTO_INCREMENT,
192
  event_id INT(11) NOT NULL,
193
+ category_id INT(11) NOT NULL DEFAULT '1',
194
  PRIMARY KEY (relationship_id),
195
  KEY event_id (event_id)
196
  ) $charset_collate;";
252
  add_option( 'mc_ajax_javascript', 0 );
253
  add_option( 'mc_notime_text', 'All day' );
254
  add_option( 'mc_hide_icons', 'true' );
255
+ add_option( 'mc_multiple_categories', 'true' );
256
  add_option( 'mc_event_link_expires', 'false' );
257
  add_option( 'mc_apply_color', 'background' );
258
  add_option( 'mc_inverse_color', 'true' );
my-calendar-output.php CHANGED
@@ -589,7 +589,7 @@ function mc_event_classes( $event, $uid, $type ) {
589
  if ( ! is_object( $category ) ) {
590
  $category = (object) $category;
591
  }
592
- $classes[] = 'mc_rel_' . sanitize_html_class( $category->category_name );
593
  }
594
 
595
  $classes = apply_filters( 'mc_event_classes', $classes, $event, $uid, $type );
@@ -610,9 +610,11 @@ function mc_category_class( $object, $prefix ) {
610
  if ( is_array( $object ) ) {
611
  $term = $object['term'];
612
  $name = $object['category'];
 
613
  } else {
614
  $term = $object->category_term;
615
  $name = $object->category_name;
 
616
  }
617
  $fallback = get_term_by( 'id', $term, 'mc-event-category' );
618
  if ( is_object( $fallback ) ) {
@@ -834,6 +836,7 @@ function mc_time_toggle( $format, $time, $month, $year, $current, $start_of_week
834
  if ( isset( $_GET['time'] ) && 'day' == $_GET['time'] ) {
835
  // don't adjust day if viewing day format.
836
  } else {
 
837
  if ( ! isset( $_GET['dy'] ) && $day > 20 ) {
838
  $day = date( 'j', strtotime( "$from + 1 week" ) );
839
  }
@@ -1044,7 +1047,7 @@ function mc_list_titles( $events ) {
1044
  $result = apply_filters( 'mc_titles_format', '', $titles );
1045
 
1046
  if ( '' == $result ) {
1047
- $result = implode( ', ', $titles );
1048
  }
1049
 
1050
  return "<span class='mc-list-event'>$result</span>";
@@ -1160,8 +1163,21 @@ function mc_search_exportlinks() {
1160
  $print = "<div class='mc-print'><a href='$mc_print_url'>" . __( 'Print<span class="maybe-hide"> View</span>', 'my-calendar' ) . '</a></div>';
1161
 
1162
  // Set up exports.
1163
- $ics_add = array( 'searched' => true );
1164
- $exports = mc_export_links( 1, 1, 1, $ics_add, $subtract );
 
 
 
 
 
 
 
 
 
 
 
 
 
1165
 
1166
  $before = "<div class='mc_bottomnav my-calendar-footer'>";
1167
  $after = '</div>';
589
  if ( ! is_object( $category ) ) {
590
  $category = (object) $category;
591
  }
592
+ $classes[] = 'mc_rel_' . sanitize_html_class( $category->category_name, 'mcat' . $category->category_id );
593
  }
594
 
595
  $classes = apply_filters( 'mc_event_classes', $classes, $event, $uid, $type );
610
  if ( is_array( $object ) ) {
611
  $term = $object['term'];
612
  $name = $object['category'];
613
+ $id = $object['category_id'];
614
  } else {
615
  $term = $object->category_term;
616
  $name = $object->category_name;
617
+ $id = $object->category_id;
618
  }
619
  $fallback = get_term_by( 'id', $term, 'mc-event-category' );
620
  if ( is_object( $fallback ) ) {
836
  if ( isset( $_GET['time'] ) && 'day' == $_GET['time'] ) {
837
  // don't adjust day if viewing day format.
838
  } else {
839
+ // if the current date is displayed and the week beginning day is greater than 20 in the month.
840
  if ( ! isset( $_GET['dy'] ) && $day > 20 ) {
841
  $day = date( 'j', strtotime( "$from + 1 week" ) );
842
  }
1047
  $result = apply_filters( 'mc_titles_format', '', $titles );
1048
 
1049
  if ( '' == $result ) {
1050
+ $result = implode( apply_filters( 'mc_list_titles_separator', ', ' ), $titles );
1051
  }
1052
 
1053
  return "<span class='mc-list-event'>$result</span>";
1163
  $print = "<div class='mc-print'><a href='$mc_print_url'>" . __( 'Print<span class="maybe-hide"> View</span>', 'my-calendar' ) . '</a></div>';
1164
 
1165
  // Set up exports.
1166
+ if ( '' != get_option( 'mc_topnav' ) ) {
1167
+ $above = array_map( 'trim', explode( ',', get_option( 'mc_topnav' ) ) );
1168
+ }
1169
+
1170
+ if ( '' != get_option( 'mc_bottomnav' ) ) {
1171
+ $below = array_map( 'trim', explode( ',', get_option( 'mc_bottomnav' ) ) );
1172
+ }
1173
+ $used = array_merge( $above, $below );
1174
+
1175
+ if ( in_array( 'exports', $used ) ) {
1176
+ $ics_add = array( 'searched' => true );
1177
+ $exports = mc_export_links( 1, 1, 1, $ics_add, $subtract );
1178
+ } else {
1179
+ $exports = '';
1180
+ }
1181
 
1182
  $before = "<div class='mc_bottomnav my-calendar-footer'>";
1183
  $after = '</div>';
my-calendar-styles.php CHANGED
@@ -22,7 +22,6 @@ function my_calendar_style_edit() {
22
  $edit_files = false;
23
  mc_show_error( __( 'File editing is disallowed in your WordPress installation. Edit your stylesheets offline.', 'my-calendar' ) );
24
  }
25
- $dir = plugin_dir_path( __FILE__ );
26
  if ( isset( $_POST['mc_edit_style'] ) ) {
27
  $nonce = $_REQUEST['_wpnonce'];
28
  if ( ! wp_verify_nonce( $nonce, 'my-calendar-nonce' ) ) {
@@ -101,7 +100,8 @@ function my_calendar_style_edit() {
101
  $stylefile = mc_get_style_path();
102
  if ( $stylefile ) {
103
  $f = fopen( $stylefile, 'r' );
104
- $file = fread( $f, filesize( $stylefile ) );
 
105
  $my_calendar_style = $file;
106
  fclose( $f );
107
  $mc_current_style = mc_default_style();
@@ -119,51 +119,6 @@ function my_calendar_style_edit() {
119
  <h2><?php _e( 'Calendar Style Settings', 'my-calendar' ); ?></h2>
120
 
121
  <div class="inside">
122
-
123
- <form method="post" action="<?php echo admin_url( 'admin.php?page=my-calendar-styles' ); ?>">
124
- <div><input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce( 'my-calendar-nonce' ); ?>"/></div>
125
- <div><input type="hidden" value="true" name="mc_choose_style"/></div>
126
- <?php
127
- $custom_directory = str_replace( '/my-calendar/', '', $dir ) . '/my-calendar-custom/styles/';
128
- $directory = dirname( __FILE__ ) . '/styles/';
129
- $files = mc_css_list( $custom_directory );
130
- ?>
131
- <fieldset>
132
- <p>
133
- <label for="mc_css_file"><?php _e( 'Select My Calendar Theme', 'my-calendar' ); ?></label>
134
- <select name="mc_css_file" id="mc_css_file">
135
- <?php
136
- if ( ! empty( $files ) ) {
137
- echo '<optgroup label="' . __( 'Your Custom Stylesheets', 'my-calendar' ) . '">';
138
- foreach ( $files as $value ) {
139
- $test = 'mc_custom_' . $value;
140
- $filepath = mc_get_style_path( $test );
141
- $path = pathinfo( $filepath );
142
- if ( 'css' == $path['extension'] ) {
143
- $selected = ( get_option( 'mc_css_file' ) == $test ) ? ' selected="selected"' : '';
144
- echo "<option value='mc_custom_$value'$selected>$value</option>\n";
145
- }
146
- }
147
- echo '</optgroup';
148
- }
149
- $files = mc_css_list( $directory );
150
- echo '<optgroup label="' . __( 'Installed Stylesheets', 'my-calendar' ) . '">';
151
- foreach ( $files as $value ) {
152
- $filepath = mc_get_style_path( $value );
153
- $path = pathinfo( $filepath );
154
- if ( 'css' == $path['extension'] ) {
155
- $selected = ( get_option( 'mc_css_file' ) == $value ) ? ' selected="selected"' : '';
156
- echo "<option value='$value'$selected>$value</option>\n";
157
- }
158
- }
159
- echo '</optgroup';
160
- ?>
161
- </select>
162
- <input type="submit" name="save" class="button-secondary" value="<?php _e( 'Choose Style', 'my-calendar' ); ?>"/>
163
- </p>
164
- </fieldset>
165
- </form>
166
- <hr/>
167
  <form method="post" action="<?php echo admin_url( 'admin.php?page=my-calendar-styles' ); ?>">
168
  <input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce( 'my-calendar-nonce' ); ?>"/>
169
  <input type="hidden" value="true" name="mc_edit_style"/>
@@ -254,11 +209,68 @@ function my_calendar_style_edit() {
254
  </div>
255
  </div>
256
  </div>
257
- <?php mc_show_sidebar(); ?>
 
 
 
258
  </div>
259
  <?php
260
  }
261
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
262
  /**
263
  * Get path for given filename or current selected stylesheet.
264
  *
22
  $edit_files = false;
23
  mc_show_error( __( 'File editing is disallowed in your WordPress installation. Edit your stylesheets offline.', 'my-calendar' ) );
24
  }
 
25
  if ( isset( $_POST['mc_edit_style'] ) ) {
26
  $nonce = $_REQUEST['_wpnonce'];
27
  if ( ! wp_verify_nonce( $nonce, 'my-calendar-nonce' ) ) {
100
  $stylefile = mc_get_style_path();
101
  if ( $stylefile ) {
102
  $f = fopen( $stylefile, 'r' );
103
+ $size = ( 0 === filesize( $stylefile ) ) ? 1 : filesize( $stylefile );
104
+ $file = fread( $f, $size );
105
  $my_calendar_style = $file;
106
  fclose( $f );
107
  $mc_current_style = mc_default_style();
119
  <h2><?php _e( 'Calendar Style Settings', 'my-calendar' ); ?></h2>
120
 
121
  <div class="inside">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  <form method="post" action="<?php echo admin_url( 'admin.php?page=my-calendar-styles' ); ?>">
123
  <input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce( 'my-calendar-nonce' ); ?>"/>
124
  <input type="hidden" value="true" name="mc_edit_style"/>
209
  </div>
210
  </div>
211
  </div>
212
+ <?php
213
+ $selector = mc_stylesheet_selector();
214
+ mc_show_sidebar( '', $selector );
215
+ ?>
216
  </div>
217
  <?php
218
  }
219
 
220
+ /**
221
+ * Display stylesheet selector as added component in sidebar.
222
+ *
223
+ * @return string
224
+ */
225
+ function mc_stylesheet_selector() {
226
+ $dir = plugin_dir_path( __FILE__ );
227
+ $options = '';
228
+ $return = '
229
+ <form method="post" action="' . admin_url( 'admin.php?page=my-calendar-styles' ) . '">
230
+ <div><input type="hidden" name="_wpnonce" value="' . wp_create_nonce( 'my-calendar-nonce' ) . '"/></div>
231
+ <div><input type="hidden" value="true" name="mc_choose_style"/></div>';
232
+ $custom_directory = str_replace( '/my-calendar/', '', $dir ) . '/my-calendar-custom/styles/';
233
+ $directory = dirname( __FILE__ ) . '/styles/';
234
+ $files = mc_css_list( $custom_directory );
235
+ if ( ! empty( $files ) ) {
236
+ $options .= '<optgroup label="' . __( 'Your Custom Stylesheets', 'my-calendar' ) . '">';
237
+ foreach ( $files as $value ) {
238
+ $test = 'mc_custom_' . $value;
239
+ $filepath = mc_get_style_path( $test );
240
+ $path = pathinfo( $filepath );
241
+ if ( 'css' == $path['extension'] ) {
242
+ $selected = ( get_option( 'mc_css_file' ) == $test ) ? ' selected="selected"' : '';
243
+ $options .= "<option value='mc_custom_$value'$selected>$value</option>\n";
244
+ }
245
+ }
246
+ $options .= '</optgroup>';
247
+ }
248
+ $files = mc_css_list( $directory );
249
+ $options .= '<optgroup label="' . __( 'Installed Stylesheets', 'my-calendar' ) . '">';
250
+ foreach ( $files as $value ) {
251
+ $filepath = mc_get_style_path( $value );
252
+ $path = pathinfo( $filepath );
253
+ if ( 'css' == $path['extension'] ) {
254
+ $selected = ( get_option( 'mc_css_file' ) == $value ) ? ' selected="selected"' : '';
255
+ $options .= "<option value='$value'$selected>$value</option>\n";
256
+ }
257
+ }
258
+ $options .= '</optgroup>';
259
+ $return .= '
260
+ <fieldset>
261
+ <p>
262
+ <label for="mc_css_file">' . __( 'Select My Calendar Theme', 'my-calendar' ) . '</label>
263
+ <select name="mc_css_file" id="mc_css_file">' . $options . '</select>
264
+ </p>
265
+ <p>
266
+ <input type="submit" name="save" class="button-primary" value="' . __( 'Choose Style', 'my-calendar' ) . '"/>
267
+ </p>
268
+ </fieldset>
269
+ </form>';
270
+
271
+ return array( __( 'Select Stylesheet', 'my-calendar' ) => $return );
272
+ }
273
+
274
  /**
275
  * Get path for given filename or current selected stylesheet.
276
  *
my-calendar-templates.php CHANGED
@@ -71,7 +71,7 @@ function mc_draw_template( $array, $template, $type = 'list' ) {
71
  if ( '' != $format ) {
72
  $value = date_i18n( stripslashes( $format ), strtotime( stripslashes( $value ) ) );
73
  }
74
- $value = ( '' == $value ) ? '' : $before . $value . $after;
75
  $search = $matches[0][ $i ];
76
  $template = str_replace( $search, $value, $template );
77
  $value = $orig;
@@ -380,6 +380,7 @@ function mc_create_tags( $event, $context = 'filters' ) {
380
 
381
  // Category fields.
382
  $e['cat_id'] = $event->event_category;
 
383
  $e['category'] = stripslashes( $event->category_name );
384
  $e['ical_category'] = strip_tags( stripslashes( $event->category_name ) );
385
  $e['categories'] = ( property_exists( $event, 'categories' ) ) ? mc_categories_html( $event->categories, $event->event_category ) : mc_get_categories( $event, 'html' );
71
  if ( '' != $format ) {
72
  $value = date_i18n( stripslashes( $format ), strtotime( stripslashes( $value ) ) );
73
  }
74
+ $value = ( '' == trim( $value ) ) ? '' : $before . $value . $after;
75
  $search = $matches[0][ $i ];
76
  $template = str_replace( $search, $value, $template );
77
  $value = $orig;
380
 
381
  // Category fields.
382
  $e['cat_id'] = $event->event_category;
383
+ $e['category_id'] = $event->event_category;
384
  $e['category'] = stripslashes( $event->category_name );
385
  $e['ical_category'] = strip_tags( stripslashes( $event->category_name ) );
386
  $e['categories'] = ( property_exists( $event, 'categories' ) ) ? mc_categories_html( $event->categories, $event->event_category ) : mc_get_categories( $event, 'html' );
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.1.1
21
  */
22
 
23
  /*
@@ -42,7 +42,7 @@ if ( ! defined( 'ABSPATH' ) ) {
42
  }
43
 
44
  global $mc_version, $wpdb;
45
- $mc_version = '3.1.1';
46
 
47
  define( 'MC_DEBUG', false );
48
 
@@ -150,13 +150,25 @@ function mc_custom_canonical() {
150
  }
151
  }
152
 
153
- add_action( 'init', 'mc_start_session', 10 );
154
  /**
155
  * Makes sure session is started to be able to save search results.
156
  */
157
  function mc_start_session() {
158
- if ( ! session_id() ) {
159
- session_start();
 
 
 
 
 
 
 
 
 
 
 
 
160
  }
161
  }
162
 
17
  * License: GPL-2.0+
18
  * License URI: http://www.gnu.org/license/gpl-2.0.txt
19
  * Domain Path: lang
20
+ * Version: 3.1.3
21
  */
22
 
23
  /*
42
  }
43
 
44
  global $mc_version, $wpdb;
45
+ $mc_version = '3.1.3';
46
 
47
  define( 'MC_DEBUG', false );
48
 
150
  }
151
  }
152
 
153
+ add_action( 'init', 'mc_start_session', 1 );
154
  /**
155
  * Makes sure session is started to be able to save search results.
156
  */
157
  function mc_start_session() {
158
+ $required_php_version = '5.4.0';
159
+ if ( version_compare( PHP_VERSION, $required_php_version, '<' ) ) {
160
+ if ( ! session_id() ) {
161
+ session_start();
162
+ }
163
+ } else {
164
+ $status = session_status();
165
+ if ( PHP_SESSION_DISABLED === $status ) {
166
+ return;
167
+ }
168
+
169
+ if ( PHP_SESSION_NONE === $status ) {
170
+ session_start();
171
+ }
172
  }
173
  }
174
 
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: joedolson
3
  Donate link: http://www.joedolson.com/donate/
4
  Tags: calendar, dates, times, event, events, scheduling, schedule, event manager, event calendar, class, concert, venue, location, box office, tickets, registration
5
  Requires at least: 4.4
6
- Tested up to: 4.9
7
  Requires PHP: 5.3
8
- Stable tag: 3.1.1
9
  Text domain: my-calendar
10
  License: GPLv2 or later
11
 
@@ -85,6 +85,28 @@ Translating my plug-ins is always appreciated. Visit <a href="https://translate.
85
 
86
  TODO: Support limiting views to multiple locations
87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  = 3.1.1 =
89
 
90
  * Bug fix: unspamming event_ID passed incorrect variable name
3
  Donate link: http://www.joedolson.com/donate/
4
  Tags: calendar, dates, times, event, events, scheduling, schedule, event manager, event calendar, class, concert, venue, location, box office, tickets, registration
5
  Requires at least: 4.4
6
+ Tested up to: 5.0
7
  Requires PHP: 5.3
8
+ Stable tag: 3.1.3
9
  Text domain: my-calendar
10
  License: GPLv2 or later
11
 
85
 
86
  TODO: Support limiting views to multiple locations
87
 
88
+ = 3.1.3 =
89
+
90
+ * New filter: 'mc_list_titles_separator'
91
+ * Bug fix: Help support data not displayed.
92
+ * Override content overflow in Twentynineteen
93
+ * Add support for iCal format in API exports
94
+
95
+ = 3.1.2 =
96
+
97
+ * Bug fix: Twentyeighteen styles missing from template directory
98
+ * Bug fix: Declare width on th as well as td
99
+ * Bug fix: optgroup close element broken
100
+ * Bug fix: Shortcode generator fixes.
101
+ * Bug fix: Handle case where hidden categories are not an array in event manager.
102
+ * Bug fix: If template tag value contains only whitespace, do not render before & after attributes.
103
+ * Bug fix: Handle form restrictions in KSES introduced in WP 5.0.1.
104
+ * Bug fix: check whether PHP sessions are enabled before attempting to start
105
+ * Change: Only render export links in search results if enabled in main settings
106
+ * Change: [UI] Move stylesheet selector into sidebar
107
+ * Change: Allow target attribute on links.
108
+ * Change: Add label to links that open in new tab.
109
+
110
  = 3.1.1 =
111
 
112
  * Bug fix: unspamming event_ID passed incorrect variable name
styles/twentyeighteen.css CHANGED
@@ -107,6 +107,7 @@
107
  }
108
 
109
  .mc-main th {
 
110
  text-align: center;
111
  text-transform: uppercase;
112
  padding: 4px 0;
107
  }
108
 
109
  .mc-main th {
110
+ width: 14.285714%;
111
  text-align: center;
112
  text-transform: uppercase;
113
  padding: 4px 0;
templates/twentyeighteen.css ADDED
@@ -0,0 +1,642 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .my-calendar-header *, .mc_bottomnav *, .mc-main * {
2
+ line-height: 1.62;
3
+ }
4
+
5
+ .mc-main .my-calendar-header, .mc-main .mc_bottomnav {
6
+ padding: 0;
7
+ }
8
+
9
+ .mc-main a {
10
+ border-bottom: none;
11
+ display: inline;
12
+ }
13
+
14
+ .mc-main .details ul, .mc-main .details ol, .mc-main details li {
15
+ margin: .25em 0 .5em 3em;
16
+ }
17
+
18
+ .my-calendar-header > div, .mc_bottomnav > div {
19
+ display: inline-block;
20
+ margin-right: 4px;
21
+ }
22
+
23
+ .mc-main .maybe-hide {
24
+ clip: rect(1px, 1px, 1px, 1px);
25
+ position: absolute !important;
26
+ height: 1px;
27
+ width: 1px;
28
+ overflow: hidden;
29
+ }
30
+
31
+ .my-calendar-header > div:nth-of-type(1), .mc_bottomnav > div:nth-of-type(1) {
32
+ margin-left: 0;
33
+ }
34
+
35
+ .my-calendar-header > div:nth-of-type(last), .mc_bottomnav > div:nth-of-type(last) {
36
+ margin-right: 0;
37
+ }
38
+
39
+ .mc-main .my-calendar-header input,
40
+ .mc-main .my-calendar-header span, .mc-main .my-calendar-header a,
41
+ .mc-main .mc_bottomnav span, .mc-main .mc_bottomnav a {
42
+ text-decoration: none;
43
+ -webkit-box-shadow: inset 0 -1px 0 rgba(15, 15, 15, 1);
44
+ box-shadow: inset 0 -1px 0 rgba(15, 15, 15, 1);
45
+ -webkit-transition: color 80ms ease-in, -webkit-box-shadow 130ms ease-in-out;
46
+ transition: color 80ms ease-in, -webkit-box-shadow 130ms ease-in-out;
47
+ transition: color 80ms ease-in, box-shadow 130ms ease-in-out;
48
+ transition: color 80ms ease-in, box-shadow 130ms ease-in-out, -webkit-box-shadow 130ms ease-in-out;
49
+ }
50
+
51
+ .mc-main .my-calendar-header span, .mc-main .my-calendar-header a,
52
+ .mc-main .mc_bottomnav span, .mc-main .mc_bottomnav a,
53
+ .mc-main .my-calendar-header select, .mc-main .my-calendar-header input {
54
+ color: #313233;
55
+ color: var(--primary-dark);
56
+ border: 1px solid #efefef;
57
+ border: 1px solid var(--highlight-light);
58
+ border-radius: 5px;
59
+ padding: 4px 6px;
60
+ font-size: 14px;
61
+ font-family: Arial;
62
+ background: #fff;
63
+ background: var(--secondary-light);
64
+ }
65
+
66
+ .mc-main span.category-color-sample {
67
+ border: none !important;
68
+ box-shadow: none !important;
69
+ }
70
+
71
+ .mc-main .my-calendar-header input,
72
+ .mc-main .my-calendar-header a,
73
+ .mc-main .mc_bottomnav a {
74
+ background: linear-gradient(to top, rgba( 210, 210, 210, .95 ) 0%, rgba( 230, 230, 230, .95 ) 70%);
75
+ }
76
+
77
+ .mc-main .my-calendar-header input:hover, .mc-main .my-calendar-header input:focus,
78
+ .mc-main .my-calendar-header a:hover, .mc-main .mc_bottomnav a:hover,
79
+ .mc-main .my-calendar-header a:focus, .mc-main .mc_bottomnav a:focus {
80
+ color: #fff;
81
+ color: var(--primary-light);
82
+ text-decoration: underline;
83
+ background: linear-gradient(to bottom, rgba(125, 125, 125, .95) 0%, rgba( 60, 60, 60, .95) 70%);
84
+ }
85
+
86
+ .mc-main.calendar, .mc-main table {
87
+ width: 100% !important;
88
+ }
89
+
90
+ .mc-main table {
91
+ width: 100%;
92
+ position: relative;
93
+ border-collapse: collapse;
94
+ table-layout: fixed;
95
+ }
96
+
97
+ .mc-main caption, .mc-main.list .my-calendar-month, .mc-main .heading {
98
+ font-size: 24px;
99
+ color: #666;
100
+ color: var(--highlight-dark);
101
+ text-align: right;
102
+ margin: 0;
103
+ }
104
+
105
+ .mc-main.mini caption {
106
+ font-size: 16px;
107
+ }
108
+
109
+ .mc-main th {
110
+ text-align: center;
111
+ text-transform: uppercase;
112
+ padding: 4px 0;
113
+ background: #313233 !important;
114
+ background: var(--primary-dark) !important;
115
+ color: #fff !important;
116
+ color: var(--primary-light) !important;
117
+ }
118
+
119
+ .mc-main th abbr, .mc-main .event-time abbr {
120
+ border-bottom: none;
121
+ text-decoration: none;
122
+ }
123
+
124
+ .mc-main td {
125
+ width: 14.285714%;
126
+ border: 1px solid #efefef;
127
+ border: 1px solid var(--highlight-light);
128
+ padding: 0 !important;
129
+ height: 6em;
130
+ }
131
+
132
+ .mc-main.mini td {
133
+ height: auto;
134
+ }
135
+
136
+ .mc-main td .event-title {
137
+ text-overflow: ellipsis;
138
+ overflow: hidden;
139
+ font-size: 13px;
140
+ }
141
+
142
+ .mc-main {
143
+ position: relative;
144
+ }
145
+
146
+ .mc-main .event-title {
147
+ margin: 0 !important;
148
+ font-size: 24px;
149
+ }
150
+
151
+ .mc-main .event-title a {
152
+ display: block;
153
+ line-height: 1.5;
154
+ padding: 6px;
155
+ position: relative;
156
+ border-bottom: none;
157
+ box-shadow: none;
158
+ }
159
+
160
+ .mc-main .event-title .has-image {
161
+ padding-left: 24px;
162
+ }
163
+
164
+ .mc-main.mini .event-title {
165
+ padding: 10px 30px 10px 5px;
166
+ }
167
+
168
+ .mc-main.mini .has-events .active-toggle {
169
+ background: #efefef;
170
+ background: var(--highlight-light);
171
+ color: #000;
172
+ color: var(--secondary-dark);
173
+ }
174
+
175
+ .mc-main.mini .event-title img {
176
+ position: relative;
177
+ margin-right: 4px;
178
+ top: 0;
179
+ left: 0;
180
+ }
181
+
182
+ .mc-main .mc-format a:before, .mc-main .mc-format span:before {
183
+ font-family: dashicons;
184
+ margin-right: 3px;
185
+ vertical-align: middle;
186
+ }
187
+
188
+ .mc-main .mc-format .list:before {
189
+ content: "\f163";
190
+ }
191
+
192
+ .mc-main .mc-format .grid:before {
193
+ content: "\f508";
194
+ }
195
+
196
+ .mc-main .event-title img, .mc-main .category-color-sample img {
197
+ position: absolute;
198
+ top: 6px;
199
+ left: 4px;
200
+ box-shadow: none;
201
+ background: transparent;
202
+ display: inline;
203
+ vertical-align: middle;
204
+ }
205
+
206
+ .mc-main .category-key .category-color-sample {
207
+ padding: 4px 4px 4px 0;
208
+ }
209
+
210
+ .mc-main .category-color-sample img {
211
+ position: static;
212
+ top: 0;
213
+ left: 0;
214
+ }
215
+
216
+ .mc-main .calendar-event .details, .mc-main .calendar-events {
217
+ position: absolute;
218
+ left: 5%;
219
+ width: 90%;
220
+ z-index: 3;
221
+ background: #fff;
222
+ background: var(--primary-light);
223
+ box-shadow: 0 0 4px;
224
+ color: #333;
225
+ color: var(--primary-dark);
226
+ }
227
+
228
+ .mc-main .calendar-events {
229
+ width: 110%;
230
+ left: -5%;
231
+ }
232
+
233
+ .mc-main .details {
234
+ padding: 30px;
235
+ }
236
+
237
+ .mc-main .single-event .details {
238
+ padding: 0;
239
+ }
240
+
241
+ .mc-main.mini .details {
242
+ padding: 16px;
243
+ border-top: 1px solid #666;
244
+ border-top: 1px solid var(--highlight-dark);
245
+ }
246
+
247
+ .mc-main .mc-list .details {
248
+ padding: 0;
249
+ }
250
+
251
+ .mc-main .close img {
252
+ width: auto !important;
253
+ height: auto !important;
254
+ padding: 2px 2px 0;
255
+ }
256
+
257
+ .mc-main button.close {
258
+ position: absolute;
259
+ left: -22px;
260
+ top: -22px;
261
+ background: #fff;
262
+ border-radius: 20px;
263
+ }
264
+
265
+ .mc-main button.close, .mc-main button.close * {
266
+ padding: 0;
267
+ line-height: 1;
268
+ background: transparent;
269
+ opacity: 1;
270
+ }
271
+
272
+ .mc-main.mini .close {
273
+ left: auto;
274
+ right: 0;
275
+ font-size: 18px;
276
+ }
277
+
278
+ .mc-main .close:hover, .mc-main .close:focus {
279
+ background: #fff;
280
+ background: var(--primary-light);
281
+ }
282
+
283
+ .mc-main .details .category-icon {
284
+ width: auto;
285
+ }
286
+
287
+ .mc-main .details img.alignleft {
288
+ width: auto;
289
+ float: left;
290
+ margin: 0 20px 10px 0;
291
+ }
292
+
293
+ .mc-main .details img.alignright {
294
+ width: auto;
295
+ float: left;
296
+ margin: 0 0 10px 20px;
297
+ }
298
+
299
+ .mc-main .details img.aligncenter {
300
+ width: auto;
301
+ display: block;
302
+ margin: 0 auto 10px;
303
+ }
304
+
305
+ .mc-main .details p {
306
+ margin: 0 0 20px;
307
+ }
308
+
309
+ /* Date/times */
310
+ .mc-main .time-block {
311
+ float: right;
312
+ }
313
+
314
+ .mc-main.mini .time-block {
315
+ float: none;
316
+ font-size: 14px;
317
+ }
318
+
319
+ .mc-main .time-block p {
320
+ color: #000;
321
+ color: var(--secondary-dark);
322
+ display: inline-block;
323
+ margin: 0 !important;
324
+ background: #fff;
325
+ background: var(--primary-light);
326
+ padding: 0 10px !important;
327
+ }
328
+
329
+ .mc-main .time-block:before {
330
+ font-family: dashicons;
331
+ content: "\f469";
332
+ vertical-align: top;
333
+ margin-right: 4px;
334
+ }
335
+
336
+ .mc-main .time-block .mc-event-date {
337
+ display: block;
338
+ }
339
+
340
+ .mc-main .mc-event-date {
341
+ font-weight: 700;
342
+ color: #333;
343
+ color: var(--primary-dark);
344
+ }
345
+
346
+ .mc-main .mc-date {
347
+ display: block;
348
+ padding: 0 8px;
349
+ font-size: 16px;
350
+ background: #fff;
351
+ background: var(--primary-light);
352
+ color: #000;
353
+ color: var(--secondary-dark);
354
+ }
355
+
356
+ .mc-main.mini .mc-date {
357
+ text-align: center;
358
+ }
359
+
360
+ .mc-main .nextmonth .mc-date {
361
+ opacity: .7;
362
+ }
363
+
364
+ .mc-main .has-events .mc-date {
365
+ font-weight: 700;
366
+ background: #333;
367
+ background: var(--primary-dark);
368
+ color: #fff;
369
+ color: var(--primary-light);
370
+ }
371
+
372
+ .mc-main .current-day .mc-date {
373
+ background: #000 !important;
374
+ background: var(--secondary-dark) !important;
375
+ color: #fff !important;
376
+ color: var(--secondary-light) !important;
377
+ box-shadow: inset 0px 0px 0px 2px #666;
378
+ box-shadow: inset 0px 0px 0px 2px var(--highlight-dark);
379
+ font-weight: 700;
380
+ font-style: italic;
381
+ }
382
+
383
+ .mc-main .has-events a.mc-date {
384
+ color: #fff;
385
+ color: var(--primary-light);
386
+ background: #333;
387
+ background: var(--primary-dark);
388
+ }
389
+
390
+ .mc-main .has-events a.mc-date:hover,
391
+ .mc-main .has-events a.mc-date:focus {
392
+ color: #333;
393
+ color: var(--primary-dark);
394
+ background: #fff;
395
+ background: var(--primary-light);
396
+ }
397
+
398
+ .mc-main .mc-single {
399
+ font-size: 24px;
400
+ margin: 0 0 .5em;
401
+ }
402
+
403
+ /* Navigation */
404
+ .my-calendar-nav ul, .mc-main .category-key ul, .mc-main .mc-export ul, .mc-main .mc-list {
405
+ margin: 0 !important;
406
+ padding: 0 !important;
407
+ }
408
+
409
+ .my-calendar-nav ul li, .mc-main .category-key ul li, .mc-main .mc-export ul li {
410
+ display: inline-block;
411
+ list-style-type: none;
412
+ margin: 0 0 6px;
413
+ }
414
+
415
+ .my-calendar-nav .my-calendar-prev a {
416
+ border-radius: 5px 0 0 5px;
417
+ border-right: 1px solid #bbb;
418
+ }
419
+
420
+ .my-calendar-nav .my-calendar-next a {
421
+ border-radius: 0 5px 5px 0;
422
+ border-left: 1px solid #fff;
423
+ }
424
+
425
+ .mc-main .mc-time .month {
426
+ border-radius: 5px 0 0 5px;
427
+ border-right: 1px solid #bbb;
428
+ }
429
+
430
+ .mc-main .mc-time .week {
431
+ border-radius: 0;
432
+ border-right: 1px solid #bbb;
433
+ }
434
+
435
+ .mc-main .mc-time .day {
436
+ border-radius: 0 5px 5px 0;
437
+ }
438
+
439
+ .my-calendar-prev a:before, .my-calendar-next a:after {
440
+ font-family: 'dashicons';
441
+ vertical-align: middle;
442
+ }
443
+
444
+ .mc-export .rss a:before {
445
+ font-family: 'dashicons';
446
+ vertical-align: middle;
447
+ margin-right: 3px;
448
+ content: '\f303';
449
+ }
450
+
451
+ .mc-export .ics a:before {
452
+ font-family: 'dashicons';
453
+ vertical-align: middle;
454
+ margin-right: 3px;
455
+ content: '\f508';
456
+ }
457
+
458
+ .my-calendar-prev a:before {
459
+ content: '\f341';
460
+ margin-right: 3px;
461
+ }
462
+
463
+ .my-calendar-next a:after {
464
+ content: '\f345';
465
+ margin-left: 3px;
466
+ }
467
+
468
+ /* Category Key */
469
+ .mc-main .category-key h3 {
470
+ margin: 0 0 10px 0 !important;
471
+ }
472
+
473
+ .mc-main .category-key li.current a {
474
+ border: 1px solid #000;
475
+ background: #fff;
476
+ }
477
+
478
+ .mc-main .my-calendar-header .no-icon,
479
+ .mc-main .mc_bottomnav .no-icon {
480
+ display: inline-block;
481
+ width: 12px;
482
+ height: 15px;
483
+ vertical-align: middle;
484
+ margin-right: .25em;
485
+ border-radius: 12px;
486
+ position: relative;
487
+ top: -2px;
488
+ border: 1px solid #fff;
489
+ }
490
+
491
+ /* hCard */
492
+ .mc-main .location {
493
+ clear: right;
494
+ }
495
+
496
+ .mc-main .vcard {
497
+ margin: 0 0 1em 1em;
498
+ float: right;
499
+ padding: 10px;
500
+ width: 250px;
501
+ max-width: 50%;
502
+ font-size: 14px;
503
+ background: rgba( 0, 0, 0, .05 );
504
+ }
505
+
506
+ .mc-main.mini .vcard {
507
+ margin: 15px 0;
508
+ float: none;
509
+ width: 100%;
510
+ max-width: 100%;
511
+ }
512
+
513
+ .mc-main .vcard .street-address {
514
+ display: inline;
515
+ }
516
+
517
+ .mc-main .vcard .street-address:nth-of-type(2):before {
518
+ content: ', ';
519
+ }
520
+
521
+ /* Jumpbox */
522
+ .mc-main .my-calendar-date-switcher select {
523
+ width: auto;
524
+ margin: 0;
525
+ height: auto;
526
+ }
527
+
528
+ .mc-main .my-calendar-date-switcher input[type=submit] {
529
+ min-width: 2em;
530
+ width: auto;
531
+ font-size: 14px !important;
532
+ padding: 1px 4px !important;
533
+ line-height: 1.62 !important;
534
+ }
535
+
536
+ /* List View */
537
+ .mc-main .mc-list li, #mc-day {
538
+ position: relative;
539
+ }
540
+
541
+ .mc-list .current-day .event-date:before {
542
+ content: "\f345";
543
+ margin-right: 5px;
544
+ font-family: dashicons;
545
+ vertical-align: middle;
546
+ margin-left: -5px;
547
+ }
548
+
549
+ .mc-main .mc-list .mc-events {
550
+ list-style-type: none !important;
551
+ padding: 10px;
552
+ background: rgba(0, 0, 0, .05);
553
+ margin: 0;
554
+ }
555
+
556
+ .mc-main .mc-list .mc-events.odd {
557
+ padding: 10px;
558
+ background: none;
559
+ }
560
+
561
+ .mc-main .list-event .event-title {
562
+ margin: 0 0 1em!important;
563
+ display: inline-block;
564
+ }
565
+
566
+ .mc-main .details .sharing {
567
+ clear: both;
568
+ }
569
+
570
+ .mc-main .sharing p {
571
+ display: inline-block;
572
+ padding: .5em .5em .5em 0;
573
+ }
574
+
575
+ .mc-main.mini .sharing p {
576
+ font-size: 14px;
577
+ padding: 0 .25em 0 0;
578
+ margin-bottom: 10px;
579
+ }
580
+
581
+ .mc-main .sharing .ical a:before, .mc-main .sharing .gcal a:before {
582
+ font-family: 'dashicons';
583
+ content: "\f502";
584
+ margin-right: 3px;
585
+ vertical-align: middle;
586
+ }
587
+
588
+ .mc-main .sharing .mc_details a:before {
589
+ font-family: 'dashicons';
590
+ content: "\f242";
591
+ margin-right: 3px;
592
+ vertical-align: middle;
593
+ }
594
+
595
+ .mc-main .mc-list .event-date {
596
+ font-size: 16px;
597
+ font-weight: 600;
598
+ }
599
+
600
+ .mc-main .list-event {
601
+ border-top: 1px solid #d1d1d1;
602
+ margin: .5em -10px;
603
+ padding: 1em;
604
+ }
605
+
606
+ .mc-main .day .list-event, .mc-main .day .details {
607
+ padding: 0;
608
+ margin: 0;
609
+ }
610
+
611
+ .mc-main .mc-list-extended {
612
+ font-size: 14px;
613
+ font-style: italic;
614
+ }
615
+
616
+ .mc-main .details .mc-image {
617
+ max-width: 100%;
618
+ height: auto;
619
+ }
620
+
621
+ .mc-main .list-event .event-title img {
622
+ margin-right: .5em;
623
+ position: relative;
624
+ top: -1px;
625
+ }
626
+
627
+ /* Single view */
628
+ .single-event .event-title {
629
+ padding: .5em;
630
+ font-size: inherit;
631
+ }
632
+
633
+ .single-event .event-title img {
634
+ margin-right: 10px;
635
+ position: static;
636
+ }
637
+
638
+ .mc-list-details.all-events {
639
+ text-align: left;
640
+ display: inline-block;
641
+ text-transform: none;
642
+ }