The Events Calendar Shortcode - Version 2.2

Version Description

= 2.1 = * Disables the new WP editor block if Cornerstone page builder is active due to incompatibilities

= 2.0.2 = * Additional check if wp_set_script_translations exists (not with the Gutenberg plugin)

= 2.0.1 = * Tweaks to handling of default values in the block

= 2.0 = * Adds a block in addition to the shortcode that can be used with the new WordPress editor (as of version 5.0) or Gutenberg plugin

= 1.10.1 = * Fixing error with very old versions of PHP

= 1.10 = * Fix for multi-word category names not working with the "cat" option * Option to show "powered by" link

= 1.9 = * Adds check for minimum WordPress and PHP version * Adds a link to a short tutorial video * Changes first example shortcode so it's easier to copy/paste

= 1.8 = * Adds new orderby='title' option * Fixes resetting the WordPress global query instead of just the post data

= 1.7.3 = * Hide the "at" when using venue='true' and an event has no venue * Adds additional WordPress filters to hide certain events

= 1.7.2 = * Adds the ability to use schema='false' in the shortcode to hide the schema output

= 1.7.1 = * Fix for month option where there's an all-day event the first day of the next month * Fix for "There are no events" string not being translated automatically into other languages

= 1.7 = * Adds structured data to the shortcode output (great for SEO and people finding your events)

= 1.6.1 = * Added ecs-featured-event class if event is featured * Internal changes to filtering by one or more categories

= 1.6 = * Changes default ordering by the start date, use orderby="enddate" for previous default ordering

= 1.5.3 = * Fixes translation of the "View all events" link into other languages * Adds orderby parameter to order by start date, but still show events until the end date has passed

= 1.5.2 = * Adds 'next' option for showing the next month of events

= 1.5.1 = * Adds thumbsize option (ie. medium, large, thumbnail, full)

= 1.5 = * Adds ability to translate the plugin into local languages * Additional description of options

= 1.4.2 = * Additional filter for changing the link for an event * Adds category CSS classes for each event, so you can format each category differently

= 1.4.1 = * Additional filters for formatting a single event

= 1.4 = * Checks for whether The Events Calendar is installed * Additional filters * Improved design of shortcode help page

= 1.3 = * Fixes issue with "viewall" showing the events twice * Fixes time zone issue by using current_time() instead of date() * Hides events that are marked 'hide from listing' * Switches to tribe_get_events() to get the events * Removes the ... from the end of the excerpt if less than the excerpt length * Adds date_thumb option * Adds additional filters

= 1.2 = * Updates author/description (Event Calendar Newsletter / Brian Hogg Consulting)

= 1.0.11 = Add Link to Thumbnail merge pull request from d4mation -Replaced extracted variables with $atts as using extract was deprecated =1.0.10 = Minor Error Change - fix name and slug = 1.0.9 = Minor Error Change - Multiple Categories = 1.0.8 = Add options : multi-categories - Thanks to sujin2f = 1.0.7 = Add options : contentorder, month, past, key - Thanks to sujin2f = 1.0.6 = Fix missing ul = 1.0.5 = * Add excerpt and thumbnail - Thanks to ankitpokhrel = 1.0.2 = * Add venue to shortcode - Thanks to ankitpokhrel = 1.0.1 = * Fix Firefox browser compatibility issue = 1 = * Initial Release

Download this release

Release Info

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

Code changes from version 2.1 to 2.2

Files changed (3) hide show
  1. block/init.php +10 -5
  2. readme.txt +66 -48
  3. the-events-calendar-shortcode.php +2 -2
block/init.php CHANGED
@@ -14,8 +14,13 @@ function ecs_register_block() {
14
  return;
15
  }
16
 
17
- wp_register_script(
18
- 'ecs-block',
 
 
 
 
 
19
  plugins_url( 'static/block.js', dirname( __FILE__ ) ),
20
  array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ),
21
  Events_Calendar_Shortcode::VERSION
@@ -26,7 +31,7 @@ function ecs_register_block() {
26
  }
27
 
28
  wp_register_style(
29
- 'ecs-block',
30
  plugins_url( 'static/ecs-block.css', dirname( __FILE__ ) ),
31
  array(),
32
  Events_Calendar_Shortcode::VERSION
@@ -73,8 +78,8 @@ function ecs_register_block() {
73
  ) );
74
 
75
  register_block_type( 'events-calendar-shortcode/block', array(
76
- 'style' => 'ecs-block',
77
- 'script' => 'ecs-block',
78
  'render_callback' => 'ecs_render_block',
79
  'attributes' => $attributes,
80
  ) );
14
  return;
15
  }
16
 
17
+ // Avoid loading if Divi (or other elegant themes) are activated due to core JS conflicts
18
+ if ( defined( 'ET_CORE_PATH' ) || function_exists( 'et_setup_theme' ) ) {
19
+ return;
20
+ }
21
+
22
+ wp_register_script(
23
+ 'ecs-block-js',
24
  plugins_url( 'static/block.js', dirname( __FILE__ ) ),
25
  array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ),
26
  Events_Calendar_Shortcode::VERSION
31
  }
32
 
33
  wp_register_style(
34
+ 'ecs-block-css',
35
  plugins_url( 'static/ecs-block.css', dirname( __FILE__ ) ),
36
  array(),
37
  Events_Calendar_Shortcode::VERSION
78
  ) );
79
 
80
  register_block_type( 'events-calendar-shortcode/block', array(
81
+ 'editor_style' => 'ecs-block-css',
82
+ 'editor_script' => 'ecs-block-js',
83
  'render_callback' => 'ecs_render_block',
84
  'attributes' => $attributes,
85
  ) );
readme.txt CHANGED
@@ -2,67 +2,83 @@
2
  Contributors: brianhogg
3
  Tags: event, events, calendar, shortcode, modern tribe
4
  Requires at least: 4.1
5
- Tested up to: 5.1
6
- Stable tag: 2.1
 
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
- Adds shortcode and block functionality to The Events Calendar Plugin (Free Version) by Modern Tribe, so you can list your events anywhere.
11
 
12
  == Description ==
13
 
14
- This plugin adds a shortcode and a block for use with The Events Calendar Plugin (by Modern Tribe).
15
 
16
- With this plugin either add the block in the new editor, or just add the shortcode on a page to display a list of your events. For example to show next 8 events in the category festival:
17
 
18
- `[ecs-list-events cat="festival" limit="8"]`
 
 
19
 
20
  [youtube https://www.youtube.com/watch?v=_hpfuoa6MZM]
21
 
22
- = Shortcode and Block Options: =
23
- * Basic shortcode: `[ecs-list-events]`
24
- * cat - Represents single event category. `[ecs-list-events cat='festival']` Use commas when you want multiple categories `[ecs-list-events cat='festival, workshops']`
25
- * limit - Total number of events to show. Default is 5. `[ecs-list-events limit='3']`
26
- * order - Order of the events to be shown. Value can be 'ASC' or 'DESC'. Default is 'ASC'. Order is based on event date. `[ecs-list-events order='DESC']`
27
- * date - To show or hide date. Value can be 'true' or 'false'. Default is true. `[ecs-list-events eventdetails='false']`
28
- * venue - To show or hide the venue. Value can be 'true' or 'false'. Default is false. `[ecs-list-events venue='true']`
29
- * excerpt - To show or hide the excerpt and set excerpt length. Default is false.
30
- * `[ecs-list-events excerpt='true']` //displays excerpt with length 100
31
- * `[ecs-list-events excerpt='300']` //displays excerpt with length 300
32
- * thumb - To show or hide thumbnail image. Default is false. `[ecs-list-events thumb='true']` //displays post thumbnail in default thumbnail dimension from media settings.
33
- * You can use thumbwidth and thumbheight to customize the thumbnail size `[ecs-list-events thumb='true' thumbwidth='150' thumbheight='150']` or thumbsize for a registered WordPress size `[ecs-list-events thumb='true' thumbsize='large']`
34
- * message - Message to show when there are no events. Defaults to 'There are no upcoming events at this time.'
35
- * 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']`
36
- * 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']`
37
- * 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']`
38
- * past - Show Outdated Events. `[ecs-list-events cat='festival' past='yes']`
39
- * key - Hide the event when the start date/time has passed `[ecs-list-events cat='festival' key='start date']`
40
- * orderby - Order by end date `[ecs-list-events orderby='enddate']`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
  <blockquote>
43
- <h4>Additional options and benefits in the pro version</h4>
 
 
 
 
 
44
  <ul>
45
- <li>design - Shows <a href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode/?utm_source=wordpress.org&utm_medium=link&utm_campaign=tecs-readme-design&utm_content=description#designs" target="_blank">improved design by default</a>, 'compact' for a more compact listing, 'calendar' for a monthly calendar view, 'columns' to show events horizontally in columns, or 'grouped' to group events by day</li>
46
- <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>
47
- <li>date - Show only events for a specific day [ecs-list-events date='2017-04-16']</li>
48
- <li>tag - Filter by one or more tags. Use commas when you want to filter by multiple tags.</li>
49
- <li>city, state, country - Display events by location.</li>
50
- <li>featured only - Show only events marked as "featured"</li>
51
- <li>id - Show a single event, useful for displaying details of the event on a blog post or page</li>
52
- <li>description - Use the full description instead of the excerpt of an event in the listing</li>
53
- <li>raw_description - Avoid filtering any HTML (spacing, links, bullet points, etc) in the description</li>
54
- <li>raw_excerpt - Avoid filtering any HTML (spacing, links, etc) in the excerpt</li>
55
- <li>year - Show only events for a specific year</li>
56
- <li>date range - Show only events between certain days</li>
57
- <li>timeonly - To show just the start time of the event. [ecs-list-events timeonly='true']</li>
58
- <li>offset - Skip a certain number of events from the beginning, useful for using multiple shortcodes on the same page (with ads in between) or splitting into columns</li>
59
- <li>custom design - Create one or more of your own templates for use with the shortcode</li>
60
- <li>hiderecurring - To only show the first instance of a recurring event, set to 'true'</li>
61
  </ul>
62
- <p><a href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=wordpress.org&utm_medium=link&utm_campaign=tecs-readme&utm_content=description">View more Pro features</a></p>
 
63
  </blockquote>
64
 
65
- This plugin is not developed by or affiliated with The Events Calendar or Modern Tribe in any way.
66
 
67
  == Installation ==
68
 
@@ -76,7 +92,9 @@ You can then add The Events Calendar Block or `[ecs-list-events]` shortcode to t
76
 
77
  == Frequently Asked Questions ==
78
 
79
- = What are the shortcode and block options? =
 
 
80
 
81
  * Basic shortcode: `[ecs-list-events]`
82
  * cat - Show events from an event category `[ecs-list-events cat='festival']` or specify multiple categories `[ecs-list-events cat='festival, workshops']`
@@ -153,9 +171,9 @@ The [pro version of the plugin](https://eventcalendarnewsletter.com/the-events-c
153
 
154
  == Screenshots ==
155
 
156
- 1. Add a block in the page or post where you want your events to appear (new WordPress 5.0 editor or Gutenberg plugin)
157
- 2. You can also add the shortcode where you want the list of events to appear in the page
158
- 3. Events will appear in a list
159
  4. Many settings you can use in the shortcode to change what details appear in the events listing
160
 
161
  == Upgrade Notice ==
2
  Contributors: brianhogg
3
  Tags: event, events, calendar, shortcode, modern tribe
4
  Requires at least: 4.1
5
+ Requires PHP: 5.3
6
+ Tested up to: 5.2
7
+ Stable tag: 2.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Adds shortcode and block functionality to The Events Calendar Plugin (free version) by Modern Tribe, so you can easily list your events anywhere.
12
 
13
  == Description ==
14
 
15
+ **Get your events displayed in a customizable list wherever you need them, with The Events Calendar Shortcode and Block!** This plugin fully integrates with The Events Calendar Plugin (free version) by Modern Tribe.
16
 
17
+ This plugin adds a shortcode and a WordPress block for use with The Events Calendar WordPress Plugin (by Modern Tribe).
18
 
19
+ Display a list of your events by either adding a block in the new editor, or adding a shortcode to any post, page, or widget.
20
+
21
+ Here’s a quick video showing you what you can do:
22
 
23
  [youtube https://www.youtube.com/watch?v=_hpfuoa6MZM]
24
 
25
+ <blockquote>
26
+ If you need extra design and functionality, <a href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=wordpress.org&utm_medium=link&utm_campaign=tecs-readme&utm_content=description">Get The Events Calendar Shortcode Pro</a>! The Pro version offers seven designs, additional filtering options, and full control over how your events display.
27
+
28
+ You get the same full integration with The Events Calendar, plus premium support, show multiple shortcodes on one page, and it works with any WordPress theme.
29
+
30
+ <a href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=wordpress.org&utm_medium=link&utm_campaign=tecs-readme&utm_content=description">Check out the Pro version today</a>
31
+ </blockquote>
32
+
33
+ Trusted by 20,000+ WordPress sites and a 4.5 star rating on WordPress.org, The Events Calendar Shortcode and Block is the solution you’ve been after :)
34
+
35
+ **How to use The Events Calendar Shortcode**
36
+
37
+ You can use the shortcode or block to add a list of your events, filtered by various options. Here’s an example of how you’d show the next 8 events in the category festival:
38
+
39
+ `[ecs-list-events cat="festival" limit="8"]`
40
+
41
+ You can also filter the shortcode to choose from the following options:
42
+
43
+ * Category: show events from specific categories.
44
+ * Number of events: choose the number of events to show.
45
+ * Event order: Order in which your events are shown (latest first or last).
46
+ * Event dates: Show or hide the date.
47
+ * Event venue: Show or hide the venue.
48
+ * Event excerpt: Show or hide the event excerpt, and set an excerpt length.
49
+ * Thumbnail: Show or hide a thumbnail image.
50
+ * View all events link: Choose whether to include a “view all events” link or not.
51
+ * Events from a specific month: show only events from specific months (including current or next month).
52
+ * Previous events: Show previous events.
53
+ * Hide started events: Hide events when their start time passes.
54
+
55
+ This gives you full control over how your events are displayed, and is perfect for non-profits, charities, businesses, conferences, and anyone with a WordPress website showing events.
56
+
57
+ You’ll find a full list of how to use these options in the shortcode below in the plugin’s FAQs.
58
 
59
  <blockquote>
60
+ <h3>With Pro, choose your design and get even more control</h3>
61
+
62
+ <a href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=wordpress.org&utm_medium=link&utm_campaign=tecs-readme&utm_content=description">The Events Calendar Shortcode Pro</a> adds extra designs, including a true calendar view, compact and column-based designs, and advanced features like events grouped by day.
63
+
64
+ Plus, get advanced control over how your events display:
65
+
66
  <ul>
67
+ <li><strong>Events in the next week:</strong> Show events happening in the next X days, for example tomorrow, next week, or next month.</li>
68
+ <li><strong>Only specific days:</strong> Show only events on specific days.</li>
69
+ <li><strong>Display events by location:</strong> Choose to show events by city, state, or country!</li>
70
+ <li><strong>Only featured events:</strong> Show only events you mark as featured.</li>
71
+ <li><strong>Full event description:</strong> Show the full event description, instead of just a short excerpt.</li>
72
+ <li><strong>Only show start time:</strong> Just show the start time of your event.</li>
73
+ <li><strong>Hide recurring events:</strong> Only show the first instance of a recurring event.</li>
74
+ <li><strong>Custom design:</strong> Create your own templates, or use one of the seven built-in options.</li>
75
+ <li><strong>Plus much more:</strong> <a href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=wordpress.org&utm_medium=link&utm_campaign=tecs-readme&utm_content=description">check out The Events Calendar Shortcode Pro details here</a>.</li>
 
 
 
 
 
 
 
76
  </ul>
77
+
78
+ <a href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=wordpress.org&utm_medium=link&utm_campaign=tecs-readme&utm_content=description">The Events Calendar Shortcode Pro</a> is ideal for non-profits, charities, businesses, conferences, developers, and WordPress agencies who need the extra control and support straight from the plugin developer. <a href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=wordpress.org&utm_medium=link&utm_campaign=tecs-readme&utm_content=description">Check it out here</a>.
79
  </blockquote>
80
 
81
+ This plugin is not developed by or affiliated with The Events Calendar WordPress plugin or Modern Tribe in any way.
82
 
83
  == Installation ==
84
 
92
 
93
  == Frequently Asked Questions ==
94
 
95
+ = What are the shortcode and block options for customizing my events? =
96
+
97
+ Here’s the full list of shortcode and block options you can use to customize how your events display:
98
 
99
  * Basic shortcode: `[ecs-list-events]`
100
  * cat - Show events from an event category `[ecs-list-events cat='festival']` or specify multiple categories `[ecs-list-events cat='festival, workshops']`
171
 
172
  == Screenshots ==
173
 
174
+ 1. Show your events from The Events Calendar (by Modern Tribe) in a list, and customize specifically which events you’re displaying
175
+ 2. Add a block in the page or post where you want your events to appear, and select the display options you want (new WordPress 5.0 editor or Gutenberg plugin)
176
+ 3. You can also add the shortcode where you want the list of events to appear on any WordPress post, page, or widget
177
  4. Many settings you can use in the shortcode to change what details appear in the events listing
178
 
179
  == Upgrade Notice ==
the-events-calendar-shortcode.php CHANGED
@@ -3,7 +3,7 @@
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.1
7
  Author: Event Calendar Newsletter
8
  Author URI: https://eventcalendarnewsletter.com/the-events-calendar-shortcode
9
  Contributors: brianhogg
@@ -56,7 +56,7 @@ class Events_Calendar_Shortcode
56
  *
57
  * @since 1.0.0
58
  */
59
- const VERSION = '2.1';
60
 
61
  private $admin_page = null;
62
 
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.2
7
  Author: Event Calendar Newsletter
8
  Author URI: https://eventcalendarnewsletter.com/the-events-calendar-shortcode
9
  Contributors: brianhogg
56
  *
57
  * @since 1.0.0
58
  */
59
+ const VERSION = '2.2';
60
 
61
  private $admin_page = null;
62