Version Description
- Changed: Plugin interface
- Fixed: Minor bugs
Download this release
Release Info
Developer | webdorado |
Plugin | Event Calendar WD – Responsive Event Calendar plugin |
Version | 1.0.95 |
Comparing to | |
See all releases |
Code changes from version 1.0.94 to 1.0.95
- css/admin/admin.css +332 -156
- css/admin/licensing.css +32 -20
- css/style.css +112 -58
- ecwd.php +6 -2
- ecwd_admin_class.php +312 -117
- ecwd_class.php +54 -10
- includes/activation_settings_page.php +1 -1
- includes/calendar-class.php +24 -13
- includes/ecwd-cpt-class.php +248 -126
- includes/ecwd-cpt-filter.php +7 -7
- includes/ecwd-display-class.php +6 -5
- includes/ecwd-functions.php +24 -25
- includes/ecwd-notices-class.php +4 -4
- includes/ecwd_config.php +1 -1
- includes/ecwd_pointers.php +1 -1
- includes/register-settings.php +58 -60
- js/admin/admin.js +817 -567
- js/ecwd_popup.js +1 -1
- js/scripts.js +17 -4
- readme.txt +7 -3
- views/admin/admin.php +2 -2
- views/admin/ecwd-calendar-meta.php +16 -0
- views/admin/ecwd-event-calendars-meta.php +9 -1
- views/admin/ecwd-event-meta.php +641 -528
- views/admin/ecwd-event-organizers-meta.php +77 -27
- views/admin/ecwd-organizer-meta.php +36 -0
- views/admin/ecwd-venue-meta.php +99 -40
- views/ecwd-event-popup.php +305 -261
- views/ecwd-organizer-content.php +83 -54
- views/ecwd-venue-content.php +102 -81
- views/single-event.php +460 -392
css/admin/admin.css
CHANGED
@@ -1,13 +1,15 @@
|
|
1 |
/**
|
2 |
* Admin CSS file
|
3 |
*/
|
4 |
-
#ecwd-tabs > div{
|
5 |
-
display:none;
|
6 |
}
|
7 |
-
|
|
|
8 |
background: #ffffff;
|
9 |
padding: 15px;
|
10 |
}
|
|
|
11 |
.ecwd-meta-control {
|
12 |
margin-bottom: 15px;
|
13 |
}
|
@@ -28,49 +30,55 @@
|
|
28 |
word-break: break-all;
|
29 |
}
|
30 |
|
31 |
-
.border{
|
32 |
border: 1px solid red;
|
33 |
}
|
34 |
|
35 |
/*Spider events*/
|
36 |
-
.ecwd_repeat_type_list{
|
37 |
float: left;
|
38 |
width: 30%;
|
39 |
}
|
40 |
-
|
|
|
41 |
float: left;
|
42 |
width: 68%;
|
43 |
}
|
44 |
-
|
|
|
45 |
width: 120px;
|
46 |
display: inline-block;
|
47 |
}
|
48 |
-
|
|
|
49 |
clear: both;
|
50 |
}
|
51 |
-
|
|
|
52 |
float: right;
|
53 |
margin: 1px;
|
54 |
}
|
55 |
-
|
|
|
56 |
max-width: 64px;
|
57 |
max-height: 64px;
|
58 |
}
|
59 |
|
60 |
.ecwd_popup_body .ecwd-calendar-event,
|
61 |
-
.ecwd-events .ecwd-calendar-event{
|
62 |
-
width:47%;
|
63 |
display: inline-block;
|
64 |
-
margin:0 20px 10px 0;
|
65 |
}
|
66 |
|
67 |
-
.ecwd-events .ecwd-calendar-event{
|
68 |
-
width:42%;
|
69 |
}
|
|
|
70 |
.ecwd-modal .ecwd-calendar-event span:first-child,
|
71 |
.ecwd_popup_body .ecwd-calendar-event span:first-child,
|
72 |
.ecwd_popup_body .ecwd-calendar-event span:first-child,
|
73 |
-
.ecwd-events .ecwd-calendar-event span:first-child{
|
74 |
border: 1px solid #C8C8C8;
|
75 |
display: inline-block;
|
76 |
width: 89%;
|
@@ -83,21 +91,22 @@
|
|
83 |
float: left;
|
84 |
}
|
85 |
|
86 |
-
.ecwd-events .ecwd-calendar-event span:first-child{
|
87 |
width: 75%;
|
88 |
}
|
|
|
89 |
.ecwd-modal .ecwd-calendar-event:nth-child(even),
|
90 |
-
.ecwd_popup_body .ecwd-calendar-event:nth-child(even){
|
91 |
-
margin-right:0;
|
92 |
}
|
93 |
|
94 |
-
.ecwd-events .ecwd-calendar-event:after{
|
95 |
clear: both;
|
96 |
}
|
97 |
|
98 |
.ecwd-modal .ecwd-calendar-event .ecwd-calendar-event-add,
|
99 |
.ecwd_popup_body .ecwd-calendar-event .ecwd-calendar-event-add,
|
100 |
-
.ecwd-events .ecwd-calendar-event-delete{
|
101 |
display: inline-block;
|
102 |
text-align: center;
|
103 |
float: left;
|
@@ -111,11 +120,11 @@
|
|
111 |
font-size: 19px;
|
112 |
}
|
113 |
|
114 |
-
|
115 |
-
.ecwd-events .ecwd-calendar-event-edit{
|
116 |
|
117 |
}
|
118 |
-
|
|
|
119 |
font-size: 0;
|
120 |
display: inline-block;
|
121 |
float: left;
|
@@ -125,7 +134,8 @@
|
|
125 |
width: 24px;
|
126 |
background: url("../images/edit_icon.png") no-repeat center center;
|
127 |
}
|
128 |
-
|
|
|
129 |
line-height: 20px;
|
130 |
}
|
131 |
|
@@ -149,11 +159,13 @@
|
|
149 |
transition: opacity 400ms ease-in;
|
150 |
pointer-events: none;*/
|
151 |
}
|
|
|
152 |
.ecwd-modal:target {
|
153 |
/* opacity:1;
|
154 |
display: block;
|
155 |
pointer-events: auto;*/
|
156 |
}
|
|
|
157 |
.ecwd-modal > div.ecwd-excluded-events,
|
158 |
.ecwd_popup_body > div.ecwd-excluded-events {
|
159 |
width: 500px !important;
|
@@ -163,6 +175,7 @@
|
|
163 |
border-radius: 1px;
|
164 |
background: #fff;
|
165 |
}
|
|
|
166 |
/*.ecwd-modal > div.ecwd-preview {
|
167 |
position: relative;
|
168 |
margin: 5%;
|
@@ -184,7 +197,7 @@
|
|
184 |
z-index: 4;
|
185 |
}
|
186 |
|
187 |
-
.ecwd-excluded-events h2{
|
188 |
margin: 15px 0;
|
189 |
padding-bottom: 15px !important;
|
190 |
border-bottom: 1px solid #B2B2B2;
|
@@ -196,6 +209,7 @@
|
|
196 |
color: #FFF !important;
|
197 |
font-weight: 700 !important;
|
198 |
}
|
|
|
199 |
#ecwd_event_pickup_date, #ecwd_event_pickup_time {
|
200 |
height: 27px;
|
201 |
border: 1px solid #A1A1A1;
|
@@ -207,39 +221,43 @@
|
|
207 |
}
|
208 |
|
209 |
#ecwd_event_pickup_date {
|
210 |
-
background:url(../images/admin_day.jpg) no-repeat left;
|
211 |
margin: 1px 8px;
|
212 |
}
|
|
|
213 |
#ecwd_event_pickup_time {
|
214 |
-
background:url(../images/admin_time.jpg) no-repeat left;
|
215 |
}
|
216 |
|
217 |
/*TABS*/
|
218 |
-
#ecwd-tabs, #ecwd-tabs div{
|
219 |
background: none #ffffff;
|
220 |
border: 0;
|
221 |
}
|
222 |
-
|
|
|
223 |
list-style-type: none;
|
224 |
}
|
|
|
225 |
.ecwd-tabs li,
|
226 |
-
#ecwd-settings-content .nav-tab-wrapper a{
|
227 |
display: inline-block;
|
228 |
border: 1px solid #A5A5A5;
|
229 |
}
|
|
|
230 |
.ecwd-tabs li a,
|
231 |
-
#ecwd-settings-content .nav-tab-wrapper a{
|
232 |
display: table-cell;
|
233 |
text-align: center;
|
234 |
min-width: 100px;
|
235 |
height: 30px;
|
236 |
vertical-align: middle;
|
237 |
-
text-decoration:none;
|
238 |
-
color
|
239 |
font-size: 16px;
|
240 |
}
|
241 |
|
242 |
-
#ecwd-settings-content .nav-tab-wrapper a{
|
243 |
background: #ffffff;
|
244 |
height: 21px;
|
245 |
margin-right: 4px;
|
@@ -248,36 +266,42 @@
|
|
248 |
padding-top: 2px;
|
249 |
}
|
250 |
|
251 |
-
.ecwd-tabs li a:focus{
|
252 |
-
box-shadow:none;
|
253 |
}
|
254 |
-
|
255 |
-
|
256 |
-
|
|
|
257 |
background: #0074A2;
|
258 |
}
|
259 |
|
260 |
#ecwd-settings-content .nav-tab-wrapper {
|
261 |
-
border-bottom:0;
|
262 |
padding-left: 0;
|
263 |
}
|
264 |
|
265 |
-
.ecwd-tabs li:hover
|
266 |
-
#ecwd-settings-content .nav-tab-wrapper a.nav-tab-active{
|
267 |
border: 1px solid transparent;
|
268 |
}
|
269 |
|
270 |
-
.ecwd-tab-inner{
|
271 |
padding: 15px;
|
272 |
}
|
273 |
|
274 |
/*Preview */
|
275 |
-
.ui-selecting {
|
276 |
-
|
|
|
|
|
|
|
|
|
|
|
277 |
|
278 |
.event_cal_add {
|
279 |
width: 350px;
|
280 |
-
height: auto;
|
281 |
border: 1px solid #cccccc;
|
282 |
position: absolute;
|
283 |
z-index: 9999;
|
@@ -285,7 +309,7 @@
|
|
285 |
display: none;
|
286 |
}
|
287 |
|
288 |
-
.event_cal_add .add_event_to_cal{
|
289 |
display: block;
|
290 |
cursor: pointer;
|
291 |
padding-bottom: 10px;
|
@@ -296,24 +320,28 @@
|
|
296 |
background: #e3e3e3;
|
297 |
border: 1px solid #eeeeee;
|
298 |
}
|
299 |
-
|
|
|
300 |
display: block;
|
301 |
height: 20px;
|
302 |
margin: 25px 0 0 0;
|
303 |
}
|
304 |
-
|
|
|
305 |
color: #bc0b0b;
|
306 |
display: block;
|
307 |
padding-left: 36px;
|
308 |
height: 20px;
|
309 |
|
310 |
}
|
311 |
-
|
312 |
-
|
313 |
-
|
|
|
314 |
font-size: 17px;
|
315 |
}
|
316 |
-
|
|
|
317 |
border: 1px solid #A1A1A1;
|
318 |
padding: 0px 15px;
|
319 |
box-shadow: none;
|
@@ -321,11 +349,19 @@ span.ecwd_error{
|
|
321 |
color: #000;
|
322 |
font-weight: bold;
|
323 |
}
|
324 |
-
|
|
|
325 |
border: 1px solid transparent;
|
326 |
color: #fff;
|
327 |
background: #0074A2;
|
328 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
#ecwd-settings input[type="text"],
|
330 |
#ecwd-settings select,
|
331 |
#ecwd_theme_meta input[type="text"]:not(#ecwd_event_location),
|
@@ -334,17 +370,18 @@ span.ecwd_error{
|
|
334 |
#ecwd_event_meta input[type="text"]:not(#ecwd_event_date_from):not(#ecwd_event_date_to):not(#ecwd_event_location),
|
335 |
#ecwd_event_meta select,
|
336 |
#ecwd_event_meta #ecwd_event_year_month,
|
337 |
-
#ecwd-settings .form-field input, #ecwd-settings input.regular-text{
|
338 |
-
width:250px;
|
339 |
border: 1px solid #A1A1A1;
|
340 |
}
|
341 |
-
|
|
|
342 |
border: 1px solid #A1A1A1;
|
343 |
}
|
344 |
|
345 |
-
#ecwd-settings
|
346 |
-
#ecwd_event_meta
|
347 |
-
#ecwd-settings
|
348 |
position: absolute;
|
349 |
z-index: -1;
|
350 |
margin: 0 !important;
|
@@ -353,9 +390,9 @@ span.ecwd_error{
|
|
353 |
min-width: 5px !important;
|
354 |
}
|
355 |
|
356 |
-
|
357 |
-
#ecwd-settings
|
358 |
-
#ecwd_event_meta
|
359 |
width: 13px;
|
360 |
height: 12px;
|
361 |
background: #FDFDFD;
|
@@ -370,13 +407,45 @@ span.ecwd_error{
|
|
370 |
-webkit-box-sizing: content-box;
|
371 |
-moz-box-sizing: content-box;
|
372 |
}
|
373 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
margin-left: 0px;
|
375 |
}
|
376 |
|
377 |
-
#ecwd-settings .checkbox-div input[type="checkbox"]:checked + label
|
378 |
-
#ecwd_event_meta .checkbox-div input[type="checkbox"]:checked + label
|
379 |
-
#ecwd-settings
|
380 |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
381 |
filter: alpha(opacity=100);
|
382 |
opacity: 1;
|
@@ -385,7 +454,7 @@ span.ecwd_error{
|
|
385 |
top: 2px;
|
386 |
}
|
387 |
|
388 |
-
#ecwd-settings
|
389 |
background: #0074A2;
|
390 |
color: #ffffff;
|
391 |
font-weight: bold;
|
@@ -396,9 +465,8 @@ span.ecwd_error{
|
|
396 |
height: auto;
|
397 |
}
|
398 |
|
399 |
-
|
400 |
-
#
|
401 |
-
#ecwd-settings .checkbox-div label {
|
402 |
cursor: pointer;
|
403 |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
404 |
filter: alpha(opacity=0);
|
@@ -413,96 +481,153 @@ span.ecwd_error{
|
|
413 |
left: 2px;
|
414 |
}
|
415 |
|
416 |
-
#ecwd_calendar_meta .add_event_plus{
|
417 |
-
display:inline-block;
|
418 |
-
width:18px;
|
419 |
-
height:18px;
|
420 |
-
border-radius:100%;
|
421 |
-
background
|
422 |
-
color
|
423 |
-
text-shadow:1px -1px 2px #005C82;
|
424 |
-
margin-left:8px;
|
425 |
-
text-align:center;
|
426 |
font-weight: bold;
|
427 |
font-size: 15px;
|
428 |
line-height: 17px;
|
429 |
}
|
430 |
-
|
431 |
-
|
|
|
432 |
}
|
433 |
-
|
|
|
434 |
width: 90px;
|
435 |
display: inline-block;
|
436 |
}
|
437 |
-
|
|
|
438 |
width: 66px;
|
439 |
display: inline-block;
|
440 |
}
|
441 |
-
|
|
|
442 |
margin: 10px 0 0 95px;
|
443 |
}
|
444 |
-
|
|
|
445 |
margin-top: 10px;
|
446 |
}
|
447 |
-
|
|
|
448 |
margin-left: 0px;
|
449 |
}
|
450 |
-
|
451 |
-
#ecwd_event_meta .ecwd_repeat_advanced
|
|
|
452 |
width: auto;
|
453 |
}
|
454 |
|
455 |
#ecwd_event_meta #ecwd_monthly,
|
456 |
-
#ecwd_event_meta .ecwd_event_repeat_event_div{
|
457 |
-
margin:10px 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
458 |
}
|
459 |
|
460 |
-
#
|
461 |
-
|
|
|
462 |
}
|
463 |
|
464 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
465 |
display:inline-block;
|
466 |
-
width:
|
467 |
font-weight: normal;
|
468 |
font-size: 15px;
|
469 |
}
|
470 |
|
471 |
-
|
472 |
-
|
|
|
|
|
|
|
|
|
473 |
}
|
474 |
-
|
475 |
-
|
|
|
476 |
}
|
|
|
|
|
|
|
|
|
|
|
477 |
#ecwd_theme_meta .with_ecwd_color:after,
|
478 |
#ecwd-settings-content .ecwd-addons_updates:after,
|
479 |
#ecwd-settings-content .main-plugin:after,
|
480 |
-
#ecwd-settings-content:after{
|
481 |
-
content:'';
|
482 |
-
display:table;
|
483 |
-
clear:both;
|
484 |
}
|
485 |
-
|
|
|
486 |
float: left;
|
487 |
margin-top: 5px;
|
488 |
width: 293px;
|
489 |
}
|
490 |
-
|
|
|
491 |
float: left;
|
492 |
}
|
493 |
-
|
494 |
-
|
495 |
-
|
|
|
496 |
}
|
497 |
-
|
|
|
498 |
margin: 10px 0;
|
499 |
}
|
500 |
-
|
|
|
501 |
font-size: 15px;
|
502 |
}
|
503 |
|
504 |
-
#ecwd-settings-content #add_on_title{
|
505 |
-
margin-bottom:20px;
|
506 |
}
|
507 |
|
508 |
#ecwd-settings-content .ecwd_coming_soon {
|
@@ -510,17 +635,20 @@ span.ecwd_error{
|
|
510 |
top: 44px;
|
511 |
left: 0;
|
512 |
}
|
513 |
-
|
|
|
514 |
text-decoration: none;
|
515 |
}
|
516 |
-
|
|
|
517 |
color: #229DBF;
|
518 |
font-size: 16px;
|
519 |
margin-bottom: 9px;
|
520 |
padding: 0 0 7px;
|
521 |
line-height: 1.2;
|
522 |
}
|
523 |
-
|
|
|
524 |
font-size: 13px;
|
525 |
line-height: 18px;
|
526 |
height: 100%;
|
@@ -548,6 +676,7 @@ span.ecwd_error{
|
|
548 |
-webkit-box-sizing: border-box;
|
549 |
-moz-box-sizing: border-box;
|
550 |
}
|
|
|
551 |
.grid figcaption {
|
552 |
position: absolute;
|
553 |
top: 0;
|
@@ -556,15 +685,17 @@ span.ecwd_error{
|
|
556 |
background: #2c3f52;
|
557 |
color: #ed4e6e;
|
558 |
}
|
|
|
559 |
#ecwd-settings-content .ecwd-addon,
|
560 |
-
#ecwd-settings-content .ecwd-addon-price{
|
561 |
display: inline-block;
|
562 |
margin-top: 15px;
|
563 |
font-size: 15px;
|
564 |
border: 1px solid #DCDCDC;
|
565 |
font-weight: bold;
|
566 |
}
|
567 |
-
|
|
|
568 |
background: #FFFFFF url(../images/Add_Ons.jpg) no-repeat 6px center;
|
569 |
color: #66686B;
|
570 |
padding: 9px 12px 9px 45px;
|
@@ -573,39 +704,46 @@ span.ecwd_error{
|
|
573 |
-webkit-box-sizing: border-box;
|
574 |
-moz-box-sizing: border-box;
|
575 |
}
|
576 |
-
|
|
|
577 |
background: #FFFFFF;
|
578 |
color: #229CBF;
|
579 |
padding: 9px 12px;
|
580 |
}
|
|
|
581 |
#ecwd-settings-content .ecwd-add-on:hover .ecwd-addon-price,
|
582 |
-
#ecwd-settings-content .ecwd-addon-price:hover{
|
583 |
background: #229CBF;
|
584 |
color: #DDECF1;
|
585 |
}
|
|
|
586 |
#ecwd-settings-content .ecwd-add-on:hover .ecwd-addon,
|
587 |
-
#ecwd-settings-content .ecwd-addon:hover{
|
588 |
background: #23282D url(../images/Add_Ons_hover.jpg) no-repeat 6px center;
|
589 |
color: #DDDEDE;
|
590 |
}
|
591 |
-
|
|
|
592 |
border-left: 1px solid #A7A9AB;
|
593 |
padding: 4px 10px 4px 10px;
|
594 |
}
|
595 |
-
|
|
|
596 |
padding: 5px 0 5px 10px;
|
597 |
border-left: 1px solid #93CEE0;
|
598 |
}
|
599 |
-
|
600 |
-
|
601 |
-
|
|
|
602 |
}
|
603 |
-
|
604 |
-
|
|
|
605 |
height: 320px;
|
606 |
-
float:left;
|
607 |
-
margin-right:40px;
|
608 |
-
margin-bottom:40px;
|
609 |
-webkit-perspective: 1700px;
|
610 |
-moz-perspective: 1700px;
|
611 |
perspective: 1700px;
|
@@ -614,35 +752,41 @@ span.ecwd_error{
|
|
614 |
perspective-origin: 0 50%;
|
615 |
position: relative;
|
616 |
}
|
617 |
-
|
|
|
618 |
float: left;
|
619 |
margin-right: 25px;
|
620 |
height: auto;
|
621 |
}
|
622 |
-
|
|
|
623 |
-webkit-transform-style: preserve-3d;
|
624 |
-moz-transform-style: preserve-3d;
|
625 |
transform-style: preserve-3d;
|
626 |
position: relative;
|
627 |
-
width:100%;
|
628 |
height: 232px;
|
629 |
margin: 0;
|
630 |
}
|
631 |
-
|
|
|
632 |
overflow: hidden;
|
633 |
}
|
634 |
-
|
|
|
635 |
-webkit-transition: -webkit-transform 0.4s;
|
636 |
-moz-transition: -moz-transform 0.4s;
|
637 |
transition: transform 0.4s;
|
638 |
}
|
639 |
-
|
|
|
640 |
-webkit-transform: translateX(25%);
|
641 |
-moz-transform: translateX(25%);
|
642 |
-ms-transform: translateX(25%);
|
643 |
transform: translateX(25%);
|
644 |
}
|
645 |
-
|
|
|
646 |
opacity: 1;
|
647 |
-webkit-transform: rotateY(0deg);
|
648 |
-moz-transform: rotateY(0deg);
|
@@ -651,69 +795,86 @@ span.ecwd_error{
|
|
651 |
-moz-transition: -moz-transform 0.4s, opacity 0.1s;
|
652 |
transition: transform 0.4s, opacity 0.1s;
|
653 |
}
|
|
|
654 |
#ecwd-settings-content .ecwd-addon-subtitle {
|
655 |
font-size: 25px;
|
656 |
border-bottom: 1px solid #C1C4C7;
|
657 |
padding-bottom: 23px;
|
658 |
}
|
|
|
659 |
#ecwd-settings-content .main-plugin .main-plugin-img {
|
660 |
float: left;
|
661 |
margin-right: 2%;
|
662 |
width: 26%;
|
663 |
}
|
664 |
-
|
665 |
-
|
|
|
666 |
}
|
|
|
667 |
#ecwd-settings-content .main-plugin .main-plugin-info {
|
668 |
float: left;
|
669 |
}
|
|
|
670 |
#ecwd-settings-content .main-plugin {
|
671 |
margin-bottom: 25px;
|
672 |
}
|
|
|
673 |
#ecwd-settings-content .main-plugin_desc-cont p,
|
674 |
#ecwd-settings-content .main-plugin_desc-cont {
|
675 |
font-size: 14px;
|
676 |
}
|
677 |
-
|
|
|
678 |
margin: 2px 0 13px;
|
679 |
}
|
680 |
-
|
|
|
681 |
margin: 2px 0 4px;
|
682 |
}
|
|
|
683 |
#ecwd-settings-content .main-plugin-desc {
|
684 |
margin-bottom: 12px;
|
685 |
}
|
|
|
686 |
#ecwd-settings-content .main-plugin-info h2 {
|
687 |
padding: 0;
|
688 |
line-height: 1;
|
689 |
margin-bottom: 14px;
|
690 |
}
|
|
|
691 |
#ecwd-settings-content .main-plugin-info h2 a {
|
692 |
color: #323A45;
|
693 |
text-decoration: none;
|
694 |
font-weight: bold;
|
695 |
}
|
|
|
696 |
#ecwd-settings-content .main-plugin-desc-info {
|
697 |
border-bottom: 1px solid #C0C4C7;
|
698 |
width: 71%;
|
699 |
}
|
|
|
700 |
#ecwd-settings-content .ecwd-addons_updates .main-plugin-desc-info {
|
701 |
border-bottom: 0;
|
702 |
width: 100%;
|
703 |
}
|
704 |
-
|
705 |
-
|
706 |
-
|
|
|
707 |
color: #bc0b0b;
|
708 |
}
|
|
|
709 |
#ecwd-settings-content .ecwd-addons_updates .ecwd-figure {
|
710 |
margin-bottom: 10px;
|
711 |
}
|
|
|
712 |
#ecwd-settings-content .ecwd-addons_updates .ecwd-addon-descr-update {
|
713 |
border-top: 1px solid #898989;
|
714 |
padding-top: 6px;
|
715 |
}
|
716 |
-
|
|
|
717 |
color: #323A45;
|
718 |
text-decoration: none;
|
719 |
font-weight: bold;
|
@@ -721,28 +882,33 @@ span.ecwd_error{
|
|
721 |
padding-bottom: 0;
|
722 |
margin-bottom: 0;
|
723 |
}
|
|
|
724 |
.ecwd_more_updates {
|
725 |
display: none;
|
726 |
}
|
|
|
727 |
/*mail*/
|
728 |
-
ul.ecwd_list_container{
|
729 |
border: 1px solid #ddd;
|
730 |
padding: 15px 20px;
|
731 |
}
|
732 |
-
|
|
|
733 |
border-bottom: 1px solid #ddd;
|
734 |
padding-bottom: 10px;
|
735 |
-
font-size:18px;
|
736 |
}
|
737 |
-
|
738 |
-
|
|
|
739 |
}
|
740 |
-
|
741 |
-
|
|
|
742 |
}
|
743 |
|
744 |
-
body.wp-admin.post-type-ecwd_event #posts-filter .alignleft.actions a.button{
|
745 |
-
display:inline-block;
|
746 |
margin: 0;
|
747 |
}
|
748 |
|
@@ -759,42 +925,52 @@ body.wp-admin.post-type-ecwd_event #posts-filter .alignleft.actions a.button{
|
|
759 |
vertical-align: middle;
|
760 |
width: 98%;
|
761 |
}
|
|
|
762 |
.ecwd_topic.wd_topic .wd_help_topic {
|
763 |
float: left;
|
764 |
}
|
|
|
765 |
.ecwd_topic.wd_topic .wd_help_topic a {
|
766 |
color: #e54b26;
|
767 |
border-bottom: 1px solid #edbeb7;
|
768 |
text-decoration: none;
|
769 |
}
|
|
|
770 |
.ecwd_topic.wd_topic .wd_help_topic a:hover {
|
771 |
color: #e54b26;
|
772 |
}
|
|
|
773 |
.ecwd_topic.wd_topic .wd_support {
|
774 |
float: right;
|
775 |
margin: 0 10px;
|
776 |
}
|
|
|
777 |
.ecwd_topic.wd_topic .wd_support img {
|
778 |
vertical-align: middle;
|
779 |
}
|
|
|
780 |
.ecwd_topic.wd_topic .wd_support a {
|
781 |
text-decoration: none;
|
782 |
color: #6E7990;
|
783 |
}
|
|
|
784 |
.ecwd_topic.wd_topic .wd_pro {
|
785 |
float: right;
|
786 |
padding: 0;
|
787 |
}
|
|
|
788 |
.ecwd_topic.wd_topic .wd_pro a {
|
789 |
border: none;
|
790 |
box-shadow: none !important;
|
791 |
text-decoration: none;
|
792 |
}
|
|
|
793 |
.ecwd_topic.wd_topic .wd_pro img {
|
794 |
border: none;
|
795 |
display: inline-block;
|
796 |
vertical-align: middle;
|
797 |
}
|
|
|
798 |
.ecwd_topic.wd_topic .wd_pro a,
|
799 |
.ecwd_topic.wd_topic .wd_pro a:active,
|
800 |
.ecwd_topic.wd_topic .wd_pro a:visited,
|
1 |
/**
|
2 |
* Admin CSS file
|
3 |
*/
|
4 |
+
#ecwd-tabs > div {
|
5 |
+
display: none;
|
6 |
}
|
7 |
+
|
8 |
+
#ecwd-settings {
|
9 |
background: #ffffff;
|
10 |
padding: 15px;
|
11 |
}
|
12 |
+
|
13 |
.ecwd-meta-control {
|
14 |
margin-bottom: 15px;
|
15 |
}
|
30 |
word-break: break-all;
|
31 |
}
|
32 |
|
33 |
+
.border {
|
34 |
border: 1px solid red;
|
35 |
}
|
36 |
|
37 |
/*Spider events*/
|
38 |
+
.ecwd_repeat_type_list {
|
39 |
float: left;
|
40 |
width: 30%;
|
41 |
}
|
42 |
+
|
43 |
+
.ecwd_repeat_advanced {
|
44 |
float: left;
|
45 |
width: 68%;
|
46 |
}
|
47 |
+
|
48 |
+
#ecwd_choose_day_container div label {
|
49 |
width: 120px;
|
50 |
display: inline-block;
|
51 |
}
|
52 |
+
|
53 |
+
#ecwd_choose_day_container div label:after {
|
54 |
clear: both;
|
55 |
}
|
56 |
+
|
57 |
+
#ecwd_choose_day_container div label input {
|
58 |
float: right;
|
59 |
margin: 1px;
|
60 |
}
|
61 |
+
|
62 |
+
.ecwd_icon {
|
63 |
max-width: 64px;
|
64 |
max-height: 64px;
|
65 |
}
|
66 |
|
67 |
.ecwd_popup_body .ecwd-calendar-event,
|
68 |
+
.ecwd-events .ecwd-calendar-event {
|
69 |
+
width: 47%;
|
70 |
display: inline-block;
|
71 |
+
margin: 0 20px 10px 0;
|
72 |
}
|
73 |
|
74 |
+
.ecwd-events .ecwd-calendar-event {
|
75 |
+
width: 42%;
|
76 |
}
|
77 |
+
|
78 |
.ecwd-modal .ecwd-calendar-event span:first-child,
|
79 |
.ecwd_popup_body .ecwd-calendar-event span:first-child,
|
80 |
.ecwd_popup_body .ecwd-calendar-event span:first-child,
|
81 |
+
.ecwd-events .ecwd-calendar-event span:first-child {
|
82 |
border: 1px solid #C8C8C8;
|
83 |
display: inline-block;
|
84 |
width: 89%;
|
91 |
float: left;
|
92 |
}
|
93 |
|
94 |
+
.ecwd-events .ecwd-calendar-event span:first-child {
|
95 |
width: 75%;
|
96 |
}
|
97 |
+
|
98 |
.ecwd-modal .ecwd-calendar-event:nth-child(even),
|
99 |
+
.ecwd_popup_body .ecwd-calendar-event:nth-child(even) {
|
100 |
+
margin-right: 0;
|
101 |
}
|
102 |
|
103 |
+
.ecwd-events .ecwd-calendar-event:after {
|
104 |
clear: both;
|
105 |
}
|
106 |
|
107 |
.ecwd-modal .ecwd-calendar-event .ecwd-calendar-event-add,
|
108 |
.ecwd_popup_body .ecwd-calendar-event .ecwd-calendar-event-add,
|
109 |
+
.ecwd-events .ecwd-calendar-event-delete {
|
110 |
display: inline-block;
|
111 |
text-align: center;
|
112 |
float: left;
|
120 |
font-size: 19px;
|
121 |
}
|
122 |
|
123 |
+
.ecwd-events .ecwd-calendar-event-edit {
|
|
|
124 |
|
125 |
}
|
126 |
+
|
127 |
+
.ecwd-events .ecwd-calendar-event-edit a {
|
128 |
font-size: 0;
|
129 |
display: inline-block;
|
130 |
float: left;
|
134 |
width: 24px;
|
135 |
background: url("../images/edit_icon.png") no-repeat center center;
|
136 |
}
|
137 |
+
|
138 |
+
.ecwd-events .ecwd-calendar-event-delete {
|
139 |
line-height: 20px;
|
140 |
}
|
141 |
|
159 |
transition: opacity 400ms ease-in;
|
160 |
pointer-events: none;*/
|
161 |
}
|
162 |
+
|
163 |
.ecwd-modal:target {
|
164 |
/* opacity:1;
|
165 |
display: block;
|
166 |
pointer-events: auto;*/
|
167 |
}
|
168 |
+
|
169 |
.ecwd-modal > div.ecwd-excluded-events,
|
170 |
.ecwd_popup_body > div.ecwd-excluded-events {
|
171 |
width: 500px !important;
|
175 |
border-radius: 1px;
|
176 |
background: #fff;
|
177 |
}
|
178 |
+
|
179 |
/*.ecwd-modal > div.ecwd-preview {
|
180 |
position: relative;
|
181 |
margin: 5%;
|
197 |
z-index: 4;
|
198 |
}
|
199 |
|
200 |
+
.ecwd-excluded-events h2 {
|
201 |
margin: 15px 0;
|
202 |
padding-bottom: 15px !important;
|
203 |
border-bottom: 1px solid #B2B2B2;
|
209 |
color: #FFF !important;
|
210 |
font-weight: 700 !important;
|
211 |
}
|
212 |
+
|
213 |
#ecwd_event_pickup_date, #ecwd_event_pickup_time {
|
214 |
height: 27px;
|
215 |
border: 1px solid #A1A1A1;
|
221 |
}
|
222 |
|
223 |
#ecwd_event_pickup_date {
|
224 |
+
background: url(../images/admin_day.jpg) no-repeat left;
|
225 |
margin: 1px 8px;
|
226 |
}
|
227 |
+
|
228 |
#ecwd_event_pickup_time {
|
229 |
+
background: url(../images/admin_time.jpg) no-repeat left;
|
230 |
}
|
231 |
|
232 |
/*TABS*/
|
233 |
+
#ecwd-tabs, #ecwd-tabs div {
|
234 |
background: none #ffffff;
|
235 |
border: 0;
|
236 |
}
|
237 |
+
|
238 |
+
.ecwd-tabs {
|
239 |
list-style-type: none;
|
240 |
}
|
241 |
+
|
242 |
.ecwd-tabs li,
|
243 |
+
#ecwd-settings-content .nav-tab-wrapper a {
|
244 |
display: inline-block;
|
245 |
border: 1px solid #A5A5A5;
|
246 |
}
|
247 |
+
|
248 |
.ecwd-tabs li a,
|
249 |
+
#ecwd-settings-content .nav-tab-wrapper a {
|
250 |
display: table-cell;
|
251 |
text-align: center;
|
252 |
min-width: 100px;
|
253 |
height: 30px;
|
254 |
vertical-align: middle;
|
255 |
+
text-decoration: none;
|
256 |
+
color: #5E5E5E;
|
257 |
font-size: 16px;
|
258 |
}
|
259 |
|
260 |
+
#ecwd-settings-content .nav-tab-wrapper a {
|
261 |
background: #ffffff;
|
262 |
height: 21px;
|
263 |
margin-right: 4px;
|
266 |
padding-top: 2px;
|
267 |
}
|
268 |
|
269 |
+
.ecwd-tabs li a:focus {
|
270 |
+
box-shadow: none;
|
271 |
}
|
272 |
+
|
273 |
+
.ecwd-tabs li:hover a, .ecwd-tabs li.ui-state-active a,
|
274 |
+
#ecwd-settings-content .nav-tab-wrapper a:hover, #ecwd-settings-content .nav-tab-wrapper a.nav-tab-active {
|
275 |
+
color: #ffffff;
|
276 |
background: #0074A2;
|
277 |
}
|
278 |
|
279 |
#ecwd-settings-content .nav-tab-wrapper {
|
280 |
+
border-bottom: 0;
|
281 |
padding-left: 0;
|
282 |
}
|
283 |
|
284 |
+
.ecwd-tabs li:hover, .ecwd-tabs li.ui-state-active,
|
285 |
+
#ecwd-settings-content .nav-tab-wrapper a.nav-tab-active {
|
286 |
border: 1px solid transparent;
|
287 |
}
|
288 |
|
289 |
+
.ecwd-tab-inner {
|
290 |
padding: 15px;
|
291 |
}
|
292 |
|
293 |
/*Preview */
|
294 |
+
.ui-selecting {
|
295 |
+
background: #FECA40 !important;
|
296 |
+
}
|
297 |
+
|
298 |
+
.ui-selected {
|
299 |
+
background: #F39814 !important;
|
300 |
+
}
|
301 |
|
302 |
.event_cal_add {
|
303 |
width: 350px;
|
304 |
+
height: auto;
|
305 |
border: 1px solid #cccccc;
|
306 |
position: absolute;
|
307 |
z-index: 9999;
|
309 |
display: none;
|
310 |
}
|
311 |
|
312 |
+
.event_cal_add .add_event_to_cal {
|
313 |
display: block;
|
314 |
cursor: pointer;
|
315 |
padding-bottom: 10px;
|
320 |
background: #e3e3e3;
|
321 |
border: 1px solid #eeeeee;
|
322 |
}
|
323 |
+
|
324 |
+
.event_cal_add .ecwd_notification {
|
325 |
display: block;
|
326 |
height: 20px;
|
327 |
margin: 25px 0 0 0;
|
328 |
}
|
329 |
+
|
330 |
+
span.ecwd_error {
|
331 |
color: #bc0b0b;
|
332 |
display: block;
|
333 |
padding-left: 36px;
|
334 |
height: 20px;
|
335 |
|
336 |
}
|
337 |
+
|
338 |
+
#ecwd_calendar_meta h3.hndle {
|
339 |
+
color: #0074A2;
|
340 |
+
text-transform: uppercase;
|
341 |
font-size: 17px;
|
342 |
}
|
343 |
+
|
344 |
+
#ecwd-settings a.button {
|
345 |
border: 1px solid #A1A1A1;
|
346 |
padding: 0px 15px;
|
347 |
box-shadow: none;
|
349 |
color: #000;
|
350 |
font-weight: bold;
|
351 |
}
|
352 |
+
|
353 |
+
#ecwd-settings a.button:hover {
|
354 |
border: 1px solid transparent;
|
355 |
color: #fff;
|
356 |
background: #0074A2;
|
357 |
}
|
358 |
+
|
359 |
+
#ecwd_event_location{
|
360 |
+
background-image: none !important;
|
361 |
+
}
|
362 |
+
|
363 |
+
.ecwd-admin-fields input[type="text"]:not(#ecwd_event_location),
|
364 |
+
.ecwd-admin-fields select,
|
365 |
#ecwd-settings input[type="text"],
|
366 |
#ecwd-settings select,
|
367 |
#ecwd_theme_meta input[type="text"]:not(#ecwd_event_location),
|
370 |
#ecwd_event_meta input[type="text"]:not(#ecwd_event_date_from):not(#ecwd_event_date_to):not(#ecwd_event_location),
|
371 |
#ecwd_event_meta select,
|
372 |
#ecwd_event_meta #ecwd_event_year_month,
|
373 |
+
#ecwd-settings .form-field input, #ecwd-settings input.regular-text {
|
374 |
+
width: 250px;
|
375 |
border: 1px solid #A1A1A1;
|
376 |
}
|
377 |
+
|
378 |
+
#ecwd_event_date_from, #ecwd_event_date_to {
|
379 |
border: 1px solid #A1A1A1;
|
380 |
}
|
381 |
|
382 |
+
#ecwd-settings input[type="checkbox"],
|
383 |
+
#ecwd_event_meta input[type="checkbox"],
|
384 |
+
#ecwd-settings input[type="radio"] {
|
385 |
position: absolute;
|
386 |
z-index: -1;
|
387 |
margin: 0 !important;
|
390 |
min-width: 5px !important;
|
391 |
}
|
392 |
|
393 |
+
#ecwd_venue_meta .checkbox-div,
|
394 |
+
#ecwd-settings .checkbox-div,
|
395 |
+
#ecwd_event_meta .checkbox-div {
|
396 |
width: 13px;
|
397 |
height: 12px;
|
398 |
background: #FDFDFD;
|
407 |
-webkit-box-sizing: content-box;
|
408 |
-moz-box-sizing: content-box;
|
409 |
}
|
410 |
+
|
411 |
+
#ecwd_theme_meta label,
|
412 |
+
#ecwd_venue_meta label {
|
413 |
+
display: inline-block;
|
414 |
+
width: 290px;
|
415 |
+
font-weight: normal;
|
416 |
+
font-size: 15px;
|
417 |
+
}
|
418 |
+
|
419 |
+
/*venue, organizer*/
|
420 |
+
.ecwd-admin-fields .ecwd-meta-field,
|
421 |
+
.ecwd-organiz-meta-fields .ecwd-meta-field,
|
422 |
+
.ecwd-venue-meta-fields .ecwd-meta-field {
|
423 |
+
padding: 4px 0;
|
424 |
+
}
|
425 |
+
|
426 |
+
.ecwd-admin-fields .ecwd-meta-field,
|
427 |
+
.ecwd-organiz-meta-fields,
|
428 |
+
.ecwd-venue-meta-fields {
|
429 |
+
padding: 8px 0;
|
430 |
+
}
|
431 |
+
|
432 |
+
.ecwd-hide-map {
|
433 |
+
width: 100%;
|
434 |
+
position: absolute;
|
435 |
+
left: -200%;
|
436 |
+
}
|
437 |
+
|
438 |
+
.ecwd_google_map_wrapper {
|
439 |
+
position: relative;
|
440 |
+
}
|
441 |
+
|
442 |
+
#ecwd-settings .checkbox-div:first-child {
|
443 |
margin-left: 0px;
|
444 |
}
|
445 |
|
446 |
+
#ecwd-settings .checkbox-div input[type="checkbox"]:checked + label,
|
447 |
+
#ecwd_event_meta .checkbox-div input[type="checkbox"]:checked + label,
|
448 |
+
#ecwd-settings .checkbox-div input[type="radio"]:checked + label {
|
449 |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
450 |
filter: alpha(opacity=100);
|
451 |
opacity: 1;
|
454 |
top: 2px;
|
455 |
}
|
456 |
|
457 |
+
#ecwd-settings input[type="submit"] {
|
458 |
background: #0074A2;
|
459 |
color: #ffffff;
|
460 |
font-weight: bold;
|
465 |
height: auto;
|
466 |
}
|
467 |
|
468 |
+
#ecwd_event_meta .checkbox-div label,
|
469 |
+
#ecwd-settings .checkbox-div label {
|
|
|
470 |
cursor: pointer;
|
471 |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
472 |
filter: alpha(opacity=0);
|
481 |
left: 2px;
|
482 |
}
|
483 |
|
484 |
+
#ecwd_calendar_meta .add_event_plus {
|
485 |
+
display: inline-block;
|
486 |
+
width: 18px;
|
487 |
+
height: 18px;
|
488 |
+
border-radius: 100%;
|
489 |
+
background: #0074A2;
|
490 |
+
color: #ffffff;
|
491 |
+
text-shadow: 1px -1px 2px #005C82;
|
492 |
+
margin-left: 8px;
|
493 |
+
text-align: center;
|
494 |
font-weight: bold;
|
495 |
font-size: 15px;
|
496 |
line-height: 17px;
|
497 |
}
|
498 |
+
|
499 |
+
#ecwd_calendar_meta .ecwd-calendar-event-add a:focus {
|
500 |
+
box-shadow: none;
|
501 |
}
|
502 |
+
|
503 |
+
#ecwd_event_meta .repeat_format {
|
504 |
width: 90px;
|
505 |
display: inline-block;
|
506 |
}
|
507 |
+
|
508 |
+
#ecwd_event_meta .repeat_format_monthly {
|
509 |
width: 66px;
|
510 |
display: inline-block;
|
511 |
}
|
512 |
+
|
513 |
+
#ecwd_event_meta #ecwd_event_year_month {
|
514 |
margin: 10px 0 0 95px;
|
515 |
}
|
516 |
+
|
517 |
+
#ecwd_event_meta #ecwd_choose_day_container {
|
518 |
margin-top: 10px;
|
519 |
}
|
520 |
+
|
521 |
+
#ecwd_event_meta #ecwd_choose_day_container .checkbox-div {
|
522 |
margin-left: 0px;
|
523 |
}
|
524 |
+
|
525 |
+
#ecwd_event_meta .ecwd_repeat_advanced input[type="text"],
|
526 |
+
#ecwd_event_meta .ecwd_repeat_advanced select {
|
527 |
width: auto;
|
528 |
}
|
529 |
|
530 |
#ecwd_event_meta #ecwd_monthly,
|
531 |
+
#ecwd_event_meta .ecwd_event_repeat_event_div {
|
532 |
+
margin: 10px 0;
|
533 |
+
}
|
534 |
+
|
535 |
+
#ecwd_event_meta .select_to_enable_disable {
|
536 |
+
width: 122px !important;
|
537 |
+
}
|
538 |
+
|
539 |
+
#ecwd_event_organizers_meta .ecwd-add-organizer-form {
|
540 |
+
padding-top: 10px;
|
541 |
+
}
|
542 |
+
|
543 |
+
#ecwd_event_organizers_meta .ecwd-organizers-list {
|
544 |
+
margin-top: 15px;
|
545 |
+
max-height: 250px;
|
546 |
+
overflow-y: scroll;
|
547 |
+
overflow-x: auto;
|
548 |
+
}
|
549 |
+
|
550 |
+
#ecwd_event_organizers_meta .ecwd-add-organizer-form input,
|
551 |
+
#ecwd_event_meta .ecwd-venue-meta-fields #ecwd_venue_content,
|
552 |
+
#ecwd_event_organizers_meta .ecwd-add-organizer-form textarea {
|
553 |
+
width: 250px;
|
554 |
}
|
555 |
|
556 |
+
#ecwd_event_organizers_meta .ecwd-add-organizer-form #ecwd-add-organizer-content,
|
557 |
+
#ecwd_event_meta .ecwd-venue-meta-fields #ecwd_venue_content{
|
558 |
+
height: 100px;
|
559 |
}
|
560 |
|
561 |
+
#ecwd_event_organizers_meta .ecwd-add-organizer-form > div {
|
562 |
+
margin-top: 5px;
|
563 |
+
}
|
564 |
+
|
565 |
+
#ecwd_theme_meta label,
|
566 |
+
#ecwd_organizer_meta label,
|
567 |
+
#ecwd_venue_meta label {
|
568 |
+
display: inline-block;
|
569 |
+
width: 290px;
|
570 |
+
font-weight: normal;
|
571 |
+
font-size: 15px;
|
572 |
+
}
|
573 |
+
|
574 |
+
#ecwd_event_meta .ecwd-venue-meta-fields .ecwd-meta-field > label{
|
575 |
display:inline-block;
|
576 |
+
width: 150px;
|
577 |
font-weight: normal;
|
578 |
font-size: 15px;
|
579 |
}
|
580 |
|
581 |
+
|
582 |
+
.ecwd-admin-fields .ecwd-add-organizer-form label {
|
583 |
+
display: inline-block;
|
584 |
+
width: 130px;
|
585 |
+
font-weight: normal;
|
586 |
+
font-size: 15px;
|
587 |
}
|
588 |
+
|
589 |
+
#ecwd_theme_meta .ecwd-tab-inner > div {
|
590 |
+
margin: 20px 0;
|
591 |
}
|
592 |
+
|
593 |
+
#ecwd_theme_meta .ecwd-tab-inner > div:first-child {
|
594 |
+
margin-top: 0;
|
595 |
+
}
|
596 |
+
|
597 |
#ecwd_theme_meta .with_ecwd_color:after,
|
598 |
#ecwd-settings-content .ecwd-addons_updates:after,
|
599 |
#ecwd-settings-content .main-plugin:after,
|
600 |
+
#ecwd-settings-content:after {
|
601 |
+
content: '';
|
602 |
+
display: table;
|
603 |
+
clear: both;
|
604 |
}
|
605 |
+
|
606 |
+
#ecwd_theme_meta .with_ecwd_color label {
|
607 |
float: left;
|
608 |
margin-top: 5px;
|
609 |
width: 293px;
|
610 |
}
|
611 |
+
|
612 |
+
#ecwd_theme_meta .with_ecwd_color > div {
|
613 |
float: left;
|
614 |
}
|
615 |
+
|
616 |
+
.ecwd-import-settings form {
|
617 |
+
float: left;
|
618 |
+
width: 45%;
|
619 |
}
|
620 |
+
|
621 |
+
.ecwd-import-settings input[type=file] {
|
622 |
margin: 10px 0;
|
623 |
}
|
624 |
+
|
625 |
+
.ecwd-import-settings .ecwd-calendar-event-import {
|
626 |
font-size: 15px;
|
627 |
}
|
628 |
|
629 |
+
#ecwd-settings-content #add_on_title {
|
630 |
+
margin-bottom: 20px;
|
631 |
}
|
632 |
|
633 |
#ecwd-settings-content .ecwd_coming_soon {
|
635 |
top: 44px;
|
636 |
left: 0;
|
637 |
}
|
638 |
+
|
639 |
+
#ecwd-settings-content .ecwd-add-on a {
|
640 |
text-decoration: none;
|
641 |
}
|
642 |
+
|
643 |
+
#ecwd-settings-content .ecwd-add-on h2 {
|
644 |
color: #229DBF;
|
645 |
font-size: 16px;
|
646 |
margin-bottom: 9px;
|
647 |
padding: 0 0 7px;
|
648 |
line-height: 1.2;
|
649 |
}
|
650 |
+
|
651 |
+
#ecwd-settings-content .ecwd-addon-descr {
|
652 |
font-size: 13px;
|
653 |
line-height: 18px;
|
654 |
height: 100%;
|
676 |
-webkit-box-sizing: border-box;
|
677 |
-moz-box-sizing: border-box;
|
678 |
}
|
679 |
+
|
680 |
.grid figcaption {
|
681 |
position: absolute;
|
682 |
top: 0;
|
685 |
background: #2c3f52;
|
686 |
color: #ed4e6e;
|
687 |
}
|
688 |
+
|
689 |
#ecwd-settings-content .ecwd-addon,
|
690 |
+
#ecwd-settings-content .ecwd-addon-price {
|
691 |
display: inline-block;
|
692 |
margin-top: 15px;
|
693 |
font-size: 15px;
|
694 |
border: 1px solid #DCDCDC;
|
695 |
font-weight: bold;
|
696 |
}
|
697 |
+
|
698 |
+
#ecwd-settings-content .ecwd-addon {
|
699 |
background: #FFFFFF url(../images/Add_Ons.jpg) no-repeat 6px center;
|
700 |
color: #66686B;
|
701 |
padding: 9px 12px 9px 45px;
|
704 |
-webkit-box-sizing: border-box;
|
705 |
-moz-box-sizing: border-box;
|
706 |
}
|
707 |
+
|
708 |
+
#ecwd-settings-content .ecwd-addon-price {
|
709 |
background: #FFFFFF;
|
710 |
color: #229CBF;
|
711 |
padding: 9px 12px;
|
712 |
}
|
713 |
+
|
714 |
#ecwd-settings-content .ecwd-add-on:hover .ecwd-addon-price,
|
715 |
+
#ecwd-settings-content .ecwd-addon-price:hover {
|
716 |
background: #229CBF;
|
717 |
color: #DDECF1;
|
718 |
}
|
719 |
+
|
720 |
#ecwd-settings-content .ecwd-add-on:hover .ecwd-addon,
|
721 |
+
#ecwd-settings-content .ecwd-addon:hover {
|
722 |
background: #23282D url(../images/Add_Ons_hover.jpg) no-repeat 6px center;
|
723 |
color: #DDDEDE;
|
724 |
}
|
725 |
+
|
726 |
+
#ecwd-settings-content .ecwd-addon span {
|
727 |
border-left: 1px solid #A7A9AB;
|
728 |
padding: 4px 10px 4px 10px;
|
729 |
}
|
730 |
+
|
731 |
+
#ecwd-settings-content .ecwd-addon-descr span {
|
732 |
padding: 5px 0 5px 10px;
|
733 |
border-left: 1px solid #93CEE0;
|
734 |
}
|
735 |
+
|
736 |
+
#ecwd-settings-content a:focus {
|
737 |
+
outline: none;
|
738 |
+
box-shadow: none;
|
739 |
}
|
740 |
+
|
741 |
+
#ecwd-settings-content .ecwd-add-on {
|
742 |
+
width: 310px;
|
743 |
height: 320px;
|
744 |
+
float: left;
|
745 |
+
margin-right: 40px;
|
746 |
+
margin-bottom: 40px;
|
747 |
-webkit-perspective: 1700px;
|
748 |
-moz-perspective: 1700px;
|
749 |
perspective: 1700px;
|
752 |
perspective-origin: 0 50%;
|
753 |
position: relative;
|
754 |
}
|
755 |
+
|
756 |
+
#ecwd-settings-content .main-plugin .ecwd-add-on {
|
757 |
float: left;
|
758 |
margin-right: 25px;
|
759 |
height: auto;
|
760 |
}
|
761 |
+
|
762 |
+
#ecwd-settings-content .ecwd-figure {
|
763 |
-webkit-transform-style: preserve-3d;
|
764 |
-moz-transform-style: preserve-3d;
|
765 |
transform-style: preserve-3d;
|
766 |
position: relative;
|
767 |
+
width: 100%;
|
768 |
height: 232px;
|
769 |
margin: 0;
|
770 |
}
|
771 |
+
|
772 |
+
#ecwd-settings-content .ecwd-figure-img {
|
773 |
overflow: hidden;
|
774 |
}
|
775 |
+
|
776 |
+
#ecwd-settings-content .ecwd-figure-img img {
|
777 |
-webkit-transition: -webkit-transform 0.4s;
|
778 |
-moz-transition: -moz-transform 0.4s;
|
779 |
transition: transform 0.4s;
|
780 |
}
|
781 |
+
|
782 |
+
#ecwd-settings-content .ecwd-figure:hover img {
|
783 |
-webkit-transform: translateX(25%);
|
784 |
-moz-transform: translateX(25%);
|
785 |
-ms-transform: translateX(25%);
|
786 |
transform: translateX(25%);
|
787 |
}
|
788 |
+
|
789 |
+
#ecwd-settings-content .ecwd-figure:hover figcaption {
|
790 |
opacity: 1;
|
791 |
-webkit-transform: rotateY(0deg);
|
792 |
-moz-transform: rotateY(0deg);
|
795 |
-moz-transition: -moz-transform 0.4s, opacity 0.1s;
|
796 |
transition: transform 0.4s, opacity 0.1s;
|
797 |
}
|
798 |
+
|
799 |
#ecwd-settings-content .ecwd-addon-subtitle {
|
800 |
font-size: 25px;
|
801 |
border-bottom: 1px solid #C1C4C7;
|
802 |
padding-bottom: 23px;
|
803 |
}
|
804 |
+
|
805 |
#ecwd-settings-content .main-plugin .main-plugin-img {
|
806 |
float: left;
|
807 |
margin-right: 2%;
|
808 |
width: 26%;
|
809 |
}
|
810 |
+
|
811 |
+
#ecwd-settings-content .main-plugin .main-plugin-img img {
|
812 |
+
max-width: 100%;
|
813 |
}
|
814 |
+
|
815 |
#ecwd-settings-content .main-plugin .main-plugin-info {
|
816 |
float: left;
|
817 |
}
|
818 |
+
|
819 |
#ecwd-settings-content .main-plugin {
|
820 |
margin-bottom: 25px;
|
821 |
}
|
822 |
+
|
823 |
#ecwd-settings-content .main-plugin_desc-cont p,
|
824 |
#ecwd-settings-content .main-plugin_desc-cont {
|
825 |
font-size: 14px;
|
826 |
}
|
827 |
+
|
828 |
+
#ecwd-settings-content .main-plugin-desc-info p {
|
829 |
margin: 2px 0 13px;
|
830 |
}
|
831 |
+
|
832 |
+
#ecwd-settings-content .ecwd-addons_updates .main-plugin-desc-info p {
|
833 |
margin: 2px 0 4px;
|
834 |
}
|
835 |
+
|
836 |
#ecwd-settings-content .main-plugin-desc {
|
837 |
margin-bottom: 12px;
|
838 |
}
|
839 |
+
|
840 |
#ecwd-settings-content .main-plugin-info h2 {
|
841 |
padding: 0;
|
842 |
line-height: 1;
|
843 |
margin-bottom: 14px;
|
844 |
}
|
845 |
+
|
846 |
#ecwd-settings-content .main-plugin-info h2 a {
|
847 |
color: #323A45;
|
848 |
text-decoration: none;
|
849 |
font-weight: bold;
|
850 |
}
|
851 |
+
|
852 |
#ecwd-settings-content .main-plugin-desc-info {
|
853 |
border-bottom: 1px solid #C0C4C7;
|
854 |
width: 71%;
|
855 |
}
|
856 |
+
|
857 |
#ecwd-settings-content .ecwd-addons_updates .main-plugin-desc-info {
|
858 |
border-bottom: 0;
|
859 |
width: 100%;
|
860 |
}
|
861 |
+
|
862 |
+
#ecwd-settings-content .update-info {
|
863 |
+
background: url(../../assets/updates_icon.jpg) no-repeat;
|
864 |
+
padding-left: 25px;
|
865 |
color: #bc0b0b;
|
866 |
}
|
867 |
+
|
868 |
#ecwd-settings-content .ecwd-addons_updates .ecwd-figure {
|
869 |
margin-bottom: 10px;
|
870 |
}
|
871 |
+
|
872 |
#ecwd-settings-content .ecwd-addons_updates .ecwd-addon-descr-update {
|
873 |
border-top: 1px solid #898989;
|
874 |
padding-top: 6px;
|
875 |
}
|
876 |
+
|
877 |
+
#ecwd-settings-content .ecwd-addons_updates h2 {
|
878 |
color: #323A45;
|
879 |
text-decoration: none;
|
880 |
font-weight: bold;
|
882 |
padding-bottom: 0;
|
883 |
margin-bottom: 0;
|
884 |
}
|
885 |
+
|
886 |
.ecwd_more_updates {
|
887 |
display: none;
|
888 |
}
|
889 |
+
|
890 |
/*mail*/
|
891 |
+
ul.ecwd_list_container {
|
892 |
border: 1px solid #ddd;
|
893 |
padding: 15px 20px;
|
894 |
}
|
895 |
+
|
896 |
+
ul.ecwd_list_container li.ecwd_list_head {
|
897 |
border-bottom: 1px solid #ddd;
|
898 |
padding-bottom: 10px;
|
899 |
+
font-size: 18px;
|
900 |
}
|
901 |
+
|
902 |
+
ul.ecwd_list_container li.ecwd_list div {
|
903 |
+
display: inline-block;
|
904 |
}
|
905 |
+
|
906 |
+
#mail_template_list .mail_name {
|
907 |
+
width: 90%;
|
908 |
}
|
909 |
|
910 |
+
body.wp-admin.post-type-ecwd_event #posts-filter .alignleft.actions a.button {
|
911 |
+
display: inline-block;
|
912 |
margin: 0;
|
913 |
}
|
914 |
|
925 |
vertical-align: middle;
|
926 |
width: 98%;
|
927 |
}
|
928 |
+
|
929 |
.ecwd_topic.wd_topic .wd_help_topic {
|
930 |
float: left;
|
931 |
}
|
932 |
+
|
933 |
.ecwd_topic.wd_topic .wd_help_topic a {
|
934 |
color: #e54b26;
|
935 |
border-bottom: 1px solid #edbeb7;
|
936 |
text-decoration: none;
|
937 |
}
|
938 |
+
|
939 |
.ecwd_topic.wd_topic .wd_help_topic a:hover {
|
940 |
color: #e54b26;
|
941 |
}
|
942 |
+
|
943 |
.ecwd_topic.wd_topic .wd_support {
|
944 |
float: right;
|
945 |
margin: 0 10px;
|
946 |
}
|
947 |
+
|
948 |
.ecwd_topic.wd_topic .wd_support img {
|
949 |
vertical-align: middle;
|
950 |
}
|
951 |
+
|
952 |
.ecwd_topic.wd_topic .wd_support a {
|
953 |
text-decoration: none;
|
954 |
color: #6E7990;
|
955 |
}
|
956 |
+
|
957 |
.ecwd_topic.wd_topic .wd_pro {
|
958 |
float: right;
|
959 |
padding: 0;
|
960 |
}
|
961 |
+
|
962 |
.ecwd_topic.wd_topic .wd_pro a {
|
963 |
border: none;
|
964 |
box-shadow: none !important;
|
965 |
text-decoration: none;
|
966 |
}
|
967 |
+
|
968 |
.ecwd_topic.wd_topic .wd_pro img {
|
969 |
border: none;
|
970 |
display: inline-block;
|
971 |
vertical-align: middle;
|
972 |
}
|
973 |
+
|
974 |
.ecwd_topic.wd_topic .wd_pro a,
|
975 |
.ecwd_topic.wd_topic .wd_pro a:active,
|
976 |
.ecwd_topic.wd_topic .wd_pro a:visited,
|
css/admin/licensing.css
CHANGED
@@ -21,17 +21,17 @@ div#featurs_table1 {
|
|
21 |
}
|
22 |
|
23 |
div#featurs_table1 span::after {
|
24 |
-
background-image: url("../images/featured/arrow3.png")
|
25 |
-
background-position: center center
|
26 |
-
background-repeat: no-repeat
|
27 |
-
content: ""
|
28 |
-
display: inline-block
|
29 |
-
float: right
|
30 |
-
height: 37px
|
31 |
-
position: relative
|
32 |
-
right: -21px
|
33 |
-
top: -8px
|
34 |
-
width: 26px
|
35 |
}
|
36 |
|
37 |
div#featurs_table1 span {
|
@@ -123,17 +123,29 @@ div#featurs_table3 {
|
|
123 |
width: 180px;
|
124 |
}
|
125 |
|
126 |
-
div#featurs_table2 span.yes,
|
127 |
-
div#featurs_table3 span.yes {
|
128 |
-
background-image: url("../images/featured/plus.png")
|
129 |
-
background-position: center center
|
130 |
-
background-repeat: no-repeat
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
}
|
132 |
|
133 |
-
span.no {
|
134 |
-
background-image: url("../images/featured/minus.png")
|
135 |
-
background-position: center center
|
136 |
-
background-repeat: no-repeat
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
}
|
138 |
|
139 |
.download input[type="submit"]:hover,
|
21 |
}
|
22 |
|
23 |
div#featurs_table1 span::after {
|
24 |
+
/*background-image: url("../images/featured/arrow3.png");*/
|
25 |
+
/*background-position: center center;*/
|
26 |
+
/*background-repeat: no-repeat;*/
|
27 |
+
/*content: "";*/
|
28 |
+
/*display: inline-block;*/
|
29 |
+
/*float: right;*/
|
30 |
+
/*height: 37px;*/
|
31 |
+
/*position: relative;*/
|
32 |
+
/*right: -21px;*/
|
33 |
+
/*top: -8px;*/
|
34 |
+
/*width: 26px;*/
|
35 |
}
|
36 |
|
37 |
div#featurs_table1 span {
|
123 |
width: 180px;
|
124 |
}
|
125 |
|
126 |
+
div#featurs_table2 span.yes:before,
|
127 |
+
div#featurs_table3 span.yes:before {
|
128 |
+
/*background-image: url("../images/featured/plus.png");*/
|
129 |
+
/*background-position: center center;*/
|
130 |
+
/*background-repeat: no-repeat;*/
|
131 |
+
|
132 |
+
content: '\2714';
|
133 |
+
color: #84B676;
|
134 |
+
font-size: 20px;
|
135 |
+
line-height: 18px;
|
136 |
+
|
137 |
}
|
138 |
|
139 |
+
span.no:before {
|
140 |
+
/*background-image: url("../images/featured/minus.png");*/
|
141 |
+
/*background-position: center center;*/
|
142 |
+
/*background-repeat: no-repeat;*/
|
143 |
+
|
144 |
+
content: '\2212';
|
145 |
+
color: #B60B0B;
|
146 |
+
font-size: 25px;
|
147 |
+
line-height: 18px;
|
148 |
+
|
149 |
}
|
150 |
|
151 |
.download input[type="submit"]:hover,
|
css/style.css
CHANGED
@@ -34,7 +34,7 @@
|
|
34 |
margin-bottom: 5px;
|
35 |
}
|
36 |
|
37 |
-
.ecwd_calendar .metainfo,
|
38 |
.ecwd_countdown_info .metainfo{
|
39 |
padding-left: 26px;
|
40 |
}
|
@@ -144,11 +144,11 @@ table.cal_blue.ecwd_calendar_container .day-with-date, table.cal_blue.ecwd_calen
|
|
144 |
font-size: 1.4em;
|
145 |
}
|
146 |
|
147 |
-
.ecwd_calendar img{
|
148 |
margin-left:inherit !important;
|
149 |
}
|
150 |
|
151 |
-
.ecwd_calendar {
|
152 |
font-family: Sans-serif;
|
153 |
max-width: 100%;
|
154 |
width: 100%;
|
@@ -157,13 +157,18 @@ table.cal_blue.ecwd_calendar_container .day-with-date, table.cal_blue.ecwd_calen
|
|
157 |
border: 0px solid transparent;
|
158 |
}
|
159 |
|
160 |
-
.
|
|
|
|
|
|
|
|
|
|
|
161 |
list-style: none !important;
|
162 |
list-style-image: none !important;
|
163 |
margin: 0 !important;
|
164 |
padding: 0 !important;
|
165 |
}
|
166 |
-
.ecwd_calendar .filter-container{
|
167 |
/*width: 90%;*/
|
168 |
overflow:hidden;
|
169 |
position: relative;
|
@@ -323,7 +328,7 @@ div.ecwd-page-full .has-events ul.more_events > li div.event-details {
|
|
323 |
}
|
324 |
|
325 |
|
326 |
-
.ecwd_calendar td{
|
327 |
padding:1px !important;
|
328 |
border: solid #D6DDE2;
|
329 |
border-width: 0 1px 1px 0;
|
@@ -447,13 +452,13 @@ div.ecwd-page-full table.cal_blue ul.events > li img{
|
|
447 |
div.ecwd-page-full table.cal_blue ul.events > li:last-child {
|
448 |
border-bottom:0px;
|
449 |
}
|
450 |
-
.ecwd_calendar div.event-details {
|
451 |
font-size: 14px;
|
452 |
font-style: italic;
|
453 |
width: 340px;
|
454 |
line-height: 1.3;
|
455 |
}
|
456 |
-
.ecwd_calendar.ecwd-widget-mini div.event-details {
|
457 |
max-width: 100% !important;
|
458 |
}
|
459 |
@media only screen and (max-width: 768px){
|
@@ -482,7 +487,7 @@ div.ecwd-page-full table.cal_blue ul.events > li:last-child {
|
|
482 |
table.cal_blue.ecwd_calendar_container .normal-day-heading, table.cal_blue.ecwd_calendar_container .weekend-heading {
|
483 |
font-size: 1.4em;
|
484 |
}
|
485 |
-
.ecwd_calendar.ecwd-page-full div.event-details {
|
486 |
font-size: 1.15em !important;
|
487 |
width: 100%;
|
488 |
padding-bottom: 20px;
|
@@ -494,7 +499,7 @@ div.ecwd-page-full table.cal_blue ul.events > li:last-child {
|
|
494 |
table.cal_blue.mini {
|
495 |
width: 100%;
|
496 |
}
|
497 |
-
.ecwd_calendar.ecwd-widget-mini {
|
498 |
float: none;
|
499 |
margin: 0 auto;
|
500 |
width: 100%;
|
@@ -556,8 +561,10 @@ table.cal_blue.mini {
|
|
556 |
content:none;
|
557 |
}
|
558 |
|
559 |
-
.ecwd-widget-mini .event-container,
|
560 |
-
.ecwd-widget-mini .
|
|
|
|
|
561 |
padding: 0 4px 0px !important;
|
562 |
overflow: hidden;
|
563 |
}
|
@@ -643,26 +650,34 @@ table.cal_blue.mini td ul li {
|
|
643 |
table.cal_blue.mini td ul li:last-child {
|
644 |
margin-right: 0 !important;
|
645 |
}
|
646 |
-
table.cal_blue.mini .previous,
|
|
|
|
|
|
|
647 |
float:none;
|
648 |
}
|
649 |
-
table.cal_blue.mini .previous span,
|
|
|
|
|
|
|
650 |
font-size:1em;
|
651 |
line-height:22px;
|
652 |
}
|
653 |
-
.ecwd_calendar .month-name{
|
654 |
display:none;
|
655 |
}
|
656 |
-
.ecwd_calendar .ecwd_calendar_prev_next{
|
657 |
text-align: center;
|
658 |
box-shadow: 0px 11px 17px rgba(0,0,0,0.2);
|
659 |
z-index: 3;
|
660 |
position: relative;
|
661 |
}
|
662 |
-
table.cal_blue.mini .previous,
|
|
|
663 |
left:0px;
|
664 |
}
|
665 |
-
table.cal_blue.mini .next,
|
|
|
666 |
right:0px;
|
667 |
}
|
668 |
table.cal_blue.mini .normal-day-heading, table.cal_blue.mini .weekend-heading {
|
@@ -828,7 +843,13 @@ table.cal_blue.ecwd_calendar_container select {
|
|
828 |
position: relative;
|
829 |
}
|
830 |
|
831 |
-
.ecwd_calendar_view_tabs:after
|
|
|
|
|
|
|
|
|
|
|
|
|
832 |
.ecwd-time:after,.ecwd-date:after,.ecwd-detalis:before,.ecwd-location:before,.ecwd-location:after,.ecwd-event-header:after,.ecwd_calendar.ecwd-page-full div.event-details:after,.event-details:after,.ecwd-social ul:after,.ecwd-organizer-events ul:after,.ecwd-venue-events ul:after,.event-content:after,.ecwd_countdown:after,.ecwd-poster-board .ecwd-poster-item .ecwd-event-content:after{
|
833 |
content:'';
|
834 |
display:table;
|
@@ -956,7 +977,7 @@ table.cal_blue.ecwd_calendar_container select {
|
|
956 |
background: url(images/date.png) no-repeat;
|
957 |
}
|
958 |
|
959 |
-
.ecwd_calendar .metainfo,
|
960 |
.ecwd_countdown_info .metainfo,
|
961 |
.event-detalis span, .event-detalis a{
|
962 |
display: inline-block;
|
@@ -973,8 +994,8 @@ table.cal_blue.ecwd_calendar_container select {
|
|
973 |
float:none;
|
974 |
}
|
975 |
|
976 |
-
.ecwd_calendar .filter-arrow-right,
|
977 |
-
.ecwd_calendar .filter-arrow-left{
|
978 |
position: absolute;
|
979 |
top:0;
|
980 |
height:100%;
|
@@ -991,20 +1012,20 @@ table.cal_blue.ecwd_calendar_container select {
|
|
991 |
line-height: 32px;
|
992 |
}
|
993 |
|
994 |
-
.ecwd_calendar .ecwd_calendar_filters .filter-arrow-right,
|
995 |
-
.ecwd_calendar .ecwd_calendar_filters .filter-arrow-left{
|
996 |
line-height: 20px;
|
997 |
height: 40px;
|
998 |
margin-top: 1px;
|
999 |
}
|
1000 |
|
1001 |
-
.ecwd_calendar .filter-arrow-right{
|
1002 |
right:0;
|
1003 |
}
|
1004 |
-
.ecwd_calendar .filter-arrow-left{
|
1005 |
top:0;
|
1006 |
}
|
1007 |
-
.ecwd_calendar .filter-container li{
|
1008 |
position: relative;
|
1009 |
left:0;
|
1010 |
margin: 0 !important;
|
@@ -1056,19 +1077,19 @@ table.cal_blue.ecwd_calendar_container select {
|
|
1056 |
background-repeat: no-repeat;
|
1057 |
}
|
1058 |
|
1059 |
-
.ecwd_calendar .filter-container:after{
|
1060 |
content:'';
|
1061 |
display:table;
|
1062 |
clear:both;
|
1063 |
}
|
1064 |
|
1065 |
-
.ecwd_calendar div:focus,
|
1066 |
-
.ecwd_calendar a:focus,
|
1067 |
-
.ecwd_calendar a:active{
|
1068 |
outline:0;
|
1069 |
}
|
1070 |
|
1071 |
-
.ecwd_calendar a{
|
1072 |
text-decoration:none !important;
|
1073 |
}
|
1074 |
.ecwd-widget-mini .calendar-head{
|
@@ -1127,7 +1148,7 @@ table.cal_blue.ecwd_calendar_container select {
|
|
1127 |
}
|
1128 |
|
1129 |
|
1130 |
-
.ecwd_calendar td .day-number{
|
1131 |
line-height: 1;
|
1132 |
}
|
1133 |
|
@@ -1314,18 +1335,18 @@ div[class^="ecwd-page-"].ecwd_calendar .ecwd-week-date.resp{
|
|
1314 |
|
1315 |
/*#############LIST,WEEK VIEW###############*/
|
1316 |
|
1317 |
-
.ecwd_calendar .ecwd_list > li,
|
1318 |
-
.ecwd_calendar .day4-event-list > li,
|
1319 |
-
.ecwd_calendar .day-event-list > li,
|
1320 |
-
.ecwd_calendar .week-event-list > li{
|
1321 |
border:1px solid #D5DCE2;
|
1322 |
margin-bottom:1px !important;
|
1323 |
clear: both;
|
1324 |
}
|
1325 |
-
.ecwd_calendar .week-event-list .ecwd-list-img,
|
1326 |
-
.ecwd_calendar .day4-event-list .ecwd-list-img,
|
1327 |
-
.ecwd_calendar .day-event-list .ecwd-list-img,
|
1328 |
-
.ecwd_calendar .ecwd_list .ecwd-list-img{
|
1329 |
width:200px;
|
1330 |
float: left;
|
1331 |
margin: 0px 10px 5px 0px !important;
|
@@ -1333,26 +1354,26 @@ div[class^="ecwd-page-"].ecwd_calendar .ecwd-week-date.resp{
|
|
1333 |
border-bottom: 1px solid #D5DCE2;
|
1334 |
|
1335 |
}
|
1336 |
-
.ecwd_calendar .day4-event-list .ecwd-list-img-container,
|
1337 |
-
.ecwd_calendar .ecwd_list .ecwd-list-img-container,
|
1338 |
-
.ecwd_calendar .day-event-list .ecwd-list-img-container,
|
1339 |
-
.ecwd_calendar .week-event-list .ecwd-list-img-container{
|
1340 |
padding: 0 1px 1px 0 !important;
|
1341 |
}
|
1342 |
-
.ecwd_calendar .day4-event-list .ecwd-list-img-container img,
|
1343 |
-
.ecwd_calendar .week-event-list .ecwd-list-img-container img,
|
1344 |
-
.ecwd_calendar .day-event-list .ecwd-list-img-container img,
|
1345 |
-
.ecwd_calendar .ecwd_list .ecwd-list-img-container img{
|
1346 |
margin-top: 1px;
|
1347 |
max-width: 100%;
|
1348 |
width: 100%;
|
1349 |
height: auto;
|
1350 |
}
|
1351 |
|
1352 |
-
.ecwd_calendar .ecwd_list .event-content,
|
1353 |
-
.ecwd_calendar .day4-event-list .event-content,
|
1354 |
-
.ecwd_calendar .day-event-list .event-content,
|
1355 |
-
.ecwd_calendar .week-event-list .event-content{
|
1356 |
padding:0px 10px 10px !important;
|
1357 |
font-size: 15px;
|
1358 |
}
|
@@ -1428,11 +1449,13 @@ div[class^="ecwd-page-"].ecwd_calendar .ecwd-week-date.resp{
|
|
1428 |
width: 0 !important;
|
1429 |
border: 0 !important;
|
1430 |
}
|
1431 |
-
.ecwd-no-image.event-container
|
|
|
|
|
1432 |
padding: 0 10px 10px !important;
|
1433 |
}
|
1434 |
|
1435 |
-
.ecwd_calendar .ecwd-no-image .event-content,
|
1436 |
.ecwd_calendar.ecwd-widget-mini .event-content,
|
1437 |
.ecwd_calendar.ecwd-widget-mini .ecwd_list li{
|
1438 |
padding: 0 !important;
|
@@ -1519,9 +1542,12 @@ div[class^="ecwd-page-"].ecwd_calendar .ecwd-week-date.resp{
|
|
1519 |
.event-detalis .event-detalis-org,.event-detalis .event-venue{
|
1520 |
padding-left: 0px;
|
1521 |
}
|
1522 |
-
|
|
|
|
|
1523 |
color: #010101 !important;
|
1524 |
}
|
|
|
1525 |
.event-main-content .event-organizers,.event-main-content .event-venue{
|
1526 |
margin: 0px 0 5px 10px;
|
1527 |
min-height: 20px;
|
@@ -2389,7 +2415,8 @@ a.ecwd-google-plus{
|
|
2389 |
border-left:0;
|
2390 |
}
|
2391 |
|
2392 |
-
.ecwd_calendar .filter-arrow-right,
|
|
|
2393 |
line-height: 22px;
|
2394 |
}
|
2395 |
|
@@ -2685,7 +2712,7 @@ table.ecwd_calendar_container > tbody > tr >td{
|
|
2685 |
.ecwd_events_date{
|
2686 |
font-size:15px
|
2687 |
}
|
2688 |
-
.ecwd_calendar .filter-container{
|
2689 |
direction: ltr;
|
2690 |
float:left;
|
2691 |
}
|
@@ -2696,6 +2723,33 @@ table.ecwd_calendar_container > tbody > tr >td{
|
|
2696 |
cursor: pointer;
|
2697 |
}
|
2698 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2699 |
.ecwd_map_div, .ecwd_map_div span{
|
2700 |
color:black;
|
2701 |
}
|
34 |
margin-bottom: 5px;
|
35 |
}
|
36 |
|
37 |
+
.calendar_main .ecwd_calendar .metainfo,
|
38 |
.ecwd_countdown_info .metainfo{
|
39 |
padding-left: 26px;
|
40 |
}
|
144 |
font-size: 1.4em;
|
145 |
}
|
146 |
|
147 |
+
.calendar_main .ecwd_calendar img{
|
148 |
margin-left:inherit !important;
|
149 |
}
|
150 |
|
151 |
+
.calendar_main .ecwd_calendar {
|
152 |
font-family: Sans-serif;
|
153 |
max-width: 100%;
|
154 |
width: 100%;
|
157 |
border: 0px solid transparent;
|
158 |
}
|
159 |
|
160 |
+
.calendar_main .ecwd_calendar .ecwd_calendar_container> ul,
|
161 |
+
.calendar_main .ecwd_calendar .ecwd_calendar_container>ul >li,
|
162 |
+
.calendar_main .ecwd_calendar .ecwd_calendar_container> ul.ecwd_list >li,
|
163 |
+
.calendar_main .ecwd_calendar .ecwd_calendar_container> ul.week-event-list >li,
|
164 |
+
.calendar_main .ecwd_calendar .ecwd_calendar_container> ul.day-event-list >li,
|
165 |
+
.calendar_main .ecwd_calendar .ecwd_calendar_container>ul.day4-event-list> li{
|
166 |
list-style: none !important;
|
167 |
list-style-image: none !important;
|
168 |
margin: 0 !important;
|
169 |
padding: 0 !important;
|
170 |
}
|
171 |
+
.calendar_main .ecwd_calendar .filter-container{
|
172 |
/*width: 90%;*/
|
173 |
overflow:hidden;
|
174 |
position: relative;
|
328 |
}
|
329 |
|
330 |
|
331 |
+
.calendar_main .ecwd_calendar td{
|
332 |
padding:1px !important;
|
333 |
border: solid #D6DDE2;
|
334 |
border-width: 0 1px 1px 0;
|
452 |
div.ecwd-page-full table.cal_blue ul.events > li:last-child {
|
453 |
border-bottom:0px;
|
454 |
}
|
455 |
+
.calendar_main .ecwd_calendar div.event-details {
|
456 |
font-size: 14px;
|
457 |
font-style: italic;
|
458 |
width: 340px;
|
459 |
line-height: 1.3;
|
460 |
}
|
461 |
+
.calendar_main .ecwd_calendar.ecwd-widget-mini div.event-details {
|
462 |
max-width: 100% !important;
|
463 |
}
|
464 |
@media only screen and (max-width: 768px){
|
487 |
table.cal_blue.ecwd_calendar_container .normal-day-heading, table.cal_blue.ecwd_calendar_container .weekend-heading {
|
488 |
font-size: 1.4em;
|
489 |
}
|
490 |
+
.calendar_main .ecwd_calendar.ecwd-page-full div.event-details {
|
491 |
font-size: 1.15em !important;
|
492 |
width: 100%;
|
493 |
padding-bottom: 20px;
|
499 |
table.cal_blue.mini {
|
500 |
width: 100%;
|
501 |
}
|
502 |
+
.calendar_main .ecwd_calendar.ecwd-widget-mini {
|
503 |
float: none;
|
504 |
margin: 0 auto;
|
505 |
width: 100%;
|
561 |
content:none;
|
562 |
}
|
563 |
|
564 |
+
.ecwd-widget-mini .event-container,
|
565 |
+
.ecwd-widget-mini .ecwd_list .event-main-content,
|
566 |
+
.ecwd-widget-mini .ecwd-no-image.event-container,
|
567 |
+
.ecwd-widget-mini .ecwd_calendar li.ecwd-no-image {
|
568 |
padding: 0 4px 0px !important;
|
569 |
overflow: hidden;
|
570 |
}
|
650 |
table.cal_blue.mini td ul li:last-child {
|
651 |
margin-right: 0 !important;
|
652 |
}
|
653 |
+
table.cal_blue.mini .previous,
|
654 |
+
table.cal_blue.mini .next,
|
655 |
+
.calendar_main .ecwd_calendar .previous,
|
656 |
+
.calendar_main .ecwd_calendar .next {
|
657 |
float:none;
|
658 |
}
|
659 |
+
table.cal_blue.mini .previous span,
|
660 |
+
table.cal_blue.mini .next span,
|
661 |
+
.calendar_main .ecwd_calendar .previous span,
|
662 |
+
.calendar_main .ecwd_calendar .next span {
|
663 |
font-size:1em;
|
664 |
line-height:22px;
|
665 |
}
|
666 |
+
.calendar_main .ecwd_calendar .month-name{
|
667 |
display:none;
|
668 |
}
|
669 |
+
.calendar_main .ecwd_calendar .ecwd_calendar_prev_next{
|
670 |
text-align: center;
|
671 |
box-shadow: 0px 11px 17px rgba(0,0,0,0.2);
|
672 |
z-index: 3;
|
673 |
position: relative;
|
674 |
}
|
675 |
+
table.cal_blue.mini .previous,
|
676 |
+
.calendar_main .ecwd_calendar .previous{
|
677 |
left:0px;
|
678 |
}
|
679 |
+
table.cal_blue.mini .next,
|
680 |
+
.calendar_main .ecwd_calendar .next {
|
681 |
right:0px;
|
682 |
}
|
683 |
table.cal_blue.mini .normal-day-heading, table.cal_blue.mini .weekend-heading {
|
843 |
position: relative;
|
844 |
}
|
845 |
|
846 |
+
.ecwd_calendar_view_tabs:after,
|
847 |
+
.ecwd-list-date-cont:after,
|
848 |
+
.calendar_main .ecwd_calendar .ecwd_list li:after,
|
849 |
+
.calendar_main .ecwd_calendar .day-event-list li:after,
|
850 |
+
.calendar_main .ecwd_calendar .day4-event-list li:after,
|
851 |
+
.calendar_main .ecwd_calendar .week-event-list li:after,
|
852 |
+
.calendar_main .ecwd_calendar .event-container:after,
|
853 |
.ecwd-time:after,.ecwd-date:after,.ecwd-detalis:before,.ecwd-location:before,.ecwd-location:after,.ecwd-event-header:after,.ecwd_calendar.ecwd-page-full div.event-details:after,.event-details:after,.ecwd-social ul:after,.ecwd-organizer-events ul:after,.ecwd-venue-events ul:after,.event-content:after,.ecwd_countdown:after,.ecwd-poster-board .ecwd-poster-item .ecwd-event-content:after{
|
854 |
content:'';
|
855 |
display:table;
|
977 |
background: url(images/date.png) no-repeat;
|
978 |
}
|
979 |
|
980 |
+
.calendar_main .ecwd_calendar .metainfo,
|
981 |
.ecwd_countdown_info .metainfo,
|
982 |
.event-detalis span, .event-detalis a{
|
983 |
display: inline-block;
|
994 |
float:none;
|
995 |
}
|
996 |
|
997 |
+
.calendar_main .ecwd_calendar .filter-arrow-right,
|
998 |
+
.calendar_main .ecwd_calendar .filter-arrow-left{
|
999 |
position: absolute;
|
1000 |
top:0;
|
1001 |
height:100%;
|
1012 |
line-height: 32px;
|
1013 |
}
|
1014 |
|
1015 |
+
.calendar_main .ecwd_calendar .ecwd_calendar_filters .filter-arrow-right,
|
1016 |
+
.calendar_main .ecwd_calendar .ecwd_calendar_filters .filter-arrow-left{
|
1017 |
line-height: 20px;
|
1018 |
height: 40px;
|
1019 |
margin-top: 1px;
|
1020 |
}
|
1021 |
|
1022 |
+
.calendar_main .ecwd_calendar .filter-arrow-right{
|
1023 |
right:0;
|
1024 |
}
|
1025 |
+
.calendar_main .ecwd_calendar .filter-arrow-left{
|
1026 |
top:0;
|
1027 |
}
|
1028 |
+
.calendar_main .ecwd_calendar .filter-container li{
|
1029 |
position: relative;
|
1030 |
left:0;
|
1031 |
margin: 0 !important;
|
1077 |
background-repeat: no-repeat;
|
1078 |
}
|
1079 |
|
1080 |
+
.calendar_main .ecwd_calendar .filter-container:after{
|
1081 |
content:'';
|
1082 |
display:table;
|
1083 |
clear:both;
|
1084 |
}
|
1085 |
|
1086 |
+
.calendar_main .ecwd_calendar div:focus,
|
1087 |
+
.calendar_main .ecwd_calendar a:focus,
|
1088 |
+
.calendar_main .ecwd_calendar a:active{
|
1089 |
outline:0;
|
1090 |
}
|
1091 |
|
1092 |
+
.calendar_main .ecwd_calendar a{
|
1093 |
text-decoration:none !important;
|
1094 |
}
|
1095 |
.ecwd-widget-mini .calendar-head{
|
1148 |
}
|
1149 |
|
1150 |
|
1151 |
+
.calendar_main .ecwd_calendar td .day-number{
|
1152 |
line-height: 1;
|
1153 |
}
|
1154 |
|
1335 |
|
1336 |
/*#############LIST,WEEK VIEW###############*/
|
1337 |
|
1338 |
+
.calendar_main .ecwd_calendar .ecwd_list > li,
|
1339 |
+
.calendar_main .ecwd_calendar .day4-event-list > li,
|
1340 |
+
.calendar_main .ecwd_calendar .day-event-list > li,
|
1341 |
+
.calendar_main .ecwd_calendar .week-event-list > li{
|
1342 |
border:1px solid #D5DCE2;
|
1343 |
margin-bottom:1px !important;
|
1344 |
clear: both;
|
1345 |
}
|
1346 |
+
.calendar_main .ecwd_calendar .week-event-list .ecwd-list-img,
|
1347 |
+
.calendar_main .ecwd_calendar .day4-event-list .ecwd-list-img,
|
1348 |
+
.calendar_main .ecwd_calendar .day-event-list .ecwd-list-img,
|
1349 |
+
.calendar_main .ecwd_calendar .ecwd_list .ecwd-list-img{
|
1350 |
width:200px;
|
1351 |
float: left;
|
1352 |
margin: 0px 10px 5px 0px !important;
|
1354 |
border-bottom: 1px solid #D5DCE2;
|
1355 |
|
1356 |
}
|
1357 |
+
.calendar_main .ecwd_calendar .day4-event-list .ecwd-list-img-container,
|
1358 |
+
.calendar_main .ecwd_calendar .ecwd_list .ecwd-list-img-container,
|
1359 |
+
.calendar_main .ecwd_calendar .day-event-list .ecwd-list-img-container,
|
1360 |
+
.calendar_main .ecwd_calendar .week-event-list .ecwd-list-img-container{
|
1361 |
padding: 0 1px 1px 0 !important;
|
1362 |
}
|
1363 |
+
.calendar_main .ecwd_calendar .day4-event-list .ecwd-list-img-container img,
|
1364 |
+
.calendar_main .ecwd_calendar .week-event-list .ecwd-list-img-container img,
|
1365 |
+
.calendar_main .ecwd_calendar .day-event-list .ecwd-list-img-container img,
|
1366 |
+
.calendar_main .ecwd_calendar .ecwd_list .ecwd-list-img-container img{
|
1367 |
margin-top: 1px;
|
1368 |
max-width: 100%;
|
1369 |
width: 100%;
|
1370 |
height: auto;
|
1371 |
}
|
1372 |
|
1373 |
+
.calendar_main .ecwd_calendar .ecwd_list .event-content,
|
1374 |
+
.calendar_main .ecwd_calendar .day4-event-list .event-content,
|
1375 |
+
.calendar_main .ecwd_calendar .day-event-list .event-content,
|
1376 |
+
.calendar_main .ecwd_calendar .week-event-list .event-content{
|
1377 |
padding:0px 10px 10px !important;
|
1378 |
font-size: 15px;
|
1379 |
}
|
1449 |
width: 0 !important;
|
1450 |
border: 0 !important;
|
1451 |
}
|
1452 |
+
.ecwd-no-image.event-container,
|
1453 |
+
.ecwd-no-image .event-main-content,
|
1454 |
+
.calendar_main .ecwd_calendar li.ecwd-no-image {
|
1455 |
padding: 0 10px 10px !important;
|
1456 |
}
|
1457 |
|
1458 |
+
.calendar_main .ecwd_calendar .ecwd-no-image .event-content,
|
1459 |
.ecwd_calendar.ecwd-widget-mini .event-content,
|
1460 |
.ecwd_calendar.ecwd-widget-mini .ecwd_list li{
|
1461 |
padding: 0 !important;
|
1542 |
.event-detalis .event-detalis-org,.event-detalis .event-venue{
|
1543 |
padding-left: 0px;
|
1544 |
}
|
1545 |
+
|
1546 |
+
.calendar_main .ecwd_calendar .event-organizers a,
|
1547 |
+
.calendar_main .ecwd_calendar .event-venue a {
|
1548 |
color: #010101 !important;
|
1549 |
}
|
1550 |
+
|
1551 |
.event-main-content .event-organizers,.event-main-content .event-venue{
|
1552 |
margin: 0px 0 5px 10px;
|
1553 |
min-height: 20px;
|
2415 |
border-left:0;
|
2416 |
}
|
2417 |
|
2418 |
+
.calendar_main .ecwd_calendar .filter-arrow-right,
|
2419 |
+
.calendar_main .ecwd_calendar .filter-arrow-left{
|
2420 |
line-height: 22px;
|
2421 |
}
|
2422 |
|
2712 |
.ecwd_events_date{
|
2713 |
font-size:15px
|
2714 |
}
|
2715 |
+
.calendar_main .ecwd_calendar .filter-container{
|
2716 |
direction: ltr;
|
2717 |
float:left;
|
2718 |
}
|
2723 |
cursor: pointer;
|
2724 |
}
|
2725 |
|
2726 |
+
|
2727 |
+
#ecwd-events-content .event-venue > div,
|
2728 |
+
#ecwd-events-content .event-detalis-org > div,
|
2729 |
+
.entry-content .ecwd-venue > div,
|
2730 |
+
.entry-content .ecwd-organizer .ecwd_organizer_phone,
|
2731 |
+
.entry-content .ecwd-organizer .ecwd_organizer_website{
|
2732 |
+
padding: 5px 0;
|
2733 |
+
}
|
2734 |
+
|
2735 |
+
.entry-content .ecwd-organizer .ecwd_organizer_description{
|
2736 |
+
margin-top: 10px;
|
2737 |
+
}
|
2738 |
+
|
2739 |
+
#ecwd-events-content .event-venue > div span:first-child,
|
2740 |
+
#ecwd-events-content .event-detalis-org > div span:first-child,
|
2741 |
+
.entry-content .ecwd-venue > div span:first-child,
|
2742 |
+
.entry-content .ecwd-organizer .ecwd_organizer_phone span:first-child,
|
2743 |
+
.entry-content .ecwd-organizer .ecwd_organizer_website span:first-child{
|
2744 |
+
width: 110px;
|
2745 |
+
display: inline-block;
|
2746 |
+
}
|
2747 |
+
|
2748 |
+
#ecwd-events-content a{
|
2749 |
+
cursor: pointer;
|
2750 |
+
}
|
2751 |
+
|
2752 |
+
|
2753 |
.ecwd_map_div, .ecwd_map_div span{
|
2754 |
color:black;
|
2755 |
}
|
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
|
@@ -24,13 +24,17 @@ if (!defined('ECWD_URL')) {
|
|
24 |
}
|
25 |
|
26 |
if (!defined('ECWD_VERSION')) {
|
27 |
-
define('ECWD_VERSION', "1.0.
|
28 |
}
|
29 |
|
30 |
if (!defined('ECWD_PLUGIN_MAIN_FILE')) {
|
31 |
define('ECWD_PLUGIN_MAIN_FILE', __FILE__);
|
32 |
}
|
33 |
|
|
|
|
|
|
|
|
|
34 |
add_action('plugins_loaded', array('ECWD', 'get_instance'));
|
35 |
|
36 |
if (is_admin()) {
|
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.95
|
7 |
* Author: WebDorado
|
8 |
* Author URI: http://web-dorado.com
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
24 |
}
|
25 |
|
26 |
if (!defined('ECWD_VERSION')) {
|
27 |
+
define('ECWD_VERSION', "1.0.95");
|
28 |
}
|
29 |
|
30 |
if (!defined('ECWD_PLUGIN_MAIN_FILE')) {
|
31 |
define('ECWD_PLUGIN_MAIN_FILE', __FILE__);
|
32 |
}
|
33 |
|
34 |
+
if (!defined('ECWD_MENU_SLUG')) {
|
35 |
+
define('ECWD_MENU_SLUG', "edit.php?post_type=ecwd_event");
|
36 |
+
}
|
37 |
+
|
38 |
add_action('plugins_loaded', array('ECWD', 'get_instance'));
|
39 |
|
40 |
if (is_admin()) {
|
ecwd_admin_class.php
CHANGED
@@ -6,9 +6,10 @@
|
|
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 |
|
13 |
private function __construct() {
|
14 |
$plugin = ECWD::get_instance();
|
@@ -24,20 +25,28 @@ class ECWD_Admin {
|
|
24 |
add_action('init', array($this, 'define_admin_constants'));
|
25 |
add_action('init', array($this, ECWD_PLUGIN_PREFIX . '_shortcode_button'));
|
26 |
|
|
|
|
|
27 |
// Add admin styles and scripts
|
28 |
add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_styles'));
|
29 |
add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_scripts'));
|
30 |
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
add_action('admin_menu', array($this, 'add_plugin_admin_menu'), 10);
|
33 |
-
add_filter('parent_file', array($this,'ecwd_set_current_menu'));
|
34 |
|
35 |
foreach (array('post.php', 'post-new.php') as $hook) {
|
36 |
add_action("admin_head-$hook", array($this, 'admin_head'));
|
37 |
}
|
38 |
-
|
39 |
-
//Web Dorado Logo
|
40 |
-
// add_action('admin_notices', array($this, 'create_logo_to_head'));
|
41 |
// Runs the admin notice ignore function incase a dismiss button has been clicked
|
42 |
add_action('admin_init', array($this, 'admin_notice_ignore'));
|
43 |
add_action('admin_notices', array($this, 'ecwd_admin_notices'));
|
@@ -49,7 +58,7 @@ class ECWD_Admin {
|
|
49 |
function ecwd_submenu_parent_file($parent_file) {
|
50 |
$screen = get_current_screen();
|
51 |
if ($screen->post_type == "ecwd_organizer" || $screen->post_type == "ecwd_venue") {
|
52 |
-
return
|
53 |
}
|
54 |
return $parent_file;
|
55 |
}
|
@@ -70,6 +79,17 @@ class ECWD_Admin {
|
|
70 |
}
|
71 |
}
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
public static function activate() {
|
74 |
if (!defined('ECWD_PLUGIN_PREFIX')) {
|
75 |
define('ECWD_PLUGIN_PREFIX', 'ecwd');
|
@@ -90,9 +110,10 @@ class ECWD_Admin {
|
|
90 |
}
|
91 |
}
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
|
|
|
96 |
|
97 |
$blue_theme = get_page_by_title('Default', 'OBJECT', 'ecwd_theme');
|
98 |
$blue_id = (isset($blue_theme->ID)) ? $blue_theme->ID : 0;
|
@@ -119,7 +140,7 @@ class ECWD_Admin {
|
|
119 |
if($version_option == false){
|
120 |
self::fix_events_locations();
|
121 |
}
|
122 |
-
|
123 |
if($version_option == false || version_compare($version_option, '1.0.83', '<=')) {
|
124 |
$opt = get_option('ecwd_settings_general');
|
125 |
if (isset($opt['show_events_detail'])) {
|
@@ -129,9 +150,120 @@ class ECWD_Admin {
|
|
129 |
}
|
130 |
}
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
update_option('ecwd_version',ECWD_VERSION);
|
|
|
133 |
}
|
134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
static function fix_events_locations(){
|
136 |
$venue_cache = array();
|
137 |
$args = array(
|
@@ -166,79 +298,57 @@ class ECWD_Admin {
|
|
166 |
}
|
167 |
|
168 |
public function add_plugin_admin_menu() {
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
)
|
|
|
|
|
194 |
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
)
|
|
|
|
|
|
|
201 |
|
202 |
-
|
203 |
-
__('Calendar Add-ons', 'ecwd'), __('Calendar Add-ons', 'ecwd'), 'manage_options', $this->prefix . '_addons', array(
|
204 |
-
$this,
|
205 |
-
'display_addons_page'
|
206 |
-
), plugins_url('/assets/add-ons-icon.png', ECWD_MAIN_FILE), '26,12'
|
207 |
-
);
|
208 |
-
$this->ecwd_page[] = add_menu_page(
|
209 |
-
__('Calendar Themes', 'ecwd'), __('Calendar Themes', 'ecwd'), 'manage_options', $this->prefix . '_themes', array(
|
210 |
-
$this,
|
211 |
-
'display_themes_page'
|
212 |
-
), plugins_url('/assets/themes-icon.png', ECWD_MAIN_FILE), '26,18'
|
213 |
-
);
|
214 |
-
if ($ecwd_config['show_config_submenu']) {
|
215 |
-
$this->ecwd_page[] = add_submenu_page(
|
216 |
-
'edit.php?post_type=ecwd_calendar', __('Config', 'ecwd'), __('Config', 'ecwd'), 'manage_options', $this->prefix . '_config', array(
|
217 |
-
$this,
|
218 |
-
'display_config_page'
|
219 |
-
)
|
220 |
-
);
|
221 |
-
}
|
222 |
-
}
|
223 |
|
224 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
|
226 |
-
|
227 |
-
if ($current_screen->post_type == 'ecwd_event') {
|
228 |
-
if ($pagenow == 'post.php') {
|
229 |
-
$submenu_file = 'edit.php?post_type=' . $current_screen->post_type;
|
230 |
-
}
|
231 |
|
232 |
-
if ($pagenow == 'edit-tags.php') {
|
233 |
-
if($_GET['taxonomy'] == 'ecwd_event_tag'){
|
234 |
-
$submenu_file = 'edit-tags.php?taxonomy=ecwd_event_tag&post_type=' . $current_screen->post_type;
|
235 |
-
}else{
|
236 |
-
$submenu_file = 'edit-tags.php?taxonomy=ecwd_event_category&post_type=' . $current_screen->post_type;
|
237 |
-
}
|
238 |
-
}
|
239 |
-
$parent_file = 'edit.php?post_type=ecwd_calendar';
|
240 |
-
return $parent_file;
|
241 |
-
}
|
242 |
}
|
243 |
|
244 |
public function include_ecwd_pointer_class() {
|
@@ -396,7 +506,7 @@ class ECWD_Admin {
|
|
396 |
}
|
397 |
$html = get_option($option);
|
398 |
if ($html !== false) {
|
399 |
-
$ajax_action = (isset($_GET['action'])) ? $_GET['action'] : "";
|
400 |
$events = array();
|
401 |
if (isset($_GET['ecwd_event_list']) && $_GET['ecwd_event_list'] == true) {
|
402 |
$events = get_posts(array('numberposts' => -1, 'post_type' => 'ecwd_event', 'post_status' => 'publish'));
|
@@ -466,13 +576,13 @@ class ECWD_Admin {
|
|
466 |
$gmap_key = (isset($ecwd_options['gmap_key'])) ? $ecwd_options['gmap_key'] : "";
|
467 |
$params['gmap_style'] = (isset($ecwd_options['gmap_style'])) ? $ecwd_options['gmap_style'] : "";
|
468 |
|
469 |
-
wp_localize_script($this->prefix . '-admin-scripts', '
|
470 |
wp_localize_script(ECWD_PLUGIN_PREFIX . '-public', 'ecwd', array(
|
471 |
'ajaxurl' => admin_url('admin-ajax.php'),
|
472 |
'ajaxnonce' => wp_create_nonce(ECWD_PLUGIN_PREFIX . '_ajax_nonce'),
|
473 |
'loadingText' => __('Loading...', 'ecwd'),
|
474 |
'plugin_url' => ECWD_URL,
|
475 |
-
'gmap_key' => $gmap_key,
|
476 |
'gmap_style' => (isset($ecwd_options['gmap_style'])) ? $ecwd_options['gmap_style'] : ""
|
477 |
));
|
478 |
|
@@ -480,6 +590,74 @@ class ECWD_Admin {
|
|
480 |
}
|
481 |
}
|
482 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
483 |
/**
|
484 |
* Localize Script
|
485 |
*/
|
@@ -551,24 +729,26 @@ class ECWD_Admin {
|
|
551 |
}
|
552 |
|
553 |
// registers the buttons for use
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
return $buttons;
|
561 |
}
|
562 |
|
563 |
-
|
564 |
-
|
565 |
-
if (!$this->ecwd_page()) {
|
566 |
-
$plugin_array[ECWD_PLUGIN_PREFIX] = plugins_url('js/admin/editor-buttons.js', __FILE__);
|
567 |
-
}
|
568 |
|
569 |
-
|
|
|
|
|
|
|
|
|
570 |
}
|
571 |
|
|
|
|
|
|
|
572 |
//auto update plugin
|
573 |
function ecwd_update($update, $item) {
|
574 |
global $ecwd_options;
|
@@ -602,10 +782,10 @@ class ECWD_Admin {
|
|
602 |
|
603 |
// Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
|
604 |
public function admin_notice_ignore() {
|
605 |
-
$slug = ( isset($_GET['ecwd_admin_notice_ignore']) ) ? $_GET['ecwd_admin_notice_ignore'] : '';
|
606 |
if (isset($_GET['ecwd_admin_notice_ignore']) && current_user_can('manage_options')) {
|
607 |
$admin_notices_option = get_option('ecwd_admin_notice', array());
|
608 |
-
$admin_notices_option[$_GET['ecwd_admin_notice_ignore']]['dismissed'] = 1;
|
609 |
update_option('ecwd_admin_notice', $admin_notices_option);
|
610 |
$query_str = remove_query_arg('ecwd_admin_notice_ignore');
|
611 |
wp_redirect($query_str);
|
@@ -663,41 +843,54 @@ class ECWD_Admin {
|
|
663 |
return __('Event Calendar WD', 'ecwd');
|
664 |
}
|
665 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
666 |
public function add_action_links($links) {
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
}
|
674 |
|
675 |
public function ecwd_helper_bar() {
|
676 |
$current_screen = get_current_screen();
|
677 |
-
if ($current_screen->parent_file !=
|
678 |
return;
|
679 |
}
|
680 |
-
|
681 |
$text = $user_guide_link = null;
|
682 |
switch ($current_screen->id) {
|
683 |
case "edit-ecwd_calendar":
|
684 |
case "ecwd_calendar":
|
685 |
-
$text = '
|
686 |
$user_guide_link = 'https://web-dorado.com/wordpress-event-calendar-wd/creating-modifying-calendars.html';
|
687 |
break;
|
688 |
case "edit-ecwd_event":
|
689 |
case "ecwd_event":
|
690 |
-
$text = '
|
691 |
$user_guide_link = 'https://web-dorado.com/wordpress-event-calendar-wd/creating-modifying-events/all-events.html';
|
692 |
break;
|
693 |
case "edit-ecwd_organizer":
|
694 |
case "ecwd_organizer":
|
695 |
-
$text = '
|
696 |
$user_guide_link = 'https://web-dorado.com/wordpress-event-calendar-wd/creating-adding-organizers.html';
|
697 |
break;
|
698 |
case "edit-ecwd_venue":
|
699 |
case "ecwd_venue":
|
700 |
-
$text = '
|
701 |
$user_guide_link = 'https://web-dorado.com/wordpress-event-calendar-wd/creating-adding-venues.html';
|
702 |
break;
|
703 |
// case "edit-ecwd_theme":
|
@@ -706,15 +899,15 @@ class ECWD_Admin {
|
|
706 |
// $user_guide_link = 'https://web-dorado.com/wordpress-event-calendar-wd/calendar-themes.html';
|
707 |
// break;
|
708 |
case "edit-ecwd_event_category":
|
709 |
-
$text = '
|
710 |
$user_guide_link = 'https://web-dorado.com/wordpress-event-calendar-wd/creating-modifying-events/event-categories.html';
|
711 |
break;
|
712 |
case "edit-ecwd_event_tag":
|
713 |
-
$text = '
|
714 |
$user_guide_link = 'https://web-dorado.com/wordpress-event-calendar-wd/creating-modifying-events/event-tags.html';
|
715 |
break;
|
716 |
-
case "
|
717 |
-
$text = '
|
718 |
$user_guide_link = 'https://web-dorado.com/wordpress-event-calendar-wd/creating-modifying-calendars/settings.html';
|
719 |
break;
|
720 |
}
|
@@ -726,6 +919,8 @@ class ECWD_Admin {
|
|
726 |
|
727 |
}
|
728 |
|
|
|
|
|
729 |
private function add_helper_bar($text, $user_guide_link) {
|
730 |
$help_text = $text;
|
731 |
$prefix = "ecwd";
|
@@ -771,7 +966,7 @@ class ECWD_Admin {
|
|
771 |
}
|
772 |
?>
|
773 |
</div>
|
774 |
-
|
775 |
<?php
|
776 |
}
|
777 |
|
@@ -914,15 +1109,15 @@ class ECWD_Admin {
|
|
914 |
"plugin_wd_demo_link" => "http://wpdemo.web-dorado.com/wordpress-event-calendar-wd-grey/",
|
915 |
"plugin_wd_forum_link" => "https://web-dorado.com/forum/wordpress-event-calendar-wd.html",
|
916 |
"plugin_wd_addons_link" => "https://web-dorado.com/products/wordpress-event-calendar-wd/add-ons.html",
|
917 |
-
"after_subscribe" => "
|
918 |
|
919 |
"plugin_wizard_link" => null,
|
920 |
-
"plugin_menu_title" => "
|
921 |
-
"plugin_menu_icon" =>ECWD_URL."/assets/
|
922 |
"deactivate" => true,
|
923 |
"subscribe" => true,
|
924 |
-
"custom_post" =>
|
925 |
-
"menu_position" =>
|
926 |
);
|
927 |
|
928 |
dorado_web_init($ecwd_options);
|
6 |
class ECWD_Admin {
|
7 |
|
8 |
protected static $instance = null;
|
9 |
+
protected $version = '1.0.95';
|
10 |
protected $ecwd_page = null;
|
11 |
protected $notices = null;
|
12 |
+
protected static $default_shortcode = '[ecwd id="%s" type="full" page_items="5" event_search="yes" display="full" displays="full,list,week,day" filters=""]';
|
13 |
|
14 |
private function __construct() {
|
15 |
$plugin = ECWD::get_instance();
|
25 |
add_action('init', array($this, 'define_admin_constants'));
|
26 |
add_action('init', array($this, ECWD_PLUGIN_PREFIX . '_shortcode_button'));
|
27 |
|
28 |
+
add_action('admin_init', array($this, 'redirect_overview_on_activation'));
|
29 |
+
|
30 |
// Add admin styles and scripts
|
31 |
add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_styles'));
|
32 |
add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_scripts'));
|
33 |
|
34 |
+
add_action('admin_init', array($this, 'redirect_after_activation'));
|
35 |
+
|
36 |
+
//Add organizer,venue form event edit page
|
37 |
+
add_action('wp_ajax_ecwd_add_post', array($this, 'wp_ajax_add_post'));
|
38 |
+
|
39 |
+
//add shortcode in calendar post content
|
40 |
+
add_action('wp_insert_post_data', array($this, 'add_calendar_shortcode'));
|
41 |
+
|
42 |
+
|
43 |
+
// Add the options page and menu item.
|
44 |
add_action('admin_menu', array($this, 'add_plugin_admin_menu'), 10);
|
|
|
45 |
|
46 |
foreach (array('post.php', 'post-new.php') as $hook) {
|
47 |
add_action("admin_head-$hook", array($this, 'admin_head'));
|
48 |
}
|
49 |
+
|
|
|
|
|
50 |
// Runs the admin notice ignore function incase a dismiss button has been clicked
|
51 |
add_action('admin_init', array($this, 'admin_notice_ignore'));
|
52 |
add_action('admin_notices', array($this, 'ecwd_admin_notices'));
|
58 |
function ecwd_submenu_parent_file($parent_file) {
|
59 |
$screen = get_current_screen();
|
60 |
if ($screen->post_type == "ecwd_organizer" || $screen->post_type == "ecwd_venue") {
|
61 |
+
return ECWD_MENU_SLUG;
|
62 |
}
|
63 |
return $parent_file;
|
64 |
}
|
79 |
}
|
80 |
}
|
81 |
|
82 |
+
public static function redirect_overview_on_activation(){
|
83 |
+
$opt = get_option('ecwd_do_activation_redirect');
|
84 |
+
if($opt === false || $opt == '2'){
|
85 |
+
update_option('ecwd_do_activation_redirect', 0);
|
86 |
+
exit(wp_safe_redirect(admin_url('admin.php?page=ecwd_subscribe')));
|
87 |
+
}else if($opt == '1'){
|
88 |
+
update_option('ecwd_do_activation_redirect', 0);
|
89 |
+
exit(wp_safe_redirect(admin_url(ECWD_MENU_SLUG . '&page=overview_ecwd')));
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
public static function activate() {
|
94 |
if (!defined('ECWD_PLUGIN_PREFIX')) {
|
95 |
define('ECWD_PLUGIN_PREFIX', 'ecwd');
|
110 |
}
|
111 |
}
|
112 |
|
113 |
+
$calendars = get_posts(array(
|
114 |
+
'post_type' => 'ecwd_calendar',
|
115 |
+
'numberposts' => -1
|
116 |
+
));
|
117 |
|
118 |
$blue_theme = get_page_by_title('Default', 'OBJECT', 'ecwd_theme');
|
119 |
$blue_id = (isset($blue_theme->ID)) ? $blue_theme->ID : 0;
|
140 |
if($version_option == false){
|
141 |
self::fix_events_locations();
|
142 |
}
|
143 |
+
|
144 |
if($version_option == false || version_compare($version_option, '1.0.83', '<=')) {
|
145 |
$opt = get_option('ecwd_settings_general');
|
146 |
if (isset($opt['show_events_detail'])) {
|
150 |
}
|
151 |
}
|
152 |
|
153 |
+
$version_for_compare = ($version_option !== false && substr($version_option, 0, 1) == '5') ? '5.0.94' : '1.0.94';
|
154 |
+
if ($version_option == false || version_compare($version_option, $version_for_compare, '<=')) {
|
155 |
+
self::update_to_95($calendars);
|
156 |
+
}
|
157 |
+
|
158 |
+
if($version_option === false){
|
159 |
+
update_option('ecwd_do_activation_redirect', '2');
|
160 |
+
}else{
|
161 |
+
update_option('ecwd_do_activation_redirect', '1');
|
162 |
+
}
|
163 |
+
|
164 |
update_option('ecwd_version',ECWD_VERSION);
|
165 |
+
|
166 |
}
|
167 |
|
168 |
+
private static function update_to_95($calendars) {
|
169 |
+
//add shortcodes on calendar content
|
170 |
+
if(!empty($calendars)) {
|
171 |
+
foreach ($calendars as $calendar) {
|
172 |
+
if (get_post_meta($calendar->ID, "ecwd_added_shortcode", true) === '1') {
|
173 |
+
continue;
|
174 |
+
}
|
175 |
+
$content = $calendar->post_content;
|
176 |
+
if (has_shortcode($content, 'ecwd') == false) {
|
177 |
+
$content .= sprintf(self::$default_shortcode, $calendar->ID);
|
178 |
+
$calendar->post_content = $content;
|
179 |
+
wp_update_post($calendar);
|
180 |
+
}
|
181 |
+
update_post_meta($calendar->ID, 'ecwd_added_shortcode', '1');
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
//if no calendar create default
|
186 |
+
if (empty($calendars)) {
|
187 |
+
$post_data = array(
|
188 |
+
'post_title' => __("Calendar", 'ecwd'),
|
189 |
+
'post_content' => "",
|
190 |
+
'post_status' => 'publish',
|
191 |
+
'meta_input' => array('ecwd_default_calendar' => '1'),
|
192 |
+
'post_type' => 'ecwd_calendar'
|
193 |
+
);
|
194 |
+
|
195 |
+
$post_id = wp_insert_post($post_data);
|
196 |
+
|
197 |
+
$default_calendar_post = get_post($post_id);
|
198 |
+
$default_calendar_post->post_content = sprintf(self::$default_shortcode, $post_id);
|
199 |
+
wp_update_post($default_calendar_post);
|
200 |
+
|
201 |
+
update_option('ecwd_default_calendar', $post_id);
|
202 |
+
update_post_meta($post_id, 'ecwd_added_shortcode', '1');
|
203 |
+
}
|
204 |
+
|
205 |
+
//create venues for events locations
|
206 |
+
$args = array(
|
207 |
+
'post_type' => 'ecwd_event',
|
208 |
+
'post_status' => 'publish',
|
209 |
+
'numberposts' => -1,
|
210 |
+
'meta_query' => array(
|
211 |
+
array(
|
212 |
+
'key' => 'ecwd_event_venue',
|
213 |
+
'compare' => 'NOT EXISTS'
|
214 |
+
),
|
215 |
+
array(
|
216 |
+
'key' => 'ecwd_event_location',
|
217 |
+
'meta_value' => '',
|
218 |
+
'meta_compare' => '!=',
|
219 |
+
),
|
220 |
+
array(
|
221 |
+
'key' => 'ecwd_lat_long',
|
222 |
+
'meta_value' => '',
|
223 |
+
'meta_compare' => '!=',
|
224 |
+
)
|
225 |
+
)
|
226 |
+
);
|
227 |
+
|
228 |
+
$generated_venues_title = array();
|
229 |
+
$events = get_posts($args);
|
230 |
+
|
231 |
+
if (!empty($events)) {
|
232 |
+
foreach ($events as $event) {
|
233 |
+
|
234 |
+
$lat_long = get_post_meta($event->ID, 'ecwd_lat_long', true);
|
235 |
+
|
236 |
+
if (isset($generated_venues_title[$lat_long])) {
|
237 |
+
$venue_id = $generated_venues_title[$lat_long];
|
238 |
+
} else {
|
239 |
+
$map_zoom = get_post_meta($event->ID, 'ecwd_map_zoom', true);
|
240 |
+
$location = get_post_meta($event->ID, 'ecwd_event_location', true);
|
241 |
+
|
242 |
+
$args = array(
|
243 |
+
'post_title' => $location,
|
244 |
+
'post_content' => "",
|
245 |
+
'post_status' => 'publish',
|
246 |
+
'meta_input' => array(
|
247 |
+
'ecwd_venue_lat_long' => $lat_long,
|
248 |
+
'ecwd_venue_location' => $location,
|
249 |
+
'ecwd_map_zoom' => $map_zoom,
|
250 |
+
'ecwd_venue_meta_phone' => '',
|
251 |
+
'ecwd_venue_meta_website' => '',
|
252 |
+
'ecwd_venue_show_map' => '1'
|
253 |
+
),
|
254 |
+
'post_type' => 'ecwd_venue'
|
255 |
+
);
|
256 |
+
|
257 |
+
$venue_id = wp_insert_post($args);
|
258 |
+
$generated_venues_title[$lat_long] = $venue_id;
|
259 |
+
}
|
260 |
+
|
261 |
+
update_post_meta($event->ID, 'ecwd_event_venue', $venue_id);
|
262 |
+
|
263 |
+
}
|
264 |
+
}
|
265 |
+
}
|
266 |
+
|
267 |
static function fix_events_locations(){
|
268 |
$venue_cache = array();
|
269 |
$args = array(
|
298 |
}
|
299 |
|
300 |
public function add_plugin_admin_menu() {
|
301 |
+
global $ecwd_config;
|
302 |
+
|
303 |
+
$this->ecwd_page[] = add_submenu_page(
|
304 |
+
ECWD_MENU_SLUG,
|
305 |
+
__('Settings', 'ecwd'),
|
306 |
+
__('Settings', 'ecwd'),
|
307 |
+
'manage_options',
|
308 |
+
$this->prefix . '_general_settings', array($this, 'display_admin_page')
|
309 |
+
);
|
310 |
|
311 |
+
$this->ecwd_page[] = add_submenu_page(
|
312 |
+
ECWD_MENU_SLUG,
|
313 |
+
__('Licensing', 'ecwd'),
|
314 |
+
__('Licensing', 'ecwd'),
|
315 |
+
'manage_options',
|
316 |
+
$this->prefix . '_licensing',
|
317 |
+
array($this, 'display_license_page')
|
318 |
+
);
|
319 |
|
320 |
+
$this->ecwd_page[] = add_menu_page(
|
321 |
+
__('Calendar Add-ons', 'ecwd'),
|
322 |
+
__('Calendar Add-ons', 'ecwd'),
|
323 |
+
'manage_options',
|
324 |
+
$this->prefix . '_addons', array($this, 'display_addons_page'),
|
325 |
+
plugins_url('/assets/add-ons-icon.png', ECWD_MAIN_FILE),
|
326 |
+
'26,12'
|
327 |
+
);
|
328 |
|
329 |
+
$this->ecwd_page[] = add_menu_page(
|
330 |
+
__('Calendar Themes', 'ecwd'),
|
331 |
+
__('Calendar Themes', 'ecwd'),
|
332 |
+
'manage_options',
|
333 |
+
$this->prefix . '_themes',
|
334 |
+
array($this, 'display_themes_page'),
|
335 |
+
plugins_url('/assets/themes-icon.png', ECWD_MAIN_FILE),
|
336 |
+
'26,18'
|
337 |
+
);
|
338 |
|
339 |
+
if ($ecwd_config['show_config_submenu']) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
|
341 |
+
$this->ecwd_page[] = add_submenu_page(
|
342 |
+
ECWD_MENU_SLUG,
|
343 |
+
__('Config', 'ecwd'),
|
344 |
+
__('Config', 'ecwd'),
|
345 |
+
'manage_options',
|
346 |
+
$this->prefix . '_config',
|
347 |
+
array($this, 'display_config_page')
|
348 |
+
);
|
349 |
|
350 |
+
}
|
|
|
|
|
|
|
|
|
351 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
}
|
353 |
|
354 |
public function include_ecwd_pointer_class() {
|
506 |
}
|
507 |
$html = get_option($option);
|
508 |
if ($html !== false) {
|
509 |
+
$ajax_action = (isset($_GET['action'])) ? sanitize_text_field($_GET['action']) : "";
|
510 |
$events = array();
|
511 |
if (isset($_GET['ecwd_event_list']) && $_GET['ecwd_event_list'] == true) {
|
512 |
$events = get_posts(array('numberposts' => -1, 'post_type' => 'ecwd_event', 'post_status' => 'publish'));
|
576 |
$gmap_key = (isset($ecwd_options['gmap_key'])) ? $ecwd_options['gmap_key'] : "";
|
577 |
$params['gmap_style'] = (isset($ecwd_options['gmap_style'])) ? $ecwd_options['gmap_style'] : "";
|
578 |
|
579 |
+
wp_localize_script($this->prefix . '-admin-scripts', 'ecwd_admin_params', $params);
|
580 |
wp_localize_script(ECWD_PLUGIN_PREFIX . '-public', 'ecwd', array(
|
581 |
'ajaxurl' => admin_url('admin-ajax.php'),
|
582 |
'ajaxnonce' => wp_create_nonce(ECWD_PLUGIN_PREFIX . '_ajax_nonce'),
|
583 |
'loadingText' => __('Loading...', 'ecwd'),
|
584 |
'plugin_url' => ECWD_URL,
|
585 |
+
'gmap_key' => trim($gmap_key),
|
586 |
'gmap_style' => (isset($ecwd_options['gmap_style'])) ? $ecwd_options['gmap_style'] : ""
|
587 |
));
|
588 |
|
590 |
}
|
591 |
}
|
592 |
|
593 |
+
public function add_calendar_shortcode($post_data) {
|
594 |
+
global $post;
|
595 |
+
|
596 |
+
if (!isset($post->ID)) {
|
597 |
+
return $post_data;
|
598 |
+
}
|
599 |
+
|
600 |
+
if ($post_data['post_type'] !== 'ecwd_calendar') {
|
601 |
+
return $post_data;
|
602 |
+
}
|
603 |
+
|
604 |
+
if (get_post_meta($post->ID, "ecwd_added_shortcode", true) === '1') {
|
605 |
+
return $post_data;
|
606 |
+
}
|
607 |
+
|
608 |
+
$content = $post_data['post_content'];
|
609 |
+
|
610 |
+
if (has_shortcode($content, 'ecwd') == false) {
|
611 |
+
$post_data['post_content'] .= sprintf(self::$default_shortcode, $post->ID);
|
612 |
+
}
|
613 |
+
|
614 |
+
update_post_meta($post->ID, 'ecwd_added_shortcode', '1');
|
615 |
+
return $post_data;
|
616 |
+
}
|
617 |
+
|
618 |
+
|
619 |
+
public function wp_ajax_add_post() {
|
620 |
+
|
621 |
+
$response = array(
|
622 |
+
"success" => false,
|
623 |
+
"id" => 0
|
624 |
+
);
|
625 |
+
|
626 |
+
if (wp_verify_nonce($_POST['nonce'], 'ecwd_ajax_nonce') === false || empty($_POST['post_data'])) {
|
627 |
+
die(json_encode($response));
|
628 |
+
}
|
629 |
+
|
630 |
+
$post_data = $_POST['post_data'];
|
631 |
+
$post_types = array('ecwd_organizer', 'ecwd_venue');
|
632 |
+
|
633 |
+
|
634 |
+
if (empty($post_data['post_type']) || !in_array($post_data['post_type'], $post_types)) {
|
635 |
+
die(json_encode($response));
|
636 |
+
}
|
637 |
+
|
638 |
+
$post_args = array();
|
639 |
+
|
640 |
+
$post_args['post_title'] = (!empty($post_data['title'])) ? sanitize_text_field($post_data['title']) : "";
|
641 |
+
$post_args['post_content'] = (!empty($post_data['content'])) ? sanitize_text_field($post_data['content']) : "";
|
642 |
+
$post_args['post_type'] = sanitize_text_field($post_data['post_type']);
|
643 |
+
$post_args['post_status'] = 'publish';
|
644 |
+
|
645 |
+
if ($post_args['post_type'] == 'ecwd_organizer') {
|
646 |
+
|
647 |
+
$post_args['meta_input']['ecwd_organizer_meta_phone'] = (!empty($post_data['metas']['phone'])) ? sanitize_text_field($post_data['metas']['phone']) : "";
|
648 |
+
$post_args['meta_input']['ecwd_organizer_meta_website'] = (!empty($post_data['metas']['website'])) ? sanitize_text_field($post_data['metas']['website']) : "";
|
649 |
+
|
650 |
+
}
|
651 |
+
|
652 |
+
$post_id = wp_insert_post($post_args);
|
653 |
+
|
654 |
+
$response['success'] = ($post_id !== 0);
|
655 |
+
$response['id'] = $post_id;
|
656 |
+
$response['title'] = sanitize_text_field($post_args['post_title']);
|
657 |
+
|
658 |
+
die(json_encode($response));
|
659 |
+
}
|
660 |
+
|
661 |
/**
|
662 |
* Localize Script
|
663 |
*/
|
729 |
}
|
730 |
|
731 |
// registers the buttons for use
|
732 |
+
function register_buttons($buttons) {
|
733 |
+
// inserts a separator between existing buttons and our new one
|
734 |
+
$screen = get_current_screen();
|
735 |
+
if (!$this->ecwd_page() || $screen->post_type == "ecwd_calendar") {
|
736 |
+
array_push($buttons, "|", ECWD_PLUGIN_PREFIX);
|
|
|
|
|
737 |
}
|
738 |
|
739 |
+
return $buttons;
|
740 |
+
}
|
|
|
|
|
|
|
741 |
|
742 |
+
// add the button to the tinyMCE bar
|
743 |
+
function add_tinymce_plugin($plugin_array) {
|
744 |
+
$screen = get_current_screen();
|
745 |
+
if (!$this->ecwd_page() || $screen->post_type == "ecwd_calendar") {
|
746 |
+
$plugin_array[ECWD_PLUGIN_PREFIX] = plugins_url('js/admin/editor-buttons.js', __FILE__);
|
747 |
}
|
748 |
|
749 |
+
return $plugin_array;
|
750 |
+
}
|
751 |
+
|
752 |
//auto update plugin
|
753 |
function ecwd_update($update, $item) {
|
754 |
global $ecwd_options;
|
782 |
|
783 |
// Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
|
784 |
public function admin_notice_ignore() {
|
785 |
+
$slug = ( isset($_GET['ecwd_admin_notice_ignore']) ) ? sanitize_text_field($_GET['ecwd_admin_notice_ignore']) : '';
|
786 |
if (isset($_GET['ecwd_admin_notice_ignore']) && current_user_can('manage_options')) {
|
787 |
$admin_notices_option = get_option('ecwd_admin_notice', array());
|
788 |
+
$admin_notices_option[sanitize_text_field($_GET['ecwd_admin_notice_ignore'])]['dismissed'] = 1;
|
789 |
update_option('ecwd_admin_notice', $admin_notices_option);
|
790 |
$query_str = remove_query_arg('ecwd_admin_notice_ignore');
|
791 |
wp_redirect($query_str);
|
843 |
return __('Event Calendar WD', 'ecwd');
|
844 |
}
|
845 |
|
846 |
+
public static function redirect_after_activation() {
|
847 |
+
$opt = get_option('ecwd_do_activation_redirect');
|
848 |
+
|
849 |
+
if ($opt === false || $opt == '1') {
|
850 |
+
update_option('ecwd_do_activation_redirect', '0');
|
851 |
+
exit(wp_safe_redirect(admin_url('admin.php?page=ecwd_subscribe')));//subscribe
|
852 |
+
} else if ($opt == '2') {
|
853 |
+
update_option('ecwd_do_activation_redirect', '0');
|
854 |
+
exit(wp_safe_redirect(admin_url(ECWD_MENU_SLUG . '&page=overview_ecwd')));
|
855 |
+
}
|
856 |
+
|
857 |
+
}
|
858 |
+
|
859 |
public function add_action_links($links) {
|
860 |
+
return array_merge(
|
861 |
+
array(
|
862 |
+
'settings' => '<a href="' . admin_url(ECWD_MENU_SLUG . '&page=ecwd_general_settings') . '">' . __('Settings', 'ecwd') . '</a>',
|
863 |
+
'events' => '<a href="' . admin_url('edit.php?post_type=ecwd_event') . '">' . __('Events', 'ecwd') . '</a>'
|
864 |
+
), $links
|
865 |
+
);
|
866 |
}
|
867 |
|
868 |
public function ecwd_helper_bar() {
|
869 |
$current_screen = get_current_screen();
|
870 |
+
if ($current_screen->parent_file != ECWD_MENU_SLUG) {
|
871 |
return;
|
872 |
}
|
873 |
+
|
874 |
$text = $user_guide_link = null;
|
875 |
switch ($current_screen->id) {
|
876 |
case "edit-ecwd_calendar":
|
877 |
case "ecwd_calendar":
|
878 |
+
$text = 'create, edit and delete Calendars';
|
879 |
$user_guide_link = 'https://web-dorado.com/wordpress-event-calendar-wd/creating-modifying-calendars.html';
|
880 |
break;
|
881 |
case "edit-ecwd_event":
|
882 |
case "ecwd_event":
|
883 |
+
$text = 'create, edit and delete Events';
|
884 |
$user_guide_link = 'https://web-dorado.com/wordpress-event-calendar-wd/creating-modifying-events/all-events.html';
|
885 |
break;
|
886 |
case "edit-ecwd_organizer":
|
887 |
case "ecwd_organizer":
|
888 |
+
$text = 'create, edit and delete Organizers';
|
889 |
$user_guide_link = 'https://web-dorado.com/wordpress-event-calendar-wd/creating-adding-organizers.html';
|
890 |
break;
|
891 |
case "edit-ecwd_venue":
|
892 |
case "ecwd_venue":
|
893 |
+
$text = 'create, edit and delete Venues';
|
894 |
$user_guide_link = 'https://web-dorado.com/wordpress-event-calendar-wd/creating-adding-venues.html';
|
895 |
break;
|
896 |
// case "edit-ecwd_theme":
|
899 |
// $user_guide_link = 'https://web-dorado.com/wordpress-event-calendar-wd/calendar-themes.html';
|
900 |
// break;
|
901 |
case "edit-ecwd_event_category":
|
902 |
+
$text = 'create, edit and delete Event Categories';
|
903 |
$user_guide_link = 'https://web-dorado.com/wordpress-event-calendar-wd/creating-modifying-events/event-categories.html';
|
904 |
break;
|
905 |
case "edit-ecwd_event_tag":
|
906 |
+
$text = 'create, edit and delete Event Tags';
|
907 |
$user_guide_link = 'https://web-dorado.com/wordpress-event-calendar-wd/creating-modifying-events/event-tags.html';
|
908 |
break;
|
909 |
+
case "ecwd_event_page_ecwd_general_settings":
|
910 |
+
$text = 'change settings';
|
911 |
$user_guide_link = 'https://web-dorado.com/wordpress-event-calendar-wd/creating-modifying-calendars/settings.html';
|
912 |
break;
|
913 |
}
|
919 |
|
920 |
}
|
921 |
|
922 |
+
|
923 |
+
|
924 |
private function add_helper_bar($text, $user_guide_link) {
|
925 |
$help_text = $text;
|
926 |
$prefix = "ecwd";
|
966 |
}
|
967 |
?>
|
968 |
</div>
|
969 |
+
|
970 |
<?php
|
971 |
}
|
972 |
|
1109 |
"plugin_wd_demo_link" => "http://wpdemo.web-dorado.com/wordpress-event-calendar-wd-grey/",
|
1110 |
"plugin_wd_forum_link" => "https://web-dorado.com/forum/wordpress-event-calendar-wd.html",
|
1111 |
"plugin_wd_addons_link" => "https://web-dorado.com/products/wordpress-event-calendar-wd/add-ons.html",
|
1112 |
+
"after_subscribe" => ECWD_MENU_SLUG . "&page=overview_ecwd", // this can be plagin overview page or set up page
|
1113 |
|
1114 |
"plugin_wizard_link" => null,
|
1115 |
+
"plugin_menu_title" => "Events", //null
|
1116 |
+
"plugin_menu_icon" =>ECWD_URL."/assets/event-icon.png",// SC_URL . '/images/Staff_Directory_WD_menu.png', //null
|
1117 |
"deactivate" => true,
|
1118 |
"subscribe" => true,
|
1119 |
+
"custom_post" => ECWD_MENU_SLUG,
|
1120 |
+
"menu_position" => 25
|
1121 |
);
|
1122 |
|
1123 |
dorado_web_init($ecwd_options);
|
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;
|
@@ -149,17 +149,28 @@ class ECWD {
|
|
149 |
* Load public facing scripts
|
150 |
*/
|
151 |
public function enqueue_scripts() {
|
152 |
-
global $wp_scripts, $post,$ecwd_options;
|
153 |
-
$
|
154 |
|
155 |
$scripts_key = $this->version . '_' . ECWD_SCRIPTS_KEY;
|
156 |
-
|
157 |
-
$
|
158 |
-
if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
if (isset($post->post_type) && ($post->post_type == 'ecwd_event' || $post->post_type == 'ecwd_venue' || strpos($post->post_content, 'ecwd id') !== false)) {
|
160 |
if (isset($wp_scripts->registered) && $wp_scripts->registered) {
|
161 |
foreach ($wp_scripts->registered as $wp_script) {
|
162 |
-
if (isset($wp_scripts->src) && $wp_script->src && (
|
163 |
if (is_array($wp_scripts->queue) && in_array($wp_script->handle, $wp_scripts->queue)) {
|
164 |
$map_included = true;
|
165 |
break;
|
@@ -168,12 +179,15 @@ class ECWD {
|
|
168 |
}
|
169 |
}
|
170 |
|
171 |
-
if (!$map_included
|
172 |
-
wp_enqueue_script($this->prefix . '-maps-public', 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places&key='
|
173 |
}
|
174 |
}
|
|
|
175 |
|
176 |
-
|
|
|
|
|
177 |
wp_enqueue_script($this->prefix . '-popup', plugins_url('js/ecwd_popup.js', __FILE__), array('jquery'), $scripts_key, true);
|
178 |
wp_enqueue_script($this->prefix . '-public', plugins_url('js/scripts.js', __FILE__), array(
|
179 |
'jquery',
|
@@ -225,6 +239,27 @@ class ECWD {
|
|
225 |
return $default_timezone;
|
226 |
}
|
227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
/**
|
229 |
* Return the plugin name.
|
230 |
*/
|
@@ -246,6 +281,15 @@ class ECWD {
|
|
246 |
return $this->version;
|
247 |
}
|
248 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
/**
|
250 |
* Return an instance of this class.
|
251 |
*/
|
6 |
*/
|
7 |
class ECWD {
|
8 |
|
9 |
+
protected $version = '1.0.95';
|
10 |
protected $plugin_name = 'event-calendar-wd';
|
11 |
protected $prefix = 'ecwd';
|
12 |
protected static $instance = null;
|
149 |
* Load public facing scripts
|
150 |
*/
|
151 |
public function enqueue_scripts() {
|
152 |
+
global $wp_scripts, $post,$ecwd_options;
|
153 |
+
$map_included = false;
|
154 |
|
155 |
$scripts_key = $this->version . '_' . ECWD_SCRIPTS_KEY;
|
156 |
+
|
157 |
+
$load_map = true;
|
158 |
+
if($post->post_type == "ecwd_venue") {
|
159 |
+
if(get_post_meta($post->ID, 'ecwd_venue_show_map', true) !== '1'){
|
160 |
+
$load_map = false;
|
161 |
+
}
|
162 |
+
}else if($post->post_type == "ecwd_event"){
|
163 |
+
if(get_post_meta($post->ID, 'ecwd_event_show_map',true) !== '1'){
|
164 |
+
$load_map = false;
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
$gmap_key = (isset($ecwd_options['gmap_key'])) ? trim($ecwd_options['gmap_key']) : "";
|
169 |
+
if (is_object($post) && $load_map === true && !empty($gmap_key)) {
|
170 |
if (isset($post->post_type) && ($post->post_type == 'ecwd_event' || $post->post_type == 'ecwd_venue' || strpos($post->post_content, 'ecwd id') !== false)) {
|
171 |
if (isset($wp_scripts->registered) && $wp_scripts->registered) {
|
172 |
foreach ($wp_scripts->registered as $wp_script) {
|
173 |
+
if (isset($wp_scripts->src) && $wp_script->src && (strpos($wp_script->src, 'maps.googleapis.com') || strpos($wp_script->src, 'maps.google.com')) !== false) {
|
174 |
if (is_array($wp_scripts->queue) && in_array($wp_script->handle, $wp_scripts->queue)) {
|
175 |
$map_included = true;
|
176 |
break;
|
179 |
}
|
180 |
}
|
181 |
|
182 |
+
if (!$map_included) {
|
183 |
+
wp_enqueue_script($this->prefix . '-maps-public', 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places&key=' . $gmap_key, array('jquery'), $scripts_key, false);
|
184 |
}
|
185 |
}
|
186 |
+
}
|
187 |
|
188 |
+
if(!empty($gmap_key) && $load_map === true) {
|
189 |
+
wp_enqueue_script($this->prefix . '-gmap-public', plugins_url('js/gmap/gmap3.js', __FILE__), array('jquery'), $scripts_key, true);
|
190 |
+
}
|
191 |
wp_enqueue_script($this->prefix . '-popup', plugins_url('js/ecwd_popup.js', __FILE__), array('jquery'), $scripts_key, true);
|
192 |
wp_enqueue_script($this->prefix . '-public', plugins_url('js/scripts.js', __FILE__), array(
|
193 |
'jquery',
|
239 |
return $default_timezone;
|
240 |
}
|
241 |
|
242 |
+
public static function sanitize_array($data) {
|
243 |
+
if (!is_array($data)) {
|
244 |
+
if (is_string($data)) {
|
245 |
+
return sanitize_text_field($data);
|
246 |
+
}
|
247 |
+
return $data;
|
248 |
+
}
|
249 |
+
|
250 |
+
if (empty($data)) {
|
251 |
+
return $data;
|
252 |
+
}
|
253 |
+
|
254 |
+
foreach ($data as $key => $value) {
|
255 |
+
if (is_string($value)) {
|
256 |
+
$data[$key] = sanitize_text_field($value);
|
257 |
+
}
|
258 |
+
}
|
259 |
+
|
260 |
+
return $data;
|
261 |
+
}
|
262 |
+
|
263 |
/**
|
264 |
* Return the plugin name.
|
265 |
*/
|
281 |
return $this->version;
|
282 |
}
|
283 |
|
284 |
+
public static function add_http($url){
|
285 |
+
$url = trim($url);
|
286 |
+
if (empty($url) === false && strpos($url,'http://') === false && strpos($url,'https://') === false){
|
287 |
+
$url = 'http://'.$url;
|
288 |
+
}
|
289 |
+
return $url;
|
290 |
+
}
|
291 |
+
|
292 |
+
|
293 |
/**
|
294 |
* Return an instance of this class.
|
295 |
*/
|
includes/activation_settings_page.php
CHANGED
@@ -13,7 +13,7 @@ if (isset($_POST["ecwd_settings_general"])) {
|
|
13 |
$settings = array("date_format", "time_format", "week_starts", "events_slug", "event_slug", "cpt_order", "events_in_popup", "show_repeat_rate");
|
14 |
foreach ($settings as $set) {
|
15 |
if (isset($_POST["ecwd_settings_general"][$set])) {
|
16 |
-
$sett[$set] = $_POST["ecwd_settings_general"][$set];
|
17 |
}
|
18 |
}
|
19 |
update_option("ecwd_settings_general", $sett);
|
13 |
$settings = array("date_format", "time_format", "week_starts", "events_slug", "event_slug", "cpt_order", "events_in_popup", "show_repeat_rate");
|
14 |
foreach ($settings as $set) {
|
15 |
if (isset($_POST["ecwd_settings_general"][$set])) {
|
16 |
+
$sett[$set] = sanitize_text_field($_POST["ecwd_settings_general"][$set]);
|
17 |
}
|
18 |
}
|
19 |
update_option("ecwd_settings_general", $sett);
|
includes/calendar-class.php
CHANGED
@@ -144,7 +144,7 @@
|
|
144 |
if ($type != '' && !isset($_REQUEST['t'])) {
|
145 |
$this->displaytype = $type; // if type is not set in querystring set type to passed value
|
146 |
} else {
|
147 |
-
$this->displaytype = $_REQUEST['t']; // else set to type passed in querystring
|
148 |
}
|
149 |
}
|
150 |
// calendar date
|
@@ -152,7 +152,7 @@
|
|
152 |
$date = date('Y-n-j');
|
153 |
} // set to todays date if no value is set
|
154 |
if (isset($_REQUEST['date']) && $_REQUEST['date'] != '') {
|
155 |
-
$date = $_REQUEST['date'];
|
156 |
|
157 |
} // check if date is in the querystring
|
158 |
$date = date('Y-n-j', strtotime($date)); // format the date for parsing
|
@@ -163,13 +163,13 @@
|
|
163 |
$day = $date_part[2];
|
164 |
|
165 |
if (!is_archive() && isset($_REQUEST['y']) && $_REQUEST['y'] != '') {
|
166 |
-
$year = $_REQUEST['y'];
|
167 |
} // if year is set in querystring it takes precedence
|
168 |
if (!is_archive() && isset($_REQUEST['m']) && $_REQUEST['m'] != '') {
|
169 |
-
$month = $_REQUEST['m'];
|
170 |
} // if month is set in querystring it takes precedence
|
171 |
if (!is_archive() && isset($_REQUEST['d']) && $_REQUEST['d'] != '') {
|
172 |
-
$day = $_REQUEST['d'];
|
173 |
} // if day is set in querystring it takes precedence
|
174 |
// make sure we have year/month/day as int
|
175 |
if ($year == '') {
|
@@ -434,7 +434,9 @@
|
|
434 |
}
|
435 |
$html .= '<div class="event-main-content">';
|
436 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
437 |
-
$
|
|
|
|
|
438 |
} else if ($event['permalink'] != '') {
|
439 |
$html .= '<h3 class="event-title" itemprop="name"><a href="' . $event['permalink'] . '" ' . $this->eventlinktarget . ' itemprop="url" style="color:' . $event['color'] . ';">' . $event['title'] . '</a></h3>';
|
440 |
} else {
|
@@ -921,6 +923,7 @@
|
|
921 |
}
|
922 |
}
|
923 |
}
|
|
|
924 |
// sort by starttime for the cell
|
925 |
if (count($cellevents) > 0) {
|
926 |
$cellevents = $this->arraySort($cellevents, 'starttime');
|
@@ -1000,7 +1003,9 @@
|
|
1000 |
} */
|
1001 |
}
|
1002 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
1003 |
-
$
|
|
|
|
|
1004 |
} elseif ($cellevent['permalink']) {
|
1005 |
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . '><span itemprop="name">' . $cellevent['title'] . '</span></a>';
|
1006 |
} else {
|
@@ -1026,7 +1031,9 @@
|
|
1026 |
$eventcontent .= ' <span class="event-metalabel" style="background:' . $cellevent['color'] . '"></span>
|
1027 |
<h5 style="color:' . $cellevent['color'] . '" itemprop="name">';
|
1028 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
1029 |
-
$
|
|
|
|
|
1030 |
} else if (isset($cellevent['permalink']) && $cellevent['permalink'] !== '') {
|
1031 |
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . ' style="color: ' . $cellevent['color'] . ' "itemprop="url">' . $cellevent['title'] . '</a>';
|
1032 |
} else {
|
@@ -1038,7 +1045,9 @@
|
|
1038 |
$eventcontent .= ' <span class="event-metalabel"></span>
|
1039 |
<h5 itemprop="name">';
|
1040 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
1041 |
-
$
|
|
|
|
|
1042 |
} else if (isset($cellevent['permalink']) && $cellevent['permalink'] !== '') {
|
1043 |
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . ' itemprop="url">' . $cellevent['title'] . '</a>';
|
1044 |
} else {
|
@@ -1065,7 +1074,7 @@
|
|
1065 |
}
|
1066 |
}
|
1067 |
if ($cellevent['from'] != '') { // event details - hidden until clicked (full)
|
1068 |
-
$eventdate = '<div class="ecwd-date"><span class="metainfo"> ' . date($this->dateformat, $cellevent['
|
1069 |
if ($cellevent['to'] != '' && $cellevent['to'] != $cellevent['from']) {
|
1070 |
$eventdate .= "-" . date($this->dateformat, $cellevent['to']);
|
1071 |
}
|
@@ -1182,7 +1191,9 @@
|
|
1182 |
}
|
1183 |
|
1184 |
if ($this->event_popup == "yes" && get_post_meta($cellevent['id'], '', true)) {
|
1185 |
-
$
|
|
|
|
|
1186 |
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
1187 |
$html .= ' style="color:' . $cellevent['color'] . ';"';
|
1188 |
}
|
@@ -1219,7 +1230,7 @@
|
|
1219 |
}
|
1220 |
}
|
1221 |
if ($cellevent['from'] != '') {
|
1222 |
-
$eventdate = '<div class="ecwd-date"><span class="metainfo" itemprop="startDate" content="' . date('Y-m-d', $cellevent['from']) . 'T' . date('H:i', strtotime($cellevent['starttime'])) . '"> ' . date($this->dateformat, $cellevent['
|
1223 |
if ($cellevent['to'] != '' && $cellevent['to'] != $cellevent['from']) {
|
1224 |
$eventdate .= "-" . date($this->dateformat, $cellevent['to']);
|
1225 |
}
|
@@ -1266,7 +1277,7 @@
|
|
1266 |
$content .= '<div class="event-main-content no-events">' . __('No events', 'ecwd') . '</div>';
|
1267 |
}
|
1268 |
}
|
1269 |
-
$html .= '>' . $content . '</
|
1270 |
return $html;
|
1271 |
}
|
1272 |
|
144 |
if ($type != '' && !isset($_REQUEST['t'])) {
|
145 |
$this->displaytype = $type; // if type is not set in querystring set type to passed value
|
146 |
} else {
|
147 |
+
$this->displaytype = sanitize_text_field($_REQUEST['t']); // else set to type passed in querystring
|
148 |
}
|
149 |
}
|
150 |
// calendar date
|
152 |
$date = date('Y-n-j');
|
153 |
} // set to todays date if no value is set
|
154 |
if (isset($_REQUEST['date']) && $_REQUEST['date'] != '') {
|
155 |
+
$date = sanitize_text_field($_REQUEST['date']);
|
156 |
|
157 |
} // check if date is in the querystring
|
158 |
$date = date('Y-n-j', strtotime($date)); // format the date for parsing
|
163 |
$day = $date_part[2];
|
164 |
|
165 |
if (!is_archive() && isset($_REQUEST['y']) && $_REQUEST['y'] != '') {
|
166 |
+
$year = sanitize_text_field($_REQUEST['y']);
|
167 |
} // if year is set in querystring it takes precedence
|
168 |
if (!is_archive() && isset($_REQUEST['m']) && $_REQUEST['m'] != '') {
|
169 |
+
$month = sanitize_text_field($_REQUEST['m']);
|
170 |
} // if month is set in querystring it takes precedence
|
171 |
if (!is_archive() && isset($_REQUEST['d']) && $_REQUEST['d'] != '') {
|
172 |
+
$day = sanitize_text_field($_REQUEST['d']);
|
173 |
} // if day is set in querystring it takes precedence
|
174 |
// make sure we have year/month/day as int
|
175 |
if ($year == '') {
|
434 |
}
|
435 |
$html .= '<div class="event-main-content">';
|
436 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
437 |
+
$date_data = 'start-date-data="' . date("Y-m-d", strtotime($event['date'])) . '"';
|
438 |
+
$date_data .= ' end-date-data="' . date("Y-m-d", strtotime($event['to'])) . '"';
|
439 |
+
$html .= '<h3 class="event-title" itemprop="name"><span ' . $date_data . ' class="ecwd_open_event_popup event' . $event['id'] . '" style="color:' . $event['color'] . ';">' . $event['title'] . '</span></h3>';
|
440 |
} else if ($event['permalink'] != '') {
|
441 |
$html .= '<h3 class="event-title" itemprop="name"><a href="' . $event['permalink'] . '" ' . $this->eventlinktarget . ' itemprop="url" style="color:' . $event['color'] . ';">' . $event['title'] . '</a></h3>';
|
442 |
} else {
|
923 |
}
|
924 |
}
|
925 |
}
|
926 |
+
|
927 |
// sort by starttime for the cell
|
928 |
if (count($cellevents) > 0) {
|
929 |
$cellevents = $this->arraySort($cellevents, 'starttime');
|
1003 |
} */
|
1004 |
}
|
1005 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
1006 |
+
$date_data = 'start-date-data="' . date("Y-m-d", strtotime($cellevent['date'])) . '"';
|
1007 |
+
$date_data .= ' end-date-data="'.date("Y-m-d", $cellevent['to']).'"';
|
1008 |
+
$eventcontent .= '<span ' . $date_data . ' class="ecwd_open_event_popup event' . $cellevent['id'] . '" itemprop="name">' . $cellevent['title'] . '</span>';
|
1009 |
} elseif ($cellevent['permalink']) {
|
1010 |
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . '><span itemprop="name">' . $cellevent['title'] . '</span></a>';
|
1011 |
} else {
|
1031 |
$eventcontent .= ' <span class="event-metalabel" style="background:' . $cellevent['color'] . '"></span>
|
1032 |
<h5 style="color:' . $cellevent['color'] . '" itemprop="name">';
|
1033 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
1034 |
+
$date_data = 'start-date-data="' . date("Y-m-d", strtotime($cellevent['date'])) . '"';
|
1035 |
+
$date_data .= ' end-date-data="' . date("Y-m-d", $cellevent['to']) . '"';
|
1036 |
+
$eventcontent .= '<span ' . $date_data . ' class="ecwd_open_event_popup event' . $cellevent['id'] . ' "itemprop="url">' . $cellevent['title'] . '</span>';
|
1037 |
} else if (isset($cellevent['permalink']) && $cellevent['permalink'] !== '') {
|
1038 |
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . ' style="color: ' . $cellevent['color'] . ' "itemprop="url">' . $cellevent['title'] . '</a>';
|
1039 |
} else {
|
1045 |
$eventcontent .= ' <span class="event-metalabel"></span>
|
1046 |
<h5 itemprop="name">';
|
1047 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
1048 |
+
$date_data = 'start-date-data="' . date("Y-m-d", strtotime($cellevent['date'])) . '"';
|
1049 |
+
$date_data .= ' end-date-data="' . date("Y-m-d", $cellevent['to']) . '"';
|
1050 |
+
$eventcontent .= '<span ' . $date_data . ' class="ecwd_open_event_popup event' . $cellevent['id'] . '">' . $cellevent['title'] . '</span>';
|
1051 |
} else if (isset($cellevent['permalink']) && $cellevent['permalink'] !== '') {
|
1052 |
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . ' itemprop="url">' . $cellevent['title'] . '</a>';
|
1053 |
} else {
|
1074 |
}
|
1075 |
}
|
1076 |
if ($cellevent['from'] != '') { // event details - hidden until clicked (full)
|
1077 |
+
$eventdate = '<div class="ecwd-date"><span class="metainfo"> ' . date($this->dateformat, strtotime($cellevent['date']));
|
1078 |
if ($cellevent['to'] != '' && $cellevent['to'] != $cellevent['from']) {
|
1079 |
$eventdate .= "-" . date($this->dateformat, $cellevent['to']);
|
1080 |
}
|
1191 |
}
|
1192 |
|
1193 |
if ($this->event_popup == "yes" && get_post_meta($cellevent['id'], '', true)) {
|
1194 |
+
$date_data = 'start-date-data="' . date("Y-m-d", strtotime($cellevent['date'])) . '"';
|
1195 |
+
$date_data .= ' end-date-data="'.date("Y-m-d", $cellevent['to']).'"';
|
1196 |
+
$html .= '<h3 class="event-title" itemprop="name"><span '.$date_data.' class="ecwd_open_event_popup event' . $cellevent['id'] . '"';
|
1197 |
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
1198 |
$html .= ' style="color:' . $cellevent['color'] . ';"';
|
1199 |
}
|
1230 |
}
|
1231 |
}
|
1232 |
if ($cellevent['from'] != '') {
|
1233 |
+
$eventdate = '<div class="ecwd-date"><span class="metainfo" itemprop="startDate" content="' . date('Y-m-d', $cellevent['from']) . 'T' . date('H:i', strtotime($cellevent['starttime'])) . '"> ' . date($this->dateformat, strtotime($cellevent['date']));
|
1234 |
if ($cellevent['to'] != '' && $cellevent['to'] != $cellevent['from']) {
|
1235 |
$eventdate .= "-" . date($this->dateformat, $cellevent['to']);
|
1236 |
}
|
1277 |
$content .= '<div class="event-main-content no-events">' . __('No events', 'ecwd') . '</div>';
|
1278 |
}
|
1279 |
}
|
1280 |
+
$html .= '>' . $content . '</' . $tag . '>';
|
1281 |
return $html;
|
1282 |
}
|
1283 |
|
includes/ecwd-cpt-class.php
CHANGED
@@ -32,6 +32,7 @@ class ECWD_Cpt {
|
|
32 |
add_action('add_meta_boxes', array($this, 'events_cpt_meta'));
|
33 |
add_action('add_meta_boxes', array($this, 'themes_cpt_meta'));
|
34 |
add_action('add_meta_boxes', array($this, 'venues_cpt_meta'));
|
|
|
35 |
add_action('post_updated', array($this, 'save_meta'), 10, 3);
|
36 |
add_action('manage_' . ECWD_PLUGIN_PREFIX . '_calendar_posts_custom_column', array(
|
37 |
$this,
|
@@ -101,8 +102,9 @@ class ECWD_Cpt {
|
|
101 |
}
|
102 |
|
103 |
public function change_events_locations($venue_id) {
|
104 |
-
$venue_location = (isset($_POST['ecwd_venue_location'])) ? $_POST['ecwd_venue_location'] : "";
|
105 |
-
$venue_lat_long = (isset($_POST['ecwd_venue_lat_long']) && !empty($venue_location)) ? $_POST['ecwd_venue_lat_long'] : "";
|
|
|
106 |
|
107 |
$args = array(
|
108 |
'numberposts' => '-1',
|
@@ -118,6 +120,7 @@ class ECWD_Cpt {
|
|
118 |
foreach ($events as $event) {
|
119 |
update_post_meta($event->ID, 'ecwd_event_location', $venue_location);
|
120 |
update_post_meta($event->ID, 'ecwd_lat_long', $venue_lat_long);
|
|
|
121 |
}
|
122 |
|
123 |
}
|
@@ -163,7 +166,7 @@ class ECWD_Cpt {
|
|
163 |
/*
|
164 |
* get the original post id
|
165 |
*/
|
166 |
-
$post_id = ( isset($_GET['post']) ? $_GET['post'] : $_POST['post'] );
|
167 |
/*
|
168 |
* and all the original post data then
|
169 |
*/
|
@@ -265,91 +268,58 @@ class ECWD_Cpt {
|
|
265 |
$venue_rewrite = array('slug' => _x('venue', 'URL slug', 'ecwd'), "with_front" => true);
|
266 |
$organizer_rewrite = array('slug' => _x('organizer', 'URL slug', 'ecwd'), "with_front" => true);
|
267 |
}
|
268 |
-
//calendars
|
269 |
-
$show_calendar_menu = (get_option( "ecwd_subscribe_done" ) == 1 );
|
270 |
-
$calendar_labels = array(
|
271 |
-
'name' => __('Calendars', 'ecwd'),
|
272 |
-
'singular_name' => __('Calendar', 'ecwd'),
|
273 |
-
'menu_name' => __('Calendars', 'ecwd'),
|
274 |
-
'name_admin_bar' => __('Calendar', 'ecwd'),
|
275 |
-
'add_new' => __('Add New Calendar', 'ecwd'),
|
276 |
-
'add_new_item' => __('Add New Calendar', 'ecwd'),
|
277 |
-
'new_item' => __('New Calendar', 'ecwd'),
|
278 |
-
'edit_item' => __('Edit Calendar', 'ecwd'),
|
279 |
-
'view_item' => __('View Calendar', 'ecwd'),
|
280 |
-
'all_items' => __('Calendars', 'ecwd'),
|
281 |
-
'search_items' => __('Search Calendar', 'ecwd'),
|
282 |
-
'not_found' => __('No Calendars found.', 'ecwd'),
|
283 |
-
'not_found_in_trash' => __('No Calendars found in Trash.', 'ecwd')
|
284 |
-
);
|
285 |
|
286 |
-
$calendar_args = array(
|
287 |
-
'labels' => $calendar_labels,
|
288 |
-
'public' => false,
|
289 |
-
'publicly_queryable' => true,
|
290 |
-
'show_ui' => $show_calendar_menu,
|
291 |
-
'show_in_menu' => $show_calendar_menu,
|
292 |
-
'menu_position' => '26,11',
|
293 |
-
'query_var' => true,
|
294 |
-
'capability_type' => 'post',
|
295 |
-
'has_archive' => false,
|
296 |
-
'hierarchical' => false,
|
297 |
-
'menu_icon' => plugins_url('/assets/Insert-icon.png', ECWD_MAIN_FILE),
|
298 |
-
'supports' => array(
|
299 |
-
'title',
|
300 |
-
'editor'
|
301 |
-
)
|
302 |
-
);
|
303 |
|
304 |
-
|
305 |
-
|
|
|
306 |
|
307 |
-
//events
|
308 |
$labels = array(
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
);
|
|
|
322 |
$args = array(
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
'
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
'
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
'rewrite' => $rewrite
|
347 |
);
|
348 |
|
349 |
register_post_type(self::EVENT_POST_TYPE, $args);
|
350 |
|
351 |
|
352 |
-
|
|
|
353 |
$organizers_labels = array(
|
354 |
'name' => __('Organizers', 'ecwd'),
|
355 |
'singular_name' => __('Organizer', 'ecwd'),
|
@@ -370,9 +340,7 @@ class ECWD_Cpt {
|
|
370 |
'public' => true,
|
371 |
'publicly_queryable' => true,
|
372 |
'show_ui' => true,
|
373 |
-
|
374 |
-
// 'menu_position' => '26,13',
|
375 |
-
'show_in_menu' => 'edit.php?post_type=ecwd_calendar',
|
376 |
'query_var' => true,
|
377 |
'capability_type' => 'post',
|
378 |
'taxonomies' => array(),
|
@@ -390,46 +358,83 @@ class ECWD_Cpt {
|
|
390 |
register_post_type(self::ORGANIZER_POST_TYPE, $organizers_args);
|
391 |
|
392 |
|
393 |
-
|
|
|
394 |
$venues_labels = array(
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
);
|
408 |
|
409 |
$venues_args = array(
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
'
|
423 |
-
'
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
),
|
428 |
-
'rewrite' => $venue_rewrite
|
429 |
);
|
430 |
|
431 |
-
|
432 |
register_post_type(self::VENUE_POST_TYPE, $venues_args);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
433 |
if ($ecwd_config['flush_rewrite_rules']['value'] == '1') {
|
434 |
flush_rewrite_rules();
|
435 |
}
|
@@ -687,18 +692,21 @@ class ECWD_Cpt {
|
|
687 |
* Add Events post meta
|
688 |
*/
|
689 |
public function events_cpt_meta($screen = null, $context = 'advanced') {
|
|
|
|
|
|
|
|
|
|
|
690 |
add_meta_box(ECWD_PLUGIN_PREFIX . '_event_calendars_meta', __('Calendars', 'ecwd'), array(
|
691 |
$this,
|
692 |
'display_events_calendars_meta'
|
693 |
-
), ECWD_PLUGIN_PREFIX . '_event', '
|
|
|
694 |
add_meta_box(ECWD_PLUGIN_PREFIX . '_event_organizers_meta', __('Organizers', 'ecwd'), array(
|
695 |
$this,
|
696 |
'display_events_organizers_meta'
|
697 |
-
), ECWD_PLUGIN_PREFIX . '_event', 'side', 'core');
|
698 |
-
add_meta_box(ECWD_PLUGIN_PREFIX . '_event_meta', __('Event Settings', 'ecwd'), array(
|
699 |
-
$this,
|
700 |
-
'display_events_meta'
|
701 |
), ECWD_PLUGIN_PREFIX . '_event', 'advanced', 'core');
|
|
|
702 |
if (current_theme_supports('post-thumbnails', 'post') && post_type_supports('post', 'thumbnail')) {
|
703 |
add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', null, 'side', 'low');
|
704 |
}
|
@@ -839,12 +847,32 @@ class ECWD_Cpt {
|
|
839 |
* Add Themes post meta
|
840 |
*/
|
841 |
public function venues_cpt_meta() {
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
846 |
}
|
847 |
|
|
|
848 |
/**
|
849 |
* Display Theme post meta
|
850 |
*/
|
@@ -856,6 +884,11 @@ class ECWD_Cpt {
|
|
856 |
include_once( ECWD_DIR . '/views/admin/ecwd-venue-meta.php' );
|
857 |
}
|
858 |
|
|
|
|
|
|
|
|
|
|
|
859 |
//order orgs and venues by post name
|
860 |
function ecwd_archive_order($vars) {
|
861 |
global $ecwd_options;
|
@@ -937,7 +970,8 @@ class ECWD_Cpt {
|
|
937 |
ECWD_PLUGIN_PREFIX . '_calendar',
|
938 |
ECWD_PLUGIN_PREFIX . '_event',
|
939 |
ECWD_PLUGIN_PREFIX . '_theme',
|
940 |
-
ECWD_PLUGIN_PREFIX . '_venue'
|
|
|
941 |
);
|
942 |
|
943 |
// If this isn't a post, don't update it.
|
@@ -945,6 +979,31 @@ class ECWD_Cpt {
|
|
945 |
return $post_id;
|
946 |
}
|
947 |
$post_type = get_post_type($post_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
948 |
$ecwd_post_meta_fields[ECWD_PLUGIN_PREFIX . '_calendar'] = array(
|
949 |
ECWD_PLUGIN_PREFIX . '_calendar_description',
|
950 |
ECWD_PLUGIN_PREFIX . '_calendar_id',
|
@@ -1061,11 +1120,20 @@ class ECWD_Cpt {
|
|
1061 |
ECWD_PLUGIN_PREFIX . '_page_number_color',
|
1062 |
);
|
1063 |
$ecwd_post_meta_fields[ECWD_PLUGIN_PREFIX . '_venue'] = array(
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1067 |
);
|
1068 |
|
|
|
1069 |
$ecwd_post_meta_fields[$post_type] = apply_filters($post_type . '_meta', $ecwd_post_meta_fields[$post_type]);
|
1070 |
|
1071 |
if (current_user_can('edit_post', $post_id)) {
|
@@ -1351,6 +1419,60 @@ class ECWD_Cpt {
|
|
1351 |
return $template;
|
1352 |
}
|
1353 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1354 |
public function category_archive_page_query($query) {
|
1355 |
if (is_admin() === false && is_tax('ecwd_event_category') === true) {
|
1356 |
$query->query_vars['posts_per_page'] = 5;
|
32 |
add_action('add_meta_boxes', array($this, 'events_cpt_meta'));
|
33 |
add_action('add_meta_boxes', array($this, 'themes_cpt_meta'));
|
34 |
add_action('add_meta_boxes', array($this, 'venues_cpt_meta'));
|
35 |
+
add_action('add_meta_boxes', array($this, 'organizers_cpt_meta'));
|
36 |
add_action('post_updated', array($this, 'save_meta'), 10, 3);
|
37 |
add_action('manage_' . ECWD_PLUGIN_PREFIX . '_calendar_posts_custom_column', array(
|
38 |
$this,
|
102 |
}
|
103 |
|
104 |
public function change_events_locations($venue_id) {
|
105 |
+
$venue_location = (isset($_POST['ecwd_venue_location'])) ? sanitize_text_field($_POST['ecwd_venue_location'] ): "";
|
106 |
+
$venue_lat_long = (isset($_POST['ecwd_venue_lat_long']) && !empty($venue_location)) ? sanitize_text_field($_POST['ecwd_venue_lat_long']) : "";
|
107 |
+
$venue_show_map = (isset($_POST['ecwd_venue_show_map']) && $_POST['ecwd_venue_show_map'] == '1') ? '1' : 'no';
|
108 |
|
109 |
$args = array(
|
110 |
'numberposts' => '-1',
|
120 |
foreach ($events as $event) {
|
121 |
update_post_meta($event->ID, 'ecwd_event_location', $venue_location);
|
122 |
update_post_meta($event->ID, 'ecwd_lat_long', $venue_lat_long);
|
123 |
+
update_post_meta($event->ID, 'ecwd_event_show_map', $venue_show_map);
|
124 |
}
|
125 |
|
126 |
}
|
166 |
/*
|
167 |
* get the original post id
|
168 |
*/
|
169 |
+
$post_id = ( isset($_GET['post']) ? sanitize_text_field($_GET['post']) : sanitize_text_field($_POST['post']) );
|
170 |
/*
|
171 |
* and all the original post data then
|
172 |
*/
|
268 |
$venue_rewrite = array('slug' => _x('venue', 'URL slug', 'ecwd'), "with_front" => true);
|
269 |
$organizer_rewrite = array('slug' => _x('organizer', 'URL slug', 'ecwd'), "with_front" => true);
|
270 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
|
273 |
+
/******************************** EVENTS ********************************/
|
274 |
+
|
275 |
+
$show_events_tab = (get_option('ecwd_subscribe_done') === '1');
|
276 |
|
|
|
277 |
$labels = array(
|
278 |
+
'name' => __('Events', 'ecwd'),
|
279 |
+
'singular_name' => __('Event', 'ecwd'),
|
280 |
+
'name_admin_bar' => __('Event', 'ecwd'),
|
281 |
+
'add_new' => __('Add New', 'ecwd'),
|
282 |
+
'add_new_item' => __('Add New Event', 'ecwd'),
|
283 |
+
'new_item' => __('New Event', 'ecwd'),
|
284 |
+
'edit_item' => __('Edit Event', 'ecwd'),
|
285 |
+
'view_item' => __('View Event', 'ecwd'),
|
286 |
+
'all_items' => __('Events', 'ecwd'),
|
287 |
+
'search_items' => __('Search Event', 'ecwd'),
|
288 |
+
'not_found' => __('No events found.', 'ecwd'),
|
289 |
+
'not_found_in_trash' => __('No events found in Trash.', 'ecwd')
|
290 |
);
|
291 |
+
|
292 |
$args = array(
|
293 |
+
'labels' => $labels,
|
294 |
+
'public' => true,
|
295 |
+
'publicly_queryable' => true,
|
296 |
+
'show_ui' => true,
|
297 |
+
'show_in_menu' => $show_events_tab,
|
298 |
+
'menu_position' => '27,11',
|
299 |
+
'query_var' => true,
|
300 |
+
'capability_type' => 'post',
|
301 |
+
'taxonomies' => array(
|
302 |
+
ECWD_PLUGIN_PREFIX . '_event_category',
|
303 |
+
ECWD_PLUGIN_PREFIX . '_event_tag',
|
304 |
+
'calendars',
|
305 |
+
'organizers'
|
306 |
+
),
|
307 |
+
'has_archive' => true,
|
308 |
+
'hierarchical' => false,
|
309 |
+
'menu_icon' => plugins_url('/assets/Insert-icon.png', ECWD_MAIN_FILE),
|
310 |
+
'supports' => array_merge(array(
|
311 |
+
'title',
|
312 |
+
'editor',
|
313 |
+
'thumbnail'
|
314 |
+
), $event_supports),
|
315 |
+
'rewrite' => $rewrite
|
|
|
316 |
);
|
317 |
|
318 |
register_post_type(self::EVENT_POST_TYPE, $args);
|
319 |
|
320 |
|
321 |
+
/******************************** ORGANIZERS ********************************/
|
322 |
+
|
323 |
$organizers_labels = array(
|
324 |
'name' => __('Organizers', 'ecwd'),
|
325 |
'singular_name' => __('Organizer', 'ecwd'),
|
340 |
'public' => true,
|
341 |
'publicly_queryable' => true,
|
342 |
'show_ui' => true,
|
343 |
+
'show_in_menu' => ECWD_MENU_SLUG,
|
|
|
|
|
344 |
'query_var' => true,
|
345 |
'capability_type' => 'post',
|
346 |
'taxonomies' => array(),
|
358 |
register_post_type(self::ORGANIZER_POST_TYPE, $organizers_args);
|
359 |
|
360 |
|
361 |
+
/******************************** VENUES ********************************/
|
362 |
+
|
363 |
$venues_labels = array(
|
364 |
+
'name' => __('Venues', 'ecwd'),
|
365 |
+
'singular_name' => __('Venue', 'ecwd'),
|
366 |
+
'name_admin_bar' => __('Venue', 'ecwd'),
|
367 |
+
'add_new' => __('Add New', 'ecwd'),
|
368 |
+
'add_new_item' => __('Add New Venue', 'ecwd'),
|
369 |
+
'new_item' => __('New Venue', 'ecwd'),
|
370 |
+
'edit_item' => __('Edit Venue', 'ecwd'),
|
371 |
+
'view_item' => __('View Venue', 'ecwd'),
|
372 |
+
'all_items' => __('Venues', 'ecwd'),
|
373 |
+
'search_items' => __('Search Venue', 'ecwd'),
|
374 |
+
'not_found' => __('No Venues found.', 'ecwd'),
|
375 |
+
'not_found_in_trash' => __('No Venues found in Trash.', 'ecwd')
|
376 |
);
|
377 |
|
378 |
$venues_args = array(
|
379 |
+
'labels' => $venues_labels,
|
380 |
+
'public' => true,
|
381 |
+
'publicly_queryable' => true,
|
382 |
+
'show_ui' => true,
|
383 |
+
'show_in_menu' => ECWD_MENU_SLUG,
|
384 |
+
'query_var' => true,
|
385 |
+
'capability_type' => 'post',
|
386 |
+
'taxonomies' => array(),
|
387 |
+
'has_archive' => true,
|
388 |
+
'hierarchical' => true,
|
389 |
+
'menu_icon' => plugins_url('/assets/venue-icon.png', ECWD_MAIN_FILE),
|
390 |
+
'supports' => array(
|
391 |
+
'title',
|
392 |
+
'editor',
|
393 |
+
'thumbnail'
|
394 |
+
),
|
395 |
+
'rewrite' => $venue_rewrite
|
|
|
|
|
396 |
);
|
397 |
|
|
|
398 |
register_post_type(self::VENUE_POST_TYPE, $venues_args);
|
399 |
+
|
400 |
+
|
401 |
+
/******************************** CALENDAR ********************************/
|
402 |
+
|
403 |
+
$calendar_labels = array(
|
404 |
+
'name' => __('Calendars', 'ecwd'),
|
405 |
+
'singular_name' => __('Calendar', 'ecwd'),
|
406 |
+
'menu_name' => __('Calendars', 'ecwd'),
|
407 |
+
'name_admin_bar' => __('Calendar', 'ecwd'),
|
408 |
+
'add_new' => __('Add New Calendar', 'ecwd'),
|
409 |
+
'add_new_item' => __('Add New Calendar', 'ecwd'),
|
410 |
+
'new_item' => __('New Calendar', 'ecwd'),
|
411 |
+
'edit_item' => __('Edit Calendar', 'ecwd'),
|
412 |
+
'view_item' => __('View Calendar', 'ecwd'),
|
413 |
+
'all_items' => __('Calendars', 'ecwd'),
|
414 |
+
'search_items' => __('Search Calendar', 'ecwd'),
|
415 |
+
'not_found' => __('No Calendars found.', 'ecwd'),
|
416 |
+
'not_found_in_trash' => __('No Calendars found in Trash.', 'ecwd')
|
417 |
+
);
|
418 |
+
|
419 |
+
$calendar_args = array(
|
420 |
+
'labels' => $calendar_labels,
|
421 |
+
'public' => true,
|
422 |
+
'publicly_queryable' => true,
|
423 |
+
'show_ui' => true,
|
424 |
+
'show_in_menu' => ECWD_MENU_SLUG,
|
425 |
+
'query_var' => true,
|
426 |
+
'capability_type' => 'post',
|
427 |
+
'has_archive' => false,
|
428 |
+
'hierarchical' => false,
|
429 |
+
'menu_icon' => plugins_url('/assets/Insert-icon.png', ECWD_MAIN_FILE),
|
430 |
+
'supports' => array(
|
431 |
+
'title',
|
432 |
+
'editor'
|
433 |
+
)
|
434 |
+
);
|
435 |
+
|
436 |
+
register_post_type(self::CALENDAR_POST_TYPE, $calendar_args);
|
437 |
+
|
438 |
if ($ecwd_config['flush_rewrite_rules']['value'] == '1') {
|
439 |
flush_rewrite_rules();
|
440 |
}
|
692 |
* Add Events post meta
|
693 |
*/
|
694 |
public function events_cpt_meta($screen = null, $context = 'advanced') {
|
695 |
+
add_meta_box(ECWD_PLUGIN_PREFIX . '_event_meta', __('Event Settings', 'ecwd'), array(
|
696 |
+
$this,
|
697 |
+
'display_events_meta'
|
698 |
+
), ECWD_PLUGIN_PREFIX . '_event', 'advanced', 'core');
|
699 |
+
|
700 |
add_meta_box(ECWD_PLUGIN_PREFIX . '_event_calendars_meta', __('Calendars', 'ecwd'), array(
|
701 |
$this,
|
702 |
'display_events_calendars_meta'
|
703 |
+
), ECWD_PLUGIN_PREFIX . '_event', 'advanced', 'core');
|
704 |
+
|
705 |
add_meta_box(ECWD_PLUGIN_PREFIX . '_event_organizers_meta', __('Organizers', 'ecwd'), array(
|
706 |
$this,
|
707 |
'display_events_organizers_meta'
|
|
|
|
|
|
|
|
|
708 |
), ECWD_PLUGIN_PREFIX . '_event', 'advanced', 'core');
|
709 |
+
|
710 |
if (current_theme_supports('post-thumbnails', 'post') && post_type_supports('post', 'thumbnail')) {
|
711 |
add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', null, 'side', 'low');
|
712 |
}
|
847 |
* Add Themes post meta
|
848 |
*/
|
849 |
public function venues_cpt_meta() {
|
850 |
+
|
851 |
+
add_meta_box(
|
852 |
+
ECWD_PLUGIN_PREFIX . '_venue_meta',
|
853 |
+
__('Venue Location', 'ecwd'),
|
854 |
+
array($this, 'display_venue_meta'),
|
855 |
+
ECWD_PLUGIN_PREFIX . '_venue',
|
856 |
+
'advanced',
|
857 |
+
'core'
|
858 |
+
);
|
859 |
+
|
860 |
+
}
|
861 |
+
|
862 |
+
|
863 |
+
public function organizers_cpt_meta() {
|
864 |
+
add_meta_box(
|
865 |
+
ECWD_PLUGIN_PREFIX . '_organizer_meta',
|
866 |
+
__('Organizer settings', 'ecwd'),
|
867 |
+
array($this, 'display_organizer_meta'),
|
868 |
+
ECWD_PLUGIN_PREFIX . '_organizer',
|
869 |
+
'advanced',
|
870 |
+
'core'
|
871 |
+
);
|
872 |
+
|
873 |
}
|
874 |
|
875 |
+
|
876 |
/**
|
877 |
* Display Theme post meta
|
878 |
*/
|
884 |
include_once( ECWD_DIR . '/views/admin/ecwd-venue-meta.php' );
|
885 |
}
|
886 |
|
887 |
+
public function display_organizer_meta(){
|
888 |
+
include_once( ECWD_DIR . '/views/admin/ecwd-organizer-meta.php' );
|
889 |
+
}
|
890 |
+
|
891 |
+
|
892 |
//order orgs and venues by post name
|
893 |
function ecwd_archive_order($vars) {
|
894 |
global $ecwd_options;
|
970 |
ECWD_PLUGIN_PREFIX . '_calendar',
|
971 |
ECWD_PLUGIN_PREFIX . '_event',
|
972 |
ECWD_PLUGIN_PREFIX . '_theme',
|
973 |
+
ECWD_PLUGIN_PREFIX . '_venue',
|
974 |
+
ECWD_PLUGIN_PREFIX . '_organizer'
|
975 |
);
|
976 |
|
977 |
// If this isn't a post, don't update it.
|
979 |
return $post_id;
|
980 |
}
|
981 |
$post_type = get_post_type($post_id);
|
982 |
+
|
983 |
+
if ($post_type == "ecwd_event") {
|
984 |
+
if (isset($_POST['ecwd_event_venue']) && ($_POST['ecwd_event_venue'] == '0' && isset($_POST['ecwd_venue_title']))) {
|
985 |
+
$trim_title = trim(sanitize_text_field($_POST['ecwd_venue_title']));
|
986 |
+
if (!empty($trim_title)) {
|
987 |
+
$_POST['ecwd_event_venue'] = $this->add_new_venue();
|
988 |
+
}else{
|
989 |
+
$_POST['ecwd_event_location'] = "";
|
990 |
+
$_POST['ecwd_lat_long'] = "40.712784,-74.005941";
|
991 |
+
}
|
992 |
+
}
|
993 |
+
if(isset($_POST['ecwd_event_venue'])) {
|
994 |
+
if ($_POST['ecwd_event_venue'] == '0') {
|
995 |
+
$_POST['ecwd_event_show_map'] = 'no';
|
996 |
+
} else {
|
997 |
+
$_POST['ecwd_event_show_map'] = ($_POST['ecwd_venue_show_map'] == '1') ? '1' : 'no';
|
998 |
+
}
|
999 |
+
}
|
1000 |
+
|
1001 |
+
}else if($post_type == 'ecwd_calendar'){
|
1002 |
+
$this->save_default_calendar_meta($post_id);
|
1003 |
+
}
|
1004 |
+
|
1005 |
+
|
1006 |
+
|
1007 |
$ecwd_post_meta_fields[ECWD_PLUGIN_PREFIX . '_calendar'] = array(
|
1008 |
ECWD_PLUGIN_PREFIX . '_calendar_description',
|
1009 |
ECWD_PLUGIN_PREFIX . '_calendar_id',
|
1120 |
ECWD_PLUGIN_PREFIX . '_page_number_color',
|
1121 |
);
|
1122 |
$ecwd_post_meta_fields[ECWD_PLUGIN_PREFIX . '_venue'] = array(
|
1123 |
+
'ecwd_venue_meta_phone',
|
1124 |
+
'ecwd_venue_meta_website',
|
1125 |
+
'ecwd_venue_show_map',
|
1126 |
+
ECWD_PLUGIN_PREFIX . '_venue_location',
|
1127 |
+
ECWD_PLUGIN_PREFIX . '_venue_lat_long',
|
1128 |
+
ECWD_PLUGIN_PREFIX . '_map_zoom',
|
1129 |
+
);
|
1130 |
+
|
1131 |
+
$ecwd_post_meta_fields[ECWD_PLUGIN_PREFIX . '_organizer'] = array(
|
1132 |
+
'ecwd_organizer_meta_website',
|
1133 |
+
'ecwd_organizer_meta_phone'
|
1134 |
);
|
1135 |
|
1136 |
+
|
1137 |
$ecwd_post_meta_fields[$post_type] = apply_filters($post_type . '_meta', $ecwd_post_meta_fields[$post_type]);
|
1138 |
|
1139 |
if (current_user_can('edit_post', $post_id)) {
|
1419 |
return $template;
|
1420 |
}
|
1421 |
|
1422 |
+
private function save_default_calendar_meta($post_id){
|
1423 |
+
|
1424 |
+
$is_default_calendar = get_post_meta($post_id, 'ecwd_default_calendar', true);
|
1425 |
+
$is_default_calendar = ($is_default_calendar == '1');
|
1426 |
+
|
1427 |
+
$set_default_calendar = (isset($_POST['ecwd_default_calendar']) && $_POST['ecwd_default_calendar'] == '1');
|
1428 |
+
|
1429 |
+
|
1430 |
+
if ($is_default_calendar === true && $set_default_calendar === false) {
|
1431 |
+
delete_post_meta($post_id, 'ecwd_default_calendar');
|
1432 |
+
delete_option('ecwd_default_calendar');
|
1433 |
+
} else if ($is_default_calendar === false && $set_default_calendar === true) {
|
1434 |
+
$default_calendar_id = get_option('ecwd_default_calendar');
|
1435 |
+
if($default_calendar_id !== false && $default_calendar_id !== ""){
|
1436 |
+
delete_post_meta($default_calendar_id, 'ecwd_default_calendar');
|
1437 |
+
}
|
1438 |
+
update_post_meta($post_id, 'ecwd_default_calendar', '1');
|
1439 |
+
update_option('ecwd_default_calendar', $post_id);
|
1440 |
+
}
|
1441 |
+
|
1442 |
+
}
|
1443 |
+
|
1444 |
+
|
1445 |
+
private function add_new_venue(){
|
1446 |
+
|
1447 |
+
$venue_title = (isset($_POST['ecwd_venue_title'])) ? sanitize_text_field($_POST['ecwd_venue_title']) : "";
|
1448 |
+
$venue_content = (isset($_POST['ecwd_venue_content'])) ? sanitize_text_field($_POST['ecwd_venue_content']) : "";
|
1449 |
+
$venue_location = (isset($_POST['ecwd_event_location'])) ? sanitize_text_field($_POST['ecwd_event_location']) : "";
|
1450 |
+
$venue_phone = (isset($_POST['ecwd_venue_meta_phone'])) ? sanitize_text_field($_POST['ecwd_venue_meta_phone']) : "";
|
1451 |
+
$venue_website = (isset($_POST['ecwd_venue_meta_website'])) ? sanitize_text_field($_POST['ecwd_venue_meta_website']) : "";
|
1452 |
+
$venue_show_map = (isset($_POST['ecwd_venue_show_map'])) ? sanitize_text_field($_POST['ecwd_venue_show_map']) : "";
|
1453 |
+
$venue_lat_long = (isset($_POST['ecwd_lat_long'])) ? sanitize_text_field($_POST['ecwd_lat_long']) : "";
|
1454 |
+
$venue_zoom = (isset($_POST['ecwd_map_zoom'])) ? sanitize_text_field($_POST['ecwd_map_zoom']) : "";
|
1455 |
+
|
1456 |
+
$post_data = array(
|
1457 |
+
'post_title' => $venue_title,
|
1458 |
+
'post_content' => $venue_content,
|
1459 |
+
'post_status' => 'publish',
|
1460 |
+
'post_type' => 'ecwd_venue',
|
1461 |
+
'meta_input' => array(
|
1462 |
+
'ecwd_venue_show_map' => $venue_show_map,
|
1463 |
+
'ecwd_venue_location' => $venue_location,
|
1464 |
+
'ecwd_venue_lat_long' => $venue_lat_long,
|
1465 |
+
'ecwd_map_zoom' => $venue_zoom,
|
1466 |
+
'ecwd_venue_meta_phone' => $venue_phone,
|
1467 |
+
'ecwd_venue_meta_website' => $venue_website
|
1468 |
+
)
|
1469 |
+
);
|
1470 |
+
|
1471 |
+
$post_id = wp_insert_post($post_data);
|
1472 |
+
return $post_id;
|
1473 |
+
}
|
1474 |
+
|
1475 |
+
|
1476 |
public function category_archive_page_query($query) {
|
1477 |
if (is_admin() === false && is_tax('ecwd_event_category') === true) {
|
1478 |
$query->query_vars['posts_per_page'] = 5;
|
includes/ecwd-cpt-filter.php
CHANGED
@@ -69,14 +69,14 @@ if (!class_exists('Tax_CTP_Filter')) {
|
|
69 |
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_date_from_filter"
|
70 |
name="<?php echo ECWD_PLUGIN_PREFIX; ?>_date_from_filter"
|
71 |
class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_date"
|
72 |
-
value="<?php echo isset($_GET[ECWD_PLUGIN_PREFIX
|
73 |
<?php
|
74 |
_e('To', 'ecwd');?>
|
75 |
<input type="text" style="width: 90px"
|
76 |
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_date_to_filter"
|
77 |
name="<?php echo ECWD_PLUGIN_PREFIX; ?>_date_to_filter"
|
78 |
class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_date"
|
79 |
-
value="<?php echo isset($_GET[ECWD_PLUGIN_PREFIX
|
80 |
</div>
|
81 |
<a href="<?php echo admin_url( 'edit.php?post_type=ecwd_event' );?>" class="button" >Reset</a>
|
82 |
<?php
|
@@ -111,21 +111,21 @@ if (!class_exists('Tax_CTP_Filter')) {
|
|
111 |
if (!empty($_GET[ECWD_PLUGIN_PREFIX . '_calendar_filter'])) {
|
112 |
$qv['meta_query'][] = array(
|
113 |
'key' => ECWD_PLUGIN_PREFIX . '_event_calendars',
|
114 |
-
'value' => serialize( strval( $_GET[ECWD_PLUGIN_PREFIX . '_calendar_filter'] ) ),
|
115 |
'compare' => 'LIKE'
|
116 |
);
|
117 |
}
|
118 |
if (!empty($_GET[ECWD_PLUGIN_PREFIX . '_organizer_filter'])) {
|
119 |
$qv['meta_query'][] = array(
|
120 |
'key' => ECWD_PLUGIN_PREFIX . '_event_organizers',
|
121 |
-
'value' => serialize( strval( $_GET[ECWD_PLUGIN_PREFIX . '_organizer_filter'] ) ),
|
122 |
'compare' => 'LIKE'
|
123 |
);
|
124 |
}
|
125 |
if (!empty($_GET[ECWD_PLUGIN_PREFIX.'_date_from_filter'])) {
|
126 |
$qv['meta_query'][] = array(
|
127 |
'key' => ECWD_PLUGIN_PREFIX . '_event_date_to',
|
128 |
-
'value' => $_GET[ECWD_PLUGIN_PREFIX.'_date_from_filter'],
|
129 |
'compare' => '>=',
|
130 |
'type' => 'DATE'
|
131 |
);
|
@@ -133,7 +133,7 @@ if (!class_exists('Tax_CTP_Filter')) {
|
|
133 |
if (!empty($_GET[ECWD_PLUGIN_PREFIX.'_date_to_filter'])) {
|
134 |
$qv['meta_query'][] = array(
|
135 |
'key' => ECWD_PLUGIN_PREFIX . '_event_date_from',
|
136 |
-
'value' => $_GET[ECWD_PLUGIN_PREFIX.'_date_to_filter'],
|
137 |
'compare' => '<=',
|
138 |
'type' => 'DATE'
|
139 |
);
|
@@ -141,7 +141,7 @@ if (!class_exists('Tax_CTP_Filter')) {
|
|
141 |
if (!empty($_GET[ECWD_PLUGIN_PREFIX . '_venue_filter'])) {
|
142 |
$qv['meta_query'][] = array(
|
143 |
'key' => ECWD_PLUGIN_PREFIX . '_event_venue',
|
144 |
-
'value' => $_GET[ECWD_PLUGIN_PREFIX . '_venue_filter'],
|
145 |
'compare' => '='
|
146 |
);
|
147 |
}
|
69 |
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_date_from_filter"
|
70 |
name="<?php echo ECWD_PLUGIN_PREFIX; ?>_date_from_filter"
|
71 |
class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_date"
|
72 |
+
value="<?php echo isset($_GET[ECWD_PLUGIN_PREFIX.'_date_from_filter'])? htmlentities(sanitize_text_field($_GET[ECWD_PLUGIN_PREFIX.'_date_from_filter'])): ''; ?>" />
|
73 |
<?php
|
74 |
_e('To', 'ecwd');?>
|
75 |
<input type="text" style="width: 90px"
|
76 |
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_date_to_filter"
|
77 |
name="<?php echo ECWD_PLUGIN_PREFIX; ?>_date_to_filter"
|
78 |
class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_date"
|
79 |
+
value="<?php echo isset($_GET[ECWD_PLUGIN_PREFIX.'_date_to_filter'])? htmlentities(sanitize_text_field($_GET[ECWD_PLUGIN_PREFIX.'_date_to_filter'])): ''; ?>" />
|
80 |
</div>
|
81 |
<a href="<?php echo admin_url( 'edit.php?post_type=ecwd_event' );?>" class="button" >Reset</a>
|
82 |
<?php
|
111 |
if (!empty($_GET[ECWD_PLUGIN_PREFIX . '_calendar_filter'])) {
|
112 |
$qv['meta_query'][] = array(
|
113 |
'key' => ECWD_PLUGIN_PREFIX . '_event_calendars',
|
114 |
+
'value' => serialize( strval( sanitize_text_field($_GET[ECWD_PLUGIN_PREFIX . '_calendar_filter']) ) ),
|
115 |
'compare' => 'LIKE'
|
116 |
);
|
117 |
}
|
118 |
if (!empty($_GET[ECWD_PLUGIN_PREFIX . '_organizer_filter'])) {
|
119 |
$qv['meta_query'][] = array(
|
120 |
'key' => ECWD_PLUGIN_PREFIX . '_event_organizers',
|
121 |
+
'value' => serialize( strval( sanitize_text_field($_GET[ECWD_PLUGIN_PREFIX . '_organizer_filter']) ) ),
|
122 |
'compare' => 'LIKE'
|
123 |
);
|
124 |
}
|
125 |
if (!empty($_GET[ECWD_PLUGIN_PREFIX.'_date_from_filter'])) {
|
126 |
$qv['meta_query'][] = array(
|
127 |
'key' => ECWD_PLUGIN_PREFIX . '_event_date_to',
|
128 |
+
'value' => sanitize_text_field($_GET[ECWD_PLUGIN_PREFIX.'_date_from_filter']),
|
129 |
'compare' => '>=',
|
130 |
'type' => 'DATE'
|
131 |
);
|
133 |
if (!empty($_GET[ECWD_PLUGIN_PREFIX.'_date_to_filter'])) {
|
134 |
$qv['meta_query'][] = array(
|
135 |
'key' => ECWD_PLUGIN_PREFIX . '_event_date_from',
|
136 |
+
'value' => sanitize_text_field($_GET[ECWD_PLUGIN_PREFIX.'_date_to_filter']),
|
137 |
'compare' => '<=',
|
138 |
'type' => 'DATE'
|
139 |
);
|
141 |
if (!empty($_GET[ECWD_PLUGIN_PREFIX . '_venue_filter'])) {
|
142 |
$qv['meta_query'][] = array(
|
143 |
'key' => ECWD_PLUGIN_PREFIX . '_event_venue',
|
144 |
+
'value' => sanitize_text_field($_GET[ECWD_PLUGIN_PREFIX . '_venue_filter']),
|
145 |
'compare' => '='
|
146 |
);
|
147 |
}
|
includes/ecwd-display-class.php
CHANGED
@@ -27,7 +27,7 @@ class ECWD_Display {
|
|
27 |
}
|
28 |
|
29 |
if (isset($_REQUEST['date'])) {
|
30 |
-
$date = $_REQUEST['date'];
|
31 |
$date = date('Y-n-j', strtotime($date));
|
32 |
}
|
33 |
if ($date == '' && !isset($_REQUEST['date'])) {
|
@@ -40,13 +40,13 @@ class ECWD_Display {
|
|
40 |
$month = $date_part[1];
|
41 |
$day = $date_part[2];
|
42 |
if (isset($_REQUEST['y']) && $_REQUEST['y'] != '') {
|
43 |
-
$year = $_REQUEST['y'];
|
44 |
} // if year is set in querystring it takes precedence
|
45 |
if (isset($_REQUEST['m']) && $_REQUEST['m'] != '') {
|
46 |
-
$month = $_REQUEST['m'];
|
47 |
} // if month is set in querystring it takes precedence
|
48 |
if (isset($_REQUEST['d']) && $_REQUEST['d'] != '') {
|
49 |
-
$day = $_REQUEST['d'];
|
50 |
} // if day is set in querystring it takes precedence
|
51 |
|
52 |
if ($year == '') {
|
@@ -247,7 +247,7 @@ class ECWD_Display {
|
|
247 |
}
|
248 |
}
|
249 |
$ecwd_event_metas = get_post_meta($ecwd_event->ID, '', true);
|
250 |
-
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'] = array(0 => '')
|
251 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'])) {
|
252 |
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'] = array(0 => '');
|
253 |
}
|
@@ -296,6 +296,7 @@ class ECWD_Display {
|
|
296 |
|
297 |
}
|
298 |
}
|
|
|
299 |
$this->merged_events += $google_events + $facebook_events + $ical_events + $events;
|
300 |
|
301 |
//$this->merged_events += $events;
|
27 |
}
|
28 |
|
29 |
if (isset($_REQUEST['date'])) {
|
30 |
+
$date = sanitize_text_field($_REQUEST['date']);
|
31 |
$date = date('Y-n-j', strtotime($date));
|
32 |
}
|
33 |
if ($date == '' && !isset($_REQUEST['date'])) {
|
40 |
$month = $date_part[1];
|
41 |
$day = $date_part[2];
|
42 |
if (isset($_REQUEST['y']) && $_REQUEST['y'] != '') {
|
43 |
+
$year = sanitize_text_field($_REQUEST['y']);
|
44 |
} // if year is set in querystring it takes precedence
|
45 |
if (isset($_REQUEST['m']) && $_REQUEST['m'] != '') {
|
46 |
+
$month = sanitize_text_field($_REQUEST['m']);
|
47 |
} // if month is set in querystring it takes precedence
|
48 |
if (isset($_REQUEST['d']) && $_REQUEST['d'] != '') {
|
49 |
+
$day = sanitize_text_field($_REQUEST['d']);
|
50 |
} // if day is set in querystring it takes precedence
|
51 |
|
52 |
if ($year == '') {
|
247 |
}
|
248 |
}
|
249 |
$ecwd_event_metas = get_post_meta($ecwd_event->ID, '', true);
|
250 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'] = array(0 => '');//???
|
251 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'])) {
|
252 |
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'] = array(0 => '');
|
253 |
}
|
296 |
|
297 |
}
|
298 |
}
|
299 |
+
|
300 |
$this->merged_events += $google_events + $facebook_events + $ical_events + $events;
|
301 |
|
302 |
//$this->merged_events += $events;
|
includes/ecwd-functions.php
CHANGED
@@ -5,7 +5,7 @@ function ecwd_print_calendar($calendar_ids, $display = 'mini', $args = array(),
|
|
5 |
global $ecwd_options;
|
6 |
(isset($ecwd_options['events_in_popup']) && $ecwd_options['events_in_popup'] == "1") ? $popup = "yes" : $popup = "no";
|
7 |
wp_enqueue_script(ECWD_PLUGIN_PREFIX . '-public');
|
8 |
-
$gmap_key = (isset($ecwd_options['gmap_key'])) ? $ecwd_options['gmap_key'] : "";
|
9 |
wp_localize_script(ECWD_PLUGIN_PREFIX . '-public', 'ecwd', array(
|
10 |
'ajaxurl' => admin_url('admin-ajax.php'),
|
11 |
'ajaxnonce' => wp_create_nonce(ECWD_PLUGIN_PREFIX . '_ajax_nonce'),
|
@@ -159,10 +159,10 @@ function ecwd_ajax() {
|
|
159 |
$args['date'] = '';
|
160 |
}
|
161 |
if ($args['date'] == '' && isset($_POST[ECWD_PLUGIN_PREFIX . '_date_filter'])) {
|
162 |
-
$args['date'] = $_POST[ECWD_PLUGIN_PREFIX . '_date_filter'];
|
163 |
}
|
164 |
if (isset($_POST[ECWD_PLUGIN_PREFIX . '_prev_display']) && $_POST[ECWD_PLUGIN_PREFIX . '_prev_display'] != '') {
|
165 |
-
$args['prev_display'] = $_POST[ECWD_PLUGIN_PREFIX . '_prev_display'];
|
166 |
} else {
|
167 |
$args['prev_display'] = '';
|
168 |
}
|
@@ -186,19 +186,19 @@ function ecwd_ajax() {
|
|
186 |
$args['search_params'] = array();
|
187 |
if (( isset($_POST[ECWD_PLUGIN_PREFIX . '_query']) && $_POST[ECWD_PLUGIN_PREFIX . '_query'] != '' ) || isset($_POST[ECWD_PLUGIN_PREFIX . '_categories']) || ( isset($_POST[ECWD_PLUGIN_PREFIX . '_tags']) ) || isset($_POST[ECWD_PLUGIN_PREFIX . '_venues']) || isset($_POST[ECWD_PLUGIN_PREFIX . '_organizers']) || isset($_POST[ECWD_PLUGIN_PREFIX . '_weekdays'])) {
|
188 |
|
189 |
-
$args['search_params']['query'] = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_query']) ? $_POST[ECWD_PLUGIN_PREFIX . '_query'] : 0 );
|
190 |
-
$args['search_params']['categories'] = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_categories']) ? $_POST[ECWD_PLUGIN_PREFIX . '_categories'] : 0 );
|
191 |
-
$args['search_params']['weekdays'] = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_weekdays']) ? $_POST[ECWD_PLUGIN_PREFIX . '_weekdays'] : 0 );
|
192 |
-
$args['search_params']['tags'] = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_tags']) ? $_POST[ECWD_PLUGIN_PREFIX . '_tags'] : 0 );
|
193 |
-
$args['search_params']['venues'] = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_venues']) ? $_POST[ECWD_PLUGIN_PREFIX . '_venues'] : 0 );
|
194 |
-
$args['search_params']['organizers'] = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_organizers']) ? $_POST[ECWD_PLUGIN_PREFIX . '_organizers'] : 0 );
|
195 |
$args['search'] = 1;
|
196 |
//$display = 'list';
|
197 |
}
|
198 |
-
$displays = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_displays']) ? $_POST[ECWD_PLUGIN_PREFIX . '_displays'] : null );
|
199 |
-
$filters = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_filters']) ? $_POST[ECWD_PLUGIN_PREFIX . '_filters'] : null );
|
200 |
-
$page_items = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_page_items']) ? $_POST[ECWD_PLUGIN_PREFIX . '_page_items'] : null );
|
201 |
-
$event_search = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_event_search']) ? $_POST[ECWD_PLUGIN_PREFIX . '_event_search'] : null );
|
202 |
$args['displays'] = $displays;
|
203 |
$args['filters'] = $filters;
|
204 |
$args['event_search'] = $event_search;
|
@@ -270,9 +270,11 @@ function replaceFirstImages($content) {
|
|
270 |
}
|
271 |
|
272 |
function ecwd_event_popup_ajax() {
|
273 |
-
$
|
|
|
|
|
274 |
if (isset($_POST['id'])) {
|
275 |
-
$post_id = $_POST['id'];
|
276 |
include_once(ECWD_DIR . '/views/ecwd-event-popup.php');
|
277 |
die;
|
278 |
}
|
@@ -285,21 +287,18 @@ function ecwd_event_content($content) {
|
|
285 |
global $post;
|
286 |
global $wp;
|
287 |
global $ecwd_options;
|
288 |
-
|
|
|
289 |
if (is_single()) {
|
290 |
-
$feat_image = '';
|
291 |
if ($post->post_type == ECWD_PLUGIN_PREFIX . '_organizer') {
|
292 |
-
$organizer_content = '';
|
293 |
ob_start();
|
294 |
-
include(
|
295 |
-
$
|
296 |
-
$content = $organizer_content;
|
297 |
} elseif ($post->post_type == ECWD_PLUGIN_PREFIX . '_venue') {
|
298 |
-
|
299 |
ob_start();
|
300 |
-
include(
|
301 |
-
$
|
302 |
-
$content = $venue_content;
|
303 |
}
|
304 |
}
|
305 |
|
5 |
global $ecwd_options;
|
6 |
(isset($ecwd_options['events_in_popup']) && $ecwd_options['events_in_popup'] == "1") ? $popup = "yes" : $popup = "no";
|
7 |
wp_enqueue_script(ECWD_PLUGIN_PREFIX . '-public');
|
8 |
+
$gmap_key = (isset($ecwd_options['gmap_key'])) ? trim($ecwd_options['gmap_key']) : "";
|
9 |
wp_localize_script(ECWD_PLUGIN_PREFIX . '-public', 'ecwd', array(
|
10 |
'ajaxurl' => admin_url('admin-ajax.php'),
|
11 |
'ajaxnonce' => wp_create_nonce(ECWD_PLUGIN_PREFIX . '_ajax_nonce'),
|
159 |
$args['date'] = '';
|
160 |
}
|
161 |
if ($args['date'] == '' && isset($_POST[ECWD_PLUGIN_PREFIX . '_date_filter'])) {
|
162 |
+
$args['date'] = sanitize_text_field($_POST[ECWD_PLUGIN_PREFIX . '_date_filter']);
|
163 |
}
|
164 |
if (isset($_POST[ECWD_PLUGIN_PREFIX . '_prev_display']) && $_POST[ECWD_PLUGIN_PREFIX . '_prev_display'] != '') {
|
165 |
+
$args['prev_display'] = sanitize_text_field($_POST[ECWD_PLUGIN_PREFIX . '_prev_display']);
|
166 |
} else {
|
167 |
$args['prev_display'] = '';
|
168 |
}
|
186 |
$args['search_params'] = array();
|
187 |
if (( isset($_POST[ECWD_PLUGIN_PREFIX . '_query']) && $_POST[ECWD_PLUGIN_PREFIX . '_query'] != '' ) || isset($_POST[ECWD_PLUGIN_PREFIX . '_categories']) || ( isset($_POST[ECWD_PLUGIN_PREFIX . '_tags']) ) || isset($_POST[ECWD_PLUGIN_PREFIX . '_venues']) || isset($_POST[ECWD_PLUGIN_PREFIX . '_organizers']) || isset($_POST[ECWD_PLUGIN_PREFIX . '_weekdays'])) {
|
188 |
|
189 |
+
$args['search_params']['query'] = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_query']) ? sanitize_text_field($_POST[ECWD_PLUGIN_PREFIX . '_query']) : 0 );
|
190 |
+
$args['search_params']['categories'] = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_categories']) ? ECWD::sanitize_array($_POST[ECWD_PLUGIN_PREFIX . '_categories']) : 0 );
|
191 |
+
$args['search_params']['weekdays'] = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_weekdays']) ? ECWD::sanitize_array($_POST[ECWD_PLUGIN_PREFIX . '_weekdays']) : 0 );
|
192 |
+
$args['search_params']['tags'] = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_tags']) ? ECWD::sanitize_array($_POST[ECWD_PLUGIN_PREFIX . '_tags']) : 0 );
|
193 |
+
$args['search_params']['venues'] = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_venues']) ? ECWD::sanitize_array($_POST[ECWD_PLUGIN_PREFIX . '_venues']) : 0 );
|
194 |
+
$args['search_params']['organizers'] = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_organizers']) ? ECWD::sanitize_array($_POST[ECWD_PLUGIN_PREFIX . '_organizers']) : 0 );
|
195 |
$args['search'] = 1;
|
196 |
//$display = 'list';
|
197 |
}
|
198 |
+
$displays = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_displays']) ? ECWD::sanitize_array($_POST[ECWD_PLUGIN_PREFIX . '_displays']) : null );
|
199 |
+
$filters = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_filters']) ? ECWD::sanitize_array($_POST[ECWD_PLUGIN_PREFIX . '_filters']) : null );
|
200 |
+
$page_items = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_page_items']) ? ECWD::sanitize_array($_POST[ECWD_PLUGIN_PREFIX . '_page_items']) : null );
|
201 |
+
$event_search = ( isset($_POST[ECWD_PLUGIN_PREFIX . '_event_search']) ? ECWD::sanitize_array($_POST[ECWD_PLUGIN_PREFIX . '_event_search']) : null );
|
202 |
$args['displays'] = $displays;
|
203 |
$args['filters'] = $filters;
|
204 |
$args['event_search'] = $event_search;
|
270 |
}
|
271 |
|
272 |
function ecwd_event_popup_ajax() {
|
273 |
+
$ajax_start_date = isset($_POST['start_date']) ? sanitize_text_field($_POST['start_date']) : null;
|
274 |
+
$ajax_end_date = isset($_POST['end_date']) ? sanitize_text_field($_POST['end_date']) : null;
|
275 |
+
|
276 |
if (isset($_POST['id'])) {
|
277 |
+
$post_id = sanitize_text_field(($_POST['id']));
|
278 |
include_once(ECWD_DIR . '/views/ecwd-event-popup.php');
|
279 |
die;
|
280 |
}
|
287 |
global $post;
|
288 |
global $wp;
|
289 |
global $ecwd_options;
|
290 |
+
|
291 |
+
|
292 |
if (is_single()) {
|
|
|
293 |
if ($post->post_type == ECWD_PLUGIN_PREFIX . '_organizer') {
|
|
|
294 |
ob_start();
|
295 |
+
include(ECWD_DIR . '/views/ecwd-organizer-content.php');
|
296 |
+
$content .= ob_get_clean();
|
|
|
297 |
} elseif ($post->post_type == ECWD_PLUGIN_PREFIX . '_venue') {
|
298 |
+
|
299 |
ob_start();
|
300 |
+
include(ECWD_DIR . '/views/ecwd-venue-content.php');
|
301 |
+
$content .= ob_get_clean();
|
|
|
302 |
}
|
303 |
}
|
304 |
|
includes/ecwd-notices-class.php
CHANGED
@@ -170,7 +170,7 @@ class ECWD_Notices {
|
|
170 |
if ( isset( $_GET['ecwd_admin_notice_ignore'] ) ) {
|
171 |
|
172 |
$admin_notices_option = get_option( 'ecwd_admin_notice', array() );
|
173 |
-
$admin_notices_option[ $_GET['ecwd_admin_notice_ignore'] ]['dismissed'] = 1;
|
174 |
update_option( 'ecwd_admin_notice', $admin_notices_option );
|
175 |
$query_str = remove_query_arg( 'ecwd_admin_notice_ignore' );
|
176 |
wp_redirect( $query_str );
|
@@ -188,12 +188,12 @@ class ECWD_Notices {
|
|
188 |
|
189 |
$current_date = current_time( "n/j/Y" );
|
190 |
$date_array = explode( '/', $current_date );
|
191 |
-
$interval = ( isset( $_GET['ecwd_int'] ) ? $_GET['ecwd_int'] : 14 );
|
192 |
$date_array[1] += $interval;
|
193 |
$new_start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
|
194 |
|
195 |
-
$admin_notices_option[ $_GET['ecwd_admin_notice_temp_ignore'] ]['start'] = $new_start;
|
196 |
-
$admin_notices_option[ $_GET['ecwd_admin_notice_temp_ignore'] ]['dismissed'] = 0;
|
197 |
update_option( 'ecwd_admin_notice', $admin_notices_option );
|
198 |
$query_str = remove_query_arg( array( 'ecwd_admin_notice_temp_ignore', 'ecwd_int' ) );
|
199 |
wp_redirect( $query_str );
|
170 |
if ( isset( $_GET['ecwd_admin_notice_ignore'] ) ) {
|
171 |
|
172 |
$admin_notices_option = get_option( 'ecwd_admin_notice', array() );
|
173 |
+
$admin_notices_option[ sanitize_text_field($_GET['ecwd_admin_notice_ignore']) ]['dismissed'] = 1;
|
174 |
update_option( 'ecwd_admin_notice', $admin_notices_option );
|
175 |
$query_str = remove_query_arg( 'ecwd_admin_notice_ignore' );
|
176 |
wp_redirect( $query_str );
|
188 |
|
189 |
$current_date = current_time( "n/j/Y" );
|
190 |
$date_array = explode( '/', $current_date );
|
191 |
+
$interval = ( isset( $_GET['ecwd_int'] ) ? sanitize_text_field($_GET['ecwd_int']) : 14 );
|
192 |
$date_array[1] += $interval;
|
193 |
$new_start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
|
194 |
|
195 |
+
$admin_notices_option[ sanitize_text_field($_GET['ecwd_admin_notice_temp_ignore']) ]['start'] = $new_start;
|
196 |
+
$admin_notices_option[ sanitize_text_field($_GET['ecwd_admin_notice_temp_ignore']) ]['dismissed'] = 0;
|
197 |
update_option( 'ecwd_admin_notice', $admin_notices_option );
|
198 |
$query_str = remove_query_arg( array( 'ecwd_admin_notice_temp_ignore', 'ecwd_int' ) );
|
199 |
wp_redirect( $query_str );
|
includes/ecwd_config.php
CHANGED
@@ -61,7 +61,7 @@ class ECWD_Config {
|
|
61 |
add_option('ecwd_config', 'on');
|
62 |
} else if ($_GET['ecwd_config'] == 'off') {
|
63 |
delete_option('ecwd_config');
|
64 |
-
header('Location:
|
65 |
die;
|
66 |
}
|
67 |
}
|
61 |
add_option('ecwd_config', 'on');
|
62 |
} else if ($_GET['ecwd_config'] == 'off') {
|
63 |
delete_option('ecwd_config');
|
64 |
+
header('Location: ' . ECWD_MENU_SLUG);
|
65 |
die;
|
66 |
}
|
67 |
}
|
includes/ecwd_pointers.php
CHANGED
@@ -46,7 +46,7 @@ class Ecwd_pointers {
|
|
46 |
private function get_page_pointers() {
|
47 |
$post_type = false;
|
48 |
if (isset($_REQUEST['post']) && intval($_REQUEST['post']) !== 0 && isset($_REQUEST['action']) && $_REQUEST['action'] === 'edit') {
|
49 |
-
$post_type = get_post_type($_REQUEST['post']);
|
50 |
}
|
51 |
foreach ($this->pointers as $id => $options) {
|
52 |
$t = false;
|
46 |
private function get_page_pointers() {
|
47 |
$post_type = false;
|
48 |
if (isset($_REQUEST['post']) && intval($_REQUEST['post']) !== 0 && isset($_REQUEST['action']) && $_REQUEST['action'] === 'edit') {
|
49 |
+
$post_type = get_post_type(sanitize_text_field($_REQUEST['post']));
|
50 |
}
|
51 |
foreach ($this->pointers as $id => $options) {
|
52 |
$t = false;
|
includes/register-settings.php
CHANGED
@@ -17,33 +17,33 @@ if (isset($_GET[ECWD_PLUGIN_PREFIX . '_clear_cache']) && $_GET[ECWD_PLUGIN_PREFI
|
|
17 |
|
18 |
if (isset($_GET[ECWD_PLUGIN_PREFIX . '_reset_script_key']) && $_GET[ECWD_PLUGIN_PREFIX . '_reset_script_key'] == 1) {
|
19 |
ECWD::scripts_key(true);
|
20 |
-
wp_redirect('
|
21 |
}
|
22 |
|
23 |
-
if (isset($_GET['ecwd_start_tour']) && $_GET['ecwd_start_tour'] == 1) {
|
24 |
-
delete_user_meta(get_current_user_id(), 'ecwd_calendar_tour');
|
25 |
-
wp_redirect('edit.php?post_type=ecwd_calendar');
|
26 |
-
}
|
27 |
-
|
28 |
-
if (isset($_GET[ECWD_PLUGIN_PREFIX . '_clear_autogen']) && $_GET[ECWD_PLUGIN_PREFIX . '_clear_autogen'] == 1) {
|
29 |
-
$posts = get_option('auto_generated_posts');
|
30 |
-
if ($posts) {
|
31 |
-
$calen_id = $posts[0];
|
32 |
-
$venue_id = $posts[1];
|
33 |
-
$org_ids = $posts[2];
|
34 |
-
$ev_ids = $posts[3];
|
35 |
-
foreach ($ev_ids as $id)
|
36 |
-
wp_delete_post($id, true);
|
37 |
-
foreach ($org_ids as $id)
|
38 |
-
wp_delete_post($id, true);
|
39 |
-
wp_delete_post($venue_id, true);
|
40 |
-
wp_delete_post($calen_id, true);
|
41 |
-
delete_option('auto_generated_posts');
|
42 |
-
echo '<div class= "updated" ><p> ' . __('Auto generated data has been deleted.', 'ecwd') . '</p></div>';
|
43 |
-
} else {
|
44 |
-
echo '<div class= "updated" ><p> ' . __('Auto generated data has already deleted.', 'ecwd') . '</p></div>';
|
45 |
-
}
|
46 |
-
}
|
47 |
|
48 |
/**
|
49 |
* Main function to register all of the plugin settings
|
@@ -68,26 +68,26 @@ function ecwd_register_settings() {
|
|
68 |
/* General Settings */
|
69 |
|
70 |
'general' => array(
|
71 |
-
'toure_option' => array(
|
72 |
-
'id' => 'toure_option',
|
73 |
-
'name' => __('Start tour', 'ecwd'),
|
74 |
-
'desc' => __('Click to start tour.', 'ecwd'),
|
75 |
-
'size' => 'small-text',
|
76 |
-
'type' => 'link',
|
77 |
-
'href' => $_SERVER['REQUEST_URI'] . '&ecwd_start_tour=1'
|
78 |
-
),
|
79 |
-
'clear_auto_gen' => array(
|
80 |
-
'id' => 'clear_auto_gen',
|
81 |
-
'name' => __('Clear auto generated data', 'ecwd'),
|
82 |
-
'desc' => __('Click to clear auto generated data', 'ecwd'),
|
83 |
-
'size' => 'small-text',
|
84 |
-
'type' => 'link',
|
85 |
-
'href' => $_SERVER['REQUEST_URI'] . '&ecwd_clear_autogen=1'
|
86 |
-
),
|
87 |
'time_zone' => array(
|
88 |
'id' => 'time_zone',
|
89 |
'name' => __('TimeZone', 'ecwd'),
|
90 |
-
'desc' => __('Use Continent/City format, e.g. Europe/Berlin. If left empty, the server timezone will be used (if set in php settings), otherwise default Europe/Berlin', 'ecwd'),
|
91 |
'size' => 'medium-text',
|
92 |
'type' => 'text',
|
93 |
'default' => ECWD::get_default_timezone()
|
@@ -155,12 +155,6 @@ function ecwd_register_settings() {
|
|
155 |
'type' => 'radio',
|
156 |
'default' => 0
|
157 |
),
|
158 |
-
'category_and_tags' => array(
|
159 |
-
'id' => 'category_and_tags',
|
160 |
-
'name' => __('Enable Category and Tags', 'ecwd'),
|
161 |
-
'desc' => __('Check to display category and Tags.', 'ecwd'),
|
162 |
-
'type' => 'checkbox'
|
163 |
-
),
|
164 |
'move_first_image' => array(
|
165 |
'id' => 'move_first_image',
|
166 |
'name' => __('Grab the first post image', 'ecwd'),
|
@@ -185,6 +179,12 @@ function ecwd_register_settings() {
|
|
185 |
'type' => 'text',
|
186 |
'default' => '3'
|
187 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
'events_archive_page_order' => array(
|
189 |
'id' => 'events_archive_page_order',
|
190 |
'name' => __('Order of events archive page', 'ecwd'),
|
@@ -453,15 +453,13 @@ function ecwd_register_settings() {
|
|
453 |
|
454 |
/* Add the Settings sections */
|
455 |
|
456 |
-
|
457 |
-
|
458 |
-
)
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
ecwd_settings_init();
|
464 |
-
}
|
465 |
foreach ($ecwd_settings as $key => $settings) {
|
466 |
|
467 |
add_settings_section(
|
@@ -474,9 +472,9 @@ function ecwd_register_settings() {
|
|
474 |
ECWD_PLUGIN_PREFIX . '_settings_' . $key . '[' . $option['id'] . ']', $option['name'], function_exists(ECWD_PLUGIN_PREFIX . '_' . $option['type'] . '_callback') ? ECWD_PLUGIN_PREFIX . '_' . $option['type'] . '_callback' : ECWD_PLUGIN_PREFIX . '_missing_callback', ECWD_PLUGIN_PREFIX . '_settings_' . $key, ECWD_PLUGIN_PREFIX . '_settings_' . $key, ecwd_get_settings_field_args($option, $key)
|
475 |
);
|
476 |
}
|
477 |
-
if ($settings_init_on_activate) {
|
478 |
-
activation_html_view();
|
479 |
-
}
|
480 |
/* Register all settings or we will get an error when trying to save */
|
481 |
register_setting(ECWD_PLUGIN_PREFIX . '_settings_' . $key, ECWD_PLUGIN_PREFIX . '_settings_' . $key, ECWD_PLUGIN_PREFIX . '_settings_sanitize');
|
482 |
}
|
17 |
|
18 |
if (isset($_GET[ECWD_PLUGIN_PREFIX . '_reset_script_key']) && $_GET[ECWD_PLUGIN_PREFIX . '_reset_script_key'] == 1) {
|
19 |
ECWD::scripts_key(true);
|
20 |
+
wp_redirect(ECWD_MENU_SLUG . '&page=ecwd_general_settings');
|
21 |
}
|
22 |
|
23 |
+
//if (isset($_GET['ecwd_start_tour']) && $_GET['ecwd_start_tour'] == 1) {
|
24 |
+
// delete_user_meta(get_current_user_id(), 'ecwd_calendar_tour');
|
25 |
+
// wp_redirect('edit.php?post_type=ecwd_calendar');
|
26 |
+
//}
|
27 |
+
|
28 |
+
//if (isset($_GET[ECWD_PLUGIN_PREFIX . '_clear_autogen']) && $_GET[ECWD_PLUGIN_PREFIX . '_clear_autogen'] == 1) {
|
29 |
+
// $posts = get_option('auto_generated_posts');
|
30 |
+
// if ($posts) {
|
31 |
+
// $calen_id = $posts[0];
|
32 |
+
// $venue_id = $posts[1];
|
33 |
+
// $org_ids = $posts[2];
|
34 |
+
// $ev_ids = $posts[3];
|
35 |
+
// foreach ($ev_ids as $id)
|
36 |
+
// wp_delete_post($id, true);
|
37 |
+
// foreach ($org_ids as $id)
|
38 |
+
// wp_delete_post($id, true);
|
39 |
+
// wp_delete_post($venue_id, true);
|
40 |
+
// wp_delete_post($calen_id, true);
|
41 |
+
// delete_option('auto_generated_posts');
|
42 |
+
// echo '<div class= "updated" ><p> ' . __('Auto generated data has been deleted.', 'ecwd') . '</p></div>';
|
43 |
+
// } else {
|
44 |
+
// echo '<div class= "updated" ><p> ' . __('Auto generated data has already deleted.', 'ecwd') . '</p></div>';
|
45 |
+
// }
|
46 |
+
//}
|
47 |
|
48 |
/**
|
49 |
* Main function to register all of the plugin settings
|
68 |
/* General Settings */
|
69 |
|
70 |
'general' => array(
|
71 |
+
// 'toure_option' => array(
|
72 |
+
// 'id' => 'toure_option',
|
73 |
+
// 'name' => __('Start tour', 'ecwd'),
|
74 |
+
// 'desc' => __('Click to start tour.', 'ecwd'),
|
75 |
+
// 'size' => 'small-text',
|
76 |
+
// 'type' => 'link',
|
77 |
+
// 'href' => $_SERVER['REQUEST_URI'] . '&ecwd_start_tour=1'
|
78 |
+
// ),
|
79 |
+
// 'clear_auto_gen' => array(
|
80 |
+
// 'id' => 'clear_auto_gen',
|
81 |
+
// 'name' => __('Clear auto generated data', 'ecwd'),
|
82 |
+
// 'desc' => __('Click to clear auto generated data', 'ecwd'),
|
83 |
+
// 'size' => 'small-text',
|
84 |
+
// 'type' => 'link',
|
85 |
+
// 'href' => $_SERVER['REQUEST_URI'] . '&ecwd_clear_autogen=1'
|
86 |
+
// ),
|
87 |
'time_zone' => array(
|
88 |
'id' => 'time_zone',
|
89 |
'name' => __('TimeZone', 'ecwd'),
|
90 |
+
'desc' => __('Use Continent/City format, e.g. Europe/Berlin. If left empty, the server timezone will be used (if set in php settings), otherwise default Europe/Berlin. <a target="_blank" href="http://php.net/manual/en/timezones.php">PHP Timezones</a>', 'ecwd'),
|
91 |
'size' => 'medium-text',
|
92 |
'type' => 'text',
|
93 |
'default' => ECWD::get_default_timezone()
|
155 |
'type' => 'radio',
|
156 |
'default' => 0
|
157 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
'move_first_image' => array(
|
159 |
'id' => 'move_first_image',
|
160 |
'name' => __('Grab the first post image', 'ecwd'),
|
179 |
'type' => 'text',
|
180 |
'default' => '3'
|
181 |
),
|
182 |
+
'category_and_tags' => array(
|
183 |
+
'id' => 'category_and_tags',
|
184 |
+
'name' => __('Enable Category and Tags', 'ecwd'),
|
185 |
+
'desc' => __('Check to display category and Tags.', 'ecwd'),
|
186 |
+
'type' => 'checkbox'
|
187 |
+
),
|
188 |
'events_archive_page_order' => array(
|
189 |
'id' => 'events_archive_page_order',
|
190 |
'name' => __('Order of events archive page', 'ecwd'),
|
453 |
|
454 |
/* Add the Settings sections */
|
455 |
|
456 |
+
//$calendar = get_posts(array('post_type' => 'ecwd_calendar'));
|
457 |
+
// $settings_init_on_activate = ((strpos($_SERVER['REQUEST_URI'], 'plugins.php')) && ((empty($calendar) && (get_option("activation_page_option") === false)) || isset($_POST['ecwd_settings_general']['week_starts'])));
|
458 |
+
// if ($settings_init_on_activate) {
|
459 |
+
// update_option("activation_page_option", "submit");
|
460 |
+
// include_once "activation_settings_page.php";
|
461 |
+
// ecwd_settings_init();
|
462 |
+
// }
|
|
|
|
|
463 |
foreach ($ecwd_settings as $key => $settings) {
|
464 |
|
465 |
add_settings_section(
|
472 |
ECWD_PLUGIN_PREFIX . '_settings_' . $key . '[' . $option['id'] . ']', $option['name'], function_exists(ECWD_PLUGIN_PREFIX . '_' . $option['type'] . '_callback') ? ECWD_PLUGIN_PREFIX . '_' . $option['type'] . '_callback' : ECWD_PLUGIN_PREFIX . '_missing_callback', ECWD_PLUGIN_PREFIX . '_settings_' . $key, ECWD_PLUGIN_PREFIX . '_settings_' . $key, ecwd_get_settings_field_args($option, $key)
|
473 |
);
|
474 |
}
|
475 |
+
// if ($settings_init_on_activate) {
|
476 |
+
// activation_html_view();
|
477 |
+
// }
|
478 |
/* Register all settings or we will get an error when trying to save */
|
479 |
register_setting(ECWD_PLUGIN_PREFIX . '_settings_' . $key, ECWD_PLUGIN_PREFIX . '_settings_' . $key, ECWD_PLUGIN_PREFIX . '_settings_sanitize');
|
480 |
}
|
js/admin/admin.js
CHANGED
@@ -3,406 +3,645 @@
|
|
3 |
*/
|
4 |
(function ($) {
|
5 |
|
6 |
-
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
}
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
}
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
}
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
52 |
} else {
|
53 |
-
|
54 |
}
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
});
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
});
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
75 |
-
|
76 |
-
|
77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
-
|
81 |
-
$("#ecwd_repeat_event_monthly").click(function () {
|
82 |
-
$(".ecwd_event_repeat_choose").prop('checked', true);
|
83 |
-
$(".ecwd_event_repeat_on_the").attr('disabled', false);
|
84 |
-
$(".select_to_enable_disable").attr('disabled', true);
|
85 |
-
});
|
86 |
|
87 |
-
|
88 |
-
|
89 |
-
$("#post").submit(function (e) {
|
90 |
-
var dateTo = Date.parse($("#ecwd_event_date_to").val()),
|
91 |
-
dateFrom = Date.parse($("#ecwd_event_date_from").val());
|
92 |
-
if (dateFrom == '' || isNaN(dateFrom) || isNaN(dateTo) || dateTo == '') {
|
93 |
-
alert('Please set the event dates');
|
94 |
-
e.preventDefault();
|
95 |
-
}
|
96 |
-
if (dateFrom && !dateTo) {
|
97 |
-
alert('Please set the end date');
|
98 |
-
e.preventDefault();
|
99 |
-
}
|
100 |
-
if (dateTo < dateFrom) {
|
101 |
-
alert('Date to must be greater or equal to Date from');
|
102 |
-
e.preventDefault();
|
103 |
-
}
|
104 |
-
if($('input[name="ecwd_event_repeat_event"]').length>0) {
|
105 |
-
var repeat = $('input[name="ecwd_event_repeat_event"]:checked').val();
|
106 |
-
var until = Date.parse($('#ecwd_event_repeat_until_input').val());
|
107 |
-
if (repeat !== 'no_repeat') {
|
108 |
-
if (until == '' || isNaN(until)) {
|
109 |
-
alert('Please set the repeat until date');
|
110 |
-
e.preventDefault();
|
111 |
-
}
|
112 |
-
if (!isNaN(dateFrom) && !isNaN(until) && until <= dateFrom) {
|
113 |
-
alert('Repeat until date must be greater than Date from');
|
114 |
-
e.preventDefault();
|
115 |
-
}
|
116 |
-
}
|
117 |
-
}
|
118 |
-
});
|
119 |
-
}
|
120 |
|
121 |
-
|
122 |
-
|
123 |
-
$(
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
|
126 |
-
|
127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
}
|
129 |
|
130 |
|
131 |
-
var wordpress_ver = params.version, upload_button;
|
132 |
-
|
133 |
-
$(".ecwd_upload_image_button").click(function (event) {
|
134 |
-
upload_button = $(this);
|
135 |
-
var frame;
|
136 |
-
if (wordpress_ver >= "3.5") {
|
137 |
-
event.preventDefault();
|
138 |
-
if (frame) {
|
139 |
-
frame.open();
|
140 |
-
return;
|
141 |
-
}
|
142 |
-
frame = wp.media();
|
143 |
-
frame.on("select", function () {
|
144 |
-
// Grab the selected attachment.
|
145 |
-
var attachment = frame.state().get("selection").first();
|
146 |
-
frame.close();
|
147 |
-
if (upload_button.parent().prev().children().hasClass("tax_list")) {
|
148 |
-
upload_button.parent().prev().children().val(attachment.attributes.url);
|
149 |
-
upload_button.parent().prev().prev().children().attr("src", attachment.attributes.url);
|
150 |
-
}
|
151 |
-
else
|
152 |
-
$("#ecwd_taxonomy_image").val(attachment.attributes.url);
|
153 |
-
});
|
154 |
-
frame.open();
|
155 |
-
}
|
156 |
-
else {
|
157 |
-
tb_show("", "media-upload.php?type=image&TB_iframe=true");
|
158 |
-
return false;
|
159 |
-
}
|
160 |
-
});
|
161 |
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
});
|
|
|
168 |
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
if (
|
186 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
} else {
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
if (confirm('Sure?')) {
|
196 |
-
var clicked_el = this;
|
197 |
-
var element = $(this).closest('.ecwd-calendar-event');
|
198 |
-
var event_id = $(element).find('input').val();
|
199 |
-
var calendar_id = $('#post_ID').val();
|
200 |
-
$.post(params.ajaxurl, {
|
201 |
-
action: 'manage_calendar_events',
|
202 |
-
ecwd_event_id: event_id,
|
203 |
-
ecwd_calendar_id: calendar_id,
|
204 |
-
ecwd_action: 'delete'
|
205 |
-
}).done(function (data) {
|
206 |
-
res = JSON.parse(data);
|
207 |
-
if (res.status == 'ok') {
|
208 |
-
$(clicked_el).removeClass('ecwd-calendar-event-delete');
|
209 |
-
$(clicked_el).addClass('ecwd-calendar-event-add');
|
210 |
-
$(clicked_el).text('+');
|
211 |
-
$(element).find('.ecwd-calendar-event-edit').addClass('hidden');
|
212 |
-
$(element).remove().appendTo('.ecwd-excluded-events');
|
213 |
-
$(element).find('input').attr('name', 'ecwd-calendar-excluded-event-id[]');
|
214 |
-
}
|
215 |
-
});
|
216 |
}
|
217 |
-
|
218 |
|
219 |
-
|
220 |
-
var clicked_el = this;
|
221 |
-
var element = $(this).closest('.ecwd-calendar-event');
|
222 |
-
var calendar_id = $('#post_ID').val();
|
223 |
-
var event_id = $(element).find('input').val();
|
224 |
-
$.post(params.ajaxurl, {
|
225 |
-
action: 'manage_calendar_events',
|
226 |
-
ecwd_event_id: event_id,
|
227 |
-
ecwd_calendar_id: calendar_id,
|
228 |
-
ecwd_action: 'add'
|
229 |
-
|
230 |
-
}).done(function (data) {
|
231 |
-
res = JSON.parse(data);
|
232 |
-
if (res.status == 'ok') {
|
233 |
-
$(clicked_el).addClass('ecwd-calendar-event-delete');
|
234 |
-
$(clicked_el).removeClass('ecwd-calendar-event-add');
|
235 |
-
$(clicked_el).text('x');
|
236 |
-
$(element).find('input').addClass('ecwd-calendar-event-id');
|
237 |
-
$(element).find('.ecwd-calendar-event-edit').removeClass('hidden');
|
238 |
-
$(element).remove().appendTo('.ecwd-events');
|
239 |
-
}
|
240 |
-
});
|
241 |
|
242 |
-
|
243 |
-
////////////////////////////////////////////////////////
|
244 |
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
});
|
249 |
-
$(document).on('mouseup', '.day-with-date', function (e) {
|
250 |
-
var position = $(this).position();
|
251 |
-
$('.event_cal_add').css({"margin":"0 auto","left":position.left});
|
252 |
-
});
|
253 |
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
var start_day = parseInt($('.ui-selected').first().find('.day-number').text());
|
269 |
-
var end_day = parseInt($('.ui-selected').last().find('.day-number').text());
|
270 |
-
var start_date = $('.ui-selected').first().attr('data-date');
|
271 |
-
var end_date = $('.ui-selected').last().attr('data-date');
|
272 |
-
if (start_day) {
|
273 |
-
if (start_day == end_day) {
|
274 |
-
$('.ecwd-dates').text(start_date);
|
275 |
-
$('#ecwd_event_date_from').val(start_date);
|
276 |
-
$('#ecwd_event_date_to').val(start_date);
|
277 |
-
}
|
278 |
-
if (end_day > start_day) {
|
279 |
-
$('.ecwd-dates').text(start_date + ' - ' + end_date);
|
280 |
-
$('#ecwd_event_date_from').val(start_date);
|
281 |
-
$('#ecwd_event_date_to').val(end_date);
|
282 |
-
|
283 |
-
}
|
284 |
-
if (start_day > end_day) {
|
285 |
-
$('.ecwd-dates').text(end_date + ' - ' + start_date);
|
286 |
-
$('#ecwd_event_date_from').val(end_date);
|
287 |
-
$('#ecwd_event_date_to').val(start_date);
|
288 |
-
}
|
289 |
-
$('.event_cal_add').removeClass('hidden');
|
290 |
-
$('.event_cal_add').show();
|
291 |
-
setTimeout(function () {
|
292 |
-
$('#ecwd_event_name').focus();
|
293 |
-
}, 1);
|
294 |
-
$('#ecwd-modal-preview').animate({
|
295 |
-
scrollTop: $(".event_cal_add").position().top
|
296 |
-
}, 1000);
|
297 |
-
}
|
298 |
-
}
|
299 |
-
});
|
300 |
});
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
|
|
323 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
});
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
$(element).parent().addClass("ui-state-active");
|
349 |
-
});
|
350 |
-
});
|
351 |
-
|
352 |
-
|
353 |
-
//////////////////////////////////////////
|
354 |
-
$('#ecwd_event_venue').change( function (e) {
|
355 |
-
|
356 |
-
if($(this).val()>0) {
|
357 |
-
var location = $(this).find(':selected').data('location');
|
358 |
-
var markerLatLong = $(this).find(':selected').data('marker');
|
359 |
-
var zoom = parseInt($(this).find(':selected').data('zoom'));
|
360 |
-
if(!zoom){
|
361 |
-
zoom = 17;
|
362 |
-
}
|
363 |
-
var lat_long = markerLatLong.split(',');
|
364 |
-
var myLatlng = new google.maps.LatLng(parseFloat(lat_long[0]), parseFloat(lat_long[1]));
|
365 |
-
//alert(markerLatLong);
|
366 |
-
|
367 |
-
deleteMarkers();
|
368 |
-
addMarker(myLatlng);
|
369 |
-
|
370 |
-
map.setCenter(myLatlng);
|
371 |
-
map.setZoom(zoom);
|
372 |
-
$('#ecwd_event_location').val(location);
|
373 |
-
$('#ecwd_map_zoom').val(zoom);
|
374 |
-
}
|
375 |
});
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
container_class:'ecwd_add_event_calendar'
|
381 |
-
});
|
382 |
-
$('#ecwd_preview_add_event_popup').ecwd_popup({
|
383 |
-
button: $('#ecwd_preview_add_event'),
|
384 |
-
title: 'Calendar',
|
385 |
-
body_class: "ecwd-modal",
|
386 |
-
container_class:'ecwd_preview_calendar'
|
387 |
-
});
|
388 |
-
|
389 |
-
if($("#ecwd-settings-content").length == 1){
|
390 |
-
var color = "rgba(51,51,51,.5)";
|
391 |
-
$('.ecwd_disabled_option').each(function(){
|
392 |
-
$(this).closest("tr").find("th").css("color",color);
|
393 |
-
|
394 |
-
$(this).closest("td").find("select").attr("disabled",true);
|
395 |
-
$(this).closest("td").find("input").attr("disabled",true);
|
396 |
-
|
397 |
-
$(this).closest("td").find("select").attr("name",'');
|
398 |
-
$(this).closest("td").find("input").attr("name",'');
|
399 |
-
|
400 |
-
$(this).closest("td").find("label").css("color",color);
|
401 |
-
$(this).closest("td").find(".description").css("color",color);
|
402 |
-
$(this).closest("td").find(".ecwd_disabled_text").css("color",color);
|
403 |
-
});
|
404 |
-
}
|
405 |
-
|
406 |
}(jQuery));
|
407 |
|
408 |
var map;
|
@@ -410,266 +649,277 @@ var markers = [];
|
|
410 |
var geocoder;
|
411 |
|
412 |
var change_event_location_obj = null;
|
413 |
-
if(jQuery('#ecwd_event_location').length > 0){
|
414 |
-
|
415 |
-
|
416 |
}
|
417 |
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
var lat_long_available = false;
|
423 |
-
if (lat_long[0]) {
|
424 |
-
var myLatlng = new google.maps.LatLng(parseFloat(lat_long[0]), parseFloat(lat_long[1]));
|
425 |
-
lat_long_available = true;
|
426 |
-
} else {
|
427 |
-
var myLatlng = new google.maps.LatLng(53.65914, 0.072050);
|
428 |
-
}
|
429 |
-
var ecwd_zoom = parseInt(document.getElementById('ecwd_map_zoom').value);
|
430 |
-
var ecwd_marker = parseInt(document.getElementById('ecwd_marker').value);
|
431 |
-
|
432 |
-
var mapOptions = {
|
433 |
-
zoom: ecwd_zoom,
|
434 |
-
center: myLatlng,
|
435 |
-
scrollwheel: false
|
436 |
-
};
|
437 |
-
|
438 |
-
if(params.gmap_style !== "") {
|
439 |
-
mapOptions.styles = JSON.parse(params.gmap_style);
|
440 |
-
}
|
441 |
-
|
442 |
-
map = new google.maps.Map(document.getElementById('map-canvas'),
|
443 |
-
mapOptions);
|
444 |
-
|
445 |
-
if (!lat_long_available && navigator.geolocation) {
|
446 |
-
navigator.geolocation.getCurrentPosition(function (position) {
|
447 |
-
initialLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
|
448 |
-
map.setCenter(initialLocation);
|
449 |
-
});
|
450 |
-
}
|
451 |
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
464 |
});
|
|
|
465 |
|
466 |
-
|
467 |
-
|
468 |
-
});
|
469 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
470 |
|
471 |
-
|
|
|
|
|
472 |
|
473 |
-
var types = document.getElementById('type-selector');
|
474 |
-
map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);
|
475 |
|
476 |
-
|
477 |
-
autocomplete.bindTo('bounds', map);
|
478 |
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
486 |
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
if (!place.geometry) {
|
495 |
-
return;
|
496 |
-
}
|
497 |
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
} else {
|
502 |
-
map.setCenter(place.geometry.location);
|
503 |
-
map.setZoom(ecwd_zoom);
|
504 |
-
}
|
505 |
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
(place.address_components[1] && place.address_components[1].short_name || ''),
|
532 |
-
(place.address_components[2] && place.address_components[2].short_name || '')
|
533 |
-
].join(' ');
|
534 |
-
}
|
535 |
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
|
564 |
-
|
565 |
}
|
566 |
/*IN EVENT META PAGE*/
|
567 |
function change_event_location() {
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
this.is_changed_event_location = function () {
|
578 |
-
var val1 = this.$event_location_fild.val().replace(/\s+$/g, '');
|
579 |
-
var val2 = this.event_location.replace(/\s+$/g, '');
|
580 |
-
if (val1 !== val2 || this.replace === true) {
|
581 |
-
this.reset_venue_list();
|
582 |
-
this.set_event_location();
|
583 |
-
this.replace = false;
|
584 |
-
}
|
585 |
-
};
|
586 |
-
|
587 |
-
this.change_location = function(){
|
588 |
-
var _this = this;
|
589 |
-
_this.event_location = jQuery('#ecwd_event_location').val();
|
590 |
-
jQuery(document).on('input', '#ecwd_event_location', function () {
|
591 |
-
_this.is_changed_event_location();
|
592 |
-
});
|
593 |
}
|
594 |
-
|
595 |
-
|
596 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
597 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
598 |
|
599 |
}
|
600 |
|
601 |
// Add a marker to the map and push to the array.
|
602 |
function addMarker(location) {
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
|
|
|
|
609 |
setMarkerPosition(marker);
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
}
|
617 |
-
});
|
618 |
}
|
619 |
|
620 |
// Sets the map on all markers in the array.
|
621 |
function setAllMap(map) {
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
}
|
626 |
|
627 |
// Removes the markers from the map, but keeps them in the array.
|
628 |
function clearMarkers() {
|
629 |
-
|
630 |
}
|
631 |
|
632 |
// Shows any markers currently in the array.
|
633 |
function showMarkers() {
|
634 |
-
|
635 |
}
|
636 |
|
637 |
// Deletes all markers in the array by removing references to them.
|
638 |
function deleteMarkers() {
|
639 |
-
|
640 |
-
|
641 |
}
|
642 |
|
643 |
function setMarkerPosition(marker) {
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
}
|
652 |
|
653 |
function geocodePosition(pos) {
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
}
|
664 |
-
function updateMarkerAddress(address){
|
665 |
-
|
666 |
|
667 |
}
|
668 |
|
669 |
-
function loadScript() {
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
|
|
|
|
|
|
675 |
}
|
3 |
*/
|
4 |
(function ($) {
|
5 |
|
6 |
+
$("#ecwd_category_color").ecolorpicker();
|
7 |
|
8 |
+
$('#ecwd_event_repeat_dont_repeat_radio').click(function () {
|
9 |
+
$("#ecwd_repeat_until").hide();
|
10 |
+
});
|
11 |
|
12 |
|
13 |
+
$("#ecwd_category_color, .ecwd_colour").ecolorpicker({
|
14 |
+
displayIndicator: false,
|
15 |
+
displayPointer: false,
|
16 |
+
transparentColor: true
|
17 |
+
});
|
18 |
|
19 |
+
$("#ecwd_category_color, .ecwd_colour").on("change.color", function (event, color) {
|
20 |
+
$(this).css('background-color', color);
|
21 |
+
});
|
22 |
|
23 |
+
//events custom fields js
|
24 |
+
var allHiddens = $('#ecwd_event_repeats_div .hidden'),
|
25 |
+
radios = $('.ecwd_event_repeat_event_radio, .ecwd_event_repeat_list_radio');
|
26 |
+
var checked_el = $('.ecwd_event_repeat_event_radio:checked, .ecwd_event_repeat_list_radio:checked');
|
27 |
+
show_fields(checked_el);
|
28 |
|
29 |
+
$('.ecwd_event_repeat_event_radio').click(function (e) {
|
30 |
+
show_fields($(this));
|
31 |
+
});
|
32 |
|
33 |
|
34 |
+
function show_fields(el) {
|
35 |
+
allHiddens.attr('class', 'hidden');
|
36 |
+
if (el.attr('id') != 'ecwd_event_repeat_dont_repeat_radio') {
|
37 |
+
$("#ecwd_repeat_until").show();
|
38 |
+
}
|
39 |
+
else {
|
40 |
+
$("#ecwd_repeat_until").hide();
|
41 |
+
}
|
42 |
+
$('#ecwd_' + el.val()).removeClass('hidden');
|
43 |
+
if ($('#ecwd_event_repeat_how_label_' + el.val()).length > 0) {
|
44 |
+
$('#ecwd_daily').removeClass('hidden');
|
45 |
+
$('#ecwd_event_repeat_how_label_' + el.val()).removeClass('hidden');
|
46 |
+
}
|
47 |
+
$('#ecwd_repeat_until').removeClass('hidden');
|
48 |
+
}
|
49 |
+
|
50 |
+
if ($(".ecwd_event_repeat_choose").prop('checked')) {
|
51 |
+
$(".select_to_enable_disable").attr('disabled', true);
|
52 |
+
} else {
|
53 |
+
$(".ecwd_event_repeat_on_the").attr('disabled', true);
|
54 |
+
}
|
55 |
+
|
56 |
+
$("#ecwd_event_repeat_dont_repeat_radio").click(function () {
|
57 |
+
$("#ecwd_repeat_until").attr('class', 'hidden');
|
58 |
+
});
|
59 |
+
|
60 |
+
$(".ecwd_event_repeat_choose").click(function () {
|
61 |
+
$(".ecwd_event_repeat_on_the").attr('disabled', false);
|
62 |
+
$(".select_to_enable_disable").attr('disabled', true);
|
63 |
+
});
|
64 |
+
|
65 |
+
if ($(".ecwd_event_repeat_list_radio").prop('checked')) {
|
66 |
+
|
67 |
+
$(".ecwd_event_repeat_on_the").attr('disabled', true);
|
68 |
+
$(".select_to_enable_disable").attr('disabled', false);
|
69 |
+
}
|
70 |
+
if ($("#ecwd_event_repeat_year_on_days_2").prop('checked')) {
|
71 |
+
$(".ecwd_event_repeat_on_the").attr('disabled', true);
|
72 |
+
$(".select_to_enable_disable").attr('disabled', false);
|
73 |
+
$(".ecwd_event_year_month").attr('disabled', true);
|
74 |
+
}
|
75 |
+
$(".ecwd_event_repeat_list_radio").click(function () {
|
76 |
+
$(".ecwd_event_repeat_on_the").attr('disabled', true);
|
77 |
+
$(".select_to_enable_disable").attr('disabled', false);
|
78 |
+
});
|
79 |
+
|
80 |
+
// on adding event
|
81 |
+
$("#ecwd_repeat_event_monthly").click(function () {
|
82 |
+
$(".ecwd_event_repeat_choose").prop('checked', true);
|
83 |
+
$(".ecwd_event_repeat_on_the").attr('disabled', false);
|
84 |
+
$(".select_to_enable_disable").attr('disabled', true);
|
85 |
+
});
|
86 |
+
|
87 |
+
//event validations
|
88 |
+
if ($("#ecwd_event_meta").length > 0) {
|
89 |
+
$("#post").submit(function (e) {
|
90 |
+
var dateTo = Date.parse($("#ecwd_event_date_to").val()),
|
91 |
+
dateFrom = Date.parse($("#ecwd_event_date_from").val());
|
92 |
+
if (dateFrom == '' || isNaN(dateFrom) || isNaN(dateTo) || dateTo == '') {
|
93 |
+
alert('Please set the event dates');
|
94 |
+
e.preventDefault();
|
95 |
+
}
|
96 |
+
if (dateFrom && !dateTo) {
|
97 |
+
alert('Please set the end date');
|
98 |
+
e.preventDefault();
|
99 |
+
}
|
100 |
+
if (dateTo < dateFrom) {
|
101 |
+
alert('Date to must be greater or equal to Date from');
|
102 |
+
e.preventDefault();
|
103 |
+
}
|
104 |
+
if ($('input[name="ecwd_event_repeat_event"]').length > 0) {
|
105 |
+
var repeat = $('input[name="ecwd_event_repeat_event"]:checked').val();
|
106 |
+
var until = Date.parse($('#ecwd_event_repeat_until_input').val());
|
107 |
+
if (repeat !== 'no_repeat') {
|
108 |
+
if (until == '' || isNaN(until)) {
|
109 |
+
alert('Please set the repeat until date');
|
110 |
+
e.preventDefault();
|
111 |
+
}
|
112 |
+
if (!isNaN(dateFrom) && !isNaN(until) && until <= dateFrom) {
|
113 |
+
alert('Repeat until date must be greater than Date from');
|
114 |
+
e.preventDefault();
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
if ($("#ecwd_event_venue").val() == '0') {
|
120 |
+
var title = ($("#ecwd_venue_title").val()).trim();
|
121 |
+
if (title != "") {
|
122 |
+
return;
|
123 |
}
|
124 |
+
|
125 |
+
var notification = "Please fill Venue title for save";
|
126 |
+
|
127 |
+
var fields = [
|
128 |
+
'#ecwd_venue_content',
|
129 |
+
'#ecwd_event_location',
|
130 |
+
'#ecwd_venue_meta_phone',
|
131 |
+
'#ecwd_venue_meta_website'
|
132 |
+
];
|
133 |
+
|
134 |
+
for (var i = 0; i < fields.length; i++) {
|
135 |
+
var field_value = ($(fields[i]).val()).trim();
|
136 |
+
if (field_value != "") {
|
137 |
+
alert(notification);
|
138 |
+
e.preventDefault();
|
139 |
+
return false;
|
140 |
+
}
|
141 |
}
|
142 |
+
}
|
143 |
+
|
144 |
+
|
145 |
+
});
|
146 |
+
}
|
147 |
+
|
148 |
+
//calendar validations, etc
|
149 |
+
if ($("#publish").attr('value') == 'Publish') {
|
150 |
+
$("#ecwd_calendar_12_hour_time_format_NO").prop('checked', true);
|
151 |
+
}
|
152 |
+
|
153 |
+
if ($('#map-canvas').length > 0) {
|
154 |
+
loadScript();
|
155 |
+
}
|
156 |
+
|
157 |
+
|
158 |
+
var wordpress_ver = ecwd_admin_params.version, upload_button;
|
159 |
+
|
160 |
+
$(".ecwd_upload_image_button").click(function (event) {
|
161 |
+
upload_button = $(this);
|
162 |
+
var frame;
|
163 |
+
if (wordpress_ver >= "3.5") {
|
164 |
+
event.preventDefault();
|
165 |
+
if (frame) {
|
166 |
+
frame.open();
|
167 |
+
return;
|
168 |
+
}
|
169 |
+
frame = wp.media();
|
170 |
+
frame.on("select", function () {
|
171 |
+
// Grab the selected attachment.
|
172 |
+
var attachment = frame.state().get("selection").first();
|
173 |
+
frame.close();
|
174 |
+
if (upload_button.parent().prev().children().hasClass("tax_list")) {
|
175 |
+
upload_button.parent().prev().children().val(attachment.attributes.url);
|
176 |
+
upload_button.parent().prev().prev().children().attr("src", attachment.attributes.url);
|
177 |
}
|
178 |
+
else
|
179 |
+
$("#ecwd_taxonomy_image").val(attachment.attributes.url);
|
180 |
+
});
|
181 |
+
frame.open();
|
182 |
+
}
|
183 |
+
else {
|
184 |
+
tb_show("", "media-upload.php?type=image&TB_iframe=true");
|
185 |
+
return false;
|
186 |
}
|
187 |
+
});
|
188 |
+
|
189 |
+
$(".ecwd_remove_image_button").click(function () {
|
190 |
+
$("#ecwd_taxonomy_image").val("");
|
191 |
+
$(this).parent().siblings(".title").children("img").attr("src", "' . Z_IMAGE_PLACEHOLDER . '");
|
192 |
+
$(".inline-edit-col :input[name=\'ecwd_taxonomy_image\']").val("");
|
193 |
+
return false;
|
194 |
+
});
|
195 |
+
|
196 |
+
if (wordpress_ver < "3.5") {
|
197 |
+
window.send_to_editor = function (html) {
|
198 |
+
imgurl = $("img", html).attr("src");
|
199 |
+
if (upload_button.parent().prev().children().hasClass("tax_list")) {
|
200 |
+
upload_button.parent().prev().children().val(imgurl);
|
201 |
+
upload_button.parent().prev().prev().children().attr("src", imgurl);
|
202 |
+
}
|
203 |
+
else
|
204 |
+
$("#ecwd_taxonomy_image").val(imgurl);
|
205 |
+
tb_remove();
|
206 |
+
}
|
207 |
+
}
|
208 |
|
209 |
+
$("body").on("click", '.editinline', function () {
|
210 |
+
var tax_id = $(this).parents("tr").attr("id").substr(4);
|
211 |
+
var thumb = $("#tag-" + tax_id + " .thumb img").attr("src");
|
212 |
+
if (thumb != "' . Z_IMAGE_PLACEHOLDER . '") {
|
213 |
+
$(".inline-edit-col :input[name=\'ecwd_taxonomy_image\']").val(thumb);
|
214 |
} else {
|
215 |
+
$(".inline-edit-col :input[name=\'ecwd_taxonomy_image\']").val("");
|
216 |
}
|
217 |
+
$(".inline-edit-col .title img").attr("src", thumb);
|
218 |
+
return false;
|
219 |
+
});
|
220 |
+
////////////Calendar add/remove events/////////////
|
221 |
+
$(document).on('click', '.ecwd-events .ecwd-calendar-event-delete', function () {
|
222 |
+
if (confirm('Sure?')) {
|
223 |
+
var clicked_el = this;
|
224 |
+
var element = $(this).closest('.ecwd-calendar-event');
|
225 |
+
var event_id = $(element).find('input').val();
|
226 |
+
var calendar_id = $('#post_ID').val();
|
227 |
+
$.post(ecwd_admin_params.ajaxurl, {
|
228 |
+
action: 'manage_calendar_events',
|
229 |
+
ecwd_event_id: event_id,
|
230 |
+
ecwd_calendar_id: calendar_id,
|
231 |
+
ecwd_action: 'delete'
|
232 |
+
}).done(function (data) {
|
233 |
+
res = JSON.parse(data);
|
234 |
+
if (res.status == 'ok') {
|
235 |
+
$(clicked_el).removeClass('ecwd-calendar-event-delete');
|
236 |
+
$(clicked_el).addClass('ecwd-calendar-event-add');
|
237 |
+
$(clicked_el).text('+');
|
238 |
+
$(element).find('.ecwd-calendar-event-edit').addClass('hidden');
|
239 |
+
$(element).remove().appendTo('.ecwd-excluded-events');
|
240 |
+
$(element).find('input').attr('name', 'ecwd-calendar-excluded-event-id[]');
|
241 |
+
}
|
242 |
+
});
|
243 |
+
}
|
244 |
+
});
|
245 |
+
|
246 |
+
$(document).on('click', '.ecwd-excluded-events .ecwd-calendar-event-add, #ecwd_add_event_to_calendar .ecwd-calendar-event-add', function () {
|
247 |
+
var clicked_el = this;
|
248 |
+
var element = $(this).closest('.ecwd-calendar-event');
|
249 |
+
var calendar_id = $('#post_ID').val();
|
250 |
+
var event_id = $(element).find('input').val();
|
251 |
+
$.post(ecwd_admin_params.ajaxurl, {
|
252 |
+
action: 'manage_calendar_events',
|
253 |
+
ecwd_event_id: event_id,
|
254 |
+
ecwd_calendar_id: calendar_id,
|
255 |
+
ecwd_action: 'add'
|
256 |
+
|
257 |
+
}).done(function (data) {
|
258 |
+
res = JSON.parse(data);
|
259 |
+
if (res.status == 'ok') {
|
260 |
+
$(clicked_el).addClass('ecwd-calendar-event-delete');
|
261 |
+
$(clicked_el).removeClass('ecwd-calendar-event-add');
|
262 |
+
$(clicked_el).text('x');
|
263 |
+
$(element).find('input').addClass('ecwd-calendar-event-id');
|
264 |
+
$(element).find('.ecwd-calendar-event-edit').removeClass('hidden');
|
265 |
+
$(element).remove().appendTo('.ecwd-events');
|
266 |
+
}
|
267 |
});
|
268 |
|
269 |
+
});
|
270 |
+
////////////////////////////////////////////////////////
|
271 |
+
|
272 |
+
////////////Calendar selectable add events/////////////
|
273 |
+
$(document).on('click', '.event_cal_add .event_cal_add_close', function (e) {
|
274 |
+
$('.event_cal_add').hide();
|
275 |
+
});
|
276 |
+
$(document).on('mouseup', '.day-with-date', function (e) {
|
277 |
+
var position = $(this).position();
|
278 |
+
$('.event_cal_add').css({"margin": "0 auto", "left": position.left});
|
279 |
+
});
|
280 |
+
|
281 |
+
$('body').on('mouseenter', '.ecwd_calendar_container', function () {
|
282 |
+
$(this).selectable({
|
283 |
+
filter: ".day-with-date",
|
284 |
+
start: function () {
|
285 |
+
$('.event_cal_add').hide();
|
286 |
+
$('#add_event_to_cal').show();
|
287 |
+
$('.ecwd_notification, .ecwd_error').empty();
|
288 |
+
$('#ecwd_event_name').val('');
|
289 |
+
},
|
290 |
+
stop: function () {
|
291 |
+
|
292 |
+
var result = $("#select-result").empty();
|
293 |
+
|
294 |
+
var position = $('.ui-selected').last().find('.day-number').position();
|
295 |
+
var start_day = parseInt($('.ui-selected').first().find('.day-number').text());
|
296 |
+
var end_day = parseInt($('.ui-selected').last().find('.day-number').text());
|
297 |
+
var start_date = $('.ui-selected').first().attr('data-date');
|
298 |
+
var end_date = $('.ui-selected').last().attr('data-date');
|
299 |
+
if (start_day) {
|
300 |
+
if (start_day == end_day) {
|
301 |
+
$('.ecwd-dates').text(start_date);
|
302 |
+
$('#ecwd_event_date_from').val(start_date);
|
303 |
+
$('#ecwd_event_date_to').val(start_date);
|
304 |
+
}
|
305 |
+
if (end_day > start_day) {
|
306 |
+
$('.ecwd-dates').text(start_date + ' - ' + end_date);
|
307 |
+
$('#ecwd_event_date_from').val(start_date);
|
308 |
+
$('#ecwd_event_date_to').val(end_date);
|
309 |
+
|
310 |
+
}
|
311 |
+
if (start_day > end_day) {
|
312 |
+
$('.ecwd-dates').text(end_date + ' - ' + start_date);
|
313 |
+
$('#ecwd_event_date_from').val(end_date);
|
314 |
+
$('#ecwd_event_date_to').val(start_date);
|
315 |
+
}
|
316 |
+
$('.event_cal_add').removeClass('hidden');
|
317 |
+
$('.event_cal_add').show();
|
318 |
+
setTimeout(function () {
|
319 |
+
$('#ecwd_event_name').focus();
|
320 |
+
}, 1);
|
321 |
+
$('#ecwd-modal-preview').animate({
|
322 |
+
scrollTop: $(".event_cal_add").position().top
|
323 |
+
}, 1000);
|
324 |
+
}
|
325 |
+
}
|
326 |
});
|
327 |
+
});
|
328 |
+
$(document).on('click', '#add_event_to_cal', function () {
|
329 |
+
var start_date = $('#ecwd_event_date_from').val();
|
330 |
+
var end_date = $('#ecwd_event_date_to').val();
|
331 |
+
var name = $('#ecwd_event_name').val();
|
332 |
+
if (name.length > 0) {
|
333 |
+
var calendar_id = $('#post_ID').val();
|
334 |
+
$.post(ecwd_admin_params.ajaxurl, {
|
335 |
+
action: 'add_calendar_event',
|
336 |
+
ecwd_calendar_id: calendar_id,
|
337 |
+
ecwd_event_name: name,
|
338 |
+
ecwd_event_date_from: start_date,
|
339 |
+
ecwd_event_date_to: end_date
|
340 |
+
}).done(function (data) {
|
341 |
+
res = JSON.parse(data);
|
342 |
+
if (res.status == 'success') {
|
343 |
+
$('#add_event_to_cal').hide();
|
344 |
+
$('.ecwd_notification').html('Event \'' + name + '\' has been saved as draft. <a href="?post=' + res.data.event_id + '&action=edit">Edit details</a>');
|
345 |
+
}
|
346 |
+
});
|
347 |
+
} else {
|
348 |
+
$('#ecwd_event_name').focus();
|
349 |
+
$('.ecwd_error').html('Enter event name');
|
350 |
}
|
351 |
+
});
|
352 |
+
//////////////////////////////////////////
|
353 |
+
|
354 |
+
//////////////Theme tabs//////////////////
|
355 |
+
|
356 |
+
if (typeof(localStorage.currentItem) !== "undefined") {
|
357 |
+
var current_item = localStorage.currentItem;
|
358 |
+
$("#ecwd-tabs > div").css("display", "none");
|
359 |
+
$(current_item).css("display", "block");
|
360 |
+
$("#ecwd-tabs .ecwd-tabs li").removeClass("ui-state-active");
|
361 |
+
$('#ecwd-tabs .ecwd-tabs li a[href="' + current_item + '"]').parent().addClass("ui-state-active");
|
362 |
+
} else {
|
363 |
+
$('#general').css("display", "block");
|
364 |
+
$('#ecwd-tabs .ecwd-tabs li:first-child').addClass("ui-state-active");
|
365 |
+
}
|
366 |
+
|
367 |
+
$(".ecwd-tabs li a").each(function (indx, element) {
|
368 |
+
$(element).click(function () {
|
369 |
+
if (typeof(Storage) !== "undefined") {
|
370 |
+
localStorage.currentItem = $(element).attr("href");
|
371 |
+
}
|
372 |
+
$("#ecwd-tabs > div").css("display", "none");
|
373 |
+
$(localStorage.currentItem).css("display", "block");
|
374 |
+
$('#ecwd-tabs .ecwd-tabs li').removeClass("ui-state-active");
|
375 |
+
$(element).parent().addClass("ui-state-active");
|
376 |
});
|
377 |
+
});
|
378 |
+
|
379 |
+
|
380 |
+
//////////////////////////////////////////
|
381 |
+
$('#ecwd_event_venue').change(function (e) {
|
382 |
+
if ($(this).val() > 0) {
|
383 |
+
var location = $(this).find(':selected').data('location');
|
384 |
+
var markerLatLong = $(this).find(':selected').data('marker');
|
385 |
+
var zoom = parseInt($(this).find(':selected').data('zoom'));
|
386 |
+
if (!zoom) {
|
387 |
+
zoom = 17;
|
388 |
+
}
|
389 |
+
if (typeof google !== "undefined" && typeof map !== "undefined") {
|
390 |
+
|
391 |
+
var lat_long = markerLatLong.split(',');
|
392 |
+
if (lat_long.length !== 2) {
|
393 |
+
lat_long[0] = 40.7127837;
|
394 |
+
lat_long[1] = -74.00594130000002;
|
395 |
+
}
|
396 |
|
397 |
+
var myLatlng = new google.maps.LatLng(parseFloat(lat_long[0]), parseFloat(lat_long[1]));
|
|
|
|
|
|
|
|
|
|
|
398 |
|
399 |
+
deleteMarkers();
|
400 |
+
addMarker(myLatlng);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
401 |
|
402 |
+
map.setCenter(myLatlng);
|
403 |
+
map.setZoom(zoom);
|
404 |
+
$('#ecwd_event_location').val(location);
|
405 |
+
$('#ecwd_map_zoom').val(zoom);
|
406 |
+
|
407 |
+
}
|
408 |
+
|
409 |
+
var meta_container = $('.ecwd-venue-meta-fields');
|
410 |
+
|
411 |
+
meta_container.find('#ecwd_venue_title').val("").closest('.ecwd-meta-field').hide();
|
412 |
+
meta_container.find('#ecwd_venue_content').val("").closest('.ecwd-meta-field').hide();
|
413 |
+
meta_container.find('#ecwd_venue_meta_phone').val("").closest('.ecwd-meta-field').hide();
|
414 |
+
meta_container.find('#ecwd_venue_meta_website').val("").closest('.ecwd-meta-field').hide();
|
415 |
+
meta_container.find('#ecwd_venue_show_map').closest('.ecwd-meta-field').hide();
|
416 |
+
|
417 |
+
// meta_container.find('#ecwd_venue_title').val($(this).find(':selected').data('venuetitle'));
|
418 |
+
// meta_container.find('#ecwd_venue_content').val($(this).find(':selected').data('venuecontent'));
|
419 |
+
// meta_container.find('#ecwd_venue_meta_phone').val($(this).find(':selected').data('metaphone'));
|
420 |
+
// meta_container.find('#ecwd_venue_meta_website').val($(this).find(':selected').data('metawebsite'));
|
421 |
+
|
422 |
+
if ($(this).find(':selected').data('showmap') == '1') {
|
423 |
+
meta_container.find('#ecwd_venue_show_map').prop('checked', true);
|
424 |
+
meta_container.find('#ecwd_venue_show_map').trigger('change');
|
425 |
+
} else {
|
426 |
+
meta_container.find('#ecwd_venue_show_map').prop('checked', false);
|
427 |
+
meta_container.find('#ecwd_venue_show_map').trigger('change');
|
428 |
+
}
|
429 |
+
|
430 |
+
|
431 |
+
} else {
|
432 |
+
if(typeof google !== "undefined" && typeof map !== "undefined") {
|
433 |
+
var myLatlng = new google.maps.LatLng(parseFloat(40.7127837), parseFloat(-74.00594130000002));
|
434 |
|
435 |
+
deleteMarkers();
|
436 |
+
addMarker(myLatlng);
|
437 |
+
|
438 |
+
map.setCenter(myLatlng);
|
439 |
+
map.setZoom(17);
|
440 |
+
$('#ecwd_map_zoom').val(17);
|
441 |
+
}
|
442 |
+
|
443 |
+
|
444 |
+
var meta_container = $('.ecwd-venue-meta-fields');
|
445 |
+
|
446 |
+
meta_container.find('#ecwd_venue_title').closest('.ecwd-meta-field').show();
|
447 |
+
meta_container.find('#ecwd_venue_content').closest('.ecwd-meta-field').show();
|
448 |
+
meta_container.find('#ecwd_venue_meta_phone').closest('.ecwd-meta-field').show();
|
449 |
+
meta_container.find('#ecwd_venue_meta_website').closest('.ecwd-meta-field').show();
|
450 |
+
meta_container.find('#ecwd_venue_show_map').closest('.ecwd-meta-field').show();
|
451 |
+
meta_container.find('#ecwd_venue_show_map').prop('checked', false);
|
452 |
+
meta_container.find('#ecwd_venue_show_map').trigger('change');
|
453 |
}
|
454 |
|
455 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
456 |
|
457 |
+
});
|
458 |
+
|
459 |
+
$('.ecwd_add_event_to_calendar').ecwd_popup({
|
460 |
+
button: $('.ecwd_events_popup_button'),
|
461 |
+
title: 'Event List',
|
462 |
+
container_class: 'ecwd_add_event_calendar'
|
463 |
+
});
|
464 |
+
$('#ecwd_preview_add_event_popup').ecwd_popup({
|
465 |
+
button: $('#ecwd_preview_add_event'),
|
466 |
+
title: 'Calendar',
|
467 |
+
body_class: "ecwd-modal",
|
468 |
+
container_class: 'ecwd_preview_calendar'
|
469 |
+
});
|
470 |
+
|
471 |
+
if ($("#ecwd-settings-content").length == 1) {
|
472 |
+
var color = "rgba(51,51,51,.5)";
|
473 |
+
$('.ecwd_disabled_option').each(function () {
|
474 |
+
$(this).closest("tr").find("th").css("color", color);
|
475 |
+
|
476 |
+
$(this).closest("td").find("select").attr("disabled", true);
|
477 |
+
$(this).closest("td").find("input").attr("disabled", true);
|
478 |
+
|
479 |
+
$(this).closest("td").find("select").attr("name", '');
|
480 |
+
$(this).closest("td").find("input").attr("name", '');
|
481 |
+
|
482 |
+
$(this).closest("td").find("label").css("color", color);
|
483 |
+
$(this).closest("td").find(".description").css("color", color);
|
484 |
+
$(this).closest("td").find(".ecwd_disabled_text").css("color", color);
|
485 |
});
|
486 |
+
}
|
487 |
|
488 |
+
var ecwd_venue_meta_box = $("#ecwd_venue_meta");
|
489 |
+
if (ecwd_venue_meta_box.length == 0) {
|
490 |
+
ecwd_venue_meta_box = $("#ecwd_event_meta .ecwd-venue-meta-fields").closest('td');
|
491 |
+
}
|
492 |
+
|
493 |
+
if (ecwd_venue_meta_box.length > 0) {
|
494 |
+
var venue_meta_controller = new ecwd_venue_meta_controller();
|
495 |
+
venue_meta_controller.init(ecwd_venue_meta_box);
|
496 |
+
}
|
497 |
+
|
498 |
+
function ecwd_venue_meta_controller() {
|
499 |
+
|
500 |
+
this.$container = null;
|
501 |
+
this.$map_container = null;
|
502 |
+
this.$description = null;
|
503 |
+
var _this = this;
|
504 |
+
|
505 |
+
this.init = function ($container) {
|
506 |
+
this.$container = $container;
|
507 |
+
this.$map_container = this.$container.find('.ecwd_google_map');
|
508 |
+
this.$ecwd_venue_show_map = this.$container.find('#ecwd_venue_show_map');
|
509 |
+
this.$description = this.$container.find('.ecwd_venue_meta_decription');
|
510 |
|
511 |
+
|
512 |
+
this.$ecwd_venue_show_map.on("change", function () {
|
513 |
+
|
514 |
+
if ($(this).is(':checked')) {
|
515 |
+
|
516 |
+
if (_this.$map_container.length > 0) {
|
517 |
+
_this.$map_container.removeClass('ecwd-hide-map');
|
518 |
+
} else {
|
519 |
+
|
520 |
+
}
|
521 |
+
|
522 |
+
_this.$description.removeClass('ecwd_hidden');
|
523 |
} else {
|
524 |
+
|
525 |
+
if (_this.$map_container.length > 0) {
|
526 |
+
_this.$map_container.addClass('ecwd-hide-map');
|
527 |
+
} else {
|
528 |
+
|
529 |
+
}
|
530 |
+
_this.$description.addClass('ecwd_hidden');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
531 |
}
|
532 |
+
});
|
533 |
|
534 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
535 |
|
536 |
+
}
|
|
|
537 |
|
538 |
+
if ($('.ecwd-add_organizer-container').length > 0) {
|
539 |
+
add_organizer_form_event_page();
|
540 |
+
}
|
|
|
|
|
|
|
|
|
|
|
541 |
|
542 |
+
function add_organizer_form_event_page() {
|
543 |
+
var container = $('.ecwd-add_organizer-container');
|
544 |
+
var form = $('.ecwd-add_organizer-container').find('.ecwd-add-organizer-form');
|
545 |
+
|
546 |
+
container.find('a.ecwd-add-organizer').on('click', function (e) {
|
547 |
+
e.preventDefault();
|
548 |
+
|
549 |
+
if (form.is(":visible")) {
|
550 |
+
form.hide();
|
551 |
+
} else {
|
552 |
+
form.show();
|
553 |
+
}
|
554 |
+
|
555 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
556 |
});
|
557 |
+
|
558 |
+
form.find('.ecwd-add-organizer-save').on('click', function (e) {
|
559 |
+
e.preventDefault();
|
560 |
+
|
561 |
+
var title = form.find('#ecwd-add-organizer-title');
|
562 |
+
|
563 |
+
if (title.val() == "") {
|
564 |
+
alert("Please fill Organizer title field");
|
565 |
+
return false;
|
566 |
+
}
|
567 |
+
|
568 |
+
var content = form.find('#ecwd-add-organizer-content');
|
569 |
+
var phone = form.find('#ecwd_organizer_meta_phone');
|
570 |
+
var website = form.find('#ecwd_organizer_meta_website');
|
571 |
+
|
572 |
+
|
573 |
+
var post_data = {
|
574 |
+
title: title.val(),
|
575 |
+
content: content.val(),
|
576 |
+
post_type: 'ecwd_organizer',
|
577 |
+
metas: {
|
578 |
+
phone: phone.val(),
|
579 |
+
website: website.val()
|
580 |
}
|
581 |
+
};
|
582 |
+
|
583 |
+
title.attr('disabled', true);
|
584 |
+
content.attr('disabled', true);
|
585 |
+
phone.attr('disabled', true);
|
586 |
+
website.attr('disabled', true);
|
587 |
+
jQuery(this).attr('disabled', true);
|
588 |
+
|
589 |
+
|
590 |
+
var response = add_new_post(post_data);
|
591 |
+
|
592 |
+
if (response.success == true) {
|
593 |
+
|
594 |
+
var template = form.find('.ecwd-organizer-template').html();
|
595 |
+
|
596 |
+
template = template.replace(new RegExp('{organizer_id}', 'gi'), response.id);
|
597 |
+
template = template.replace(new RegExp('{organizer_title}', 'gi'), response.title);
|
598 |
+
|
599 |
+
container.closest('#ecwd-display-options-wrap').find('.ecwd-meta-control').prepend(template);
|
600 |
+
|
601 |
+
}
|
602 |
+
|
603 |
+
title.val("");
|
604 |
+
content.val("");
|
605 |
+
phone.val("");
|
606 |
+
website.val("");
|
607 |
+
|
608 |
+
title.attr('disabled', false);
|
609 |
+
content.attr('disabled', false);
|
610 |
+
phone.attr('disabled', false);
|
611 |
+
website.attr('disabled', false);
|
612 |
+
jQuery(this).attr('disabled', false);
|
613 |
+
|
614 |
+
form.hide();
|
615 |
+
return false;
|
616 |
});
|
617 |
+
|
618 |
+
}
|
619 |
+
|
620 |
+
function add_new_post(post_data) {
|
621 |
+
|
622 |
+
var response = null;
|
623 |
+
|
624 |
+
$.ajax({
|
625 |
+
url: ecwd.ajaxurl,
|
626 |
+
type: "POST",
|
627 |
+
dataType: 'json',
|
628 |
+
async: false,
|
629 |
+
data: {
|
630 |
+
action: 'ecwd_add_post',
|
631 |
+
nonce: ecwd.ajaxnonce,
|
632 |
+
post_data: post_data,
|
633 |
+
},
|
634 |
+
success: function (data) {
|
635 |
+
response = data;
|
636 |
+
},
|
637 |
+
error: function (data) {
|
638 |
+
response = null;
|
639 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
640 |
});
|
641 |
+
|
642 |
+
return response;
|
643 |
+
}
|
644 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
645 |
}(jQuery));
|
646 |
|
647 |
var map;
|
649 |
var geocoder;
|
650 |
|
651 |
var change_event_location_obj = null;
|
652 |
+
if (jQuery('#ecwd_event_location').length > 0) {
|
653 |
+
change_event_location_obj = new change_event_location();
|
654 |
+
change_event_location_obj.change_location();
|
655 |
}
|
656 |
|
657 |
+
var venue_metas_container = null;
|
658 |
+
if (jQuery('.ecwd-venue-meta-fields').length > 0) {
|
659 |
+
venue_metas_container = jQuery('.ecwd-venue-meta-fields');
|
660 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
661 |
|
662 |
+
function initialize() {
|
663 |
+
geocoder = new google.maps.Geocoder();
|
664 |
+
|
665 |
+
var lat_long = document.getElementById('ecwd_lat_long').value.split(',');
|
666 |
+
var lat_long_available = false;
|
667 |
+
if (lat_long[0]) {
|
668 |
+
var myLatlng = new google.maps.LatLng(parseFloat(lat_long[0]), parseFloat(lat_long[1]));
|
669 |
+
lat_long_available = true;
|
670 |
+
} else {
|
671 |
+
var myLatlng = new google.maps.LatLng(40.7127837, -74.00594130000002);
|
672 |
+
}
|
673 |
+
var ecwd_zoom = parseInt(document.getElementById('ecwd_map_zoom').value);
|
674 |
+
var ecwd_marker = parseInt(document.getElementById('ecwd_marker').value);
|
675 |
+
|
676 |
+
var mapOptions = {
|
677 |
+
zoom: ecwd_zoom,
|
678 |
+
center: myLatlng,
|
679 |
+
scrollwheel: false
|
680 |
+
};
|
681 |
+
|
682 |
+
if (ecwd_admin_params.gmap_style !== "") {
|
683 |
+
mapOptions.styles = JSON.parse(ecwd_admin_params.gmap_style);
|
684 |
+
}
|
685 |
+
|
686 |
+
map = new google.maps.Map(document.getElementById('map-canvas'),
|
687 |
+
mapOptions);
|
688 |
+
|
689 |
+
if (!lat_long_available && navigator.geolocation) {
|
690 |
+
navigator.geolocation.getCurrentPosition(function (position) {
|
691 |
+
initialLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
|
692 |
+
map.setCenter(initialLocation);
|
693 |
});
|
694 |
+
}
|
695 |
|
696 |
+
var ecwd_typing_timer = null;
|
697 |
+
var $inputs = jQuery('#ecwd_longitude, #ecwd_latitude');
|
|
|
698 |
|
699 |
+
$inputs.on('keyup', function () {
|
700 |
+
clearTimeout(ecwd_typing_timer);
|
701 |
+
ecwd_typing_timer = setTimeout(function () {
|
702 |
+
var latlng = new google.maps.LatLng(jQuery('#ecwd_latitude').val(), jQuery('#ecwd_longitude').val());
|
703 |
+
deleteMarkers();
|
704 |
+
geocodePosition(latlng);
|
705 |
+
addMarker(latlng);
|
706 |
+
map.setCenter(latlng);
|
707 |
+
}, 1000);
|
708 |
+
});
|
709 |
|
710 |
+
$inputs.on('keydown', function () {
|
711 |
+
clearTimeout(ecwd_typing_timer);
|
712 |
+
});
|
713 |
|
|
|
|
|
714 |
|
715 |
+
var input = document.getElementById('ecwd_event_location');
|
|
|
716 |
|
717 |
+
var types = document.getElementById('type-selector');
|
718 |
+
if (venue_metas_container == null) {
|
719 |
+
map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);
|
720 |
+
}
|
721 |
+
var autocomplete = new google.maps.places.Autocomplete(input);
|
722 |
+
autocomplete.bindTo('bounds', map);
|
723 |
+
|
724 |
+
var infowindow = new google.maps.InfoWindow();
|
725 |
+
var address_marker = new google.maps.Marker({
|
726 |
+
map: map,
|
727 |
+
anchorPoint: new google.maps.Point(0, -29),
|
728 |
+
draggable: true
|
729 |
+
});
|
730 |
+
markers.push(address_marker);
|
731 |
+
|
732 |
+
google.maps.event.addListener(autocomplete, 'place_changed', function () {
|
733 |
+
infowindow.close();
|
734 |
+
address_marker.setVisible(false);
|
735 |
+
if (change_event_location_obj !== null) {
|
736 |
+
change_event_location_obj.is_changed_event_location();
|
737 |
+
}
|
738 |
+
var place = autocomplete.getPlace();
|
739 |
+
if (!place.geometry) {
|
740 |
+
return;
|
741 |
+
}
|
742 |
|
743 |
+
// If the place has a geometry, then present it on a map.
|
744 |
+
if (place.geometry.viewport) {
|
745 |
+
map.fitBounds(place.geometry.viewport);
|
746 |
+
} else {
|
747 |
+
map.setCenter(place.geometry.location);
|
748 |
+
map.setZoom(ecwd_zoom);
|
749 |
+
}
|
|
|
|
|
|
|
750 |
|
751 |
+
deleteMarkers();
|
752 |
+
geocodePosition(place.geometry.location);
|
753 |
+
address_marker = addMarker(place.geometry.location);
|
|
|
|
|
|
|
|
|
754 |
|
755 |
+
var lat_long_val = place.geometry.location.toString().replace(')', '').replace('(', '');
|
756 |
+
document.getElementById('ecwd_lat_long').value = lat_long_val;
|
757 |
+
var lat_long_data = lat_long_val.split(',');
|
758 |
+
if (lat_long_data.length == 2) {
|
759 |
+
document.getElementById('ecwd_latitude').value = lat_long_data[0];
|
760 |
+
document.getElementById('ecwd_longitude').value = lat_long_data[1];
|
761 |
+
}
|
762 |
+
//marker.setIcon(/** @type {google.maps.Icon} */({
|
763 |
+
// url: place.icon,
|
764 |
+
// size: new google.maps.Size(71, 71),
|
765 |
+
// origin: new google.maps.Point(0, 0),
|
766 |
+
// anchor: new google.maps.Point(17, 34),
|
767 |
+
// scaledSize: new google.maps.Size(35, 35)
|
768 |
+
//}));
|
769 |
+
address_marker.setPosition(place.geometry.location);
|
770 |
+
address_marker.setVisible(true);
|
771 |
+
|
772 |
+
var address = '';
|
773 |
+
if (place.address_components) {
|
774 |
+
address = [
|
775 |
+
(place.address_components[0] && place.address_components[0].short_name || ''),
|
776 |
+
(place.address_components[1] && place.address_components[1].short_name || ''),
|
777 |
+
(place.address_components[2] && place.address_components[2].short_name || '')
|
778 |
+
].join(' ');
|
779 |
+
}
|
|
|
|
|
|
|
|
|
780 |
|
781 |
+
infowindow.setContent('<div><strong>' + place.name + '</strong><br>' + address);
|
782 |
+
infowindow.open(map, address_marker);
|
783 |
+
});
|
784 |
|
785 |
+
google.maps.event.addListener(map, 'click', function (event) {
|
786 |
+
deleteMarkers();
|
787 |
+
geocodePosition(event.latLng);
|
788 |
+
addMarker(event.latLng);
|
789 |
+
if (change_event_location_obj !== null) {
|
790 |
+
change_event_location_obj.is_changed_event_location();
|
791 |
+
}
|
792 |
+
});
|
793 |
+
google.maps.event.addListener(address_marker, 'dragend', function () {
|
794 |
+
setMarkerPosition(address_marker);
|
795 |
+
geocodePosition(address_marker.getPosition());
|
796 |
+
if (change_event_location_obj !== null) {
|
797 |
+
change_event_location_obj.is_changed_event_location();
|
798 |
+
}
|
799 |
+
});
|
800 |
+
google.maps.event.addListener(map, 'zoom_changed', function () {
|
801 |
+
jQuery('#ecwd_map_zoom').val(map.getZoom());
|
802 |
+
});
|
803 |
|
804 |
+
if (ecwd_marker == 1) {
|
805 |
+
var infowindow = new google.maps.InfoWindow();
|
806 |
+
addMarker(myLatlng);
|
807 |
+
var loc = document.getElementById('ecwd_event_location').value;
|
808 |
|
809 |
+
}
|
810 |
}
|
811 |
/*IN EVENT META PAGE*/
|
812 |
function change_event_location() {
|
813 |
+
this.$venue_list = jQuery('#ecwd_event_venue');
|
814 |
+
this.$event_location_fild = jQuery('#ecwd_event_location');
|
815 |
+
this.event_location = '';
|
816 |
+
this.replace = false;
|
817 |
+
|
818 |
+
this.reset_venue_list = function () {
|
819 |
+
if(this.$venue_list.val() != '0'){
|
820 |
+
this.$venue_list.val('0').trigger('change');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
821 |
}
|
822 |
+
};
|
823 |
+
|
824 |
+
this.is_changed_event_location = function () {
|
825 |
+
var val1 = this.$event_location_fild.val().replace(/\s+$/g, '');
|
826 |
+
var val2 = this.event_location.replace(/\s+$/g, '');
|
827 |
+
if (val1 !== val2 || this.replace === true) {
|
828 |
+
this.reset_venue_list();
|
829 |
+
this.set_event_location();
|
830 |
+
this.replace = false;
|
831 |
}
|
832 |
+
};
|
833 |
+
|
834 |
+
this.change_location = function () {
|
835 |
+
var _this = this;
|
836 |
+
_this.event_location = jQuery('#ecwd_event_location').val();
|
837 |
+
jQuery(document).on('input', '#ecwd_event_location', function () {
|
838 |
+
_this.is_changed_event_location();
|
839 |
+
});
|
840 |
+
}
|
841 |
+
|
842 |
+
this.set_event_location = function () {
|
843 |
+
this.event_location = this.$event_location_fild.val();
|
844 |
+
}
|
845 |
|
846 |
}
|
847 |
|
848 |
// Add a marker to the map and push to the array.
|
849 |
function addMarker(location) {
|
850 |
+
var marker = new google.maps.Marker({
|
851 |
+
position: location,
|
852 |
+
map: map,
|
853 |
+
draggable: true
|
854 |
+
});
|
855 |
+
markers.push(marker);
|
856 |
+
setMarkerPosition(marker);
|
857 |
+
google.maps.event.addListener(marker, 'dragend', function (event) {
|
858 |
setMarkerPosition(marker);
|
859 |
+
geocodePosition(marker.getPosition());
|
860 |
+
if (change_event_location_obj !== null) {
|
861 |
+
change_event_location_obj.is_changed_event_location();
|
862 |
+
}
|
863 |
+
});
|
864 |
+
//google.maps.event.trigger(marker, 'dragend');
|
|
|
|
|
865 |
}
|
866 |
|
867 |
// Sets the map on all markers in the array.
|
868 |
function setAllMap(map) {
|
869 |
+
for (var i = 0; i < markers.length; i++) {
|
870 |
+
markers[i].setMap(map);
|
871 |
+
}
|
872 |
}
|
873 |
|
874 |
// Removes the markers from the map, but keeps them in the array.
|
875 |
function clearMarkers() {
|
876 |
+
setAllMap(null);
|
877 |
}
|
878 |
|
879 |
// Shows any markers currently in the array.
|
880 |
function showMarkers() {
|
881 |
+
setAllMap(map);
|
882 |
}
|
883 |
|
884 |
// Deletes all markers in the array by removing references to them.
|
885 |
function deleteMarkers() {
|
886 |
+
clearMarkers();
|
887 |
+
markers = [];
|
888 |
}
|
889 |
|
890 |
function setMarkerPosition(marker) {
|
891 |
+
var lat_long_val = marker.getPosition().toUrlValue();
|
892 |
+
document.getElementById('ecwd_lat_long').value = lat_long_val;
|
893 |
+
var lat_long_data = lat_long_val.split(',');
|
894 |
+
if (lat_long_data.length == 2) {
|
895 |
+
document.getElementById('ecwd_latitude').value = lat_long_data[0];
|
896 |
+
document.getElementById('ecwd_longitude').value = lat_long_data[1];
|
897 |
+
}
|
898 |
}
|
899 |
|
900 |
function geocodePosition(pos) {
|
901 |
+
geocoder.geocode({
|
902 |
+
latLng: pos
|
903 |
+
}, function (responses) {
|
904 |
+
if (responses && responses.length > 0) {
|
905 |
+
updateMarkerAddress(responses[0].formatted_address);
|
906 |
+
} else {
|
907 |
+
updateMarkerAddress('Cannot determine address at this location.');
|
908 |
+
}
|
909 |
+
});
|
910 |
}
|
911 |
+
function updateMarkerAddress(address) {
|
912 |
+
document.getElementById('ecwd_event_location').value = address;
|
913 |
|
914 |
}
|
915 |
|
916 |
+
function loadScript() {
|
917 |
+
if (ecwd.gmap_key == "") {
|
918 |
+
return;
|
919 |
+
}
|
920 |
+
var script = document.createElement('script');
|
921 |
+
script.type = 'text/javascript';
|
922 |
+
script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp' +
|
923 |
+
'&callback=initialize&libraries=places&key=' + ecwd.gmap_key;
|
924 |
+
document.body.appendChild(script);
|
925 |
}
|
js/ecwd_popup.js
CHANGED
@@ -104,7 +104,7 @@
|
|
104 |
|
105 |
function show_gmap() {
|
106 |
var interval = setInterval(function () {
|
107 |
-
var el = $('.ecwd_popup_container').find('.
|
108 |
if (el.html() != "") {
|
109 |
ecwd_js_init_call.showMap();
|
110 |
clearInterval(interval);
|
104 |
|
105 |
function show_gmap() {
|
106 |
var interval = setInterval(function () {
|
107 |
+
var el = $('.ecwd_popup_container').find('.ecwd-show-map .ecwd_markers');
|
108 |
if (el.html() != "") {
|
109 |
ecwd_js_init_call.showMap();
|
110 |
clearInterval(interval);
|
js/scripts.js
CHANGED
@@ -531,12 +531,14 @@ if (typeof ecwd_js_init != "function")
|
|
531 |
body_class: "ecwd-excluded-events ecwd_popup_body_scroll",
|
532 |
title: ecwd.event_popup_title_text,
|
533 |
get_ajax_data: function (el) {
|
534 |
-
var
|
535 |
-
|
|
|
536 |
var data = {
|
537 |
action: 'ecwd_event_popup_ajax',
|
538 |
id: el.attr('class').split('event')[2],
|
539 |
-
|
|
|
540 |
};
|
541 |
return data;
|
542 |
} else {
|
@@ -646,7 +648,18 @@ if (typeof ecwd_js_init != "function")
|
|
646 |
}
|
647 |
|
648 |
}
|
649 |
-
this.showMap = function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
650 |
if (typeof google == 'undefined' || typeof google.maps == "undefined") {
|
651 |
var script = document.createElement('script');
|
652 |
script.type = 'text/javascript';
|
531 |
body_class: "ecwd-excluded-events ecwd_popup_body_scroll",
|
532 |
title: ecwd.event_popup_title_text,
|
533 |
get_ajax_data: function (el) {
|
534 |
+
var start_date = el.attr('start-date-data');
|
535 |
+
var end_date = el.attr('end-date-data');
|
536 |
+
if (start_date && end_date) {
|
537 |
var data = {
|
538 |
action: 'ecwd_event_popup_ajax',
|
539 |
id: el.attr('class').split('event')[2],
|
540 |
+
start_date: start_date,
|
541 |
+
end_date: end_date
|
542 |
};
|
543 |
return data;
|
544 |
} else {
|
648 |
}
|
649 |
|
650 |
}
|
651 |
+
this.showMap = function () {
|
652 |
+
if (ecwd.gmap_key == "") {
|
653 |
+
jQuery(".ecwd_map_div").each(function (k, v) {
|
654 |
+
var $this = jQuery(this);
|
655 |
+
if ($this.closest('.ecwd-show-map').length == 1) {
|
656 |
+
$this.closest('.ecwd-show-map').hide();
|
657 |
+
}
|
658 |
+
$this.hide();
|
659 |
+
});
|
660 |
+
return;
|
661 |
+
}
|
662 |
+
|
663 |
if (typeof google == 'undefined' || typeof google.maps == "undefined") {
|
664 |
var script = document.createElement('script');
|
665 |
script.type = 'text/javascript';
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
=== Event Calendar WD
|
2 |
Contributors: webdorado,wdsupport
|
3 |
Donate link: https://web-dorado.com/products/wordpress-event-calendar-wd.html
|
4 |
Tags: calendar, date, event, event calendar, events, events calendar, meeting, organizer, recurring, reservation, responsive, schedule
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.8
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -245,7 +245,11 @@ After downloading the ZIP file of the Event Calendar WD plugin,
|
|
245 |
|
246 |
== Changelog ==
|
247 |
|
248 |
-
= 1.0.
|
|
|
|
|
|
|
|
|
249 |
* Fixed: Security issue
|
250 |
|
251 |
= 1.0.93 =
|
1 |
+
=== Event Calendar WD - Responsive Event Calendar plugin ===
|
2 |
Contributors: webdorado,wdsupport
|
3 |
Donate link: https://web-dorado.com/products/wordpress-event-calendar-wd.html
|
4 |
Tags: calendar, date, event, event calendar, events, events calendar, meeting, organizer, recurring, reservation, responsive, schedule
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.8
|
7 |
+
Stable tag: 1.0.95
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
245 |
|
246 |
== Changelog ==
|
247 |
|
248 |
+
= 1.0.95 =
|
249 |
+
* Changed: Plugin interface
|
250 |
+
* Fixed: Minor bugs
|
251 |
+
|
252 |
+
= 1.0.94 =
|
253 |
* Fixed: Security issue
|
254 |
|
255 |
= 1.0.93 =
|
views/admin/admin.php
CHANGED
@@ -23,10 +23,10 @@ global $ecwd_tabs;
|
|
23 |
|
24 |
<h2 class="nav-tab-wrapper">
|
25 |
<?php
|
26 |
-
$current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'general';
|
27 |
foreach ($ecwd_settings as $key=>$ecwd_setting){
|
28 |
$active = $current_tab == $key ? 'nav-tab-active' : '';
|
29 |
-
echo '<a class="nav-tab ' . $active . '" href="
|
30 |
}
|
31 |
?>
|
32 |
|
23 |
|
24 |
<h2 class="nav-tab-wrapper">
|
25 |
<?php
|
26 |
+
$current_tab = isset( $_GET['tab'] ) ? sanitize_text_field($_GET['tab']) : 'general';
|
27 |
foreach ($ecwd_settings as $key=>$ecwd_setting){
|
28 |
$active = $current_tab == $key ? 'nav-tab-active' : '';
|
29 |
+
echo '<a class="nav-tab ' . $active . '" href="' . ECWD_MENU_SLUG . '&page=ecwd_general_settings&tab=' . $key . '">' . $ecwd_tabs[$key] . '</a>';
|
30 |
}
|
31 |
?>
|
32 |
|
views/admin/ecwd-calendar-meta.php
CHANGED
@@ -15,6 +15,7 @@ $ecwd_calendar_12_hour_time_format = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX
|
|
15 |
$ecwd_calendar_default_theme_color = isset($_GET['post']) ? 'calendar' : 'calendar_grey';
|
16 |
$ecwd_calendar_default_theme_color = (isset($ecwd_calendar_theme) && $ecwd_calendar_theme != '') ? $ecwd_calendar_theme : $ecwd_calendar_default_theme_color;
|
17 |
|
|
|
18 |
?>
|
19 |
|
20 |
<table class="form-table">
|
@@ -114,4 +115,19 @@ $ecwd_calendar_default_theme_color = (isset($ecwd_calendar_theme) && $ecwd_calen
|
|
114 |
<!--<a href="<?php //echo admin_url('admin.php?page=ecwd_themes');?>"><?php //_e('Default', 'ecwd');?></a> <sup style="color: #ba281e;">pro</sup>-->
|
115 |
</td>
|
116 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
</table>
|
15 |
$ecwd_calendar_default_theme_color = isset($_GET['post']) ? 'calendar' : 'calendar_grey';
|
16 |
$ecwd_calendar_default_theme_color = (isset($ecwd_calendar_theme) && $ecwd_calendar_theme != '') ? $ecwd_calendar_theme : $ecwd_calendar_default_theme_color;
|
17 |
|
18 |
+
$default_calendar_id = get_option('ecwd_default_calendar');
|
19 |
?>
|
20 |
|
21 |
<table class="form-table">
|
115 |
<!--<a href="<?php //echo admin_url('admin.php?page=ecwd_themes');?>"><?php //_e('Default', 'ecwd');?></a> <sup style="color: #ba281e;">pro</sup>-->
|
116 |
</td>
|
117 |
</tr>
|
118 |
+
<tr>
|
119 |
+
<th scope="row">
|
120 |
+
<label for="ecwd_default_calendar"><?php _e('Default Calendar', 'ecwd'); ?></label>
|
121 |
+
</th>
|
122 |
+
<td>
|
123 |
+
<input type="checkbox"
|
124 |
+
id="ecwd_default_calendar"
|
125 |
+
name="ecwd_default_calendar"
|
126 |
+
value="1"
|
127 |
+
<?php checked($post_id, $default_calendar_id); ?>>
|
128 |
+
<p class="description">
|
129 |
+
Use this calendar for newly created events.
|
130 |
+
</p>
|
131 |
+
</td>
|
132 |
+
</tr>
|
133 |
</table>
|
views/admin/ecwd-event-calendars-meta.php
CHANGED
@@ -18,7 +18,15 @@ if(!$event_calendars){
|
|
18 |
$event_calendars = array();
|
19 |
}
|
20 |
if(isset($_GET['cal_id']) && $_GET['cal_id']){
|
21 |
-
$event_calendars[] = $_GET['cal_id'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
}
|
23 |
|
24 |
?>
|
18 |
$event_calendars = array();
|
19 |
}
|
20 |
if(isset($_GET['cal_id']) && $_GET['cal_id']){
|
21 |
+
$event_calendars[] = sanitize_text_field($_GET['cal_id']);
|
22 |
+
}
|
23 |
+
|
24 |
+
global $pagenow;
|
25 |
+
if ($pagenow == "post-new.php") {
|
26 |
+
$ecwd_default_calendar = get_option('ecwd_default_calendar');
|
27 |
+
if ($ecwd_default_calendar !== false && $ecwd_default_calendar !== null) {
|
28 |
+
$event_calendars[] = $ecwd_default_calendar;
|
29 |
+
}
|
30 |
}
|
31 |
|
32 |
?>
|
views/admin/ecwd-event-meta.php
CHANGED
@@ -2,562 +2,675 @@
|
|
2 |
/**
|
3 |
* Display for Event Custom Post Types
|
4 |
*/
|
5 |
-
global $post;
|
6 |
$post_id = $post->ID;
|
7 |
-
$meta
|
8 |
|
9 |
// Load up all post meta data
|
10 |
-
$ecwd_event_venue
|
11 |
-
$ecwd_event_location = get_post_meta(
|
12 |
-
$ecwd_event_show_map = get_post_meta(
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
}
|
16 |
-
$
|
17 |
-
$
|
18 |
-
|
19 |
-
$
|
20 |
-
|
21 |
-
$
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
}
|
29 |
-
$ecwd_event_repeat_month_on_days = get_post_meta(
|
30 |
-
if (
|
31 |
-
|
32 |
}
|
33 |
-
$ecwd_event_repeat_year_on_days = get_post_meta(
|
34 |
|
35 |
-
if (
|
36 |
-
|
37 |
}
|
38 |
-
$ecwd_event_repeat_on_the_m = get_post_meta(
|
39 |
-
$ecwd_event_repeat_on_the_y = get_post_meta(
|
40 |
|
41 |
|
42 |
-
$ecwd_monthly_list_monthly = get_post_meta(
|
43 |
-
$ecwd_monthly_week_monthly = get_post_meta(
|
44 |
|
45 |
-
$ecwd_monthly_list_yearly = get_post_meta(
|
46 |
-
$ecwd_monthly_week_yearly = get_post_meta(
|
47 |
-
$ecwd_event_year_month
|
48 |
-
$ecwd_event_video
|
49 |
?>
|
50 |
|
51 |
|
52 |
<table class="form-table">
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
|
165 |
<span id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_how_label_daily"
|
166 |
class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_how_label hidden">
|
167 |
-
<?php _e(
|
168 |
</span>
|
169 |
|
170 |
<span id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_how_label_weekly"
|
171 |
class=" <?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_how_label hidden">
|
172 |
-
<?php _e(
|
173 |
-
|
174 |
</span>
|
175 |
<span id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_how_label_monthly"
|
176 |
class=" <?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_how_label hidden">
|
177 |
-
<?php _e(
|
178 |
</span>
|
179 |
<span id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_how_label_yearly"
|
180 |
class=" <?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_how_label hidden">
|
181 |
-
<?php _e(
|
182 |
</span>
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
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 |
-
|
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 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
452 |
<tr>
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
$venue_zoom = get_post_meta( $venue->ID, ECWD_PLUGIN_PREFIX . '_map_zoom', true );
|
464 |
-
?>
|
465 |
-
<option value="<?php echo $venue->ID; ?>" data-location="<?php echo $venue_location; ?>"
|
466 |
-
data-marker="<?php echo $venue_lat_long; ?>"
|
467 |
-
data-zoom="<?php echo $venue_zoom; ?>" <?php echo selected( $venue->ID, $ecwd_event_venue ); ?>><?php echo $venue->post_title; ?></option>
|
468 |
-
<?php
|
469 |
-
}
|
470 |
-
?>
|
471 |
-
</select>
|
472 |
-
<p class="description">
|
473 |
-
<?php _e( 'Select the venue of the event.', 'ecwd' ); ?>
|
474 |
-
</p>
|
475 |
-
<?php
|
476 |
-
} else {
|
477 |
-
?><?php _e( 'There is no venue added yet', 'ecwd' ); ?><?php
|
478 |
-
} ?>
|
479 |
-
</td>
|
480 |
-
</tr>
|
481 |
-
<tr>
|
482 |
-
<th scope="row"><?php _e( 'Event Location', 'ecwd' ); ?></th>
|
483 |
-
<td>
|
484 |
-
<input type="text" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_location"
|
485 |
-
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_location"
|
486 |
-
value="<?php echo $ecwd_event_location; ?>" size="70"/>
|
487 |
-
|
488 |
-
<div class="ecwd_google_map">
|
489 |
-
<?php
|
490 |
-
if ( ! $ecwd_map_zoom ) {
|
491 |
-
$ecwd_map_zoom = 17;
|
492 |
-
}
|
493 |
-
$ecwd_marker = 1;
|
494 |
-
if ( ! $ecwd_lat_long ) {
|
495 |
-
$ecwd_map_zoom = 9;
|
496 |
-
$ecwd_lat_long = $lat . ',' . $long;
|
497 |
-
$ecwd_marker = 0;
|
498 |
-
}
|
499 |
-
?>
|
500 |
-
<input type="hidden" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_lat_long"
|
501 |
-
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_lat_long"
|
502 |
-
value="<?php echo $ecwd_lat_long; ?>"/>
|
503 |
-
<input type="hidden" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_marker"
|
504 |
-
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_marker" value="<?php echo $ecwd_marker; ?>"/>
|
505 |
-
<input type="hidden" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_map_zoom"
|
506 |
-
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_map_zoom"
|
507 |
-
value="<?php echo $ecwd_map_zoom; ?>"/>
|
508 |
-
|
509 |
-
<div id="map-canvas" style="width: 100%; height: 300px; min-height: 300px;">
|
510 |
-
|
511 |
-
</div>
|
512 |
-
<?php
|
513 |
-
$latitude = $longitude = '';
|
514 |
-
if(!empty($ecwd_lat_long)){
|
515 |
-
$lat_long_data = explode(',',$ecwd_lat_long);
|
516 |
-
if(is_array($lat_long_data) && count($lat_long_data) == 2) {
|
517 |
-
$latitude = $lat_long_data[0];
|
518 |
-
$longitude = $lat_long_data[1];
|
519 |
-
}
|
520 |
-
}
|
521 |
-
?>
|
522 |
-
<label style="width:85px;display:inline-block;" for="<?php echo ECWD_PLUGIN_PREFIX;?>_latitude">Latitude:</label><input type="text" id="<?php echo ECWD_PLUGIN_PREFIX;?>_latitude" value="<?php echo $latitude; ?>"/><br/>
|
523 |
-
<label style="width:85px;display:inline-block;" for="<?php echo ECWD_PLUGIN_PREFIX;?>_longitude">Longitude:</label><input type="text" id="<?php echo ECWD_PLUGIN_PREFIX;?>_longitude" value="<?php echo $longitude; ?>"/>
|
524 |
-
|
525 |
-
</div>
|
526 |
-
<p class="description">
|
527 |
-
<?php _e( 'If venue is not specified you can fill in the address of the event location or click on the map to drag and drop the marker to the event location.', 'ecwd' ); ?>
|
528 |
-
</p>
|
529 |
-
</td>
|
530 |
-
</tr>
|
531 |
-
<tr>
|
532 |
-
<th scope="row"><?php _e( 'Show map in event page', 'ecwd' ); ?></th>
|
533 |
-
<td>
|
534 |
-
<div class="checkbox-div">
|
535 |
-
<input type='checkbox' class='ecwd_event_show_map' id='ecwd_event_show_map'
|
536 |
-
name='ecwd_event_show_map' value="1" <?php checked( $ecwd_event_show_map, '1' ); ?>/>
|
537 |
-
<label for="ecwd_event_show_map"></label>
|
538 |
-
</div>
|
539 |
-
</td>
|
540 |
-
</tr>
|
541 |
-
<tr>
|
542 |
-
<th scope="row"><?php _e( 'Event URL', 'ecwd' ); ?></th>
|
543 |
-
<td>
|
544 |
-
<input type="text" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_url" value="<?php echo $ecwd_event_url; ?>"
|
545 |
-
size="70">
|
546 |
-
|
547 |
-
<p class="description">
|
548 |
-
<?php _e( 'Provide a custom URL which will display event details.', 'ecwd' ); ?>
|
549 |
-
</p>
|
550 |
-
</td>
|
551 |
-
</tr>
|
552 |
-
<tr>
|
553 |
-
<th scope="row"><?php _e( 'Event Video URL', 'ecwd' ); ?></th>
|
554 |
-
<td>
|
555 |
-
<input type="text" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_video"
|
556 |
-
value="<?php echo $ecwd_event_video; ?>" size="70">
|
557 |
-
|
558 |
-
<p class="description">
|
559 |
-
<?php _e( 'Provide Youtube or Vimeo URL of the video to accompany the event.', 'ecwd' ); ?>
|
560 |
-
</p>
|
561 |
-
</td>
|
562 |
-
</tr>
|
563 |
</table>
|
2 |
/**
|
3 |
* Display for Event Custom Post Types
|
4 |
*/
|
5 |
+
global $post, $ecwd_options;
|
6 |
$post_id = $post->ID;
|
7 |
+
$meta = get_post_meta($post_id);
|
8 |
|
9 |
// Load up all post meta data
|
10 |
+
$ecwd_event_venue = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_event_venue', true);
|
11 |
+
$ecwd_event_location = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_event_location', true);
|
12 |
+
$ecwd_event_show_map = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_event_show_map', true);
|
13 |
+
$ecwd_map_zoom = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_map_zoom', true);
|
14 |
+
|
15 |
+
$ecwd_lat_long = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_lat_long', true);
|
16 |
+
$ecwd_event_date_from = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_event_date_from', true);
|
17 |
+
$ecwd_event_date_to = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_event_date_to', true);
|
18 |
+
$ecwd_event_url = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_event_url', true);
|
19 |
+
$ecwd_event_repeat_event = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_event_repeat_event', true);
|
20 |
+
$ecwd_event_repeat_how = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_event_repeat_how', true);
|
21 |
+
$ecwd_event_repeat_repeat_until = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_event_repeat_repeat_until', true);
|
22 |
+
$ecwd_all_day_event = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_all_day_event', true);
|
23 |
+
$ecwd_event_day = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_event_day', true);
|
24 |
+
if (!is_array($ecwd_event_day)) {
|
25 |
+
$ecwd_event_day = array();
|
26 |
}
|
27 |
+
$ecwd_venue_meta_phone = $ecwd_venue_meta_website = $venue_meta_show_map = "";
|
28 |
+
$venue_title = $venue_content = "";
|
29 |
+
|
30 |
+
$venues_meta_data = array();
|
31 |
+
|
32 |
+
$venue_meta_keys = array(
|
33 |
+
'ecwd_venue_meta_phone',
|
34 |
+
'ecwd_venue_meta_website',
|
35 |
+
'ecwd_venue_show_map',
|
36 |
+
'ecwd_venue_location',
|
37 |
+
'ecwd_venue_lat_long',
|
38 |
+
'ecwd_map_zoom'
|
39 |
+
);
|
40 |
+
$has_selected_venue = false;
|
41 |
+
if (!empty($venues)) {
|
42 |
+
|
43 |
+
foreach ($venues as $venue) {
|
44 |
+
$venues_meta_data[$venue->ID] = array();
|
45 |
+
|
46 |
+
foreach ($venue_meta_keys as $venue_meta_key) {
|
47 |
+
$venues_meta_data[$venue->ID][$venue_meta_key] = get_post_meta($venue->ID, $venue_meta_key, true);
|
48 |
+
}
|
49 |
+
|
50 |
+
if ($venue->ID == $ecwd_event_venue) {
|
51 |
+
$has_selected_venue = true;
|
52 |
+
$venue_meta_show_map = $venues_meta_data[$ecwd_event_venue]['ecwd_venue_show_map'];
|
53 |
+
}
|
54 |
+
|
55 |
+
// if ($venue->ID == $ecwd_event_venue) {
|
56 |
+
// $ecwd_venue_meta_phone = $venues_meta_data[$ecwd_event_venue]['ecwd_venue_meta_phone'];
|
57 |
+
// $ecwd_venue_meta_website = $venues_meta_data[$ecwd_event_venue]['ecwd_venue_meta_website'];
|
58 |
+
|
59 |
+
// $venue_title = $venue->post_title;
|
60 |
+
// $venue_content = $venue->post_content;
|
61 |
+
// }
|
62 |
+
}
|
63 |
}
|
64 |
+
$ecwd_event_repeat_month_on_days = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_event_repeat_month_on_days', true);
|
65 |
+
if (!$ecwd_event_repeat_month_on_days) {
|
66 |
+
$ecwd_event_repeat_month_on_days = 1;
|
67 |
}
|
68 |
+
$ecwd_event_repeat_year_on_days = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_event_repeat_year_on_days', true);
|
69 |
|
70 |
+
if (!$ecwd_event_repeat_year_on_days) {
|
71 |
+
$ecwd_event_repeat_year_on_days = 1;
|
72 |
}
|
73 |
+
$ecwd_event_repeat_on_the_m = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_event_repeat_on_the_m', true);
|
74 |
+
$ecwd_event_repeat_on_the_y = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_event_repeat_on_the_y', true);
|
75 |
|
76 |
|
77 |
+
$ecwd_monthly_list_monthly = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_monthly_list_monthly', true);
|
78 |
+
$ecwd_monthly_week_monthly = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_monthly_week_monthly', true);
|
79 |
|
80 |
+
$ecwd_monthly_list_yearly = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_monthly_list_yearly', true);
|
81 |
+
$ecwd_monthly_week_yearly = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_monthly_week_yearly', true);
|
82 |
+
$ecwd_event_year_month = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_event_year_month', true);
|
83 |
+
$ecwd_event_video = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_event_video', true);
|
84 |
?>
|
85 |
|
86 |
|
87 |
<table class="form-table">
|
88 |
+
<tr id="ecwd_event_dates">
|
89 |
+
<th scope="row"><?php _e('Event Dates', 'ecwd'); ?></th>
|
90 |
+
<td>
|
91 |
+
<?php _e('From', 'ecwd'); ?>
|
92 |
+
<input type="text" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_date_from"
|
93 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_date_from"
|
94 |
+
class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_date"
|
95 |
+
value="<?php echo $ecwd_event_date_from; ?>"/>
|
96 |
+
<!-- <p class="description">
|
97 |
+
</p>-->
|
98 |
+
<?php _e('To', 'ecwd'); ?>
|
99 |
+
<input type="text" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_date_to"
|
100 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_date_to"
|
101 |
+
class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_date"
|
102 |
+
value="<?php echo $ecwd_event_date_to; ?>"/>
|
103 |
+
|
104 |
+
<!-- <div id="-->
|
105 |
+
<?php //echo ECWD_PLUGIN_PREFIX; ?><!--_event_pickup_date" class="button" value="">Days</div>-->
|
106 |
+
<!-- <div id="-->
|
107 |
+
<?php //echo ECWD_PLUGIN_PREFIX; ?><!--_event_pickup_time" class="button" value="">Time</div>-->
|
108 |
+
<div class="checkbox-div">
|
109 |
+
<input type='checkbox' class='ecwd_all_day_event' id='ecwd_all_day_event'
|
110 |
+
name='ecwd_all_day_event' value="1" <?php checked($ecwd_all_day_event, '1'); ?>/>
|
111 |
+
<label for="ecwd_all_day_event"></label>
|
112 |
+
</div>
|
113 |
+
<label for="ecwd_all_day_event"><?php _e('All day', 'ecwd'); ?></label>
|
114 |
+
<!--<p class="description">
|
115 |
+
</p>-->
|
116 |
+
|
117 |
+
|
118 |
+
<p class="description ecwd_all_day_event_description">
|
119 |
+
<?php _e('Fill in the starting and ending dates and time of the event. If the event lasts entire day, check the box on the right.', 'ecwd'); ?>
|
120 |
+
</p>
|
121 |
+
|
122 |
+
</td>
|
123 |
+
</tr>
|
124 |
+
<?php if ($is_ !== false) { ?>
|
125 |
+
<tr id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeats_div">
|
126 |
+
<th scope="row"><label class="repeat_format"><?php _e('Repeat rate', 'ecwd'); ?></label></th>
|
127 |
+
<td>
|
128 |
+
<div class="<?php echo ECWD_PLUGIN_PREFIX; ?>_repeat">
|
129 |
+
<div class="<?php echo ECWD_PLUGIN_PREFIX; ?>_repeat_type_list">
|
130 |
+
<!-- dont repeat -->
|
131 |
+
<div class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_event_div">
|
132 |
+
<p>
|
133 |
+
<label>
|
134 |
+
<input checked='checked'
|
135 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_dont_repeat_radio"
|
136 |
+
class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_event_radio"
|
137 |
+
type="radio"
|
138 |
+
name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_event"
|
139 |
+
value="no_repeat" <?php checked($ecwd_event_repeat_event, 'no_repeat') ?>/>
|
140 |
+
<?php _e('Don\'t repeat', 'ecwd'); ?>
|
141 |
+
</label>
|
142 |
+
</p>
|
143 |
+
</div>
|
144 |
+
<!-- daily -->
|
145 |
+
<div class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_event_div">
|
146 |
+
<label>
|
147 |
+
<input class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_event_radio" type="radio"
|
148 |
+
name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_event"
|
149 |
+
value="daily" <?php checked($ecwd_event_repeat_event, 'daily') ?>/>
|
150 |
+
<?php _e('Daily', 'ecwd'); ?>
|
151 |
+
</label>
|
152 |
+
|
153 |
+
|
154 |
+
</div>
|
155 |
+
|
156 |
+
<!-- weekly -->
|
157 |
+
<div class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_event_div">
|
158 |
+
<label>
|
159 |
+
<input class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_event_radio" type="radio"
|
160 |
+
name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_event"
|
161 |
+
value="weekly" <?php checked($ecwd_event_repeat_event, 'weekly') ?>/>
|
162 |
+
<?php _e('Weekly', 'ecwd'); ?>
|
163 |
+
</label>
|
164 |
+
|
165 |
+
<p class="description">
|
166 |
+
|
167 |
+
</p>
|
168 |
+
</div>
|
169 |
+
|
170 |
+
<!-- monthly -->
|
171 |
+
<div class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_event_div">
|
172 |
+
<label>
|
173 |
+
<input class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_event_radio"
|
174 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_repeat_event_monthly" type="radio"
|
175 |
+
name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_event"
|
176 |
+
value="monthly" <?php checked($ecwd_event_repeat_event, 'monthly') ?> />
|
177 |
+
<?php _e('Monthly', 'ecwd'); ?>
|
178 |
+
</label>
|
179 |
+
|
180 |
+
<p class="description"></p>
|
181 |
+
|
182 |
+
|
183 |
+
</div>
|
184 |
+
<!-- yearly -->
|
185 |
+
<div class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_event_div">
|
186 |
+
<label>
|
187 |
+
<input class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_event_radio" type="radio"
|
188 |
+
name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_event"
|
189 |
+
value="yearly" <?php checked($ecwd_event_repeat_event, 'yearly') ?>/>
|
190 |
+
<?php _e('Yearly', 'ecwd'); ?>
|
191 |
+
</label>
|
192 |
+
</div>
|
193 |
+
</div>
|
194 |
+
<div class="<?php echo ECWD_PLUGIN_PREFIX; ?>_repeat_advanced ">
|
195 |
+
<div id="ecwd_daily" class="hidden">
|
196 |
+
<label class="repeat_format"><?php _e('Repeat every', 'ecwd'); ?></label>
|
197 |
+
<input type="text" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_how"
|
198 |
+
value="<?php echo $ecwd_event_repeat_how ?>"/>
|
199 |
|
200 |
<span id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_how_label_daily"
|
201 |
class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_how_label hidden">
|
202 |
+
<?php _e('day(s)', 'ecwd'); ?>
|
203 |
</span>
|
204 |
|
205 |
<span id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_how_label_weekly"
|
206 |
class=" <?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_how_label hidden">
|
207 |
+
<?php _e('weeks(s)', 'ecwd'); ?>
|
208 |
+
<?php _e('on ', 'ecwd'); ?>:
|
209 |
</span>
|
210 |
<span id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_how_label_monthly"
|
211 |
class=" <?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_how_label hidden">
|
212 |
+
<?php _e('month(s)', 'ecwd'); ?>
|
213 |
</span>
|
214 |
<span id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_how_label_yearly"
|
215 |
class=" <?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_how_label hidden">
|
216 |
+
<?php _e('year(s) in ', 'ecwd'); ?>
|
217 |
</span>
|
218 |
+
</div>
|
219 |
+
|
220 |
+
<div id="ecwd_weekly" class="hidden">
|
221 |
+
<div id="<?php echo ECWD_PLUGIN_PREFIX; ?>_choose_day_container">
|
222 |
+
<div>
|
223 |
+
<!-- each day is a field -->
|
224 |
+
<div class="checkbox-div">
|
225 |
+
<input type='checkbox' name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_day[]"
|
226 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_monday"
|
227 |
+
value='monday' <?php if (in_array('monday', $ecwd_event_day)) {
|
228 |
+
echo 'checked="checked"';
|
229 |
+
} ?> />
|
230 |
+
<label for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_monday"></label>
|
231 |
+
</div>
|
232 |
+
<label
|
233 |
+
for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_monday"><?php _e('Monday', 'ecwd'); ?></label>
|
234 |
+
</div>
|
235 |
+
<div>
|
236 |
+
<div class="checkbox-div">
|
237 |
+
<input type='checkbox' name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_day[]"
|
238 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_tuesday"
|
239 |
+
value='tuesday' <?php if (in_array('tuesday', $ecwd_event_day)) {
|
240 |
+
echo 'checked="checked"';
|
241 |
+
} ?> />
|
242 |
+
<label for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_tuesday"></label>
|
243 |
+
</div>
|
244 |
+
<label
|
245 |
+
for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_tuesday"><?php _e('Tuesday', 'ecwd'); ?></label>
|
246 |
+
</div>
|
247 |
+
|
248 |
+
<div>
|
249 |
+
<div class="checkbox-div">
|
250 |
+
<input type='checkbox' name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_day[]"
|
251 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_wednesday"
|
252 |
+
value='wednesday' <?php if (in_array('wednesday', $ecwd_event_day)) {
|
253 |
+
echo 'checked="checked"';
|
254 |
+
} ?> />
|
255 |
+
<label for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_wednesday"></label>
|
256 |
+
</div>
|
257 |
+
<label
|
258 |
+
for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_wednesday"><?php _e('Wednesday', 'ecwd'); ?></label>
|
259 |
+
</div>
|
260 |
+
<div>
|
261 |
+
<div class="checkbox-div">
|
262 |
+
<input type='checkbox' name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_day[]"
|
263 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_thursday"
|
264 |
+
value='thursday' <?php if (in_array('thursday', $ecwd_event_day)) {
|
265 |
+
echo 'checked="checked"';
|
266 |
+
} ?> />
|
267 |
+
<label for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_thursday"></label>
|
268 |
+
</div>
|
269 |
+
<label
|
270 |
+
for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_thursday"><?php _e('Thursday', 'ecwd'); ?></label>
|
271 |
+
</div>
|
272 |
+
<div>
|
273 |
+
<div class="checkbox-div">
|
274 |
+
<input type='checkbox' name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_day[]"
|
275 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_friday"
|
276 |
+
value='friday' <?php if (in_array('friday', $ecwd_event_day)) {
|
277 |
+
echo 'checked="checked"';
|
278 |
+
} ?> />
|
279 |
+
<label for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_friday"></label>
|
280 |
+
</div>
|
281 |
+
<label
|
282 |
+
for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_friday"><?php _e('Friday', 'ecwd'); ?></label>
|
283 |
+
</div>
|
284 |
+
<div>
|
285 |
+
<div class="checkbox-div">
|
286 |
+
<input type='checkbox' name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_day[]"
|
287 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_saturday"
|
288 |
+
value='saturday' <?php if (in_array('saturday', $ecwd_event_day)) {
|
289 |
+
echo 'checked="checked"';
|
290 |
+
} ?> />
|
291 |
+
<label for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_saturday"></label>
|
292 |
+
</div>
|
293 |
+
<label
|
294 |
+
for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_saturday"><?php _e('Saturday', 'ecwd'); ?></label>
|
295 |
+
</div>
|
296 |
+
<div>
|
297 |
+
<div class="checkbox-div">
|
298 |
+
<input type='checkbox' name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_day[]"
|
299 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_sunday"
|
300 |
+
value='sunday' <?php if (in_array('sunday', $ecwd_event_day)) {
|
301 |
+
echo 'checked="checked"';
|
302 |
+
} ?> />
|
303 |
+
<label for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_sunday"></label>
|
304 |
+
</div>
|
305 |
+
<label
|
306 |
+
for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_sunday"><?php _e('Sunday', 'ecwd'); ?></label>
|
307 |
+
</div>
|
308 |
+
</div>
|
309 |
+
</div>
|
310 |
+
<div id="ecwd_monthly" class="hidden">
|
311 |
+
<div>
|
312 |
+
|
313 |
+
|
314 |
+
<input type='radio' value="1" <?php checked($ecwd_event_repeat_month_on_days, '1') ?>
|
315 |
+
name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_month_on_days"
|
316 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_month_on_days_1"
|
317 |
+
class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_choose"/>
|
318 |
+
<label class="repeat_format_monthly"
|
319 |
+
for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_month_on_days_1"><?php _e('On the same day', 'ecwd'); ?></label>
|
320 |
+
<!-- <input type="text" name="-->
|
321 |
+
<?php //echo ECWD_PLUGIN_PREFIX; ?><!--_event_repeat_on_the_m"-->
|
322 |
+
<!-- class='-->
|
323 |
+
<?php //echo ECWD_PLUGIN_PREFIX; ?><!--_event_repeat_on_the'-->
|
324 |
+
<!-- value="-->
|
325 |
+
<?php //echo $ecwd_event_repeat_on_the_m; ?><!--"/>-->
|
326 |
+
</div>
|
327 |
+
|
328 |
+
<div class="ecwd_event_repeat_event_div">
|
329 |
+
|
330 |
+
<input type='radio' value="2" <?php checked($ecwd_event_repeat_month_on_days, '2') ?>
|
331 |
+
name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_month_on_days"
|
332 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_month_on_days_2"
|
333 |
+
class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_list_radio"/>
|
334 |
+
|
335 |
+
<label class="repeat_format_monthly"
|
336 |
+
for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_month_on_days_2"><?php _e('On the: ', 'ecwd'); ?></label>
|
337 |
+
<select name="<?php echo ECWD_PLUGIN_PREFIX; ?>_monthly_list_monthly"
|
338 |
+
class="select_to_enable_disable">
|
339 |
+
<option <?php selected($ecwd_monthly_list_monthly, 'first'); ?>
|
340 |
+
value="first"><?php _e('First', 'ecwd'); ?> </option>
|
341 |
+
<option <?php selected($ecwd_monthly_list_monthly, 'second'); ?>
|
342 |
+
value="second"><?php _e('Second', 'ecwd'); ?></option>
|
343 |
+
<option <?php selected($ecwd_monthly_list_monthly, 'third'); ?>
|
344 |
+
value="third"><?php _e('Third', 'ecwd'); ?></option>
|
345 |
+
<option <?php selected($ecwd_monthly_list_monthly, 'fourth'); ?>
|
346 |
+
value="fourth"><?php _e('Fourth', 'ecwd'); ?></option>
|
347 |
+
<option <?php selected($ecwd_monthly_list_monthly, 'last'); ?>
|
348 |
+
value="last"><?php _e('Last', 'ecwd'); ?></option>
|
349 |
+
</select>
|
350 |
+
<select name="<?php echo ECWD_PLUGIN_PREFIX; ?>_monthly_week_monthly"
|
351 |
+
class="select_to_enable_disable">
|
352 |
+
<option <?php selected($ecwd_monthly_week_monthly, 'monday'); ?>
|
353 |
+
value="monday"><?php _e('Monday', 'ecwd'); ?></option>
|
354 |
+
<option <?php selected($ecwd_monthly_week_monthly, 'tuesday'); ?>
|
355 |
+
value="tuesday"><?php _e('Tuesday', 'ecwd'); ?></option>
|
356 |
+
<option <?php selected($ecwd_monthly_week_monthly, 'wednesday'); ?>
|
357 |
+
value="wednesday"><?php _e('Wednesday', 'ecwd'); ?></option>
|
358 |
+
<option <?php selected($ecwd_monthly_week_monthly, 'thursday'); ?>
|
359 |
+
value="thursday"><?php _e('Thursday', 'ecwd'); ?></option>
|
360 |
+
<option <?php selected($ecwd_monthly_week_monthly, 'friday'); ?>
|
361 |
+
value="friday"><?php _e('Friday', 'ecwd'); ?></option>
|
362 |
+
<option <?php selected($ecwd_monthly_week_monthly, 'saturday'); ?>
|
363 |
+
value="saturday"><?php _e('Saturday', 'ecwd'); ?></option>
|
364 |
+
<option <?php selected($ecwd_monthly_week_monthly, 'sunday'); ?>
|
365 |
+
value="sunday"><?php _e('Sunday', 'ecwd'); ?></option>
|
366 |
+
</select>
|
367 |
+
</div>
|
368 |
+
</div>
|
369 |
+
<div id="ecwd_yearly" class="hidden">
|
370 |
+
<select name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_year_month"
|
371 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_year_month" disabled="disabled"
|
372 |
+
class="select_to_enable_disable">
|
373 |
+
<option <?php selected($ecwd_event_year_month, '1'); ?>
|
374 |
+
value="1"><?php _e('January', 'ecwd'); ?></option>
|
375 |
+
<option <?php selected($ecwd_event_year_month, '2'); ?>
|
376 |
+
value="2"><?php _e('February', 'ecwd'); ?></option>
|
377 |
+
<option <?php selected($ecwd_event_year_month, '3'); ?>
|
378 |
+
value="3"><?php _e('March', 'ecwd'); ?></option>
|
379 |
+
<option <?php selected($ecwd_event_year_month, '4'); ?>
|
380 |
+
value="4"><?php _e('April', 'ecwd'); ?></option>
|
381 |
+
<option <?php selected($ecwd_event_year_month, '5'); ?>
|
382 |
+
value="5"><?php _e('May', 'ecwd'); ?></option>
|
383 |
+
<option <?php selected($ecwd_event_year_month, '6'); ?>
|
384 |
+
value="6"><?php _e('June', 'ecwd'); ?></option>
|
385 |
+
<option <?php selected($ecwd_event_year_month, '7'); ?>
|
386 |
+
value="7"><?php _e('July', 'ecwd'); ?></option>
|
387 |
+
<option <?php selected($ecwd_event_year_month, '8'); ?>
|
388 |
+
value="8"><?php _e('August', 'ecwd'); ?></option>
|
389 |
+
<option <?php selected($ecwd_event_year_month, '9'); ?>
|
390 |
+
value="9"><?php _e('September', 'ecwd'); ?></option>
|
391 |
+
<option <?php selected($ecwd_event_year_month, '10'); ?>
|
392 |
+
value="10"><?php _e('October', 'ecwd'); ?></option>
|
393 |
+
<option <?php selected($ecwd_event_year_month, '11'); ?>
|
394 |
+
value="11"><?php _e('November', 'ecwd'); ?></option>
|
395 |
+
<option <?php selected($ecwd_event_year_month, '12'); ?>
|
396 |
+
value="12"><?php _e('December', 'ecwd'); ?></option>
|
397 |
+
</select>
|
398 |
+
|
399 |
+
<div class="ecwd_event_repeat_event_div">
|
400 |
+
<input type='radio' value="1" <?php checked($ecwd_event_repeat_year_on_days, '1') ?>
|
401 |
+
name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_year_on_days"
|
402 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_year_on_days_1"
|
403 |
+
class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_choose"/>
|
404 |
+
<label class="repeat_format_monthly"
|
405 |
+
for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_year_on_days_1"><?php _e('On the same day', 'ecwd'); ?>
|
406 |
+
:</label>
|
407 |
+
<!-- <input type="text" name="-->
|
408 |
+
<?php //echo ECWD_PLUGIN_PREFIX; ?><!--_event_repeat_on_the_m"-->
|
409 |
+
<!-- class='-->
|
410 |
+
<?php //echo ECWD_PLUGIN_PREFIX; ?><!--_event_repeat_on_the'-->
|
411 |
+
<!-- value="-->
|
412 |
+
<?php //echo $ecwd_event_repeat_on_the_m; ?><!--"/>-->
|
413 |
+
</div>
|
414 |
+
|
415 |
+
<div class="ecwd_event_repeat_event_div">
|
416 |
+
<input type='radio' value="2" <?php checked($ecwd_event_repeat_year_on_days, '2') ?>
|
417 |
+
name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_year_on_days"
|
418 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_year_on_days_2"
|
419 |
+
class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_list_radio"/>
|
420 |
+
|
421 |
+
<label class="repeat_format_monthly"
|
422 |
+
for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_year_on_days_2"><?php _e('On the: ', 'ecwd'); ?></label>
|
423 |
+
<select name="<?php echo ECWD_PLUGIN_PREFIX; ?>_monthly_list_yearly"
|
424 |
+
class="select_to_enable_disable">
|
425 |
+
<option <?php selected($ecwd_monthly_list_yearly, 'first'); ?>
|
426 |
+
value="first"> <?php _e('First', 'ecwd'); ?> </option>
|
427 |
+
<option <?php selected($ecwd_monthly_list_yearly, 'second'); ?>
|
428 |
+
value="second"><?php _e('Second', 'ecwd'); ?></option>
|
429 |
+
<option <?php selected($ecwd_monthly_list_yearly, 'third'); ?>
|
430 |
+
value="third"><?php _e('Third', 'ecwd'); ?></option>
|
431 |
+
<option <?php selected($ecwd_monthly_list_yearly, 'fourth'); ?>
|
432 |
+
value="fourth"><?php _e('Fourth', 'ecwd'); ?></option>
|
433 |
+
<option <?php selected($ecwd_monthly_list_yearly, 'last'); ?>
|
434 |
+
value="last"><?php _e('Last', 'ecwd'); ?></option>
|
435 |
+
</select>
|
436 |
+
<select name="<?php echo ECWD_PLUGIN_PREFIX; ?>_monthly_week_yearly"
|
437 |
+
class="select_to_enable_disable">
|
438 |
+
<option <?php selected($ecwd_monthly_week_yearly, 'monday'); ?>
|
439 |
+
value="monday"><?php _e('Monday', 'ecwd'); ?></option>
|
440 |
+
<option <?php selected($ecwd_monthly_week_yearly, 'tuesday'); ?>
|
441 |
+
value="tuesday"><?php _e('Tuesday', 'ecwd'); ?></option>
|
442 |
+
<option <?php selected($ecwd_monthly_week_yearly, 'wednesday'); ?>
|
443 |
+
value="wednesday"><?php _e('Wednesday', 'ecwd'); ?></option>
|
444 |
+
<option <?php selected($ecwd_monthly_week_yearly, 'thursday'); ?>
|
445 |
+
value="thursday"><?php _e('Thursday', 'ecwd'); ?></option>
|
446 |
+
<option <?php selected($ecwd_monthly_week_yearly, 'friday'); ?>
|
447 |
+
value="friday"><?php _e('Friday', 'ecwd'); ?></option>
|
448 |
+
<option <?php selected($ecwd_monthly_week_yearly, 'saturday'); ?>
|
449 |
+
value="saturday"><?php _e('Saturday', 'ecwd'); ?></option>
|
450 |
+
<option <?php selected($ecwd_monthly_week_yearly, 'sunday'); ?>
|
451 |
+
value="sunday"><?php _e('Sunday', 'ecwd'); ?></option>
|
452 |
+
</select>
|
453 |
+
</div>
|
454 |
+
|
455 |
+
</div>
|
456 |
+
<!-- repeat until -->
|
457 |
+
<div class="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_event_div">
|
458 |
+
<p class="description">
|
459 |
+
|
460 |
+
<div id="ecwd_repeat_until" class="hidden">
|
461 |
+
<label class="repeat_format"><?php _e('Repeat until', 'ecwd'); ?></label>
|
462 |
+
<input id='<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_until_input' type="text"
|
463 |
+
name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_repeat_repeat_until"
|
464 |
+
value="<?php echo $ecwd_event_repeat_repeat_until; ?>"/>
|
465 |
+
</div>
|
466 |
+
</p>
|
467 |
+
</div>
|
468 |
+
|
469 |
+
</div>
|
470 |
+
<div class="clear"></div>
|
471 |
+
</div>
|
472 |
+
<p class="description">
|
473 |
+
<?php _e('Specify the repeating rate of the event.', 'ecwd'); ?>
|
474 |
+
</p>
|
475 |
+
</td>
|
476 |
+
</tr>
|
477 |
+
|
478 |
+
|
479 |
+
<?php } else { ?>
|
480 |
+
<tr>
|
481 |
+
<th scope="row"><label class="repeat_format"><?php _e('Repeat rate', 'ecwd'); ?></label></th>
|
482 |
+
<td>
|
483 |
+
<a href="https://web-dorado.com/files/fromEventCalendarWD.php"
|
484 |
+
target="_blank"><?php _e('Upgrade to Pro version', 'ecwd'); ?></a>
|
485 |
+
</td>
|
486 |
+
</tr>
|
487 |
+
<?php } ?>
|
488 |
+
|
489 |
+
<tr>
|
490 |
+
<th scope="row"><?php _e('Event Venue', 'ecwd'); ?></th>
|
491 |
+
<td>
|
492 |
+
|
493 |
+
<select name="ecwd_event_venue" id="ecwd_event_venue">
|
494 |
+
<option value="0">None</option>
|
495 |
+
<?php
|
496 |
+
if (!empty($venues)) {
|
497 |
+
foreach ($venues as $venue) {
|
498 |
+
|
499 |
+
|
500 |
+
$options_attr = "";
|
501 |
+
$options_attr .= 'data-venuetitle="' . $venue->post_title . '" ';
|
502 |
+
$options_attr .= 'data-venuecontent="' . $venue->post_content . '" ';
|
503 |
+
$options_attr .= 'data-location="' . $venues_meta_data[$venue->ID]['ecwd_venue_location'] . '" ';
|
504 |
+
$options_attr .= 'data-marker="' . $venues_meta_data[$venue->ID]['ecwd_venue_lat_long'] . '" ';
|
505 |
+
$options_attr .= 'data-zoom="' . $venues_meta_data[$venue->ID]['ecwd_map_zoom'] . '" ';
|
506 |
+
$options_attr .= 'data-metaphone="' . $venues_meta_data[$venue->ID]['ecwd_venue_meta_phone'] . '" ';
|
507 |
+
$options_attr .= 'data-metawebsite="' . $venues_meta_data[$venue->ID]['ecwd_venue_meta_website'] . '" ';
|
508 |
+
$options_attr .= 'data-showmap="' . $venues_meta_data[$venue->ID]['ecwd_venue_show_map'] . '" ';
|
509 |
+
|
510 |
+
?>
|
511 |
+
<option
|
512 |
+
value="<?php echo $venue->ID; ?>"
|
513 |
+
<?php echo $options_attr; ?>
|
514 |
+
<?php echo selected($venue->ID, $ecwd_event_venue); ?>>
|
515 |
+
<?php echo $venue->post_title; ?>
|
516 |
+
</option>
|
517 |
+
<?php
|
518 |
+
}
|
519 |
+
}
|
520 |
+
$venue_fields_style = ($has_selected_venue == '1') ? "style='display:none;'" : "";
|
521 |
+
?>
|
522 |
+
</select>
|
523 |
+
|
524 |
+
<p class="description">
|
525 |
+
<?php _e('Select the venue of the event.', 'ecwd'); ?>
|
526 |
+
</p>
|
527 |
+
|
528 |
+
<div class="ecwd-venue-meta-fields">
|
529 |
+
<!-- start ecwd_venue_title -->
|
530 |
+
<div class="ecwd-meta-field" <?php echo $venue_fields_style; ?>>
|
531 |
+
<label for="ecwd_venue_title">Venue Title:</label>
|
532 |
+
<input type="text" name="ecwd_venue_title" id="ecwd_venue_title"
|
533 |
+
value="<?php echo $venue_title; ?>" size="50"/>
|
534 |
+
</div>
|
535 |
+
<!-- end ecwd_venue_title -->
|
536 |
+
<!-- start ecwd_venue_description -->
|
537 |
+
<div class="ecwd-meta-field" <?php echo $venue_fields_style; ?>>
|
538 |
+
<label style="vertical-align: top;" for="ecwd_venue_content">Venue Description:</label>
|
539 |
+
<textarea name="ecwd_venue_content" id="ecwd_venue_content"><?php echo $venue_content; ?></textarea>
|
540 |
+
</div>
|
541 |
+
<!-- end ecwd_venue_description -->
|
542 |
+
<!-- start ecwd_event_location -->
|
543 |
+
<div class="ecwd-meta-field">
|
544 |
+
<label for="ecwd_event_location">Address:</label>
|
545 |
+
<input type="text" name="ecwd_event_location" id="ecwd_event_location"
|
546 |
+
value="<?php echo $ecwd_event_location; ?>" size="40"/>
|
547 |
+
</div>
|
548 |
+
<!-- end ecwd_event_location -->
|
549 |
+
<!-- start ecwd_venue_meta_phone -->
|
550 |
+
<div class="ecwd-meta-field" <?php echo $venue_fields_style; ?>>
|
551 |
+
<label for="ecwd_venue_meta_phone">Phone:</label>
|
552 |
+
<input type="text" name="ecwd_venue_meta_phone"
|
553 |
+
id="ecwd_venue_meta_phone" value="<?php echo $ecwd_venue_meta_phone; ?>"/>
|
554 |
+
</div>
|
555 |
+
<!-- end ecwd_venue_meta_phone -->
|
556 |
+
<!-- start ecwd_venue_meta_website -->
|
557 |
+
<div class="ecwd-meta-field" <?php echo $venue_fields_style; ?>>
|
558 |
+
<label for="ecwd_venue_meta_website">Website:</label>
|
559 |
+
<input type="text" name="ecwd_venue_meta_website"
|
560 |
+
id="ecwd_venue_meta_website" value="<?php echo $ecwd_venue_meta_website; ?>"/>
|
561 |
+
</div>
|
562 |
+
<!-- end ecwd_venue_meta_website -->
|
563 |
+
<div class="ecwd-meta-field" <?php echo $venue_fields_style; ?>>
|
564 |
+
<label for="ecwd_venue_show_map">Show Google Map:</label>
|
565 |
+
<div class="checkbox-div">
|
566 |
+
<input type='checkbox' class='ecwd_venue_show_map' id='ecwd_venue_show_map'
|
567 |
+
name='ecwd_venue_show_map' value="1" <?php checked($venue_meta_show_map, 1); ?>/>
|
568 |
+
<label for="ecwd_venue_show_map"></label>
|
569 |
+
</div>
|
570 |
+
</div>
|
571 |
+
|
572 |
+
</div>
|
573 |
+
<?php
|
574 |
+
|
575 |
+
$ecwd_marker = 1;
|
576 |
+
if (!$ecwd_lat_long) {
|
577 |
+
$ecwd_lat_long = $lat . ',' . $long;
|
578 |
+
$ecwd_marker = 0;
|
579 |
+
}
|
580 |
+
|
581 |
+
$latitude = $longitude = '';
|
582 |
+
if (!empty($ecwd_lat_long)) {
|
583 |
+
$lat_long_data = explode(',', $ecwd_lat_long);
|
584 |
+
if (is_array($lat_long_data) && count($lat_long_data) == 2) {
|
585 |
+
$latitude = $lat_long_data[0];
|
586 |
+
$longitude = $lat_long_data[1];
|
587 |
+
}
|
588 |
+
}
|
589 |
+
|
590 |
+
$gmap_key = (isset($ecwd_options['gmap_key'])) ? trim($ecwd_options['gmap_key']) : "";
|
591 |
+
|
592 |
+
$venue_description_class = ($venue_meta_show_map !== '1') ? 'ecwd_hidden' : '';
|
593 |
+
$venue_description_class .= ' description ecwd_venue_meta_decription';
|
594 |
+
if (!empty($gmap_key)) {
|
595 |
+
$venue_map_class = ($venue_meta_show_map !== '1') ? "ecwd-hide-map" : "";
|
596 |
+
?>
|
597 |
+
|
598 |
+
<div class="ecwd_google_map_wrapper">
|
599 |
+
<div class="ecwd_google_map <?php echo $venue_map_class; ?>">
|
600 |
+
<?php
|
601 |
+
|
602 |
+
if (!$ecwd_map_zoom) {
|
603 |
+
$ecwd_map_zoom = 17;
|
604 |
+
}
|
605 |
+
|
606 |
+
$ecwd_marker = 1;
|
607 |
+
if (!$ecwd_lat_long) {
|
608 |
+
$ecwd_map_zoom = 9;
|
609 |
+
$ecwd_lat_long = $lat . ',' . $long;
|
610 |
+
$ecwd_marker = 0;
|
611 |
+
}
|
612 |
+
?>
|
613 |
+
<input type="hidden" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_lat_long"
|
614 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_lat_long"
|
615 |
+
value="<?php echo $ecwd_lat_long; ?>"/>
|
616 |
+
<input type="hidden" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_marker"
|
617 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_marker" value="<?php echo $ecwd_marker; ?>"/>
|
618 |
+
<input type="hidden" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_map_zoom"
|
619 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_map_zoom"
|
620 |
+
value="<?php echo $ecwd_map_zoom; ?>"/>
|
621 |
+
|
622 |
+
<div id="map-canvas" style="width: 100%; height: 300px; min-height: 300px;"></div>
|
623 |
+
|
624 |
+
<?php
|
625 |
+
$latitude = $longitude = '';
|
626 |
+
if (!empty($ecwd_lat_long)) {
|
627 |
+
$lat_long_data = explode(',', $ecwd_lat_long);
|
628 |
+
if (is_array($lat_long_data) && count($lat_long_data) == 2) {
|
629 |
+
$latitude = $lat_long_data[0];
|
630 |
+
$longitude = $lat_long_data[1];
|
631 |
+
}
|
632 |
+
}
|
633 |
+
?>
|
634 |
+
|
635 |
+
<label style="width:85px;display:inline-block;" for="ecwd_latitude">Latitude:</label>
|
636 |
+
<input type="text" id="ecwd_latitude" value="<?php echo $latitude; ?>"/>
|
637 |
+
<br/>
|
638 |
+
<label style="width:85px;display:inline-block;" for="ecwd_longitude">Longitude:</label>
|
639 |
+
<input type="text" id="ecwd_longitude" value="<?php echo $longitude; ?>"/>
|
640 |
+
</div>
|
641 |
+
</div>
|
642 |
+
<p class="<?php echo $venue_description_class; ?>">
|
643 |
+
<?php _e('If venue is not specified you can fill in the address of the event location or click on the map to drag and drop the marker to the event location.', 'ecwd'); ?>
|
644 |
+
</p>
|
645 |
+
<?php } else { ?>
|
646 |
+
<label></label>
|
647 |
+
<span class="<?php echo $venue_description_class; ?>">
|
648 |
+
<?php _e('Gmap key does not exist', 'ecwd'); ?>
|
649 |
+
<a href="edit.php?post_type=ecwd_event&page=ecwd_general_settings&tab=google_map">Settings page</a>
|
650 |
+
</span>
|
651 |
+
<?php } ?>
|
652 |
+
</td>
|
653 |
+
</tr>
|
654 |
+
<tr>
|
655 |
+
<th scope="row"><?php _e('Event URL', 'ecwd'); ?></th>
|
656 |
+
<td>
|
657 |
+
<input type="text" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_url" value="<?php echo $ecwd_event_url; ?>"
|
658 |
+
size="70">
|
659 |
+
|
660 |
+
<p class="description">
|
661 |
+
<?php _e('Provide a custom URL which will display event details.', 'ecwd'); ?>
|
662 |
+
</p>
|
663 |
+
</td>
|
664 |
+
</tr>
|
665 |
<tr>
|
666 |
+
<th scope="row"><?php _e('Event Video URL', 'ecwd'); ?></th>
|
667 |
+
<td>
|
668 |
+
<input type="text" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_video"
|
669 |
+
value="<?php echo $ecwd_event_video; ?>" size="70">
|
670 |
+
|
671 |
+
<p class="description">
|
672 |
+
<?php _e('Provide Youtube or Vimeo URL of the video to accompany the event.', 'ecwd'); ?>
|
673 |
+
</p>
|
674 |
+
</td>
|
675 |
+
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
676 |
</table>
|
views/admin/ecwd-event-organizers-meta.php
CHANGED
@@ -5,39 +5,89 @@
|
|
5 |
global $post;
|
6 |
|
7 |
$post_id = $post->ID;
|
8 |
-
$type = ECWD_PLUGIN_PREFIX.'_organizer';
|
9 |
$args = array(
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
);
|
15 |
$organizer_posts = get_posts($args);
|
16 |
-
$event_organizers = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX.'_event_organizers', true);
|
17 |
-
if(!$event_organizers || $event_organizers == '' || !is_array($event_organizers)){
|
18 |
-
|
19 |
}
|
|
|
20 |
?>
|
21 |
-
<div id="<?php echo ECWD_PLUGIN_PREFIX
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
<?php }
|
35 |
-
|
36 |
-
} else {
|
37 |
-
?><a href="post-new.php?post_type=<?php echo ECWD_PLUGIN_PREFIX;?>_organizer"><?php _e('Add organizer', 'ecwd');?></a><?php
|
38 |
-
}
|
39 |
-
?>
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
</div>
|
43 |
|
5 |
global $post;
|
6 |
|
7 |
$post_id = $post->ID;
|
8 |
+
$type = ECWD_PLUGIN_PREFIX . '_organizer';
|
9 |
$args = array(
|
10 |
+
'post_type' => $type,
|
11 |
+
'post_status' => 'publish',
|
12 |
+
'posts_per_page' => -1,
|
13 |
+
'ignore_sticky_posts' => 1
|
14 |
);
|
15 |
$organizer_posts = get_posts($args);
|
16 |
+
$event_organizers = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_event_organizers', true);
|
17 |
+
if (!$event_organizers || $event_organizers == '' || !is_array($event_organizers)) {
|
18 |
+
$event_organizers = array();
|
19 |
}
|
20 |
+
|
21 |
?>
|
22 |
+
<div id="<?php echo ECWD_PLUGIN_PREFIX; ?>-display-options-wrap" class="ecwd-admin-fields">
|
23 |
+
<div class="ecwd-add_organizer-container">
|
24 |
+
<a class="ecwd-add-organizer" href="#"><?php _e('Add organizer', 'ecwd'); ?></a>
|
25 |
+
<div class="ecwd-add-organizer-form" style="display: none">
|
26 |
+
<div class="ecwd-organizer-meta-fields">
|
27 |
+
|
28 |
+
<!-- start ecwd-add-organizer-title -->
|
29 |
+
<div class="ecwd-meta-field">
|
30 |
+
<label for="ecwd-add-organizer-title">Title:</label>
|
31 |
+
<input type="text" name="ecwd-add-organizer-title" id="ecwd-add-organizer-title"/>
|
32 |
+
</div>
|
33 |
+
<!-- end ecwd-add-organizer-title -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
+
<!-- start ecwd-add-organizer-content -->
|
36 |
+
<div class="ecwd-meta-field">
|
37 |
+
<label for="ecwd-add-organizer-content" style="vertical-align: top;">Description:</label>
|
38 |
+
<textarea name="ecwd-add-organizer-content" id="ecwd-add-organizer-content"></textarea>
|
39 |
+
</div>
|
40 |
+
<!-- end ecwd-add-organizer-content -->
|
41 |
+
|
42 |
+
<!-- start ecwd_organizer_meta_phone -->
|
43 |
+
<div class="ecwd-meta-field">
|
44 |
+
<label for="ecwd_organizer_meta_phone">Phone:</label>
|
45 |
+
<input type="text" name="ecwd_organizer_meta_phone" id="ecwd_organizer_meta_phone"/>
|
46 |
+
</div>
|
47 |
+
<!-- end ecwd_event_location -->
|
48 |
+
<!-- start ecwd_venue_meta_phone -->
|
49 |
+
<div class="ecwd-meta-field">
|
50 |
+
<label for="ecwd_organizer_meta_website">Website:</label>
|
51 |
+
<input type="text" name="ecwd_organizer_meta_website" id="ecwd_organizer_meta_website"/>
|
52 |
+
</div>
|
53 |
+
<div>
|
54 |
+
<button
|
55 |
+
class="button button-primary button-large ecwd-add-organizer-save"><?php _e('Save', 'ecwd'); ?></button>
|
56 |
+
</div>
|
57 |
+
<div class="ecwd-organizer-template" style="display: none">
|
58 |
+
<p>
|
59 |
+
<label for="ecwd_event_organizers_{organizer_id}" id="ecwd_event_calendar_label_{organizer_id}">
|
60 |
+
<input type="checkbox" name="ecwd_event_organizers[]" id="ecwd_event_organizers_{organizer_id}"
|
61 |
+
value="{organizer_id}" checked="checked"/>{organizer_title}</label>
|
62 |
+
</p>
|
63 |
+
</div>
|
64 |
</div>
|
65 |
+
</div>
|
66 |
+
|
67 |
+
<div class="ecwd-meta-control ecwd-organizers-list">
|
68 |
+
<?php
|
69 |
+
if (count($organizer_posts) > 0) {
|
70 |
+
foreach ($organizer_posts as $organizer_post) { ?>
|
71 |
+
<p>
|
72 |
+
<label for="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_organizers_<?php echo $organizer_post->ID; ?>"
|
73 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_calendar_label_<?php echo $organizer_post->ID ?>">
|
74 |
+
<input type="checkbox" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_organizers[]"
|
75 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_event_organizers_<?php echo $organizer_post->ID; ?>"
|
76 |
+
value="<?php echo $organizer_post->ID; ?>" <?php if (in_array($organizer_post->ID, $event_organizers)) {
|
77 |
+
echo 'checked="checked"';
|
78 |
+
}
|
79 |
+
?> />
|
80 |
+
<?php echo $organizer_post->post_title; ?>
|
81 |
+
</label>
|
82 |
+
</p>
|
83 |
+
|
84 |
+
<?php }
|
85 |
+
|
86 |
+
} else {
|
87 |
+
|
88 |
+
}
|
89 |
+
?>
|
90 |
+
|
91 |
+
</div>
|
92 |
</div>
|
93 |
|
views/admin/ecwd-organizer-meta.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Display for Event Custom Post Types
|
4 |
+
*/
|
5 |
+
|
6 |
+
global $post, $ecwd_options;
|
7 |
+
$post_id = $post->ID;
|
8 |
+
|
9 |
+
$ecwd_organizer_meta_phone = get_post_meta($post->ID, 'ecwd_organizer_meta_phone', true);
|
10 |
+
$ecwd_organizer_meta_website = get_post_meta($post->ID, 'ecwd_organizer_meta_website', true);
|
11 |
+
|
12 |
+
|
13 |
+
?>
|
14 |
+
|
15 |
+
|
16 |
+
<table class="form-table ecwd-admin-fields">
|
17 |
+
<tr>
|
18 |
+
<td>
|
19 |
+
<div class="ecwd-organizer-meta-fields">
|
20 |
+
<!-- start ecwd_organizer_meta_phone -->
|
21 |
+
<div class="ecwd-meta-field">
|
22 |
+
<label for="ecwd_organizer_meta_phone">Phone:</label>
|
23 |
+
<input type="text" name="ecwd_organizer_meta_phone" id="ecwd_organizer_meta_phone"
|
24 |
+
value="<?php echo $ecwd_organizer_meta_phone; ?>"/>
|
25 |
+
</div>
|
26 |
+
<!-- end ecwd_event_location -->
|
27 |
+
<!-- start ecwd_venue_meta_phone -->
|
28 |
+
<div class="ecwd-meta-field">
|
29 |
+
<label for="ecwd_organizer_meta_website">Website:</label>
|
30 |
+
<input type="text" name="ecwd_organizer_meta_website"
|
31 |
+
id="ecwd_organizer_meta_website" value="<?php echo $ecwd_organizer_meta_website; ?>"/>
|
32 |
+
</div>
|
33 |
+
</div>
|
34 |
+
</td>
|
35 |
+
</tr>
|
36 |
+
</table>
|
views/admin/ecwd-venue-meta.php
CHANGED
@@ -2,59 +2,118 @@
|
|
2 |
/**
|
3 |
* Display for Event Custom Post Types
|
4 |
*/
|
5 |
-
global $post;
|
6 |
$post_id = $post->ID;
|
7 |
$meta = get_post_meta($post_id);
|
8 |
|
9 |
// Load up all post meta data
|
10 |
-
|
11 |
-
$
|
12 |
-
$
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
$ecwd_map_zoom = 17;
|
15 |
}
|
|
|
16 |
?>
|
17 |
|
18 |
|
19 |
-
<table class="form-table">
|
20 |
<tr>
|
21 |
<td>
|
22 |
-
<
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
if (!$ecwd_venue_lat_long) {
|
29 |
-
$ecwd_map_zoom = 9;
|
30 |
-
$ecwd_venue_lat_long = $lat . ',' . $long;
|
31 |
-
$ecwd_marker = 0;
|
32 |
-
} ?>
|
33 |
-
<input type="hidden" name="<?php echo ECWD_PLUGIN_PREFIX;?>_venue_lat_long" id="<?php echo ECWD_PLUGIN_PREFIX;?>_lat_long"
|
34 |
-
value="<?php echo $ecwd_venue_lat_long; ?>"/>
|
35 |
-
<input type="hidden" name="<?php echo ECWD_PLUGIN_PREFIX;?>_marker" id="<?php echo ECWD_PLUGIN_PREFIX;?>_marker" value="<?php echo $ecwd_marker; ?>"/>
|
36 |
-
<input type="hidden" name="<?php echo ECWD_PLUGIN_PREFIX;?>_map_zoom" id="<?php echo ECWD_PLUGIN_PREFIX;?>_map_zoom"
|
37 |
-
value="<?php echo $ecwd_map_zoom; ?>"/>
|
38 |
-
|
39 |
-
<div id="map-canvas" style="width: 100%; height: 300px; min-height: 300px;">
|
40 |
-
|
41 |
</div>
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
</div>
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
</td>
|
59 |
</tr>
|
60 |
</table>
|
2 |
/**
|
3 |
* Display for Event Custom Post Types
|
4 |
*/
|
5 |
+
global $post, $ecwd_options;
|
6 |
$post_id = $post->ID;
|
7 |
$meta = get_post_meta($post_id);
|
8 |
|
9 |
// Load up all post meta data
|
10 |
+
|
11 |
+
$ecwd_venue_meta_phone = get_post_meta($post->ID, 'ecwd_venue_meta_phone', true);
|
12 |
+
$ecwd_venue_meta_website = get_post_meta($post->ID, 'ecwd_venue_meta_website', true);
|
13 |
+
$ecwd_venue_show_map = get_post_meta($post->ID, 'ecwd_venue_show_map', true);
|
14 |
+
|
15 |
+
|
16 |
+
$ecwd_venue_location = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_venue_location', true);
|
17 |
+
$ecwd_venue_lat_long = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_venue_lat_long', true);
|
18 |
+
$ecwd_map_zoom = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_map_zoom', true);
|
19 |
+
if (!$ecwd_map_zoom) {
|
20 |
$ecwd_map_zoom = 17;
|
21 |
}
|
22 |
+
|
23 |
?>
|
24 |
|
25 |
|
26 |
+
<table class="form-table ecwd-admin-fields">
|
27 |
<tr>
|
28 |
<td>
|
29 |
+
<div class="ecwd-venue-meta-fields">
|
30 |
+
<!-- start ecwd_event_location -->
|
31 |
+
<div class="ecwd-meta-field">
|
32 |
+
<label for="ecwd_event_location">Address:</label>
|
33 |
+
<input type="text" name="ecwd_venue_location" id="ecwd_event_location"
|
34 |
+
value="<?php echo $ecwd_venue_location; ?>" size="70"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
</div>
|
36 |
+
<!-- end ecwd_event_location -->
|
37 |
+
<!-- start ecwd_venue_meta_phone -->
|
38 |
+
<div class="ecwd-meta-field">
|
39 |
+
<label for="ecwd_venue_meta_phone">Phone:</label>
|
40 |
+
<input type="text" name="ecwd_venue_meta_phone"
|
41 |
+
id="ecwd_venue_meta_phone" value="<?php echo $ecwd_venue_meta_phone; ?>"/>
|
42 |
+
</div>
|
43 |
+
<!-- end ecwd_venue_meta_phone -->
|
44 |
+
<!-- start ecwd_venue_meta_website -->
|
45 |
+
<div class="ecwd-meta-field">
|
46 |
+
<label for="ecwd_venue_meta_website">Website:</label>
|
47 |
+
<input type="text" name="ecwd_venue_meta_website"
|
48 |
+
id="ecwd_venue_meta_website" value="<?php echo $ecwd_venue_meta_website; ?>"/>
|
49 |
+
</div>
|
50 |
+
<!-- end ecwd_venue_meta_website -->
|
51 |
+
<div class="ecwd-meta-field">
|
52 |
+
<label for="ecwd_venue_show_map">Show Google Map:</label>
|
53 |
+
<input type='checkbox' id='ecwd_venue_show_map' name='ecwd_venue_show_map' value="1"
|
54 |
+
<?php checked($ecwd_venue_show_map, '1'); ?>/>
|
55 |
+
</div>
|
56 |
+
|
57 |
</div>
|
58 |
+
|
59 |
+
<?php
|
60 |
+
$description_class = ($ecwd_venue_show_map !== '1') ? 'ecwd_hidden' : '';
|
61 |
+
$description_class .= ' description ecwd_venue_meta_decription';
|
62 |
+
|
63 |
+
$gmap_key = (isset($ecwd_options['gmap_key'])) ? trim($ecwd_options['gmap_key']) : "";
|
64 |
+
if (!empty($gmap_key)) {
|
65 |
+
|
66 |
+
$class = ($ecwd_venue_show_map !== '1') ? "ecwd-hide-map" : "";
|
67 |
+
?>
|
68 |
+
<div class="ecwd_google_map_wrapper">
|
69 |
+
<div class="ecwd_google_map <?php echo $class; ?>">
|
70 |
+
<?php
|
71 |
+
$ecwd_marker = 1;
|
72 |
+
if (!$ecwd_venue_lat_long) {
|
73 |
+
$ecwd_map_zoom = 9;
|
74 |
+
$ecwd_venue_lat_long = $lat . ',' . $long;
|
75 |
+
$ecwd_marker = 0;
|
76 |
+
} ?>
|
77 |
+
<input type="hidden" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_venue_lat_long"
|
78 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_lat_long"
|
79 |
+
value="<?php echo $ecwd_venue_lat_long; ?>"/>
|
80 |
+
<input type="hidden" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_marker"
|
81 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_marker" value="<?php echo $ecwd_marker; ?>"/>
|
82 |
+
<input type="hidden" name="<?php echo ECWD_PLUGIN_PREFIX; ?>_map_zoom"
|
83 |
+
id="<?php echo ECWD_PLUGIN_PREFIX; ?>_map_zoom"
|
84 |
+
value="<?php echo $ecwd_map_zoom; ?>"/>
|
85 |
+
|
86 |
+
<div id="map-canvas" style="width: 100%; height: 300px; min-height: 300px;">
|
87 |
+
|
88 |
+
</div>
|
89 |
+
<?php
|
90 |
+
$latitude = $longitude = '';
|
91 |
+
if (!empty($ecwd_venue_lat_long)) {
|
92 |
+
$lat_long_data = explode(',', $ecwd_venue_lat_long);
|
93 |
+
if (is_array($lat_long_data) && count($lat_long_data) == 2) {
|
94 |
+
$latitude = $lat_long_data[0];
|
95 |
+
$longitude = $lat_long_data[1];
|
96 |
+
}
|
97 |
+
}
|
98 |
+
?>
|
99 |
+
<label style="width:85px" for="<?php echo ECWD_PLUGIN_PREFIX; ?>_latitude">Latitude:</label>
|
100 |
+
<input type="text" id="<?php echo ECWD_PLUGIN_PREFIX; ?>_latitude" value="<?php echo $latitude; ?>"/>
|
101 |
+
<br/>
|
102 |
+
<label style="width:85px" for="<?php echo ECWD_PLUGIN_PREFIX; ?>_longitude">Longitude:</label>
|
103 |
+
<input type="text" id="<?php echo ECWD_PLUGIN_PREFIX; ?>_longitude" value="<?php echo $longitude; ?>"/>
|
104 |
+
</div>
|
105 |
+
</div>
|
106 |
+
<p class="<?php echo $description_class; ?>">
|
107 |
+
<?php _e('Fill in the address of the venue or click on the map to drag and drop the marker to a specific location', 'ecwd'); ?>
|
108 |
+
</p>
|
109 |
+
<?php } else { ?>
|
110 |
+
<label></label>
|
111 |
+
<span class="<?php echo $description_class; ?>">
|
112 |
+
<?php _e('Gmap key does not exist', 'ecwd'); ?>
|
113 |
+
<a href="edit.php?post_type=ecwd_event&page=ecwd_general_settings&tab=google_map">Settings page</a>
|
114 |
+
</span>
|
115 |
+
<?php } ?>
|
116 |
+
|
117 |
</td>
|
118 |
</tr>
|
119 |
</table>
|
views/ecwd-event-popup.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Display for Event Custom Post Types
|
4 |
*/
|
5 |
if (!defined('ABSPATH')) {
|
6 |
-
|
7 |
}
|
8 |
|
9 |
$post = get_post($post_id);
|
@@ -17,19 +17,19 @@ $date_format = 'Y-m-d';
|
|
17 |
$time_format = 'H:i';
|
18 |
$ecwd_social_icons = false;
|
19 |
if (isset($ecwd_options['date_format']) && $ecwd_options['date_format'] != '') {
|
20 |
-
|
21 |
}
|
22 |
if (isset($ecwd_options['time_format']) && $ecwd_options['time_format'] != '') {
|
23 |
-
|
24 |
}
|
25 |
$time_format .= (isset($ecwd_options['time_type']) ? ' ' . $ecwd_options['time_type'] : '');
|
26 |
if (isset($ecwd_options['time_type']) && $ecwd_options['time_type'] != '') {
|
27 |
-
|
28 |
-
|
29 |
}
|
30 |
|
31 |
if (isset($ecwd_options['social_icons']) && $ecwd_options['social_icons'] != '') {
|
32 |
-
|
33 |
}
|
34 |
// Load up all post meta data
|
35 |
|
@@ -40,16 +40,16 @@ $ecwd_event_date_from = $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from
|
|
40 |
$ecwd_event_date_to = $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0];
|
41 |
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'] = array(0 => '');
|
42 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'])) {
|
43 |
-
|
44 |
}
|
45 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'])) {
|
46 |
-
|
47 |
}
|
48 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'])) {
|
49 |
-
|
50 |
}
|
51 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'])) {
|
52 |
-
|
53 |
}
|
54 |
|
55 |
$permalink = get_the_permalink($ecwd_event->ID);
|
@@ -57,18 +57,20 @@ $this_event = $events[$ecwd_event->ID] = new ECWD_Event($ecwd_event->ID, '', $ec
|
|
57 |
$ecwd_event_date_from = $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'][0];
|
58 |
$ecwd_event_date_to = $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0];
|
59 |
$d = new ECWD_Display('');
|
60 |
-
if ($
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
$eventdayslong = $d->dateDiff($ecwd_event_date_from, $ecwd_event_date_to);
|
65 |
$ecwd_event_date_from = $ajax_date;
|
66 |
-
$ecwd_event_date_to = date('Y-m-d', strtotime((
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
|
|
|
|
72 |
}
|
73 |
|
74 |
|
@@ -77,18 +79,18 @@ $ecwd_event_latlong = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'][
|
|
77 |
$ecwd_event_zoom = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_map_zoom'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_map_zoom'][0] : '';
|
78 |
$ecwd_event_show_map = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_show_map'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_show_map'][0] : 0;
|
79 |
if ($ecwd_event_show_map == '') {
|
80 |
-
|
81 |
}
|
82 |
if (!$ecwd_event_zoom) {
|
83 |
-
|
84 |
}
|
85 |
$ecwd_event_organizers = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_organizers'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_organizers'][0] : '';
|
86 |
if ($ecwd_event_organizers != '') {
|
87 |
-
|
88 |
}
|
89 |
$ecwd_event_url = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0] : '';
|
90 |
if ($ecwd_event_url == "") {
|
91 |
-
|
92 |
}
|
93 |
$ecwd_event_video = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_video'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_video'][0] : '';
|
94 |
$ecwd_all_day_event = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_all_day_event'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_all_day_event'][0] : 0;
|
@@ -96,275 +98,317 @@ $venue = '';
|
|
96 |
$venue_permalink = '';
|
97 |
$venue_post_id = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_venue'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_venue'][0] : 0;
|
98 |
if ($venue_post_id) {
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
}
|
105 |
|
106 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
|
|
|
|
|
|
|
108 |
if (is_array($ecwd_event_organizers) || is_object($ecwd_event_organizers)) {
|
109 |
-
|
110 |
-
|
|
|
|
|
111 |
}
|
|
|
|
|
112 |
}
|
|
|
113 |
if (function_exists('has_post_thumbnail') && has_post_thumbnail($post->ID)) {
|
114 |
-
|
115 |
-
|
116 |
} else {
|
117 |
-
|
118 |
}
|
119 |
$category_and_tags = false;
|
120 |
|
121 |
if (isset($ecwd_options['category_and_tags']) && $ecwd_options['category_and_tags'] != '') {
|
122 |
-
|
123 |
}
|
124 |
$args = array('orderby' => 'name', 'order' => 'ASC', 'fields' => 'all');
|
125 |
$event_tags = wp_get_post_terms($post->ID, 'ecwd_event_tag', $args);
|
126 |
$event_categories = wp_get_post_terms($post->ID, 'ecwd_event_category', $args);
|
127 |
?>
|
128 |
<div id="ecwd-events-content" class="ecwd-events-single">
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
if ($ecwd_all_day_event == 1) {
|
150 |
-
echo date($date_format, strtotime($ecwd_event_date_from));
|
151 |
-
if ($ecwd_all_day_event == 1) {
|
152 |
-
if ($ecwd_event_date_to && date($date_format, strtotime($ecwd_event_date_from)) !== date($date_format, strtotime($ecwd_event_date_to))) {
|
153 |
-
echo ' - ' . date($date_format, strtotime($ecwd_event_date_to));
|
154 |
-
}
|
155 |
-
echo ' ' . __('All day', 'ecwd');
|
156 |
-
}
|
157 |
-
} else {
|
158 |
-
echo date($date_format, strtotime($ecwd_event_date_from)) . ' ' . date($time_format, strtotime($ecwd_event_date_from));
|
159 |
-
|
160 |
-
if ($ecwd_event_date_to) {
|
161 |
-
echo ' - ' . date($date_format, strtotime($ecwd_event_date_to)) . ' ' . date($time_format, strtotime($ecwd_event_date_to));
|
162 |
-
}
|
163 |
-
}
|
164 |
-
?>
|
165 |
-
</span>
|
166 |
-
</div>
|
167 |
-
<?php if (isset($ecwd_options['show_repeat_rate'])) { ?>
|
168 |
-
<div class="ecwd_repeat_rate_text">
|
169 |
-
<span><?php echo $d->get_repeat_rate($post_id, '', $date_format); ?></span>
|
170 |
-
</div>
|
171 |
-
<?php } ?>
|
172 |
-
<?php if ($ecwd_event_url) { ?>
|
173 |
-
<div class="ecwd-url">
|
174 |
-
|
175 |
-
<a href="<?php echo $ecwd_event_url; ?>" target="_blank">
|
176 |
-
<label class="ecwd-event-url-info"
|
177 |
-
title="<?php _e('Url', 'ecwd'); ?>"></label> <?php echo $ecwd_event_url; ?>
|
178 |
-
</a>
|
179 |
-
</div>
|
180 |
-
<?php } ?>
|
181 |
-
<?php if (count($organizers) > 0) { ?>
|
182 |
-
<div class="event-detalis-org">
|
183 |
-
<label class="ecwd-event-org-info"
|
184 |
-
title="<?php _e('Organizers', 'ecwd'); ?>"></label>
|
185 |
-
<?php foreach ($organizers as $organizer) { ?>
|
186 |
-
<span itemprop="organizer">
|
187 |
-
<a href="<?php echo get_permalink($organizer['ID']) ?>"><?php echo $organizer['post_title'] ?></a>
|
188 |
-
</span>
|
189 |
-
<?php } ?>
|
190 |
-
</div>
|
191 |
-
<?php } ?>
|
192 |
-
<div class="event-venue" itemprop="location" itemscope
|
193 |
-
itemtype="http://schema.org/Place">
|
194 |
-
<?php if ($venue_post_id) { ?>
|
195 |
-
<label class="ecwd-venue-info"
|
196 |
-
title="<?php _e('Venue', 'ecwd'); ?>"></label>
|
197 |
-
<span itemprop="name"><a href="<?php echo $venue_permalink ?>"><?php echo $venue; ?></a></span>
|
198 |
-
<div class="address" itemprop="address" itemscope
|
199 |
-
itemtype="http://schema.org/PostalAddress">
|
200 |
-
<?php echo $ecwd_event_location; ?>
|
201 |
-
</div>
|
202 |
-
|
203 |
-
<?php } elseif ($ecwd_event_location) { ?>
|
204 |
-
<span class="ecwd_hidden" itemprop="name"><?php echo $ecwd_event_location; ?></span>
|
205 |
-
<label class="ecwd-venue-info"
|
206 |
-
title="<?php _e('Location', 'ecwd'); ?>"></label>
|
207 |
-
<span class="address" itemprop="address" itemscope
|
208 |
-
itemtype="http://schema.org/PostalAddress">
|
209 |
-
<?php echo $ecwd_event_location; ?>
|
210 |
-
</span>
|
211 |
-
<?php } ?>
|
212 |
-
</div>
|
213 |
-
<?php do_action('ecwd_view_ext', $post_id); ?>
|
214 |
-
</div>
|
215 |
-
</div>
|
216 |
-
<?php if ($ecwd_social_icons) {
|
217 |
-
?>
|
218 |
-
|
219 |
-
<div class="ecwd-social">
|
220 |
-
<span class="share-links">
|
221 |
-
<a href="http://twitter.com/home?status=<?php echo get_permalink($post_id) ?>"
|
222 |
-
class="ecwd-twitter"
|
223 |
-
target="_blank" data-original-title="Tweet It">
|
224 |
-
<span class="visuallyhidden">Twitter</span></a>
|
225 |
-
<a href="http://www.facebook.com/sharer.php?u=<?php echo get_permalink($post_id) ?>"
|
226 |
-
class="ecwd-facebook"
|
227 |
-
target="_blank" data-original-title="Share on Facebook">
|
228 |
-
<span class="visuallyhidden">Facebook</span></a>
|
229 |
-
<a href="http://plus.google.com/share?url=<?php echo get_permalink($post_id) ?>"
|
230 |
-
class="ecwd-google-plus"
|
231 |
-
target="_blank" data-original-title="Share on Google+">
|
232 |
-
<span class="visuallyhidden">Google+</span></a>
|
233 |
-
</span>
|
234 |
-
</div>
|
235 |
-
<?php } ?>
|
236 |
-
<?php
|
237 |
-
if ($ecwd_event_show_map == 1 && $ecwd_event_latlong) {
|
238 |
-
$map_events = array();
|
239 |
-
$map_events[0]['latlong'] = explode(',', $ecwd_event_latlong);
|
240 |
-
if ($ecwd_event_location != '') {
|
241 |
-
$map_events[0]['location'] = $ecwd_event_location;
|
242 |
-
}
|
243 |
-
$map_events[0]['zoom'] = $ecwd_event_zoom;
|
244 |
-
$map_events[0]['infow'] = '<div class="ecwd_map_event">';
|
245 |
-
$map_events[0]['infow'] .= '<span class="location">' . $ecwd_event_location . '</span>';
|
246 |
-
$map_events[0]['infow'] .= '</div>';
|
247 |
-
$map_events[0]['infow'] .= '<div class="event-detalis-date">
|
248 |
-
<label class="ecwd-event-date-info" title="' . __('Date', 'ecwd') . '"></label>
|
249 |
-
<span class="ecwd-event-date" itemprop="startDate" content="' . date('Y-m-d', strtotime($ecwd_event_date_from)) . 'T' . date('H:i', strtotime($ecwd_event_date_from)) . '">';
|
250 |
if ($ecwd_all_day_event == 1) {
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
} else {
|
256 |
-
$map_events[0]['infow'] .= date($date_format, strtotime($ecwd_event_date_from)) . ' ' . date($time_format, strtotime($ecwd_event_date_from));
|
257 |
-
|
258 |
-
if ($ecwd_event_date_to) {
|
259 |
-
$map_events[0]['infow'] .= date($date_format, strtotime($ecwd_event_date_to)) . ' ' . date($time_format, strtotime($ecwd_event_date_to));
|
260 |
-
}
|
261 |
}
|
262 |
-
|
263 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
|
265 |
-
|
|
|
|
|
266 |
?>
|
267 |
-
<div class="ecwd-show-map">
|
268 |
-
<div class="ecwd_map_div">
|
269 |
-
</div>
|
270 |
-
<textarea class="hidden ecwd_markers"
|
271 |
-
style="display: none;"><?php echo $markers; ?></textarea>
|
272 |
-
</div>
|
273 |
-
<?php } ?>
|
274 |
-
<div class="clear"></div>
|
275 |
-
|
276 |
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
?>
|
283 |
-
<object data="http://www.youtube.com/v/<?php echo $video_array_of_vars['v'] ?>"
|
284 |
-
type="application/x-shockwave-flash" width="400" height="300">
|
285 |
-
<param name="src"
|
286 |
-
value="http://www.youtube.com/v/<?php echo $video_array_of_vars['v'] ?>"/>
|
287 |
-
</object>
|
288 |
-
<?php
|
289 |
-
}
|
290 |
-
} elseif (strpos($ecwd_event_video, 'vimeo') > 0) {
|
291 |
-
$videoID = explode('/', $ecwd_event_video);
|
292 |
-
$videoID = $videoID[count($videoID) - 1];
|
293 |
-
if ($videoID) {
|
294 |
-
?>
|
295 |
-
<iframe
|
296 |
-
src="http://player.vimeo.com/video/<?php echo $videoID; ?>?title=0&byline=0&portrait=0&badge=0&color=ffffff"
|
297 |
-
width="" height="" frameborder="0" webkitAllowFullScreen mozallowfullscreen
|
298 |
-
allowFullScreen></iframe>
|
299 |
-
<?php
|
300 |
-
}
|
301 |
-
}
|
302 |
-
?>
|
303 |
-
</div>
|
304 |
-
<!-- Content -->
|
305 |
|
306 |
-
<div class="ecwd_events_single_event_content">
|
307 |
<?php
|
308 |
-
$
|
309 |
-
|
310 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
</div>
|
312 |
-
|
313 |
-
<!-- Categories and tags -->
|
314 |
-
<?php if ($category_and_tags == 1) { ?>
|
315 |
-
<div class="event_cageory_and_tags">
|
316 |
-
|
317 |
-
<?php if (!empty($event_categories)) { ?>
|
318 |
-
<ul class="event_categories">
|
319 |
-
<?php
|
320 |
-
foreach ($event_categories as $category) {
|
321 |
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
style="background:<?php echo $metas['color']; ?>"></span>
|
328 |
-
<span class="event_catgeory_name"> <a
|
329 |
-
href="<?php echo get_category_link($category); ?>"
|
330 |
-
style="color:<?php echo $metas['color']; ?>"><?php echo $category->name; ?> </a></span>
|
331 |
-
<?php } else { ?>
|
332 |
-
<span class="event_catgeory_name"> <a
|
333 |
-
href="<?php echo get_category_link($category); ?>"><?php echo $category->name; ?> </a></span>
|
334 |
-
<?php } ?>
|
335 |
-
</li>
|
336 |
-
<?php
|
337 |
-
}
|
338 |
-
?>
|
339 |
-
</ul>
|
340 |
-
<?php
|
341 |
-
}
|
342 |
-
?>
|
343 |
|
|
|
|
|
|
|
344 |
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
<li class="event_tag">
|
355 |
-
<span class="event_tag_name">
|
356 |
-
<a href="<?php echo get_tag_link($tag); ?>">#<?php echo $tag->name; ?> </a>
|
357 |
-
</span>
|
358 |
-
</li>
|
359 |
-
<?php
|
360 |
-
}
|
361 |
-
?></ul>
|
362 |
-
<?php
|
363 |
-
}
|
364 |
-
?>
|
365 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
366 |
<?php } ?>
|
367 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
368 |
</div>
|
|
|
|
|
|
|
369 |
</div>
|
|
|
370 |
</div>
|
3 |
* Display for Event Custom Post Types
|
4 |
*/
|
5 |
if (!defined('ABSPATH')) {
|
6 |
+
die('-1');
|
7 |
}
|
8 |
|
9 |
$post = get_post($post_id);
|
17 |
$time_format = 'H:i';
|
18 |
$ecwd_social_icons = false;
|
19 |
if (isset($ecwd_options['date_format']) && $ecwd_options['date_format'] != '') {
|
20 |
+
$date_format = $ecwd_options['date_format'];
|
21 |
}
|
22 |
if (isset($ecwd_options['time_format']) && $ecwd_options['time_format'] != '') {
|
23 |
+
$time_format = $ecwd_options['time_format'];
|
24 |
}
|
25 |
$time_format .= (isset($ecwd_options['time_type']) ? ' ' . $ecwd_options['time_type'] : '');
|
26 |
if (isset($ecwd_options['time_type']) && $ecwd_options['time_type'] != '') {
|
27 |
+
$time_format = str_replace('H', 'g', $time_format);
|
28 |
+
$time_format = str_replace('h', 'g', $time_format);
|
29 |
}
|
30 |
|
31 |
if (isset($ecwd_options['social_icons']) && $ecwd_options['social_icons'] != '') {
|
32 |
+
$ecwd_social_icons = $ecwd_options['social_icons'];
|
33 |
}
|
34 |
// Load up all post meta data
|
35 |
|
40 |
$ecwd_event_date_to = $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0];
|
41 |
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'] = array(0 => '');
|
42 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'])) {
|
43 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'] = array(0 => '');
|
44 |
}
|
45 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'])) {
|
46 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'] = array(0 => '');
|
47 |
}
|
48 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'])) {
|
49 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'] = array(0 => '');
|
50 |
}
|
51 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'])) {
|
52 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'] = array(0 => '');
|
53 |
}
|
54 |
|
55 |
$permalink = get_the_permalink($ecwd_event->ID);
|
57 |
$ecwd_event_date_from = $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'][0];
|
58 |
$ecwd_event_date_to = $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0];
|
59 |
$d = new ECWD_Display('');
|
60 |
+
if ($ajax_start_date != null) {
|
61 |
+
$start_time = date('H:i', strtotime($ecwd_event_date_from));
|
62 |
+
$end_time = date('H:i', strtotime($ecwd_event_date_to));
|
63 |
+
if ($ajax_end_date == null) {
|
64 |
$eventdayslong = $d->dateDiff($ecwd_event_date_from, $ecwd_event_date_to);
|
65 |
$ecwd_event_date_from = $ajax_date;
|
66 |
+
$ecwd_event_date_to = date('Y-m-d', strtotime((date("Y-m-d", (strtotime($ecwd_event_date_from))) . " +" . ($eventdayslong) . " days")));
|
67 |
+
}else{
|
68 |
+
$ecwd_event_date_from = $ajax_start_date;
|
69 |
+
$ecwd_event_date_to = $ajax_end_date;
|
70 |
+
}
|
71 |
+
|
72 |
+
$ecwd_event_date_from = $ecwd_event_date_from . ' ' . $start_time;
|
73 |
+
$ecwd_event_date_to = $ecwd_event_date_to . ' ' . $end_time;
|
74 |
}
|
75 |
|
76 |
|
79 |
$ecwd_event_zoom = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_map_zoom'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_map_zoom'][0] : '';
|
80 |
$ecwd_event_show_map = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_show_map'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_show_map'][0] : 0;
|
81 |
if ($ecwd_event_show_map == '') {
|
82 |
+
$ecwd_event_show_map = 1;
|
83 |
}
|
84 |
if (!$ecwd_event_zoom) {
|
85 |
+
$ecwd_event_zoom = 17;
|
86 |
}
|
87 |
$ecwd_event_organizers = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_organizers'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_organizers'][0] : '';
|
88 |
if ($ecwd_event_organizers != '') {
|
89 |
+
$ecwd_event_organizers = get_post_meta($ecwd_event->ID, ECWD_PLUGIN_PREFIX . '_event_organizers', true);
|
90 |
}
|
91 |
$ecwd_event_url = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0] : '';
|
92 |
if ($ecwd_event_url == "") {
|
93 |
+
$ecwd_event_url = get_post_meta($ecwd_event->ID, ECWD_PLUGIN_PREFIX . '_event_url', true);
|
94 |
}
|
95 |
$ecwd_event_video = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_video'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_video'][0] : '';
|
96 |
$ecwd_all_day_event = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_all_day_event'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_all_day_event'][0] : 0;
|
98 |
$venue_permalink = '';
|
99 |
$venue_post_id = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_venue'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_venue'][0] : 0;
|
100 |
if ($venue_post_id) {
|
101 |
+
$venue_post = get_post($venue_post_id);
|
102 |
+
if ($venue_post) {
|
103 |
+
$venue = $venue_post->post_title;
|
104 |
+
$venue_permalink = get_permalink($venue_post->ID);
|
105 |
+
}
|
106 |
}
|
107 |
|
108 |
+
$venue_meta_template = '<div class="%s"><span>%s:</span><span>%s</span></div>';
|
109 |
+
$venue_meta_link_template = '<div class="%s"><span>%s:</span><a href="%s">%s</a></div>';
|
110 |
+
|
111 |
+
if (is_numeric($venue_post_id)) {
|
112 |
+
$ecwd_venue_phone = get_post_meta($venue_post_id, 'ecwd_venue_meta_phone', true);
|
113 |
+
$ecwd_venue_website = get_post_meta($venue_post_id, 'ecwd_venue_meta_website', true);
|
114 |
+
$ecwd_venue_website = ECWD::add_http($ecwd_venue_website);
|
115 |
+
} else {
|
116 |
+
$ecwd_venue_phone = $ecwd_venue_website = "";
|
117 |
+
}
|
118 |
|
119 |
+
|
120 |
+
$organizers = array();
|
121 |
+
$ecwd_event_organizers = maybe_unserialize($ecwd_event_organizers);
|
122 |
if (is_array($ecwd_event_organizers) || is_object($ecwd_event_organizers)) {
|
123 |
+
foreach ($ecwd_event_organizers as $ecwd_event_organizer) {
|
124 |
+
$temp = get_post($ecwd_event_organizer, ARRAY_A);
|
125 |
+
if ($temp !== null) {
|
126 |
+
$organizers[] = $temp;
|
127 |
}
|
128 |
+
|
129 |
+
}
|
130 |
}
|
131 |
+
|
132 |
if (function_exists('has_post_thumbnail') && has_post_thumbnail($post->ID)) {
|
133 |
+
$thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID));
|
134 |
+
$featured_image = $thumbnail[0];
|
135 |
} else {
|
136 |
+
$featured_image = '';
|
137 |
}
|
138 |
$category_and_tags = false;
|
139 |
|
140 |
if (isset($ecwd_options['category_and_tags']) && $ecwd_options['category_and_tags'] != '') {
|
141 |
+
$category_and_tags = $ecwd_options['category_and_tags'];
|
142 |
}
|
143 |
$args = array('orderby' => 'name', 'order' => 'ASC', 'fields' => 'all');
|
144 |
$event_tags = wp_get_post_terms($post->ID, 'ecwd_event_tag', $args);
|
145 |
$event_categories = wp_get_post_terms($post->ID, 'ecwd_event_category', $args);
|
146 |
?>
|
147 |
<div id="ecwd-events-content" class="ecwd-events-single">
|
148 |
+
<div id="post-<?php echo $post_id; ?>">
|
149 |
+
<div class="ecwd-event" itemscope itemtype="http://schema.org/Event">
|
150 |
+
<header class="entry-header">
|
151 |
+
<h1 class="ecwd-events-single-event-title summary entry-title"><?php echo $post->post_title; ?></h1>
|
152 |
+
</header>
|
153 |
+
<div class="event-detalis">
|
154 |
+
<?php if ($featured_image && $featured_image !== '') { ?>
|
155 |
+
<div class="event-featured-image">
|
156 |
+
<img src="<?php echo $featured_image; ?>"/>
|
157 |
+
</div>
|
158 |
+
<?php } ?>
|
159 |
+
<div class="ecwd-event-details">
|
160 |
+
<div class="event-detalis-date">
|
161 |
+
<label class="ecwd-event-date-info" title="<?php _e('Date', 'ecwd'); ?>"></label>
|
162 |
+
<span class="ecwd-event-date"
|
163 |
+
itemprop="startDate"
|
164 |
+
content="<?php echo date('Y-m-d', strtotime($ecwd_event_date_from)) . 'T' . date('H:i', strtotime($ecwd_event_date_from)) ?>">
|
165 |
+
<?php
|
166 |
+
if ($ecwd_all_day_event == 1) {
|
167 |
+
echo date($date_format, strtotime($ecwd_event_date_from));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
if ($ecwd_all_day_event == 1) {
|
169 |
+
if ($ecwd_event_date_to && date($date_format, strtotime($ecwd_event_date_from)) !== date($date_format, strtotime($ecwd_event_date_to))) {
|
170 |
+
echo ' - ' . date($date_format, strtotime($ecwd_event_date_to));
|
171 |
+
}
|
172 |
+
echo ' ' . __('All day', 'ecwd');
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
}
|
174 |
+
} else {
|
175 |
+
echo date($date_format, strtotime($ecwd_event_date_from)) . ' ' . date($time_format, strtotime($ecwd_event_date_from));
|
176 |
+
if ($ecwd_event_date_to) {
|
177 |
+
echo ' - ' . date($date_format, strtotime($ecwd_event_date_to)) . ' ' . date($time_format, strtotime($ecwd_event_date_to));
|
178 |
+
}
|
179 |
+
}
|
180 |
+
?>
|
181 |
+
</span>
|
182 |
+
</div>
|
183 |
+
<?php if (isset($ecwd_options['show_repeat_rate'])) { ?>
|
184 |
+
<div class="ecwd_repeat_rate_text">
|
185 |
+
<span><?php echo $d->get_repeat_rate($post_id, '', $date_format); ?></span>
|
186 |
+
</div>
|
187 |
+
<?php }
|
188 |
+
if ($ecwd_event_url) {
|
189 |
+
$ecwd_event_url = ECWD::add_http($ecwd_event_url);
|
190 |
+
?>
|
191 |
+
<div class="ecwd-url">
|
192 |
+
<a href="<?php echo $ecwd_event_url; ?>" target="_blank">
|
193 |
+
<label class="ecwd-event-url-info" title="<?php _e('Url', 'ecwd'); ?>"></label>
|
194 |
+
<?php echo $ecwd_event_url; ?>
|
195 |
+
</a>
|
196 |
+
</div>
|
197 |
+
<?php }
|
198 |
+
|
199 |
+
if (count($organizers) > 0) { ?>
|
200 |
+
<div class="event-detalis-org">
|
201 |
+
<label class="ecwd-event-org-info" title="<?php _e('Organizers', 'ecwd'); ?>"></label>
|
202 |
+
|
203 |
+
<?php if (count($organizers) > 1) { ?>
|
204 |
+
<?php foreach ($organizers as $organizer) { ?>
|
205 |
+
<span itemprop="organizer">
|
206 |
+
<a href="<?php echo get_permalink($organizer['ID']) ?>">
|
207 |
+
<?php echo $organizer['post_title'] ?>
|
208 |
+
</a>
|
209 |
+
</span>
|
210 |
|
211 |
+
<?php }
|
212 |
+
} else {
|
213 |
+
$organizer = $organizers[0];
|
214 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
|
216 |
+
<span itemprop="organizer">
|
217 |
+
<a href="<?php echo get_permalink($organizer['ID']) ?>">
|
218 |
+
<?php echo $organizer['post_title'] ?>
|
219 |
+
</a>
|
220 |
+
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
|
|
|
222 |
<?php
|
223 |
+
$organizer_phone = get_post_meta($organizer['ID'], 'ecwd_organizer_meta_phone', true);
|
224 |
+
$organizer_website = get_post_meta($organizer['ID'], 'ecwd_organizer_meta_website', true);
|
225 |
+
$organizer_website = ECWD::add_http($organizer_website);
|
226 |
+
|
227 |
+
if (!empty($organizer_phone)) { ?>
|
228 |
+
<div class="ecwd_organizer_phone">
|
229 |
+
<span><?php _e('Phone', 'ecwd'); ?>:</span>
|
230 |
+
<span><?php echo $organizer_phone; ?></span>
|
231 |
+
</div>
|
232 |
+
<?php }
|
233 |
+
if (!empty($organizer_website)) { ?>
|
234 |
+
<div class="ecwd_organizer_website">
|
235 |
+
<span><?php _e('Website', 'ecwd'); ?>:</span>
|
236 |
+
<a href="<?php echo $organizer_website; ?>">
|
237 |
+
<?php echo $organizer_website; ?>
|
238 |
+
</a>
|
239 |
+
</div>
|
240 |
+
<?php }
|
241 |
+
} ?>
|
242 |
</div>
|
243 |
+
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
|
245 |
+
<div class="event-venue" itemprop="location" itemscope itemtype="http://schema.org/Place">
|
246 |
+
<?php if ($venue_post_id) { ?>
|
247 |
+
<label class="ecwd-venue-info" title="<?php _e('Venue', 'ecwd'); ?>"></label>
|
248 |
+
<span itemprop="name"><a href="<?php echo $venue_permalink ?>"><?php echo $venue; ?></a></span>
|
249 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
|
251 |
+
if (!empty($ecwd_venue_phone)) {
|
252 |
+
echo sprintf($venue_meta_template, "ecwd_venue_phone", __('Phone', 'ecwd'), $ecwd_venue_phone);
|
253 |
+
}
|
254 |
|
255 |
+
if (!empty($ecwd_venue_website)) {
|
256 |
+
echo sprintf($venue_meta_link_template, "ecwd_venue_website", __('Website', 'ecwd'), $ecwd_venue_website, $ecwd_venue_website);
|
257 |
+
}
|
258 |
|
259 |
+
if (!empty($ecwd_event_location)) {
|
260 |
+
?>
|
261 |
+
<div class="address" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
|
262 |
+
<span><?php _e('Address:', 'ecwd'); ?></span>
|
263 |
+
<span><?php echo $ecwd_event_location; ?></span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
</div>
|
265 |
+
<?php
|
266 |
+
}
|
267 |
+
?>
|
268 |
+
<?php } elseif ($ecwd_event_location) { ?>
|
269 |
+
<span class="ecwd_hidden" itemprop="name"><?php echo $ecwd_event_location; ?></span>
|
270 |
+
<label class="ecwd-venue-info" title="<?php _e('Location', 'ecwd'); ?>"></label>
|
271 |
+
<span class="address" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
|
272 |
+
<?php echo $ecwd_event_location; ?>
|
273 |
+
</span>
|
274 |
<?php } ?>
|
275 |
+
</div>
|
276 |
+
<?php do_action('ecwd_view_ext', $post_id); ?>
|
277 |
+
</div>
|
278 |
+
</div>
|
279 |
+
<?php if ($ecwd_social_icons) { ?>
|
280 |
+
<div class="ecwd-social">
|
281 |
+
<span class="share-links">
|
282 |
+
<a href="http://twitter.com/home?status=<?php echo get_permalink($post_id) ?>"
|
283 |
+
class="ecwd-twitter"
|
284 |
+
target="_blank" data-original-title="Tweet It">
|
285 |
+
<span class="visuallyhidden">Twitter</span></a>
|
286 |
+
<a href="http://www.facebook.com/sharer.php?u=<?php echo get_permalink($post_id) ?>"
|
287 |
+
class="ecwd-facebook"
|
288 |
+
target="_blank" data-original-title="Share on Facebook">
|
289 |
+
<span class="visuallyhidden">Facebook</span></a>
|
290 |
+
<a href="http://plus.google.com/share?url=<?php echo get_permalink($post_id) ?>"
|
291 |
+
class="ecwd-google-plus"
|
292 |
+
target="_blank" data-original-title="Share on Google+">
|
293 |
+
<span class="visuallyhidden">Google+</span></a>
|
294 |
+
</span>
|
295 |
+
</div>
|
296 |
+
<?php }
|
297 |
+
|
298 |
+
if ($ecwd_event_show_map == 1 && $ecwd_event_latlong) {
|
299 |
+
$map_events = array();
|
300 |
+
$map_events[0]['latlong'] = explode(',', $ecwd_event_latlong);
|
301 |
+
if ($ecwd_event_location != '') {
|
302 |
+
$map_events[0]['location'] = $ecwd_event_location;
|
303 |
+
}
|
304 |
+
$map_events[0]['zoom'] = $ecwd_event_zoom;
|
305 |
+
$map_events[0]['infow'] = '<div class="ecwd_map_event">';
|
306 |
+
$map_events[0]['infow'] .= '<span class="location">' . $ecwd_event_location . '</span>';
|
307 |
+
$map_events[0]['infow'] .= '</div>';
|
308 |
+
$map_events[0]['infow'] .= '<div class="event-detalis-date">
|
309 |
+
<label class="ecwd-event-date-info" title="' . __('Date', 'ecwd') . '"></label>
|
310 |
+
<span class="ecwd-event-date" itemprop="startDate" content="' . date('Y-m-d', strtotime($ecwd_event_date_from)) . 'T' . date('H:i', strtotime($ecwd_event_date_from)) . '">';
|
311 |
+
if ($ecwd_all_day_event == 1) {
|
312 |
+
$map_events[0]['infow'] .= date($date_format, strtotime($ecwd_event_date_from));
|
313 |
+
if ($ecwd_event_date_to) {
|
314 |
+
$map_events[0]['infow'] .= ' - ' . date($date_format, strtotime($ecwd_event_date_to)) . ' ' . __('All day', 'ecwd');
|
315 |
+
}
|
316 |
+
} else {
|
317 |
+
$map_events[0]['infow'] .= date($date_format, strtotime($ecwd_event_date_from)) . ' ' . date($time_format, strtotime($ecwd_event_date_from));
|
318 |
+
|
319 |
+
if ($ecwd_event_date_to) {
|
320 |
+
$map_events[0]['infow'] .= date($date_format, strtotime($ecwd_event_date_to)) . ' ' . date($time_format, strtotime($ecwd_event_date_to));
|
321 |
+
}
|
322 |
+
}
|
323 |
+
$map_events[0]['infow'] .= ' </span>
|
324 |
+
</div>';
|
325 |
+
|
326 |
+
$markers = json_encode($map_events);
|
327 |
+
?>
|
328 |
+
<div class="ecwd-show-map">
|
329 |
+
<div class="ecwd_map_div"></div>
|
330 |
+
<textarea class="hidden ecwd_markers" style="display: none;"><?php echo $markers; ?></textarea>
|
331 |
+
</div>
|
332 |
+
<?php } ?>
|
333 |
+
<div class="clear"></div>
|
334 |
+
<?php if (!empty($ecwd_event_video)) { ?>
|
335 |
+
<div class="ecwd-event-video">
|
336 |
+
<?php
|
337 |
+
if (strpos($ecwd_event_video, 'youtube') > 0) {
|
338 |
+
parse_str(parse_url($ecwd_event_video, PHP_URL_QUERY), $video_array_of_vars);
|
339 |
+
if (isset($video_array_of_vars['v']) && $video_array_of_vars['v']) {
|
340 |
+
?>
|
341 |
+
<object data="http://www.youtube.com/v/<?php echo $video_array_of_vars['v'] ?>"
|
342 |
+
type="application/x-shockwave-flash" width="400" height="300">
|
343 |
+
<param name="src"
|
344 |
+
value="http://www.youtube.com/v/<?php echo $video_array_of_vars['v'] ?>"/>
|
345 |
+
</object>
|
346 |
+
<?php
|
347 |
+
}
|
348 |
+
} elseif (strpos($ecwd_event_video, 'vimeo') > 0) {
|
349 |
+
$videoID = explode('/', $ecwd_event_video);
|
350 |
+
$videoID = $videoID[count($videoID) - 1];
|
351 |
+
if ($videoID) { ?>
|
352 |
+
<iframe
|
353 |
+
src="http://player.vimeo.com/video/<?php echo $videoID; ?>?title=0&byline=0&portrait=0&badge=0&color=ffffff"
|
354 |
+
width="" height="" frameborder="0" webkitAllowFullScreen mozallowfullscreen
|
355 |
+
allowFullScreen></iframe>
|
356 |
+
<?php
|
357 |
+
}
|
358 |
+
}
|
359 |
+
?>
|
360 |
+
</div>
|
361 |
+
<?php } ?>
|
362 |
+
<!-- Content -->
|
363 |
+
<div class="ecwd_events_single_event_content">
|
364 |
+
<?php
|
365 |
+
$post_content = apply_filters('the_content', $post->post_content);
|
366 |
+
echo do_shortcode($post_content);
|
367 |
+
?>
|
368 |
+
</div>
|
369 |
+
<!-- End Content -->
|
370 |
+
<!-- Categories and tags -->
|
371 |
+
<?php if ($category_and_tags == 1) { ?>
|
372 |
+
<div class="event_cageory_and_tags">
|
373 |
+
<?php if (!empty($event_categories)) { ?>
|
374 |
+
<ul class="event_categories">
|
375 |
+
<?php foreach ($event_categories as $category) {
|
376 |
+
$metas = get_option("ecwd_event_category_$category->term_id");
|
377 |
+
?>
|
378 |
+
<li class="event_category event-details-title">
|
379 |
+
<?php if ($metas['color']) { ?>
|
380 |
+
<span class="event-metalabel" style="background:<?php echo $metas['color']; ?>"></span>
|
381 |
+
<span class="event_catgeory_name">
|
382 |
+
<a href="<?php echo get_category_link($category); ?>"
|
383 |
+
style="color:<?php echo $metas['color']; ?>">
|
384 |
+
<?php echo $category->name; ?>
|
385 |
+
</a>
|
386 |
+
</span>
|
387 |
+
<?php } else { ?>
|
388 |
+
<span class="event_catgeory_name">
|
389 |
+
<a href="<?php echo get_category_link($category); ?>"><?php echo $category->name; ?> </a>
|
390 |
+
</span>
|
391 |
+
<?php } ?>
|
392 |
+
</li>
|
393 |
+
<?php } ?>
|
394 |
+
</ul>
|
395 |
+
<?php }
|
396 |
+
|
397 |
+
if (!empty($event_tags)) { ?>
|
398 |
+
<ul class="event_tags">
|
399 |
+
<?php foreach ($event_tags as $tag) { ?>
|
400 |
+
<li class="event_tag">
|
401 |
+
<span class="event_tag_name">
|
402 |
+
<a href="<?php echo get_tag_link($tag); ?>">#<?php echo $tag->name; ?> </a>
|
403 |
+
</span>
|
404 |
+
</li>
|
405 |
+
<?php } ?>
|
406 |
+
</ul>
|
407 |
+
<?php } ?>
|
408 |
</div>
|
409 |
+
<?php } ?>
|
410 |
+
<!-- End Categories and tags -->
|
411 |
+
<?php do_action('ecwd_tickets_events_single_meta', '', $ecwd_event_date_to, $post_id); ?>
|
412 |
</div>
|
413 |
+
</div>
|
414 |
</div>
|
views/ecwd-organizer-content.php
CHANGED
@@ -9,18 +9,18 @@ $time_format = 'H:i';
|
|
9 |
$ecwd_social_icons = false;
|
10 |
$events = array();
|
11 |
if (isset($ecwd_options['date_format']) && $ecwd_options['date_format'] != '') {
|
12 |
-
|
13 |
}
|
14 |
if (isset($ecwd_options['time_format']) && $ecwd_options['time_format'] != '') {
|
15 |
-
|
16 |
}
|
17 |
$time_format .= (isset($ecwd_options['time_type']) ? ' ' . $ecwd_options['time_type'] : '');
|
18 |
if (isset($ecwd_options['time_type']) && $ecwd_options['time_type'] != '') {
|
19 |
-
|
20 |
-
|
21 |
}
|
22 |
if (isset($ecwd_options['social_icons']) && $ecwd_options['social_icons'] != '') {
|
23 |
-
|
24 |
}
|
25 |
$organizer_url = get_permalink($post_id);
|
26 |
|
@@ -30,87 +30,116 @@ $organizer_url = get_permalink($post_id);
|
|
30 |
$today = date('Y-m-d');
|
31 |
|
32 |
$args = array(
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
),
|
41 |
),
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
45 |
);
|
46 |
$ecwd_events = get_posts($args);
|
47 |
|
48 |
|
49 |
foreach ($ecwd_events as $ecwd_event) {
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
}
|
59 |
-
}
|
60 |
-
$ecwd_event_metas = get_post_meta($ecwd_event->ID, '', true);
|
61 |
-
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'] = array(0 => '');
|
62 |
-
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'])) {
|
63 |
-
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'] = array(0 => '');
|
64 |
-
}
|
65 |
-
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'])) {
|
66 |
-
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'] = array(0 => '');
|
67 |
-
}
|
68 |
-
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'])) {
|
69 |
-
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'] = array(0 => '');
|
70 |
-
}
|
71 |
-
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'])) {
|
72 |
-
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'] = array(0 => '');
|
73 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
-
|
76 |
-
|
77 |
}
|
78 |
|
79 |
$d = new ECWD_Display(0, '', '', $today);
|
80 |
-
$max_date = date('Y-m-d', strtotime((
|
81 |
$events = $d->get_event_days($events, 1, date('Y-m-d'), $max_date);
|
82 |
$events = $d->events_unique($events);
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
-
|
|
|
|
|
86 |
?>
|
87 |
|
88 |
<div class="ecwd-organizer">
|
89 |
-
|
90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
<span class="share-links">
|
92 |
<a href="http://twitter.com/home?status=<?php echo get_permalink($post_id) ?>" class="ecwd-twitter"
|
93 |
target="_blank" data-original-title="Tweet It">
|
94 |
<span class="visuallyhidden">Twitter</span></a>
|
95 |
|
96 |
-
<a href="http://www.facebook.com/sharer.php?u=<?php echo get_permalink($post_id) ?>"
|
|
|
97 |
target="_blank" data-original-title="Share on Facebook">
|
98 |
<span class="visuallyhidden">Facebook</span></a>
|
99 |
|
100 |
-
<a href="http://plus.google.com/share?url=<?php echo get_permalink($post_id) ?>"
|
|
|
101 |
target="_blank" data-original-title="Share on Google+">
|
102 |
<span class="visuallyhidden">Google+</span></a>
|
103 |
|
104 |
</span>
|
105 |
-
|
106 |
<?php
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
</div>
|
111 |
<script id="ecwd_script_handler" type="text/javascript">
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
</script>
|
116 |
|
9 |
$ecwd_social_icons = false;
|
10 |
$events = array();
|
11 |
if (isset($ecwd_options['date_format']) && $ecwd_options['date_format'] != '') {
|
12 |
+
$date_format = $ecwd_options['date_format'];
|
13 |
}
|
14 |
if (isset($ecwd_options['time_format']) && $ecwd_options['time_format'] != '') {
|
15 |
+
$time_format = $ecwd_options['time_format'];
|
16 |
}
|
17 |
$time_format .= (isset($ecwd_options['time_type']) ? ' ' . $ecwd_options['time_type'] : '');
|
18 |
if (isset($ecwd_options['time_type']) && $ecwd_options['time_type'] != '') {
|
19 |
+
$time_format = str_replace('H', 'g', $time_format);
|
20 |
+
$time_format = str_replace('h', 'g', $time_format);
|
21 |
}
|
22 |
if (isset($ecwd_options['social_icons']) && $ecwd_options['social_icons'] != '') {
|
23 |
+
$ecwd_social_icons = $ecwd_options['social_icons'];
|
24 |
}
|
25 |
$organizer_url = get_permalink($post_id);
|
26 |
|
30 |
$today = date('Y-m-d');
|
31 |
|
32 |
$args = array(
|
33 |
+
'numberposts' => -1,
|
34 |
+
'post_type' => ECWD_PLUGIN_PREFIX . '_event',
|
35 |
+
'meta_query' => array(
|
36 |
+
array(
|
37 |
+
'key' => ECWD_PLUGIN_PREFIX . '_event_organizers',
|
38 |
+
'value' => serialize(strval($post->ID)),
|
39 |
+
'compare' => 'LIKE'
|
|
|
40 |
),
|
41 |
+
),
|
42 |
+
'meta_key' => ECWD_PLUGIN_PREFIX . '_event_date_from',
|
43 |
+
'orderby' => 'meta_value',
|
44 |
+
'order' => 'ASC'
|
45 |
);
|
46 |
$ecwd_events = get_posts($args);
|
47 |
|
48 |
|
49 |
foreach ($ecwd_events as $ecwd_event) {
|
50 |
+
$term_metas = '';
|
51 |
+
$categories = get_the_terms($ecwd_event->ID, ECWD_PLUGIN_PREFIX . '_event_category');
|
52 |
+
if (is_array($categories)) {
|
53 |
+
foreach ($categories as $category) {
|
54 |
+
$term_metas = get_option("ecwd_event_category_$category->term_id");
|
55 |
+
$term_metas['id'] = $category->term_id;
|
56 |
+
$term_metas['name'] = $category->name;
|
57 |
+
$term_metas['slug'] = $category->slug;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
}
|
59 |
+
}
|
60 |
+
$ecwd_event_metas = get_post_meta($ecwd_event->ID, '', true);
|
61 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'] = array(0 => '');
|
62 |
+
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'])) {
|
63 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'] = array(0 => '');
|
64 |
+
}
|
65 |
+
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'])) {
|
66 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'] = array(0 => '');
|
67 |
+
}
|
68 |
+
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'])) {
|
69 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'] = array(0 => '');
|
70 |
+
}
|
71 |
+
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'])) {
|
72 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'] = array(0 => '');
|
73 |
+
}
|
74 |
|
75 |
+
$permalink = get_permalink($ecwd_event->ID);
|
76 |
+
$events[$ecwd_event->ID] = new ECWD_Event($ecwd_event->ID, 0, $ecwd_event->post_title, $ecwd_event->post_content, $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'][0], $permalink, $ecwd_event, $term_metas, $ecwd_event_metas);
|
77 |
}
|
78 |
|
79 |
$d = new ECWD_Display(0, '', '', $today);
|
80 |
+
$max_date = date('Y-m-d', strtotime((date("Y-m-t", (strtotime(date('Y-m-d')))) . " +" . ((12)) . " month")));
|
81 |
$events = $d->get_event_days($events, 1, date('Y-m-d'), $max_date);
|
82 |
$events = $d->events_unique($events);
|
83 |
|
84 |
+
$organizer_phone = get_post_meta($post_id, 'ecwd_organizer_meta_phone', true);
|
85 |
+
$organizer_website = get_post_meta($post_id, 'ecwd_organizer_meta_website', true);
|
86 |
+
$organizer_website = ECWD::add_http($organizer_website);
|
87 |
+
|
88 |
+
$organizer_phone_html = $organizer_website_html = "";
|
89 |
+
|
90 |
+
if (!empty($organizer_phone)) {
|
91 |
+
$organizer_phone_html = '<div class="%s"><span>' . __('Phone', 'ecwd') . ':</span><span>%s</span></div>';
|
92 |
+
}
|
93 |
|
94 |
+
if (!empty($organizer_website)) {
|
95 |
+
$organizer_website_html = '<div class="%s"><span>' . __('Website', 'ecwd') . ':</span><a href="%s">%s</a></div>';
|
96 |
+
}
|
97 |
?>
|
98 |
|
99 |
<div class="ecwd-organizer">
|
100 |
+
<?php
|
101 |
+
if (isset($_GET['organizer']) && intval($_GET['organizer']) == 1) {
|
102 |
+
echo '<a id="ecwd_back_link" href="#">' . __('Back', 'ecwd') . '</a>';
|
103 |
+
echo '<h3>' . $post->post_title . '</h3>';
|
104 |
+
}
|
105 |
+
|
106 |
+
if (!empty($organizer_phone_html)) {
|
107 |
+
echo sprintf($organizer_phone_html, "ecwd_organizer_phone", $organizer_phone);
|
108 |
+
}
|
109 |
+
|
110 |
+
if (!empty($organizer_website_html)) {
|
111 |
+
echo sprintf($organizer_website_html, "ecwd_organizer_website", $organizer_website, $organizer_website);
|
112 |
+
}
|
113 |
+
|
114 |
+
echo '<div class="ecwd_organizer_description">' . wpautop($post->post_content) . '</div>';
|
115 |
+
?>
|
116 |
+
<?php if ($ecwd_social_icons) { ?>
|
117 |
+
<div class="ecwd-social">
|
118 |
<span class="share-links">
|
119 |
<a href="http://twitter.com/home?status=<?php echo get_permalink($post_id) ?>" class="ecwd-twitter"
|
120 |
target="_blank" data-original-title="Tweet It">
|
121 |
<span class="visuallyhidden">Twitter</span></a>
|
122 |
|
123 |
+
<a href="http://www.facebook.com/sharer.php?u=<?php echo get_permalink($post_id) ?>"
|
124 |
+
class="ecwd-facebook"
|
125 |
target="_blank" data-original-title="Share on Facebook">
|
126 |
<span class="visuallyhidden">Facebook</span></a>
|
127 |
|
128 |
+
<a href="http://plus.google.com/share?url=<?php echo get_permalink($post_id) ?>"
|
129 |
+
class="ecwd-google-plus"
|
130 |
target="_blank" data-original-title="Share on Google+">
|
131 |
<span class="visuallyhidden">Google+</span></a>
|
132 |
|
133 |
</span>
|
134 |
+
</div>
|
135 |
<?php
|
136 |
+
}
|
137 |
+
do_action('ecwd_show_related_events', $events, true);
|
138 |
+
?>
|
139 |
</div>
|
140 |
<script id="ecwd_script_handler" type="text/javascript">
|
141 |
+
if (typeof ecwd_js_init_call == "object") {
|
142 |
+
ecwd_js_init_call = new ecwd_js_init();
|
143 |
+
}
|
144 |
</script>
|
145 |
|
views/ecwd-venue-content.php
CHANGED
@@ -6,18 +6,18 @@ $date_format = 'Y-m-d';
|
|
6 |
$time_format = 'H:i';
|
7 |
$ecwd_social_icons = false;
|
8 |
if (isset($ecwd_options['date_format']) && $ecwd_options['date_format'] != '') {
|
9 |
-
|
10 |
}
|
11 |
if (isset($ecwd_options['time_format']) && $ecwd_options['time_format'] != '') {
|
12 |
-
|
13 |
}
|
14 |
$time_format .= (isset($ecwd_options['time_type']) ? ' ' . $ecwd_options['time_type'] : '');
|
15 |
if (isset($ecwd_options['time_type']) && $ecwd_options['time_type'] != '') {
|
16 |
-
|
17 |
-
|
18 |
}
|
19 |
if (isset($ecwd_options['social_icons']) && $ecwd_options['social_icons'] != '') {
|
20 |
-
|
21 |
}
|
22 |
|
23 |
$post_id = $post->ID;
|
@@ -30,116 +30,137 @@ $ecwd_venue_location = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_venue_loc
|
|
30 |
$ecwd_venue_latlong = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_venue_lat_long', true);
|
31 |
$ecwd_venue_zoom = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_map_zoom', true);
|
32 |
if (!$ecwd_venue_zoom) {
|
33 |
-
|
34 |
}
|
35 |
|
36 |
$today = date('Y-m-d');
|
37 |
|
38 |
$args = array(
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
);
|
51 |
$ecwd_events = get_posts($args);
|
52 |
|
53 |
//var_dump($ecwd_events);
|
54 |
foreach ($ecwd_events as $ecwd_event) {
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
}
|
65 |
}
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
|
|
86 |
}
|
87 |
|
88 |
$d = new ECWD_Display(0, '', '', $today);
|
89 |
-
$max_date = date('Y-m-d', strtotime((
|
90 |
$events = $d->get_event_days($events, 1, date('Y-m-d'), $max_date);
|
91 |
$events = $d->events_unique($events);
|
92 |
-
|
93 |
-
|
94 |
-
|
|
|
|
|
|
|
|
|
95 |
?>
|
96 |
|
97 |
<div class="ecwd-venue">
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
<span class="share-links">
|
101 |
<a href="http://twitter.com/home?status=<?php echo get_permalink($post_id) ?>" class="ecwd-twitter"
|
102 |
target="_blank" data-original-title="Tweet It">
|
103 |
<span class="visuallyhidden">Twitter</span></a>
|
104 |
|
105 |
-
<a href="http://www.facebook.com/sharer.php?u=<?php echo get_permalink($post_id) ?>"
|
|
|
106 |
target="_blank" data-original-title="Share on Facebook">
|
107 |
<span class="visuallyhidden">Facebook</span></a>
|
108 |
|
109 |
-
<a href="http://plus.google.com/share?url=<?php echo get_permalink($post_id) ?>"
|
|
|
110 |
target="_blank" data-original-title="Share on Google+">
|
111 |
<span class="visuallyhidden">Google+</span></a>
|
112 |
|
113 |
</span>
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
<?php
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
$map_events[0]['zoom'] = $ecwd_venue_zoom;
|
123 |
-
$map_events[0]['infow'] = '<div class="ecwd_map_venue">';
|
124 |
-
$map_events[0]['infow'] .= '<span class="name">' . $post->post_title . '</span><br />';
|
125 |
-
$map_events[0]['infow'] .= '<span class="location">' . $ecwd_venue_location . '</span>';
|
126 |
-
$map_events[0]['infow'] .= '</div>';
|
127 |
-
$markers = json_encode($map_events);
|
128 |
-
?>
|
129 |
-
<div class="ecwd-show-map">
|
130 |
-
<div id="ecwd_map_div" class="ecwd_map_div">
|
131 |
-
</div>
|
132 |
-
<textarea id="ecwd_markers" class="hidden" style="display: none;"><?php echo $markers; ?></textarea>
|
133 |
-
</div>
|
134 |
-
<?php
|
135 |
-
}
|
136 |
-
do_action('ecwd_show_related_events', $events, false);
|
137 |
-
?>
|
138 |
|
139 |
</div>
|
140 |
<script id="ecwd_script_handler" type="text/javascript">
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
</script>
|
6 |
$time_format = 'H:i';
|
7 |
$ecwd_social_icons = false;
|
8 |
if (isset($ecwd_options['date_format']) && $ecwd_options['date_format'] != '') {
|
9 |
+
$date_format = $ecwd_options['date_format'];
|
10 |
}
|
11 |
if (isset($ecwd_options['time_format']) && $ecwd_options['time_format'] != '') {
|
12 |
+
$time_format = $ecwd_options['time_format'];
|
13 |
}
|
14 |
$time_format .= (isset($ecwd_options['time_type']) ? ' ' . $ecwd_options['time_type'] : '');
|
15 |
if (isset($ecwd_options['time_type']) && $ecwd_options['time_type'] != '') {
|
16 |
+
$time_format = str_replace('H', 'g', $time_format);
|
17 |
+
$time_format = str_replace('h', 'g', $time_format);
|
18 |
}
|
19 |
if (isset($ecwd_options['social_icons']) && $ecwd_options['social_icons'] != '') {
|
20 |
+
$ecwd_social_icons = $ecwd_options['social_icons'];
|
21 |
}
|
22 |
|
23 |
$post_id = $post->ID;
|
30 |
$ecwd_venue_latlong = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_venue_lat_long', true);
|
31 |
$ecwd_venue_zoom = get_post_meta($post->ID, ECWD_PLUGIN_PREFIX . '_map_zoom', true);
|
32 |
if (!$ecwd_venue_zoom) {
|
33 |
+
$ecwd_venue_zoom = 17;
|
34 |
}
|
35 |
|
36 |
$today = date('Y-m-d');
|
37 |
|
38 |
$args = array(
|
39 |
+
'numberposts' => -1,
|
40 |
+
'post_type' => ECWD_PLUGIN_PREFIX . '_event',
|
41 |
+
'meta_query' => array(
|
42 |
+
array(
|
43 |
+
'key' => ECWD_PLUGIN_PREFIX . '_event_venue',
|
44 |
+
'value' => $post->ID
|
45 |
+
)
|
46 |
+
),
|
47 |
+
'meta_key' => ECWD_PLUGIN_PREFIX . '_event_date_from',
|
48 |
+
'orderby' => 'meta_value',
|
49 |
+
'order' => 'ASC'
|
50 |
);
|
51 |
$ecwd_events = get_posts($args);
|
52 |
|
53 |
//var_dump($ecwd_events);
|
54 |
foreach ($ecwd_events as $ecwd_event) {
|
55 |
|
56 |
+
$term_metas = '';
|
57 |
+
$categories = get_the_terms($ecwd_event->ID, ECWD_PLUGIN_PREFIX . '_event_category');
|
58 |
+
if (is_array($categories)) {
|
59 |
+
foreach ($categories as $category) {
|
60 |
+
$term_metas = get_option("ecwd_event_category_$category->term_id");
|
61 |
+
$term_metas['id'] = $category->term_id;
|
62 |
+
$term_metas['name'] = $category->name;
|
63 |
+
$term_metas['slug'] = $category->slug;
|
|
|
64 |
}
|
65 |
+
}
|
66 |
+
$ecwd_event_metas = get_post_meta($ecwd_event->ID, '', true);
|
67 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'] = array(0 => '');
|
68 |
+
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'])) {
|
69 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'] = array(0 => '');
|
70 |
+
}
|
71 |
+
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'])) {
|
72 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'] = array(0 => '');
|
73 |
+
}
|
74 |
+
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'])) {
|
75 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'] = array(0 => '');
|
76 |
+
}
|
77 |
+
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'])) {
|
78 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'] = array(0 => '');
|
79 |
+
}
|
80 |
+
|
81 |
+
|
82 |
+
$permalink = get_permalink($ecwd_event->ID);
|
83 |
+
|
84 |
+
|
85 |
+
$events[$ecwd_event->ID] = new ECWD_Event($ecwd_event->ID, 0, $ecwd_event->post_title, $ecwd_event->post_content, $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'][0], $permalink, $ecwd_event, $term_metas, $ecwd_event_metas);
|
86 |
}
|
87 |
|
88 |
$d = new ECWD_Display(0, '', '', $today);
|
89 |
+
$max_date = date('Y-m-d', strtotime((date("Y-m-t", (strtotime(date('Y-m-d')))) . " +" . ((12)) . " month")));
|
90 |
$events = $d->get_event_days($events, 1, date('Y-m-d'), $max_date);
|
91 |
$events = $d->events_unique($events);
|
92 |
+
$venue_meta_template = '<div class="%s"><span>%s:</span><span>%s</span></div>';
|
93 |
+
$venue_meta_link_template = '<div class="%s"><span>%s:</span><a href="%s">%s</a></div>';
|
94 |
+
|
95 |
+
$ecwd_venue_phone = get_post_meta($post_id, 'ecwd_venue_meta_phone', true);
|
96 |
+
$ecwd_venue_website = get_post_meta($post_id, 'ecwd_venue_meta_website', true);
|
97 |
+
$ecwd_venue_website = ECWD::add_http($ecwd_venue_website);
|
98 |
+
$ecwd_venue_show_map = get_post_meta($post_id, 'ecwd_venue_show_map', true);
|
99 |
?>
|
100 |
|
101 |
<div class="ecwd-venue">
|
102 |
+
<?php
|
103 |
+
if (!empty($ecwd_venue_location)) {
|
104 |
+
echo sprintf($venue_meta_template, "ecwd_venue_location", __('Location', 'ecwd'), $ecwd_venue_location);
|
105 |
+
}
|
106 |
+
|
107 |
+
if (!empty($ecwd_venue_phone)) {
|
108 |
+
echo sprintf($venue_meta_template, "ecwd_venue_phone", __('Phone', 'ecwd'), $ecwd_venue_phone);
|
109 |
+
}
|
110 |
+
|
111 |
+
if (!empty($ecwd_venue_website)) {
|
112 |
+
echo sprintf($venue_meta_link_template, "ecwd_venue_website", __('Website', 'ecwd'), $ecwd_venue_website, $ecwd_venue_website);
|
113 |
+
}
|
114 |
+
|
115 |
+
echo '<div class="ecwd_venue_description">' . wpautop($post->post_content) . '</div>';
|
116 |
+
?>
|
117 |
+
<?php if ($ecwd_social_icons) { ?>
|
118 |
+
<div class="ecwd-social">
|
119 |
<span class="share-links">
|
120 |
<a href="http://twitter.com/home?status=<?php echo get_permalink($post_id) ?>" class="ecwd-twitter"
|
121 |
target="_blank" data-original-title="Tweet It">
|
122 |
<span class="visuallyhidden">Twitter</span></a>
|
123 |
|
124 |
+
<a href="http://www.facebook.com/sharer.php?u=<?php echo get_permalink($post_id) ?>"
|
125 |
+
class="ecwd-facebook"
|
126 |
target="_blank" data-original-title="Share on Facebook">
|
127 |
<span class="visuallyhidden">Facebook</span></a>
|
128 |
|
129 |
+
<a href="http://plus.google.com/share?url=<?php echo get_permalink($post_id) ?>"
|
130 |
+
class="ecwd-google-plus"
|
131 |
target="_blank" data-original-title="Share on Google+">
|
132 |
<span class="visuallyhidden">Google+</span></a>
|
133 |
|
134 |
</span>
|
135 |
+
</div>
|
136 |
+
<?php } ?>
|
137 |
+
|
138 |
+
|
139 |
+
<?php
|
140 |
+
if ($ecwd_venue_latlong) {
|
141 |
+
$map_events = array();
|
142 |
+
$map_events[0]['latlong'] = explode(',', $ecwd_venue_latlong);
|
143 |
+
$map_events[0]['zoom'] = $ecwd_venue_zoom;
|
144 |
+
$map_events[0]['infow'] = '<div class="ecwd_map_venue">';
|
145 |
+
$map_events[0]['infow'] .= '<span class="name">' . $post->post_title . '</span><br />';
|
146 |
+
$map_events[0]['infow'] .= '<span class="location">' . $ecwd_venue_location . '</span>';
|
147 |
+
$map_events[0]['infow'] .= '</div>';
|
148 |
+
$markers = json_encode($map_events);
|
149 |
+
?>
|
150 |
+
<div class="ecwd-show-map">
|
151 |
+
<div id="ecwd_map_div" class="ecwd_map_div">
|
152 |
+
</div>
|
153 |
+
<textarea id="ecwd_markers" class="hidden" style="display: none;"><?php echo $markers; ?></textarea>
|
154 |
+
</div>
|
155 |
<?php
|
156 |
+
}
|
157 |
+
do_action('ecwd_show_related_events', $events, false);
|
158 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
|
160 |
</div>
|
161 |
<script id="ecwd_script_handler" type="text/javascript">
|
162 |
+
if (typeof ecwd_js_init_call == "object") {
|
163 |
+
ecwd_js_init_call = new ecwd_js_init();
|
164 |
+
ecwd_js_init_call.showMap();
|
165 |
+
}
|
166 |
</script>
|
views/single-event.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Display for Event Custom Post Types
|
4 |
*/
|
5 |
if (!defined('ABSPATH')) {
|
6 |
-
|
7 |
}
|
8 |
|
9 |
global $post;
|
@@ -18,18 +18,18 @@ $date_format = 'Y-m-d';
|
|
18 |
$time_format = 'H:i';
|
19 |
$ecwd_social_icons = false;
|
20 |
if (isset($ecwd_options['date_format']) && $ecwd_options['date_format'] != '') {
|
21 |
-
|
22 |
}
|
23 |
if (isset($ecwd_options['time_format']) && $ecwd_options['time_format'] != '') {
|
24 |
-
|
25 |
}
|
26 |
$time_format .= (isset($ecwd_options['time_type']) ? ' ' . $ecwd_options['time_type'] : '');
|
27 |
if (isset($ecwd_options['time_type']) && $ecwd_options['time_type'] != '') {
|
28 |
-
|
29 |
-
|
30 |
}
|
31 |
if (isset($ecwd_options['social_icons']) && $ecwd_options['social_icons'] != '') {
|
32 |
-
|
33 |
}
|
34 |
// Load up all post meta data
|
35 |
|
@@ -39,34 +39,34 @@ $ecwd_event_metas = get_post_meta($ecwd_event->ID, '', true);
|
|
39 |
$ecwd_event_date_from = $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'][0];
|
40 |
$ecwd_event_date_to = $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0];
|
41 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'])) {
|
42 |
-
|
43 |
}
|
44 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'])) {
|
45 |
-
|
46 |
}
|
47 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'])) {
|
48 |
-
|
49 |
}
|
50 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'])) {
|
51 |
-
|
52 |
}
|
53 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'])) {
|
54 |
-
|
55 |
}
|
56 |
|
57 |
$permalink = get_the_permalink($ecwd_event->ID);
|
58 |
$this_event = $events[$ecwd_event->ID] = new ECWD_Event($ecwd_event->ID, '', $ecwd_event->post_title, $ecwd_event->post_content, $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'][0], $permalink, $ecwd_event, '', $ecwd_event_metas);
|
59 |
$d = new ECWD_Display('');
|
60 |
if (isset($_GET['eventDate']) || isset($wp_query->query_vars['eventDate'])) {
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
}
|
71 |
|
72 |
|
@@ -75,46 +75,63 @@ $ecwd_event_latlong = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'][
|
|
75 |
$ecwd_event_zoom = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_map_zoom'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_map_zoom'][0] : '';
|
76 |
$ecwd_event_show_map = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_show_map'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_show_map'][0] : 0;
|
77 |
if ($ecwd_event_show_map == '') {
|
78 |
-
|
79 |
}
|
80 |
if (!$ecwd_event_zoom) {
|
81 |
-
|
82 |
}
|
83 |
|
84 |
$ecwd_event_organizers = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_organizers'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_organizers'][0] : '';
|
85 |
|
86 |
|
87 |
-
|
88 |
$ecwd_event_url = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0] : '';
|
|
|
89 |
$ecwd_event_video = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_video'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_video'][0] : '';
|
90 |
$ecwd_all_day_event = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_all_day_event'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_all_day_event'][0] : 0;
|
91 |
$venue = '';
|
92 |
$venue_permalink = '';
|
93 |
$venue_post_id = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_venue'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_venue'][0] : 0;
|
94 |
if ($venue_post_id) {
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
}
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
$organizers = array();
|
103 |
$ecwd_event_organizers = maybe_unserialize($ecwd_event_organizers);
|
104 |
if (is_array($ecwd_event_organizers) || is_object($ecwd_event_organizers)) {
|
105 |
-
|
106 |
-
|
|
|
|
|
107 |
}
|
|
|
|
|
108 |
}
|
|
|
109 |
$featured_image = '';
|
110 |
if (has_post_thumbnail()) {
|
111 |
-
|
112 |
}
|
113 |
|
114 |
$category_and_tags = false;
|
115 |
|
116 |
if (isset($ecwd_options['category_and_tags']) && $ecwd_options['category_and_tags'] != '') {
|
117 |
-
|
118 |
}
|
119 |
$args = array('orderby' => 'name', 'order' => 'ASC', 'fields' => 'all');
|
120 |
$event_tags = wp_get_post_terms($post->ID, 'ecwd_event_tag', $args);
|
@@ -122,384 +139,435 @@ $event_categories = wp_get_post_terms($post->ID, 'ecwd_event_category', $args);
|
|
122 |
|
123 |
$event_title_style = '';
|
124 |
if (isset($ecwd_options['cat_title_color']) && $ecwd_options['cat_title_color'] == 1) {
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
}
|
|
|
134 |
}
|
135 |
|
136 |
get_header();
|
137 |
?>
|
138 |
<div id="ecwd-events-content" class="ecwd-events-single hentry site-content">
|
139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
|
141 |
-
|
142 |
-
|
143 |
-
the_post();
|
144 |
-
?>
|
145 |
-
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
146 |
-
<article>
|
147 |
-
<div class="ecwd-event" itemscope itemtype="http://schema.org/Event">
|
148 |
-
<header class="entry-header">
|
149 |
-
<?php the_title('<h1 itemprop="name" class="ecwd-events-single-event-title summary entry-title" ' . $event_title_style . '>', '</h1>'); ?>
|
150 |
-
</header>
|
151 |
-
<?php
|
152 |
-
if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER']) {
|
153 |
-
if (parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST) == parse_url(site_url(), PHP_URL_HOST)) {
|
154 |
-
?>
|
155 |
-
<a id="ecwd_back_link" href="<?php echo $_SERVER['HTTP_REFERER']; ?>"><?php _e('Back','ecwd'); ?></a>
|
156 |
-
<?php
|
157 |
-
}
|
158 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
?>
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
<?php
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
<?php } ?>
|
168 |
-
<div class="ecwd-event-details">
|
169 |
-
<div class="event-detalis-date">
|
170 |
-
<label class="ecwd-event-date-info"
|
171 |
-
title="<?php _e('Date', 'ecwd'); ?>"></label>
|
172 |
-
<span class="ecwd-event-date" itemprop="startDate"
|
173 |
-
content="<?php echo date('Y-m-d', strtotime($ecwd_event_date_from)) . 'T' . date('H:i', strtotime($ecwd_event_date_from)) ?>">
|
174 |
-
<?php
|
175 |
-
if ($ecwd_all_day_event == 1) {
|
176 |
-
echo date($date_format, strtotime($ecwd_event_date_from));
|
177 |
-
if ($ecwd_all_day_event == 1) {
|
178 |
-
if ($ecwd_event_date_to && date($date_format, strtotime($ecwd_event_date_from)) !== date($date_format, strtotime($ecwd_event_date_to))) {
|
179 |
-
echo ' - ' . date($date_format, strtotime($ecwd_event_date_to));
|
180 |
-
}
|
181 |
-
echo ' ' . __('All day', 'ecwd');
|
182 |
-
}
|
183 |
-
} else {
|
184 |
-
echo date($date_format, strtotime($ecwd_event_date_from)) . ' ' . date($time_format, strtotime($ecwd_event_date_from));
|
185 |
-
|
186 |
-
if ($ecwd_event_date_to) {
|
187 |
-
echo ' - ' . date($date_format, strtotime($ecwd_event_date_to)) . ' ' . date($time_format, strtotime($ecwd_event_date_to));
|
188 |
-
}
|
189 |
-
}
|
190 |
-
?>
|
191 |
-
</span>
|
192 |
-
</div>
|
193 |
-
<?php
|
194 |
-
if (isset($ecwd_options['show_repeat_rate'])) {
|
195 |
-
$repeat_rate_text = $d->get_repeat_rate($post_id, '', $date_format);
|
196 |
-
if ($repeat_rate_text != ''):
|
197 |
-
?>
|
198 |
-
<div class="ecwd_repeat_rate_text">
|
199 |
-
<span><?php echo $d->get_repeat_rate($post_id, '', $date_format); ?></span>
|
200 |
-
</div>
|
201 |
-
<?php
|
202 |
-
endif;
|
203 |
-
}
|
204 |
-
?>
|
205 |
-
<?php if ($ecwd_event_url) { ?>
|
206 |
-
<div class="ecwd-url">
|
207 |
-
|
208 |
-
<a href="<?php echo $ecwd_event_url; ?>" target="_blank"><label
|
209 |
-
class="ecwd-event-url-info"
|
210 |
-
title="<?php _e('Url', 'ecwd'); ?>"></label> <?php echo $ecwd_event_url; ?>
|
211 |
-
</a>
|
212 |
-
</div>
|
213 |
-
<?php } ?>
|
214 |
-
<?php if (count($organizers) > 0) { ?>
|
215 |
-
<div class="event-detalis-org">
|
216 |
-
<label class="ecwd-event-org-info"
|
217 |
-
title="<?php _e('Organizers', 'ecwd'); ?>"></label>
|
218 |
-
<?php foreach ($organizers as $organizer) { ?>
|
219 |
-
<span itemprop="organizer">
|
220 |
-
<a href="<?php echo get_permalink($organizer['ID']) ?>"><?php echo $organizer['post_title'] ?></a>
|
221 |
-
</span>
|
222 |
-
<?php } ?>
|
223 |
-
</div>
|
224 |
-
<?php } ?>
|
225 |
-
<div class="event-venue" itemprop="location" itemscope
|
226 |
-
itemtype="http://schema.org/Place">
|
227 |
-
<?php if ($venue_post_id) { ?>
|
228 |
-
<label class="ecwd-venue-info"
|
229 |
-
title="<?php _e('Venue', 'ecwd'); ?>"></label>
|
230 |
-
<span itemprop="name"><a
|
231 |
-
href="<?php echo $venue_permalink ?>"><?php echo $venue; ?></a></span>
|
232 |
-
<div class="address" itemprop="address" itemscope
|
233 |
-
itemtype="http://schema.org/PostalAddress">
|
234 |
-
<?php echo $ecwd_event_location; ?>
|
235 |
-
</div>
|
236 |
-
|
237 |
-
<?php } elseif ($ecwd_event_location) { ?>
|
238 |
-
<span class="ecwd_hidden" itemprop="name"><?php echo $ecwd_event_location; ?></span>
|
239 |
-
<label class="ecwd-venue-info"
|
240 |
-
title="<?php _e('Location', 'ecwd'); ?>"></label>
|
241 |
-
<span class="address" itemprop="address" itemscope
|
242 |
-
itemtype="http://schema.org/PostalAddress">
|
243 |
-
<?php echo $ecwd_event_location; ?>
|
244 |
-
</span>
|
245 |
-
<?php } ?>
|
246 |
-
</div>
|
247 |
-
<?php do_action('ecwd_view_ext'); ?>
|
248 |
-
</div>
|
249 |
-
</div>
|
250 |
-
<?php if ($ecwd_social_icons) {
|
251 |
-
?>
|
252 |
-
|
253 |
-
<div class="ecwd-social">
|
254 |
-
<span class="share-links">
|
255 |
-
<a href="http://twitter.com/home?status=<?php echo get_permalink($post_id) ?>"
|
256 |
-
class="ecwd-twitter"
|
257 |
-
target="_blank" data-original-title="Tweet It">
|
258 |
-
<span class="visuallyhidden">Twitter</span></a>
|
259 |
-
<a href="http://www.facebook.com/sharer.php?u=<?php echo get_permalink($post_id) ?>"
|
260 |
-
class="ecwd-facebook"
|
261 |
-
target="_blank" data-original-title="Share on Facebook">
|
262 |
-
<span class="visuallyhidden">Facebook</span></a>
|
263 |
-
<a href="http://plus.google.com/share?url=<?php echo get_permalink($post_id) ?>"
|
264 |
-
class="ecwd-google-plus"
|
265 |
-
target="_blank" data-original-title="Share on Google+">
|
266 |
-
<span class="visuallyhidden">Google+</span></a>
|
267 |
-
</span>
|
268 |
-
</div>
|
269 |
-
<?php } ?>
|
270 |
<?php
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
</object>
|
322 |
-
<?php
|
323 |
-
}
|
324 |
-
} elseif (strpos($ecwd_event_video, 'vimeo') > 0) {
|
325 |
-
$videoID = explode('/', $ecwd_event_video);
|
326 |
-
$videoID = $videoID[count($videoID) - 1];
|
327 |
-
if ($videoID) {
|
328 |
-
?>
|
329 |
-
<iframe
|
330 |
-
src="http://player.vimeo.com/video/<?php echo $videoID; ?>?title=0&byline=0&portrait=0&badge=0&color=ffffff"
|
331 |
-
width="" height="" frameborder="0" webkitAllowFullScreen mozallowfullscreen
|
332 |
-
allowFullScreen></iframe>
|
333 |
-
<?php
|
334 |
-
}
|
335 |
-
}
|
336 |
-
?>
|
337 |
-
</div>
|
338 |
-
<!-- Content -->
|
339 |
-
<div class="entry-content">
|
340 |
-
<?php the_content(); ?>
|
341 |
</div>
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
|
|
|
399 |
|
|
|
|
|
|
|
|
|
|
|
400 |
|
401 |
-
<?php
|
402 |
-
if (!isset($ecwd_options['related_events']) || $ecwd_options['related_events'] == 1) {
|
403 |
-
$post_cats = wp_get_post_terms($post_id, ECWD_PLUGIN_PREFIX . '_event_category');
|
404 |
-
$cat_ids = wp_list_pluck($post_cats, 'term_id');
|
405 |
-
$post_tags = wp_get_post_terms($post_id, ECWD_PLUGIN_PREFIX . '_event_tag');
|
406 |
-
$tag_ids = wp_list_pluck($post_tags, 'term_id');
|
407 |
-
$events = array();
|
408 |
-
$today = date('Y-m-d');
|
409 |
-
|
410 |
-
$args = array(
|
411 |
-
'numberposts' => - 1,
|
412 |
-
'post_type' => ECWD_PLUGIN_PREFIX . '_event',
|
413 |
-
'tax_query' => array(
|
414 |
-
array(
|
415 |
-
'taxonomy' => ECWD_PLUGIN_PREFIX . '_event_category',
|
416 |
-
'terms' => $cat_ids,
|
417 |
-
'field' => 'term_id',
|
418 |
-
)
|
419 |
-
),
|
420 |
-
'orderby' => 'meta_value',
|
421 |
-
'order' => 'ASC'
|
422 |
-
);
|
423 |
-
$ecwd_events_by_cats = get_posts($args);
|
424 |
-
$args = array(
|
425 |
-
'numberposts' => - 1,
|
426 |
-
'post_type' => ECWD_PLUGIN_PREFIX . '_event',
|
427 |
-
'tax_query' => array(
|
428 |
-
array(
|
429 |
-
'taxonomy' => ECWD_PLUGIN_PREFIX . '_event_tag',
|
430 |
-
'terms' => $tag_ids,
|
431 |
-
'field' => 'term_id',
|
432 |
-
),
|
433 |
-
),
|
434 |
-
'orderby' => 'meta_value',
|
435 |
-
'order' => 'ASC'
|
436 |
-
);
|
437 |
-
$ecwd_events_by_tags = get_posts($args);
|
438 |
-
$ecwd_events = array_merge($ecwd_events_by_tags, $ecwd_events_by_cats);
|
439 |
-
$ecwd_events = array_map("unserialize", array_unique(array_map("serialize", $ecwd_events)));
|
440 |
-
wp_reset_postdata();
|
441 |
-
wp_reset_query();
|
442 |
-
|
443 |
-
foreach ($ecwd_events as $ecwd_event) {
|
444 |
-
if ($ecwd_event->ID != $post_id) {
|
445 |
-
$term_metas = '';
|
446 |
-
$categories = get_the_terms($ecwd_event->ID, ECWD_PLUGIN_PREFIX . '_event_category');
|
447 |
-
if (is_array($categories)) {
|
448 |
-
foreach ($categories as $category) {
|
449 |
-
$term_metas = get_option("ecwd_event_category_$category->term_id");
|
450 |
-
$term_metas['id'] = $category->term_id;
|
451 |
-
$term_metas['name'] = $category->name;
|
452 |
-
$term_metas['slug'] = $category->slug;
|
453 |
-
}
|
454 |
-
}
|
455 |
-
$ecwd_event_metas = get_post_meta($ecwd_event->ID, '', true);
|
456 |
-
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'] = array(0 => '');
|
457 |
-
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'])) {
|
458 |
-
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'] = array(0 => '');
|
459 |
-
}
|
460 |
-
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'])) {
|
461 |
-
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'] = array(0 => '');
|
462 |
-
}
|
463 |
-
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'])) {
|
464 |
-
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'] = array(0 => '');
|
465 |
-
}
|
466 |
-
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'])) {
|
467 |
-
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'] = array(0 => '');
|
468 |
-
}
|
469 |
-
|
470 |
-
$permalink = get_permalink($ecwd_event->ID);
|
471 |
-
$events[$ecwd_event->ID] = new ECWD_Event($ecwd_event->ID, 0, $ecwd_event->post_title, $ecwd_event->post_content, $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'][0], $permalink, $ecwd_event, $term_metas, $ecwd_event_metas);
|
472 |
-
}
|
473 |
-
}
|
474 |
-
$d = new ECWD_Display(0, '', '', $today);
|
475 |
-
$start_date = date('Y-m-d');
|
476 |
-
$end_date = date('Y-m-d', strtotime("+1 year", strtotime($start_date)));
|
477 |
-
$events = $d->get_event_days($events, 1, $start_date, $end_date);
|
478 |
-
?>
|
479 |
-
|
480 |
-
<?php
|
481 |
-
$events = $d->events_unique($events);
|
482 |
-
do_action('ecwd_show_related_events', $events,true);
|
483 |
-
}
|
484 |
-
?> </div>
|
485 |
-
<!-- #Related Events-->
|
486 |
-
</article>
|
487 |
-
</div> <!-- #post-x -->
|
488 |
-
<?php if (comments_open() && $post->comment_status == 'open') { ?>
|
489 |
-
<div class="ecwd-comments">
|
490 |
-
|
491 |
-
<?php echo comments_template(); ?>
|
492 |
-
</div>
|
493 |
-
<?php } ?>
|
494 |
-
<?php endwhile; ?>
|
495 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
496 |
</div>
|
497 |
-
<script id="ecwd_script_handler" type="text/javascript">
|
498 |
-
|
499 |
-
|
|
|
|
|
500 |
<?php
|
501 |
-
if(isset($ecwd_options['enable_sidebar_in_event']) && $ecwd_options['enable_sidebar_in_event'] == '1'){
|
502 |
-
|
503 |
}
|
504 |
get_footer();
|
505 |
?>
|
3 |
* Display for Event Custom Post Types
|
4 |
*/
|
5 |
if (!defined('ABSPATH')) {
|
6 |
+
die('-1');
|
7 |
}
|
8 |
|
9 |
global $post;
|
18 |
$time_format = 'H:i';
|
19 |
$ecwd_social_icons = false;
|
20 |
if (isset($ecwd_options['date_format']) && $ecwd_options['date_format'] != '') {
|
21 |
+
$date_format = $ecwd_options['date_format'];
|
22 |
}
|
23 |
if (isset($ecwd_options['time_format']) && $ecwd_options['time_format'] != '') {
|
24 |
+
$time_format = $ecwd_options['time_format'];
|
25 |
}
|
26 |
$time_format .= (isset($ecwd_options['time_type']) ? ' ' . $ecwd_options['time_type'] : '');
|
27 |
if (isset($ecwd_options['time_type']) && $ecwd_options['time_type'] != '') {
|
28 |
+
$time_format = str_replace('H', 'g', $time_format);
|
29 |
+
$time_format = str_replace('h', 'g', $time_format);
|
30 |
}
|
31 |
if (isset($ecwd_options['social_icons']) && $ecwd_options['social_icons'] != '') {
|
32 |
+
$ecwd_social_icons = $ecwd_options['social_icons'];
|
33 |
}
|
34 |
// Load up all post meta data
|
35 |
|
39 |
$ecwd_event_date_from = $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'][0];
|
40 |
$ecwd_event_date_to = $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0];
|
41 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'])) {
|
42 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'] = array(0 => '');
|
43 |
}
|
44 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'])) {
|
45 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'] = array(0 => '');
|
46 |
}
|
47 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'])) {
|
48 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'] = array(0 => '');
|
49 |
}
|
50 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'])) {
|
51 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'] = array(0 => '');
|
52 |
}
|
53 |
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'])) {
|
54 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'] = array(0 => '');
|
55 |
}
|
56 |
|
57 |
$permalink = get_the_permalink($ecwd_event->ID);
|
58 |
$this_event = $events[$ecwd_event->ID] = new ECWD_Event($ecwd_event->ID, '', $ecwd_event->post_title, $ecwd_event->post_content, $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'][0], $permalink, $ecwd_event, '', $ecwd_event_metas);
|
59 |
$d = new ECWD_Display('');
|
60 |
if (isset($_GET['eventDate']) || isset($wp_query->query_vars['eventDate'])) {
|
61 |
+
$fromDate = isset($_GET['eventDate']) ? sanitize_text_field($_GET['eventDate']) : $wp_query->query_vars['eventDate'];
|
62 |
+
|
63 |
+
$eventdayslong = $d->dateDiff($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0]);
|
64 |
+
$toDate = date('Y-m-d', strtotime((date("Y-m-d", (strtotime($fromDate))) . " +" . ($eventdayslong + 2) . " days")));
|
65 |
+
$this_event_dates = $d->get_event_days(array($ecwd_event->ID => $this_event), 1, $fromDate, $toDate);
|
66 |
+
if (isset($this_event_dates[0]['from']) && strtotime($fromDate) == strtotime($this_event_dates[0]['from'])) {
|
67 |
+
$ecwd_event_date_from = $this_event_dates[0]['from'] . ' ' . $this_event_dates[0]['starttime'];
|
68 |
+
$ecwd_event_date_to = $this_event_dates[0]['to'] . ' ' . $this_event_dates[0]['endtime'];
|
69 |
+
}
|
70 |
}
|
71 |
|
72 |
|
75 |
$ecwd_event_zoom = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_map_zoom'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_map_zoom'][0] : '';
|
76 |
$ecwd_event_show_map = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_show_map'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_show_map'][0] : 0;
|
77 |
if ($ecwd_event_show_map == '') {
|
78 |
+
$ecwd_event_show_map = 1;
|
79 |
}
|
80 |
if (!$ecwd_event_zoom) {
|
81 |
+
$ecwd_event_zoom = 17;
|
82 |
}
|
83 |
|
84 |
$ecwd_event_organizers = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_organizers'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_organizers'][0] : '';
|
85 |
|
86 |
|
|
|
87 |
$ecwd_event_url = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0] : '';
|
88 |
+
$ecwd_event_url = ECWD::add_http($ecwd_event_url);
|
89 |
$ecwd_event_video = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_video'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_video'][0] : '';
|
90 |
$ecwd_all_day_event = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_all_day_event'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_all_day_event'][0] : 0;
|
91 |
$venue = '';
|
92 |
$venue_permalink = '';
|
93 |
$venue_post_id = isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_venue'][0]) ? $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_venue'][0] : 0;
|
94 |
if ($venue_post_id) {
|
95 |
+
$venue_post = get_post($venue_post_id);
|
96 |
+
if ($venue_post) {
|
97 |
+
$venue = $venue_post->post_title;
|
98 |
+
$venue_permalink = get_permalink($venue_post->ID);
|
99 |
+
}
|
100 |
}
|
101 |
|
102 |
+
$venue_meta_template = '<div class="%s"><span>%s:</span><span>%s</span></div>';
|
103 |
+
$venue_meta_link_template = '<div class="%s"><span>%s:</span><a href="%s">%s</a></div>';
|
104 |
+
|
105 |
+
if (is_numeric($venue_post_id)) {
|
106 |
+
$ecwd_venue_phone = get_post_meta($venue_post_id, 'ecwd_venue_meta_phone', true);
|
107 |
+
$ecwd_venue_website = get_post_meta($venue_post_id, 'ecwd_venue_meta_website', true);
|
108 |
+
$ecwd_venue_website = ECWD::add_http($ecwd_venue_website);
|
109 |
+
} else {
|
110 |
+
$ecwd_venue_phone = $ecwd_venue_website = "";
|
111 |
+
}
|
112 |
+
|
113 |
+
|
114 |
$organizers = array();
|
115 |
$ecwd_event_organizers = maybe_unserialize($ecwd_event_organizers);
|
116 |
if (is_array($ecwd_event_organizers) || is_object($ecwd_event_organizers)) {
|
117 |
+
foreach ($ecwd_event_organizers as $ecwd_event_organizer) {
|
118 |
+
$temp = get_post($ecwd_event_organizer, ARRAY_A);
|
119 |
+
if ($temp !== null) {
|
120 |
+
$organizers[] = $temp;
|
121 |
}
|
122 |
+
|
123 |
+
}
|
124 |
}
|
125 |
+
|
126 |
$featured_image = '';
|
127 |
if (has_post_thumbnail()) {
|
128 |
+
$featured_image = wp_get_attachment_url(get_post_thumbnail_id($post->ID, 'full', false));
|
129 |
}
|
130 |
|
131 |
$category_and_tags = false;
|
132 |
|
133 |
if (isset($ecwd_options['category_and_tags']) && $ecwd_options['category_and_tags'] != '') {
|
134 |
+
$category_and_tags = $ecwd_options['category_and_tags'];
|
135 |
}
|
136 |
$args = array('orderby' => 'name', 'order' => 'ASC', 'fields' => 'all');
|
137 |
$event_tags = wp_get_post_terms($post->ID, 'ecwd_event_tag', $args);
|
139 |
|
140 |
$event_title_style = '';
|
141 |
if (isset($ecwd_options['cat_title_color']) && $ecwd_options['cat_title_color'] == 1) {
|
142 |
+
if (!empty($event_categories)) {
|
143 |
+
if (isset($event_categories[0])) {
|
144 |
+
$cat = $event_categories[0];
|
145 |
+
$metas = get_option("ecwd_event_category_$cat->term_id");
|
146 |
+
if (isset($metas['color'])) {
|
147 |
+
$event_title_style = 'style = "color: ' . $metas['color'] . '"';
|
148 |
+
}
|
149 |
+
}
|
150 |
+
}
|
151 |
+
}
|
152 |
+
|
153 |
+
$default_calendar = get_option('ecwd_default_calendar');
|
154 |
+
$calendars_id = get_post_meta($post_id, 'ecwd_event_calendars', true);
|
155 |
+
$back_link = null;
|
156 |
+
$back_link_text = __('View Calendar', 'ecwd');
|
157 |
+
if (!empty($calendars_id)) {
|
158 |
+
if ($default_calendar !== false && in_array($default_calendar, $calendars_id)) {
|
159 |
+
$back_link = get_permalink($default_calendar);
|
160 |
+
} else {
|
161 |
+
$back_link = get_permalink($calendars_id[0]);
|
162 |
+
}
|
163 |
+
} else {
|
164 |
+
if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER']) {
|
165 |
+
if (parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST) == parse_url(site_url(), PHP_URL_HOST)) {
|
166 |
+
$back_link = $_SERVER['HTTP_REFERER'];
|
167 |
+
$back_link_text = __('Back', 'ecwd');
|
168 |
}
|
169 |
+
}
|
170 |
}
|
171 |
|
172 |
get_header();
|
173 |
?>
|
174 |
<div id="ecwd-events-content" class="ecwd-events-single hentry site-content">
|
175 |
|
176 |
+
<?php while (have_posts()) :
|
177 |
+
the_post();
|
178 |
+
?>
|
179 |
+
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
180 |
+
<article>
|
181 |
+
<div class="ecwd-event" itemscope itemtype="http://schema.org/Event">
|
182 |
+
<header class="entry-header">
|
183 |
+
<?php the_title('<h1 itemprop="name" class="ecwd-events-single-event-title summary entry-title" ' . $event_title_style . '>', '</h1>'); ?>
|
184 |
+
</header>
|
185 |
+
<?php if ($back_link !== null) { ?>
|
186 |
+
<a id="ecwd_back_link" href="<?php echo $back_link; ?>"><?php echo $back_link_text; ?></a>
|
187 |
+
<?php } ?>
|
188 |
+
<div class="event-detalis">
|
189 |
+
<?php if ($featured_image && $featured_image !== '') { ?>
|
190 |
+
<div class="event-featured-image">
|
191 |
+
<img src="<?php echo $featured_image; ?>"/>
|
192 |
+
</div>
|
193 |
+
<?php } ?>
|
194 |
+
<div class="ecwd-event-details">
|
195 |
+
<div class="event-detalis-date">
|
196 |
+
<label class="ecwd-event-date-info" title="<?php _e('Date', 'ecwd'); ?>"></label>
|
197 |
+
<span
|
198 |
+
class="ecwd-event-date"
|
199 |
+
itemprop="startDate"
|
200 |
+
content="<?php echo date('Y-m-d', strtotime($ecwd_event_date_from)) . 'T' . date('H:i', strtotime($ecwd_event_date_from)) ?>">
|
201 |
+
<?php if ($ecwd_all_day_event == 1) {
|
202 |
+
echo date($date_format, strtotime($ecwd_event_date_from));
|
203 |
+
if ($ecwd_all_day_event == 1) {
|
204 |
+
if ($ecwd_event_date_to && date($date_format, strtotime($ecwd_event_date_from)) !== date($date_format, strtotime($ecwd_event_date_to))) {
|
205 |
+
echo ' - ' . date($date_format, strtotime($ecwd_event_date_to));
|
206 |
+
}
|
207 |
+
echo ' ' . __('All day', 'ecwd');
|
208 |
+
}
|
209 |
+
} else {
|
210 |
+
echo date($date_format, strtotime($ecwd_event_date_from)) . ' ' . date($time_format, strtotime($ecwd_event_date_from));
|
211 |
|
212 |
+
if ($ecwd_event_date_to) {
|
213 |
+
echo ' - ' . date($date_format, strtotime($ecwd_event_date_to)) . ' ' . date($time_format, strtotime($ecwd_event_date_to));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
}
|
215 |
+
}
|
216 |
+
?>
|
217 |
+
</span>
|
218 |
+
</div>
|
219 |
+
|
220 |
+
<?php
|
221 |
+
if (isset($ecwd_options['show_repeat_rate'])) {
|
222 |
+
$repeat_rate_text = $d->get_repeat_rate($post_id, '', $date_format);
|
223 |
+
if ($repeat_rate_text != ''):
|
224 |
+
?>
|
225 |
+
<div class="ecwd_repeat_rate_text">
|
226 |
+
<span><?php echo $d->get_repeat_rate($post_id, '', $date_format); ?></span>
|
227 |
+
</div>
|
228 |
+
<?php
|
229 |
+
endif;
|
230 |
+
} ?>
|
231 |
+
|
232 |
+
<?php if ($ecwd_event_url) { ?>
|
233 |
+
<div class="ecwd-url">
|
234 |
+
<a href="<?php echo $ecwd_event_url; ?>" target="_blank">
|
235 |
+
<label class="ecwd-event-url-info" title="<?php _e('Url', 'ecwd'); ?>"></label>
|
236 |
+
<?php echo $ecwd_event_url; ?>
|
237 |
+
</a>
|
238 |
+
</div>
|
239 |
+
<?php }
|
240 |
+
|
241 |
+
if (count($organizers) > 0) { ?>
|
242 |
+
<div class="event-detalis-org">
|
243 |
+
<label class="ecwd-event-org-info" title="<?php _e('Organizers', 'ecwd'); ?>"></label>
|
244 |
+
|
245 |
+
<?php if (count($organizers) > 1) { ?>
|
246 |
+
<?php foreach ($organizers as $organizer) { ?>
|
247 |
+
<span itemprop="organizer">
|
248 |
+
<a href="<?php echo get_permalink($organizer['ID']) ?>">
|
249 |
+
<?php echo $organizer['post_title'] ?>
|
250 |
+
</a>
|
251 |
+
</span>
|
252 |
+
|
253 |
+
<?php }
|
254 |
+
} else {
|
255 |
+
$organizer = $organizers[0];
|
256 |
?>
|
257 |
+
|
258 |
+
<span itemprop="organizer">
|
259 |
+
<a href="<?php echo get_permalink($organizer['ID']) ?>">
|
260 |
+
<?php echo $organizer['post_title'] ?>
|
261 |
+
</a>
|
262 |
+
</span>
|
263 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
<?php
|
265 |
+
$organizer_phone = get_post_meta($organizer['ID'], 'ecwd_organizer_meta_phone', true);
|
266 |
+
$organizer_website = get_post_meta($organizer['ID'], 'ecwd_organizer_meta_website', true);
|
267 |
+
$organizer_website = ECWD::add_http($organizer_website);
|
268 |
+
|
269 |
+
if (!empty($organizer_phone)) { ?>
|
270 |
+
<div class="ecwd_organizer_phone">
|
271 |
+
<span><?php _e('Phone', 'ecwd'); ?>:</span>
|
272 |
+
<span><?php echo $organizer_phone; ?></span>
|
273 |
+
</div>
|
274 |
+
<?php }
|
275 |
+
if (!empty($organizer_website)) { ?>
|
276 |
+
<div class="ecwd_organizer_website">
|
277 |
+
<span><?php _e('Website', 'ecwd'); ?>:</span>
|
278 |
+
<a href="<?php echo $organizer_website; ?>">
|
279 |
+
<?php echo $organizer_website; ?>
|
280 |
+
</a>
|
281 |
+
</div>
|
282 |
+
<?php }
|
283 |
+
} ?>
|
284 |
+
</div>
|
285 |
+
<?php } ?>
|
286 |
+
|
287 |
+
<div class="event-venue" itemprop="location" itemscope itemtype="http://schema.org/Place">
|
288 |
+
<?php if ($venue_post_id) { ?>
|
289 |
+
<label class="ecwd-venue-info" title="<?php _e('Venue', 'ecwd'); ?>"></label>
|
290 |
+
<span itemprop="name">
|
291 |
+
<a
|
292 |
+
<?php
|
293 |
+
if (isset($_GET['iframe']) && intval($_GET['iframe']) == 1) {
|
294 |
+
$venue_permalink = add_query_arg('venue', '1', $venue_permalink);
|
295 |
+
}
|
296 |
+
?>
|
297 |
+
href="<?php echo $venue_permalink ?>"><?php echo $venue; ?></a>
|
298 |
+
</span>
|
299 |
+
|
300 |
+
<?php
|
301 |
+
|
302 |
+
if (!empty($ecwd_venue_phone)) {
|
303 |
+
echo sprintf($venue_meta_template, "ecwd_venue_phone", __('Phone', 'ecwd'), $ecwd_venue_phone);
|
304 |
+
}
|
305 |
+
|
306 |
+
if (!empty($ecwd_venue_website)) {
|
307 |
+
echo sprintf($venue_meta_link_template, "ecwd_venue_website", __('Website', 'ecwd'), $ecwd_venue_website, $ecwd_venue_website);
|
308 |
+
}
|
309 |
+
|
310 |
+
if (!empty($ecwd_event_location)) {
|
311 |
+
?>
|
312 |
+
<div class="address" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
|
313 |
+
<span><?php _e('Address:', 'ecwd'); ?></span>
|
314 |
+
<span><?php echo $ecwd_event_location; ?></span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
</div>
|
316 |
+
<?php
|
317 |
+
}
|
318 |
+
?>
|
319 |
+
|
320 |
+
<?php } elseif ($ecwd_event_location) { ?>
|
321 |
+
<span class="ecwd_hidden" itemprop="name"><?php echo $ecwd_event_location; ?></span>
|
322 |
+
<label class="ecwd-venue-info"
|
323 |
+
title="<?php _e('Location', 'ecwd'); ?>"></label>
|
324 |
+
<span class="address" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
|
325 |
+
<?php echo $ecwd_event_location; ?>
|
326 |
+
</span>
|
327 |
+
<?php } ?>
|
328 |
+
</div>
|
329 |
+
|
330 |
+
<?php do_action('ecwd_view_ext'); ?>
|
331 |
+
</div>
|
332 |
+
</div>
|
333 |
+
<?php if ($ecwd_social_icons) { ?>
|
334 |
+
|
335 |
+
<div class="ecwd-social">
|
336 |
+
<span class="share-links">
|
337 |
+
<a href="http://twitter.com/home?status=<?php echo get_permalink($post_id) ?>"
|
338 |
+
class="ecwd-twitter"
|
339 |
+
target="_blank" data-original-title="Tweet It">
|
340 |
+
<span class="visuallyhidden">Twitter</span></a>
|
341 |
+
<a href="http://www.facebook.com/sharer.php?u=<?php echo get_permalink($post_id) ?>"
|
342 |
+
class="ecwd-facebook"
|
343 |
+
target="_blank" data-original-title="Share on Facebook">
|
344 |
+
<span class="visuallyhidden">Facebook</span></a>
|
345 |
+
<a href="http://plus.google.com/share?url=<?php echo get_permalink($post_id) ?>"
|
346 |
+
class="ecwd-google-plus"
|
347 |
+
target="_blank" data-original-title="Share on Google+">
|
348 |
+
<span class="visuallyhidden">Google+</span></a>
|
349 |
+
</span>
|
350 |
+
</div>
|
351 |
+
<?php }
|
352 |
+
if ($ecwd_event_show_map == 1 && $ecwd_event_latlong) {
|
353 |
+
$map_events = array();
|
354 |
+
$map_events[0]['latlong'] = explode(',', $ecwd_event_latlong);
|
355 |
+
if ($ecwd_event_location != '') {
|
356 |
+
$map_events[0]['location'] = $ecwd_event_location;
|
357 |
+
}
|
358 |
+
$map_events[0]['zoom'] = $ecwd_event_zoom;
|
359 |
+
$map_events[0]['infow'] = '<div class="ecwd_map_event">';
|
360 |
+
$map_events[0]['infow'] .= '<span class="location">' . $ecwd_event_location . '</span>';
|
361 |
+
$map_events[0]['infow'] .= '</div>';
|
362 |
+
$map_events[0]['infow'] .= '<div class="event-detalis-date">
|
363 |
+
<label class="ecwd-event-date-info" title="' . __('Date', 'ecwd') . '"></label>
|
364 |
+
<span class="ecwd-event-date" itemprop="startDate" content="' . date('Y-m-d', strtotime($ecwd_event_date_from)) . 'T' . date('H:i', strtotime($ecwd_event_date_from)) . '">';
|
365 |
+
if ($ecwd_all_day_event == 1) {
|
366 |
+
$map_events[0]['infow'] .= date($date_format, strtotime($ecwd_event_date_from));
|
367 |
+
if ($ecwd_event_date_to) {
|
368 |
+
$map_events[0]['infow'] .= ' - ' . date($date_format, strtotime($ecwd_event_date_to)) . ' ' . __('All day', 'ecwd');
|
369 |
+
}
|
370 |
+
} else {
|
371 |
+
$map_events[0]['infow'] .= date($date_format, strtotime($ecwd_event_date_from)) . ' ' . date($time_format, strtotime($ecwd_event_date_from));
|
372 |
+
|
373 |
+
if ($ecwd_event_date_to) {
|
374 |
+
$map_events[0]['infow'] .= ' ' . date($date_format, strtotime($ecwd_event_date_to)) . ' ' . date($time_format, strtotime($ecwd_event_date_to));
|
375 |
+
}
|
376 |
+
}
|
377 |
+
$map_events[0]['infow'] .= '</span></div>';
|
378 |
+
$markers = json_encode($map_events);
|
379 |
+
?>
|
380 |
+
<div class="ecwd-show-map">
|
381 |
+
<div class="ecwd_map_div"></div>
|
382 |
+
<textarea class="hidden ecwd_markers" style="display: none;"><?php echo $markers; ?></textarea>
|
383 |
+
</div>
|
384 |
+
<?php } ?>
|
385 |
+
<div class="clear"></div>
|
386 |
+
|
387 |
+
<?php if (!empty($ecwd_event_video)) { ?>
|
388 |
+
<div class="ecwd-event-video">
|
389 |
+
<?php
|
390 |
+
if (strpos($ecwd_event_video, 'youtube') > 0) {
|
391 |
+
parse_str(parse_url($ecwd_event_video, PHP_URL_QUERY), $video_array_of_vars);
|
392 |
+
if (isset($video_array_of_vars['v']) && $video_array_of_vars['v']) {
|
393 |
+
?>
|
394 |
+
<object data="http://www.youtube.com/v/<?php echo $video_array_of_vars['v'] ?>"
|
395 |
+
type="application/x-shockwave-flash" width="400" height="300">
|
396 |
+
<param name="src"
|
397 |
+
value="http://www.youtube.com/v/<?php echo $video_array_of_vars['v'] ?>"/>
|
398 |
+
</object>
|
399 |
+
<?php
|
400 |
+
}
|
401 |
+
} elseif (strpos($ecwd_event_video, 'vimeo') > 0) {
|
402 |
+
$videoID = explode('/', $ecwd_event_video);
|
403 |
+
$videoID = $videoID[count($videoID) - 1];
|
404 |
+
if ($videoID) { ?>
|
405 |
+
<iframe
|
406 |
+
src="http://player.vimeo.com/video/<?php echo $videoID; ?>?title=0&byline=0&portrait=0&badge=0&color=ffffff"
|
407 |
+
width="" height="" frameborder="0" webkitAllowFullScreen mozallowfullscreen
|
408 |
+
allowFullScreen></iframe>
|
409 |
+
<?php
|
410 |
+
}
|
411 |
+
}
|
412 |
+
?>
|
413 |
+
</div>
|
414 |
+
<?php } ?>
|
415 |
+
<!-- Content -->
|
416 |
|
417 |
+
<?php
|
418 |
|
419 |
+
$event_content = get_the_content();
|
420 |
+
if (empty($event_content)) { ?>
|
421 |
+
<div class="entry-content"><?php the_content(); ?></div>
|
422 |
+
<?php } ?>
|
423 |
+
<!-- End Content -->
|
424 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
425 |
|
426 |
+
<!-- Categories and tags -->
|
427 |
+
<?php if ($category_and_tags == 1) { ?>
|
428 |
+
<div class="event_cageory_and_tags">
|
429 |
+
|
430 |
+
<?php if (!empty($event_categories)) { ?>
|
431 |
+
<ul class="event_categories">
|
432 |
+
<?php
|
433 |
+
foreach ($event_categories as $category) {
|
434 |
+
$metas = get_option("ecwd_event_category_$category->term_id");
|
435 |
+
?>
|
436 |
+
<li class="event_category event-details-title">
|
437 |
+
<?php if ($metas['color']) { ?>
|
438 |
+
<span class="event-metalabel" style="background:<?php echo $metas['color']; ?>"></span>
|
439 |
+
<span class="event_catgeory_name">
|
440 |
+
<a href="<?php echo get_category_link($category); ?>"
|
441 |
+
style="color:<?php echo $metas['color']; ?>">
|
442 |
+
<?php echo $category->name; ?>
|
443 |
+
</a>
|
444 |
+
</span>
|
445 |
+
<?php } else { ?>
|
446 |
+
<span class="event_catgeory_name">
|
447 |
+
<a href="<?php echo get_category_link($category); ?>">
|
448 |
+
<?php echo $category->name; ?>
|
449 |
+
</a>
|
450 |
+
</span>
|
451 |
+
<?php } ?>
|
452 |
+
</li>
|
453 |
+
<?php } ?>
|
454 |
+
</ul>
|
455 |
+
<?php }
|
456 |
+
|
457 |
+
if (!empty($event_tags)) { ?>
|
458 |
+
<ul class="event_tags">
|
459 |
+
<?php foreach ($event_tags as $tag) { ?>
|
460 |
+
<li class="event_tag">
|
461 |
+
<span class="event_tag_name">
|
462 |
+
<a href="<?php echo get_tag_link($tag); ?>">#<?php echo $tag->name; ?> </a>
|
463 |
+
</span>
|
464 |
+
</li>
|
465 |
+
<?php } ?>
|
466 |
+
</ul>
|
467 |
+
<?php } ?>
|
468 |
+
</div>
|
469 |
+
<?php } ?>
|
470 |
+
<!-- END Categories and tags -->
|
471 |
+
<?php
|
472 |
+
if (!isset($ecwd_options['related_events']) || $ecwd_options['related_events'] == 1) {
|
473 |
+
$post_cats = wp_get_post_terms($post_id, ECWD_PLUGIN_PREFIX . '_event_category');
|
474 |
+
$cat_ids = wp_list_pluck($post_cats, 'term_id');
|
475 |
+
$post_tags = wp_get_post_terms($post_id, ECWD_PLUGIN_PREFIX . '_event_tag');
|
476 |
+
$tag_ids = wp_list_pluck($post_tags, 'term_id');
|
477 |
+
$events = array();
|
478 |
+
$today = date('Y-m-d');
|
479 |
+
|
480 |
+
$args = array(
|
481 |
+
'numberposts' => -1,
|
482 |
+
'post_type' => ECWD_PLUGIN_PREFIX . '_event',
|
483 |
+
'tax_query' => array(
|
484 |
+
array(
|
485 |
+
'taxonomy' => ECWD_PLUGIN_PREFIX . '_event_category',
|
486 |
+
'terms' => $cat_ids,
|
487 |
+
'field' => 'term_id',
|
488 |
+
)
|
489 |
+
),
|
490 |
+
'orderby' => 'meta_value',
|
491 |
+
'order' => 'ASC'
|
492 |
+
);
|
493 |
+
$ecwd_events_by_cats = get_posts($args);
|
494 |
+
$args = array(
|
495 |
+
'numberposts' => -1,
|
496 |
+
'post_type' => ECWD_PLUGIN_PREFIX . '_event',
|
497 |
+
'tax_query' => array(
|
498 |
+
array(
|
499 |
+
'taxonomy' => ECWD_PLUGIN_PREFIX . '_event_tag',
|
500 |
+
'terms' => $tag_ids,
|
501 |
+
'field' => 'term_id',
|
502 |
+
),
|
503 |
+
),
|
504 |
+
'orderby' => 'meta_value',
|
505 |
+
'order' => 'ASC'
|
506 |
+
);
|
507 |
+
$ecwd_events_by_tags = get_posts($args);
|
508 |
+
$ecwd_events = array_merge($ecwd_events_by_tags, $ecwd_events_by_cats);
|
509 |
+
$ecwd_events = array_map("unserialize", array_unique(array_map("serialize", $ecwd_events)));
|
510 |
+
wp_reset_postdata();
|
511 |
+
wp_reset_query();
|
512 |
+
|
513 |
+
foreach ($ecwd_events as $ecwd_event) {
|
514 |
+
if ($ecwd_event->ID != $post_id) {
|
515 |
+
$term_metas = '';
|
516 |
+
$categories = get_the_terms($ecwd_event->ID, ECWD_PLUGIN_PREFIX . '_event_category');
|
517 |
+
if (is_array($categories)) {
|
518 |
+
foreach ($categories as $category) {
|
519 |
+
$term_metas = get_option("ecwd_event_category_$category->term_id");
|
520 |
+
$term_metas['id'] = $category->term_id;
|
521 |
+
$term_metas['name'] = $category->name;
|
522 |
+
$term_metas['slug'] = $category->slug;
|
523 |
+
}
|
524 |
+
}
|
525 |
+
$ecwd_event_metas = get_post_meta($ecwd_event->ID, '', true);
|
526 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'] = array(0 => '');
|
527 |
+
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'])) {
|
528 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'] = array(0 => '');
|
529 |
+
}
|
530 |
+
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'])) {
|
531 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'] = array(0 => '');
|
532 |
+
}
|
533 |
+
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'])) {
|
534 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'] = array(0 => '');
|
535 |
+
}
|
536 |
+
if (!isset($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'])) {
|
537 |
+
$ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'] = array(0 => '');
|
538 |
+
}
|
539 |
+
|
540 |
+
$permalink = get_permalink($ecwd_event->ID);
|
541 |
+
$events[$ecwd_event->ID] = new ECWD_Event($ecwd_event->ID, 0, $ecwd_event->post_title, $ecwd_event->post_content, $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'][0], $permalink, $ecwd_event, $term_metas, $ecwd_event_metas);
|
542 |
+
}
|
543 |
+
}
|
544 |
+
$d = new ECWD_Display(0, '', '', $today);
|
545 |
+
$start_date = date('Y-m-d');
|
546 |
+
$end_date = date('Y-m-d', strtotime("+1 year", strtotime($start_date)));
|
547 |
+
$events = $d->get_event_days($events, 1, $start_date, $end_date);
|
548 |
+
?>
|
549 |
+
|
550 |
+
<?php
|
551 |
+
$events = $d->events_unique($events);
|
552 |
+
do_action('ecwd_show_related_events', $events, true);
|
553 |
+
}
|
554 |
+
?>
|
555 |
+
</div>
|
556 |
+
<!-- #Related Events-->
|
557 |
+
</article>
|
558 |
+
</div> <!-- #post-x -->
|
559 |
+
<?php if (comments_open() && $post->comment_status == 'open') { ?>
|
560 |
+
<div class="ecwd-comments"><?php echo comments_template(); ?></div>
|
561 |
+
<?php } endwhile; ?>
|
562 |
</div>
|
563 |
+
<script id="ecwd_script_handler" type="text/javascript">
|
564 |
+
if (typeof ecwd_js_init_call == "object") {
|
565 |
+
ecwd_js_init_call = new ecwd_js_init();
|
566 |
+
}
|
567 |
+
</script>
|
568 |
<?php
|
569 |
+
if (isset($ecwd_options['enable_sidebar_in_event']) && $ecwd_options['enable_sidebar_in_event'] == '1') {
|
570 |
+
get_sidebar();
|
571 |
}
|
572 |
get_footer();
|
573 |
?>
|