The Events Calendar Shortcode - Version 1.5

Version Description

  • Adds ability to translate the plugin into local languages
  • Additional description of options
Download this release

Release Info

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

Code changes from version 1.4.2 to 1.5

readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === The Events Calendar Shortcode ===
2
- Contributors: brianhogg, dandelionweb, ankitpokhrel, sujin2f
3
  Tags: event, events, calendar, shortcode, modern tribe
4
- Requires at least: 4.0
5
  Tested up to: 4.7.3
6
- Stable tag: 1.4.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -15,42 +15,45 @@ This plugin adds a shortcode for use with The Events Calendar Plugin (by Modern
15
 
16
  With this plugin, 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
  = Shortcode Options: =
21
- * Basic shortcode: [ecs-list-events]
22
- * cat - Represents single event category. [ecs-list-events cat='festival']. Use commas when you want multiple categories [ecs-list-events cat='festival, workshops']
23
- * limit - Total number of events to show. Default is 5. [ecs-list-events limit='3']
24
- * 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']
25
- * date - To show or hide date. Value can be 'true' or 'false'. Default is true. [ecs-list-events eventdetails='false']
26
- * venue - To show or hide the venue. Value can be 'true' or 'false'. Default is false. [ecs-list-events venue='true']
27
  * excerpt - To show or hide the excerpt and set excerpt length. Default is false.
28
- * [ecs-list-events excerpt='true'] //displays excerpt with length 100
29
- * [ecs-list-events excerpt='300'] //displays excerpt with length 300
30
- * 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.
31
- * You can use 2 other attributes: thumbwidth and thumbheight to customize the thumbnail size [ecs-list-events thumb='true' thumbwidth='150' thumbheight='150']
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
-
39
- >**[Additional options in the pro version](https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=wordpress.org&utm_medium=link&utm_campaign=tecs-readme-top&utm_content=description)**
40
-
41
- * design - Shows improved design by default, or set to 'standard' for the regular one and 'compact' for a more compact listing
42
- * 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
43
- * tag - Filter by one or more tags. Use commas when you want to filter by multiple tags.
44
- * id - Show a single event, useful for displaying details of the event on a blog post or page
45
- * description - Use the full description instead of the excerpt of an event in the listing
46
- * raw_description - Avoid filtering any HTML (spacing, links, bullet points, etc) in the description
47
- * raw_excerpt - Avoid filtering any HTML (spacing, links, etc) in the excerpt
48
- * year - Show only events for a specific year
49
- * 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
50
- * custom design - Create one or more of your own templates for use with the shortcode
51
- * hiderecurring - To only show the first instance of a recurring event, set to 'true'
52
-
53
- [View Details and Get the Pro Version](https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=wordpress.org&utm_medium=link&utm_campaign=tecs-readme&utm_content=description)
 
 
 
54
 
55
  This plugin is not developed by or affiliated with The Events Calendar or Modern Tribe in any way.
56
 
@@ -60,32 +63,36 @@ This plugin is not developed by or affiliated with The Events Calendar or Modern
60
 
61
  2. Activate the plugin through the Plugins menu in WordPress
62
 
 
 
 
 
63
 
64
  == Frequently Asked Questions ==
65
 
66
- = What are the shortcode Options: =
67
- = Shortcode Options: =
68
- * Basic shortcode: [ecs-list-events]
69
- * cat - Show events from an event category [ecs-list-events cat='festival'] or specify multiple categories [ecs-list-events cat='festival, workshops']
70
- * limit - Total number of events to show. Default is 5. [ecs-list-events limit='3']
71
- * 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']
72
- * date - To show or hide date. Value can be 'true' or 'false'. Default is true. [ecs-list-events eventdetails='false']
73
- * venue - To show or hide the venue. Value can be 'true' or 'false'. Default is false. [ecs-list-events venue='true']
74
- * excerpt - To show or hide the excerpt and set excerpt length. Default is false. [ecs-list-events excerpt='true'] //displays excerpt with length 100
75
  excerpt='300' //displays excerpt with length 300
76
- * 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.
77
- * You can use 2 other attributes: thumbwidth and thumbheight to customize the thumbnail size [ecs-list-events thumb='true' thumbwidth='150' thumbheight='150']
78
  * message - Message to show when there are no events. Defaults to 'There are no upcoming events at this time.'
79
- * 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']
80
- * 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']
81
- * month - Show only specific Month. Type 'current' for displaying current month only. [ecs-list-events cat='festival' month='2015-06']
82
- * past - Show Outdated Events. [ecs-list-events cat='festival' past='yes']
83
- * key - Order with Start Date [ecs-list-events cat='festival' key='start date']
84
 
85
  With [The Events Calendar Shortcode PRO](https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=wordpress.org&utm_medium=link&utm_campaign=tecs-readme-faq-options&utm_content=description) you also get the following options:
86
 
87
  * design - Shows improved design by default, or set to 'standard' for the regular one and 'compact' for a more compact listing
88
- * 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
89
  * tag - Filter by one or more tags. Use commas when you want to filter by multiple tags.
90
  * id - Show a single event, useful for displaying details of the event on a blog post or page
91
  * description - Use the full description instead of the excerpt of an event in the listing
@@ -96,6 +103,8 @@ With [The Events Calendar Shortcode PRO](https://eventcalendarnewsletter.com/the
96
  * custom design - Create one or more of your own templates for use with the shortcode
97
  * hiderecurring - To only show the first instance of a recurring event, set to 'true'
98
 
 
 
99
  = How do I use this shortcode in a widget? =
100
 
101
  * You can put the shortcode in a text widget.
@@ -115,7 +124,10 @@ By default the plugin does not include styling. Events are listed in ul li tags
115
  Want a better looking design without knowing any CSS? Check out [The Events Calendar Shortcode PRO](https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=wordpress.org&utm_medium=link&utm_campaign=tecs-readme-faq-design&utm_content=description)
116
 
117
  = How do I include a list of events in a page template? =
118
- include echo do_shortcode("[ecs-list-events]"); in the template where you want the events list to display.
 
 
 
119
 
120
  == Screenshots ==
121
 
@@ -125,6 +137,10 @@ include echo do_shortcode("[ecs-list-events]"); in the template where you want t
125
 
126
  == Upgrade Notice ==
127
 
 
 
 
 
128
  = 1.4.2 =
129
  * Additional filter for changing the link for an event
130
  * Adds category CSS classes for each event, so you can format each category differently
@@ -173,6 +189,10 @@ Fix missing ul
173
 
174
  == Changelog ==
175
 
 
 
 
 
176
  = 1.4.2 =
177
  * Additional filter for changing the link for an event
178
  * Adds category CSS classes for each event, so you can format each category differently
1
  === The Events Calendar Shortcode ===
2
+ 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
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
15
 
16
  With this plugin, 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
  = Shortcode Options: =
21
+ * Basic shortcode: `[ecs-list-events]`
22
+ * cat - Represents single event category. `[ecs-list-events cat='festival']` Use commas when you want multiple categories [ecs-list-events cat='festival, workshops']
23
+ * limit - Total number of events to show. Default is 5. `[ecs-list-events limit='3']`
24
+ * 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']`
25
+ * date - To show or hide date. Value can be 'true' or 'false'. Default is true. `[ecs-list-events eventdetails='false']`
26
+ * venue - To show or hide the venue. Value can be 'true' or 'false'. Default is false. `[ecs-list-events venue='true']`
27
  * excerpt - To show or hide the excerpt and set excerpt length. Default is false.
28
+ * `[ecs-list-events excerpt='true']` //displays excerpt with length 100
29
+ * `[ecs-list-events excerpt='300']` //displays excerpt with length 300
30
+ * 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.
31
+ * You can use 2 other attributes: thumbwidth and thumbheight to customize the thumbnail size `[ecs-list-events thumb='true' thumbwidth='150' thumbheight='150']`
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
+
39
+
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>tag - Filter by one or more tags. Use commas when you want to filter by multiple tags.</li>
46
+ <li>id - Show a single event, useful for displaying details of the event on a blog post or page</li>
47
+ <li>description - Use the full description instead of the excerpt of an event in the listing</li>
48
+ <li>raw_description - Avoid filtering any HTML (spacing, links, bullet points, etc) in the description</li>
49
+ <li>raw_excerpt - Avoid filtering any HTML (spacing, links, etc) in the excerpt</li>
50
+ <li>year - Show only events for a specific year</li>
51
+ <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>
52
+ <li>custom design - Create one or more of your own templates for use with the shortcode</li>
53
+ <li>hiderecurring - To only show the first instance of a recurring event, set to 'true'</li>
54
+ </ul>
55
+ <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>
56
+ </blockquote>
57
 
58
  This plugin is not developed by or affiliated with The Events Calendar or Modern Tribe in any way.
59
 
63
 
64
  2. Activate the plugin through the Plugins menu in WordPress
65
 
66
+ 3. If you don't already have The Events Calendar (the calendar you add your events to) you will be prompted to install it
67
+
68
+ You can then add the `[ecs-list-events]` shortcode to the page or post you want to list events on. [Full list of options available in the documentation](https://eventcalendarnewsletter.com/events-calendar-shortcode-pro-options/?utm_source=wordpress.org&utm_medium=link&utm_campaign=tecs-readme-install-docs&utm_content=description).
69
+
70
 
71
  == Frequently Asked Questions ==
72
 
73
+ = What are the shortcode options? =
74
+
75
+ * Basic shortcode: `[ecs-list-events]`
76
+ * cat - Show events from an event category `[ecs-list-events cat='festival']` or specify multiple categories `[ecs-list-events cat='festival, workshops']`
77
+ * limit - Total number of events to show. Default is 5. `[ecs-list-events limit='3']`
78
+ * 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']`
79
+ * date - To show or hide date. Value can be 'true' or 'false'. Default is true. `[ecs-list-events eventdetails='false']`
80
+ * venue - To show or hide the venue. Value can be 'true' or 'false'. Default is false. `[ecs-list-events venue='true']`
81
+ * excerpt - To show or hide the excerpt and set excerpt length. Default is false. `[ecs-list-events excerpt='true']` //displays excerpt with length 100
82
  excerpt='300' //displays excerpt with length 300
83
+ * 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.
84
+ * You can use 2 other attributes: thumbwidth and thumbheight to customize the thumbnail size `[ecs-list-events thumb='true' thumbwidth='150' thumbheight='150']`
85
  * message - Message to show when there are no events. Defaults to 'There are no upcoming events at this time.'
86
+ * 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']`
87
+ * 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']`
88
+ * month - Show only specific Month. Type 'current' for displaying current month only. `[ecs-list-events cat='festival' month='2015-06']`
89
+ * past - Show Outdated Events. `[ecs-list-events cat='festival' past='yes']`
90
+ * key - Order with Start Date `[ecs-list-events cat='festival' key='start date']`
91
 
92
  With [The Events Calendar Shortcode PRO](https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=wordpress.org&utm_medium=link&utm_campaign=tecs-readme-faq-options&utm_content=description) you also get the following options:
93
 
94
  * design - Shows improved design by default, or set to 'standard' for the regular one and 'compact' for a more compact listing
95
+ * 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
96
  * tag - Filter by one or more tags. Use commas when you want to filter by multiple tags.
97
  * id - Show a single event, useful for displaying details of the event on a blog post or page
98
  * description - Use the full description instead of the excerpt of an event in the listing
103
  * custom design - Create one or more of your own templates for use with the shortcode
104
  * hiderecurring - To only show the first instance of a recurring event, set to 'true'
105
 
106
+ [Get The Events Calendar Shortcode PRO](https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=wordpress.org&utm_medium=link&utm_campaign=tecs-readme-faq-options-bottom&utm_content=description)
107
+
108
  = How do I use this shortcode in a widget? =
109
 
110
  * You can put the shortcode in a text widget.
124
  Want a better looking design without knowing any CSS? Check out [The Events Calendar Shortcode PRO](https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=wordpress.org&utm_medium=link&utm_campaign=tecs-readme-faq-design&utm_content=description)
125
 
126
  = How do I include a list of events in a page template? =
127
+
128
+ `include echo do_shortcode("[ecs-list-events]");`
129
+
130
+ Put this in the template where you want the events list to display.
131
 
132
  == Screenshots ==
133
 
137
 
138
  == Upgrade Notice ==
139
 
140
+ = 1.5 =
141
+ * Adds ability to translate the plugin into local languages
142
+ * Additional description of options
143
+
144
  = 1.4.2 =
145
  * Additional filter for changing the link for an event
146
  * Adds category CSS classes for each event, so you can format each category differently
189
 
190
  == Changelog ==
191
 
192
+ = 1.5 =
193
+ * Adds ability to translate the plugin into local languages
194
+ * Additional description of options
195
+
196
  = 1.4.2 =
197
  * Additional filter for changing the link for an event
198
  * Adds category CSS classes for each event, so you can format each category differently
templates/admin-page.php CHANGED
@@ -1,68 +1,66 @@
1
  <div class="wrap">
2
  <h2><?php _e( 'The Events Calendar Shortcode' ); ?></h2>
3
 
4
- <p>The shortcode displays lists of your events. For example to shortcode to show next 8 events in the category festival in ASC order with date showing:</p>
5
 
6
  <pre>[ecs-list-events cat='festival' limit='8']</pre>
7
 
8
-
9
-
10
  <table>
11
  <tbody>
12
  <tr valign="top">
13
  <td valign="top">
14
 
15
  <div>
16
- <h2>Basic shortcode</h2>
17
  <blockquote>[ecs-list-events]</blockquote>
18
 
19
- <h2>Shortcode Options</h2>
20
  <?php do_action( 'ecs_admin_page_options_before' ); ?>
21
 
22
  <h3>cat</h3>
23
- <p>Represents single event category. Use commas when you want multiple categories
24
  <blockquote>[ecs-list-events cat='festival']</blockquote>
25
  <blockquote>[ecs-list-events cat='festival, workshops']</blockquote>
26
 
27
  <?php do_action( 'ecs_admin_page_options_after_cat' ); ?>
28
 
29
  <h3>limit</h3>
30
- <p>Total number of events to show. Default is 5.</p>
31
  <blockquote>[ecs-list-events limit='3']</blockquote>
32
  <h3>order</h3>
33
- <p>Order of the events to be shown. Value can be 'ASC' or 'DESC'. Default is 'ASC'. Order is based on event date.</p>
34
  <blockquote>[ecs-list-events order='DESC']</blockquote>
35
  <h3>date</h3>
36
- <p>To show or hide date. Value can be 'true' or 'false'. Default is true.</p>
37
  <blockquote>[ecs-list-events eventdetails='false']</blockquote>
38
  <h3>venue</h3>
39
- <p>To show or hide the venue. Value can be 'true' or 'false'. Default is false.</p>
40
  <blockquote>[ecs-list-events venue='true']</blockquote>
41
  <h3>excerpt</h3>
42
- <p>To show or hide the excerpt and set excerpt length. Default is false.<p>
43
  <blockquote>[ecs-list-events excerpt='true']</blockquote>
44
  <blockquote>[ecs-list-events excerpt='300']</blockquote>
45
  <h3>thumb</h3>
46
- <p>To show or hide thumbnail/featured image. Default is false.</p>
47
  <blockquote>[ecs-list-events thumb='true']</blockquote>
48
- <p>You can use 2 other attributes: thumbwidth and thumbheight to customize the thumbnail size</p>
49
  <blockquote>[ecs-list-events thumb='true' thumbwidth='150' thumbheight='150']</blockquote>
50
  <h3>message</h3>
51
- <p>Message to show when there are no events. Defaults to 'There are no upcoming events at this time.'</p>
52
  <h3>viewall</h3>
53
- <p>Determines whether to show 'View all events' or not. Values can be 'true' or 'false'. Default to 'true'</p>
54
  <blockquote>[ecs-list-events cat='festival' limit='3' order='DESC' viewall='false']</blockquote>
55
  <h3>contentorder</h3>
56
- <p>Manage the order of content with commas. Default to title, thumbnail, excerpt, date, venue.</p>
57
  <blockquote>[ecs-list-events cat='festival' limit='3' order='DESC' viewall='false' contentorder='title, thumbnail, excerpt, date, venue']</blockquote>
58
  <h3>month</h3>
59
- <p>Show only specific Month. Type 'current' for displaying current month only, ie:</p>
60
  <blockquote>[ecs-list-events cat='festival' month='2015-06']</blockquote>
61
  <h3>past</h3>
62
- <p>Show outdated events (ie. events that have already happened)</p>
63
  <blockquote>[ecs-list-events cat='festival' past='yes']</blockquote>
64
  <h3>key</h3>
65
- <p>Order with start date</p>
66
  <blockquote>[ecs-list-events cat='festival' key='start date']</blockquote>
67
 
68
  <?php do_action( 'ecs_admin_page_options_after' ); ?>
@@ -77,21 +75,43 @@
77
 
78
  <?php if ( apply_filters( 'ecs_show_upgrades', true ) ): ?>
79
 
80
- <p>By default the plugin does not include styling. Events are listed in ul li tags with appropriate classes for styling and you can add your own CSS:</p>
81
 
82
  <ul>
83
  <li>ul class="ecs-event-list"</li>
84
  <li>li class="ecs-event"</li>
85
- <li>event title link is H4 class="entry-title summary"</li>
86
- <li>date class is time</li>
87
- <li>venue class is venue</li>
88
  <li>span .ecs-all-events</li>
89
  <li>p .ecs-excerpt</li>
90
  </ul>
91
 
92
- <p><em>Want a better looking design without adding any CSS? Check out <a target="_blank" href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=plugin&utm_medium=link&utm_campaign=tecs-help-design&utm_content=description">The Events Calendar Shortcode PRO</a></em></p>
93
- <p><a href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=plugin&utm_medium=link&utm_campaign=tecs-help-design-image-1&utm_content=description"><img alt="" style="width: 300px;" src="<?php echo plugins_url( '/static/shortcode-default-design-2.png', TECS_CORE_PLUGIN_FILE ) ?>"><br>Pro version default design</a></p>
94
- <p><a href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=plugin&utm_medium=link&utm_campaign=tecs-help-design-image-2&utm_content=description"><img alt="" style="width: 300px;" src="<?php echo plugins_url( '/static/event-calendar-shortcode-compact-design.png', TECS_CORE_PLUGIN_FILE ) ?>"><br>Pro version compact design</a></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
 
96
  <?php endif; ?>
97
  </td>
@@ -99,5 +119,5 @@
99
  </tbody>
100
  </table>
101
 
102
- <p><small>This plugin is not developed by or affiliated with The Events Calendar or Modern Tribe in any way.</small></p>
103
  </div>
1
  <div class="wrap">
2
  <h2><?php _e( 'The Events Calendar Shortcode' ); ?></h2>
3
 
4
+ <p><?php echo sprintf( esc_html__( 'The shortcode displays lists of your events. For example the shortcode to show next 8 events in the category "%s" in ASC order with date showing:', 'the-events-calendar-shortcode' ), 'festival' ); ?></p>
5
 
6
  <pre>[ecs-list-events cat='festival' limit='8']</pre>
7
 
 
 
8
  <table>
9
  <tbody>
10
  <tr valign="top">
11
  <td valign="top">
12
 
13
  <div>
14
+ <h2><?php echo esc_html( __( 'Basic shortcode', 'the-events-calendar-shortcode' ) ); ?></h2>
15
  <blockquote>[ecs-list-events]</blockquote>
16
 
17
+ <h2><?php echo esc_html( __( 'Shortcode Options', 'the-events-calendar-shortcode' ) ); ?></h2>
18
  <?php do_action( 'ecs_admin_page_options_before' ); ?>
19
 
20
  <h3>cat</h3>
21
+ <p><?php echo esc_html( __( 'Represents single event category. Use commas when you want multiple categories', 'the-events-calendar-shortcode' ) ); ?>
22
  <blockquote>[ecs-list-events cat='festival']</blockquote>
23
  <blockquote>[ecs-list-events cat='festival, workshops']</blockquote>
24
 
25
  <?php do_action( 'ecs_admin_page_options_after_cat' ); ?>
26
 
27
  <h3>limit</h3>
28
+ <p><?php echo esc_html( __( 'Total number of events to show. Default is 5.', 'the-events-calendar-shortcode' ) ); ?></p>
29
  <blockquote>[ecs-list-events limit='3']</blockquote>
30
  <h3>order</h3>
31
+ <p><?php echo esc_html( __( "Order of the events to be shown. Value can be 'ASC' or 'DESC'. Default is 'ASC'. Order is based on event date.", 'the-events-calendar-shortcode' ) ); ?></p>
32
  <blockquote>[ecs-list-events order='DESC']</blockquote>
33
  <h3>date</h3>
34
+ <p><?php echo esc_html( __( "To show or hide date. Value can be 'true' or 'false'. Default is true.", 'the-events-calendar-shortcode' ) ); ?></p>
35
  <blockquote>[ecs-list-events eventdetails='false']</blockquote>
36
  <h3>venue</h3>
37
+ <p><?php echo esc_html( __( "To show or hide the venue. Value can be 'true' or 'false'. Default is false.", 'the-events-calendar-shortcode' ) ); ?></p>
38
  <blockquote>[ecs-list-events venue='true']</blockquote>
39
  <h3>excerpt</h3>
40
+ <p><?php echo esc_html( __( 'To show or hide the excerpt and set excerpt length. Default is false.', 'the-events-calendar-shortcode' ) ); ?><p>
41
  <blockquote>[ecs-list-events excerpt='true']</blockquote>
42
  <blockquote>[ecs-list-events excerpt='300']</blockquote>
43
  <h3>thumb</h3>
44
+ <p><?php echo esc_html( __( 'To show or hide thumbnail/featured image. Default is false.', 'the-events-calendar-shortcode' ) ); ?></p>
45
  <blockquote>[ecs-list-events thumb='true']</blockquote>
46
+ <p><?php echo esc_html( __( 'You can use 2 other attributes: thumbwidth and thumbheight to customize the thumbnail size', 'the-events-calendar-shortcode' ) ); ?></p>
47
  <blockquote>[ecs-list-events thumb='true' thumbwidth='150' thumbheight='150']</blockquote>
48
  <h3>message</h3>
49
+ <p><?php echo esc_html( sprintf( __( "Message to show when there are no events. Defaults to '%s'", 'the-events-calendar-shortcode' ), translate( 'There are no upcoming events at this time.', 'tribe-events-calendar' ) ) ); ?></p>
50
  <h3>viewall</h3>
51
+ <p><?php echo esc_html( sprintf( __( "Determines whether to show '%s' or not. Values can be 'true' or 'false'. Default to 'true'", 'the-events-calendar-shortcode' ), translate( 'View all events', 'tribe-events-calendar' ) ) ); ?></p>
52
  <blockquote>[ecs-list-events cat='festival' limit='3' order='DESC' viewall='false']</blockquote>
53
  <h3>contentorder</h3>
54
+ <p><?php echo esc_html( sprintf( __( 'Manage the order of content with commas. Defaults to %s', 'the-events-calendar-shortcode' ), 'title, thumbnail, excerpt, date, venue' ) ); ?> </p>
55
  <blockquote>[ecs-list-events cat='festival' limit='3' order='DESC' viewall='false' contentorder='title, thumbnail, excerpt, date, venue']</blockquote>
56
  <h3>month</h3>
57
+ <p><?php echo esc_html( sprintf( __( "Show only specific Month. Type '%s' for displaying current month only, ie:", 'the-events-calendar-shortcode' ), 'current' ) ); ?></p>
58
  <blockquote>[ecs-list-events cat='festival' month='2015-06']</blockquote>
59
  <h3>past</h3>
60
+ <p><?php echo esc_html( __( 'Show outdated events (ie. events that have already happened)', 'the-events-calendar-shortcode' ) ); ?></p>
61
  <blockquote>[ecs-list-events cat='festival' past='yes']</blockquote>
62
  <h3>key</h3>
63
+ <p><?php echo esc_html( __( 'Use to order by the start date instead of the end date', 'the-events-calendar-shortcode' ) ); ?></p>
64
  <blockquote>[ecs-list-events cat='festival' key='start date']</blockquote>
65
 
66
  <?php do_action( 'ecs_admin_page_options_after' ); ?>
75
 
76
  <?php if ( apply_filters( 'ecs_show_upgrades', true ) ): ?>
77
 
78
+ <p><?php echo esc_html( __( 'By default the plugin does not include styling. Events are listed in ul li tags with appropriate classes for styling and you can add your own CSS:', 'the-events-calendar-shortcode' ) ) ?></p>
79
 
80
  <ul>
81
  <li>ul class="ecs-event-list"</li>
82
  <li>li class="ecs-event"</li>
83
+ <li><?php echo esc_html( sprintf( __( 'event title link is %s', 'the-events-calendar-shortcode' ), 'H4 class="entry-title summary"' ) ); ?> </li>
84
+ <li><?php echo esc_html( sprintf( __( 'date class is %s', 'the-events-calendar-shortcode' ), 'time' ) ); ?></li>
85
+ <li><?php echo esc_html( sprintf( __( 'venue class is %s', 'the-events-calendar-shortcode' ), 'venue' ) ); ?></li>
86
  <li>span .ecs-all-events</li>
87
  <li>p .ecs-excerpt</li>
88
  </ul>
89
 
90
+ <hr>
91
+
92
+ <p><h3><?php echo esc_html__( 'Want a better looking design without adding any CSS?', 'the-events-calendar-shortcode' ) ?></h3></p>
93
+ <p><?php echo sprintf( esc_html__( 'Check out %sThe Events Calendar Shortcode PRO%s', 'the-events-calendar-shortcode' ), '<a target="_blank" href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=plugin&utm_medium=link&utm_campaign=tecs-help-design&utm_content=description">', '</a>' ); ?></p>
94
+ <p><a target="_blank" href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=plugin&utm_medium=link&utm_campaign=tecs-help-design-image-1&utm_content=description"><img alt="" style="width: 300px;" src="<?php echo plugins_url( '/static/shortcode-default-design-2.png', TECS_CORE_PLUGIN_FILE ) ?>"><br><?php echo esc_html( __( 'Pro version default design example', 'the-events-calendar-shortcode' ) ); ?></a></p>
95
+ <p><a target="_blank" href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=plugin&utm_medium=link&utm_campaign=tecs-help-design-image-2&utm_content=description"><img alt="" style="width: 300px;" src="<?php echo plugins_url( '/static/event-calendar-shortcode-compact-design.png', TECS_CORE_PLUGIN_FILE ) ?>"><br><?php echo esc_html( __( 'Pro version compact design example', 'the-events-calendar-shortcode' ) ); ?></a></p>
96
+
97
+ <hr>
98
+
99
+ <h3><?php echo esc_html__( "In addition to designs, you'll get more options including:", 'the-events-calendar-shortcode' ); ?></h3>
100
+ <h4><?php echo esc_html__( 'Number of days', 'the-events-calendar-shortcode' ) ?></h4>
101
+ <p><?php echo esc_html__( 'Choose how many days to show events from, ie. 1 day or a week', 'the-events-calendar-shortcode' ) ?></p>
102
+ <h4><?php echo esc_html__( 'Tag', 'the-events-calendar-shortcode' ) ?></h4>
103
+ <p><?php echo esc_html__( 'Filter events listed by one or more tags', 'the-events-calendar-shortcode' ) ?></p>
104
+ <h4><?php echo esc_html__( 'Single Event', 'the-events-calendar-shortcode' ) ?></h4>
105
+ <p><?php echo esc_html__( 'List the details of a single event by ID, for example on a blog post', 'the-events-calendar-shortcode' ) ?></p>
106
+ <h4><?php echo esc_html__( 'Year', 'the-events-calendar-shortcode' ) ?></h4>
107
+ <p><?php echo esc_html__( 'Show only events for a specific year', 'the-events-calendar-shortcode' ) ?></p>
108
+ <h4><?php echo esc_html__( 'Offset', 'the-events-calendar-shortcode' ) ?></h4>
109
+ <p><?php echo esc_html__( 'Skip a certain number of events from the beginning, useful for using multiple shortcodes on the same page or splitting into columns.', 'the-events-calendar-shortcode' ) ?></p>
110
+ <h4><?php echo esc_html__( 'Full Description', 'the-events-calendar-shortcode' ) ?></h4>
111
+ <p><?php echo esc_html__( 'Use the full description instead of the excerpt (short description) of an event in the listing', 'the-events-calendar-shortcode' ) ?></p>
112
+ <h4><?php echo esc_html__( 'Custom Design', 'the-events-calendar-shortcode' ) ?></h4>
113
+ <p><?php echo esc_html__( 'Use the new default or compact designs, or create your own using one or more templates in your theme folder', 'the-events-calendar-shortcode' ) ?></p>
114
+ <p><?php echo sprintf( esc_html__( '%sGet The Events Calendar Shortcode PRO%s', 'the-events-calendar-shortcode' ), '<a target="_blank" href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode?utm_source=plugin&utm_medium=link&utm_campaign=tecs-help-after-options&utm_content=description">', '</a>' ); ?></p>
115
 
116
  <?php endif; ?>
117
  </td>
119
  </tbody>
120
  </table>
121
 
122
+ <p><small><?php echo sprintf( esc_html__( 'This plugin is not developed by or affiliated with The Events Calendar or %s in any way.', 'the-events-calendar-shortcode' ), 'Modern Tribe' ); ?></small></p>
123
  </div>
the-events-calendar-shortcode.php CHANGED
@@ -3,12 +3,13 @@
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.4.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
10
  License: GPL2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
 
12
  */
13
 
14
  // Avoid direct calls to this file
@@ -37,7 +38,7 @@ class Events_Calendar_Shortcode
37
  *
38
  * @since 1.0.0
39
  */
40
- const VERSION = '1.3';
41
 
42
  private $admin_page = null;
43
 
@@ -56,8 +57,16 @@ class Events_Calendar_Shortcode
56
  add_action( 'admin_menu', array( $this, 'add_menu_page' ), 1000 );
57
  add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array( $this, 'add_action_links' ) );
58
  add_shortcode( 'ecs-list-events', array( $this, 'ecs_fetch_events' ) );
 
 
59
  } // END __construct()
60
 
 
 
 
 
 
 
61
  public function verify_tec_installed() {
62
  if ( ! class_exists( 'Tribe__Events__Main' ) or ! defined( 'Tribe__Events__Main::VERSION' )) {
63
  add_action( 'admin_notices', array( $this, 'show_tec_not_installed_message' ) );
@@ -68,7 +77,7 @@ class Events_Calendar_Shortcode
68
  if ( current_user_can( 'activate_plugins' ) ) {
69
  $url = 'plugin-install.php?tab=plugin-information&plugin=the-events-calendar&TB_iframe=true';
70
  $title = __( 'The Events Calendar', 'tribe-events-ical-importer' );
71
- echo '<div class="error"><p>' . sprintf( __( 'To begin using The Events Calendar Shortcode, please install the latest version of <a href="%s" class="thickbox" title="%s">The Events Calendar</a> and add an event.', 'tec-shortcode' ), esc_url( $url ), esc_attr( $title ) ) . '</p></div>';
72
  }
73
  }
74
 
@@ -77,7 +86,7 @@ class Events_Calendar_Shortcode
77
  return;
78
  }
79
 
80
- $page_title = esc_html__( 'Shortcode', 'ecs' );
81
  $menu_title = esc_html__( 'Shortcode', 'tribe-common' );
82
  $capability = apply_filters( 'ecs_admin_page_capability', 'install_plugins' );
83
 
@@ -108,8 +117,8 @@ class Events_Calendar_Shortcode
108
  public function add_action_links( $links ) {
109
  $mylinks = array();
110
  if ( class_exists( 'Tribe__Settings' ) and method_exists( Tribe__Settings::instance(), 'should_setup_pages' ) and Tribe__Settings::instance()->should_setup_pages() )
111
- $mylinks[] = '<a href="' . admin_url( 'edit.php?post_type=tribe_events&page=ecs-admin' ) . '">Settings</a>';
112
- $mylinks[] = '<a target="_blank" style="color:#3db634; font-weight: bold;" href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode/?utm_source=plugin-list&utm_medium=upgrade-link&utm_campaign=plugin-list&utm_content=action-link">Upgrade</a>';
113
 
114
  return array_merge( $links, $mylinks );
115
  }
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
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
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
38
  *
39
  * @since 1.0.0
40
  */
41
+ const VERSION = '1.5';
42
 
43
  private $admin_page = null;
44
 
57
  add_action( 'admin_menu', array( $this, 'add_menu_page' ), 1000 );
58
  add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array( $this, 'add_action_links' ) );
59
  add_shortcode( 'ecs-list-events', array( $this, 'ecs_fetch_events' ) );
60
+ add_action( 'plugins_loaded', array( $this, 'load_languages' ) );
61
+
62
  } // END __construct()
63
 
64
+ public function load_languages() {
65
+ if ( function_exists( 'tecsp_load_textdomain' ) )
66
+ return;
67
+ load_plugin_textdomain( 'the-events-calendar-shortcode', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
68
+ }
69
+
70
  public function verify_tec_installed() {
71
  if ( ! class_exists( 'Tribe__Events__Main' ) or ! defined( 'Tribe__Events__Main::VERSION' )) {
72
  add_action( 'admin_notices', array( $this, 'show_tec_not_installed_message' ) );
77
  if ( current_user_can( 'activate_plugins' ) ) {
78
  $url = 'plugin-install.php?tab=plugin-information&plugin=the-events-calendar&TB_iframe=true';
79
  $title = __( 'The Events Calendar', 'tribe-events-ical-importer' );
80
+ echo '<div class="error"><p>' . sprintf( esc_html( __( 'To begin using The Events Calendar Shortcode, please install the latest version of %sThe Events Calendar%s and add an event.', 'the-events-calendar-shortcode' ) ), '<a href="' . esc_url( $url ) . '" class="thickbox" title="' . esc_attr( $title ) . '">', '</a>' ) . '</p></div>';
81
  }
82
  }
83
 
86
  return;
87
  }
88
 
89
+ $page_title = esc_html__( 'Shortcode', 'the-events-calendar-shortcode' );
90
  $menu_title = esc_html__( 'Shortcode', 'tribe-common' );
91
  $capability = apply_filters( 'ecs_admin_page_capability', 'install_plugins' );
92
 
117
  public function add_action_links( $links ) {
118
  $mylinks = array();
119
  if ( class_exists( 'Tribe__Settings' ) and method_exists( Tribe__Settings::instance(), 'should_setup_pages' ) and Tribe__Settings::instance()->should_setup_pages() )
120
+ $mylinks[] = '<a href="' . admin_url( 'edit.php?post_type=tribe_events&page=ecs-admin' ) . '">' . esc_html__( 'Settings', 'the-events-calendar-shortcode' ) . '</a>';
121
+ $mylinks[] = '<a target="_blank" style="color:#3db634; font-weight: bold;" href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode/?utm_source=plugin-list&utm_medium=upgrade-link&utm_campaign=plugin-list&utm_content=action-link">' . esc_html__( 'Upgrade', 'the-events-calendar-shortcode' ) . '</a>';
122
 
123
  return array_merge( $links, $mylinks );
124
  }