Version Description
- Fixed display errors with certain event builder shortcodes.
- Added language folder.
Download this release
Release Info
Developer | pderksen |
Plugin | Simple Calendar – Google Calendar Plugin |
Version | 2.0.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.0 to 2.0.1
- class-google-calendar-events.php +1 -1
- google-calendar-events.php +1 -1
- includes/class-gce-event.php +11 -9
- includes/class-gce-feed.php +3 -1
- readme.txt +5 -0
- views/admin/gce-feed-meta-display.php +7 -3
class-google-calendar-events.php
CHANGED
@@ -18,7 +18,7 @@ class Google_Calendar_Events {
|
|
18 |
*
|
19 |
* @var string
|
20 |
*/
|
21 |
-
protected $version = '2.0.
|
22 |
|
23 |
/**
|
24 |
* Unique identifier for the plugin.
|
18 |
*
|
19 |
* @var string
|
20 |
*/
|
21 |
+
protected $version = '2.0.1';
|
22 |
|
23 |
/**
|
24 |
* Unique identifier for the plugin.
|
google-calendar-events.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
* Plugin Name: Google Calendar Events
|
13 |
* Plugin URI: https://github.com/pderksen/WP-Google-Calendar-Events
|
14 |
* Description: Parses Google Calendar feeds and displays the events as a calendar grid or list on a page, post or widget.
|
15 |
-
* Version: 2.0.
|
16 |
* Author: Phil Derksen
|
17 |
* Author URI: http://philderksen.com
|
18 |
* License: GPL-2.0+
|
12 |
* Plugin Name: Google Calendar Events
|
13 |
* Plugin URI: https://github.com/pderksen/WP-Google-Calendar-Events
|
14 |
* Description: Parses Google Calendar feeds and displays the events as a calendar grid or list on a page, post or widget.
|
15 |
+
* Version: 2.0.1
|
16 |
* Author: Phil Derksen
|
17 |
* Author URI: http://philderksen.com
|
18 |
* License: GPL-2.0+
|
includes/class-gce-event.php
CHANGED
@@ -88,12 +88,7 @@ class GCE_Event {
|
|
88 |
*/
|
89 |
function get_event_markup( $display_type, $num_in_day, $num ) {
|
90 |
|
91 |
-
// First check if we use the builder or not
|
92 |
-
$use_simple = get_post_meta( $this->feed->id, 'gce_display_simple', true );
|
93 |
|
94 |
-
if( empty( $use_simple ) ) {
|
95 |
-
return $this->use_builder();
|
96 |
-
}
|
97 |
|
98 |
|
99 |
//Set the display type (either tooltip or list)
|
@@ -107,6 +102,13 @@ class GCE_Event {
|
|
107 |
|
108 |
$this->time_now = current_time( 'timestamp' );
|
109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
// Setup the markup to return
|
111 |
//$display_options = get_option( 'gce_settings_general' );
|
112 |
|
@@ -362,13 +364,13 @@ class GCE_Event {
|
|
362 |
return $m[1] . '<a href="' . esc_url( $this->link . '&ctz=' . $this->feed->timezone_offset ) . '"' . $new_window . '>' . $this->look_for_shortcodes( $m[5] ) . '</a>' . $m[6];
|
363 |
|
364 |
case 'url':
|
365 |
-
return $m[1] . esc_url( $this->link . '&ctz=' . $this->feed->
|
366 |
|
367 |
case 'feed-id':
|
368 |
-
return $m[1] . intval( $this->feed->
|
369 |
|
370 |
case 'feed-title':
|
371 |
-
return $m[1] . esc_html( $this->feed->
|
372 |
|
373 |
case 'maps-link':
|
374 |
$new_window = ( $newwindow ) ? ' target="_blank"' : '';
|
@@ -384,7 +386,7 @@ class GCE_Event {
|
|
384 |
return $m[1] . esc_html( $this->id ) . $m[6];
|
385 |
|
386 |
case 'cal-id':
|
387 |
-
$cal_id = explode( '/', $this->feed->
|
388 |
return $m[1] . esc_html( $cal_id[5] ) . $m[6];
|
389 |
|
390 |
case 'if-all-day':
|
88 |
*/
|
89 |
function get_event_markup( $display_type, $num_in_day, $num ) {
|
90 |
|
|
|
|
|
91 |
|
|
|
|
|
|
|
92 |
|
93 |
|
94 |
//Set the display type (either tooltip or list)
|
102 |
|
103 |
$this->time_now = current_time( 'timestamp' );
|
104 |
|
105 |
+
// First check if we use the builder or not
|
106 |
+
$use_simple = get_post_meta( $this->feed->id, 'gce_display_simple', true );
|
107 |
+
|
108 |
+
if( empty( $use_simple ) ) {
|
109 |
+
return $this->use_builder();
|
110 |
+
}
|
111 |
+
|
112 |
// Setup the markup to return
|
113 |
//$display_options = get_option( 'gce_settings_general' );
|
114 |
|
364 |
return $m[1] . '<a href="' . esc_url( $this->link . '&ctz=' . $this->feed->timezone_offset ) . '"' . $new_window . '>' . $this->look_for_shortcodes( $m[5] ) . '</a>' . $m[6];
|
365 |
|
366 |
case 'url':
|
367 |
+
return $m[1] . esc_url( $this->link . '&ctz=' . $this->feed->timezone_offset ) . $m[6];
|
368 |
|
369 |
case 'feed-id':
|
370 |
+
return $m[1] . intval( $this->feed->id ) . $m[6];
|
371 |
|
372 |
case 'feed-title':
|
373 |
+
return $m[1] . esc_html( $this->feed->title ) . $m[6];
|
374 |
|
375 |
case 'maps-link':
|
376 |
$new_window = ( $newwindow ) ? ' target="_blank"' : '';
|
386 |
return $m[1] . esc_html( $this->id ) . $m[6];
|
387 |
|
388 |
case 'cal-id':
|
389 |
+
$cal_id = explode( '/', $this->feed->feed_url );
|
390 |
return $m[1] . esc_html( $cal_id[5] ) . $m[6];
|
391 |
|
392 |
case 'if-all-day':
|
includes/class-gce-feed.php
CHANGED
@@ -23,7 +23,8 @@ class GCE_Feed {
|
|
23 |
$multiple_day_events,
|
24 |
$display_url,
|
25 |
$search_query,
|
26 |
-
$expand_recurring
|
|
|
27 |
|
28 |
public $events = array();
|
29 |
|
@@ -76,6 +77,7 @@ class GCE_Feed {
|
|
76 |
$this->multiple_day_events = get_post_meta( $this->id, 'gce_multi_day_events', true );
|
77 |
$this->search_query = get_post_meta( $this->id, 'gce_search_query', true );
|
78 |
$this->expand_recurring = get_post_meta( $this->id, 'gce_expand_recurring', true );
|
|
|
79 |
}
|
80 |
|
81 |
/**
|
23 |
$multiple_day_events,
|
24 |
$display_url,
|
25 |
$search_query,
|
26 |
+
$expand_recurring,
|
27 |
+
$title;
|
28 |
|
29 |
public $events = array();
|
30 |
|
77 |
$this->multiple_day_events = get_post_meta( $this->id, 'gce_multi_day_events', true );
|
78 |
$this->search_query = get_post_meta( $this->id, 'gce_search_query', true );
|
79 |
$this->expand_recurring = get_post_meta( $this->id, 'gce_expand_recurring', true );
|
80 |
+
$this->title = get_the_title( $this->id );
|
81 |
}
|
82 |
|
83 |
/**
|
readme.txt
CHANGED
@@ -77,6 +77,11 @@ There are three ways to install this plugin.
|
|
77 |
|
78 |
== Changelog ==
|
79 |
|
|
|
|
|
|
|
|
|
|
|
80 |
= 2.0.0 =
|
81 |
|
82 |
* Plugin rewritten from scratch.
|
77 |
|
78 |
== Changelog ==
|
79 |
|
80 |
+
= 2.0.1 =
|
81 |
+
|
82 |
+
* Fixed display errors with certain event builder shortcodes.
|
83 |
+
* Added language folder.
|
84 |
+
|
85 |
= 2.0.0 =
|
86 |
|
87 |
* Plugin rewritten from scratch.
|
views/admin/gce-feed-meta-display.php
CHANGED
@@ -57,14 +57,18 @@
|
|
57 |
<th scope="row"><?php _e( 'Feed Shortcode', 'gce' ); ?></th>
|
58 |
<td>
|
59 |
<code>[gcal id="<?php echo $post_id; ?>"]</code>
|
60 |
-
<p class="description"><?php _e( '
|
61 |
</td>
|
62 |
</tr>
|
63 |
<tr>
|
64 |
-
<th scope="row"><label for="gce_feed_url"><?php _e( 'Feed URL', 'gce' ); ?></label></th>
|
65 |
<td>
|
66 |
<input type="text" class="large-text" name="gce_feed_url" id="gce_feed_url" value="<?php echo $gce_feed_url; ?>" />
|
67 |
-
<p class="description"
|
|
|
|
|
|
|
|
|
68 |
</td>
|
69 |
</tr>
|
70 |
|
57 |
<th scope="row"><?php _e( 'Feed Shortcode', 'gce' ); ?></th>
|
58 |
<td>
|
59 |
<code>[gcal id="<?php echo $post_id; ?>"]</code>
|
60 |
+
<p class="description"><?php _e( 'Copy and paste this shortcode to display this Google Calendar feed in any post or page.', 'gce' ); ?></p>
|
61 |
</td>
|
62 |
</tr>
|
63 |
<tr>
|
64 |
+
<th scope="row"><label for="gce_feed_url"><?php _e( 'GCal Feed URL', 'gce' ); ?></label></th>
|
65 |
<td>
|
66 |
<input type="text" class="large-text" name="gce_feed_url" id="gce_feed_url" value="<?php echo $gce_feed_url; ?>" />
|
67 |
+
<p class="description">
|
68 |
+
<?php _e( 'The Google Calendar feed URL.', 'gce' ); ?><br/>
|
69 |
+
<?php _e( 'Example', 'gce' ); ?>: <code>https://www.google.com/calendar/feeds/em3luo1919fjcjum4j874j5ejg%40group.calendar.google.com/public/basic</code><br/>
|
70 |
+
<a href="http://wpdocs.philderksen.com/google-calendar-events/getting-started/find-feed-url/" target="_blank"><?php _e( 'How to find your GCal feed URL', 'gce' ); ?></a>
|
71 |
+
</p>
|
72 |
</td>
|
73 |
</tr>
|
74 |
|