Event Calendar WD – Responsive Event Calendar plugin - Version 1.1.2

Version Description

  • New: Option to show event timezones on frontend
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Event Calendar WD – Responsive Event Calendar plugin
Version 1.1.2
Comparing to
See all releases

Code changes from version 1.1.1 to 1.1.2

css/calendar.css CHANGED
@@ -70,7 +70,7 @@
70
 
71
  }
72
 
73
-
74
  .ecwd_theme_calendar .ecwd_calendar .metainfo,
75
  .ecwd_theme_calendar .event-organizers a,
76
  .ecwd_theme_calendar .event-venue a,
70
 
71
  }
72
 
73
+ .ecwd-date .ecwd_timezone,
74
  .ecwd_theme_calendar .ecwd_calendar .metainfo,
75
  .ecwd_theme_calendar .event-organizers a,
76
  .ecwd_theme_calendar .event-venue a,
css/style.css CHANGED
@@ -965,7 +965,7 @@ table.cal_blue.ecwd_calendar_container select {
965
  }
966
  .ecwd-time,.ecwd-date{
967
  float:left;
968
- margin-right: 20px;
969
  margin-bottom: 8px;
970
  }
971
 
@@ -977,6 +977,7 @@ table.cal_blue.ecwd_calendar_container select {
977
  background: url(images/date.png) no-repeat;
978
  }
979
 
 
980
  .calendar_main .ecwd_calendar .metainfo,
981
  .ecwd_countdown_info .metainfo,
982
  .event-detalis span, .event-detalis a{
@@ -986,6 +987,10 @@ table.cal_blue.ecwd_calendar_container select {
986
  line-height: 1.3;
987
  }
988
 
 
 
 
 
989
  .event-detalis .event-detalis-org a{
990
  display: inline;
991
  }
965
  }
966
  .ecwd-time,.ecwd-date{
967
  float:left;
968
+ margin-right: 17px;
969
  margin-bottom: 8px;
970
  }
971
 
977
  background: url(images/date.png) no-repeat;
978
  }
979
 
980
+ .ecwd-date .ecwd_timezone,
981
  .calendar_main .ecwd_calendar .metainfo,
982
  .ecwd_countdown_info .metainfo,
983
  .event-detalis span, .event-detalis a{
987
  line-height: 1.3;
988
  }
989
 
990
+ .ecwd-date .ecwd_timezone{
991
+ margin-left: 11px;
992
+ }
993
+
994
  .event-detalis .event-detalis-org a{
995
  display: inline;
996
  }
ecwd.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Event Calendar WD
4
  * Plugin URI: https://web-dorado.com/products/wordpress-event-calendar-wd.html
5
  * Description: Event Calendar WD is an easy event management and planning tool with advanced features.
6
- * Version: 1.1.1
7
  * Author: WebDorado
8
  * Author URI: https://web-dorado.com
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -24,7 +24,7 @@ if (!defined('ECWD_URL')) {
24
  }
25
 
26
  if (!defined('ECWD_VERSION')) {
27
- define('ECWD_VERSION', "1.1.1");
28
  }
29
 
30
  if (!defined('ECWD_PLUGIN_MAIN_FILE')) {
3
  * Plugin Name: Event Calendar WD
4
  * Plugin URI: https://web-dorado.com/products/wordpress-event-calendar-wd.html
5
  * Description: Event Calendar WD is an easy event management and planning tool with advanced features.
6
+ * Version: 1.1.2
7
  * Author: WebDorado
8
  * Author URI: https://web-dorado.com
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
24
  }
25
 
26
  if (!defined('ECWD_VERSION')) {
27
+ define('ECWD_VERSION', "1.1.2");
28
  }
29
 
30
  if (!defined('ECWD_PLUGIN_MAIN_FILE')) {
ecwd_admin_class.php CHANGED
@@ -53,19 +53,18 @@ class ECWD_Admin {
53
  add_filter('default_hidden_meta_boxes', array($this, 'default_hidden_meta_boxes'),2,2);
54
  }
55
 
 
56
  public function default_hidden_meta_boxes($hidden, $screen) {
57
  if ($screen->id == 'ecwd_calendar') {
58
  if (!in_array('postcustom',$hidden)) {
59
  array_push($hidden, 'postcustom');
60
-
61
  }
62
  }
63
  return $hidden;
64
  }
65
 
66
-
67
-
68
- function ecwd_submenu_parent_file($parent_file) {
69
  $screen = get_current_screen();
70
  if ($screen->post_type == "ecwd_organizer" || $screen->post_type == "ecwd_venue") {
71
  return ECWD_MENU_SLUG;
53
  add_filter('default_hidden_meta_boxes', array($this, 'default_hidden_meta_boxes'),2,2);
54
  }
55
 
56
+
57
  public function default_hidden_meta_boxes($hidden, $screen) {
58
  if ($screen->id == 'ecwd_calendar') {
59
  if (!in_array('postcustom',$hidden)) {
60
  array_push($hidden, 'postcustom');
61
+
62
  }
63
  }
64
  return $hidden;
65
  }
66
 
67
+ function ecwd_submenu_parent_file($parent_file) {
 
 
68
  $screen = get_current_screen();
69
  if ($screen->post_type == "ecwd_organizer" || $screen->post_type == "ecwd_venue") {
70
  return ECWD_MENU_SLUG;
ecwd_class.php CHANGED
@@ -327,7 +327,8 @@ class ECWD {
327
  $html .= $ecwd_event_date_from_date . ' ' . $ecwd_event_date_from_time . ' - ';
328
  $html .= $ecwd_event_date_to_date . ' ' . $ecwd_event_date_to_time;
329
  }
330
-
 
331
  return $html;
332
  }
333
 
@@ -343,4 +344,22 @@ class ECWD {
343
  return self::$instance;
344
  }
345
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
346
  }
327
  $html .= $ecwd_event_date_from_date . ' ' . $ecwd_event_date_from_time . ' - ';
328
  $html .= $ecwd_event_date_to_date . ' ' . $ecwd_event_date_to_time;
329
  }
330
+ $html .= ECWD::get_time_zone( $ecwd_all_day_event );
331
+
332
  return $html;
333
  }
334
 
344
  return self::$instance;
345
  }
346
 
347
+ /**
348
+ * Return an TimeZone.
349
+ */
350
+ public static function get_time_zone( $all_day = false ) {
351
+ global $ecwd_options;
352
+ $timezone_str = "";
353
+ if (isset($ecwd_options['time_zone'])) {
354
+ $timezone = (self::isValidTimezone($ecwd_options['time_zone'])) ? $ecwd_options['time_zone'] : "";
355
+ }else{
356
+ $timezone = self::get_default_timezone();
357
+ }
358
+ $show_timezone = (isset($ecwd_options["show_time_zone"]) && $ecwd_options["show_time_zone"] == 1) ? true : false;
359
+ if($show_timezone && !$all_day) {
360
+ $timezone_str = "<span class='ecwd_timezone'>" . $timezone . "</span>";
361
+ }
362
+
363
+ return $timezone_str;
364
+ }
365
  }
includes/calendar-class.php CHANGED
@@ -394,6 +394,7 @@
394
  foreach ($events_for_list as $date_key => $events) {
395
  $ev_counts += count($events);
396
  foreach ($events as $event) {
 
397
  if ($date_key >= $start_date && $date_key <= strtotime($end_date)) {
398
  if ($page_index >= $page * $this->listlimit) {
399
  break 1;
@@ -456,7 +457,7 @@
456
  }
457
 
458
  $html .= '<div class="ecwd-list-date-cont">';
459
- if (isset($event['all_day_event']) && $event['all_day_event'] == 1) {
460
  $eventtime = '<div class="ecwd-time"><span class="metainfo"> ' . __('All day', 'ecwd');
461
  $eventtime .= '</span>';
462
  $eventtime .= '</div>';
@@ -477,9 +478,11 @@
477
  $eventdate .= "-" . date($this->dateformat, strtotime($event['to']));
478
  }
479
  $eventdate .= '</span>';
 
480
  $eventdate .= '</div>';
481
  $html .= $eventdate;
482
  }
 
483
  $html .= '</div>';
484
  if (isset($event['organizers']) && count($event['organizers']) > 0) {
485
  $html .= '<div class="event-organizers"><div class="ecwd-org-cont">';
@@ -978,6 +981,7 @@
978
  $content .= '<ul class="events">';
979
  $eventcontent = '';
980
  foreach ($cellevents as $i => $cellevent) {
 
981
  $li_class = '';
982
  if ($i > ($month_view_events_count - 1) && $this->displaytype !== 'mini') {
983
  $li_class = 'inmore';
@@ -1057,7 +1061,7 @@
1057
  }
1058
  $eventcontent .= ' </div>';
1059
  }
1060
- if (isset($cellevent['all_day_event']) && $cellevent['all_day_event'] == 1) {
1061
  $eventtime = '<div class="ecwd-time"><span class="metainfo" itemprop="startDate" content="' . date('Y-m-d', $cellevent['from']) . 'T' . date('H:i', strtotime($cellevent['starttime'])) . '"> ' . __('All day', 'ecwd');
1062
  $eventtime .= '</span>';
1063
  $eventtime .= '</div>';
@@ -1080,6 +1084,7 @@
1080
  }
1081
  $eventdate .= '</span>';
1082
  $eventdate .= '<span class="ecwd_hidden" itemprop="endDate" content="' . date('Y-m-d', $cellevent['to']) . 'T' . date('H:i', strtotime($cellevent['endtime'])) . '">'.'</span>';
 
1083
  $eventdate .= '</div>';
1084
  $eventcontent .= $eventdate;
1085
  }
@@ -1165,6 +1170,7 @@
1165
  }
1166
  $html .= '<div class="event-main-content">';
1167
  foreach ($cellevents as $cellevent) {
 
1168
  $image_class = '';
1169
  $cellevent['details'] = $cellevent['details'] == '' ? $this->eventemptytext : $cellevent['details'];
1170
  $image = $this->getAndReplaceFirstImage($cellevent['details']);
@@ -1212,7 +1218,7 @@
1212
  $html .= '>' . $cellevent['title'] . '</h3>';
1213
  }
1214
  $html .= '<div class="ecwd-list-date-cont">';
1215
- if (isset($cellevent['all_day_event']) && $cellevent['all_day_event'] == 1) {
1216
  $eventtime = '<div class="ecwd-time">'.
1217
  '<span class="metainfo event-time" itemprop="startDate" content="' . date('Y-m-d', $cellevent['from']) . 'T' . date('H:i', strtotime($cellevent['starttime'])) . '"> ' . __('All day', 'ecwd'). '</span>'.
1218
  '<span class="ecwd_hidden" itemprop="endDate" content="' . date('Y-m-d', $cellevent['to']) . 'T' . date('H:i', strtotime($cellevent['endtime'])) . '"></span>';
@@ -1236,6 +1242,7 @@
1236
  }
1237
  $eventdate .= '</span>';
1238
  $eventdate .= '<span class="ecwd_hidden" itemprop="endDate" content="' . date('Y-m-d', $cellevent['to']) . 'T' . date('H:i', strtotime($cellevent['endtime'])) . '"></span>';
 
1239
  $eventdate .= '</div>';
1240
  $html .= $eventdate;
1241
  }
394
  foreach ($events_for_list as $date_key => $events) {
395
  $ev_counts += count($events);
396
  foreach ($events as $event) {
397
+ $all_day_event = (isset($event['all_day_event']) && $event['all_day_event'] == 1) ? true : false;
398
  if ($date_key >= $start_date && $date_key <= strtotime($end_date)) {
399
  if ($page_index >= $page * $this->listlimit) {
400
  break 1;
457
  }
458
 
459
  $html .= '<div class="ecwd-list-date-cont">';
460
+ if ($all_day_event) {
461
  $eventtime = '<div class="ecwd-time"><span class="metainfo"> ' . __('All day', 'ecwd');
462
  $eventtime .= '</span>';
463
  $eventtime .= '</div>';
478
  $eventdate .= "-" . date($this->dateformat, strtotime($event['to']));
479
  }
480
  $eventdate .= '</span>';
481
+ $eventdate .= ECWD::get_time_zone( $all_day_event );
482
  $eventdate .= '</div>';
483
  $html .= $eventdate;
484
  }
485
+
486
  $html .= '</div>';
487
  if (isset($event['organizers']) && count($event['organizers']) > 0) {
488
  $html .= '<div class="event-organizers"><div class="ecwd-org-cont">';
981
  $content .= '<ul class="events">';
982
  $eventcontent = '';
983
  foreach ($cellevents as $i => $cellevent) {
984
+ $all_day_event = (isset($cellevent['all_day_event']) && $cellevent['all_day_event'] == 1) ? true : false;
985
  $li_class = '';
986
  if ($i > ($month_view_events_count - 1) && $this->displaytype !== 'mini') {
987
  $li_class = 'inmore';
1061
  }
1062
  $eventcontent .= ' </div>';
1063
  }
1064
+ if ($all_day_event) {
1065
  $eventtime = '<div class="ecwd-time"><span class="metainfo" itemprop="startDate" content="' . date('Y-m-d', $cellevent['from']) . 'T' . date('H:i', strtotime($cellevent['starttime'])) . '"> ' . __('All day', 'ecwd');
1066
  $eventtime .= '</span>';
1067
  $eventtime .= '</div>';
1084
  }
1085
  $eventdate .= '</span>';
1086
  $eventdate .= '<span class="ecwd_hidden" itemprop="endDate" content="' . date('Y-m-d', $cellevent['to']) . 'T' . date('H:i', strtotime($cellevent['endtime'])) . '">'.'</span>';
1087
+ $eventdate .= ECWD::get_time_zone( $all_day_event );
1088
  $eventdate .= '</div>';
1089
  $eventcontent .= $eventdate;
1090
  }
1170
  }
1171
  $html .= '<div class="event-main-content">';
1172
  foreach ($cellevents as $cellevent) {
1173
+ $all_day_event = (isset($cellevent['all_day_event']) && $cellevent['all_day_event'] == 1) ? true : false;
1174
  $image_class = '';
1175
  $cellevent['details'] = $cellevent['details'] == '' ? $this->eventemptytext : $cellevent['details'];
1176
  $image = $this->getAndReplaceFirstImage($cellevent['details']);
1218
  $html .= '>' . $cellevent['title'] . '</h3>';
1219
  }
1220
  $html .= '<div class="ecwd-list-date-cont">';
1221
+ if ($all_day_event) {
1222
  $eventtime = '<div class="ecwd-time">'.
1223
  '<span class="metainfo event-time" itemprop="startDate" content="' . date('Y-m-d', $cellevent['from']) . 'T' . date('H:i', strtotime($cellevent['starttime'])) . '"> ' . __('All day', 'ecwd'). '</span>'.
1224
  '<span class="ecwd_hidden" itemprop="endDate" content="' . date('Y-m-d', $cellevent['to']) . 'T' . date('H:i', strtotime($cellevent['endtime'])) . '"></span>';
1242
  }
1243
  $eventdate .= '</span>';
1244
  $eventdate .= '<span class="ecwd_hidden" itemprop="endDate" content="' . date('Y-m-d', $cellevent['to']) . 'T' . date('H:i', strtotime($cellevent['endtime'])) . '"></span>';
1245
+ $eventdate .= ECWD::get_time_zone( $all_day_event );
1246
  $eventdate .= '</div>';
1247
  $html .= $eventdate;
1248
  }
includes/register-settings.php CHANGED
@@ -92,6 +92,12 @@ function ecwd_register_settings() {
92
  'type' => 'text',
93
  'default' => ECWD::get_default_timezone()
94
  ),
 
 
 
 
 
 
95
  'date_format' => array(
96
  'id' => 'date_format',
97
  'name' => __('Date format', 'ecwd'),
92
  'type' => 'text',
93
  'default' => ECWD::get_default_timezone()
94
  ),
95
+ 'show_time_zone' => array(
96
+ 'id' => 'show_time_zone',
97
+ 'name' => __('Show TimeZone in event', 'ecwd'),
98
+ 'desc' => __('', 'ecwd'),
99
+ 'type' => 'checkbox'
100
+ ),
101
  'date_format' => array(
102
  'id' => 'date_format',
103
  'name' => __('Date format', 'ecwd'),
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-event-calendar-wd.html
4
  Tags: calendar, date, event, event calendar, events, events calendar, meeting, organizer, recurring, reservation, responsive, schedule
5
  Requires at least: 3.9
6
  Tested up to: 4.8
7
- Stable tag: 1.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -247,6 +247,9 @@ After downloading the ZIP file of the Event Calendar WD plugin,
247
 
248
  == Changelog ==
249
 
 
 
 
250
  = 1.1.1 =
251
  * Changed: Add "ecwd_hide_old_events"=1 as a custom meta field to calendar in order to hide past events and months
252
  * Fixed: PHP notice in events category page when there is no event
4
  Tags: calendar, date, event, event calendar, events, events calendar, meeting, organizer, recurring, reservation, responsive, schedule
5
  Requires at least: 3.9
6
  Tested up to: 4.8
7
+ Stable tag: 1.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
247
 
248
  == Changelog ==
249
 
250
+ = 1.1.2 =
251
+ * New: Option to show event timezones on frontend
252
+
253
  = 1.1.1 =
254
  * Changed: Add "ecwd_hide_old_events"=1 as a custom meta field to calendar in order to hide past events and months
255
  * Fixed: PHP notice in events category page when there is no event
views/related_events.php CHANGED
@@ -59,6 +59,7 @@ if (count($events) > 0) {
59
  if ($ecwd_event['to']) {
60
  echo ' - ' . date($date_format, strtotime($ecwd_event['to'])) . ' ' . date($time_format, strtotime($ecwd_event['endtime']));
61
  }
 
62
  }
63
  ?>
64
  </div>
59
  if ($ecwd_event['to']) {
60
  echo ' - ' . date($date_format, strtotime($ecwd_event['to'])) . ' ' . date($time_format, strtotime($ecwd_event['endtime']));
61
  }
62
+ echo ECWD::get_time_zone();
63
  }
64
  ?>
65
  </div>