The Events Calendar Shortcode - Version 1.5.2

Version Description

  • Adds 'next' option for showing the next month of events
Download this release

Release Info

Developer brianhogg
Plugin Icon 128x128 The Events Calendar Shortcode
Version 1.5.2
Comparing to
See all releases

Code changes from version 1.5.1 to 1.5.2

Files changed (2) hide show
  1. readme.txt +10 -4
  2. the-events-calendar-shortcode.php +6 -3
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: brianhogg
3
  Tags: event, events, calendar, shortcode, modern tribe
4
  Requires at least: 4.1
5
  Tested up to: 4.7.3
6
- Stable tag: 1.5.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -32,7 +32,7 @@ With this plugin, just add the shortcode on a page to display a list of your eve
32
  * message - Message to show when there are no events. Defaults to 'There are no upcoming events at this time.'
33
  * viewall - Determines whether to show 'View all events' or not. Values can be 'true' or 'false'. Default to 'true' `[ecs-list-events cat='festival' limit='3' order='DESC' viewall='false']`
34
  * contentorder - Manage the order of content with commas. Default to `title, thumbnail, excerpt, date, venue`. `[ecs-list-events cat='festival' limit='3' order='DESC' viewall='false' contentorder='title, thumbnail, excerpt, date, venue']`
35
- * month - Show only specific Month. Type 'current' for displaying current month only `[ecs-list-events cat='festival' month='2015-06']`
36
  * past - Show Outdated Events. `[ecs-list-events cat='festival' past='yes']`
37
  * key - Order with Start Date `[ecs-list-events cat='festival' key='start date']`
38
 
@@ -40,7 +40,7 @@ With this plugin, just add the shortcode on a page to display a list of your eve
40
  <blockquote>
41
  <h4>Additional options and benefits in the pro version</h4>
42
  <ul>
43
- <li>design - Shows improved design by default, or set to 'standard' for the regular one and 'compact' for a more compact listing</li>
44
  <li>days - Specify how many days in the future, for example [ecs-list-events days="1"] for one day or [ecs-list-events days="7"] for one week</li>
45
  <li>date - Show only events for a specific day [ecs-list-events date='2017-04-16']</li>
46
  <li>tag - Filter by one or more tags. Use commas when you want to filter by multiple tags.</li>
@@ -88,7 +88,7 @@ You can then add the `[ecs-list-events]` shortcode to the page or post you want
88
  * message - Message to show when there are no events. Defaults to 'There are no upcoming events at this time.'
89
  * viewall - Determines whether to show 'View all events' or not. Values can be 'true' or 'false'. Default to 'true' `[ecs-list-events cat='festival' limit='3' order='DESC' viewall='false']`
90
  * contentorder - Manage the order of content with commas. Default to `title, thumbnail, excerpt, date, venue`. `[ecs-list-events cat='festival' limit='3' order='DESC' viewall='false' contentorder='title, thumbnail, excerpt, date, venue']`
91
- * month - Show only specific Month. Type 'current' for displaying current month only. `[ecs-list-events cat='festival' month='2015-06']`
92
  * past - Show Outdated Events. `[ecs-list-events cat='festival' past='yes']`
93
  * key - Order with Start Date `[ecs-list-events cat='festival' key='start date']`
94
 
@@ -143,6 +143,9 @@ Put this in the template where you want the events list to display.
143
 
144
  == Upgrade Notice ==
145
 
 
 
 
146
  = 1.5.1 =
147
  * Adds thumbsize option (ie. medium, large, thumbnail, full)
148
 
@@ -198,6 +201,9 @@ Fix missing ul
198
 
199
  == Changelog ==
200
 
 
 
 
201
  = 1.5.1 =
202
  * Adds thumbsize option (ie. medium, large, thumbnail, full)
203
 
3
  Tags: event, events, calendar, shortcode, modern tribe
4
  Requires at least: 4.1
5
  Tested up to: 4.7.3
6
+ Stable tag: 1.5.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
32
  * message - Message to show when there are no events. Defaults to 'There are no upcoming events at this time.'
33
  * viewall - Determines whether to show 'View all events' or not. Values can be 'true' or 'false'. Default to 'true' `[ecs-list-events cat='festival' limit='3' order='DESC' viewall='false']`
34
  * contentorder - Manage the order of content with commas. Default to `title, thumbnail, excerpt, date, venue`. `[ecs-list-events cat='festival' limit='3' order='DESC' viewall='false' contentorder='title, thumbnail, excerpt, date, venue']`
35
+ * month - Show only specific Month. Type `'current'` for displaying current month only or `'next'` for next month `[ecs-list-events cat='festival' month='2015-06']`
36
  * past - Show Outdated Events. `[ecs-list-events cat='festival' past='yes']`
37
  * key - Order with Start Date `[ecs-list-events cat='festival' key='start date']`
38
 
40
  <blockquote>
41
  <h4>Additional options and benefits in the pro version</h4>
42
  <ul>
43
+ <li>design - Shows <a href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode#designs?utm_source=wordpress.org&utm_medium=link&utm_campaign=tecs-readme-design&utm_content=description" target="_blank">improved design by default</a>, 'compact' for a more compact listing, or 'grouped' to group events by day</li>
44
  <li>days - Specify how many days in the future, for example [ecs-list-events days="1"] for one day or [ecs-list-events days="7"] for one week</li>
45
  <li>date - Show only events for a specific day [ecs-list-events date='2017-04-16']</li>
46
  <li>tag - Filter by one or more tags. Use commas when you want to filter by multiple tags.</li>
88
  * message - Message to show when there are no events. Defaults to 'There are no upcoming events at this time.'
89
  * viewall - Determines whether to show 'View all events' or not. Values can be 'true' or 'false'. Default to 'true' `[ecs-list-events cat='festival' limit='3' order='DESC' viewall='false']`
90
  * contentorder - Manage the order of content with commas. Default to `title, thumbnail, excerpt, date, venue`. `[ecs-list-events cat='festival' limit='3' order='DESC' viewall='false' contentorder='title, thumbnail, excerpt, date, venue']`
91
+ * month - Show only specific month (in YYYY-MM format). Type `'current'` for displaying current month only or `'next'` for next month. `[ecs-list-events cat='festival' month='2015-06']`
92
  * past - Show Outdated Events. `[ecs-list-events cat='festival' past='yes']`
93
  * key - Order with Start Date `[ecs-list-events cat='festival' key='start date']`
94
 
143
 
144
  == Upgrade Notice ==
145
 
146
+ = 1.5.2 =
147
+ * Adds 'next' option for showing the next month of events
148
+
149
  = 1.5.1 =
150
  * Adds thumbsize option (ie. medium, large, thumbnail, full)
151
 
201
 
202
  == Changelog ==
203
 
204
+ = 1.5.2 =
205
+ * Adds 'next' option for showing the next month of events
206
+
207
  = 1.5.1 =
208
  * Adds thumbsize option (ie. medium, large, thumbnail, full)
209
 
the-events-calendar-shortcode.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: The Events Calendar Shortcode
4
  Plugin URI: https://eventcalendarnewsletter.com/the-events-calendar-shortcode/
5
  Description: An addon to add shortcode functionality for <a href="http://wordpress.org/plugins/the-events-calendar/">The Events Calendar Plugin (Free Version) by Modern Tribe</a>.
6
- Version: 1.5.1
7
  Author: Event Calendar Newsletter
8
  Author URI: https://eventcalendarnewsletter.com/the-events-calendar-shortcode/
9
  Contributors: Brainchild Media Group, Reddit user miahelf, tallavic, hejeva2
@@ -38,7 +38,7 @@ class Events_Calendar_Shortcode
38
  *
39
  * @since 1.0.0
40
  */
41
- const VERSION = '1.5.1';
42
 
43
  private $admin_page = null;
44
 
@@ -210,9 +210,12 @@ class Events_Calendar_Shortcode
210
  );
211
 
212
  // Specific Month
213
- if ( $atts['month'] == 'current' ) {
214
  $atts['month'] = current_time( 'Y-m' );
215
  }
 
 
 
216
  if ($atts['month']) {
217
  $month_array = explode("-", $atts['month']);
218
 
3
  Plugin Name: The Events Calendar Shortcode
4
  Plugin URI: https://eventcalendarnewsletter.com/the-events-calendar-shortcode/
5
  Description: An addon to add shortcode functionality for <a href="http://wordpress.org/plugins/the-events-calendar/">The Events Calendar Plugin (Free Version) by Modern Tribe</a>.
6
+ Version: 1.5.2
7
  Author: Event Calendar Newsletter
8
  Author URI: https://eventcalendarnewsletter.com/the-events-calendar-shortcode/
9
  Contributors: Brainchild Media Group, Reddit user miahelf, tallavic, hejeva2
38
  *
39
  * @since 1.0.0
40
  */
41
+ const VERSION = '1.5.2';
42
 
43
  private $admin_page = null;
44
 
210
  );
211
 
212
  // Specific Month
213
+ if ( 'current' == $atts['month'] ) {
214
  $atts['month'] = current_time( 'Y-m' );
215
  }
216
+ if ( 'next' == $atts['month'] ) {
217
+ $atts['month'] = date( 'Y-m', strtotime( '+1 months', current_time( 'timestamp' ) ) );
218
+ }
219
  if ($atts['month']) {
220
  $month_array = explode("-", $atts['month']);
221