Version Description
- Fixed: Data structures
- Fixed: Bug on Repeating events
Download this release
Release Info
Developer | webdorado |
Plugin | Event Calendar WD – Responsive Event Calendar plugin |
Version | 1.0.76 |
Comparing to | |
See all releases |
Code changes from version 1.0.75 to 1.0.76
- css/style.css +1 -1
- ecwd.php +2 -2
- ecwd_admin_class.php +1 -1
- ecwd_class.php +1 -1
- includes/calendar-class.php +71 -41
- includes/ecwd-cpt-class.php +22 -1
- includes/ecwd-functions.php +2 -7
- includes/register-settings.php +7 -0
- js/ecwd_popup.js +3 -0
- readme.txt +5 -1
css/style.css
CHANGED
@@ -2144,7 +2144,7 @@ a.ecwd-google-plus{
|
|
2144 |
position: absolute;
|
2145 |
top: 0;
|
2146 |
right: 0;
|
2147 |
-
background:
|
2148 |
z-index: 4;
|
2149 |
transition: width .6s cubic-bezier(0.000, 0.795, 0.000, 1.000);
|
2150 |
cursor: pointer;
|
2144 |
position: absolute;
|
2145 |
top: 0;
|
2146 |
right: 0;
|
2147 |
+
background: rgba(0,0,0,0) !important;
|
2148 |
z-index: 4;
|
2149 |
transition: width .6s cubic-bezier(0.000, 0.795, 0.000, 1.000);
|
2150 |
cursor: pointer;
|
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.0.
|
7 |
* Author: WebDorado
|
8 |
* Author URI: http://web-dorado.com
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -22,7 +22,7 @@ if( ! defined( 'ECWD_MAIN_FILE' ) ) {
|
|
22 |
}
|
23 |
|
24 |
if(! defined( 'ECWD_VERSION' ) ){
|
25 |
-
define ('ECWD_VERSION',"1.0.
|
26 |
}
|
27 |
|
28 |
add_action( 'plugins_loaded', array( 'ECWD', 'get_instance' ) );
|
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.0.76
|
7 |
* Author: WebDorado
|
8 |
* Author URI: http://web-dorado.com
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
22 |
}
|
23 |
|
24 |
if(! defined( 'ECWD_VERSION' ) ){
|
25 |
+
define ('ECWD_VERSION',"1.0.76");
|
26 |
}
|
27 |
|
28 |
add_action( 'plugins_loaded', array( 'ECWD', 'get_instance' ) );
|
ecwd_admin_class.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
class ECWD_Admin {
|
7 |
|
8 |
protected static $instance = null;
|
9 |
-
protected $version = '1.0.
|
10 |
protected $ecwd_page = null;
|
11 |
protected $notices = null;
|
12 |
|
6 |
class ECWD_Admin {
|
7 |
|
8 |
protected static $instance = null;
|
9 |
+
protected $version = '1.0.76';
|
10 |
protected $ecwd_page = null;
|
11 |
protected $notices = null;
|
12 |
|
ecwd_class.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
*/
|
7 |
class ECWD {
|
8 |
|
9 |
-
protected $version = '1.0.
|
10 |
protected $plugin_name = 'event-calendar-wd';
|
11 |
protected $prefix = 'ecwd';
|
12 |
protected static $instance = null;
|
6 |
*/
|
7 |
class ECWD {
|
8 |
|
9 |
+
protected $version = '1.0.76';
|
10 |
protected $plugin_name = 'event-calendar-wd';
|
11 |
protected $prefix = 'ecwd';
|
12 |
protected static $instance = null;
|
includes/calendar-class.php
CHANGED
@@ -350,20 +350,20 @@
|
|
350 |
$currentWeek = $this->rangeWeek($this->year . '-' . $this->month . '-' . $this->day);
|
351 |
$date = $currentWeek['start'];
|
352 |
while (strtotime($date) <= strtotime($currentWeek['end'])) {
|
353 |
-
$html .= '<li>' . $this->calendar_cell(date('d', strtotime($date)), 'day-with-date', date('Y-n-j', strtotime($date))) . '</li>';
|
354 |
$date = date("Y-m-d", strtotime("+1 day", strtotime($date)));
|
355 |
}
|
356 |
$html .= '</ul>';
|
357 |
} elseif ($this->displaytype == 'day') {
|
358 |
$html .= '<ul class="day-event-list">';
|
359 |
-
$html .= '<li>' . $this->calendar_cell(date('d', strtotime($this->year . '-' . $this->month . '-' . $this->day)), 'day-with-date', date('Y-n-j', strtotime($this->year . '-' . $this->month . '-' . $this->day))) . '</li>';
|
360 |
$html .= '</ul>';
|
361 |
} elseif ($this->displaytype == '4day') {
|
362 |
$html .= '<ul class="day4-event-list">';
|
363 |
$days = $this->range4Days($this->year . '-' . $this->month . '-' . $this->day);
|
364 |
$date = $days['start'];
|
365 |
while (strtotime($date) <= strtotime($days['end'])) {
|
366 |
-
$html .= '<li>' . $this->calendar_cell(date('d', strtotime($date)), 'day-with-date', date('Y-n-j', strtotime($date))) . '</li>';
|
367 |
//$this->
|
368 |
$date = date("Y-m-d", strtotime("+1 day", strtotime($date)));
|
369 |
}
|
@@ -408,7 +408,7 @@
|
|
408 |
$html .= '<li class="' . $image_class . '" itemscope itemtype="http://schema.org/Event">';
|
409 |
if (!$this->widget) {
|
410 |
$html .= '<div class="ecwd-list-date resp" itemprop="startDate" content="' . date('Y-m-d', strtotime($event['from'])) . 'T' . date('H:i', $date_key) . '">' . __(date('d', $date_key), 'ecwd') . '</div>';
|
411 |
-
|
412 |
$event_date = (($this->list_date_format !== 'd.F.l') ? date($this->list_date_format, $date_key) : (date('d', $date_key) . '.' . __(date('F', $date_key), 'ecwd') . '.' . __(date('l', $date_key), 'ecwd')));
|
413 |
if ($this->list_date_format !== 'd.F.l') {
|
414 |
$month_name = date('F', strtotime($event['from']));
|
@@ -416,19 +416,21 @@
|
|
416 |
}
|
417 |
$html .= '<div class="ecwd-list-img"><div class="ecwd-list-img-container"><div class="ecwd-list-date web">' . $event_date . '</div>';
|
418 |
$html .= '<div class="ecwd-img">';
|
419 |
-
|
420 |
-
|
421 |
-
|
|
|
422 |
} else {
|
423 |
-
$html .= '<img src="' . $event['image'] . '" />';
|
424 |
}
|
425 |
} elseif ($image['image'] != null) {
|
426 |
-
$html .= '<img src="' . $image['image'] . '" />';
|
427 |
$event['details'] = $image['content'];
|
428 |
}
|
429 |
$html .= '</div></div></div>';
|
430 |
} else {
|
431 |
$html .= '<div class="ecwd-list-date" itemprop="startDate" content="' . date('Y-m-d', strtotime($event['from'])) . 'T' . date('H:i', strtotime($event['starttime'])) . '">' . __(date('d', strtotime($event['from'])), 'ecwd') . '</div>';
|
|
|
432 |
}
|
433 |
$html .= '<div class="event-main-content">';
|
434 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
@@ -438,6 +440,19 @@
|
|
438 |
} else {
|
439 |
$html .= '<h3 class="event-title" style="color:' . $event['color'] . ';" itemprop="name">' . $event['title'] . '</h3>';
|
440 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
441 |
$html .= '<div class="ecwd-list-date-cont">';
|
442 |
if (isset($event['all_day_event']) && $event['all_day_event'] == 1) {
|
443 |
$eventtime = '<div class="ecwd-time"><span class="metainfo"> ' . __('All day', 'ecwd');
|
@@ -594,10 +609,8 @@
|
|
594 |
'week'
|
595 |
))
|
596 |
) { // mini and full cal
|
597 |
-
$html .= '
|
598 |
-
<
|
599 |
-
|
600 |
-
<tr>';
|
601 |
// render week number on left
|
602 |
if ($this->weeknumbers == 'left') {
|
603 |
$html .= '<td rowspan="2" class="week-number"> </td>';
|
@@ -862,7 +875,7 @@
|
|
862 |
//echo $event['from'].'------'.$event['title'].'<br />';
|
863 |
$color = $event['color'];
|
864 |
$title = $event['title'];
|
865 |
-
$link
|
866 |
$eventdate = $event['date'];
|
867 |
$from = strtotime($event['from']);
|
868 |
$to = strtotime($event['to']);
|
@@ -956,8 +969,6 @@
|
|
956 |
$content .= '<ul class="events">';
|
957 |
$eventcontent = '';
|
958 |
foreach ($cellevents as $i => $cellevent) {
|
959 |
-
//echo $cellevent['date'].'-------'.$cellevent['title'].'<br />';
|
960 |
-
//if (!array_key_exists($cellevent['id'], $this->seted_days)) {
|
961 |
$li_class = '';
|
962 |
if ($i > 2 && $this->displaytype !== 'mini') {
|
963 |
$li_class = 'inmore';
|
@@ -977,7 +988,7 @@
|
|
977 |
if ($this->displaytype != 'mini') {
|
978 |
if (isset($cellevent['terms']['ecwd_taxonomy_image']) && $this->displaytype != 'mini') {
|
979 |
if ($cellevent['terms']['ecwd_taxonomy_image'] != '') {
|
980 |
-
$eventcontent .= '<img class="ecwd-event-cat-icon" src="' . $cellevent['terms']['ecwd_taxonomy_image'] . '" />';
|
981 |
}/* elseif (isset($cellevent['color'])){
|
982 |
$eventcontent .= ' <span class="event-metalabel" style="background:' . $cellevent['color'] . '"></span>';
|
983 |
} */
|
@@ -1053,6 +1064,7 @@
|
|
1053 |
$eventdate .= "-" . date($this->dateformat, $cellevent['to']);
|
1054 |
}
|
1055 |
$eventdate .= '</span>';
|
|
|
1056 |
$eventdate .= '</div>';
|
1057 |
$eventcontent .= $eventdate;
|
1058 |
}
|
@@ -1063,6 +1075,7 @@
|
|
1063 |
}
|
1064 |
$eventcontent .= '</div>';
|
1065 |
}
|
|
|
1066 |
if ($cellevent['location'] !== '') {
|
1067 |
$eventcontent .= '<div class="event-venue" itemprop="location" itemscope itemtype="http://schema.org/Place">';
|
1068 |
if (isset($cellevent['venue']['name'])) {
|
@@ -1078,17 +1091,25 @@
|
|
1078 |
$eventcontent .= '<div class="ecwd-link"> <a href="' . $cellevent['link'] . '" itemprop="url">' . $cellevent['link'] . '</a></div>';
|
1079 |
}
|
1080 |
$cellevent['details'] = $cellevent['details'] == '' ? $this->eventemptytext : $cellevent['details'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1081 |
$image = $this->getAndReplaceFirstImage($cellevent['details']);
|
1082 |
-
|
|
|
1083 |
$eventcontent .= '<div class="ecwd-detalis" itemprop="description">';
|
1084 |
-
if (
|
1085 |
-
if (
|
1086 |
-
$eventcontent .= get_the_post_thumbnail($cellevent['id'], 'thumbnail');
|
1087 |
} else {
|
1088 |
-
$eventcontent .= '<img src="' . $cellevent['image'] . '" />';
|
1089 |
}
|
1090 |
} elseif ($image['image'] != null) {
|
1091 |
-
$eventcontent .= '<img src="' . $image['image'] . '" />';
|
1092 |
$cellevent['details'] = $image['content'];
|
1093 |
}
|
1094 |
$desc = $cellevent['details'] ? $cellevent['details'] : $this->eventemptytext;
|
@@ -1132,21 +1153,23 @@
|
|
1132 |
$image_class = '';
|
1133 |
$cellevent['details'] = $cellevent['details'] == '' ? $this->eventemptytext : $cellevent['details'];
|
1134 |
$image = $this->getAndReplaceFirstImage($cellevent['details']);
|
1135 |
-
|
|
|
1136 |
$image_class = "ecwd-no-image";
|
1137 |
}
|
1138 |
-
$html .= '<div class="event-container ' . $image_class . '"
|
1139 |
if (!$this->widget) {
|
1140 |
$html .= '<div class="ecwd-list-img"><div class="ecwd-list-img-container">';
|
1141 |
$html .= '<div class="ecwd-img">';
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
|
|
1145 |
} else {
|
1146 |
-
$html .= '<img src="' . $cellevent['image'] . '" />';
|
1147 |
}
|
1148 |
} elseif ($image['image'] != null) {
|
1149 |
-
$html .= '<img src="' . $image['image'] . '" />';
|
1150 |
$cellevent['details'] = $image['content'];
|
1151 |
}
|
1152 |
$html .= '</div></div></div>';
|
@@ -1172,8 +1195,9 @@
|
|
1172 |
}
|
1173 |
$html .= '<div class="ecwd-list-date-cont">';
|
1174 |
if (isset($cellevent['all_day_event']) && $cellevent['all_day_event'] == 1) {
|
1175 |
-
$eventtime = '<div class="ecwd-time"
|
1176 |
-
|
|
|
1177 |
$eventtime .= '</div>';
|
1178 |
$html .= $eventtime;
|
1179 |
} else {
|
@@ -1193,6 +1217,7 @@
|
|
1193 |
$eventdate .= "-" . date($this->dateformat, $cellevent['to']);
|
1194 |
}
|
1195 |
$eventdate .= '</span>';
|
|
|
1196 |
$eventdate .= '</div>';
|
1197 |
$html .= $eventdate;
|
1198 |
}
|
@@ -1204,17 +1229,22 @@
|
|
1204 |
}
|
1205 |
$html .= '</div>';
|
1206 |
}
|
1207 |
-
if ($cellevent['location']
|
1208 |
-
$html .= '<div class="event-venue" itemprop="location" itemscope itemtype="http://schema.org/Place">
|
1209 |
-
<span itemprop="name">';
|
1210 |
if (isset($cellevent['venue']['name'])) {
|
1211 |
-
$html .= '<a href="' . $cellevent['venue']['permalink'] . '">' . $cellevent['venue']['name'] . '</a>';
|
1212 |
}
|
1213 |
-
$
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1218 |
}
|
1219 |
$desc = $cellevent['details'] ? $cellevent['details'] : $this->eventemptytext;
|
1220 |
$desc = apply_filters('format_content', $desc);
|
350 |
$currentWeek = $this->rangeWeek($this->year . '-' . $this->month . '-' . $this->day);
|
351 |
$date = $currentWeek['start'];
|
352 |
while (strtotime($date) <= strtotime($currentWeek['end'])) {
|
353 |
+
$html .= '<li itemscope itemtype="http://schema.org/Event">' . $this->calendar_cell(date('d', strtotime($date)), 'day-with-date', date('Y-n-j', strtotime($date))) . '</li>';
|
354 |
$date = date("Y-m-d", strtotime("+1 day", strtotime($date)));
|
355 |
}
|
356 |
$html .= '</ul>';
|
357 |
} elseif ($this->displaytype == 'day') {
|
358 |
$html .= '<ul class="day-event-list">';
|
359 |
+
$html .= '<li itemscope itemtype="http://schema.org/Event">' . $this->calendar_cell(date('d', strtotime($this->year . '-' . $this->month . '-' . $this->day)), 'day-with-date', date('Y-n-j', strtotime($this->year . '-' . $this->month . '-' . $this->day))) . '</li>';
|
360 |
$html .= '</ul>';
|
361 |
} elseif ($this->displaytype == '4day') {
|
362 |
$html .= '<ul class="day4-event-list">';
|
363 |
$days = $this->range4Days($this->year . '-' . $this->month . '-' . $this->day);
|
364 |
$date = $days['start'];
|
365 |
while (strtotime($date) <= strtotime($days['end'])) {
|
366 |
+
$html .= '<li itemscope itemtype="http://schema.org/Event">' . $this->calendar_cell(date('d', strtotime($date)), 'day-with-date', date('Y-n-j', strtotime($date))) . '</li>';
|
367 |
//$this->
|
368 |
$date = date("Y-m-d", strtotime("+1 day", strtotime($date)));
|
369 |
}
|
408 |
$html .= '<li class="' . $image_class . '" itemscope itemtype="http://schema.org/Event">';
|
409 |
if (!$this->widget) {
|
410 |
$html .= '<div class="ecwd-list-date resp" itemprop="startDate" content="' . date('Y-m-d', strtotime($event['from'])) . 'T' . date('H:i', $date_key) . '">' . __(date('d', $date_key), 'ecwd') . '</div>';
|
411 |
+
$html .='<span class="ecwd_hidden" itemprop="endDate" content="' . date('Y-m-d', strtotime($event['to'])) . 'T' . date('H:i', $date_key) . '"></span>';
|
412 |
$event_date = (($this->list_date_format !== 'd.F.l') ? date($this->list_date_format, $date_key) : (date('d', $date_key) . '.' . __(date('F', $date_key), 'ecwd') . '.' . __(date('l', $date_key), 'ecwd')));
|
413 |
if ($this->list_date_format !== 'd.F.l') {
|
414 |
$month_name = date('F', strtotime($event['from']));
|
416 |
}
|
417 |
$html .= '<div class="ecwd-list-img"><div class="ecwd-list-img-container"><div class="ecwd-list-date web">' . $event_date . '</div>';
|
418 |
$html .= '<div class="ecwd-img">';
|
419 |
+
$ecwd_has_thumb = has_post_thumbnail($event['id']);
|
420 |
+
if ($ecwd_has_thumb || $event['image']) {
|
421 |
+
if ($ecwd_has_thumb) {
|
422 |
+
$html .= get_the_post_thumbnail($event['id'],"thumbnail",array("itemprop"=>"image"));
|
423 |
} else {
|
424 |
+
$html .= '<img itemprop="image" src="' . $event['image'] . '" />';
|
425 |
}
|
426 |
} elseif ($image['image'] != null) {
|
427 |
+
$html .= '<img itemprop="image" src="' . $image['image'] . '" />';
|
428 |
$event['details'] = $image['content'];
|
429 |
}
|
430 |
$html .= '</div></div></div>';
|
431 |
} else {
|
432 |
$html .= '<div class="ecwd-list-date" itemprop="startDate" content="' . date('Y-m-d', strtotime($event['from'])) . 'T' . date('H:i', strtotime($event['starttime'])) . '">' . __(date('d', strtotime($event['from'])), 'ecwd') . '</div>';
|
433 |
+
$html .= '<span class="ecwd_hidden" itemprop="endDate" content="' . date('Y-m-d', strtotime($event['to'])) . 'T' . date('H:i', strtotime($event['endtime'])) . '"></span>';
|
434 |
}
|
435 |
$html .= '<div class="event-main-content">';
|
436 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
440 |
} else {
|
441 |
$html .= '<h3 class="event-title" style="color:' . $event['color'] . ';" itemprop="name">' . $event['title'] . '</h3>';
|
442 |
}
|
443 |
+
|
444 |
+
if(isset($event['link']) && $event['link'] !== ""){
|
445 |
+
$link = $event['link'];
|
446 |
+
}else if(isset($event['metas']['ecwd_event_url'][0]) && $event['metas']['ecwd_event_url'][0] !== ""){
|
447 |
+
$link = $event['metas']['ecwd_event_url'][0];
|
448 |
+
}else{
|
449 |
+
$link = get_post_permalink($event['id']);
|
450 |
+
}
|
451 |
+
|
452 |
+
if($link) {
|
453 |
+
$html .= '<span class="hidden" itemprop="url">' . $link . '</span>';
|
454 |
+
}
|
455 |
+
|
456 |
$html .= '<div class="ecwd-list-date-cont">';
|
457 |
if (isset($event['all_day_event']) && $event['all_day_event'] == 1) {
|
458 |
$eventtime = '<div class="ecwd-time"><span class="metainfo"> ' . __('All day', 'ecwd');
|
609 |
'week'
|
610 |
))
|
611 |
) { // mini and full cal
|
612 |
+
$html .= '<table class="ecwd_calendar_container ' . $this->displaytype . ' cal_' . $this->color . '" cellpadding="0" cellspacing="0" border="0">
|
613 |
+
<tr>';
|
|
|
|
|
614 |
// render week number on left
|
615 |
if ($this->weeknumbers == 'left') {
|
616 |
$html .= '<td rowspan="2" class="week-number"> </td>';
|
875 |
//echo $event['from'].'------'.$event['title'].'<br />';
|
876 |
$color = $event['color'];
|
877 |
$title = $event['title'];
|
878 |
+
$link = ($event['link'] == "" && isset($event['metas']['ecwd_event_url'][0])) ? $event['metas']['ecwd_event_url'][0] : $event['link'];
|
879 |
$eventdate = $event['date'];
|
880 |
$from = strtotime($event['from']);
|
881 |
$to = strtotime($event['to']);
|
969 |
$content .= '<ul class="events">';
|
970 |
$eventcontent = '';
|
971 |
foreach ($cellevents as $i => $cellevent) {
|
|
|
|
|
972 |
$li_class = '';
|
973 |
if ($i > 2 && $this->displaytype !== 'mini') {
|
974 |
$li_class = 'inmore';
|
988 |
if ($this->displaytype != 'mini') {
|
989 |
if (isset($cellevent['terms']['ecwd_taxonomy_image']) && $this->displaytype != 'mini') {
|
990 |
if ($cellevent['terms']['ecwd_taxonomy_image'] != '') {
|
991 |
+
$eventcontent .= '<img itemprop="image" class="ecwd-event-cat-icon" src="' . $cellevent['terms']['ecwd_taxonomy_image'] . '" />';
|
992 |
}/* elseif (isset($cellevent['color'])){
|
993 |
$eventcontent .= ' <span class="event-metalabel" style="background:' . $cellevent['color'] . '"></span>';
|
994 |
} */
|
1064 |
$eventdate .= "-" . date($this->dateformat, $cellevent['to']);
|
1065 |
}
|
1066 |
$eventdate .= '</span>';
|
1067 |
+
$eventdate .= '<span class="ecwd_hidden" itemprop="endDate" content="' . date('Y-m-d', $cellevent['to']) . 'T' . date('H:i', strtotime($cellevent['endtime'])) . '">'.'</span>';
|
1068 |
$eventdate .= '</div>';
|
1069 |
$eventcontent .= $eventdate;
|
1070 |
}
|
1075 |
}
|
1076 |
$eventcontent .= '</div>';
|
1077 |
}
|
1078 |
+
|
1079 |
if ($cellevent['location'] !== '') {
|
1080 |
$eventcontent .= '<div class="event-venue" itemprop="location" itemscope itemtype="http://schema.org/Place">';
|
1081 |
if (isset($cellevent['venue']['name'])) {
|
1091 |
$eventcontent .= '<div class="ecwd-link"> <a href="' . $cellevent['link'] . '" itemprop="url">' . $cellevent['link'] . '</a></div>';
|
1092 |
}
|
1093 |
$cellevent['details'] = $cellevent['details'] == '' ? $this->eventemptytext : $cellevent['details'];
|
1094 |
+
|
1095 |
+
if (isset($cellevent['link']) && $cellevent['link'] != '') {
|
1096 |
+
$eventcontent .= '<div class="ecwd-link" itemprop="url"> <a href="' . $cellevent['link'] . '" itemprop="url">' . $cellevent['link'] . '</a></div>';
|
1097 |
+
}else{
|
1098 |
+
$eventcontent .= '<span class="hidden" itemprop="url">' . get_post_permalink($cellevent['id']) . '</span>';
|
1099 |
+
}
|
1100 |
+
|
1101 |
$image = $this->getAndReplaceFirstImage($cellevent['details']);
|
1102 |
+
$ecwd_has_thumb = has_post_thumbnail($cellevent['id']);
|
1103 |
+
if ($cellevent['details'] != '' || $ecwd_has_thumb || $cellevent['image']) {
|
1104 |
$eventcontent .= '<div class="ecwd-detalis" itemprop="description">';
|
1105 |
+
if ($ecwd_has_thumb || $cellevent['image']) {
|
1106 |
+
if ($ecwd_has_thumb) {
|
1107 |
+
$eventcontent .= get_the_post_thumbnail($cellevent['id'], 'thumbnail',array("itemprop"=>"image"));
|
1108 |
} else {
|
1109 |
+
$eventcontent .= '<img itemprop="image" src="' . $cellevent['image'] . '" />';
|
1110 |
}
|
1111 |
} elseif ($image['image'] != null) {
|
1112 |
+
$eventcontent .= '<img itemprop="image" src="' . $image['image'] . '" />';
|
1113 |
$cellevent['details'] = $image['content'];
|
1114 |
}
|
1115 |
$desc = $cellevent['details'] ? $cellevent['details'] : $this->eventemptytext;
|
1153 |
$image_class = '';
|
1154 |
$cellevent['details'] = $cellevent['details'] == '' ? $this->eventemptytext : $cellevent['details'];
|
1155 |
$image = $this->getAndReplaceFirstImage($cellevent['details']);
|
1156 |
+
$ecwd_has_thumb = has_post_thumbnail($cellevent['id']);
|
1157 |
+
if (!$ecwd_has_thumb && $cellevent['image'] == "") {
|
1158 |
$image_class = "ecwd-no-image";
|
1159 |
}
|
1160 |
+
$html .= '<div class="event-container ' . $image_class . '">';
|
1161 |
if (!$this->widget) {
|
1162 |
$html .= '<div class="ecwd-list-img"><div class="ecwd-list-img-container">';
|
1163 |
$html .= '<div class="ecwd-img">';
|
1164 |
+
$post_thumbnail_id = get_post_thumbnail_id( $cellevent['id'] );
|
1165 |
+
if ($ecwd_has_thumb || $cellevent['image']) {
|
1166 |
+
if ($ecwd_has_thumb) {
|
1167 |
+
$html .= get_the_post_thumbnail($cellevent['id'],'thumb',array("itemprop"=>"image"));
|
1168 |
} else {
|
1169 |
+
$html .= '<img itemprop="image" src="' . $cellevent['image'] . '" />';
|
1170 |
}
|
1171 |
} elseif ($image['image'] != null) {
|
1172 |
+
$html .= '<img itemprop="image" src="' . $image['image'] . '" />';
|
1173 |
$cellevent['details'] = $image['content'];
|
1174 |
}
|
1175 |
$html .= '</div></div></div>';
|
1195 |
}
|
1196 |
$html .= '<div class="ecwd-list-date-cont">';
|
1197 |
if (isset($cellevent['all_day_event']) && $cellevent['all_day_event'] == 1) {
|
1198 |
+
$eventtime = '<div class="ecwd-time">'.
|
1199 |
+
'<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>'.
|
1200 |
+
'<span class="ecwd_hidden" itemprop="endDate" content="' . date('Y-m-d', $cellevent['to']) . 'T' . date('H:i', strtotime($cellevent['endtime'])) . '"></span>';
|
1201 |
$eventtime .= '</div>';
|
1202 |
$html .= $eventtime;
|
1203 |
} else {
|
1217 |
$eventdate .= "-" . date($this->dateformat, $cellevent['to']);
|
1218 |
}
|
1219 |
$eventdate .= '</span>';
|
1220 |
+
$eventdate .= '<span class="ecwd_hidden" itemprop="endDate" content="' . date('Y-m-d', $cellevent['to']) . 'T' . date('H:i', strtotime($cellevent['endtime'])) . '"></span>';
|
1221 |
$eventdate .= '</div>';
|
1222 |
$html .= $eventdate;
|
1223 |
}
|
1229 |
}
|
1230 |
$html .= '</div>';
|
1231 |
}
|
1232 |
+
if ($cellevent['location'] !== '') {
|
1233 |
+
$html .= '<div class="event-venue" itemprop="location" itemscope itemtype="http://schema.org/Place">';
|
|
|
1234 |
if (isset($cellevent['venue']['name'])) {
|
1235 |
+
$html .= '<div class="ecwd-venue" ><span itemprop="name"><a href="' . $cellevent['venue']['permalink'] . '">' . $cellevent['venue']['name'] . '</a></span></div>';
|
1236 |
}
|
1237 |
+
if (isset($cellevent['location']) && $cellevent['location'] != '') {
|
1238 |
+
$html .= '<span class="ecwd_hidden" itemprop="name">' . $cellevent['location'] . '</span>';
|
1239 |
+
$html .= '<div class="ecwd-location" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"><span>' . $cellevent['location'] . '</span></div>';
|
1240 |
+
}
|
1241 |
+
$html .= '</div>';
|
1242 |
+
}
|
1243 |
+
|
1244 |
+
if (isset($cellevent['link']) && $cellevent['link'] != '') {
|
1245 |
+
$html .= '<div class="ecwd-link" itemprop="url"> <a href="' . $cellevent['link'] . '" itemprop="url">' . $cellevent['link'] . '</a></div>';
|
1246 |
+
}else{
|
1247 |
+
$html .= '<span class="hidden" itemprop="url">' . get_post_permalink($cellevent['id']) . '</span>';
|
1248 |
}
|
1249 |
$desc = $cellevent['details'] ? $cellevent['details'] : $this->eventemptytext;
|
1250 |
$desc = apply_filters('format_content', $desc);
|
includes/ecwd-cpt-class.php
CHANGED
@@ -14,6 +14,7 @@ class ECWD_Cpt {
|
|
14 |
public $rewriteSlug;
|
15 |
|
16 |
private function __construct() {
|
|
|
17 |
$this->tax = ECWD_PLUGIN_PREFIX . '_event_category';
|
18 |
$this->tag = ECWD_PLUGIN_PREFIX . '_event_tag';
|
19 |
|
@@ -24,6 +25,9 @@ class ECWD_Cpt {
|
|
24 |
add_action('pre_get_posts', array($this, 'add_custom_post_type_to_query'));
|
25 |
add_action('pre_get_posts', array($this, 'category_archive_page_query'));
|
26 |
add_action('pre_get_posts', array($this, 'events_archive_page_query'));
|
|
|
|
|
|
|
27 |
add_action('add_meta_boxes', array($this, 'calendars_cpt_meta'));
|
28 |
add_action('add_meta_boxes', array($this, 'events_cpt_meta'));
|
29 |
add_action('add_meta_boxes', array($this, 'themes_cpt_meta'));
|
@@ -1346,7 +1350,24 @@ class ECWD_Cpt {
|
|
1346 |
$query->query_vars['posts_per_page'] = 5;
|
1347 |
}
|
1348 |
}
|
1349 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1350 |
public function events_archive_page_query($query) {
|
1351 |
if (is_archive() && !is_admin()) {
|
1352 |
if (isset($query->query_vars['post_type']) && $query->query_vars['post_type'] == 'ecwd_event') {
|
14 |
public $rewriteSlug;
|
15 |
|
16 |
private function __construct() {
|
17 |
+
global $ecwd_options;
|
18 |
$this->tax = ECWD_PLUGIN_PREFIX . '_event_category';
|
19 |
$this->tag = ECWD_PLUGIN_PREFIX . '_event_tag';
|
20 |
|
25 |
add_action('pre_get_posts', array($this, 'add_custom_post_type_to_query'));
|
26 |
add_action('pre_get_posts', array($this, 'category_archive_page_query'));
|
27 |
add_action('pre_get_posts', array($this, 'events_archive_page_query'));
|
28 |
+
if(isset($ecwd_options['change_events_archive_page_post_date']) && $ecwd_options['change_events_archive_page_post_date'] == '1'){
|
29 |
+
add_filter('the_post', array($this, 'ecwd_events_archive_page'));
|
30 |
+
}
|
31 |
add_action('add_meta_boxes', array($this, 'calendars_cpt_meta'));
|
32 |
add_action('add_meta_boxes', array($this, 'events_cpt_meta'));
|
33 |
add_action('add_meta_boxes', array($this, 'themes_cpt_meta'));
|
1350 |
$query->query_vars['posts_per_page'] = 5;
|
1351 |
}
|
1352 |
}
|
1353 |
+
|
1354 |
+
public function ecwd_events_archive_page($post) {
|
1355 |
+
global $ecwd_options;
|
1356 |
+
|
1357 |
+
if (is_admin() === true || is_archive() === false || is_post_type_archive(array("ecwd_event")) === false) {
|
1358 |
+
return $post;
|
1359 |
+
}
|
1360 |
+
$from = get_post_meta($post->ID, "ecwd_event_date_from", true);
|
1361 |
+
if (empty($from)) {
|
1362 |
+
return $post;
|
1363 |
+
}
|
1364 |
+
$date_format = (!empty($ecwd_options['date_format'])) ? $ecwd_options['date_format'] : "Y/m/d";
|
1365 |
+
$sec = strtotime($from);
|
1366 |
+
$date = date($date_format,$sec);
|
1367 |
+
$post->post_date = $date;
|
1368 |
+
return $post;
|
1369 |
+
}
|
1370 |
+
|
1371 |
public function events_archive_page_query($query) {
|
1372 |
if (is_archive() && !is_admin()) {
|
1373 |
if (isset($query->query_vars['post_type']) && $query->query_vars['post_type'] == 'ecwd_event') {
|
includes/ecwd-functions.php
CHANGED
@@ -30,13 +30,8 @@ function ecwd_print_calendar($calendar_ids, $display = 'mini', $args = array(),
|
|
30 |
}
|
31 |
|
32 |
$ecwd_calendar_theme = get_post_meta($ids[0], ECWD_PLUGIN_PREFIX . '_calendar_theme', true);
|
33 |
-
|
34 |
-
$ecwd_default_color = $ecwd_calendar_theme
|
35 |
-
// wp_enqueue_style( 'ecwd-calendar-main', plugins_url( '../css/calendar.css', __FILE__ ), '', 1 );
|
36 |
-
|
37 |
-
/* if ( $ecwd_calendar_theme && file_exists( ECWD_DIR . '/css/themes/' . $css_file . ".css" ) ) {
|
38 |
-
wp_enqueue_style( 'ecwd-calendar-theme_' . $css_file, plugins_url( '../css/themes/' . $css_file . '.css', __FILE__ ), '', 1 );
|
39 |
-
} */
|
40 |
if ($ecwd_default_color && file_exists(ECWD_DIR . '/css/' . $ecwd_default_color . ".css")) {
|
41 |
wp_enqueue_style('ecwd-calendar-main', plugins_url('../css/' . $ecwd_default_color . '.css', __FILE__), '', 1);
|
42 |
}
|
30 |
}
|
31 |
|
32 |
$ecwd_calendar_theme = get_post_meta($ids[0], ECWD_PLUGIN_PREFIX . '_calendar_theme', true);
|
33 |
+
|
34 |
+
$ecwd_default_color = (!empty($ecwd_calendar_theme)) ? $ecwd_calendar_theme : "calendar_grey";
|
|
|
|
|
|
|
|
|
|
|
35 |
if ($ecwd_default_color && file_exists(ECWD_DIR . '/css/' . $ecwd_default_color . ".css")) {
|
36 |
wp_enqueue_style('ecwd-calendar-main', plugins_url('../css/' . $ecwd_default_color . '.css', __FILE__), '', 1);
|
37 |
}
|
includes/register-settings.php
CHANGED
@@ -179,6 +179,13 @@ function ecwd_register_settings() {
|
|
179 |
'default' => '0',
|
180 |
'labels' => array('DESC', 'ASC')
|
181 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
'enable_sidebar_in_event' => array(
|
183 |
'id' => 'enable_sidebar_in_event',
|
184 |
'name' => __('Enable sidebar in event page', 'ecwd'),
|
179 |
'default' => '0',
|
180 |
'labels' => array('DESC', 'ASC')
|
181 |
),
|
182 |
+
'change_events_archive_page_post_date' => array(
|
183 |
+
'id' => 'change_events_archive_page_post_date',
|
184 |
+
'name' => __('In Events Archive page change post date to event start date', 'ecwd'),
|
185 |
+
'desc' => '',
|
186 |
+
'type' => 'radio',
|
187 |
+
'default' => 0
|
188 |
+
),
|
189 |
'enable_sidebar_in_event' => array(
|
190 |
'id' => 'enable_sidebar_in_event',
|
191 |
'name' => __('Enable sidebar in event page', 'ecwd'),
|
js/ecwd_popup.js
CHANGED
@@ -49,11 +49,13 @@
|
|
49 |
}
|
50 |
el.on('click', '.ecwd_close_popup', function () {
|
51 |
el.hide();
|
|
|
52 |
params.popup_close(el);
|
53 |
});
|
54 |
$(document).keyup(function (e) {
|
55 |
if (e.keyCode == 27) { // escape key maps to keycode `27`
|
56 |
el.hide();
|
|
|
57 |
params.popup_close(el);
|
58 |
}
|
59 |
});
|
@@ -64,6 +66,7 @@
|
|
64 |
if (params.only_open == false) {
|
65 |
add_popup(html);
|
66 |
}
|
|
|
67 |
el.show();
|
68 |
params.after_popup_show(el);
|
69 |
el.addClass('ecwd_popup_el');
|
49 |
}
|
50 |
el.on('click', '.ecwd_close_popup', function () {
|
51 |
el.hide();
|
52 |
+
jQuery('body').removeClass("body-ecwd_open_popup");
|
53 |
params.popup_close(el);
|
54 |
});
|
55 |
$(document).keyup(function (e) {
|
56 |
if (e.keyCode == 27) { // escape key maps to keycode `27`
|
57 |
el.hide();
|
58 |
+
jQuery('body').removeClass("body-ecwd_open_popup");
|
59 |
params.popup_close(el);
|
60 |
}
|
61 |
});
|
66 |
if (params.only_open == false) {
|
67 |
add_popup(html);
|
68 |
}
|
69 |
+
jQuery('body').addClass("body-ecwd_open_popup");
|
70 |
el.show();
|
71 |
params.after_popup_show(el);
|
72 |
el.addClass('ecwd_popup_el');
|
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.6
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -155,6 +155,10 @@ After downloading the ZIP file of the Event Calendar WD plugin,
|
|
155 |
|
156 |
== Changelog ==
|
157 |
|
|
|
|
|
|
|
|
|
158 |
= 1.0.75 =
|
159 |
* Changed: Backend menu
|
160 |
|
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.6
|
7 |
+
Stable tag: 1.0.76
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
155 |
|
156 |
== Changelog ==
|
157 |
|
158 |
+
= 1.0.76 =
|
159 |
+
* Fixed: Data structures
|
160 |
+
* Fixed: Bug on Repeating events
|
161 |
+
|
162 |
= 1.0.75 =
|
163 |
* Changed: Backend menu
|
164 |
|