The Events Calendar Shortcode - Version 2.5.6

Version Description

  • Fix translations for "There are no upcoming events" and "View all events" since The Events Calendar 6.x
Download this release

Release Info

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

Code changes from version 2.5.5 to 2.5.6

Files changed (3) hide show
  1. changelog.txt +16 -0
  2. readme.txt +5 -2
  3. the-events-calendar-shortcode.php +134 -132
changelog.txt CHANGED
@@ -1,3 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  = 2.5.2 =
2
  * Initial workaround for styling issues for the block in the new full-site editor
3
 
1
+ = 2.5.6 =
2
+ * Fix translations for "There are no upcoming events" and "View all events" since The Events Calendar 6.x
3
+
4
+ = 2.5.5 =
5
+ * Fix warning message on the Widgets page
6
+ * Fix saving the thumbnail settings when using the block
7
+
8
+ = 2.5.4.1 =
9
+ * Reducing permission requirement for instructions page (Authors)
10
+
11
+ = 2.5.4 =
12
+ * Fix broken settings page link
13
+
14
+ = 2.5.3 =
15
+ * Fix for month="next" when near the end of a month
16
+
17
  = 2.5.2 =
18
  * Initial workaround for styling issues for the block in the new full-site editor
19
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: brianhogg
3
  Tags: event, events, calendar, shortcode, modern tribe
4
  Requires at least: 5.6
5
  Requires PHP: 5.3
6
- Tested up to: 6.0
7
- Stable tag: 2.5.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -180,6 +180,9 @@ The [pro version of the plugin](https://eventcalendarnewsletter.com/the-events-c
180
 
181
  == Upgrade Notice ==
182
 
 
 
 
183
  = 2.5.5 =
184
  * Fix warning message on the Widgets page
185
  * Fix saving the thumbnail settings when using the block
3
  Tags: event, events, calendar, shortcode, modern tribe
4
  Requires at least: 5.6
5
  Requires PHP: 5.3
6
+ Tested up to: 6.1
7
+ Stable tag: 2.5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
180
 
181
  == Upgrade Notice ==
182
 
183
+ = 2.5.6 =
184
+ * Fix translations for "There are no upcoming events" and "View all events" since The Events Calendar 6.x
185
+
186
  = 2.5.5 =
187
  * Fix warning message on the Widgets page
188
  * Fix saving the thumbnail settings when using the block
the-events-calendar-shortcode.php CHANGED
@@ -3,14 +3,16 @@
3
  Plugin Name: The Events Calendar Shortcode & Block
4
  Plugin URI: https://eventcalendarnewsletter.com/the-events-calendar-shortcode/
5
  Description: An addon to add shortcode and new editor block functionality for The Events Calendar Plugin by Modern Tribe.
6
- Version: 2.5.5
7
  Author: Event Calendar Newsletter
8
  Author URI: https://eventcalendarnewsletter.com/the-events-calendar-shortcode
9
  Contributors: brianhogg
10
  License: GPL2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  Text Domain: the-events-calendar-shortcode
13
- */
 
 
14
 
15
  // Avoid direct calls to this file
16
  if ( !defined( 'ABSPATH' ) ) {
@@ -55,7 +57,7 @@ if ( ! class_exists( 'Events_Calendar_Shortcode' ) ) {
55
  *
56
  * @since 1.0.0
57
  */
58
- const VERSION = '2.5.5';
59
 
60
  private $admin_page = null;
61
 
@@ -159,28 +161,28 @@ if ( ! class_exists( 'Events_Calendar_Shortcode' ) ) {
159
  $output = '';
160
 
161
  $atts = shortcode_atts( apply_filters( 'ecs_shortcode_atts', array(
162
- 'cat' => '',
163
- 'month' => '',
164
- 'limit' => 5,
165
- 'eventdetails' => 'true',
166
- 'time' => null,
167
- 'past' => null,
168
- 'venue' => 'false',
169
- 'author' => null,
170
- 'schema' => 'true',
171
- 'message' => 'There are no upcoming %s at this time.',
172
- 'key' => 'End Date',
173
- 'order' => 'ASC',
174
- 'orderby' => 'startdate',
175
- 'viewall' => 'false',
176
- 'excerpt' => 'false',
177
- 'thumb' => 'false',
178
- 'thumbsize' => '',
179
- 'thumbwidth' => '',
180
- 'thumbheight' => '',
181
- 'contentorder' => apply_filters( 'ecs_default_contentorder', 'title, thumbnail, excerpt, date, venue', $atts ),
182
- 'event_tax' => '',
183
- ), $atts ), $atts, 'ecs-list-events' );
184
 
185
  // Category
186
  if ( $atts['cat'] ) {
@@ -192,23 +194,23 @@ if ( ! class_exists( 'Events_Calendar_Shortcode' ) ) {
192
  }
193
 
194
  $atts['event_tax'] = array(
195
- 'relation' => 'OR',
196
- );
197
 
198
  foreach ( $atts['cats'] as $cat ) {
199
  $atts['event_tax'][] = array(
200
- 'relation' => 'OR',
201
- array(
202
- 'taxonomy' => 'tribe_events_cat',
203
- 'field' => 'name',
204
- 'terms' => $cat,
205
- ),
206
- array(
207
- 'taxonomy' => 'tribe_events_cat',
208
- 'field' => 'slug',
209
- 'terms' => $cat,
210
- ),
211
- );
212
  }
213
  }
214
 
@@ -238,13 +240,13 @@ if ( ! class_exists( 'Events_Calendar_Shortcode' ) ) {
238
 
239
  // Date
240
  $atts['meta_date'] = array(
241
- array(
242
- 'key' => $atts['key'],
243
- 'value' => $meta_date_date,
244
- 'compare' => $meta_date_compare,
245
- 'type' => 'DATETIME',
246
- ),
247
- );
248
 
249
  // Specific Month
250
  if ( 'current' == $atts['month'] ) {
@@ -263,35 +265,35 @@ if ( ! class_exists( 'Events_Calendar_Shortcode' ) ) {
263
  $month_enddate = date( 'Y-m-01', strtotime( '+1 month', strtotime( $month_startdate ) ) );
264
 
265
  $atts['meta_date'] = array(
266
- 'relation' => 'AND',
267
- array(
268
- 'key' => $atts['key'],
269
- 'value' => $month_startdate,
270
- 'compare' => '>=',
271
- 'type' => 'DATETIME',
272
- ),
273
- array(
274
- 'key' => $atts['key'],
275
- 'value' => $month_enddate,
276
- 'compare' => '<',
277
- 'type' => 'DATETIME',
278
- ),
279
- );
280
  }
281
 
282
  $atts = apply_filters( 'ecs_atts_pre_query', $atts, $meta_date_date, $meta_date_compare );
283
  $args = apply_filters( 'ecs_get_events_args', array(
284
- 'post_status' => 'publish',
285
- 'hide_upcoming' => true,
286
- 'posts_per_page' => $atts['limit'],
287
- 'tax_query' => $atts['event_tax'],
288
- // Likely want to revamp this logic and separate the ordering from the date filtering
289
- 'meta_key' => ( ( trim( $atts['orderby'] ) and 'title' != $atts['orderby'] ) ? $atts['orderby'] : $atts['key'] ),
290
- 'orderby' => ( $atts['orderby'] == 'title' ? 'title' : 'event_date' ),
291
- 'author' => $atts['author'],
292
- 'order' => $atts['order'],
293
- 'meta_query' => apply_filters( 'ecs_get_meta_query', array( $atts['meta_date'] ), $atts, $meta_date_date, $meta_date_compare ),
294
- ), $atts, $meta_date_date, $meta_date_compare );
295
 
296
  $posts = tribe_get_events( $args );
297
  $posts = apply_filters( 'ecs_filter_events_after_get', $posts, $atts );
@@ -322,63 +324,63 @@ if ( ! class_exists( 'Events_Calendar_Shortcode' ) ) {
322
  // Put Values into $event_output
323
  foreach ( apply_filters( 'ecs_event_contentorder', $atts['contentorder'], $atts, $post ) as $contentorder ) {
324
  switch ( trim( $contentorder ) ) {
325
- case 'title':
326
- $event_output .= apply_filters( 'ecs_event_title_tag_start', '<h4 class="entry-title summary">', $atts, $post ) .
327
- apply_filters( 'ecs_event_list_title_link_start', '<a href="' . tribe_get_event_link() . '" rel="bookmark">', $atts, $post ) . apply_filters( 'ecs_event_list_title', get_the_title(), $atts, $post ) . apply_filters( 'ecs_event_list_title_link_end', '</a>', $atts, $post ) .
328
- apply_filters( 'ecs_event_title_tag_end', '</h4>', $atts, $post );
329
- break;
330
-
331
- case 'thumbnail':
332
- if ( self::isValid( $atts['thumb'] ) ) {
333
- $thumbWidth = is_numeric( $atts['thumbwidth'] ) ? $atts['thumbwidth'] : '';
334
- $thumbHeight = is_numeric( $atts['thumbheight'] ) ? $atts['thumbheight'] : '';
335
- if ( !empty( $thumbWidth ) && !empty( $thumbHeight ) ) {
336
- $event_output .= apply_filters( 'ecs_event_thumbnail', get_the_post_thumbnail( get_the_ID(), apply_filters( 'ecs_event_thumbnail_size', array( $thumbWidth, $thumbHeight ), $atts, $post ) ), $atts, $post );
337
- } else {
338
- if ( $thumb = get_the_post_thumbnail( get_the_ID(), apply_filters( 'ecs_event_thumbnail_size', ( trim( $atts['thumbsize'] ) ? trim( $atts['thumbsize'] ) : 'medium' ), $atts, $post ) ) ) {
339
- $event_output .= apply_filters( 'ecs_event_thumbnail_link_start', '<a href="' . tribe_get_event_link() . '">', $atts, $post );
340
- $event_output .= apply_filters( 'ecs_event_thumbnail', $thumb, $atts, $post );
341
- $event_output .= apply_filters( 'ecs_event_thumbnail_link_end', '</a>', $atts, $post );
 
342
  }
343
  }
344
- }
345
- break;
346
-
347
- case 'excerpt':
348
- if ( self::isValid( $atts['excerpt'] ) ) {
349
- $excerptLength = is_numeric( $atts['excerpt'] ) ? intval( $atts['excerpt'] ) : 100;
350
- $event_output .= apply_filters( 'ecs_event_excerpt_tag_start', '<p class="ecs-excerpt">', $atts, $post ) .
351
- apply_filters( 'ecs_event_excerpt', self::get_excerpt( $excerptLength ), $atts, $post, $excerptLength ) .
352
- apply_filters( 'ecs_event_excerpt_tag_end', '</p>', $atts, $post );
353
- }
354
- break;
355
-
356
- case 'date':
357
- if ( self::isValid( $atts['eventdetails'] ) ) {
358
- $event_output .= apply_filters( 'ecs_event_date_tag_start', '<span class="duration time">', $atts, $post ) .
359
- apply_filters( 'ecs_event_list_details', tribe_events_event_schedule_details(), $atts, $post ) .
360
- apply_filters( 'ecs_event_date_tag_end', '</span>', $atts, $post );
361
- }
362
- break;
363
-
364
- case 'venue':
365
- if ( self::isValid( $atts['venue'] ) and function_exists( 'tribe_has_venue' ) and tribe_has_venue() ) {
366
- $event_output .= apply_filters( 'ecs_event_venue_tag_start', '<span class="duration venue">', $atts, $post ) .
367
- apply_filters( 'ecs_event_venue_at_tag_start', '<em> ', $atts, $post ) .
368
- apply_filters( 'ecs_event_venue_at_text', __( 'at', 'the-events-calendar-shortcode' ), $atts, $post ) .
369
- apply_filters( 'ecs_event_venue_at_tag_end', ' </em>', $atts, $post ) .
370
- apply_filters( 'ecs_event_list_venue', tribe_get_venue(), $atts, $post ) .
371
- apply_filters( 'ecs_event_venue_tag_end', '</span>', $atts, $post );
372
- }
373
- break;
374
- case 'date_thumb':
375
- if ( self::isValid( $atts['eventdetails'] ) ) {
376
- $event_output .= apply_filters( 'ecs_event_date_thumb', '<div class="date_thumb"><div class="month">' . tribe_get_start_date( null, false, 'M' ) . '</div><div class="day">' . tribe_get_start_date( null, false, 'j' ) . '</div></div>', $atts, $post );
377
- }
378
- break;
379
- default:
380
- $event_output .= apply_filters( 'ecs_event_list_output_custom_' . strtolower( trim( $contentorder ) ), '', $atts, $post );
381
- }
382
  }
383
  $event_output .= apply_filters( 'ecs_event_end_tag', '</li>', $atts, $post );
384
  $output .= apply_filters( 'ecs_single_event_output', $event_output, $atts, $post, $post_index, $posts );
@@ -387,13 +389,13 @@ if ( ! class_exists( 'Events_Calendar_Shortcode' ) ) {
387
  $output = apply_filters( 'ecs_ending_output', $output, $posts, $atts );
388
 
389
  if ( self::isValid( $atts['viewall'] ) ) {
390
- $output .= apply_filters( 'ecs_view_all_events_tag_start', '<span class="ecs-all-events">', $atts ) .
391
- '<a href="' . apply_filters( 'ecs_event_list_viewall_link', tribe_get_events_link(), $atts ) . '" rel="bookmark">' . apply_filters( 'ecs_view_all_events_text', sprintf( __( 'View All %s', 'the-events-calendar' ), tribe_get_event_label_plural() ), $atts ) . '</a>';
392
- $output .= apply_filters( 'ecs_view_all_events_tag_end', '</span>' );
393
  }
394
- } else { //No Events were Found
395
- $output .= '<div class="ecs-no-events">' . apply_filters( 'ecs_no_events_found_message', sprintf( translate( $atts['message'], 'the-events-calendar' ), tribe_get_event_label_plural_lowercase() ), $atts ) . '</div>';
396
- } // endif
397
 
398
  wp_reset_postdata();
399
 
3
  Plugin Name: The Events Calendar Shortcode & Block
4
  Plugin URI: https://eventcalendarnewsletter.com/the-events-calendar-shortcode/
5
  Description: An addon to add shortcode and new editor block functionality for The Events Calendar Plugin by Modern Tribe.
6
+ Version: 2.5.6
7
  Author: Event Calendar Newsletter
8
  Author URI: https://eventcalendarnewsletter.com/the-events-calendar-shortcode
9
  Contributors: brianhogg
10
  License: GPL2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  Text Domain: the-events-calendar-shortcode
13
+ Requires at least: 5.6
14
+ Requires PHP: 5.3
15
+ */
16
 
17
  // Avoid direct calls to this file
18
  if ( !defined( 'ABSPATH' ) ) {
57
  *
58
  * @since 1.0.0
59
  */
60
+ const VERSION = '2.5.6';
61
 
62
  private $admin_page = null;
63
 
161
  $output = '';
162
 
163
  $atts = shortcode_atts( apply_filters( 'ecs_shortcode_atts', array(
164
+ 'cat' => '',
165
+ 'month' => '',
166
+ 'limit' => 5,
167
+ 'eventdetails' => 'true',
168
+ 'time' => null,
169
+ 'past' => null,
170
+ 'venue' => 'false',
171
+ 'author' => null,
172
+ 'schema' => 'true',
173
+ 'message' => 'There are no upcoming %1$s.',
174
+ 'key' => 'End Date',
175
+ 'order' => 'ASC',
176
+ 'orderby' => 'startdate',
177
+ 'viewall' => 'false',
178
+ 'excerpt' => 'false',
179
+ 'thumb' => 'false',
180
+ 'thumbsize' => '',
181
+ 'thumbwidth' => '',
182
+ 'thumbheight' => '',
183
+ 'contentorder' => apply_filters( 'ecs_default_contentorder', 'title, thumbnail, excerpt, date, venue', $atts ),
184
+ 'event_tax' => '',
185
+ ), $atts ), $atts, 'ecs-list-events' );
186
 
187
  // Category
188
  if ( $atts['cat'] ) {
194
  }
195
 
196
  $atts['event_tax'] = array(
197
+ 'relation' => 'OR',
198
+ );
199
 
200
  foreach ( $atts['cats'] as $cat ) {
201
  $atts['event_tax'][] = array(
202
+ 'relation' => 'OR',
203
+ array(
204
+ 'taxonomy' => 'tribe_events_cat',
205
+ 'field' => 'name',
206
+ 'terms' => $cat,
207
+ ),
208
+ array(
209
+ 'taxonomy' => 'tribe_events_cat',
210
+ 'field' => 'slug',
211
+ 'terms' => $cat,
212
+ ),
213
+ );
214
  }
215
  }
216
 
240
 
241
  // Date
242
  $atts['meta_date'] = array(
243
+ array(
244
+ 'key' => $atts['key'],
245
+ 'value' => $meta_date_date,
246
+ 'compare' => $meta_date_compare,
247
+ 'type' => 'DATETIME',
248
+ ),
249
+ );
250
 
251
  // Specific Month
252
  if ( 'current' == $atts['month'] ) {
265
  $month_enddate = date( 'Y-m-01', strtotime( '+1 month', strtotime( $month_startdate ) ) );
266
 
267
  $atts['meta_date'] = array(
268
+ 'relation' => 'AND',
269
+ array(
270
+ 'key' => $atts['key'],
271
+ 'value' => $month_startdate,
272
+ 'compare' => '>=',
273
+ 'type' => 'DATETIME',
274
+ ),
275
+ array(
276
+ 'key' => $atts['key'],
277
+ 'value' => $month_enddate,
278
+ 'compare' => '<',
279
+ 'type' => 'DATETIME',
280
+ ),
281
+ );
282
  }
283
 
284
  $atts = apply_filters( 'ecs_atts_pre_query', $atts, $meta_date_date, $meta_date_compare );
285
  $args = apply_filters( 'ecs_get_events_args', array(
286
+ 'post_status' => 'publish',
287
+ 'hide_upcoming' => true,
288
+ 'posts_per_page' => $atts['limit'],
289
+ 'tax_query' => $atts['event_tax'],
290
+ // Likely want to revamp this logic and separate the ordering from the date filtering
291
+ 'meta_key' => ( ( trim( $atts['orderby'] ) and 'title' != $atts['orderby'] ) ? $atts['orderby'] : $atts['key'] ),
292
+ 'orderby' => ( $atts['orderby'] == 'title' ? 'title' : 'event_date' ),
293
+ 'author' => $atts['author'],
294
+ 'order' => $atts['order'],
295
+ 'meta_query' => apply_filters( 'ecs_get_meta_query', array( $atts['meta_date'] ), $atts, $meta_date_date, $meta_date_compare ),
296
+ ), $atts, $meta_date_date, $meta_date_compare );
297
 
298
  $posts = tribe_get_events( $args );
299
  $posts = apply_filters( 'ecs_filter_events_after_get', $posts, $atts );
324
  // Put Values into $event_output
325
  foreach ( apply_filters( 'ecs_event_contentorder', $atts['contentorder'], $atts, $post ) as $contentorder ) {
326
  switch ( trim( $contentorder ) ) {
327
+ case 'title':
328
+ $event_output .= apply_filters( 'ecs_event_title_tag_start', '<h4 class="entry-title summary">', $atts, $post ) .
329
+ apply_filters( 'ecs_event_list_title_link_start', '<a href="' . tribe_get_event_link() . '" rel="bookmark">', $atts, $post ) . apply_filters( 'ecs_event_list_title', get_the_title(), $atts, $post ) . apply_filters( 'ecs_event_list_title_link_end', '</a>', $atts, $post ) .
330
+ apply_filters( 'ecs_event_title_tag_end', '</h4>', $atts, $post );
331
+ break;
332
+
333
+ case 'thumbnail':
334
+ if ( self::isValid( $atts['thumb'] ) ) {
335
+ $thumbWidth = is_numeric( $atts['thumbwidth'] ) ? $atts['thumbwidth'] : '';
336
+ $thumbHeight = is_numeric( $atts['thumbheight'] ) ? $atts['thumbheight'] : '';
337
+ if ( !empty( $thumbWidth ) && !empty( $thumbHeight ) ) {
338
+ $event_output .= apply_filters( 'ecs_event_thumbnail', get_the_post_thumbnail( get_the_ID(), apply_filters( 'ecs_event_thumbnail_size', array( $thumbWidth, $thumbHeight ), $atts, $post ) ), $atts, $post );
339
+ } else {
340
+ if ( $thumb = get_the_post_thumbnail( get_the_ID(), apply_filters( 'ecs_event_thumbnail_size', ( trim( $atts['thumbsize'] ) ? trim( $atts['thumbsize'] ) : 'medium' ), $atts, $post ) ) ) {
341
+ $event_output .= apply_filters( 'ecs_event_thumbnail_link_start', '<a href="' . tribe_get_event_link() . '">', $atts, $post );
342
+ $event_output .= apply_filters( 'ecs_event_thumbnail', $thumb, $atts, $post );
343
+ $event_output .= apply_filters( 'ecs_event_thumbnail_link_end', '</a>', $atts, $post );
344
+ }
345
  }
346
  }
347
+ break;
348
+
349
+ case 'excerpt':
350
+ if ( self::isValid( $atts['excerpt'] ) ) {
351
+ $excerptLength = is_numeric( $atts['excerpt'] ) ? intval( $atts['excerpt'] ) : 100;
352
+ $event_output .= apply_filters( 'ecs_event_excerpt_tag_start', '<p class="ecs-excerpt">', $atts, $post ) .
353
+ apply_filters( 'ecs_event_excerpt', self::get_excerpt( $excerptLength ), $atts, $post, $excerptLength ) .
354
+ apply_filters( 'ecs_event_excerpt_tag_end', '</p>', $atts, $post );
355
+ }
356
+ break;
357
+
358
+ case 'date':
359
+ if ( self::isValid( $atts['eventdetails'] ) ) {
360
+ $event_output .= apply_filters( 'ecs_event_date_tag_start', '<span class="duration time">', $atts, $post ) .
361
+ apply_filters( 'ecs_event_list_details', tribe_events_event_schedule_details(), $atts, $post ) .
362
+ apply_filters( 'ecs_event_date_tag_end', '</span>', $atts, $post );
363
+ }
364
+ break;
365
+
366
+ case 'venue':
367
+ if ( self::isValid( $atts['venue'] ) and function_exists( 'tribe_has_venue' ) and tribe_has_venue() ) {
368
+ $event_output .= apply_filters( 'ecs_event_venue_tag_start', '<span class="duration venue">', $atts, $post ) .
369
+ apply_filters( 'ecs_event_venue_at_tag_start', '<em> ', $atts, $post ) .
370
+ apply_filters( 'ecs_event_venue_at_text', __( 'at', 'the-events-calendar-shortcode' ), $atts, $post ) .
371
+ apply_filters( 'ecs_event_venue_at_tag_end', ' </em>', $atts, $post ) .
372
+ apply_filters( 'ecs_event_list_venue', tribe_get_venue(), $atts, $post ) .
373
+ apply_filters( 'ecs_event_venue_tag_end', '</span>', $atts, $post );
374
+ }
375
+ break;
376
+ case 'date_thumb':
377
+ if ( self::isValid( $atts['eventdetails'] ) ) {
378
+ $event_output .= apply_filters( 'ecs_event_date_thumb', '<div class="date_thumb"><div class="month">' . tribe_get_start_date( null, false, 'M' ) . '</div><div class="day">' . tribe_get_start_date( null, false, 'j' ) . '</div></div>', $atts, $post );
379
+ }
380
+ break;
381
+ default:
382
+ $event_output .= apply_filters( 'ecs_event_list_output_custom_' . strtolower( trim( $contentorder ) ), '', $atts, $post );
383
+ }
 
384
  }
385
  $event_output .= apply_filters( 'ecs_event_end_tag', '</li>', $atts, $post );
386
  $output .= apply_filters( 'ecs_single_event_output', $event_output, $atts, $post, $post_index, $posts );
389
  $output = apply_filters( 'ecs_ending_output', $output, $posts, $atts );
390
 
391
  if ( self::isValid( $atts['viewall'] ) ) {
392
+ $output .= apply_filters( 'ecs_view_all_events_tag_start', '<div class="ecs-view-all-events"><span class="ecs-all-events">', $atts ) .
393
+ '<a href="' . apply_filters( 'ecs_event_list_viewall_link', tribe_get_events_link(), $atts ) . '" rel="bookmark">' . apply_filters( 'ecs_view_all_events_text', sprintf( __( 'View all %s', 'the-events-calendar' ), tribe_get_event_label_plural_lowercase() ), $atts ) . '</a>';
394
+ $output .= apply_filters( 'ecs_view_all_events_tag_end', '</span></div>' );
395
  }
396
+ } else {
397
+ $output .= '<div class="ecs-no-events">' . apply_filters( 'ecs_no_events_found_message', sprintf( _x( $atts['message'], 'A message to indicate there are no upcoming events.', 'the-events-calendar' ), tribe_get_event_label_plural_lowercase() ), $atts ) . '</div>';
398
+ }
399
 
400
  wp_reset_postdata();
401