Version Description
- Fixed: Warnings in Google structured data.
Download this release
Release Info
Developer | 10web |
Plugin | Event Calendar WD – Responsive Event Calendar plugin |
Version | 1.1.36 |
Comparing to | |
See all releases |
Code changes from version 1.1.35 to 1.1.36
- ecwd.php +2 -2
- ecwd_admin_class.php +1 -1
- includes/calendar-class.php +143 -134
- includes/ecwd-cpt-class.php +1 -1
- readme.txt +4 -1
- views/ecwd-event-content.php +142 -115
ecwd.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Event Calendar WD
|
4 |
* Plugin URI: https://10web.io/plugins/wordpress-event-calendar/
|
5 |
* Description: Event Calendar WD is an easy event management and planning tool with advanced features.
|
6 |
-
* Version: 1.1.
|
7 |
* Author: 10Web
|
8 |
* Author URI: https://10web.io/plugins/
|
9 |
* Text Domain: event-calendar-wd
|
@@ -28,7 +28,7 @@ if(! defined( 'ECWD_URL' ) ){
|
|
28 |
}
|
29 |
|
30 |
if (!defined('ECWD_VERSION')) {
|
31 |
-
define('ECWD_VERSION', "1.1.
|
32 |
}
|
33 |
|
34 |
if (!defined('ECWD_PLUGIN_MAIN_FILE')) {
|
3 |
* Plugin Name: Event Calendar WD
|
4 |
* Plugin URI: https://10web.io/plugins/wordpress-event-calendar/
|
5 |
* Description: Event Calendar WD is an easy event management and planning tool with advanced features.
|
6 |
+
* Version: 1.1.36
|
7 |
* Author: 10Web
|
8 |
* Author URI: https://10web.io/plugins/
|
9 |
* Text Domain: event-calendar-wd
|
28 |
}
|
29 |
|
30 |
if (!defined('ECWD_VERSION')) {
|
31 |
+
define('ECWD_VERSION', "1.1.36");
|
32 |
}
|
33 |
|
34 |
if (!defined('ECWD_PLUGIN_MAIN_FILE')) {
|
ecwd_admin_class.php
CHANGED
@@ -1444,7 +1444,7 @@ class ECWD_Admin {
|
|
1444 |
"plugin_menu_title" => "Events", //null
|
1445 |
"plugin_menu_icon" =>ECWD_URL."/assets/event-icon.png", // SC_URL . '/images/Staff_Directory_WD_menu.png', //null
|
1446 |
"deactivate" => true,
|
1447 |
-
"subscribe" =>
|
1448 |
"custom_post" => ECWD_MENU_SLUG,
|
1449 |
"menu_position" => 25,
|
1450 |
"display_overview" => false,
|
1444 |
"plugin_menu_title" => "Events", //null
|
1445 |
"plugin_menu_icon" =>ECWD_URL."/assets/event-icon.png", // SC_URL . '/images/Staff_Directory_WD_menu.png', //null
|
1446 |
"deactivate" => true,
|
1447 |
+
"subscribe" => false,
|
1448 |
"custom_post" => ECWD_MENU_SLUG,
|
1449 |
"menu_position" => 25,
|
1450 |
"display_overview" => false,
|
includes/calendar-class.php
CHANGED
@@ -79,6 +79,7 @@
|
|
79 |
//--------------------------------------------------------------------------------------------
|
80 |
public $jd, $year, $month, $day, $displaytype, $numdaysinmonth, $monthstartday, $monthname, $previousmonth, $nextmonth;
|
81 |
public $events = array();
|
|
|
82 |
|
83 |
// types: mini,full,list,mini-list,(default=full)
|
84 |
public function __construct ($type = 'full', $date = '', $staticdisplaytype = false, $widget = 0, $limit = false, $page = 1, $displays = null, $filters = null, $event_search = 'yes', $ecwd_views = array(), $preview) {
|
@@ -252,7 +253,6 @@
|
|
252 |
}
|
253 |
$fromDate = date('Y-n-j', strtotime($beginDate));
|
254 |
$toDate = date('Y-n-j', strtotime($endDate));
|
255 |
-
// echo $fromDate.'----'.$toDate.'<br />';
|
256 |
$date_parts1 = explode('-', $fromDate);
|
257 |
$date_parts2 = explode('-', $toDate);
|
258 |
$start_date = gregoriantojd($date_parts1[1], $date_parts1[2], $date_parts1[0]);
|
@@ -269,13 +269,7 @@
|
|
269 |
$end_date = date('Y-m-t', strtotime($this->date));
|
270 |
$html .= $this->calendar_head(); // set table head
|
271 |
$this->seted_days = array();
|
272 |
-
if (!in_array($this->displaytype, array(
|
273 |
-
"list",
|
274 |
-
"mini-list",
|
275 |
-
"week",
|
276 |
-
'day',
|
277 |
-
))
|
278 |
-
) { // mini and full cal
|
279 |
$html .= '<tr>';
|
280 |
// render week number on left
|
281 |
if ($this->weeknumbers == 'left' && $this->monthstartday != $this->weekstartday) {
|
@@ -345,52 +339,43 @@
|
|
345 |
$html .= '<td class="week-number" style="border-bottom:1px solid #' . $this->bordercolor . ';"><span>' . date('W', strtotime($date)) . '</span></td>';
|
346 |
}
|
347 |
$html .= '</tr>';
|
348 |
-
}
|
|
|
349 |
$html .= '<ul class="week-event-list">';
|
350 |
$currentWeek = $this->rangeWeek($this->year . '-' . $this->month . '-' . $this->day);
|
351 |
$date = $currentWeek['start'];
|
352 |
while (strtotime($date) <= strtotime($currentWeek['end'])) {
|
353 |
-
$html .= '<li
|
354 |
$date = date("Y-m-d", strtotime("+1 day", strtotime($date)));
|
355 |
}
|
356 |
$html .= '</ul>';
|
357 |
-
}
|
|
|
358 |
$html .= '<ul class="day-event-list">';
|
359 |
-
$html .= '<li
|
360 |
$html .= '</ul>';
|
361 |
-
}
|
|
|
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
|
367 |
-
//$this->
|
368 |
$date = date("Y-m-d", strtotime("+1 day", strtotime($date)));
|
369 |
}
|
370 |
$html .= '</ul>';
|
371 |
-
}
|
372 |
-
|
373 |
-
// $events = array();
|
374 |
-
// foreach ($this->events as $date_events){
|
375 |
-
// $events[] = $date_events;
|
376 |
-
// }
|
377 |
-
//
|
378 |
-
// $this->events= $events;// = $this->arraySort($this->events, 'from');
|
379 |
-
}
|
380 |
if ($this->displaytype == 'map') {
|
381 |
|
382 |
-
}
|
|
|
383 |
$pages = 0;
|
384 |
$page = $this->page;
|
385 |
$html .= '<ul class="ecwd_list">';
|
386 |
$page_index = 0;
|
387 |
$ev_counts = 0;
|
388 |
$events_for_list = $this->events;
|
389 |
-
/* if (!isset($ecwd_options['long_events']) || (isset($ecwd_options['long_events']) && $ecwd_options['long_events'] == '0')) {
|
390 |
-
$events_for_list = array(
|
391 |
-
$start_date => $events_for_list,
|
392 |
-
);
|
393 |
-
} */
|
394 |
foreach ($events_for_list as $date_key => $events) {
|
395 |
$ev_counts += count($events);
|
396 |
foreach ($events as $event) {
|
@@ -401,15 +386,16 @@
|
|
401 |
}
|
402 |
if ($page_index >= (($page - 1) * $this->listlimit)) {
|
403 |
if ($this->displaytype == 'list') { // full event list
|
404 |
-
|
405 |
-
|
|
|
406 |
if (!has_post_thumbnail($event['id']) && $event['image'] == "") {
|
407 |
$image_class = "ecwd-no-image";
|
408 |
}
|
409 |
-
$html .= '<li class="' . $image_class . '"
|
410 |
if (!$this->widget) {
|
411 |
-
$html .= '<div class="ecwd-list-date resp"
|
412 |
-
|
413 |
$event_date = (($this->list_date_format !== 'd.F.l') ? date($this->list_date_format, $date_key) : (date('d', $date_key) . '.' . __(date('F', $date_key), 'event-calendar-wd') . '.' . __(date('l', $date_key), 'event-calendar-wd')));
|
414 |
if ($this->list_date_format !== 'd.F.l') {
|
415 |
$month_name = date('F', strtotime($event['from']));
|
@@ -420,28 +406,27 @@
|
|
420 |
$ecwd_has_thumb = has_post_thumbnail($event['id']);
|
421 |
if ($ecwd_has_thumb || $event['image']) {
|
422 |
if ($ecwd_has_thumb) {
|
423 |
-
$html .= get_the_post_thumbnail($event['id'],"thumbnail"
|
424 |
} else {
|
425 |
-
$html .= '<img
|
426 |
}
|
427 |
-
|
428 |
-
$html .= '<img
|
429 |
$event['details'] = $image['content'];
|
430 |
}
|
431 |
$html .= '</div></div></div>';
|
432 |
} else {
|
433 |
-
$html .= '<div class="ecwd-list-date"
|
434 |
-
$html .= '<span class="ecwd_hidden" itemprop="endDate" content="' . date('Y-m-d', strtotime($event['to'])) . 'T' . date('H:i', strtotime($event['endtime'])) . '"></span>';
|
435 |
}
|
436 |
$html .= '<div class="event-main-content">';
|
437 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
438 |
-
$date_data = 'start-date-data="' . date(
|
439 |
-
$date_data .= ' end-date-data="' . date(
|
440 |
-
$html .= '<h3 class="event-title"
|
441 |
} else if ($event['permalink'] != '') {
|
442 |
-
$html .= '<h3 class="event-title"
|
443 |
} else {
|
444 |
-
$html .= '<h3 class="event-title" style="color:' . $event['color'] . ';"
|
445 |
}
|
446 |
|
447 |
if(isset($event['link']) && $event['link'] !== ""){
|
@@ -452,10 +437,6 @@
|
|
452 |
$link = get_post_permalink($event['id']);
|
453 |
}
|
454 |
|
455 |
-
if($link) {
|
456 |
-
$html .= '<span class="hidden" itemprop="url">' . $link . '</span>';
|
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', 'event-calendar-wd');
|
@@ -487,27 +468,28 @@
|
|
487 |
if (isset($event['organizers']) && count($event['organizers']) > 0) {
|
488 |
$html .= '<div class="event-organizers"><div class="ecwd-org-cont">';
|
489 |
foreach ($event['organizers'] as $organizer) {
|
490 |
-
$html .= '<div class="event-organizer"
|
491 |
}
|
492 |
$html .= '</div></div>';
|
493 |
}
|
494 |
if ($event['location'] !== '') {
|
495 |
-
$html .= '<div class="event-venue"
|
496 |
-
<span
|
497 |
if (isset($event['venue']['name'])) {
|
498 |
$html .= '<a href="' . $event['venue']['permalink'] . '">' . $event['venue']['name'] . '</a>';
|
499 |
}
|
500 |
$html .= '</span>
|
501 |
-
<div class="address"
|
502 |
' . ($event['location'] ? $event['location'] : "") . '
|
503 |
</div>
|
504 |
</div>
|
505 |
-
|
506 |
}
|
507 |
$desc = $event['details'] ? $event['details'] : $this->eventemptytext;
|
508 |
$desc = apply_filters('format_content', $desc);
|
509 |
-
$html .= '<div class="event-content"
|
510 |
-
}
|
|
|
511 |
$html .= '<li style="background:' . $event['color'] . ';"';
|
512 |
if ($this->minilinkbase !== false) { // enable link (good for linking to full calendar)
|
513 |
$html .= ' class="event-link"';
|
@@ -566,7 +548,12 @@
|
|
566 |
$html .= $this->calendar_foot();
|
567 |
// remove tabs, line breaks, vertical tabs, null-byte
|
568 |
$html = $this->stripWhitespace($html);
|
569 |
-
|
|
|
|
|
|
|
|
|
|
|
570 |
}
|
571 |
|
572 |
// month/year select box
|
@@ -733,7 +720,6 @@
|
|
733 |
}
|
734 |
}
|
735 |
|
736 |
-
|
737 |
public function getMonthDate ($date) {
|
738 |
if(date('m',strtotime($date)) === date('m')){
|
739 |
return date('Y-n-j');
|
@@ -850,8 +836,8 @@
|
|
850 |
$svalue = $this->search_params['query'];
|
851 |
}
|
852 |
$html .= '<div class="ecwd-search">
|
853 |
-
|
854 |
-
|
855 |
}
|
856 |
$html .= '</div>';
|
857 |
}
|
@@ -883,7 +869,6 @@
|
|
883 |
}
|
884 |
if (is_array($all_events) && $date) { // events array populated from addEvent()
|
885 |
foreach ($all_events as $event) {
|
886 |
-
//echo $event['from'].'------'.$event['title'].'<br />';
|
887 |
$color = $event['color'];
|
888 |
$title = $event['title'];
|
889 |
$link = ($event['link'] == "" && isset($event['metas']['ecwd_event_url'][0])) ? $event['metas']['ecwd_event_url'][0] : $event['link'];
|
@@ -923,10 +908,10 @@
|
|
923 |
'permalink' => $permalink,
|
924 |
'image' => $image,
|
925 |
);
|
|
|
926 |
}
|
927 |
}
|
928 |
}
|
929 |
-
|
930 |
// sort by starttime for the cell
|
931 |
if (count($cellevents) > 0) {
|
932 |
$cellevents = $this->arraySort($cellevents, 'starttime');
|
@@ -973,7 +958,7 @@
|
|
973 |
$month_name = date('F', strtotime($date));
|
974 |
$event_date = str_replace($month_name, __($month_name, 'event-calendar-wd'), $event_date);
|
975 |
}
|
976 |
-
$content = '<div class="ecwd-week-date resp"
|
977 |
} else {
|
978 |
$content = '<div class="day-number">' . $day . '</div>'; // day number or prev/next month cell content
|
979 |
}
|
@@ -986,8 +971,7 @@
|
|
986 |
if ($i > ($month_view_events_count - 1) && $this->displaytype !== 'mini') {
|
987 |
$li_class = 'inmore';
|
988 |
}
|
989 |
-
|
990 |
-
$eventcontent .= '<li itemscope itemtype="http://schema.org/Event" style="';
|
991 |
if (is_array($cellevent['terms'])) {
|
992 |
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
993 |
$eventcontent .= 'background-color: ' . $cellevent['color'] . '; ';
|
@@ -1003,21 +987,19 @@
|
|
1003 |
if (is_array($cellevent['terms'])) {
|
1004 |
foreach ($cellevent['terms'] as $terms) {
|
1005 |
if (isset($terms['ecwd_taxonomy_image']) && $terms['ecwd_taxonomy_image'] != '') {
|
1006 |
-
$eventcontent .= '<img
|
1007 |
break;
|
1008 |
}
|
1009 |
-
}
|
1010 |
-
$eventcontent .= ' <span class="event-metalabel" style="background:' . $cellevent['color'] . '"></span>';
|
1011 |
-
} */
|
1012 |
}
|
1013 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
1014 |
$date_data = 'start-date-data="' . date("Y-m-d", strtotime($cellevent['date'])) . '"';
|
1015 |
$date_data .= ' end-date-data="'.date("Y-m-d", $cellevent['to']).'"';
|
1016 |
-
$eventcontent .= '<span ' . $date_data . ' class="ecwd_open_event_popup event' . $cellevent['id'] . '"
|
1017 |
} elseif ($cellevent['permalink']) {
|
1018 |
-
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . '><span
|
1019 |
} else {
|
1020 |
-
$eventcontent .= '<span
|
1021 |
}
|
1022 |
}
|
1023 |
$this->seted_days[$cellevent['id']] = $date;
|
@@ -1037,13 +1019,13 @@
|
|
1037 |
$eventcontent .= '<div class="event-details-title">';
|
1038 |
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
1039 |
$eventcontent .= ' <span class="event-metalabel" style="background:' . $cellevent['color'] . '"></span>
|
1040 |
-
<h5 style="color:' . $cellevent['color'] . '"
|
1041 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
1042 |
$date_data = 'start-date-data="' . date("Y-m-d", strtotime($cellevent['date'])) . '"';
|
1043 |
$date_data .= ' end-date-data="' . date("Y-m-d", $cellevent['to']) . '"';
|
1044 |
-
$eventcontent .= '<span ' . $date_data . ' class="ecwd_open_event_popup event' . $cellevent['id'] . ' "
|
1045 |
} else if (isset($cellevent['permalink']) && $cellevent['permalink'] !== '') {
|
1046 |
-
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . ' style="color: ' . $cellevent['color'] . '
|
1047 |
} else {
|
1048 |
$eventcontent .= $cellevent['title'];
|
1049 |
}
|
@@ -1051,13 +1033,13 @@
|
|
1051 |
';
|
1052 |
} else {
|
1053 |
$eventcontent .= ' <span class="event-metalabel"></span>
|
1054 |
-
<h5
|
1055 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
1056 |
$date_data = 'start-date-data="' . date("Y-m-d", strtotime($cellevent['date'])) . '"';
|
1057 |
$date_data .= ' end-date-data="' . date("Y-m-d", $cellevent['to']) . '"';
|
1058 |
$eventcontent .= '<span ' . $date_data . ' class="ecwd_open_event_popup event' . $cellevent['id'] . '">' . $cellevent['title'] . '</span>';
|
1059 |
} else if (isset($cellevent['permalink']) && $cellevent['permalink'] !== '') {
|
1060 |
-
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . '
|
1061 |
} else {
|
1062 |
$eventcontent .= $cellevent['title'];
|
1063 |
}
|
@@ -1066,13 +1048,11 @@
|
|
1066 |
$eventcontent .= ' </div>';
|
1067 |
}
|
1068 |
if ($all_day_event) {
|
1069 |
-
$eventtime = '<div class="ecwd-time"><span class="metainfo"
|
1070 |
-
$eventtime .= '</span>';
|
1071 |
-
$eventtime .= '</div>';
|
1072 |
$eventcontent .= $eventtime;
|
1073 |
} else {
|
1074 |
if ($cellevent['starttime'] != '') { // event details - hidden until clicked (full)
|
1075 |
-
$eventtime = '<div class="ecwd-time"><span class="metainfo"
|
1076 |
if ($cellevent['endtime'] != '' && strtotime($cellevent['endtime']) !== strtotime($cellevent['starttime'])) {
|
1077 |
$eventtime .= "-" . date($this->timeformat, strtotime($cellevent['endtime']));
|
1078 |
}
|
@@ -1082,12 +1062,11 @@
|
|
1082 |
}
|
1083 |
}
|
1084 |
if ($cellevent['from'] != '') { // event details - hidden until clicked (full)
|
1085 |
-
$eventdate = '<div class="ecwd-date"><span class="metainfo">
|
1086 |
if ($cellevent['to'] != '' && $cellevent['to'] != $cellevent['from']) {
|
1087 |
$eventdate .= "-" . date($this->dateformat, $cellevent['to']);
|
1088 |
}
|
1089 |
$eventdate .= '</span>';
|
1090 |
-
$eventdate .= '<span class="ecwd_hidden" itemprop="endDate" content="' . date('Y-m-d', $cellevent['to']) . 'T' . date('H:i', strtotime($cellevent['endtime'])) . '">'.'</span>';
|
1091 |
$eventdate .= ECWD::get_time_zone( $all_day_event );
|
1092 |
$eventdate .= '</div>';
|
1093 |
$eventcontent .= $eventdate;
|
@@ -1095,45 +1074,37 @@
|
|
1095 |
if (isset($cellevent['organizers']) && count($cellevent['organizers']) > 0) {
|
1096 |
$eventcontent .= '<div class="event-organizers">';
|
1097 |
foreach ($cellevent['organizers'] as $organizer) {
|
1098 |
-
$eventcontent .= '<div class="event-organizer"
|
1099 |
}
|
1100 |
$eventcontent .= '</div>';
|
1101 |
}
|
1102 |
|
1103 |
if ($cellevent['location'] !== '') {
|
1104 |
-
$eventcontent .= '<div class="event-venue"
|
1105 |
if (isset($cellevent['venue']['name'])) {
|
1106 |
-
$eventcontent .= '<div class="ecwd-venue"
|
1107 |
}
|
1108 |
if (isset($cellevent['location']) && $cellevent['location'] != '') {
|
1109 |
-
$eventcontent .= '<
|
1110 |
-
$eventcontent .= '<div class="ecwd-location" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"><span>' . $cellevent['location'] . '</span></div>';
|
1111 |
}
|
1112 |
$eventcontent .= '</div>';
|
1113 |
}
|
1114 |
if (isset($cellevent['link']) && $cellevent['link'] != '') {
|
1115 |
-
$eventcontent .= '<div class="ecwd-link"
|
1116 |
}
|
1117 |
-
$cellevent['details'] = $cellevent['details'] == '' ? $this->eventemptytext : $cellevent['details'];
|
1118 |
-
|
1119 |
-
if (isset($cellevent['link']) && $cellevent['link'] != '') {
|
1120 |
-
$eventcontent .= '<div class="ecwd-link" itemprop="url"> <a href="' . $cellevent['link'] . '" itemprop="url">' . $cellevent['link'] . '</a></div>';
|
1121 |
-
}else{
|
1122 |
-
$eventcontent .= '<span class="hidden" itemprop="url">' . get_post_permalink($cellevent['id']) . '</span>';
|
1123 |
-
}
|
1124 |
-
|
1125 |
-
$image = $this->getAndReplaceFirstImage($cellevent['details']);
|
1126 |
$ecwd_has_thumb = has_post_thumbnail($cellevent['id']);
|
1127 |
if ($cellevent['details'] != '' || $ecwd_has_thumb || $cellevent['image']) {
|
1128 |
-
$eventcontent .= '<div
|
1129 |
if ($ecwd_has_thumb || $cellevent['image']) {
|
1130 |
if ($ecwd_has_thumb) {
|
1131 |
-
$eventcontent .= get_the_post_thumbnail($cellevent['id'], 'thumbnail'
|
1132 |
} else {
|
1133 |
-
$eventcontent .= '<img
|
1134 |
}
|
1135 |
-
|
1136 |
-
$eventcontent .= '<img
|
1137 |
$cellevent['details'] = $image['content'];
|
1138 |
}
|
1139 |
$desc = $cellevent['details'] ? $cellevent['details'] : $this->eventemptytext;
|
@@ -1141,10 +1112,7 @@
|
|
1141 |
$eventcontent .= $desc . '</div>';
|
1142 |
}
|
1143 |
$eventcontent .= '</div><div class="ecwd-event-arrow-right"></div>';
|
1144 |
-
$eventcontent .= '</li>
|
1145 |
-
// } else {
|
1146 |
-
// //$eventcontent .= $cellevent['title'];
|
1147 |
-
// }
|
1148 |
}
|
1149 |
$content .= apply_filters('format_content', $eventcontent);
|
1150 |
if ($i > ($month_view_events_count - 1) && $this->displaytype !== 'mini') {
|
@@ -1168,7 +1136,7 @@
|
|
1168 |
$month_name = date('F', strtotime($date));
|
1169 |
$event_date = str_replace($month_name, __($month_name, 'event-calendar-wd'), $event_date);
|
1170 |
}
|
1171 |
-
$html = '<div class="ecwd-week-date resp" style="background:#' . $this->eventlistbg . '"
|
1172 |
} else {
|
1173 |
$html = '<div class="ecwd-week-date">' . date('d', strtotime($date)) . '</div>';
|
1174 |
}
|
@@ -1189,12 +1157,12 @@
|
|
1189 |
$post_thumbnail_id = get_post_thumbnail_id( $cellevent['id'] );
|
1190 |
if ($ecwd_has_thumb || $cellevent['image']) {
|
1191 |
if ($ecwd_has_thumb) {
|
1192 |
-
$html .= get_the_post_thumbnail($cellevent['id'],'thumb'
|
1193 |
} else {
|
1194 |
-
$html .= '<img
|
1195 |
}
|
1196 |
-
|
1197 |
-
$html .= '<img
|
1198 |
$cellevent['details'] = $image['content'];
|
1199 |
}
|
1200 |
$html .= '</div></div></div>';
|
@@ -1203,19 +1171,19 @@
|
|
1203 |
if ($this->event_popup == "yes" && get_post_meta($cellevent['id'], '', true)) {
|
1204 |
$date_data = 'start-date-data="' . date("Y-m-d", strtotime($cellevent['date'])) . '"';
|
1205 |
$date_data .= ' end-date-data="'.date("Y-m-d", $cellevent['to']).'"';
|
1206 |
-
$html .= '<h3 class="event-title"
|
1207 |
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
1208 |
$html .= ' style="color:' . $cellevent['color'] . ';"';
|
1209 |
}
|
1210 |
$html .= '>' . $cellevent['title'] . '</span></h3>';
|
1211 |
} else if ($cellevent['permalink'] != '') {
|
1212 |
-
$html .= '<h3 class="event-title"
|
1213 |
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
1214 |
$html .= ' style="color:' . $cellevent['color'] . ';"';
|
1215 |
}
|
1216 |
$html .= '>' . $cellevent['title'] . '</a></h3>';
|
1217 |
} else {
|
1218 |
-
$html .= '<h3 class="event-title"
|
1219 |
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
1220 |
$html .= 'style="color:' . $cellevent['color'] . ';"';
|
1221 |
}
|
@@ -1223,14 +1191,11 @@
|
|
1223 |
}
|
1224 |
$html .= '<div class="ecwd-list-date-cont">';
|
1225 |
if ($all_day_event) {
|
1226 |
-
$eventtime = '<div class="ecwd-time">'.
|
1227 |
-
'<span class="metainfo event-time" itemprop="startDate" content="' . date('Y-m-d', $cellevent['from']) . 'T' . date('H:i', strtotime($cellevent['starttime'])) . '"> ' . __('All day', 'event-calendar-wd'). '</span>'.
|
1228 |
-
'<span class="ecwd_hidden" itemprop="endDate" content="' . date('Y-m-d', $cellevent['to']) . 'T' . date('H:i', strtotime($cellevent['endtime'])) . '"></span>';
|
1229 |
-
$eventtime .= '</div>';
|
1230 |
$html .= $eventtime;
|
1231 |
} else {
|
1232 |
if ($cellevent['starttime'] != '') { // event details - hidden until clicked (full)
|
1233 |
-
$eventtime = '<div class="ecwd-time"><span class="metainfo event-time"
|
1234 |
if ($cellevent['endtime'] != '' && $cellevent['endtime'] != $cellevent['starttime']) {
|
1235 |
$eventtime .= "-" . date($this->timeformat, strtotime($cellevent['endtime']));
|
1236 |
}
|
@@ -1240,12 +1205,11 @@
|
|
1240 |
}
|
1241 |
}
|
1242 |
if ($cellevent['from'] != '') {
|
1243 |
-
$eventdate = '<div class="ecwd-date"><span class="metainfo"
|
1244 |
if ($cellevent['to'] != '' && $cellevent['to'] != $cellevent['from']) {
|
1245 |
$eventdate .= "-" . date($this->dateformat, $cellevent['to']);
|
1246 |
}
|
1247 |
$eventdate .= '</span>';
|
1248 |
-
$eventdate .= '<span class="ecwd_hidden" itemprop="endDate" content="' . date('Y-m-d', $cellevent['to']) . 'T' . date('H:i', strtotime($cellevent['endtime'])) . '"></span>';
|
1249 |
$eventdate .= ECWD::get_time_zone( $all_day_event );
|
1250 |
$eventdate .= '</div>';
|
1251 |
$html .= $eventdate;
|
@@ -1254,30 +1218,27 @@
|
|
1254 |
if (isset($cellevent['organizers']) && count($cellevent['organizers']) > 0) {
|
1255 |
$html .= '<div class="event-organizers">';
|
1256 |
foreach ($cellevent['organizers'] as $organizer) {
|
1257 |
-
$html .= '<div class="event-organizer"
|
1258 |
}
|
1259 |
$html .= '</div>';
|
1260 |
}
|
1261 |
if ($cellevent['location'] !== '') {
|
1262 |
-
$html .= '<div class="event-venue"
|
1263 |
if (isset($cellevent['venue']['name'])) {
|
1264 |
-
$html .= '<div class="ecwd-venue"
|
1265 |
}
|
1266 |
if (isset($cellevent['location']) && $cellevent['location'] != '') {
|
1267 |
-
$html .= '<
|
1268 |
-
$html .= '<div class="ecwd-location" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"><span>' . $cellevent['location'] . '</span></div>';
|
1269 |
}
|
1270 |
$html .= '</div>';
|
1271 |
}
|
1272 |
|
1273 |
if (isset($cellevent['link']) && $cellevent['link'] != '') {
|
1274 |
-
$html .= '<div
|
1275 |
-
}else{
|
1276 |
-
$html .= '<span class="hidden" itemprop="url">' . get_post_permalink($cellevent['id']) . '</span>';
|
1277 |
}
|
1278 |
$desc = $cellevent['details'] ? $cellevent['details'] : $this->eventemptytext;
|
1279 |
$desc = apply_filters('format_content', $desc);
|
1280 |
-
$html .= '<div class="event-content"
|
1281 |
}
|
1282 |
$html .= '</div>';
|
1283 |
return $html;
|
@@ -1432,6 +1393,54 @@
|
|
1432 |
return intval($date);
|
1433 |
}
|
1434 |
|
1435 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1436 |
|
1437 |
-
|
|
|
|
|
|
79 |
//--------------------------------------------------------------------------------------------
|
80 |
public $jd, $year, $month, $day, $displaytype, $numdaysinmonth, $monthstartday, $monthname, $previousmonth, $nextmonth;
|
81 |
public $events = array();
|
82 |
+
public $json_ld = '';
|
83 |
|
84 |
// types: mini,full,list,mini-list,(default=full)
|
85 |
public function __construct ($type = 'full', $date = '', $staticdisplaytype = false, $widget = 0, $limit = false, $page = 1, $displays = null, $filters = null, $event_search = 'yes', $ecwd_views = array(), $preview) {
|
253 |
}
|
254 |
$fromDate = date('Y-n-j', strtotime($beginDate));
|
255 |
$toDate = date('Y-n-j', strtotime($endDate));
|
|
|
256 |
$date_parts1 = explode('-', $fromDate);
|
257 |
$date_parts2 = explode('-', $toDate);
|
258 |
$start_date = gregoriantojd($date_parts1[1], $date_parts1[2], $date_parts1[0]);
|
269 |
$end_date = date('Y-m-t', strtotime($this->date));
|
270 |
$html .= $this->calendar_head(); // set table head
|
271 |
$this->seted_days = array();
|
272 |
+
if ( !in_array($this->displaytype, array('list', 'mini-list', 'week', 'day')) ) { // mini and full cal
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
$html .= '<tr>';
|
274 |
// render week number on left
|
275 |
if ($this->weeknumbers == 'left' && $this->monthstartday != $this->weekstartday) {
|
339 |
$html .= '<td class="week-number" style="border-bottom:1px solid #' . $this->bordercolor . ';"><span>' . date('W', strtotime($date)) . '</span></td>';
|
340 |
}
|
341 |
$html .= '</tr>';
|
342 |
+
}
|
343 |
+
elseif ($this->displaytype == 'week') {
|
344 |
$html .= '<ul class="week-event-list">';
|
345 |
$currentWeek = $this->rangeWeek($this->year . '-' . $this->month . '-' . $this->day);
|
346 |
$date = $currentWeek['start'];
|
347 |
while (strtotime($date) <= strtotime($currentWeek['end'])) {
|
348 |
+
$html .= '<li>' . $this->calendar_cell(date('d', strtotime($date)), 'day-with-date', date('Y-n-j', strtotime($date))) . '</li>';
|
349 |
$date = date("Y-m-d", strtotime("+1 day", strtotime($date)));
|
350 |
}
|
351 |
$html .= '</ul>';
|
352 |
+
}
|
353 |
+
elseif ($this->displaytype == 'day') {
|
354 |
$html .= '<ul class="day-event-list">';
|
355 |
+
$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>';
|
356 |
$html .= '</ul>';
|
357 |
+
}
|
358 |
+
elseif ($this->displaytype == '4day') {
|
359 |
$html .= '<ul class="day4-event-list">';
|
360 |
$days = $this->range4Days($this->year . '-' . $this->month . '-' . $this->day);
|
361 |
$date = $days['start'];
|
362 |
while (strtotime($date) <= strtotime($days['end'])) {
|
363 |
+
$html .= '<li>' . $this->calendar_cell(date('d', strtotime($date)), 'day-with-date', date('Y-n-j', strtotime($date))) . '</li>';
|
|
|
364 |
$date = date("Y-m-d", strtotime("+1 day", strtotime($date)));
|
365 |
}
|
366 |
$html .= '</ul>';
|
367 |
+
}
|
368 |
+
else { // event list and map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
369 |
if ($this->displaytype == 'map') {
|
370 |
|
371 |
+
}
|
372 |
+
else {
|
373 |
$pages = 0;
|
374 |
$page = $this->page;
|
375 |
$html .= '<ul class="ecwd_list">';
|
376 |
$page_index = 0;
|
377 |
$ev_counts = 0;
|
378 |
$events_for_list = $this->events;
|
|
|
|
|
|
|
|
|
|
|
379 |
foreach ($events_for_list as $date_key => $events) {
|
380 |
$ev_counts += count($events);
|
381 |
foreach ($events as $event) {
|
386 |
}
|
387 |
if ($page_index >= (($page - 1) * $this->listlimit)) {
|
388 |
if ($this->displaytype == 'list') { // full event list
|
389 |
+
$this->json_ld .= $this->set_json_ld($event, $this->displaytype);
|
390 |
+
$image_class = '';
|
391 |
+
$image = $this->getAndReplaceFirstImage($event['details']);
|
392 |
if (!has_post_thumbnail($event['id']) && $event['image'] == "") {
|
393 |
$image_class = "ecwd-no-image";
|
394 |
}
|
395 |
+
$html .= '<li class="' . $image_class . '">';
|
396 |
if (!$this->widget) {
|
397 |
+
$html .= '<div class="ecwd-list-date resp">' . __(date('d', $date_key), 'event-calendar-wd') . '</div>';
|
398 |
+
|
399 |
$event_date = (($this->list_date_format !== 'd.F.l') ? date($this->list_date_format, $date_key) : (date('d', $date_key) . '.' . __(date('F', $date_key), 'event-calendar-wd') . '.' . __(date('l', $date_key), 'event-calendar-wd')));
|
400 |
if ($this->list_date_format !== 'd.F.l') {
|
401 |
$month_name = date('F', strtotime($event['from']));
|
406 |
$ecwd_has_thumb = has_post_thumbnail($event['id']);
|
407 |
if ($ecwd_has_thumb || $event['image']) {
|
408 |
if ($ecwd_has_thumb) {
|
409 |
+
$html .= get_the_post_thumbnail($event['id'],"thumbnail");
|
410 |
} else {
|
411 |
+
$html .= '<img src="' . $event['image'] . '" />';
|
412 |
}
|
413 |
+
} elseif (isset($image['image'])) {
|
414 |
+
$html .= '<img src="' . $image['image'] . '" />';
|
415 |
$event['details'] = $image['content'];
|
416 |
}
|
417 |
$html .= '</div></div></div>';
|
418 |
} else {
|
419 |
+
$html .= '<div class="ecwd-list-date">' . __(date('d', $date_key), 'event-calendar-wd') . '</div>';
|
|
|
420 |
}
|
421 |
$html .= '<div class="event-main-content">';
|
422 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
423 |
+
$date_data = 'start-date-data="' . date('Y-m-d', strtotime($event['date'])) . '"';
|
424 |
+
$date_data .= ' end-date-data="' . date('Y-m-d', strtotime($event['to'])) . '"';
|
425 |
+
$html .= '<h3 class="event-title"><span ' . $date_data . ' class="ecwd_open_event_popup event' . $event['id'] . '" style="color:' . $event['color'] . ';">' . $event['title'] . '</span></h3>';
|
426 |
} else if ($event['permalink'] != '') {
|
427 |
+
$html .= '<h3 class="event-title"><a href="' . $event['permalink'] . '" ' . $this->eventlinktarget . ' style="color:' . $event['color'] . ';">' . $event['title'] . '</a></h3>';
|
428 |
} else {
|
429 |
+
$html .= '<h3 class="event-title" style="color:' . $event['color'] . ';">' . $event['title'] . '</h3>';
|
430 |
}
|
431 |
|
432 |
if(isset($event['link']) && $event['link'] !== ""){
|
437 |
$link = get_post_permalink($event['id']);
|
438 |
}
|
439 |
|
|
|
|
|
|
|
|
|
440 |
$html .= '<div class="ecwd-list-date-cont">';
|
441 |
if ($all_day_event) {
|
442 |
$eventtime = '<div class="ecwd-time"><span class="metainfo"> ' . __('All day', 'event-calendar-wd');
|
468 |
if (isset($event['organizers']) && count($event['organizers']) > 0) {
|
469 |
$html .= '<div class="event-organizers"><div class="ecwd-org-cont">';
|
470 |
foreach ($event['organizers'] as $organizer) {
|
471 |
+
$html .= '<div class="event-organizer"><a href="' . $organizer['permalink'] . '">' . $organizer['name'] . '</a></div>';
|
472 |
}
|
473 |
$html .= '</div></div>';
|
474 |
}
|
475 |
if ($event['location'] !== '') {
|
476 |
+
$html .= '<div class="event-venue"><div class="ecwd-org-cont">
|
477 |
+
<span>';
|
478 |
if (isset($event['venue']['name'])) {
|
479 |
$html .= '<a href="' . $event['venue']['permalink'] . '">' . $event['venue']['name'] . '</a>';
|
480 |
}
|
481 |
$html .= '</span>
|
482 |
+
<div class="address">
|
483 |
' . ($event['location'] ? $event['location'] : "") . '
|
484 |
</div>
|
485 |
</div>
|
486 |
+
</div>';
|
487 |
}
|
488 |
$desc = $event['details'] ? $event['details'] : $this->eventemptytext;
|
489 |
$desc = apply_filters('format_content', $desc);
|
490 |
+
$html .= '<div class="event-content">' . $desc . '</div></div>';
|
491 |
+
}
|
492 |
+
else { // mini event list
|
493 |
$html .= '<li style="background:' . $event['color'] . ';"';
|
494 |
if ($this->minilinkbase !== false) { // enable link (good for linking to full calendar)
|
495 |
$html .= ' class="event-link"';
|
548 |
$html .= $this->calendar_foot();
|
549 |
// remove tabs, line breaks, vertical tabs, null-byte
|
550 |
$html = $this->stripWhitespace($html);
|
551 |
+
if ( !empty($this->json_ld) ) {
|
552 |
+
$this->json_ld = '[' . rtrim($this->json_ld, ',') . ']';
|
553 |
+
$html .= '<script type="application/ld+json">' . $this->json_ld . '</script>';
|
554 |
+
}
|
555 |
+
|
556 |
+
return $html;
|
557 |
}
|
558 |
|
559 |
// month/year select box
|
720 |
}
|
721 |
}
|
722 |
|
|
|
723 |
public function getMonthDate ($date) {
|
724 |
if(date('m',strtotime($date)) === date('m')){
|
725 |
return date('Y-n-j');
|
836 |
$svalue = $this->search_params['query'];
|
837 |
}
|
838 |
$html .= '<div class="ecwd-search">
|
839 |
+
<input class="ecwd-search" name="search" type="text" value="' . $svalue . '">' . '<button class="btn btn-default ecwd-search-submit"><span class="glyphicon glyphicon-search"></span><i class="fa fa-search"></i></button>
|
840 |
+
</div>';
|
841 |
}
|
842 |
$html .= '</div>';
|
843 |
}
|
869 |
}
|
870 |
if (is_array($all_events) && $date) { // events array populated from addEvent()
|
871 |
foreach ($all_events as $event) {
|
|
|
872 |
$color = $event['color'];
|
873 |
$title = $event['title'];
|
874 |
$link = ($event['link'] == "" && isset($event['metas']['ecwd_event_url'][0])) ? $event['metas']['ecwd_event_url'][0] : $event['link'];
|
908 |
'permalink' => $permalink,
|
909 |
'image' => $image,
|
910 |
);
|
911 |
+
$this->json_ld .= $this->set_json_ld( $cellevents[0] );
|
912 |
}
|
913 |
}
|
914 |
}
|
|
|
915 |
// sort by starttime for the cell
|
916 |
if (count($cellevents) > 0) {
|
917 |
$cellevents = $this->arraySort($cellevents, 'starttime');
|
958 |
$month_name = date('F', strtotime($date));
|
959 |
$event_date = str_replace($month_name, __($month_name, 'event-calendar-wd'), $event_date);
|
960 |
}
|
961 |
+
$content = '<div class="ecwd-week-date resp">' . __(date('d', strtotime($date)), 'event-calendar-wd') . '</div><div class="ecwd-week-date web"">' . $event_date . '</div>';
|
962 |
} else {
|
963 |
$content = '<div class="day-number">' . $day . '</div>'; // day number or prev/next month cell content
|
964 |
}
|
971 |
if ($i > ($month_view_events_count - 1) && $this->displaytype !== 'mini') {
|
972 |
$li_class = 'inmore';
|
973 |
}
|
974 |
+
$eventcontent .= '<li style="';
|
|
|
975 |
if (is_array($cellevent['terms'])) {
|
976 |
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
977 |
$eventcontent .= 'background-color: ' . $cellevent['color'] . '; ';
|
987 |
if (is_array($cellevent['terms'])) {
|
988 |
foreach ($cellevent['terms'] as $terms) {
|
989 |
if (isset($terms['ecwd_taxonomy_image']) && $terms['ecwd_taxonomy_image'] != '') {
|
990 |
+
$eventcontent .= '<img class="ecwd-event-cat-icon" src="' . $terms['ecwd_taxonomy_image'] . '" />';
|
991 |
break;
|
992 |
}
|
993 |
+
}
|
|
|
|
|
994 |
}
|
995 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
996 |
$date_data = 'start-date-data="' . date("Y-m-d", strtotime($cellevent['date'])) . '"';
|
997 |
$date_data .= ' end-date-data="'.date("Y-m-d", $cellevent['to']).'"';
|
998 |
+
$eventcontent .= '<span ' . $date_data . ' class="ecwd_open_event_popup event' . $cellevent['id'] . '">' . $cellevent['title'] . '</span>';
|
999 |
} elseif ($cellevent['permalink']) {
|
1000 |
+
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . '><span>' . $cellevent['title'] . '</span></a>';
|
1001 |
} else {
|
1002 |
+
$eventcontent .= '<span>' . $cellevent['title'] . '</span>';
|
1003 |
}
|
1004 |
}
|
1005 |
$this->seted_days[$cellevent['id']] = $date;
|
1019 |
$eventcontent .= '<div class="event-details-title">';
|
1020 |
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
1021 |
$eventcontent .= ' <span class="event-metalabel" style="background:' . $cellevent['color'] . '"></span>
|
1022 |
+
<h5 style="color:' . $cellevent['color'] . '">';
|
1023 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
1024 |
$date_data = 'start-date-data="' . date("Y-m-d", strtotime($cellevent['date'])) . '"';
|
1025 |
$date_data .= ' end-date-data="' . date("Y-m-d", $cellevent['to']) . '"';
|
1026 |
+
$eventcontent .= '<span ' . $date_data . ' class="ecwd_open_event_popup event' . $cellevent['id'] . ' ">' . $cellevent['title'] . '</span>';
|
1027 |
} else if (isset($cellevent['permalink']) && $cellevent['permalink'] !== '') {
|
1028 |
+
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . ' style="color: ' . $cellevent['color'] . '">' . $cellevent['title'] . '</a>';
|
1029 |
} else {
|
1030 |
$eventcontent .= $cellevent['title'];
|
1031 |
}
|
1033 |
';
|
1034 |
} else {
|
1035 |
$eventcontent .= ' <span class="event-metalabel"></span>
|
1036 |
+
<h5>';
|
1037 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
1038 |
$date_data = 'start-date-data="' . date("Y-m-d", strtotime($cellevent['date'])) . '"';
|
1039 |
$date_data .= ' end-date-data="' . date("Y-m-d", $cellevent['to']) . '"';
|
1040 |
$eventcontent .= '<span ' . $date_data . ' class="ecwd_open_event_popup event' . $cellevent['id'] . '">' . $cellevent['title'] . '</span>';
|
1041 |
} else if (isset($cellevent['permalink']) && $cellevent['permalink'] !== '') {
|
1042 |
+
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . '>' . $cellevent['title'] . '</a>';
|
1043 |
} else {
|
1044 |
$eventcontent .= $cellevent['title'];
|
1045 |
}
|
1048 |
$eventcontent .= ' </div>';
|
1049 |
}
|
1050 |
if ($all_day_event) {
|
1051 |
+
$eventtime = '<div class="ecwd-time"><span class="metainfo">' . __('All day', 'event-calendar-wd') . '</span></div>';
|
|
|
|
|
1052 |
$eventcontent .= $eventtime;
|
1053 |
} else {
|
1054 |
if ($cellevent['starttime'] != '') { // event details - hidden until clicked (full)
|
1055 |
+
$eventtime = '<div class="ecwd-time"><span class="metainfo">' . date($this->timeformat, strtotime($cellevent['starttime']));
|
1056 |
if ($cellevent['endtime'] != '' && strtotime($cellevent['endtime']) !== strtotime($cellevent['starttime'])) {
|
1057 |
$eventtime .= "-" . date($this->timeformat, strtotime($cellevent['endtime']));
|
1058 |
}
|
1062 |
}
|
1063 |
}
|
1064 |
if ($cellevent['from'] != '') { // event details - hidden until clicked (full)
|
1065 |
+
$eventdate = '<div class="ecwd-date"><span class="metainfo">' . date($this->dateformat, strtotime($cellevent['date']));
|
1066 |
if ($cellevent['to'] != '' && $cellevent['to'] != $cellevent['from']) {
|
1067 |
$eventdate .= "-" . date($this->dateformat, $cellevent['to']);
|
1068 |
}
|
1069 |
$eventdate .= '</span>';
|
|
|
1070 |
$eventdate .= ECWD::get_time_zone( $all_day_event );
|
1071 |
$eventdate .= '</div>';
|
1072 |
$eventcontent .= $eventdate;
|
1074 |
if (isset($cellevent['organizers']) && count($cellevent['organizers']) > 0) {
|
1075 |
$eventcontent .= '<div class="event-organizers">';
|
1076 |
foreach ($cellevent['organizers'] as $organizer) {
|
1077 |
+
$eventcontent .= '<div class="event-organizer"><a href="' . $organizer['permalink'] . '">' . $organizer['name'] . '</a></div>';
|
1078 |
}
|
1079 |
$eventcontent .= '</div>';
|
1080 |
}
|
1081 |
|
1082 |
if ($cellevent['location'] !== '') {
|
1083 |
+
$eventcontent .= '<div class="event-venue">';
|
1084 |
if (isset($cellevent['venue']['name'])) {
|
1085 |
+
$eventcontent .= '<div class="ecwd-venue"><span><a href="' . $cellevent['venue']['permalink'] . '">' . $cellevent['venue']['name'] . '</a></span></div>';
|
1086 |
}
|
1087 |
if (isset($cellevent['location']) && $cellevent['location'] != '') {
|
1088 |
+
$eventcontent .= '<div class="ecwd-location"><span>' . $cellevent['location'] . '</span></div>';
|
|
|
1089 |
}
|
1090 |
$eventcontent .= '</div>';
|
1091 |
}
|
1092 |
if (isset($cellevent['link']) && $cellevent['link'] != '') {
|
1093 |
+
$eventcontent .= '<div class="ecwd-link"><a href="' . $cellevent['link'] . '">' . $cellevent['link'] . '</a></div>';
|
1094 |
}
|
1095 |
+
$cellevent['details'] = ($cellevent['details'] == '') ? $this->eventemptytext : $cellevent['details'];
|
1096 |
+
$image = $this->getAndReplaceFirstImage($cellevent['details']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1097 |
$ecwd_has_thumb = has_post_thumbnail($cellevent['id']);
|
1098 |
if ($cellevent['details'] != '' || $ecwd_has_thumb || $cellevent['image']) {
|
1099 |
+
$eventcontent .= '<div class="ecwd-detalis">';
|
1100 |
if ($ecwd_has_thumb || $cellevent['image']) {
|
1101 |
if ($ecwd_has_thumb) {
|
1102 |
+
$eventcontent .= get_the_post_thumbnail($cellevent['id'], 'thumbnail');
|
1103 |
} else {
|
1104 |
+
$eventcontent .= '<img src="' . $cellevent['image'] . '" />';
|
1105 |
}
|
1106 |
+
} elseif (isset($image['image'])) {
|
1107 |
+
$eventcontent .= '<img src="' . $image['image'] . '" />';
|
1108 |
$cellevent['details'] = $image['content'];
|
1109 |
}
|
1110 |
$desc = $cellevent['details'] ? $cellevent['details'] : $this->eventemptytext;
|
1112 |
$eventcontent .= $desc . '</div>';
|
1113 |
}
|
1114 |
$eventcontent .= '</div><div class="ecwd-event-arrow-right"></div>';
|
1115 |
+
$eventcontent .= '</li>';
|
|
|
|
|
|
|
1116 |
}
|
1117 |
$content .= apply_filters('format_content', $eventcontent);
|
1118 |
if ($i > ($month_view_events_count - 1) && $this->displaytype !== 'mini') {
|
1136 |
$month_name = date('F', strtotime($date));
|
1137 |
$event_date = str_replace($month_name, __($month_name, 'event-calendar-wd'), $event_date);
|
1138 |
}
|
1139 |
+
$html = '<div class="ecwd-week-date resp" style="background:#' . $this->eventlistbg . '">' . date('d', strtotime($date)) . '</div><div class="ecwd-week-date web"">' . $event_date . '</div>';
|
1140 |
} else {
|
1141 |
$html = '<div class="ecwd-week-date">' . date('d', strtotime($date)) . '</div>';
|
1142 |
}
|
1157 |
$post_thumbnail_id = get_post_thumbnail_id( $cellevent['id'] );
|
1158 |
if ($ecwd_has_thumb || $cellevent['image']) {
|
1159 |
if ($ecwd_has_thumb) {
|
1160 |
+
$html .= get_the_post_thumbnail($cellevent['id'],'thumb');
|
1161 |
} else {
|
1162 |
+
$html .= '<img src="' . $cellevent['image'] . '" />';
|
1163 |
}
|
1164 |
+
} elseif (isset($image['image'])) {
|
1165 |
+
$html .= '<img src="' . $image['image'] . '" />';
|
1166 |
$cellevent['details'] = $image['content'];
|
1167 |
}
|
1168 |
$html .= '</div></div></div>';
|
1171 |
if ($this->event_popup == "yes" && get_post_meta($cellevent['id'], '', true)) {
|
1172 |
$date_data = 'start-date-data="' . date("Y-m-d", strtotime($cellevent['date'])) . '"';
|
1173 |
$date_data .= ' end-date-data="'.date("Y-m-d", $cellevent['to']).'"';
|
1174 |
+
$html .= '<h3 class="event-title"><span '.$date_data.' class="ecwd_open_event_popup event' . $cellevent['id'] . '"';
|
1175 |
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
1176 |
$html .= ' style="color:' . $cellevent['color'] . ';"';
|
1177 |
}
|
1178 |
$html .= '>' . $cellevent['title'] . '</span></h3>';
|
1179 |
} else if ($cellevent['permalink'] != '') {
|
1180 |
+
$html .= '<h3 class="event-title"> <a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget;
|
1181 |
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
1182 |
$html .= ' style="color:' . $cellevent['color'] . ';"';
|
1183 |
}
|
1184 |
$html .= '>' . $cellevent['title'] . '</a></h3>';
|
1185 |
} else {
|
1186 |
+
$html .= '<h3 class="event-title"';
|
1187 |
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
1188 |
$html .= 'style="color:' . $cellevent['color'] . ';"';
|
1189 |
}
|
1191 |
}
|
1192 |
$html .= '<div class="ecwd-list-date-cont">';
|
1193 |
if ($all_day_event) {
|
1194 |
+
$eventtime = '<div class="ecwd-time"><span class="metainfo event-time"> ' . __('All day', 'event-calendar-wd'). '</span></div>';
|
|
|
|
|
|
|
1195 |
$html .= $eventtime;
|
1196 |
} else {
|
1197 |
if ($cellevent['starttime'] != '') { // event details - hidden until clicked (full)
|
1198 |
+
$eventtime = '<div class="ecwd-time"><span class="metainfo event-time">' . date($this->timeformat, strtotime($cellevent['starttime']));
|
1199 |
if ($cellevent['endtime'] != '' && $cellevent['endtime'] != $cellevent['starttime']) {
|
1200 |
$eventtime .= "-" . date($this->timeformat, strtotime($cellevent['endtime']));
|
1201 |
}
|
1205 |
}
|
1206 |
}
|
1207 |
if ($cellevent['from'] != '') {
|
1208 |
+
$eventdate = '<div class="ecwd-date"><span class="metainfo">' . date($this->dateformat, strtotime($cellevent['date']));
|
1209 |
if ($cellevent['to'] != '' && $cellevent['to'] != $cellevent['from']) {
|
1210 |
$eventdate .= "-" . date($this->dateformat, $cellevent['to']);
|
1211 |
}
|
1212 |
$eventdate .= '</span>';
|
|
|
1213 |
$eventdate .= ECWD::get_time_zone( $all_day_event );
|
1214 |
$eventdate .= '</div>';
|
1215 |
$html .= $eventdate;
|
1218 |
if (isset($cellevent['organizers']) && count($cellevent['organizers']) > 0) {
|
1219 |
$html .= '<div class="event-organizers">';
|
1220 |
foreach ($cellevent['organizers'] as $organizer) {
|
1221 |
+
$html .= '<div class="event-organizer"><a href="' . $organizer['permalink'] . '">' . $organizer['name'] . '</a></div>';
|
1222 |
}
|
1223 |
$html .= '</div>';
|
1224 |
}
|
1225 |
if ($cellevent['location'] !== '') {
|
1226 |
+
$html .= '<div class="event-venue">';
|
1227 |
if (isset($cellevent['venue']['name'])) {
|
1228 |
+
$html .= '<div class="ecwd-venue"><span><a href="' . $cellevent['venue']['permalink'] . '">' . $cellevent['venue']['name'] . '</a></span></div>';
|
1229 |
}
|
1230 |
if (isset($cellevent['location']) && $cellevent['location'] != '') {
|
1231 |
+
$html .= '<div class="ecwd-location"><span>' . $cellevent['location'] . '</span></div>';
|
|
|
1232 |
}
|
1233 |
$html .= '</div>';
|
1234 |
}
|
1235 |
|
1236 |
if (isset($cellevent['link']) && $cellevent['link'] != '') {
|
1237 |
+
$html .= '<div class="ecwd-link"><a href="' . $cellevent['link'] . '">' . $cellevent['link'] . '</a></div>';
|
|
|
|
|
1238 |
}
|
1239 |
$desc = $cellevent['details'] ? $cellevent['details'] : $this->eventemptytext;
|
1240 |
$desc = apply_filters('format_content', $desc);
|
1241 |
+
$html .= '<div class="event-content">' . $desc . '</div></div>';
|
1242 |
}
|
1243 |
$html .= '</div>';
|
1244 |
return $html;
|
1393 |
return intval($date);
|
1394 |
}
|
1395 |
|
1396 |
+
/**
|
1397 |
+
* @param array $args
|
1398 |
+
*
|
1399 |
+
* @return array|string
|
1400 |
+
*/
|
1401 |
+
public function set_json_ld( $args = array(), $displaytype = '' ) {
|
1402 |
+
if ( !empty($args) ) {
|
1403 |
+
$startDate = ($args['all_day_event'] == 0) ? date('Y-m-d', $args['from']) . ' ' . $args['starttime'] : date('Y-m-d', $args['from']);
|
1404 |
+
$endDate = ($args['all_day_event'] == 0) ? date('Y-m-d', $args['to']) . ' ' . $args['endtime'] : date('Y-m-d', $args['to']);
|
1405 |
+
if ( !empty($displaytype) && $displaytype == 'list' ) {
|
1406 |
+
$startDate = ($args['all_day_event'] == 0) ? $args['from'] . ' ' . $args['starttime'] : $args['from'];
|
1407 |
+
$endDate = ($args['all_day_event'] == 0) ? $args['to'] . ' ' . $args['endtime'] : $args['to'];
|
1408 |
+
}
|
1409 |
+
$data = array(
|
1410 |
+
'@context' => 'https://schema.org',
|
1411 |
+
'@type' => 'Event',
|
1412 |
+
'name' => $args['title'],
|
1413 |
+
'description' => strip_tags($args['details']),
|
1414 |
+
'image' => get_the_post_thumbnail_url($args['id']),
|
1415 |
+
'startDate' => $startDate,
|
1416 |
+
'endDate' => $endDate,
|
1417 |
+
'eventAttendanceMode' => 'https://schema.org/MixedEventAttendanceMode',
|
1418 |
+
'eventStatus' => 'https://schema.org/EventScheduled'
|
1419 |
+
);
|
1420 |
+
if ( !empty($args['venue']['name']) && !empty($args['location']) ) {
|
1421 |
+
$data['location'] = array(
|
1422 |
+
'@type' => 'Place',
|
1423 |
+
'name' => $args['venue']['name'],
|
1424 |
+
'address' => array(
|
1425 |
+
'@type' => 'PostalAddress',
|
1426 |
+
'streetAddress' => $args['location']
|
1427 |
+
)
|
1428 |
+
);
|
1429 |
+
}
|
1430 |
+
if ( !empty($args['organizers']) ) {
|
1431 |
+
foreach ( $args['organizers'] as $organizer ) {
|
1432 |
+
$data['performer'][] = array(
|
1433 |
+
'@type' => 'Person',
|
1434 |
+
'name' => $organizer['name'],
|
1435 |
+
'description' => '',
|
1436 |
+
'telephone' => '',
|
1437 |
+
'sameAs' => '',
|
1438 |
+
);
|
1439 |
+
}
|
1440 |
+
}
|
1441 |
+
$json_ld = json_encode($data) . ',';
|
1442 |
|
1443 |
+
return $json_ld;
|
1444 |
+
}
|
1445 |
+
}
|
1446 |
+
}
|
includes/ecwd-cpt-class.php
CHANGED
@@ -273,7 +273,7 @@ class ECWD_Cpt {
|
|
273 |
|
274 |
/******************************** EVENTS ********************************/
|
275 |
|
276 |
-
$show_events_tab = (get_option('ecwd_subscribe_done') === '1');
|
277 |
|
278 |
$labels = array(
|
279 |
'name' => __('Events', 'event-calendar-wd'),
|
273 |
|
274 |
/******************************** EVENTS ********************************/
|
275 |
|
276 |
+
$show_events_tab = true; //(get_option('ecwd_subscribe_done') === '1');
|
277 |
|
278 |
$labels = array(
|
279 |
'name' => __('Events', 'event-calendar-wd'),
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: calendar, date, event, event calendar, events, events calendar, meeting, o
|
|
4 |
Requires at least: 3.9
|
5 |
Tested up to: 5.4
|
6 |
Requires PHP: 5.2
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -345,6 +345,9 @@ After downloading the ZIP file of the Event Calendar WD plugin,
|
|
345 |
Event Calendar WD plugin optionally embeds Google Maps on front end to display events on the map. Embedded Google Maps behave in the exact same way as if visitor has opened Google Maps site. Google may collect data about visitors, use cookies and tracking, included their logged-in experience interaction with Google platform. Google Maps are regulated under terms of Google privacy policy https://policies.google.com/privacy. The plugin asks for your consent to collect site administrator’s email address and site URL to offer customer support, deals and discounts on premium products and more.
|
346 |
|
347 |
== Changelog ==
|
|
|
|
|
|
|
348 |
= 1.1.35 =
|
349 |
* Added: Option for Event title style.
|
350 |
* Fixed: Category metas ordering.
|
4 |
Requires at least: 3.9
|
5 |
Tested up to: 5.4
|
6 |
Requires PHP: 5.2
|
7 |
+
Stable tag: 1.1.36
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
345 |
Event Calendar WD plugin optionally embeds Google Maps on front end to display events on the map. Embedded Google Maps behave in the exact same way as if visitor has opened Google Maps site. Google may collect data about visitors, use cookies and tracking, included their logged-in experience interaction with Google platform. Google Maps are regulated under terms of Google privacy policy https://policies.google.com/privacy. The plugin asks for your consent to collect site administrator’s email address and site URL to offer customer support, deals and discounts on premium products and more.
|
346 |
|
347 |
== Changelog ==
|
348 |
+
= 1.1.36 =
|
349 |
+
* Fixed: Warnings in Google structured data.
|
350 |
+
|
351 |
= 1.1.35 =
|
352 |
* Added: Option for Event title style.
|
353 |
* Fixed: Category metas ordering.
|
views/ecwd-event-content.php
CHANGED
@@ -10,6 +10,26 @@ global $post;
|
|
10 |
global $wp;
|
11 |
global $ecwd_options;
|
12 |
global $wp_query;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
$post_id = $post->ID;
|
15 |
$meta = get_post_meta($post_id);
|
@@ -116,7 +136,8 @@ if (is_numeric($venue_post_id)) {
|
|
116 |
$ecwd_event_zoom = esc_html(get_post_meta($venue_post_id, 'ecwd_map_zoom', true));
|
117 |
$ecwd_venue_website = ECWD::add_http($ecwd_venue_website);
|
118 |
} else {
|
119 |
-
$ecwd_venue_phone =
|
|
|
120 |
$ecwd_event_zoom = "";
|
121 |
}
|
122 |
|
@@ -163,33 +184,32 @@ if (!empty($calendars_id)) {
|
|
163 |
}
|
164 |
}
|
165 |
}
|
166 |
-
|
167 |
?>
|
168 |
-
|
169 |
-
<div class="ecwd-event ecwd-single-event" itemscope itemtype="http://schema.org/Event">
|
170 |
<?php if ( ! post_password_required( $post ) ) { ?>
|
171 |
<?php if ($back_link !== null) { ?>
|
172 |
<a id="ecwd_back_link" href="<?php echo $back_link; ?>"><?php echo $back_link_text; ?></a>
|
173 |
<?php } ?>
|
174 |
<div class="event-detalis">
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
|
|
184 |
</div>
|
185 |
<?php
|
186 |
if (isset($ecwd_options['show_repeat_rate']) && !$is_default_dates) {
|
187 |
$repeat_rate_text = $d->get_repeat_rate($post_id, '', $date_format);
|
188 |
-
if ($repeat_rate_text != '')
|
189 |
<div class="ecwd_repeat_rate_text">
|
190 |
-
|
191 |
</div>
|
192 |
-
<?php
|
193 |
}
|
194 |
|
195 |
if ($ecwd_event_url) { ?>
|
@@ -200,98 +220,107 @@ if (!empty($calendars_id)) {
|
|
200 |
</a>
|
201 |
</div>
|
202 |
<?php }
|
203 |
-
|
204 |
-
|
205 |
if (count($organizers) > 0) { ?>
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
|
|
|
|
|
|
248 |
<?php } ?>
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
</div>
|
293 |
<?php do_action('ecwd_view_ext'); ?>
|
294 |
-
|
295 |
</div>
|
296 |
<?php if ($ecwd_social_icons) { ?>
|
297 |
<div class="ecwd-social">
|
@@ -324,19 +353,16 @@ if (!empty($calendars_id)) {
|
|
324 |
$url_for_google_map .= '@' . $ecwd_event_latlong;;
|
325 |
}
|
326 |
|
327 |
-
|
328 |
$map_events[0]['zoom'] = $ecwd_event_zoom;
|
329 |
$map_events[0]['infow'] = '<div class="ecwd_map_event">';
|
330 |
$map_events[0]['infow'] .= '<span class="location">' . $ecwd_event_location . '</span>';
|
331 |
$map_events[0]['infow'] .= '</div>';
|
332 |
$map_events[0]['infow'] .= '<div class="event-detalis-date">
|
333 |
-
|
334 |
-
|
335 |
-
$map_events[0]['infow'] .=
|
336 |
-
$map_events[0]['infow'] .= ' </span>
|
337 |
-
</div>';
|
338 |
$map_events[0]['google_map_url'] = $url_for_google_map;
|
339 |
-
|
340 |
|
341 |
$markers = json_encode($map_events);
|
342 |
?>
|
@@ -512,9 +538,10 @@ if (!empty($calendars_id)) {
|
|
512 |
echo get_the_password_form();
|
513 |
} ?>
|
514 |
</div>
|
515 |
-
|
516 |
-
|
517 |
-
<script id="ecwd_script_handler" type="text/javascript">if (typeof ecwd_js_init_call == "object") {
|
518 |
ecwd_js_init_call = new ecwd_js_init();
|
519 |
ecwd_js_init_call.showMap();
|
520 |
-
}
|
|
|
|
10 |
global $wp;
|
11 |
global $ecwd_options;
|
12 |
global $wp_query;
|
13 |
+
$json_ld = array(
|
14 |
+
'@context' => 'https://schema.org',
|
15 |
+
'@type' => 'Event',
|
16 |
+
'name' => $post->post_title,
|
17 |
+
'description' => strip_tags($post->post_content),
|
18 |
+
'image' => get_the_post_thumbnail_url($post->ID),
|
19 |
+
'eventAttendanceMode' => 'https://schema.org/MixedEventAttendanceMode',
|
20 |
+
'eventStatus' => 'https://schema.org/EventScheduled'
|
21 |
+
);
|
22 |
+
if ( !empty($args['organizers']) ) {
|
23 |
+
foreach ( $args['organizers'] as $organizer ) {
|
24 |
+
$data['performer'][] = array(
|
25 |
+
'@type' => 'Person',
|
26 |
+
'name' => $organizer['name'],
|
27 |
+
'description' => '',
|
28 |
+
'telephone' => '',
|
29 |
+
'sameAs' => '',
|
30 |
+
);
|
31 |
+
}
|
32 |
+
}
|
33 |
|
34 |
$post_id = $post->ID;
|
35 |
$meta = get_post_meta($post_id);
|
136 |
$ecwd_event_zoom = esc_html(get_post_meta($venue_post_id, 'ecwd_map_zoom', true));
|
137 |
$ecwd_venue_website = ECWD::add_http($ecwd_venue_website);
|
138 |
} else {
|
139 |
+
$ecwd_venue_phone = "";
|
140 |
+
$ecwd_venue_website = "";
|
141 |
$ecwd_event_zoom = "";
|
142 |
}
|
143 |
|
184 |
}
|
185 |
}
|
186 |
}
|
|
|
187 |
?>
|
188 |
+
<div class="ecwd-event ecwd-single-event">
|
|
|
189 |
<?php if ( ! post_password_required( $post ) ) { ?>
|
190 |
<?php if ($back_link !== null) { ?>
|
191 |
<a id="ecwd_back_link" href="<?php echo $back_link; ?>"><?php echo $back_link_text; ?></a>
|
192 |
<?php } ?>
|
193 |
<div class="event-detalis">
|
194 |
+
<div class="ecwd-event-details">
|
195 |
+
<div class="event-detalis-date">
|
196 |
+
<label class="ecwd-event-date-info" title="<?php _e('Date', 'event-calendar-wd'); ?>"></label>
|
197 |
+
<span class="ecwd-event-date">
|
198 |
+
<?php
|
199 |
+
$json_ld['startDate'] = $ecwd_event_date_from;
|
200 |
+
$json_ld['endDate'] = $ecwd_event_date_to;
|
201 |
+
echo ECWD::get_ecwd_event_date_view($ecwd_event_date_from, $ecwd_event_date_to, $ecwd_all_day_event);
|
202 |
+
?>
|
203 |
+
</span>
|
204 |
</div>
|
205 |
<?php
|
206 |
if (isset($ecwd_options['show_repeat_rate']) && !$is_default_dates) {
|
207 |
$repeat_rate_text = $d->get_repeat_rate($post_id, '', $date_format);
|
208 |
+
if ($repeat_rate_text != '') { ?>
|
209 |
<div class="ecwd_repeat_rate_text">
|
210 |
+
<span><?php echo $d->get_repeat_rate($post_id, '', $date_format); ?></span>
|
211 |
</div>
|
212 |
+
<?php }
|
213 |
}
|
214 |
|
215 |
if ($ecwd_event_url) { ?>
|
220 |
</a>
|
221 |
</div>
|
222 |
<?php }
|
|
|
|
|
223 |
if (count($organizers) > 0) { ?>
|
224 |
+
<div class="event-detalis-org">
|
225 |
+
<label class="ecwd-event-org-info" title="<?php _e('Organizers', 'event-calendar-wd'); ?>"></label>
|
226 |
+
<?php
|
227 |
+
if (count($organizers) > 1) {
|
228 |
+
foreach ($organizers as $organizer) {
|
229 |
+
$json_ld['performer'][] = array(
|
230 |
+
"@type" => "Person",
|
231 |
+
'name' => $organizer['post_title'],
|
232 |
+
'sameAs' => get_permalink($organizer['ID'])
|
233 |
+
);
|
234 |
+
?>
|
235 |
+
<span><a href="<?php echo get_permalink($organizer['ID']) ?>"><?php echo $organizer['post_title'] ?></a></span>
|
236 |
+
<?php
|
237 |
+
}
|
238 |
+
}
|
239 |
+
else {
|
240 |
+
$organizer = $organizers[0];
|
241 |
+
?>
|
242 |
+
<span><a href="<?php echo get_permalink($organizer['ID']) ?>"><?php echo $organizer['post_title'] ?></a></span>
|
243 |
+
<?php
|
244 |
+
$organizer_phone = get_post_meta($organizer['ID'], 'ecwd_organizer_meta_phone', true);
|
245 |
+
$organizer_website = get_post_meta($organizer['ID'], 'ecwd_organizer_meta_website', true);
|
246 |
+
$organizer_website = ECWD::add_http($organizer_website);
|
247 |
+
$json_ld['performer'] = array(
|
248 |
+
"@type" => "Person",
|
249 |
+
'name' => $organizer['post_title'],
|
250 |
+
'telephone' => $organizer_phone,
|
251 |
+
'sameAs' => get_permalink($organizer['ID'])
|
252 |
+
);
|
253 |
+
if (!empty($organizer_phone)) { ?>
|
254 |
+
<div class="ecwd_organizer_phone">
|
255 |
+
<span><?php _e('Phone', 'event-calendar-wd'); ?>:</span>
|
256 |
+
<span><?php echo $organizer_phone; ?></span>
|
257 |
+
</div>
|
258 |
+
<?php }
|
259 |
+
if (!empty($organizer_website)) { ?>
|
260 |
+
<div class="ecwd_organizer_website">
|
261 |
+
<span><?php _e('Website', 'event-calendar-wd'); ?>:</span>
|
262 |
+
<a href="<?php echo esc_url($organizer_website); ?>"><?php echo esc_html($organizer_website); ?></a>
|
263 |
+
</div>
|
264 |
+
<?php
|
265 |
+
}
|
266 |
+
}
|
267 |
+
?>
|
268 |
+
</div>
|
269 |
<?php } ?>
|
270 |
+
<div class="event-venue">
|
271 |
+
<?php if ($venue_post_id) { ?>
|
272 |
+
<label class="ecwd-venue-info" title="<?php _e('Venue', 'event-calendar-wd'); ?>"></label>
|
273 |
+
<span>
|
274 |
+
<?php
|
275 |
+
if (isset($_GET['iframe']) && intval($_GET['iframe']) == 1) {
|
276 |
+
$venue_permalink = add_query_arg('venue', '1', $venue_permalink);
|
277 |
+
}
|
278 |
+
?>
|
279 |
+
<a href="<?php echo $venue_permalink ?>"><?php echo $venue; ?></a>
|
280 |
+
</span>
|
281 |
+
<?php
|
282 |
+
if (!empty($ecwd_venue_phone)) {
|
283 |
+
echo sprintf($venue_meta_template, "ecwd_venue_phone", __('Phone', 'event-calendar-wd'), $ecwd_venue_phone);
|
284 |
+
}
|
285 |
+
if (!empty($ecwd_venue_website)) {
|
286 |
+
echo sprintf($venue_meta_link_template, "ecwd_venue_website", __('Website', 'event-calendar-wd'), $ecwd_venue_website, $ecwd_venue_website);
|
287 |
+
}
|
288 |
+
if (!empty($ecwd_event_location)) {
|
289 |
+
?>
|
290 |
+
<div class="address">
|
291 |
+
<span><?php _e('Address:', 'event-calendar-wd'); ?></span>
|
292 |
+
<span><?php echo $ecwd_event_location; ?></span>
|
293 |
+
</div>
|
294 |
+
<?php
|
295 |
+
}
|
296 |
+
$json_ld['location'] = array(
|
297 |
+
'@type' => 'Place',
|
298 |
+
'name' => $venue,
|
299 |
+
'address' => array(
|
300 |
+
'@type' => 'PostalAddress',
|
301 |
+
'telephone' => $ecwd_venue_phone,
|
302 |
+
'streetAddress' => $ecwd_event_location
|
303 |
+
),
|
304 |
+
);
|
305 |
+
}
|
306 |
+
else if ($ecwd_event_location) { ?>
|
307 |
+
<label class="ecwd-venue-info" title="<?php _e('Location', 'event-calendar-wd'); ?>"></label>
|
308 |
+
<span class="address">
|
309 |
+
<?php echo $ecwd_event_location; ?>
|
310 |
+
</span>
|
311 |
+
<?php
|
312 |
+
$json_ld['location'] = array(
|
313 |
+
'@type' => 'Place',
|
314 |
+
'name' => 'Address',
|
315 |
+
'address' => array(
|
316 |
+
'@type' => 'PostalAddress',
|
317 |
+
'streetAddress' => $ecwd_event_location
|
318 |
+
),
|
319 |
+
);
|
320 |
+
} ?>
|
321 |
</div>
|
322 |
<?php do_action('ecwd_view_ext'); ?>
|
323 |
+
</div>
|
324 |
</div>
|
325 |
<?php if ($ecwd_social_icons) { ?>
|
326 |
<div class="ecwd-social">
|
353 |
$url_for_google_map .= '@' . $ecwd_event_latlong;;
|
354 |
}
|
355 |
|
|
|
356 |
$map_events[0]['zoom'] = $ecwd_event_zoom;
|
357 |
$map_events[0]['infow'] = '<div class="ecwd_map_event">';
|
358 |
$map_events[0]['infow'] .= '<span class="location">' . $ecwd_event_location . '</span>';
|
359 |
$map_events[0]['infow'] .= '</div>';
|
360 |
$map_events[0]['infow'] .= '<div class="event-detalis-date">
|
361 |
+
<label class="ecwd-event-date-info" title="' . __('Date', 'event-calendar-wd') . '"></label>
|
362 |
+
<span class="ecwd-event-date">'. ECWD::get_ecwd_event_date_view($ecwd_event_date_from, $ecwd_event_date_to, $ecwd_all_day_event) . '</span>';
|
363 |
+
$map_events[0]['infow'] .= '</div>';
|
|
|
|
|
364 |
$map_events[0]['google_map_url'] = $url_for_google_map;
|
365 |
+
$map_events[0]['name'] = $post->post_title;
|
366 |
|
367 |
$markers = json_encode($map_events);
|
368 |
?>
|
538 |
echo get_the_password_form();
|
539 |
} ?>
|
540 |
</div>
|
541 |
+
<script id="ecwd_script_handler" type="text/javascript">
|
542 |
+
if (typeof ecwd_js_init_call == "object") {
|
|
|
543 |
ecwd_js_init_call = new ecwd_js_init();
|
544 |
ecwd_js_init_call.showMap();
|
545 |
+
}
|
546 |
+
</script>
|
547 |
+
<script type="application/ld+json"><?php echo json_encode($json_ld); ?></script>
|