The Events Calendar Shortcode - Version 1.7.2

Version Description

  • Adds the ability to use schema='false' in the shortcode to hide the schema output
Download this release

Release Info

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

Code changes from version 1.7.1 to 1.7.2

Files changed (2) hide show
  1. readme.txt +7 -1
  2. the-events-calendar-shortcode.php +4 -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.9
6
- Stable tag: 1.7.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -155,6 +155,9 @@ The [pro version of the plugin](https://eventcalendarnewsletter.com/the-events-c
155
 
156
  == Upgrade Notice ==
157
 
 
 
 
158
  = 1.7.1 =
159
  * Fix for month option where there's an all-day event the first day of the next month
160
  * Fix for "There are no events" string not being translated automatically into other languages
@@ -231,6 +234,9 @@ Fix missing ul
231
 
232
  == Changelog ==
233
 
 
 
 
234
  = 1.7.1 =
235
  * Fix for month option where there's an all-day event the first day of the next month
236
  * Fix for "There are no events" string not being translated automatically into other languages
3
  Tags: event, events, calendar, shortcode, modern tribe
4
  Requires at least: 4.1
5
  Tested up to: 4.9
6
+ Stable tag: 1.7.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
155
 
156
  == Upgrade Notice ==
157
 
158
+ = 1.7.2 =
159
+ * Adds the ability to use schema='false' in the shortcode to hide the schema output
160
+
161
  = 1.7.1 =
162
  * Fix for month option where there's an all-day event the first day of the next month
163
  * Fix for "There are no events" string not being translated automatically into other languages
234
 
235
  == Changelog ==
236
 
237
+ = 1.7.2 =
238
+ * Adds the ability to use schema='false' in the shortcode to hide the schema output
239
+
240
  = 1.7.1 =
241
  * Fix for month option where there's an all-day event the first day of the next month
242
  * Fix for "There are no events" string not being translated automatically into other languages
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 by Modern Tribe</a>.
6
- Version: 1.7.1
7
  Author: Event Calendar Newsletter
8
  Author URI: https://eventcalendarnewsletter.com/the-events-calendar-shortcode
9
  Contributors: brianhogg
@@ -38,7 +38,7 @@ class Events_Calendar_Shortcode
38
  *
39
  * @since 1.0.0
40
  */
41
- const VERSION = '1.7.1';
42
 
43
  private $admin_page = null;
44
 
@@ -149,6 +149,7 @@ class Events_Calendar_Shortcode
149
  'past' => null,
150
  'venue' => 'false',
151
  'author' => null,
 
152
  'message' => 'There are no upcoming %s at this time.',
153
  'key' => 'End Date',
154
  'order' => 'ASC',
@@ -367,7 +368,7 @@ class Events_Calendar_Shortcode
367
  }
368
 
369
  public function add_event_schema_json( $output, $posts, $atts ) {
370
- if ( $posts and class_exists( 'Tribe__Events__JSON_LD__Event' ) and ( ! defined( 'DOING_AJAX' ) or ! DOING_AJAX ) )
371
  $output .= Tribe__Events__JSON_LD__Event::instance()->get_markup( $posts );
372
  return $output;
373
  }
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 by Modern Tribe</a>.
6
+ Version: 1.7.2
7
  Author: Event Calendar Newsletter
8
  Author URI: https://eventcalendarnewsletter.com/the-events-calendar-shortcode
9
  Contributors: brianhogg
38
  *
39
  * @since 1.0.0
40
  */
41
+ const VERSION = '1.7.2';
42
 
43
  private $admin_page = null;
44
 
149
  'past' => null,
150
  'venue' => 'false',
151
  'author' => null,
152
+ 'schema' => 'true',
153
  'message' => 'There are no upcoming %s at this time.',
154
  'key' => 'End Date',
155
  'order' => 'ASC',
368
  }
369
 
370
  public function add_event_schema_json( $output, $posts, $atts ) {
371
+ if ( self::isValid( $atts['schema'] ) and $posts and class_exists( 'Tribe__Events__JSON_LD__Event' ) and ( ! defined( 'DOING_AJAX' ) or ! DOING_AJAX ) )
372
  $output .= Tribe__Events__JSON_LD__Event::instance()->get_markup( $posts );
373
  return $output;
374
  }