My Calendar - Version 2.4.21

Version Description

  • Bug fix: Google Maps format change to latitude/longitude links
  • Bug fix: Use short description directly as {excerpt} if provided.
Download this release

Release Info

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

Code changes from version 2.4.20 to 2.4.21

Files changed (3) hide show
  1. my-calendar-templates.php +14 -3
  2. my-calendar.php +2 -2
  3. readme.txt +6 -1
my-calendar-templates.php CHANGED
@@ -120,6 +120,7 @@ function mc_clean_location( $event, $source = 'event' ) {
120
return $event;
121
}
122
123
// set up link to Google Maps
124
function mc_maplink( $event, $request = 'map', $source = 'event' ) {
125
$map_string = mc_map_string( $event, $source );
@@ -132,7 +133,11 @@ function mc_maplink( $event, $request = 'map', $source = 'event' ) {
132
$map_label = wp_kses_post( stripslashes( ( $event->event_label != "" ) ? $event->event_label : $event->event_title ) );
133
$map_string = str_replace( " ", "+", $map_string );
134
if ( $event->event_longitude != '0.000000' && $event->event_latitude != '0.000000' ) {
135
- $map_string = "$event->event_latitude,$event->event_longitude";
136
}
137
} else {
138
$url = $event->location_url;
@@ -140,7 +145,11 @@ function mc_maplink( $event, $request = 'map', $source = 'event' ) {
140
$zoom = ( $event->location_zoom != 0 ) ? $event->location_zoom : '15';
141
$map_string = str_replace( " ", "+", $map_string );
142
if ( $event->location_longitude != '0.000000' && $event->location_latitude != '0.000000' ) {
143
- $map_string = "$event->location_latitude,$event->location_longitude";
144
}
145
}
146
if ( strlen( trim( $map_string ) ) > 6 ) {
@@ -633,12 +642,14 @@ add_filter( 'mc_filter_shortcodes', 'mc_auto_excerpt', 10, 2 );
633
function mc_auto_excerpt( $e, $event ) {
634
$description = $e['description'];
635
$shortdesc = $e['shortdesc'];
636
- if ( $description != '' ) { // if description is empty, this won't work, so skip it.
637
$num_words = apply_filters( 'mc_excerpt_length', 55 );
638
$excerpt = wp_trim_words( $description, $num_words );
639
} else {
640
$excerpt = $shortdesc;
641
}
642
$e['excerpt'] = $excerpt;
643
644
return $e;
120
return $event;
121
}
122
123
+
124
// set up link to Google Maps
125
function mc_maplink( $event, $request = 'map', $source = 'event' ) {
126
$map_string = mc_map_string( $event, $source );
133
$map_label = wp_kses_post( stripslashes( ( $event->event_label != "" ) ? $event->event_label : $event->event_title ) );
134
$map_string = str_replace( " ", "+", $map_string );
135
if ( $event->event_longitude != '0.000000' && $event->event_latitude != '0.000000' ) {
136
+ $dir_lat = ( $event->event_latitude > 0 ) ? 'N' : 'S';
137
+ $latitude = abs( $event->event_latitude );
138
+ $dir_long = ( $event->event_longitude > 0 ) ? 'E' : 'W';
139
+ $longitude = abs( $event->event_longitude );
140
+ $map_string = $latitude . $dir_lat . ',' . $longitude . $dir_long;
141
}
142
} else {
143
$url = $event->location_url;
145
$zoom = ( $event->location_zoom != 0 ) ? $event->location_zoom : '15';
146
$map_string = str_replace( " ", "+", $map_string );
147
if ( $event->location_longitude != '0.000000' && $event->location_latitude != '0.000000' ) {
148
+ $dir_lat = ( $event->location_latitude > 0 ) ? 'N' : 'S';
149
+ $latitude = abs( $event->location_latitude );
150
+ $dir_long = ( $event->location_longitude > 0 ) ? 'W' : 'E';
151
+ $longitude = abs( $event->location_longitude );
152
+ $map_string = $latitude . $dir_lat . ',' . $longitude . $dir_long;
153
}
154
}
155
if ( strlen( trim( $map_string ) ) > 6 ) {
642
function mc_auto_excerpt( $e, $event ) {
643
$description = $e['description'];
644
$shortdesc = $e['shortdesc'];
645
+ $excerpt = '';
646
+ if ( $description != '' && $shortdesc == '' ) { // if description is empty, this won't work, so skip it.
647
$num_words = apply_filters( 'mc_excerpt_length', 55 );
648
$excerpt = wp_trim_words( $description, $num_words );
649
} else {
650
$excerpt = $shortdesc;
651
}
652
+
653
$e['excerpt'] = $excerpt;
654
655
return $e;
my-calendar.php CHANGED
@@ -7,7 +7,7 @@ Author: Joseph C Dolson
7
Author URI: http://www.joedolson.com
8
Text Domain: my-calendar
9
Domain Path: lang
10
- Version: 2.4.20
11
*/
12
/* Copyright 2009-2016 Joe Dolson (email : joe@joedolson.com)
13
@@ -30,7 +30,7 @@ if ( ! defined( 'ABSPATH' ) ) {
30
} // Exit if accessed directly
31
32
global $mc_version, $wpdb;
33
- $mc_version = '2.4.20';
34
35
// Define the tables used in My Calendar
36
if ( is_multisite() && get_site_option( 'mc_multisite_show' ) == 1 ) {
7
Author URI: http://www.joedolson.com
8
Text Domain: my-calendar
9
Domain Path: lang
10
+ Version: 2.4.21
11
*/
12
/* Copyright 2009-2016 Joe Dolson (email : joe@joedolson.com)
13
30
} // Exit if accessed directly
31
32
global $mc_version, $wpdb;
33
+ $mc_version = '2.4.21';
34
35
// Define the tables used in My Calendar
36
if ( is_multisite() && get_site_option( 'mc_multisite_show' ) == 1 ) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.joedolson.com/donate/
4
Tags: calendar, dates, times, event, events, scheduling, schedule, event manager, event calendar, class, concert, conference, meeting, venue, location, box office, tickets, registration
5
Requires at least: 4.0
6
Tested up to: 4.5
7
- Stable tag: 2.4.19
8
Text domain: my-calendar
9
License: GPLv2 or later
10
@@ -108,6 +108,11 @@ Breaking Changes:
108
* Breaking change: upcoming events widget no longer uses ID 'upcoming-events'; use class '.upcoming-events'
109
* Breaking change: today's events widget no longer uses ID 'todays-events'; use class '.todays-events'
110
111
= 2.4.20 =
112
113
* Bug fix: PHP warning triggered on type conversion when toggling time views.
4
Tags: calendar, dates, times, event, events, scheduling, schedule, event manager, event calendar, class, concert, conference, meeting, venue, location, box office, tickets, registration
5
Requires at least: 4.0
6
Tested up to: 4.5
7
+ Stable tag: 2.4.20
8
Text domain: my-calendar
9
License: GPLv2 or later
10
108
* Breaking change: upcoming events widget no longer uses ID 'upcoming-events'; use class '.upcoming-events'
109
* Breaking change: today's events widget no longer uses ID 'todays-events'; use class '.todays-events'
110
111
+ = 2.4.21 =
112
+
113
+ * Bug fix: Google Maps format change to latitude/longitude links
114
+ * Bug fix: Use short description directly as {excerpt} if provided.
115
+
116
= 2.4.20 =
117
118
* Bug fix: PHP warning triggered on type conversion when toggling time views.