My Calendar - Version 2.4.19

Version Description

  • IMPORTANT: SECURITY RELEASE
  • Security fix: XSS vulnerability: user who could create or edit an event could insert a XSS attack.
  • Security fix: Phishing vulnerability: user who could create or edit an event could insert an iFrame for phishing
  • Security fix: Possible to programmatically alter the event being edited to push edits into a different event.
  • Security fix: Possible to programmatically alter the author of the edited event.

Other changes in this release:

  • Screen-reader-text class was duplicated on mini calendar dates
  • New class: 'all-categories' on all categories link
  • New filter: filter All Categories text
  • New filter: filter Map URL & Map Label
  • Bug fix: when sequentially switching from Month to Week to Month & back to Week, Week would revert to first week of month.
  • Bug fix: Maintain current view when switching categories
Download this release

Release Info

Developer joedolson
Plugin Icon 128x128 My Calendar
Version 2.4.19
Comparing to
See all releases

Code changes from version 2.4.0 to 2.4.19

Files changed (53) hide show
  1. css/mc-print.css +4 -3
  2. css/mc-styles.css +47 -12
  3. css/reset.css +25 -0
  4. js/gmap3.min.js +8 -1925
  5. js/mc-list.js +7 -5
  6. js/pickadate/themes/default.date.css +2 -2
  7. lang/my-calendar-ca.mo +0 -0
  8. lang/my-calendar-cs_CZ.mo +0 -0
  9. lang/my-calendar-de_DE.mo +0 -0
  10. lang/my-calendar-es_ES.mo +0 -0
  11. lang/my-calendar-fi.mo +0 -0
  12. lang/my-calendar-fr_FR.mo +0 -0
  13. lang/my-calendar-it_IT.mo +0 -0
  14. lang/my-calendar-ja.mo +0 -0
  15. lang/my-calendar-pl_PL.mo +0 -0
  16. lang/my-calendar-pt_BR.mo +0 -0
  17. lang/my-calendar-pt_PT.mo +0 -0
  18. lang/my-calendar-ru_RU.mo +0 -0
  19. lang/my-calendar-sv_SE.mo +0 -0
  20. lang/my-calendar.pot +0 -4046
  21. my-calendar-api.php +52 -9
  22. my-calendar-behaviors.php +3 -2
  23. my-calendar-categories.php +23 -13
  24. my-calendar-core.php +203 -171
  25. my-calendar-event-manager.php +130 -91
  26. my-calendar-events.php +39 -6
  27. my-calendar-generator.php +1 -0
  28. my-calendar-group-manager.php +28 -25
  29. my-calendar-help.php +18 -11
  30. my-calendar-install.php +19 -47
  31. my-calendar-limits.php +23 -1
  32. my-calendar-locations.php +29 -5
  33. my-calendar-output.php +199 -135
  34. my-calendar-settings.php +27 -17
  35. my-calendar-shortcodes.php +3 -2
  36. my-calendar-styles.php +23 -18
  37. my-calendar-templates.php +55 -32
  38. my-calendar-templating.php +6 -6
  39. my-calendar-widgets.php +59 -33
  40. my-calendar.php +30 -46
  41. php-errors.log +0 -0
  42. readme.txt +191 -14
  43. styles/dark.css +8 -3
  44. styles/inherit.css +5 -0
  45. styles/light.css +8 -3
  46. styles/my-calendar.css +8 -3
  47. styles/refresh.css +8 -3
  48. templates/dark.css +8 -3
  49. templates/inherit.css +5 -0
  50. templates/light.css +8 -3
  51. templates/my-calendar.css +8 -3
  52. templates/refresh.css +8 -3
  53. uninstall.php +1 -0
css/mc-print.css CHANGED
@@ -1,6 +1,6 @@
1
  /* If copying this stylesheet, place in your theme directory in a /css subdirectory. /wp-content/yourtheme/css/mc-print.css */
2
 
3
- .my-calendar-header, h3 img, .mc-toggle, .mc_edit_links, #mc-export, .longdesc, .shortdesc, .mc-print, form {
4
  display: none;
5
  }
6
 
@@ -77,6 +77,7 @@ a {
77
  }
78
 
79
  .return {
80
- width: 910px;
81
- margin: 10px auto;
 
82
  }
1
  /* If copying this stylesheet, place in your theme directory in a /css subdirectory. /wp-content/yourtheme/css/mc-print.css */
2
 
3
+ .my-calendar-header, h3 img, .mc-toggle, .mc_edit_links, #mc-export, .longdesc, .shortdesc, .mc-print, form, .screen-reader-text {
4
  display: none;
5
  }
6
 
77
  }
78
 
79
  .return {
80
+ font-weight: 700;
81
+ font-size: 1.5em;
82
+ text-align: center;
83
  }
css/mc-styles.css CHANGED
@@ -7,7 +7,7 @@
7
  background: #fff;
8
  }
9
 
10
- .mcbuy, .mcsbuy {
11
  font-size: 1.1em;
12
  line-height: 1.5
13
  }
@@ -20,9 +20,10 @@
20
 
21
  .mc-button a {
22
  padding: 3px 8px;
23
- border: 1px solid;
24
- border-radius: 5px;
25
- background: #fff
 
26
  }
27
 
28
  .mcd {
@@ -58,10 +59,6 @@
58
  border: 1px solid #000
59
  }
60
 
61
- .jd-my-calendar .postbox h3 {
62
- cursor: text
63
- }
64
-
65
  .active-link {
66
  font-weight: 700;
67
  text-decoration: underline
@@ -73,6 +70,13 @@ ul.links li {
73
  font-size: .9em
74
  }
75
 
 
 
 
 
 
 
 
76
  #toggle {
77
  height: 2em
78
  }
@@ -82,6 +86,13 @@ ul.links li {
82
  margin-right: 5px
83
  }
84
 
 
 
 
 
 
 
 
85
  .jd-my-calendar .spam {
86
  background: #ffa
87
  }
@@ -202,10 +213,6 @@ ul.links li {
202
  width: 100%
203
  }
204
 
205
- .mc-clear {
206
- clear: both
207
- }
208
-
209
  .jd-my-calendar pre {
210
  background: #fff;
211
  padding: 5px;
@@ -311,6 +318,7 @@ strong.label {
311
  display: inline;
312
  margin: 0 auto;
313
  line-height: 1;
 
314
  }
315
 
316
  .mc-tabs .tabs a {
@@ -537,6 +545,11 @@ strong.label {
537
  float: right;
538
  }
539
 
 
 
 
 
 
540
  .sales {
541
  background: #e25822;
542
  color: #fff;
@@ -580,6 +593,28 @@ tr.problem .error {
580
  float: none;
581
  }
582
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
583
  @media (max-width: 1140px) {
584
  .mc-locations .locations-container input {
585
  max-width: 70%;
7
  background: #fff;
8
  }
9
 
10
+ .mcbuy {
11
  font-size: 1.1em;
12
  line-height: 1.5
13
  }
20
 
21
  .mc-button a {
22
  padding: 3px 8px;
23
+ border: 1px outset;
24
+ border-radius: 7px;
25
+ background: #fff;
26
+ font-weight: 700;
27
  }
28
 
29
  .mcd {
59
  border: 1px solid #000
60
  }
61
 
 
 
 
 
62
  .active-link {
63
  font-weight: 700;
64
  text-decoration: underline
70
  font-size: .9em
71
  }
72
 
73
+ .jd-my-calendar .metabox-holder .postbox > h2 {
74
+ font-size: 14px;
75
+ padding: 8px 12px;
76
+ margin: 0;
77
+ line-height: 1.4;
78
+ }
79
+
80
  #toggle {
81
  height: 2em
82
  }
86
  margin-right: 5px
87
  }
88
 
89
+ span.mc-notice {
90
+ padding: 3px;
91
+ background: #ffc;
92
+ font-weight: 700;
93
+ border: 1px solid #900;
94
+ }
95
+
96
  .jd-my-calendar .spam {
97
  background: #ffa
98
  }
213
  width: 100%
214
  }
215
 
 
 
 
 
216
  .jd-my-calendar pre {
217
  background: #fff;
218
  padding: 5px;
318
  display: inline;
319
  margin: 0 auto;
320
  line-height: 1;
321
+ float: none;
322
  }
323
 
324
  .mc-tabs .tabs a {
545
  float: right;
546
  }
547
 
548
+ .postbox.sell {
549
+ background: #fff;
550
+ color: #000;
551
+ }
552
+
553
  .sales {
554
  background: #e25822;
555
  color: #fff;
593
  float: none;
594
  }
595
 
596
+ .mc-support-me p {
597
+ font-size: 1.6em;
598
+ font-weight: 600;
599
+ background: #007eb3;
600
+ text-shadow: 1px 1px rgb( 35, 60, 127 );
601
+ padding: 1em;
602
+ text-align: center;
603
+ margin: 0 0 1em;
604
+ }
605
+
606
+ .mc-support-me p, .mc-support-me a {
607
+ color: #fff;
608
+ }
609
+
610
+ .mc-support-me a:hover, .mc-support-me a:focus {
611
+ text-decoration: none;
612
+ }
613
+
614
+ .jd-my-calendar .mc-none {
615
+ clear: both;
616
+ }
617
+
618
  @media (max-width: 1140px) {
619
  .mc-locations .locations-container input {
620
  max-width: 70%;
css/reset.css CHANGED
@@ -74,4 +74,29 @@ button.mc-toggle {
74
  background-color: transparent;
75
  }
76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  .mcjs .mc-main .details, .mcjs .mc-main .calendar-events { display: none; }
 
74
  background-color: transparent;
75
  }
76
 
77
+ button.mc-text-button {
78
+ border: 0;
79
+ color: inherit;
80
+ background-color: transparent;
81
+ text-decoration: none;
82
+ }
83
+
84
+ button.mc-text-button:hover, button .mc-text-button:focus {
85
+ text-decoration: underline;
86
+ background-color: transparent;
87
+ }
88
+
89
+ /**
90
+ * This is focus passed to a div for the purpose of navigation; visible focus not required.
91
+ */
92
+ .mc-main:focus {
93
+ outline: none;
94
+ }
95
+
96
+ /* Prevent missing background image on google maps */
97
+ .mc-gmap-fupup img {
98
+ max-width: none ! important;
99
+ }
100
+
101
  .mcjs .mc-main .details, .mcjs .mc-main .calendar-events { display: none; }
102
+ .mcjs .mc-main .single-event .details, .mcjs .mc-main .list.day .details { display: block; }
js/gmap3.min.js CHANGED
@@ -1,1930 +1,13 @@
1
  /*!
2
- * GMAP3 Plugin for JQuery
3
- * Version : 5.1.1
4
- * Date : 2013-05-25
5
- * Licence : GPL v3 : http://www.gnu.org/licenses/gpl.html
6
  * Author : DEMONTE Jean-Baptiste
7
  * Contact : jbdemonte@gmail.com
8
  * Web site : http://gmap3.net
 
 
 
 
9
  */
10
- (function (y, t) {
11
- var z, i = 0;
12
-
13
- function J() {
14
- if (!z) {
15
- z = {
16
- verbose: false,
17
- queryLimit: {attempt: 5, delay: 250, random: 250},
18
- classes: {
19
- Map: google.maps.Map,
20
- Marker: google.maps.Marker,
21
- InfoWindow: google.maps.InfoWindow,
22
- Circle: google.maps.Circle,
23
- Rectangle: google.maps.Rectangle,
24
- OverlayView: google.maps.OverlayView,
25
- StreetViewPanorama: google.maps.StreetViewPanorama,
26
- KmlLayer: google.maps.KmlLayer,
27
- TrafficLayer: google.maps.TrafficLayer,
28
- BicyclingLayer: google.maps.BicyclingLayer,
29
- GroundOverlay: google.maps.GroundOverlay,
30
- StyledMapType: google.maps.StyledMapType,
31
- ImageMapType: google.maps.ImageMapType
32
- },
33
- map: {mapTypeId: google.maps.MapTypeId.ROADMAP, center: [46.578498, 2.457275], zoom: 2},
34
- overlay: {pane: "floatPane", content: "", offset: {x: 0, y: 0}},
35
- geoloc: {getCurrentPosition: {maximumAge: 60000, timeout: 5000}}
36
- }
37
- }
38
- }
39
-
40
- function k(M, L) {
41
- return M !== t ? M : "gmap3_" + (L ? i + 1 : ++i)
42
- }
43
-
44
- function d(L) {
45
- var O = function (P) {
46
- return parseInt(P, 10)
47
- }, N = google.maps.version.split(".").map(O), M;
48
- L = L.split(".").map(O);
49
- for (M = 0; M < L.length; M++) {
50
- if (N.hasOwnProperty(M)) {
51
- if (N[M] < L[M]) {
52
- return false
53
- }
54
- } else {
55
- return false
56
- }
57
- }
58
- return true
59
- }
60
-
61
- function n(P, L, N, Q, O) {
62
- if (L.todo.events || L.todo.onces) {
63
- var M = {id: Q, data: L.todo.data, tag: L.todo.tag};
64
- if (L.todo.events) {
65
- y.each(L.todo.events, function (R, U) {
66
- var T = P, S = U;
67
- if (y.isArray(U)) {
68
- T = U[0];
69
- S = U[1]
70
- }
71
- google.maps.event.addListener(N, R, function (V) {
72
- S.apply(T, [O ? O : N, V, M])
73
- })
74
- })
75
- }
76
- if (L.todo.onces) {
77
- y.each(L.todo.onces, function (R, U) {
78
- var T = P, S = U;
79
- if (y.isArray(U)) {
80
- T = U[0];
81
- S = U[1]
82
- }
83
- google.maps.event.addListenerOnce(N, R, function (V) {
84
- S.apply(T, [O ? O : N, V, M])
85
- })
86
- })
87
- }
88
- }
89
- }
90
-
91
- function l() {
92
- var L = [];
93
- this.empty = function () {
94
- return !L.length
95
- };
96
- this.add = function (M) {
97
- L.push(M)
98
- };
99
- this.get = function () {
100
- return L.length ? L[0] : false
101
- };
102
- this.ack = function () {
103
- L.shift()
104
- }
105
- }
106
-
107
- function w(T, L, N) {
108
- var R = {}, P = this, Q, S = {
109
- latLng: {
110
- map: false,
111
- marker: false,
112
- infowindow: false,
113
- circle: false,
114
- overlay: false,
115
- getlatlng: false,
116
- getmaxzoom: false,
117
- getelevation: false,
118
- streetviewpanorama: false,
119
- getaddress: true
120
- }, geoloc: {getgeoloc: true}
121
- };
122
- if (typeof N === "string") {
123
- N = M(N)
124
- }
125
- function M(V) {
126
- var U = {};
127
- U[V] = {};
128
- return U
129
- }
130
-
131
- function O() {
132
- var U;
133
- for (U in N) {
134
- if (U in R) {
135
- continue
136
- }
137
- return U
138
- }
139
- }
140
-
141
- this.run = function () {
142
- var U, V;
143
- while (U = O()) {
144
- if (typeof T[U] === "function") {
145
- Q = U;
146
- V = y.extend(true, {}, z[U] || {}, N[U].options || {});
147
- if (U in S.latLng) {
148
- if (N[U].values) {
149
- x(N[U].values, T, T[U], {todo: N[U], opts: V, session: R})
150
- } else {
151
- v(T, T[U], S.latLng[U], {todo: N[U], opts: V, session: R})
152
- }
153
- } else {
154
- if (U in S.geoloc) {
155
- o(T, T[U], {todo: N[U], opts: V, session: R})
156
- } else {
157
- T[U].apply(T, [{todo: N[U], opts: V, session: R}])
158
- }
159
- }
160
- return
161
- } else {
162
- R[U] = null
163
- }
164
- }
165
- L.apply(T, [N, R])
166
- };
167
- this.ack = function (U) {
168
- R[Q] = U;
169
- P.run.apply(P, [])
170
- }
171
- }
172
-
173
- function c(N) {
174
- var L, M = [];
175
- for (L in N) {
176
- M.push(L)
177
- }
178
- return M
179
- }
180
-
181
- function b(N, Q) {
182
- var L = {};
183
- if (N.todo) {
184
- for (var M in N.todo) {
185
- if ((M !== "options") && (M !== "values")) {
186
- L[M] = N.todo[M]
187
- }
188
- }
189
- }
190
- var O, P = ["data", "tag", "id", "events", "onces"];
191
- for (O = 0; O < P.length; O++) {
192
- A(L, P[O], Q, N.todo)
193
- }
194
- L.options = y.extend({}, N.opts || {}, Q.options || {});
195
- return L
196
- }
197
-
198
- function A(N, M) {
199
- for (var L = 2; L < arguments.length; L++) {
200
- if (M in arguments[L]) {
201
- N[M] = arguments[L][M];
202
- return
203
- }
204
- }
205
- }
206
-
207
- function r() {
208
- var L = [];
209
- this.get = function (S) {
210
- if (L.length) {
211
- var P, O, N, R, M, Q = c(S);
212
- for (P = 0; P < L.length; P++) {
213
- R = L[P];
214
- M = Q.length == R.keys.length;
215
- for (O = 0; (O < Q.length) && M; O++) {
216
- N = Q[O];
217
- M = N in R.request;
218
- if (M) {
219
- if ((typeof S[N] === "object") && ("equals" in S[N]) && (typeof S[N] === "function")) {
220
- M = S[N].equals(R.request[N])
221
- } else {
222
- M = S[N] === R.request[N]
223
- }
224
- }
225
- }
226
- if (M) {
227
- return R.results
228
- }
229
- }
230
- }
231
- };
232
- this.store = function (N, M) {
233
- L.push({request: N, keys: c(N), results: M})
234
- }
235
- }
236
-
237
- function e(Q, P, O, L) {
238
- var N = this, M = [];
239
- z.classes.OverlayView.call(this);
240
- this.setMap(Q);
241
- this.onAdd = function () {
242
- var R = this.getPanes();
243
- if (P.pane in R) {
244
- y(R[P.pane]).append(L)
245
- }
246
- y.each("dblclick click mouseover mousemove mouseout mouseup mousedown".split(" "), function (T, S) {
247
- M.push(google.maps.event.addDomListener(L[0], S, function (U) {
248
- y.Event(U).stopPropagation();
249
- google.maps.event.trigger(N, S, [U]);
250
- N.draw()
251
- }))
252
- });
253
- M.push(google.maps.event.addDomListener(L[0], "contextmenu", function (S) {
254
- y.Event(S).stopPropagation();
255
- google.maps.event.trigger(N, "rightclick", [S]);
256
- N.draw()
257
- }))
258
- };
259
- this.getPosition = function () {
260
- return O
261
- };
262
- this.draw = function () {
263
- var R = this.getProjection().fromLatLngToDivPixel(O);
264
- L.css("left", (R.x + P.offset.x) + "px").css("top", (R.y + P.offset.y) + "px")
265
- };
266
- this.onRemove = function () {
267
- for (var R = 0; R < M.length; R++) {
268
- google.maps.event.removeListener(M[R])
269
- }
270
- L.remove()
271
- };
272
- this.hide = function () {
273
- L.hide()
274
- };
275
- this.show = function () {
276
- L.show()
277
- };
278
- this.toggle = function () {
279
- if (L) {
280
- if (L.is(":visible")) {
281
- this.show()
282
- } else {
283
- this.hide()
284
- }
285
- }
286
- };
287
- this.toggleDOM = function () {
288
- if (this.getMap()) {
289
- this.setMap(null)
290
- } else {
291
- this.setMap(Q)
292
- }
293
- };
294
- this.getDOMElement = function () {
295
- return L[0]
296
- }
297
- }
298
-
299
- function f(O, L) {
300
- function M() {
301
- this.onAdd = function () {
302
- };
303
- this.onRemove = function () {
304
- };
305
- this.draw = function () {
306
- };
307
- return z.classes.OverlayView.apply(this, [])
308
- }
309
-
310
- M.prototype = z.classes.OverlayView.prototype;
311
- var N = new M();
312
- N.setMap(O);
313
- return N
314
- }
315
-
316
- function F(ae, ao, aa) {
317
- var an = false, ai = false, af = false, Z = false, W = true, V = this, N = [], T = {}, ad = {}, U = {}, aj = [], ah = [], O = [], ak = f(ao, aa.radius), Y, ap, am, P, Q;
318
- S();
319
- function L(aq) {
320
- if (!aj[aq]) {
321
- delete ah[aq].options.map;
322
- aj[aq] = new z.classes.Marker(ah[aq].options);
323
- n(ae, {todo: ah[aq]}, aj[aq], ah[aq].id)
324
- }
325
- }
326
-
327
- this.getById = function (aq) {
328
- if (aq in ad) {
329
- L(ad[aq]);
330
- return aj[ad[aq]]
331
- }
332
- return false
333
- };
334
- this.rm = function (ar) {
335
- var aq = ad[ar];
336
- if (aj[aq]) {
337
- aj[aq].setMap(null)
338
- }
339
- delete aj[aq];
340
- aj[aq] = false;
341
- delete ah[aq];
342
- ah[aq] = false;
343
- delete O[aq];
344
- O[aq] = false;
345
- delete ad[ar];
346
- delete U[aq];
347
- ai = true
348
- };
349
- this.clearById = function (aq) {
350
- if (aq in ad) {
351
- this.rm(aq);
352
- return true
353
- }
354
- };
355
- this.clear = function (az, av, aA) {
356
- var ar, ay, at, aw, au, ax = [], aq = C(aA);
357
- if (az) {
358
- ar = ah.length - 1;
359
- ay = -1;
360
- at = -1
361
- } else {
362
- ar = 0;
363
- ay = ah.length;
364
- at = 1
365
- }
366
- for (aw = ar; aw != ay; aw += at) {
367
- if (ah[aw]) {
368
- if (!aq || aq(ah[aw].tag)) {
369
- ax.push(U[aw]);
370
- if (av || az) {
371
- break
372
- }
373
- }
374
- }
375
- }
376
- for (au = 0; au < ax.length; au++) {
377
- this.rm(ax[au])
378
- }
379
- };
380
- this.add = function (aq, ar) {
381
- aq.id = k(aq.id);
382
- this.clearById(aq.id);
383
- ad[aq.id] = aj.length;
384
- U[aj.length] = aq.id;
385
- aj.push(null);
386
- ah.push(aq);
387
- O.push(ar);
388
- ai = true
389
- };
390
- this.addMarker = function (ar, aq) {
391
- aq = aq || {};
392
- aq.id = k(aq.id);
393
- this.clearById(aq.id);
394
- if (!aq.options) {
395
- aq.options = {}
396
- }
397
- aq.options.position = ar.getPosition();
398
- n(ae, {todo: aq}, ar, aq.id);
399
- ad[aq.id] = aj.length;
400
- U[aj.length] = aq.id;
401
- aj.push(ar);
402
- ah.push(aq);
403
- O.push(aq.data || {});
404
- ai = true
405
- };
406
- this.todo = function (aq) {
407
- return ah[aq]
408
- };
409
- this.value = function (aq) {
410
- return O[aq]
411
- };
412
- this.marker = function (aq) {
413
- if (aq in aj) {
414
- L(aq);
415
- return aj[aq]
416
- }
417
- return false
418
- };
419
- this.markerIsSet = function (aq) {
420
- return Boolean(aj[aq])
421
- };
422
- this.setMarker = function (ar, aq) {
423
- aj[ar] = aq
424
- };
425
- this.store = function (aq, ar, at) {
426
- T[aq.ref] = {obj: ar, shadow: at}
427
- };
428
- this.free = function () {
429
- for (var aq = 0; aq < N.length; aq++) {
430
- google.maps.event.removeListener(N[aq])
431
- }
432
- N = [];
433
- y.each(T, function (ar) {
434
- ac(ar)
435
- });
436
- T = {};
437
- y.each(ah, function (ar) {
438
- ah[ar] = null
439
- });
440
- ah = [];
441
- y.each(aj, function (ar) {
442
- if (aj[ar]) {
443
- aj[ar].setMap(null);
444
- delete aj[ar]
445
- }
446
- });
447
- aj = [];
448
- y.each(O, function (ar) {
449
- delete O[ar]
450
- });
451
- O = [];
452
- ad = {};
453
- U = {}
454
- };
455
- this.filter = function (aq) {
456
- am = aq;
457
- ag()
458
- };
459
- this.enable = function (aq) {
460
- if (W != aq) {
461
- W = aq;
462
- ag()
463
- }
464
- };
465
- this.display = function (aq) {
466
- P = aq
467
- };
468
- this.error = function (aq) {
469
- Q = aq
470
- };
471
- this.beginUpdate = function () {
472
- an = true
473
- };
474
- this.endUpdate = function () {
475
- an = false;
476
- if (ai) {
477
- ag()
478
- }
479
- };
480
- this.autofit = function (ar) {
481
- for (var aq = 0; aq < ah.length; aq++) {
482
- if (ah[aq]) {
483
- ar.extend(ah[aq].options.position)
484
- }
485
- }
486
- };
487
- function S() {
488
- ap = ak.getProjection();
489
- if (!ap) {
490
- setTimeout(function () {
491
- S.apply(V, [])
492
- }, 25);
493
- return
494
- }
495
- Z = true;
496
- N.push(google.maps.event.addListener(ao, "zoom_changed", function () {
497
- al()
498
- }));
499
- N.push(google.maps.event.addListener(ao, "bounds_changed", function () {
500
- al()
501
- }));
502
- ag()
503
- }
504
-
505
- function ac(aq) {
506
- if (typeof T[aq] === "object") {
507
- if (typeof(T[aq].obj.setMap) === "function") {
508
- T[aq].obj.setMap(null)
509
- }
510
- if (typeof(T[aq].obj.remove) === "function") {
511
- T[aq].obj.remove()
512
- }
513
- if (typeof(T[aq].shadow.remove) === "function") {
514
- T[aq].obj.remove()
515
- }
516
- if (typeof(T[aq].shadow.setMap) === "function") {
517
- T[aq].shadow.setMap(null)
518
- }
519
- delete T[aq].obj;
520
- delete T[aq].shadow
521
- } else {
522
- if (aj[aq]) {
523
- aj[aq].setMap(null)
524
- }
525
- }
526
- delete T[aq]
527
- }
528
-
529
- function M() {
530
- var ay, ax, aw, au, av, at, ar, aq;
531
- if (arguments[0] instanceof google.maps.LatLng) {
532
- ay = arguments[0].lat();
533
- aw = arguments[0].lng();
534
- if (arguments[1] instanceof google.maps.LatLng) {
535
- ax = arguments[1].lat();
536
- au = arguments[1].lng()
537
- } else {
538
- ax = arguments[1];
539
- au = arguments[2]
540
- }
541
- } else {
542
- ay = arguments[0];
543
- aw = arguments[1];
544
- if (arguments[2] instanceof google.maps.LatLng) {
545
- ax = arguments[2].lat();
546
- au = arguments[2].lng()
547
- } else {
548
- ax = arguments[2];
549
- au = arguments[3]
550
- }
551
- }
552
- av = Math.PI * ay / 180;
553
- at = Math.PI * aw / 180;
554
- ar = Math.PI * ax / 180;
555
- aq = Math.PI * au / 180;
556
- return 1000 * 6371 * Math.acos(Math.min(Math.cos(av) * Math.cos(ar) * Math.cos(at) * Math.cos(aq) + Math.cos(av) * Math.sin(at) * Math.cos(ar) * Math.sin(aq) + Math.sin(av) * Math.sin(ar), 1))
557
- }
558
-
559
- function R() {
560
- var aq = M(ao.getCenter(), ao.getBounds().getNorthEast()), ar = new google.maps.Circle({
561
- center: ao.getCenter(),
562
- radius: 1.25 * aq
563
- });
564
- return ar.getBounds()
565
- }
566
-
567
- function X() {
568
- var ar = {}, aq;
569
- for (aq in T) {
570
- ar[aq] = true
571
- }
572
- return ar
573
- }
574
-
575
- function al() {
576
- clearTimeout(Y);
577
- Y = setTimeout(function () {
578
- ag()
579
- }, 25)
580
- }
581
-
582
- function ab(ar) {
583
- var au = ap.fromLatLngToDivPixel(ar), at = ap.fromDivPixelToLatLng(new google.maps.Point(au.x + aa.radius, au.y - aa.radius)), aq = ap.fromDivPixelToLatLng(new google.maps.Point(au.x - aa.radius, au.y + aa.radius));
584
- return new google.maps.LatLngBounds(aq, at)
585
- }
586
-
587
- function ag() {
588
- if (an || af || !Z) {
589
- return
590
- }
591
- var aE = [], aG = {}, aF = ao.getZoom(), aH = ("maxZoom" in aa) && (aF > aa.maxZoom), aw = X(), av, au, at, aA, ar = false, aq, aD, ay, az, aB, aC, ax;
592
- ai = false;
593
- if (aF > 3) {
594
- aq = R();
595
- ar = aq.getSouthWest().lng() < aq.getNorthEast().lng()
596
- }
597
- for (av = 0; av < ah.length; av++) {
598
- if (ah[av] && (!ar || aq.contains(ah[av].options.position)) && (!am || am(O[av]))) {
599
- aE.push(av)
600
- }
601
- }
602
- while (1) {
603
- av = 0;
604
- while (aG[av] && (av < aE.length)) {
605
- av++
606
- }
607
- if (av == aE.length) {
608
- break
609
- }
610
- aA = [];
611
- if (W && !aH) {
612
- ax = 10;
613
- do {
614
- az = aA;
615
- aA = [];
616
- ax--;
617
- if (az.length) {
618
- ay = aq.getCenter()
619
- } else {
620
- ay = ah[aE[av]].options.position
621
- }
622
- aq = ab(ay);
623
- for (au = av; au < aE.length; au++) {
624
- if (aG[au]) {
625
- continue
626
- }
627
- if (aq.contains(ah[aE[au]].options.position)) {
628
- aA.push(au)
629
- }
630
- }
631
- } while ((az.length < aA.length) && (aA.length > 1) && ax)
632
- } else {
633
- for (au = av; au < aE.length; au++) {
634
- if (aG[au]) {
635
- continue
636
- }
637
- aA.push(au);
638
- break
639
- }
640
- }
641
- aD = {indexes: [], ref: []};
642
- aB = aC = 0;
643
- for (at = 0; at < aA.length; at++) {
644
- aG[aA[at]] = true;
645
- aD.indexes.push(aE[aA[at]]);
646
- aD.ref.push(aE[aA[at]]);
647
- aB += ah[aE[aA[at]]].options.position.lat();
648
- aC += ah[aE[aA[at]]].options.position.lng()
649
- }
650
- aB /= aA.length;
651
- aC /= aA.length;
652
- aD.latLng = new google.maps.LatLng(aB, aC);
653
- aD.ref = aD.ref.join("-");
654
- if (aD.ref in aw) {
655
- delete aw[aD.ref]
656
- } else {
657
- if (aA.length === 1) {
658
- T[aD.ref] = true
659
- }
660
- P(aD)
661
- }
662
- }
663
- y.each(aw, function (aI) {
664
- ac(aI)
665
- });
666
- af = false
667
- }
668
- }
669
-
670
- function a(M, L) {
671
- this.id = function () {
672
- return M
673
- };
674
- this.filter = function (N) {
675
- L.filter(N)
676
- };
677
- this.enable = function () {
678
- L.enable(true)
679
- };
680
- this.disable = function () {
681
- L.enable(false)
682
- };
683
- this.add = function (O, N, P) {
684
- if (!P) {
685
- L.beginUpdate()
686
- }
687
- L.addMarker(O, N);
688
- if (!P) {
689
- L.endUpdate()
690
- }
691
- };
692
- this.getById = function (N) {
693
- return L.getById(N)
694
- };
695
- this.clearById = function (P, O) {
696
- var N;
697
- if (!O) {
698
- L.beginUpdate()
699
- }
700
- N = L.clearById(P);
701
- if (!O) {
702
- L.endUpdate()
703
- }
704
- return N
705
- };
706
- this.clear = function (P, Q, N, O) {
707
- if (!O) {
708
- L.beginUpdate()
709
- }
710
- L.clear(P, Q, N);
711
- if (!O) {
712
- L.endUpdate()
713
- }
714
- }
715
- }
716
-
717
- function D() {
718
- var M = {}, N = {};
719
-
720
- function L(P) {
721
- return {id: P.id, name: P.name, object: P.obj, tag: P.tag, data: P.data}
722
- }
723
-
724
- this.add = function (R, Q, T, S) {
725
- var P = R.todo || {}, U = k(P.id);
726
- if (!M[Q]) {
727
- M[Q] = []
728
- }
729
- if (U in N) {
730
- this.clearById(U)
731
- }
732
- N[U] = {obj: T, sub: S, name: Q, id: U, tag: P.tag, data: P.data};
733
- M[Q].push(U);
734
- return U
735
- };
736
- this.getById = function (R, Q, P) {
737
- if (R in N) {
738
- if (Q) {
739
- return N[R].sub
740
- } else {
741
- if (P) {
742
- return L(N[R])
743
- }
744
- }
745
- return N[R].obj
746
- }
747
- return false
748
- };
749
- this.get = function (R, T, P, S) {
750
- var V, U, Q = C(P);
751
- if (!M[R] || !M[R].length) {
752
- return null
753
- }
754
- V = M[R].length;
755
- while (V) {
756
- V--;
757
- U = M[R][T ? V : M[R].length - V - 1];
758
- if (U && N[U]) {
759
- if (Q && !Q(N[U].tag)) {
760
- continue
761
- }
762
- return S ? L(N[U]) : N[U].obj
763
- }
764
- }
765
- return null
766
- };
767
- this.all = function (S, Q, T) {
768
- var P = [], R = C(Q), U = function (X) {
769
- var V, W;
770
- for (V = 0; V < M[X].length; V++) {
771
- W = M[X][V];
772
- if (W && N[W]) {
773
- if (R && !R(N[W].tag)) {
774
- continue
775
- }
776
- P.push(T ? L(N[W]) : N[W].obj)
777
- }
778
- }
779
- };
780
- if (S in M) {
781
- U(S)
782
- } else {
783
- if (S === t) {
784
- for (S in M) {
785
- U(S)
786
- }
787
- }
788
- }
789
- return P
790
- };
791
- function O(P) {
792
- if (typeof(P.setMap) === "function") {
793
- P.setMap(null)
794
- }
795
- if (typeof(P.remove) === "function") {
796
- P.remove()
797
- }
798
- if (typeof(P.free) === "function") {
799
- P.free()
800
- }
801
- P = null
802
- }
803
-
804
- this.rm = function (S, Q, R) {
805
- var P, T;
806
- if (!M[S]) {
807
- return false
808
- }
809
- if (Q) {
810
- if (R) {
811
- for (P = M[S].length - 1; P >= 0; P--) {
812
- T = M[S][P];
813
- if (Q(N[T].tag)) {
814
- break
815
- }
816
- }
817
- } else {
818
- for (P = 0; P < M[S].length; P++) {
819
- T = M[S][P];
820
- if (Q(N[T].tag)) {
821
- break
822
- }
823
- }
824
- }
825
- } else {
826
- P = R ? M[S].length - 1 : 0
827
- }
828
- if (!(P in M[S])) {
829
- return false
830
- }
831
- return this.clearById(M[S][P], P)
832
- };
833
- this.clearById = function (S, P) {
834
- if (S in N) {
835
- var R, Q = N[S].name;
836
- for (R = 0; P === t && R < M[Q].length; R++) {
837
- if (S === M[Q][R]) {
838
- P = R
839
- }
840
- }
841
- O(N[S].obj);
842
- if (N[S].sub) {
843
- O(N[S].sub)
844
- }
845
- delete N[S];
846
- M[Q].splice(P, 1);
847
- return true
848
- }
849
- return false
850
- };
851
- this.objGetById = function (R) {
852
- var Q;
853
- if (M.clusterer) {
854
- for (var P in M.clusterer) {
855
- if ((Q = N[M.clusterer[P]].obj.getById(R)) !== false) {
856
- return Q
857
- }
858
- }
859
- }
860
- return false
861
- };
862
- this.objClearById = function (Q) {
863
- if (M.clusterer) {
864
- for (var P in M.clusterer) {
865
- if (N[M.clusterer[P]].obj.clearById(Q)) {
866
- return true
867
- }
868
- }
869
- }
870
- return null
871
- };
872
- this.clear = function (V, U, W, P) {
873
- var R, T, S, Q = C(P);
874
- if (!V || !V.length) {
875
- V = [];
876
- for (R in M) {
877
- V.push(R)
878
- }
879
- } else {
880
- V = g(V)
881
- }
882
- for (T = 0; T < V.length; T++) {
883
- S = V[T];
884
- if (U) {
885
- this.rm(S, Q, true)
886
- } else {
887
- if (W) {
888
- this.rm(S, Q, false)
889
- } else {
890
- while (this.rm(S, Q, false)) {
891
- }
892
- }
893
- }
894
- }
895
- };
896
- this.objClear = function (S, R, T, Q) {
897
- if (M.clusterer && (y.inArray("marker", S) >= 0 || !S.length)) {
898
- for (var P in M.clusterer) {
899
- N[M.clusterer[P]].obj.clear(R, T, Q)
900
- }
901
- }
902
- }
903
- }
904
-
905
- var m = {}, H = new r();
906
-
907
- function p() {
908
- if (!m.geocoder) {
909
- m.geocoder = new google.maps.Geocoder()
910
- }
911
- return m.geocoder
912
- }
913
-
914
- function G() {
915
- if (!m.directionsService) {
916
- m.directionsService = new google.maps.DirectionsService()
917
- }
918
- return m.directionsService
919
- }
920
-
921
- function h() {
922
- if (!m.elevationService) {
923
- m.elevationService = new google.maps.ElevationService()
924
- }
925
- return m.elevationService
926
- }
927
-
928
- function q() {
929
- if (!m.maxZoomService) {
930
- m.maxZoomService = new google.maps.MaxZoomService()
931
- }
932
- return m.maxZoomService
933
- }
934
-
935
- function B() {
936
- if (!m.distanceMatrixService) {
937
- m.distanceMatrixService = new google.maps.DistanceMatrixService()
938
- }
939
- return m.distanceMatrixService
940
- }
941
-
942
- function u() {
943
- if (z.verbose) {
944
- var L, M = [];
945
- if (window.console && (typeof console.error === "function")) {
946
- for (L = 0; L < arguments.length; L++) {
947
- M.push(arguments[L])
948
- }
949
- console.error.apply(console, M)
950
- } else {
951
- M = "";
952
- for (L = 0; L < arguments.length; L++) {
953
- M += arguments[L].toString() + " "
954
- }
955
- alert(M)
956
- }
957
- }
958
- }
959
-
960
- function E(L) {
961
- return (typeof(L) === "number" || typeof(L) === "string") && L !== "" && !isNaN(L)
962
- }
963
-
964
- function g(N) {
965
- var M, L = [];
966
- if (N !== t) {
967
- if (typeof(N) === "object") {
968
- if (typeof(N.length) === "number") {
969
- L = N
970
- } else {
971
- for (M in N) {
972
- L.push(N[M])
973
- }
974
- }
975
- } else {
976
- L.push(N)
977
- }
978
- }
979
- return L
980
- }
981
-
982
- function C(L) {
983
- if (L) {
984
- if (typeof L === "function") {
985
- return L
986
- }
987
- L = g(L);
988
- return function (N) {
989
- if (N === t) {
990
- return false
991
- }
992
- if (typeof N === "object") {
993
- for (var M = 0; M < N.length; M++) {
994
- if (y.inArray(N[M], L) >= 0) {
995
- return true
996
- }
997
- }
998
- return false
999
- }
1000
- return y.inArray(N, L) >= 0
1001
- }
1002
- }
1003
- }
1004
-
1005
- function I(M, O, L) {
1006
- var N = O ? M : null;
1007
- if (!M || (typeof M === "string")) {
1008
- return N
1009
- }
1010
- if (M.latLng) {
1011
- return I(M.latLng)
1012
- }
1013
- if (M instanceof google.maps.LatLng) {
1014
- return M
1015
- } else {
1016
- if (E(M.lat)) {
1017
- return new google.maps.LatLng(M.lat, M.lng)
1018
- } else {
1019
- if (!L && y.isArray(M)) {
1020
- if (!E(M[0]) || !E(M[1])) {
1021
- return N
1022
- }
1023
- return new google.maps.LatLng(M[0], M[1])
1024
- }
1025
- }
1026
- }
1027
- return N
1028
- }
1029
-
1030
- function j(M) {
1031
- var N, L;
1032
- if (!M || M instanceof google.maps.LatLngBounds) {
1033
- return M || null
1034
- }
1035
- if (y.isArray(M)) {
1036
- if (M.length == 2) {
1037
- N = I(M[0]);
1038
- L = I(M[1])
1039
- } else {
1040
- if (M.length == 4) {
1041
- N = I([M[0], M[1]]);
1042
- L = I([M[2], M[3]])
1043
- }
1044
- }
1045
- } else {
1046
- if (("ne" in M) && ("sw" in M)) {
1047
- N = I(M.ne);
1048
- L = I(M.sw)
1049
- } else {
1050
- if (("n" in M) && ("e" in M) && ("s" in M) && ("w" in M)) {
1051
- N = I([M.n, M.e]);
1052
- L = I([M.s, M.w])
1053
- }
1054
- }
1055
- }
1056
- if (N && L) {
1057
- return new google.maps.LatLngBounds(L, N)
1058
- }
1059
- return null
1060
- }
1061
-
1062
- function v(T, L, O, S, P) {
1063
- var N = O ? I(S.todo, false, true) : false, R = N ? {latLng: N} : (S.todo.address ? (typeof(S.todo.address) === "string" ? {address: S.todo.address} : S.todo.address) : false), M = R ? H.get(R) : false, Q = this;
1064
- if (R) {
1065
- P = P || 0;
1066
- if (M) {
1067
- S.latLng = M.results[0].geometry.location;
1068
- S.results = M.results;
1069
- S.status = M.status;
1070
- L.apply(T, [S])
1071
- } else {
1072
- if (R.location) {
1073
- R.location = I(R.location)
1074
- }
1075
- if (R.bounds) {
1076
- R.bounds = j(R.bounds)
1077
- }
1078
- p().geocode(R, function (V, U) {
1079
- if (U === google.maps.GeocoderStatus.OK) {
1080
- H.store(R, {results: V, status: U});
1081
- S.latLng = V[0].geometry.location;
1082
- S.results = V;
1083
- S.status = U;
1084
- L.apply(T, [S])
1085
- } else {
1086
- if ((U === google.maps.GeocoderStatus.OVER_QUERY_LIMIT) && (P < z.queryLimit.attempt)) {
1087
- setTimeout(function () {
1088
- v.apply(Q, [T, L, O, S, P + 1])
1089
- }, z.queryLimit.delay + Math.floor(Math.random() * z.queryLimit.random))
1090
- } else {
1091
- u("geocode failed", U, R);
1092
- S.latLng = S.results = false;
1093
- S.status = U;
1094
- L.apply(T, [S])
1095
- }
1096
- }
1097
- })
1098
- }
1099
- } else {
1100
- S.latLng = I(S.todo, false, true);
1101
- L.apply(T, [S])
1102
- }
1103
- }
1104
-
1105
- function x(Q, L, R, M) {
1106
- var O = this, N = -1;
1107
-
1108
- function P() {
1109
- do {
1110
- N++
1111
- } while ((N < Q.length) && !("address" in Q[N]));
1112
- if (N >= Q.length) {
1113
- R.apply(L, [M]);
1114
- return
1115
- }
1116
- v(O, function (S) {
1117
- delete S.todo;
1118
- y.extend(Q[N], S);
1119
- P.apply(O, [])
1120
- }, true, {todo: Q[N]})
1121
- }
1122
-
1123
- P()
1124
- }
1125
-
1126
- function o(L, O, M) {
1127
- var N = false;
1128
- if (navigator && navigator.geolocation) {
1129
- navigator.geolocation.getCurrentPosition(function (P) {
1130
- if (N) {
1131
- return
1132
- }
1133
- N = true;
1134
- M.latLng = new google.maps.LatLng(P.coords.latitude, P.coords.longitude);
1135
- O.apply(L, [M])
1136
- }, function () {
1137
- if (N) {
1138
- return
1139
- }
1140
- N = true;
1141
- M.latLng = false;
1142
- O.apply(L, [M])
1143
- }, M.opts.getCurrentPosition)
1144
- } else {
1145
- M.latLng = false;
1146
- O.apply(L, [M])
1147
- }
1148
- }
1149
-
1150
- function K(T) {
1151
- var S = this, U = new l(), V = new D(), N = null, P;
1152
- this._plan = function (Z) {
1153
- for (var Y = 0; Y < Z.length; Y++) {
1154
- U.add(new w(S, R, Z[Y]))
1155
- }
1156
- Q()
1157
- };
1158
- function Q() {
1159
- if (!P && (P = U.get())) {
1160
- P.run()
1161
- }
1162
- }
1163
-
1164
- function R() {
1165
- P = null;
1166
- U.ack();
1167
- Q.call(S)
1168
- }
1169
-
1170
- function X(Y) {
1171
- if (Y.todo.callback) {
1172
- var Z = Array.prototype.slice.call(arguments, 1);
1173
- if (typeof Y.todo.callback === "function") {
1174
- Y.todo.callback.apply(T, Z)
1175
- } else {
1176
- if (y.isArray(Y.todo.callback)) {
1177
- if (typeof Y.todo.callback[1] === "function") {
1178
- Y.todo.callback[1].apply(Y.todo.callback[0], Z)
1179
- }
1180
- }
1181
- }
1182
- }
1183
- }
1184
-
1185
- function O(Y, Z, aa) {
1186
- if (aa) {
1187
- n(T, Y, Z, aa)
1188
- }
1189
- X(Y, Z);
1190
- P.ack(Z)
1191
- }
1192
-
1193
- function L(aa, Y) {
1194
- Y = Y || {};
1195
- if (N) {
1196
- if (Y.todo && Y.todo.options) {
1197
- if (Y.todo.options.center) {
1198
- Y.todo.options.center = I(Y.todo.options.center)
1199
- }
1200
- N.setOptions(Y.todo.options)
1201
- }
1202
- } else {
1203
- var Z = Y.opts || y.extend(true, {}, z.map, Y.todo && Y.todo.options ? Y.todo.options : {});
1204
- Z.center = aa || I(Z.center);
1205
- N = new z.classes.Map(T.get(0), Z)
1206
- }
1207
- }
1208
-
1209
- this.map = function (Y) {
1210
- L(Y.latLng, Y);
1211
- n(T, Y, N);
1212
- O(Y, N)
1213
- };
1214
- this.destroy = function (Y) {
1215
- V.clear();
1216
- T.empty();
1217
- if (N) {
1218
- N = null
1219
- }
1220
- O(Y, true)
1221
- };
1222
- this.infowindow = function (Z) {
1223
- var aa = [], Y = "values" in Z.todo;
1224
- if (!Y) {
1225
- if (Z.latLng) {
1226
- Z.opts.position = Z.latLng
1227
- }
1228
- Z.todo.values = [{options: Z.opts}]
1229
- }
1230
- y.each(Z.todo.values, function (ac, ad) {
1231
- var af, ae, ab = b(Z, ad);
1232
- ab.options.position = ab.options.position ? I(ab.options.position) : I(ad.latLng);
1233
- if (!N) {
1234
- L(ab.options.position)
1235
- }
1236
- ae = new z.classes.InfoWindow(ab.options);
1237
- if (ae && ((ab.open === t) || ab.open)) {
1238
- if (Y) {
1239
- ae.open(N, ab.anchor ? ab.anchor : t)
1240
- } else {
1241
- ae.open(N, ab.anchor ? ab.anchor : (Z.latLng ? t : (Z.session.marker ? Z.session.marker : t)))
1242
- }
1243
- }
1244
- aa.push(ae);
1245
- af = V.add({todo: ab}, "infowindow", ae);
1246
- n(T, {todo: ab}, ae, af)
1247
- });
1248
- O(Z, Y ? aa : aa[0])
1249
- };
1250
- this.circle = function (Z) {
1251
- var aa = [], Y = "values" in Z.todo;
1252
- if (!Y) {
1253
- Z.opts.center = Z.latLng || I(Z.opts.center);
1254
- Z.todo.values = [{options: Z.opts}]
1255
- }
1256
- if (!Z.todo.values.length) {
1257
- O(Z, false);
1258
- return
1259
- }
1260
- y.each(Z.todo.values, function (ac, ad) {
1261
- var af, ae, ab = b(Z, ad);
1262
- ab.options.center = ab.options.center ? I(ab.options.center) : I(ad);
1263
- if (!N) {
1264
- L(ab.options.center)
1265
- }
1266
- ab.options.map = N;
1267
- ae = new z.classes.Circle(ab.options);
1268
- aa.push(ae);
1269
- af = V.add({todo: ab}, "circle", ae);
1270
- n(T, {todo: ab}, ae, af)
1271
- });
1272
- O(Z, Y ? aa : aa[0])
1273
- };
1274
- this.overlay = function (aa, Z) {
1275
- var ab = [], Y = "values" in aa.todo;
1276
- if (!Y) {
1277
- aa.todo.values = [{latLng: aa.latLng, options: aa.opts}]
1278
- }
1279
- if (!aa.todo.values.length) {
1280
- O(aa, false);
1281
- return
1282
- }
1283
- if (!e.__initialised) {
1284
- e.prototype = new z.classes.OverlayView();
1285
- e.__initialised = true
1286
- }
1287
- y.each(aa.todo.values, function (ae, af) {
1288
- var ah, ag, ac = b(aa, af), ad = y(document.createElement("div")).css({
1289
- border: "none",
1290
- borderWidth: "0px",
1291
- position: "absolute"
1292
- });
1293
- ad.append(ac.options.content);
1294
- ag = new e(N, ac.options, I(ac) || I(af), ad);
1295
- ab.push(ag);
1296
- ad = null;
1297
- if (!Z) {
1298
- ah = V.add(aa, "overlay", ag);
1299
- n(T, {todo: ac}, ag, ah)
1300
- }
1301
- });
1302
- if (Z) {
1303
- return ab[0]
1304
- }
1305
- O(aa, Y ? ab : ab[0])
1306
- };
1307
- this.getaddress = function (Y) {
1308
- X(Y, Y.results, Y.status);
1309
- P.ack()
1310
- };
1311
- this.getlatlng = function (Y) {
1312
- X(Y, Y.results, Y.status);
1313
- P.ack()
1314
- };
1315
- this.getmaxzoom = function (Y) {
1316
- q().getMaxZoomAtLatLng(Y.latLng, function (Z) {
1317
- X(Y, Z.status === google.maps.MaxZoomStatus.OK ? Z.zoom : false, status);
1318
- P.ack()
1319
- })
1320
- };
1321
- this.getelevation = function (Z) {
1322
- var aa, Y = [], ab = function (ad, ac) {
1323
- X(Z, ac === google.maps.ElevationStatus.OK ? ad : false, ac);
1324
- P.ack()
1325
- };
1326
- if (Z.latLng) {
1327
- Y.push(Z.latLng)
1328
- } else {
1329
- Y = g(Z.todo.locations || []);
1330
- for (aa = 0; aa < Y.length; aa++) {
1331
- Y[aa] = I(Y[aa])
1332
- }
1333
- }
1334
- if (Y.length) {
1335
- h().getElevationForLocations({locations: Y}, ab)
1336
- } else {
1337
- if (Z.todo.path && Z.todo.path.length) {
1338
- for (aa = 0; aa < Z.todo.path.length; aa++) {
1339
- Y.push(I(Z.todo.path[aa]))
1340
- }
1341
- }
1342
- if (Y.length) {
1343
- h().getElevationAlongPath({path: Y, samples: Z.todo.samples}, ab)
1344
- } else {
1345
- P.ack()
1346
- }
1347
- }
1348
- };
1349
- this.defaults = function (Y) {
1350
- y.each(Y.todo, function (Z, aa) {
1351
- if (typeof z[Z] === "object") {
1352
- z[Z] = y.extend({}, z[Z], aa)
1353
- } else {
1354
- z[Z] = aa
1355
- }
1356
- });
1357
- P.ack(true)
1358
- };
1359
- this.rectangle = function (Z) {
1360
- var aa = [], Y = "values" in Z.todo;
1361
- if (!Y) {
1362
- Z.todo.values = [{options: Z.opts}]
1363
- }
1364
- if (!Z.todo.values.length) {
1365
- O(Z, false);
1366
- return
1367
- }
1368
- y.each(Z.todo.values, function (ac, ad) {
1369
- var af, ae, ab = b(Z, ad);
1370
- ab.options.bounds = ab.options.bounds ? j(ab.options.bounds) : j(ad);
1371
- if (!N) {
1372
- L(ab.options.bounds.getCenter())
1373
- }
1374
- ab.options.map = N;
1375
- ae = new z.classes.Rectangle(ab.options);
1376
- aa.push(ae);
1377
- af = V.add({todo: ab}, "rectangle", ae);
1378
- n(T, {todo: ab}, ae, af)
1379
- });
1380
- O(Z, Y ? aa : aa[0])
1381
- };
1382
- function M(Z, aa, ab) {
1383
- var ac = [], Y = "values" in Z.todo;
1384
- if (!Y) {
1385
- Z.todo.values = [{options: Z.opts}]
1386
- }
1387
- if (!Z.todo.values.length) {
1388
- O(Z, false);
1389
- return
1390
- }
1391
- L();
1392
- y.each(Z.todo.values, function (af, ah) {
1393
- var aj, ag, ae, ai, ad = b(Z, ah);
1394
- if (ad.options[ab]) {
1395
- if (ad.options[ab][0][0] && y.isArray(ad.options[ab][0][0])) {
1396
- for (ag = 0; ag < ad.options[ab].length; ag++) {
1397
- for (ae = 0; ae < ad.options[ab][ag].length; ae++) {
1398
- ad.options[ab][ag][ae] = I(ad.options[ab][ag][ae])
1399
- }
1400
- }
1401
- } else {
1402
- for (ag = 0; ag < ad.options[ab].length; ag++) {
1403
- ad.options[ab][ag] = I(ad.options[ab][ag])
1404
- }
1405
- }
1406
- }
1407
- ad.options.map = N;
1408
- ai = new google.maps[aa](ad.options);
1409
- ac.push(ai);
1410
- aj = V.add({todo: ad}, aa.toLowerCase(), ai);
1411
- n(T, {todo: ad}, ai, aj)
1412
- });
1413
- O(Z, Y ? ac : ac[0])
1414
- }
1415
-
1416
- this.polyline = function (Y) {
1417
- M(Y, "Polyline", "path")
1418
- };
1419
- this.polygon = function (Y) {
1420
- M(Y, "Polygon", "paths")
1421
- };
1422
- this.trafficlayer = function (Y) {
1423
- L();
1424
- var Z = V.get("trafficlayer");
1425
- if (!Z) {
1426
- Z = new z.classes.TrafficLayer();
1427
- Z.setMap(N);
1428
- V.add(Y, "trafficlayer", Z)
1429
- }
1430
- O(Y, Z)
1431
- };
1432
- this.bicyclinglayer = function (Y) {
1433
- L();
1434
- var Z = V.get("bicyclinglayer");
1435
- if (!Z) {
1436
- Z = new z.classes.BicyclingLayer();
1437
- Z.setMap(N);
1438
- V.add(Y, "bicyclinglayer", Z)
1439
- }
1440
- O(Y, Z)
1441
- };
1442
- this.groundoverlay = function (Y) {
1443
- Y.opts.bounds = j(Y.opts.bounds);
1444
- if (Y.opts.bounds) {
1445
- L(Y.opts.bounds.getCenter())
1446
- }
1447
- var aa, Z = new z.classes.GroundOverlay(Y.opts.url, Y.opts.bounds, Y.opts.opts);
1448
- Z.setMap(N);
1449
- aa = V.add(Y, "groundoverlay", Z);
1450
- O(Y, Z, aa)
1451
- };
1452
- this.streetviewpanorama = function (Y) {
1453
- if (!Y.opts.opts) {
1454
- Y.opts.opts = {}
1455
- }
1456
- if (Y.latLng) {
1457
- Y.opts.opts.position = Y.latLng
1458
- } else {
1459
- if (Y.opts.opts.position) {
1460
- Y.opts.opts.position = I(Y.opts.opts.position)
1461
- }
1462
- }
1463
- if (Y.todo.divId) {
1464
- Y.opts.container = document.getElementById(Y.todo.divId)
1465
- } else {
1466
- if (Y.opts.container) {
1467
- Y.opts.container = y(Y.opts.container).get(0)
1468
- }
1469
- }
1470
- var aa, Z = new z.classes.StreetViewPanorama(Y.opts.container, Y.opts.opts);
1471
- if (Z) {
1472
- N.setStreetView(Z)
1473
- }
1474
- aa = V.add(Y, "streetviewpanorama", Z);
1475
- O(Y, Z, aa)
1476
- };
1477
- this.kmllayer = function (Z) {
1478
- var aa = [], Y = "values" in Z.todo;
1479
- if (!Y) {
1480
- Z.todo.values = [{options: Z.opts}]
1481
- }
1482
- if (!Z.todo.values.length) {
1483
- O(Z, false);
1484
- return
1485
- }
1486
- y.each(Z.todo.values, function (ad, ae) {
1487
- var ag, af, ac, ab = b(Z, ae);
1488
- if (!N) {
1489
- L()
1490
- }
1491
- ac = ab.options;
1492
- if (ab.options.opts) {
1493
- ac = ab.options.opts;
1494
- if (ab.options.url) {
1495
- ac.url = ab.options.url
1496
- }
1497
- }
1498
- ac.map = N;
1499
- if (d("3.10")) {
1500
- af = new z.classes.KmlLayer(ac)
1501
- } else {
1502
- af = new z.classes.KmlLayer(ac.url, ac)
1503
- }
1504
- aa.push(af);
1505
- ag = V.add({todo: ab}, "kmllayer", af);
1506
- n(T, {todo: ab}, af, ag)
1507
- });
1508
- O(Z, Y ? aa : aa[0])
1509
- };
1510
- this.panel = function (ab) {
1511
- L();
1512
- var ad, Y = 0, ac = 0, aa, Z = y(document.createElement("div"));
1513
- Z.css({position: "absolute", zIndex: 1000, visibility: "hidden"});
1514
- if (ab.opts.content) {
1515
- aa = y(ab.opts.content);
1516
- Z.append(aa);
1517
- T.first().prepend(Z);
1518
- if (ab.opts.left !== t) {
1519
- Y = ab.opts.left
1520
- } else {
1521
- if (ab.opts.right !== t) {
1522
- Y = T.width() - aa.width() - ab.opts.right
1523
- } else {
1524
- if (ab.opts.center) {
1525
- Y = (T.width() - aa.width()) / 2
1526
- }
1527
- }
1528
- }
1529
- if (ab.opts.top !== t) {
1530
- ac = ab.opts.top
1531
- } else {
1532
- if (ab.opts.bottom !== t) {
1533
- ac = T.height() - aa.height() - ab.opts.bottom
1534
- } else {
1535
- if (ab.opts.middle) {
1536
- ac = (T.height() - aa.height()) / 2
1537
- }
1538
- }
1539
- }
1540
- Z.css({top: ac, left: Y, visibility: "visible"})
1541
- }
1542
- ad = V.add(ab, "panel", Z);
1543
- O(ab, Z, ad);
1544
- Z = null
1545
- };
1546
- function W(aa) {
1547
- var af = new F(T, N, aa), Y = {}, ab = {}, ae = [], ad = /^[0-9]+$/, ac, Z;
1548
- for (Z in aa) {
1549
- if (ad.test(Z)) {
1550
- ae.push(1 * Z);
1551
- ab[Z] = aa[Z];
1552
- ab[Z].width = ab[Z].width || 0;
1553
- ab[Z].height = ab[Z].height || 0
1554
- } else {
1555
- Y[Z] = aa[Z]
1556
- }
1557
- }
1558
- ae.sort(function (ah, ag) {
1559
- return ah > ag
1560
- });
1561
- if (Y.calculator) {
1562
- ac = function (ag) {
1563
- var ah = [];
1564
- y.each(ag, function (aj, ai) {
1565
- ah.push(af.value(ai))
1566
- });
1567
- return Y.calculator.apply(T, [ah])
1568
- }
1569
- } else {
1570
- ac = function (ag) {
1571
- return ag.length
1572
- }
1573
- }
1574
- af.error(function () {
1575
- u.apply(S, arguments)
1576
- });
1577
- af.display(function (ag) {
1578
- var ai, aj, am, ak, al, ah = ac(ag.indexes);
1579
- if (aa.force || ah > 1) {
1580
- for (ai = 0; ai < ae.length; ai++) {
1581
- if (ae[ai] <= ah) {
1582
- aj = ab[ae[ai]]
1583
- }
1584
- }
1585
- }
1586
- if (aj) {
1587
- al = aj.offset || [-aj.width / 2, -aj.height / 2];
1588
- am = y.extend({}, Y);
1589
- am.options = y.extend({
1590
- pane: "overlayLayer",
1591
- content: aj.content ? aj.content.replace("CLUSTER_COUNT", ah) : "",
1592
- offset: {x: ("x" in al ? al.x : al[0]) || 0, y: ("y" in al ? al.y : al[1]) || 0}
1593
- }, Y.options || {});
1594
- ak = S.overlay({todo: am, opts: am.options, latLng: I(ag)}, true);
1595
- am.options.pane = "floatShadow";
1596
- am.options.content = y(document.createElement("div")).width(aj.width + "px").height(aj.height + "px").css({cursor: "pointer"});
1597
- shadow = S.overlay({todo: am, opts: am.options, latLng: I(ag)}, true);
1598
- Y.data = {latLng: I(ag), markers: []};
1599
- y.each(ag.indexes, function (ao, an) {
1600
- Y.data.markers.push(af.value(an));
1601
- if (af.markerIsSet(an)) {
1602
- af.marker(an).setMap(null)
1603
- }
1604
- });
1605
- n(T, {todo: Y}, shadow, t, {main: ak, shadow: shadow});
1606
- af.store(ag, ak, shadow)
1607
- } else {
1608
- y.each(ag.indexes, function (ao, an) {
1609
- af.marker(an).setMap(N)
1610
- })
1611
- }
1612
- });
1613
- return af
1614
- }
1615
-
1616
- this.marker = function (aa) {
1617
- var Y = "values" in aa.todo, ad = !N;
1618
- if (!Y) {
1619
- aa.opts.position = aa.latLng || I(aa.opts.position);
1620
- aa.todo.values = [{options: aa.opts}]
1621
- }
1622
- if (!aa.todo.values.length) {
1623
- O(aa, false);
1624
- return
1625
- }
1626
- if (ad) {
1627
- L()
1628
- }
1629
- if (aa.todo.cluster && !N.getBounds()) {
1630
- google.maps.event.addListenerOnce(N, "bounds_changed", function () {
1631
- S.marker.apply(S, [aa])
1632
- });
1633
- return
1634
- }
1635
- if (aa.todo.cluster) {
1636
- var Z, ab;
1637
- if (aa.todo.cluster instanceof a) {
1638
- Z = aa.todo.cluster;
1639
- ab = V.getById(Z.id(), true)
1640
- } else {
1641
- ab = W(aa.todo.cluster);
1642
- Z = new a(k(aa.todo.id, true), ab);
1643
- V.add(aa, "clusterer", Z, ab)
1644
- }
1645
- ab.beginUpdate();
1646
- y.each(aa.todo.values, function (af, ag) {
1647
- var ae = b(aa, ag);
1648
- ae.options.position = ae.options.position ? I(ae.options.position) : I(ag);
1649
- ae.options.map = N;
1650
- if (ad) {
1651
- N.setCenter(ae.options.position);
1652
- ad = false
1653
- }
1654
- ab.add(ae, ag)
1655
- });
1656
- ab.endUpdate();
1657
- O(aa, Z)
1658
- } else {
1659
- var ac = [];
1660
- y.each(aa.todo.values, function (af, ag) {
1661
- var ai, ah, ae = b(aa, ag);
1662
- ae.options.position = ae.options.position ? I(ae.options.position) : I(ag);
1663
- ae.options.map = N;
1664
- if (ad) {
1665
- N.setCenter(ae.options.position);
1666
- ad = false
1667
- }
1668
- ah = new z.classes.Marker(ae.options);
1669
- ac.push(ah);
1670
- ai = V.add({todo: ae}, "marker", ah);
1671
- n(T, {todo: ae}, ah, ai)
1672
- });
1673
- O(aa, Y ? ac : ac[0])
1674
- }
1675
- };
1676
- this.getroute = function (Y) {
1677
- Y.opts.origin = I(Y.opts.origin, true);
1678
- Y.opts.destination = I(Y.opts.destination, true);
1679
- G().route(Y.opts, function (aa, Z) {
1680
- X(Y, Z == google.maps.DirectionsStatus.OK ? aa : false, Z);
1681
- P.ack()
1682
- })
1683
- };
1684
- this.directionsrenderer = function (Y) {
1685
- Y.opts.map = N;
1686
- var aa, Z = new google.maps.DirectionsRenderer(Y.opts);
1687
- if (Y.todo.divId) {
1688
- Z.setPanel(document.getElementById(Y.todo.divId))
1689
- } else {
1690
- if (Y.todo.container) {
1691
- Z.setPanel(y(Y.todo.container).get(0))
1692
- }
1693
- }
1694
- aa = V.add(Y, "directionsrenderer", Z);
1695
- O(Y, Z, aa)
1696
- };
1697
- this.getgeoloc = function (Y) {
1698
- O(Y, Y.latLng)
1699
- };
1700
- this.styledmaptype = function (Y) {
1701
- L();
1702
- var Z = new z.classes.StyledMapType(Y.todo.styles, Y.opts);
1703
- N.mapTypes.set(Y.todo.id, Z);
1704
- O(Y, Z)
1705
- };
1706
- this.imagemaptype = function (Y) {
1707
- L();
1708
- var Z = new z.classes.ImageMapType(Y.opts);
1709
- N.mapTypes.set(Y.todo.id, Z);
1710
- O(Y, Z)
1711
- };
1712
- this.autofit = function (Y) {
1713
- var Z = new google.maps.LatLngBounds();
1714
- y.each(V.all(), function (aa, ab) {
1715
- if (ab.getPosition) {
1716
- Z.extend(ab.getPosition())
1717
- } else {
1718
- if (ab.getBounds) {
1719
- Z.extend(ab.getBounds().getNorthEast());
1720
- Z.extend(ab.getBounds().getSouthWest())
1721
- } else {
1722
- if (ab.getPaths) {
1723
- ab.getPaths().forEach(function (ac) {
1724
- ac.forEach(function (ad) {
1725
- Z.extend(ad)
1726
- })
1727
- })
1728
- } else {
1729
- if (ab.getPath) {
1730
- ab.getPath().forEach(function (ac) {
1731
- Z.extend(ac);
1732
- ""
1733
- })
1734
- } else {
1735
- if (ab.getCenter) {
1736
- Z.extend(ab.getCenter())
1737
- } else {
1738
- if (ab instanceof a) {
1739
- ab = V.getById(ab.id(), true);
1740
- if (ab) {
1741
- ab.autofit(Z)
1742
- }
1743
- }
1744
- }
1745
- }
1746
- }
1747
- }
1748
- }
1749
- });
1750
- if (!Z.isEmpty() && (!N.getBounds() || !N.getBounds().equals(Z))) {
1751
- if ("maxZoom" in Y.todo) {
1752
- google.maps.event.addListenerOnce(N, "bounds_changed", function () {
1753
- if (this.getZoom() > Y.todo.maxZoom) {
1754
- this.setZoom(Y.todo.maxZoom)
1755
- }
1756
- })
1757
- }
1758
- N.fitBounds(Z)
1759
- }
1760
- O(Y, true)
1761
- };
1762
- this.clear = function (Y) {
1763
- if (typeof Y.todo === "string") {
1764
- if (V.clearById(Y.todo) || V.objClearById(Y.todo)) {
1765
- O(Y, true);
1766
- return
1767
- }
1768
- Y.todo = {name: Y.todo}
1769
- }
1770
- if (Y.todo.id) {
1771
- y.each(g(Y.todo.id), function (Z, aa) {
1772
- V.clearById(aa) || V.objClearById(aa)
1773
- })
1774
- } else {
1775
- V.clear(g(Y.todo.name), Y.todo.last, Y.todo.first, Y.todo.tag);
1776
- V.objClear(g(Y.todo.name), Y.todo.last, Y.todo.first, Y.todo.tag)
1777
- }
1778
- O(Y, true)
1779
- };
1780
- this.exec = function (Y) {
1781
- var Z = this;
1782
- y.each(g(Y.todo.func), function (aa, ab) {
1783
- y.each(Z.get(Y.todo, true, Y.todo.hasOwnProperty("full") ? Y.todo.full : true), function (ac, ad) {
1784
- ab.call(T, ad)
1785
- })
1786
- });
1787
- O(Y, true)
1788
- };
1789
- this.get = function (aa, ad, ac) {
1790
- var Z, ab, Y = ad ? aa : aa.todo;
1791
- if (!ad) {
1792
- ac = Y.full
1793
- }
1794
- if (typeof Y === "string") {
1795
- ab = V.getById(Y, false, ac) || V.objGetById(Y);
1796
- if (ab === false) {
1797
- Z = Y;
1798
- Y = {}
1799
- }
1800
- } else {
1801
- Z = Y.name
1802
- }
1803
- if (Z === "map") {
1804
- ab = N
1805
- }
1806
- if (!ab) {
1807
- ab = [];
1808
- if (Y.id) {
1809
- y.each(g(Y.id), function (ae, af) {
1810
- ab.push(V.getById(af, false, ac) || V.objGetById(af))
1811
- });
1812
- if (!y.isArray(Y.id)) {
1813
- ab = ab[0]
1814
- }
1815
- } else {
1816
- y.each(Z ? g(Z) : [t], function (af, ag) {
1817
- var ae;
1818
- if (Y.first) {
1819
- ae = V.get(ag, false, Y.tag, ac);
1820
- if (ae) {
1821
- ab.push(ae)
1822
- }
1823
- } else {
1824
- if (Y.all) {
1825
- y.each(V.all(ag, Y.tag, ac), function (ai, ah) {
1826
- ab.push(ah)
1827
- })
1828
- } else {
1829
- ae = V.get(ag, true, Y.tag, ac);
1830
- if (ae) {
1831
- ab.push(ae)
1832
- }
1833
- }
1834
- }
1835
- });
1836
- if (!Y.all && !y.isArray(Z)) {
1837
- ab = ab[0]
1838
- }
1839
- }
1840
- }
1841
- ab = y.isArray(ab) || !Y.all ? ab : [ab];
1842
- if (ad) {
1843
- return ab
1844
- } else {
1845
- O(aa, ab)
1846
- }
1847
- };
1848
- this.getdistance = function (Y) {
1849
- var Z;
1850
- Y.opts.origins = g(Y.opts.origins);
1851
- for (Z = 0; Z < Y.opts.origins.length; Z++) {
1852
- Y.opts.origins[Z] = I(Y.opts.origins[Z], true)
1853
- }
1854
- Y.opts.destinations = g(Y.opts.destinations);
1855
- for (Z = 0; Z < Y.opts.destinations.length; Z++) {
1856
- Y.opts.destinations[Z] = I(Y.opts.destinations[Z], true)
1857
- }
1858
- B().getDistanceMatrix(Y.opts, function (ab, aa) {
1859
- X(Y, aa === google.maps.DistanceMatrixStatus.OK ? ab : false, aa);
1860
- P.ack()
1861
- })
1862
- };
1863
- this.trigger = function (Z) {
1864
- if (typeof Z.todo === "string") {
1865
- google.maps.event.trigger(N, Z.todo)
1866
- } else {
1867
- var Y = [N, Z.todo.eventName];
1868
- if (Z.todo.var_args) {
1869
- y.each(Z.todo.var_args, function (ab, aa) {
1870
- Y.push(aa)
1871
- })
1872
- }
1873
- google.maps.event.trigger.apply(google.maps.event, Y)
1874
- }
1875
- X(Z);
1876
- P.ack()
1877
- }
1878
- }
1879
-
1880
- function s(M) {
1881
- var L;
1882
- if (!typeof M === "object" || !M.hasOwnProperty("get")) {
1883
- return false
1884
- }
1885
- for (L in M) {
1886
- if (L !== "get") {
1887
- return false
1888
- }
1889
- }
1890
- return !M.get.hasOwnProperty("callback")
1891
- }
1892
-
1893
- y.fn.gmap3 = function () {
1894
- var M, O = [], N = true, L = [];
1895
- J();
1896
- for (M = 0; M < arguments.length; M++) {
1897
- if (arguments[M]) {
1898
- O.push(arguments[M])
1899
- }
1900
- }
1901
- if (!O.length) {
1902
- O.push("map")
1903
- }
1904
- y.each(this, function () {
1905
- var P = y(this), Q = P.data("gmap3");
1906
- N = false;
1907
- if (!Q) {
1908
- Q = new K(P);
1909
- P.data("gmap3", Q)
1910
- }
1911
- if (O.length === 1 && (O[0] === "get" || s(O[0]))) {
1912
- if (O[0] === "get") {
1913
- L.push(Q.get("map", true))
1914
- } else {
1915
- L.push(Q.get(O[0].get, true, O[0].get.full))
1916
- }
1917
- } else {
1918
- Q._plan(O)
1919
- }
1920
- });
1921
- if (L.length) {
1922
- if (L.length === 1) {
1923
- return L[0]
1924
- } else {
1925
- return L
1926
- }
1927
- }
1928
- return this
1929
- }
1930
- })(jQuery);
1
  /*!
2
+ * GMAP3 Plugin for jQuery
3
+ * Version : 6.0.0
4
+ * Date : 2014-04-25
 
5
  * Author : DEMONTE Jean-Baptiste
6
  * Contact : jbdemonte@gmail.com
7
  * Web site : http://gmap3.net
8
+ * Licence : GPL v3 : http://www.gnu.org/licenses/gpl.html
9
+ *
10
+ * Copyright (c) 2010-2014 Jean-Baptiste DEMONTE
11
+ * All rights reserved.
12
  */
13
+ !function(t,n){function e(t){return"object"==typeof t}function o(t){return"string"==typeof t}function i(t){return"number"==typeof t}function a(t){return t===n}function r(){q=google.maps,A||(A={verbose:!1,queryLimit:{attempt:5,delay:250,random:250},classes:function(){var n={};return t.each("Map Marker InfoWindow Circle Rectangle OverlayView StreetViewPanorama KmlLayer TrafficLayer BicyclingLayer GroundOverlay StyledMapType ImageMapType".split(" "),function(t,e){n[e]=q[e]}),n}(),map:{mapTypeId:q.MapTypeId.ROADMAP,center:[46.578498,2.457275],zoom:2},overlay:{pane:"floatPane",content:"",offset:{x:0,y:0}},geoloc:{getCurrentPosition:{maximumAge:6e4,timeout:5e3}}})}function s(t,n){return a(t)?"gmap3_"+(n?Z+1:++Z):t}function u(t){var n,e=q.version.split(".");for(t=t.split("."),n=0;n<e.length;n++)e[n]=parseInt(e[n],10);for(n=0;n<t.length;n++){if(t[n]=parseInt(t[n],10),!e.hasOwnProperty(n))return!1;if(e[n]<t[n])return!1}return!0}function l(n,e,o,i,a){function r(e,i){e&&t.each(e,function(t,e){var r=n,s=e;R(e)&&(r=e[0],s=e[1]),i(o,t,function(t){s.apply(r,[a||o,t,u])})})}var s=e.td||{},u={id:i,data:s.data,tag:s.tag};r(s.events,q.event.addListener),r(s.onces,q.event.addListenerOnce)}function d(t){var n,e=[];for(n in t)t.hasOwnProperty(n)&&e.push(n);return e}function c(t,n){var e,o=arguments;for(e=2;e<o.length;e++)if(n in o[e]&&o[e].hasOwnProperty(n))return void(t[n]=o[e][n])}function p(n,e){var o,i,a=["data","tag","id","events","onces"],r={};if(n.td)for(o in n.td)n.td.hasOwnProperty(o)&&"options"!==o&&"values"!==o&&(r[o]=n.td[o]);for(i=0;i<a.length;i++)c(r,a[i],e,n.td);return r.options=t.extend({},n.opts||{},e.options||{}),r}function f(){if(A.verbose){var t,n=[];if(window.console&&z(console.error)){for(t=0;t<arguments.length;t++)n.push(arguments[t]);console.error.apply(console,n)}else{for(n="",t=0;t<arguments.length;t++)n+=arguments[t].toString()+" ";alert(n)}}}function g(t){return(i(t)||o(t))&&""!==t&&!isNaN(t)}function h(t){var n,o=[];if(!a(t))if(e(t))if(i(t.length))o=t;else for(n in t)o.push(t[n]);else o.push(t);return o}function v(n){return n?z(n)?n:(n=h(n),function(o){var i;if(a(o))return!1;if(e(o)){for(i=0;i<o.length;i++)if(t.inArray(o[i],n)>=0)return!0;return!1}return t.inArray(o,n)>=0}):void 0}function m(t,n,e){var i=n?t:null;return!t||o(t)?i:t.latLng?m(t.latLng):t instanceof q.LatLng?t:g(t.lat)?new q.LatLng(t.lat,t.lng):!e&&R(t)&&g(t[0])&&g(t[1])?new q.LatLng(t[0],t[1]):i}function y(t){var n,e;return!t||t instanceof q.LatLngBounds?t||null:(R(t)?2===t.length?(n=m(t[0]),e=m(t[1])):4===t.length&&(n=m([t[0],t[1]]),e=m([t[2],t[3]])):"ne"in t&&"sw"in t?(n=m(t.ne),e=m(t.sw)):"n"in t&&"e"in t&&"s"in t&&"w"in t&&(n=m([t.n,t.e]),e=m([t.s,t.w])),n&&e?new q.LatLngBounds(e,n):null)}function w(t,n,e,i,a){var r=e?m(i.td,!1,!0):!1,s=r?{latLng:r}:i.td.address?o(i.td.address)?{address:i.td.address}:i.td.address:!1,u=s?G.get(s):!1,l=this;s?(a=a||0,u?(i.latLng=u.results[0].geometry.location,i.results=u.results,i.status=u.status,n.apply(t,[i])):(s.location&&(s.location=m(s.location)),s.bounds&&(s.bounds=y(s.bounds)),M().geocode(s,function(o,r){r===q.GeocoderStatus.OK?(G.store(s,{results:o,status:r}),i.latLng=o[0].geometry.location,i.results=o,i.status=r,n.apply(t,[i])):r===q.GeocoderStatus.OVER_QUERY_LIMIT&&a<A.queryLimit.attempt?setTimeout(function(){w.apply(l,[t,n,e,i,a+1])},A.queryLimit.delay+Math.floor(Math.random()*A.queryLimit.random)):(f("geocode failed",r,s),i.latLng=i.results=!1,i.status=r,n.apply(t,[i]))}))):(i.latLng=m(i.td,!1,!0),n.apply(t,[i]))}function L(n,e,o,i){function a(){do s++;while(s<n.length&&!("address"in n[s]));return s>=n.length?void o.apply(e,[i]):void w(r,function(e){delete e.td,t.extend(n[s],e),a.apply(r,[])},!0,{td:n[s]})}var r=this,s=-1;a()}function b(t,n,e){var o=!1;navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition(function(i){o||(o=!0,e.latLng=new q.LatLng(i.coords.latitude,i.coords.longitude),n.apply(t,[e]))},function(){o||(o=!0,e.latLng=!1,n.apply(t,[e]))},e.opts.getCurrentPosition):(e.latLng=!1,n.apply(t,[e]))}function x(t){var n,o=!1;if(e(t)&&t.hasOwnProperty("get")){for(n in t)if("get"!==n)return!1;o=!t.get.hasOwnProperty("callback")}return o}function M(){return V.geocoder||(V.geocoder=new q.Geocoder),V.geocoder}function I(){var t=[];this.get=function(n){if(t.length){var o,i,a,r,s,u=d(n);for(o=0;o<t.length;o++){for(r=t[o],s=u.length===r.keys.length,i=0;i<u.length&&s;i++)a=u[i],s=a in r.request,s&&(s=e(n[a])&&"equals"in n[a]&&z(n[a])?n[a].equals(r.request[a]):n[a]===r.request[a]);if(s)return r.results}}},this.store=function(n,e){t.push({request:n,keys:d(n),results:e})}}function P(){var t=[],n=this;n.empty=function(){return!t.length},n.add=function(n){t.push(n)},n.get=function(){return t.length?t[0]:!1},n.ack=function(){t.shift()}}function k(){function n(t){return{id:t.id,name:t.name,object:t.obj,tag:t.tag,data:t.data}}function e(t){z(t.setMap)&&t.setMap(null),z(t.remove)&&t.remove(),z(t.free)&&t.free(),t=null}var o={},i={},r=this;r.add=function(t,n,e,a){var u=t.td||{},l=s(u.id);return o[n]||(o[n]=[]),l in i&&r.clearById(l),i[l]={obj:e,sub:a,name:n,id:l,tag:u.tag,data:u.data},o[n].push(l),l},r.getById=function(t,e,o){var a=!1;return t in i&&(a=e?i[t].sub:o?n(i[t]):i[t].obj),a},r.get=function(t,e,a,r){var s,u,l=v(a);if(!o[t]||!o[t].length)return null;for(s=o[t].length;s;)if(s--,u=o[t][e?s:o[t].length-s-1],u&&i[u]){if(l&&!l(i[u].tag))continue;return r?n(i[u]):i[u].obj}return null},r.all=function(t,e,r){var s=[],u=v(e),l=function(t){var e,a;for(e=0;e<o[t].length;e++)if(a=o[t][e],a&&i[a]){if(u&&!u(i[a].tag))continue;s.push(r?n(i[a]):i[a].obj)}};if(t in o)l(t);else if(a(t))for(t in o)l(t);return s},r.rm=function(t,n,e){var a,s;if(!o[t])return!1;if(n)if(e)for(a=o[t].length-1;a>=0&&(s=o[t][a],!n(i[s].tag));a--);else for(a=0;a<o[t].length&&(s=o[t][a],!n(i[s].tag));a++);else a=e?o[t].length-1:0;return a in o[t]?r.clearById(o[t][a],a):!1},r.clearById=function(t,n){if(t in i){var r,s=i[t].name;for(r=0;a(n)&&r<o[s].length;r++)t===o[s][r]&&(n=r);return e(i[t].obj),i[t].sub&&e(i[t].sub),delete i[t],o[s].splice(n,1),!0}return!1},r.objGetById=function(t){var n,e;if(o.clusterer)for(e in o.clusterer)if((n=i[o.clusterer[e]].obj.getById(t))!==!1)return n;return!1},r.objClearById=function(t){var n;if(o.clusterer)for(n in o.clusterer)if(i[o.clusterer[n]].obj.clearById(t))return!0;return null},r.clear=function(t,n,e,i){var a,s,u,l=v(i);if(t&&t.length)t=h(t);else{t=[];for(a in o)t.push(a)}for(s=0;s<t.length;s++)if(u=t[s],n)r.rm(u,l,!0);else if(e)r.rm(u,l,!1);else for(;r.rm(u,l,!1););},r.objClear=function(n,e,a,r){var s;if(o.clusterer&&(t.inArray("marker",n)>=0||!n.length))for(s in o.clusterer)i[o.clusterer[s]].obj.clear(e,a,r)}}function B(n,e,i){function a(t){var n={};return n[t]={},n}function r(){var t;for(t in i)if(i.hasOwnProperty(t)&&!u.hasOwnProperty(t))return t}var s,u={},l=this,d={latLng:{map:!1,marker:!1,infowindow:!1,circle:!1,overlay:!1,getlatlng:!1,getmaxzoom:!1,getelevation:!1,streetviewpanorama:!1,getaddress:!0},geoloc:{getgeoloc:!0}};o(i)&&(i=a(i)),l.run=function(){for(var o,a;o=r();){if(z(n[o]))return s=o,a=t.extend(!0,{},A[o]||{},i[o].options||{}),void(o in d.latLng?i[o].values?L(i[o].values,n,n[o],{td:i[o],opts:a,session:u}):w(n,n[o],d.latLng[o],{td:i[o],opts:a,session:u}):o in d.geoloc?b(n,n[o],{td:i[o],opts:a,session:u}):n[o].apply(n,[{td:i[o],opts:a,session:u}]));u[o]=null}e.apply(n,[i,u])},l.ack=function(t){u[s]=t,l.run.apply(l,[])}}function j(){return V.ds||(V.ds=new q.DirectionsService),V.ds}function O(){return V.dms||(V.dms=new q.DistanceMatrixService),V.dms}function C(){return V.mzs||(V.mzs=new q.MaxZoomService),V.mzs}function E(){return V.es||(V.es=new q.ElevationService),V.es}function S(t){function n(){var t=this;return t.onAdd=function(){},t.onRemove=function(){},t.draw=function(){},A.classes.OverlayView.apply(t,[])}n.prototype=A.classes.OverlayView.prototype;var e=new n;return e.setMap(t),e}function T(n,o,i){function a(t){T[t]||(delete _[t].options.map,T[t]=new A.classes.Marker(_[t].options),l(n,{td:_[t]},T[t],_[t].id))}function r(){return(y=U.getProjection())?(P=!0,j.push(q.event.addListener(o,"zoom_changed",f)),j.push(q.event.addListener(o,"bounds_changed",f)),void h()):void setTimeout(function(){r.apply(B,[])},25)}function u(t){e(O[t])?(z(O[t].obj.setMap)&&O[t].obj.setMap(null),z(O[t].obj.remove)&&O[t].obj.remove(),z(O[t].shadow.remove)&&O[t].obj.remove(),z(O[t].shadow.setMap)&&O[t].shadow.setMap(null),delete O[t].obj,delete O[t].shadow):T[t]&&T[t].setMap(null),delete O[t]}function d(){var t,n,e,o,i,a,r,s,u=Math.cos,l=Math.sin,d=arguments;return d[0]instanceof q.LatLng?(t=d[0].lat(),e=d[0].lng(),d[1]instanceof q.LatLng?(n=d[1].lat(),o=d[1].lng()):(n=d[1],o=d[2])):(t=d[0],e=d[1],d[2]instanceof q.LatLng?(n=d[2].lat(),o=d[2].lng()):(n=d[2],o=d[3])),i=Math.PI*t/180,a=Math.PI*e/180,r=Math.PI*n/180,s=Math.PI*o/180,6371e3*Math.acos(Math.min(u(i)*u(r)*u(a)*u(s)+u(i)*l(a)*u(r)*l(s)+l(i)*l(r),1))}function c(){var t=d(o.getCenter(),o.getBounds().getNorthEast()),n=new q.Circle({center:o.getCenter(),radius:1.25*t});return n.getBounds()}function p(){var t,n={};for(t in O)n[t]=!0;return n}function f(){clearTimeout(m),m=setTimeout(h,25)}function g(t){var n=y.fromLatLngToDivPixel(t),e=y.fromDivPixelToLatLng(new q.Point(n.x+i.radius,n.y-i.radius)),o=y.fromDivPixelToLatLng(new q.Point(n.x-i.radius,n.y+i.radius));return new q.LatLngBounds(o,e)}function h(){if(!x&&!I&&P){var n,e,a,r,s,l,d,f,h,v,m,y=!1,b=[],B={},j=o.getZoom(),C="maxZoom"in i&&j>i.maxZoom,E=p();for(M=!1,j>3&&(s=c(),y=s.getSouthWest().lng()<s.getNorthEast().lng()),n=0;n<_.length;n++)!_[n]||y&&!s.contains(_[n].options.position)||w&&!w(D[n])||b.push(n);for(;;){for(n=0;B[n]&&n<b.length;)n++;if(n===b.length)break;if(r=[],k&&!C){m=10;do for(f=r,r=[],m--,d=f.length?s.getCenter():_[b[n]].options.position,s=g(d),e=n;e<b.length;e++)B[e]||s.contains(_[b[e]].options.position)&&r.push(e);while(f.length<r.length&&r.length>1&&m)}else for(e=n;e<b.length;e++)if(!B[e]){r.push(e);break}for(l={indexes:[],ref:[]},h=v=0,a=0;a<r.length;a++)B[r[a]]=!0,l.indexes.push(b[r[a]]),l.ref.push(b[r[a]]),h+=_[b[r[a]]].options.position.lat(),v+=_[b[r[a]]].options.position.lng();h/=r.length,v/=r.length,l.latLng=new q.LatLng(h,v),l.ref=l.ref.join("-"),l.ref in E?delete E[l.ref]:(1===r.length&&(O[l.ref]=!0),L(l))}t.each(E,function(t){u(t)}),I=!1}}var m,y,w,L,b,x=!1,M=!1,I=!1,P=!1,k=!0,B=this,j=[],O={},C={},E={},T=[],_=[],D=[],U=S(o,i.radius);r(),B.getById=function(t){return t in C?(a(C[t]),T[C[t]]):!1},B.rm=function(t){var n=C[t];T[n]&&T[n].setMap(null),delete T[n],T[n]=!1,delete _[n],_[n]=!1,delete D[n],D[n]=!1,delete C[t],delete E[n],M=!0},B.clearById=function(t){return t in C?(B.rm(t),!0):void 0},B.clear=function(t,n,e){var o,i,a,r,s,u=[],l=v(e);for(t?(o=_.length-1,i=-1,a=-1):(o=0,i=_.length,a=1),r=o;r!==i&&(!_[r]||l&&!l(_[r].tag)||(u.push(E[r]),!n&&!t));r+=a);for(s=0;s<u.length;s++)B.rm(u[s])},B.add=function(t,n){t.id=s(t.id),B.clearById(t.id),C[t.id]=T.length,E[T.length]=t.id,T.push(null),_.push(t),D.push(n),M=!0},B.addMarker=function(t,e){e=e||{},e.id=s(e.id),B.clearById(e.id),e.options||(e.options={}),e.options.position=t.getPosition(),l(n,{td:e},t,e.id),C[e.id]=T.length,E[T.length]=e.id,T.push(t),_.push(e),D.push(e.data||{}),M=!0},B.td=function(t){return _[t]},B.value=function(t){return D[t]},B.marker=function(t){return t in T?(a(t),T[t]):!1},B.markerIsSet=function(t){return Boolean(T[t])},B.setMarker=function(t,n){T[t]=n},B.store=function(t,n,e){O[t.ref]={obj:n,shadow:e}},B.free=function(){var n;for(n=0;n<j.length;n++)q.event.removeListener(j[n]);j=[],t.each(O,function(t){u(t)}),O={},t.each(_,function(t){_[t]=null}),_=[],t.each(T,function(t){T[t]&&(T[t].setMap(null),delete T[t])}),T=[],t.each(D,function(t){delete D[t]}),D=[],C={},E={}},B.filter=function(t){w=t,h()},B.enable=function(t){k!==t&&(k=t,h())},B.display=function(t){L=t},B.error=function(t){b=t},B.beginUpdate=function(){x=!0},B.endUpdate=function(){x=!1,M&&h()},B.autofit=function(t){var n;for(n=0;n<_.length;n++)_[n]&&t.extend(_[n].options.position)}}function _(t,n){var e=this;e.id=function(){return t},e.filter=function(t){n.filter(t)},e.enable=function(){n.enable(!0)},e.disable=function(){n.enable(!1)},e.add=function(t,e,o){o||n.beginUpdate(),n.addMarker(t,e),o||n.endUpdate()},e.getById=function(t){return n.getById(t)},e.clearById=function(t,e){var o;return e||n.beginUpdate(),o=n.clearById(t),e||n.endUpdate(),o},e.clear=function(t,e,o,i){i||n.beginUpdate(),n.clear(t,e,o),i||n.endUpdate()}}function D(n,e,o,i){var a=this,r=[];A.classes.OverlayView.call(a),a.setMap(n),a.onAdd=function(){var n=a.getPanes();e.pane in n&&t(n[e.pane]).append(i),t.each("dblclick click mouseover mousemove mouseout mouseup mousedown".split(" "),function(n,e){r.push(q.event.addDomListener(i[0],e,function(n){t.Event(n).stopPropagation(),q.event.trigger(a,e,[n]),a.draw()}))}),r.push(q.event.addDomListener(i[0],"contextmenu",function(n){t.Event(n).stopPropagation(),q.event.trigger(a,"rightclick",[n]),a.draw()}))},a.getPosition=function(){return o},a.setPosition=function(t){o=t,a.draw()},a.draw=function(){var t=a.getProjection().fromLatLngToDivPixel(o);i.css("left",t.x+e.offset.x+"px").css("top",t.y+e.offset.y+"px")},a.onRemove=function(){var t;for(t=0;t<r.length;t++)q.event.removeListener(r[t]);i.remove()},a.hide=function(){i.hide()},a.show=function(){i.show()},a.toggle=function(){i&&(i.is(":visible")?a.show():a.hide())},a.toggleDOM=function(){a.setMap(a.getMap()?null:n)},a.getDOMElement=function(){return i[0]}}function U(i){function r(){!b&&(b=M.get())&&b.run()}function d(){b=null,M.ack(),r.call(x)}function c(t){var n,e=t.td.callback;e&&(n=Array.prototype.slice.call(arguments,1),z(e)?e.apply(i,n):R(e)&&z(e[1])&&e[1].apply(e[0],n))}function g(t,n,e){e&&l(i,t,n,e),c(t,n),b.ack(n)}function v(n,e){e=e||{};var o=e.td&&e.td.options?e.td.options:0;S?o&&(o.center&&(o.center=m(o.center)),S.setOptions(o)):(o=e.opts||t.extend(!0,{},A.map,o||{}),o.center=n||m(o.center),S=new A.classes.Map(i.get(0),o))}function w(e){var o,a,r=new T(i,S,e),s={},u={},d=[],c=/^[0-9]+$/;for(a in e)c.test(a)?(d.push(1*a),u[a]=e[a],u[a].width=u[a].width||0,u[a].height=u[a].height||0):s[a]=e[a];return d.sort(function(t,n){return t>n}),o=s.calculator?function(n){var e=[];return t.each(n,function(t,n){e.push(r.value(n))}),s.calculator.apply(i,[e])}:function(t){return t.length},r.error(function(){f.apply(x,arguments)}),r.display(function(a){var c,p,f,g,h,v,y=o(a.indexes);if(e.force||y>1)for(c=0;c<d.length;c++)d[c]<=y&&(p=u[d[c]]);p?(h=p.offset||[-p.width/2,-p.height/2],f=t.extend({},s),f.options=t.extend({pane:"overlayLayer",content:p.content?p.content.replace("CLUSTER_COUNT",y):"",offset:{x:("x"in h?h.x:h[0])||0,y:("y"in h?h.y:h[1])||0}},s.options||{}),g=x.overlay({td:f,opts:f.options,latLng:m(a)},!0),f.options.pane="floatShadow",f.options.content=t(document.createElement("div")).width(p.width+"px").height(p.height+"px").css({cursor:"pointer"}),v=x.overlay({td:f,opts:f.options,latLng:m(a)},!0),s.data={latLng:m(a),markers:[]},t.each(a.indexes,function(t,n){s.data.markers.push(r.value(n)),r.markerIsSet(n)&&r.marker(n).setMap(null)}),l(i,{td:s},v,n,{main:g,shadow:v}),r.store(a,g,v)):t.each(a.indexes,function(t,n){r.marker(n).setMap(S)})}),r}function L(n,e,o){var a=[],r="values"in n.td;return r||(n.td.values=[{options:n.opts}]),n.td.values.length?(v(),t.each(n.td.values,function(t,r){var s,u,d,c,f=p(n,r);if(f.options[o])if(f.options[o][0][0]&&R(f.options[o][0][0]))for(u=0;u<f.options[o].length;u++)for(d=0;d<f.options[o][u].length;d++)f.options[o][u][d]=m(f.options[o][u][d]);else for(u=0;u<f.options[o].length;u++)f.options[o][u]=m(f.options[o][u]);f.options.map=S,c=new q[e](f.options),a.push(c),s=I.add({td:f},e.toLowerCase(),c),l(i,{td:f},c,s)}),void g(n,r?a:a[0])):void g(n,!1)}var b,x=this,M=new P,I=new k,S=null;x._plan=function(t){var n;for(n=0;n<t.length;n++)M.add(new B(x,d,t[n]));r()},x.map=function(t){v(t.latLng,t),l(i,t,S),g(t,S)},x.destroy=function(t){I.clear(),i.empty(),S&&(S=null),g(t,!0)},x.overlay=function(n,e){var o=[],a="values"in n.td;return a||(n.td.values=[{latLng:n.latLng,options:n.opts}]),n.td.values.length?(D.__initialised||(D.prototype=new A.classes.OverlayView,D.__initialised=!0),t.each(n.td.values,function(a,r){var s,u,d=p(n,r),c=t(document.createElement("div")).css({border:"none",borderWidth:0,position:"absolute"});c.append(d.options.content),u=new D(S,d.options,m(d)||m(r),c),o.push(u),c=null,e||(s=I.add(n,"overlay",u),l(i,{td:d},u,s))}),e?o[0]:void g(n,a?o:o[0])):void g(n,!1)},x.marker=function(n){var e,o,a,r="values"in n.td,u=!S;return r||(n.opts.position=n.latLng||m(n.opts.position),n.td.values=[{options:n.opts}]),n.td.values.length?(u&&v(),n.td.cluster&&!S.getBounds()?void q.event.addListenerOnce(S,"bounds_changed",function(){x.marker.apply(x,[n])}):void(n.td.cluster?(n.td.cluster instanceof _?(o=n.td.cluster,a=I.getById(o.id(),!0)):(a=w(n.td.cluster),o=new _(s(n.td.id,!0),a),I.add(n,"clusterer",o,a)),a.beginUpdate(),t.each(n.td.values,function(t,e){var o=p(n,e);o.options.position=m(o.options.position?o.options.position:e),o.options.position&&(o.options.map=S,u&&(S.setCenter(o.options.position),u=!1),a.add(o,e))}),a.endUpdate(),g(n,o)):(e=[],t.each(n.td.values,function(t,o){var a,r,s=p(n,o);s.options.position=m(s.options.position?s.options.position:o),s.options.position&&(s.options.map=S,u&&(S.setCenter(s.options.position),u=!1),r=new A.classes.Marker(s.options),e.push(r),a=I.add({td:s},"marker",r),l(i,{td:s},r,a))}),g(n,r?e:e[0])))):void g(n,!1)},x.getroute=function(t){t.opts.origin=m(t.opts.origin,!0),t.opts.destination=m(t.opts.destination,!0),j().route(t.opts,function(n,e){c(t,e===q.DirectionsStatus.OK?n:!1,e),b.ack()})},x.getdistance=function(t){var n;for(t.opts.origins=h(t.opts.origins),n=0;n<t.opts.origins.length;n++)t.opts.origins[n]=m(t.opts.origins[n],!0);for(t.opts.destinations=h(t.opts.destinations),n=0;n<t.opts.destinations.length;n++)t.opts.destinations[n]=m(t.opts.destinations[n],!0);O().getDistanceMatrix(t.opts,function(n,e){c(t,e===q.DistanceMatrixStatus.OK?n:!1,e),b.ack()})},x.infowindow=function(e){var o=[],r="values"in e.td;r||(e.latLng&&(e.opts.position=e.latLng),e.td.values=[{options:e.opts}]),t.each(e.td.values,function(t,s){var u,d,c=p(e,s);c.options.position=m(c.options.position?c.options.position:s.latLng),S||v(c.options.position),d=new A.classes.InfoWindow(c.options),d&&(a(c.open)||c.open)&&(r?d.open(S,c.anchor||n):d.open(S,c.anchor||(e.latLng?n:e.session.marker?e.session.marker:n))),o.push(d),u=I.add({td:c},"infowindow",d),l(i,{td:c},d,u)}),g(e,r?o:o[0])},x.circle=function(n){var e=[],o="values"in n.td;return o||(n.opts.center=n.latLng||m(n.opts.center),n.td.values=[{options:n.opts}]),n.td.values.length?(t.each(n.td.values,function(t,o){var a,r,s=p(n,o);s.options.center=m(s.options.center?s.options.center:o),S||v(s.options.center),s.options.map=S,r=new A.classes.Circle(s.options),e.push(r),a=I.add({td:s},"circle",r),l(i,{td:s},r,a)}),void g(n,o?e:e[0])):void g(n,!1)},x.getaddress=function(t){c(t,t.results,t.status),b.ack()},x.getlatlng=function(t){c(t,t.results,t.status),b.ack()},x.getmaxzoom=function(t){C().getMaxZoomAtLatLng(t.latLng,function(n){c(t,n.status===q.MaxZoomStatus.OK?n.zoom:!1,status),b.ack()})},x.getelevation=function(t){var n,e=[],o=function(n,e){c(t,e===q.ElevationStatus.OK?n:!1,e),b.ack()};if(t.latLng)e.push(t.latLng);else for(e=h(t.td.locations||[]),n=0;n<e.length;n++)e[n]=m(e[n]);if(e.length)E().getElevationForLocations({locations:e},o);else{if(t.td.path&&t.td.path.length)for(n=0;n<t.td.path.length;n++)e.push(m(t.td.path[n]));e.length?E().getElevationAlongPath({path:e,samples:t.td.samples},o):b.ack()}},x.defaults=function(n){t.each(n.td,function(n,o){A[n]=e(A[n])?t.extend({},A[n],o):o}),b.ack(!0)},x.rectangle=function(n){var e=[],o="values"in n.td;return o||(n.td.values=[{options:n.opts}]),n.td.values.length?(t.each(n.td.values,function(t,o){var a,r,s=p(n,o);s.options.bounds=y(s.options.bounds?s.options.bounds:o),S||v(s.options.bounds.getCenter()),s.options.map=S,r=new A.classes.Rectangle(s.options),e.push(r),a=I.add({td:s},"rectangle",r),l(i,{td:s},r,a)}),void g(n,o?e:e[0])):void g(n,!1)},x.polyline=function(t){L(t,"Polyline","path")},x.polygon=function(t){L(t,"Polygon","paths")},x.trafficlayer=function(t){v();var n=I.get("trafficlayer");n||(n=new A.classes.TrafficLayer,n.setMap(S),I.add(t,"trafficlayer",n)),g(t,n)},x.bicyclinglayer=function(t){v();var n=I.get("bicyclinglayer");n||(n=new A.classes.BicyclingLayer,n.setMap(S),I.add(t,"bicyclinglayer",n)),g(t,n)},x.groundoverlay=function(t){t.opts.bounds=y(t.opts.bounds),t.opts.bounds&&v(t.opts.bounds.getCenter());var n,e=new A.classes.GroundOverlay(t.opts.url,t.opts.bounds,t.opts.opts);e.setMap(S),n=I.add(t,"groundoverlay",e),g(t,e,n)},x.streetviewpanorama=function(n){n.opts.opts||(n.opts.opts={}),n.latLng?n.opts.opts.position=n.latLng:n.opts.opts.position&&(n.opts.opts.position=m(n.opts.opts.position)),n.td.divId?n.opts.container=document.getElementById(n.td.divId):n.opts.container&&(n.opts.container=t(n.opts.container).get(0));var e,o=new A.classes.StreetViewPanorama(n.opts.container,n.opts.opts);o&&S.setStreetView(o),e=I.add(n,"streetviewpanorama",o),g(n,o,e)},x.kmllayer=function(n){var e=[],o="values"in n.td;return o||(n.td.values=[{options:n.opts}]),n.td.values.length?(t.each(n.td.values,function(t,o){var a,r,s,d=p(n,o);S||v(),s=d.options,d.options.opts&&(s=d.options.opts,d.options.url&&(s.url=d.options.url)),s.map=S,r=u("3.10")?new A.classes.KmlLayer(s):new A.classes.KmlLayer(s.url,s),e.push(r),a=I.add({td:d},"kmllayer",r),l(i,{td:d},r,a)}),void g(n,o?e:e[0])):void g(n,!1)},x.panel=function(n){v();var e,o,r=0,s=0,u=t(document.createElement("div"));u.css({position:"absolute",zIndex:1e3,visibility:"hidden"}),n.opts.content&&(o=t(n.opts.content),u.append(o),i.first().prepend(u),a(n.opts.left)?a(n.opts.right)?n.opts.center&&(r=(i.width()-o.width())/2):r=i.width()-o.width()-n.opts.right:r=n.opts.left,a(n.opts.top)?a(n.opts.bottom)?n.opts.middle&&(s=(i.height()-o.height())/2):s=i.height()-o.height()-n.opts.bottom:s=n.opts.top,u.css({top:s,left:r,visibility:"visible"})),e=I.add(n,"panel",u),g(n,u,e),u=null},x.directionsrenderer=function(n){n.opts.map=S;var e,o=new q.DirectionsRenderer(n.opts);n.td.divId?o.setPanel(document.getElementById(n.td.divId)):n.td.container&&o.setPanel(t(n.td.container).get(0)),e=I.add(n,"directionsrenderer",o),g(n,o,e)},x.getgeoloc=function(t){g(t,t.latLng)},x.styledmaptype=function(t){v();var n=new A.classes.StyledMapType(t.td.styles,t.opts);S.mapTypes.set(t.td.id,n),g(t,n)},x.imagemaptype=function(t){v();var n=new A.classes.ImageMapType(t.opts);S.mapTypes.set(t.td.id,n),g(t,n)},x.autofit=function(n){var e=new q.LatLngBounds;t.each(I.all(),function(t,n){n.getPosition?e.extend(n.getPosition()):n.getBounds?(e.extend(n.getBounds().getNorthEast()),e.extend(n.getBounds().getSouthWest())):n.getPaths?n.getPaths().forEach(function(t){t.forEach(function(t){e.extend(t)})}):n.getPath?n.getPath().forEach(function(t){e.extend(t)}):n.getCenter?e.extend(n.getCenter()):"function"==typeof _&&n instanceof _&&(n=I.getById(n.id(),!0),n&&n.autofit(e))}),e.isEmpty()||S.getBounds()&&S.getBounds().equals(e)||("maxZoom"in n.td&&q.event.addListenerOnce(S,"bounds_changed",function(){this.getZoom()>n.td.maxZoom&&this.setZoom(n.td.maxZoom)}),S.fitBounds(e)),g(n,!0)},x.clear=function(n){if(o(n.td)){if(I.clearById(n.td)||I.objClearById(n.td))return void g(n,!0);n.td={name:n.td}}n.td.id?t.each(h(n.td.id),function(t,n){I.clearById(n)||I.objClearById(n)}):(I.clear(h(n.td.name),n.td.last,n.td.first,n.td.tag),I.objClear(h(n.td.name),n.td.last,n.td.first,n.td.tag)),g(n,!0)},x.get=function(e,i,a){var r,s,u=i?e:e.td;return i||(a=u.full),o(u)?(s=I.getById(u,!1,a)||I.objGetById(u),s===!1&&(r=u,u={})):r=u.name,"map"===r&&(s=S),s||(s=[],u.id?(t.each(h(u.id),function(t,n){s.push(I.getById(n,!1,a)||I.objGetById(n))}),R(u.id)||(s=s[0])):(t.each(r?h(r):[n],function(n,e){var o;u.first?(o=I.get(e,!1,u.tag,a),o&&s.push(o)):u.all?t.each(I.all(e,u.tag,a),function(t,n){s.push(n)}):(o=I.get(e,!0,u.tag,a),o&&s.push(o))}),u.all||R(r)||(s=s[0]))),s=R(s)||!u.all?s:[s],i?s:void g(e,s)},x.exec=function(n){t.each(h(n.td.func),function(e,o){t.each(x.get(n.td,!0,n.td.hasOwnProperty("full")?n.td.full:!0),function(t,n){o.call(i,n)})}),g(n,!0)},x.trigger=function(n){if(o(n.td))q.event.trigger(S,n.td);else{var e=[S,n.td.eventName];n.td.var_args&&t.each(n.td.var_args,function(t,n){e.push(n)}),q.event.trigger.apply(q.event,e)}c(n),b.ack()}}var A,q,Z=0,z=t.isFunction,R=t.isArray,V={},G=new I;t.fn.gmap3=function(){var n,e=[],o=!0,i=[];for(r(),n=0;n<arguments.length;n++)arguments[n]&&e.push(arguments[n]);return e.length||e.push("map"),t.each(this,function(){var n=t(this),a=n.data("gmap3");o=!1,a||(a=new U(n),n.data("gmap3",a)),1!==e.length||"get"!==e[0]&&!x(e[0])?a._plan(e):i.push("get"===e[0]?a.get("map",!0):a.get(e[0].get,!0,e[0].get.full))}),i.length?1===i.length?i[0]:i:this}}(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/mc-list.js CHANGED
@@ -3,15 +3,17 @@
3
  $(function () {
4
  $("li.mc-events").children().not(".event-date").hide();
5
  $("li.current-day").children().show();
6
- $(document).on("click", ".event-date",
7
  function (e) {
8
  e.preventDefault();
9
- $(this).parent().children().not(".event-date").toggle().attr("tabindex", "-1").focus();
10
- var visible = $(this).parent().find(".vevent").is(":visible");
 
 
11
  if (visible) {
12
- $(this).parent().find(".vevent").attr("aria-expanded", "true");
13
  } else {
14
- $(this).parent().find(".vevent").attr("aria-expanded", "false");
15
  }
16
  });
17
  });
3
  $(function () {
4
  $("li.mc-events").children().not(".event-date").hide();
5
  $("li.current-day").children().show();
6
+ $(document).on("click", ".event-date button",
7
  function (e) {
8
  e.preventDefault();
9
+ var vevent = $( this ).closest( '.mc-events' ).find( '.vevent:first' );
10
+ $( this ).closest( '.mc-events' ).find( '.vevent' ).toggle();
11
+ vevent.attr("tabindex", "-1").focus();
12
+ var visible = $(this).closest( '.mc-events' ).find(".vevent").is(":visible");
13
  if (visible) {
14
+ $(this).closest( '.mc-events' ).attr("aria-expanded", "true");
15
  } else {
16
+ $(this).closest( '.mc-events' ).attr("aria-expanded", "false");
17
  }
18
  });
19
  });
js/pickadate/themes/default.date.css CHANGED
@@ -37,11 +37,11 @@
37
  }
38
  }
39
 
40
- .picker__select--month {
41
  width: 35%
42
  }
43
 
44
- .picker__select--year {
45
  width: 22.5%
46
  }
47
 
37
  }
38
  }
39
 
40
+ .picker__holder .picker__box .picker__select--month {
41
  width: 35%
42
  }
43
 
44
+ .picker__holder .picker__box .picker__select--year {
45
  width: 22.5%
46
  }
47
 
lang/my-calendar-ca.mo CHANGED
Binary file
lang/my-calendar-cs_CZ.mo DELETED
Binary file
lang/my-calendar-de_DE.mo CHANGED
Binary file
lang/my-calendar-es_ES.mo DELETED
Binary file
lang/my-calendar-fi.mo CHANGED
Binary file
lang/my-calendar-fr_FR.mo DELETED
Binary file
lang/my-calendar-it_IT.mo CHANGED
Binary file
lang/my-calendar-ja.mo DELETED
Binary file
lang/my-calendar-pl_PL.mo DELETED
Binary file
lang/my-calendar-pt_BR.mo CHANGED
Binary file
lang/my-calendar-pt_PT.mo DELETED
Binary file
lang/my-calendar-ru_RU.mo CHANGED
Binary file
lang/my-calendar-sv_SE.mo CHANGED
Binary file
lang/my-calendar.pot DELETED
@@ -1,4046 +0,0 @@
1
- # Copyright (C) 2014 My Calendar
2
- # This file is distributed under the same license as the My Calendar package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: My Calendar 2.3.0\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/tag/my-calendar\n"
7
- "POT-Creation-Date: 2014-04-10 20:20:10+00:00\n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=UTF-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
12
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
- "Language-Team: LANGUAGE <LL@li.org>\n"
14
-
15
- #: my-calendar-api.php:25
16
- msgid "The My Calendar API is not enabled."
17
- msgstr ""
18
-
19
- #: my-calendar-behaviors.php:33
20
- msgid "Behavior Settings saved"
21
- msgstr ""
22
-
23
- #: my-calendar-behaviors.php:48
24
- msgid "My Calendar Behaviors"
25
- msgstr ""
26
-
27
- #: my-calendar-behaviors.php:55
28
- msgid "Calendar Behavior Settings"
29
- msgstr ""
30
-
31
- #: my-calendar-behaviors.php:60
32
- msgid "Insert scripts on these pages (comma separated post IDs)"
33
- msgstr ""
34
-
35
- #: my-calendar-behaviors.php:63
36
- msgid "Calendar Behaviors: Grid View"
37
- msgstr ""
38
-
39
- #: my-calendar-behaviors.php:65
40
- msgid "Update Grid View JavaScript"
41
- msgstr ""
42
-
43
- #: my-calendar-behaviors.php:65
44
- msgid "Disable Grid Javascript"
45
- msgstr ""
46
-
47
- #: my-calendar-behaviors.php:68
48
- msgid "Edit jQuery scripts for My Calendar in Grid View"
49
- msgstr ""
50
-
51
- #: my-calendar-behaviors.php:75 my-calendar-behaviors.php:105
52
- #: my-calendar-behaviors.php:135 my-calendar-behaviors.php:165
53
- msgid "Comparing scripts with latest installed version of My Calendar"
54
- msgstr ""
55
-
56
- #: my-calendar-behaviors.php:75 my-calendar-behaviors.php:105
57
- #: my-calendar-behaviors.php:135 my-calendar-behaviors.php:165
58
- #: my-calendar-styles.php:217
59
- msgid "Latest (from plugin)"
60
- msgstr ""
61
-
62
- #: my-calendar-behaviors.php:75 my-calendar-behaviors.php:105
63
- #: my-calendar-behaviors.php:135 my-calendar-behaviors.php:165
64
- #: my-calendar-styles.php:217
65
- msgid "Current (in use)"
66
- msgstr ""
67
-
68
- #: my-calendar-behaviors.php:79
69
- msgid "There have been updates to the calendar view scripts."
70
- msgstr ""
71
-
72
- #: my-calendar-behaviors.php:79 my-calendar-behaviors.php:109
73
- #: my-calendar-behaviors.php:139 my-calendar-behaviors.php:169
74
- msgid "Compare your scripts with latest installed version of My Calendar."
75
- msgstr ""
76
-
77
- #: my-calendar-behaviors.php:83 my-calendar-behaviors.php:113
78
- #: my-calendar-behaviors.php:143 my-calendar-behaviors.php:173
79
- msgid "Your script matches that included with My Calendar."
80
- msgstr ""
81
-
82
- #: my-calendar-behaviors.php:88 my-calendar-behaviors.php:118
83
- #: my-calendar-behaviors.php:148 my-calendar-behaviors.php:179
84
- msgid "Save"
85
- msgstr ""
86
-
87
- #: my-calendar-behaviors.php:93
88
- msgid "Calendar Behaviors: List View"
89
- msgstr ""
90
-
91
- #: my-calendar-behaviors.php:95
92
- msgid "Update List JavaScript"
93
- msgstr ""
94
-
95
- #: my-calendar-behaviors.php:95
96
- msgid "Disable List JavaScript"
97
- msgstr ""
98
-
99
- #: my-calendar-behaviors.php:98
100
- msgid "Edit the jQuery scripts for My Calendar in List format"
101
- msgstr ""
102
-
103
- #: my-calendar-behaviors.php:109
104
- msgid "There have been updates to the list view scripts."
105
- msgstr ""
106
-
107
- #: my-calendar-behaviors.php:123
108
- msgid "Calendar Behaviors: Mini Calendar View"
109
- msgstr ""
110
-
111
- #: my-calendar-behaviors.php:125
112
- msgid "Update Mini View JavaScript"
113
- msgstr ""
114
-
115
- #: my-calendar-behaviors.php:125
116
- msgid "Disable Mini JavaScript"
117
- msgstr ""
118
-
119
- #: my-calendar-behaviors.php:128
120
- msgid "Edit jQuery scripts in Mini view"
121
- msgstr ""
122
-
123
- #: my-calendar-behaviors.php:139
124
- msgid "There have been updates to the mini view scripts."
125
- msgstr ""
126
-
127
- #: my-calendar-behaviors.php:153
128
- msgid "Calendar Behaviors: AJAX"
129
- msgstr ""
130
-
131
- #: my-calendar-behaviors.php:155
132
- msgid "Update AJAX JavaScript"
133
- msgstr ""
134
-
135
- #: my-calendar-behaviors.php:155
136
- msgid "Disable AJAX Navigation"
137
- msgstr ""
138
-
139
- #: my-calendar-behaviors.php:158
140
- msgid "Edit jQuery scripts for AJAX navigation"
141
- msgstr ""
142
-
143
- #: my-calendar-behaviors.php:169
144
- msgid "There have been updates to the AJAX scripts."
145
- msgstr ""
146
-
147
- #: my-calendar-behaviors.php:185
148
- msgid ""
149
- "Resetting JavaScript will set that script to the version currently "
150
- "distributed with the plug-in."
151
- msgstr ""
152
-
153
- #: my-calendar-categories.php:100 my-calendar-categories.php:140
154
- msgid "Default category changed."
155
- msgstr ""
156
-
157
- #: my-calendar-categories.php:103
158
- msgid "Category added successfully"
159
- msgstr ""
160
-
161
- #: my-calendar-categories.php:105
162
- msgid "Category addition failed."
163
- msgstr ""
164
-
165
- #: my-calendar-categories.php:120
166
- msgid "Category deleted successfully. Categories in calendar updated."
167
- msgstr ""
168
-
169
- #: my-calendar-categories.php:122
170
- msgid "Category deleted successfully. Categories in calendar not updated."
171
- msgstr ""
172
-
173
- #: my-calendar-categories.php:124
174
- msgid "Category not deleted. Categories in calendar updated."
175
- msgstr ""
176
-
177
- #: my-calendar-categories.php:146
178
- msgid "Holiday category changed."
179
- msgstr ""
180
-
181
- #: my-calendar-categories.php:153
182
- msgid "Category edited successfully."
183
- msgstr ""
184
-
185
- #: my-calendar-categories.php:155
186
- msgid "Category was not edited."
187
- msgstr ""
188
-
189
- #: my-calendar-categories.php:189 my-calendar-categories.php:215
190
- #: my-calendar-categories.php:240
191
- msgid "Add Category"
192
- msgstr ""
193
-
194
- #: my-calendar-categories.php:191 my-calendar-categories.php:215
195
- msgid "Edit Category"
196
- msgstr ""
197
-
198
- #: my-calendar-categories.php:199
199
- msgid "Category Editor"
200
- msgstr ""
201
-
202
- #: my-calendar-categories.php:222 my-calendar-categories.php:288
203
- msgid "Category Name"
204
- msgstr ""
205
-
206
- #: my-calendar-categories.php:222
207
- msgid "Color"
208
- msgstr ""
209
-
210
- #: my-calendar-categories.php:223 my-calendar-categories.php:290
211
- msgid "Category Icon"
212
- msgstr ""
213
-
214
- #: my-calendar-categories.php:235
215
- msgid "Private category (logged-in users only)"
216
- msgstr ""
217
-
218
- #: my-calendar-categories.php:236
219
- msgid "Default category"
220
- msgstr ""
221
-
222
- #: my-calendar-categories.php:237
223
- msgid "Holiday Category"
224
- msgstr ""
225
-
226
- #: my-calendar-categories.php:240 my-calendar-locations.php:162
227
- #: my-calendar-styles.php:207
228
- msgid "Save Changes"
229
- msgstr ""
230
-
231
- #: my-calendar-categories.php:248
232
- msgid "Add a New Category"
233
- msgstr ""
234
-
235
- #: my-calendar-categories.php:252
236
- msgid "Category List"
237
- msgstr ""
238
-
239
- #: my-calendar-categories.php:274 my-calendar.php:349
240
- msgid "Manage Categories"
241
- msgstr ""
242
-
243
- #: my-calendar-categories.php:287 my-calendar-event-manager.php:1294
244
- #: my-calendar-group-manager.php:763 my-calendar-locations.php:243
245
- msgid "ID"
246
- msgstr ""
247
-
248
- #: my-calendar-categories.php:289
249
- msgid "Category Color"
250
- msgstr ""
251
-
252
- #: my-calendar-categories.php:291
253
- msgid "Private"
254
- msgstr ""
255
-
256
- #: my-calendar-categories.php:292 my-calendar-categories.php:310
257
- #: my-calendar-event-manager.php:1335 my-calendar-locations.php:245
258
- #: my-calendar-locations.php:257 my-calendar-output.php:369
259
- msgid "Edit"
260
- msgstr ""
261
-
262
- #: my-calendar-categories.php:293 my-calendar-categories.php:314
263
- #: my-calendar-event-manager.php:173 my-calendar-event-manager.php:896
264
- #: my-calendar-event-manager.php:1338 my-calendar-locations.php:246
265
- #: my-calendar-locations.php:258 my-calendar-output.php:369
266
- msgid "Delete"
267
- msgstr ""
268
-
269
- #: my-calendar-categories.php:306
270
- msgid "(Default)"
271
- msgstr ""
272
-
273
- #: my-calendar-categories.php:306
274
- msgid "(Holiday)"
275
- msgstr ""
276
-
277
- #: my-calendar-categories.php:309
278
- msgid "Yes"
279
- msgstr ""
280
-
281
- #: my-calendar-categories.php:309
282
- msgid "No"
283
- msgstr ""
284
-
285
- #: my-calendar-categories.php:312 my-calendar-group-manager.php:827
286
- #: my-calendar-output.php:99
287
- msgid "N/A"
288
- msgstr ""
289
-
290
- #: my-calendar-categories.php:314 my-calendar-locations.php:258
291
- msgid "Are you sure you want to delete this category?"
292
- msgstr ""
293
-
294
- #: my-calendar-categories.php:320
295
- msgid "There are no categories in the database - or something has gone wrong!"
296
- msgstr ""
297
-
298
- #: my-calendar-core.php:55 my-calendar.php:357
299
- msgid "Settings"
300
- msgstr ""
301
-
302
- #: my-calendar-core.php:56 my-calendar.php:358
303
- msgid "Help"
304
- msgstr ""
305
-
306
- #: my-calendar-core.php:309
307
- msgid "Characters left: "
308
- msgstr ""
309
-
310
- #: my-calendar-core.php:327
311
- msgid ""
312
- "<br /><strong>Note:</strong> Please review the <a class=\"thickbox\" href="
313
- "\"%1$s\">changelog</a> before upgrading."
314
- msgstr ""
315
-
316
- #: my-calendar-core.php:598 my-calendar-install.php:253
317
- msgid "Accessible Entrance"
318
- msgstr ""
319
-
320
- #: my-calendar-core.php:599 my-calendar-install.php:254
321
- msgid "Accessible Parking Designated"
322
- msgstr ""
323
-
324
- #: my-calendar-core.php:600 my-calendar-install.php:255
325
- msgid "Accessible Restrooms"
326
- msgstr ""
327
-
328
- #: my-calendar-core.php:601 my-calendar-install.php:256
329
- msgid "Accessible Seating"
330
- msgstr ""
331
-
332
- #: my-calendar-core.php:602 my-calendar-install.php:257
333
- msgid "Accessible Transportation Available"
334
- msgstr ""
335
-
336
- #: my-calendar-core.php:603 my-calendar-install.php:258
337
- msgid "Wheelchair Accessible"
338
- msgstr ""
339
-
340
- #: my-calendar-core.php:604 my-calendar-install.php:259
341
- msgid "Courtesy Wheelchairs"
342
- msgstr ""
343
-
344
- #: my-calendar-core.php:605 my-calendar-install.php:260
345
- msgid "Bariatric Seating Available"
346
- msgstr ""
347
-
348
- #: my-calendar-core.php:606 my-calendar-install.php:261
349
- msgid "Elevator to all public areas"
350
- msgstr ""
351
-
352
- #: my-calendar-core.php:607 my-calendar-install.php:262
353
- msgid "Braille Signage"
354
- msgstr ""
355
-
356
- #: my-calendar-core.php:608 my-calendar-install.php:263
357
- msgid "Fragrance-Free Policy"
358
- msgstr ""
359
-
360
- #: my-calendar-core.php:609 my-calendar-core.php:623
361
- #: my-calendar-install.php:264 my-calendar-install.php:278
362
- msgid "Other"
363
- msgstr ""
364
-
365
- #: my-calendar-core.php:612 my-calendar-install.php:267
366
- msgid "Audio Description"
367
- msgstr ""
368
-
369
- #: my-calendar-core.php:613 my-calendar-install.php:268
370
- msgid "ASL Interpretation"
371
- msgstr ""
372
-
373
- #: my-calendar-core.php:614 my-calendar-install.php:269
374
- msgid "ASL Interpretation with voicing"
375
- msgstr ""
376
-
377
- #: my-calendar-core.php:615 my-calendar-install.php:270
378
- msgid "Deaf-Blind ASL"
379
- msgstr ""
380
-
381
- #: my-calendar-core.php:616 my-calendar-install.php:271
382
- msgid "Real-time Captioning"
383
- msgstr ""
384
-
385
- #: my-calendar-core.php:617 my-calendar-install.php:272
386
- msgid "Scripted Captioning"
387
- msgstr ""
388
-
389
- #: my-calendar-core.php:618 my-calendar-install.php:273
390
- msgid "Assisted Listening Devices"
391
- msgstr ""
392
-
393
- #: my-calendar-core.php:619 my-calendar-install.php:274
394
- msgid "Tactile/Touch Tour"
395
- msgstr ""
396
-
397
- #: my-calendar-core.php:620 my-calendar-install.php:275
398
- msgid "Braille Playbill"
399
- msgstr ""
400
-
401
- #: my-calendar-core.php:621 my-calendar-install.php:276
402
- msgid "Large Print Playbill"
403
- msgstr ""
404
-
405
- #: my-calendar-core.php:622 my-calendar-install.php:277
406
- msgid "Sensory Friendly"
407
- msgstr ""
408
-
409
- #: my-calendar-core.php:987 my-calendar-event-manager.php:427
410
- #: my-calendar-event-manager.php:898
411
- msgid "Add Event"
412
- msgstr ""
413
-
414
- #: my-calendar-core.php:992 my-calendar-core.php:1638
415
- #: my-calendar-generator.php:145
416
- msgid "Events"
417
- msgstr ""
418
-
419
- #: my-calendar-core.php:997 my-calendar-output.php:1166
420
- #: my-calendar-output.php:1372 my-calendar-settings.php:519
421
- msgid "Categories"
422
- msgstr ""
423
-
424
- #: my-calendar-core.php:1002
425
- msgid "Locations"
426
- msgstr ""
427
-
428
- #: my-calendar-core.php:1062
429
- msgid "Event Notifications"
430
- msgstr ""
431
-
432
- #: my-calendar-core.php:1213
433
- msgid "Is this your calendar page?"
434
- msgstr ""
435
-
436
- #: my-calendar-core.php:1311
437
- msgid ""
438
- "Please read the FAQ and other Help documents before making a support request."
439
- msgstr ""
440
-
441
- #: my-calendar-core.php:1313
442
- msgid "Please describe your problem in detail. I'm not psychic."
443
- msgstr ""
444
-
445
- #: my-calendar-core.php:1318
446
- msgid ""
447
- "Thank you for supporting the continuing development of this plug-in! I'll "
448
- "get back to you as soon as I can."
449
- msgstr ""
450
-
451
- #: my-calendar-core.php:1320
452
- msgid ""
453
- "I'll get back to you as soon as I can, after dealing with any support "
454
- "requests from plug-in supporters."
455
- msgstr ""
456
-
457
- #: my-calendar-core.php:1323
458
- msgid "Sorry! I couldn't send that message. Here's the text of your request:"
459
- msgstr ""
460
-
461
- #: my-calendar-core.php:1333
462
- msgid ""
463
- "Please note: I do keep records of those who have donated, <strong>but if "
464
- "your donation came from somebody other than your account at this web site, "
465
- "please note this in your message.</strong>"
466
- msgstr ""
467
-
468
- #: my-calendar-core.php:1335
469
- msgid "From:"
470
- msgstr ""
471
-
472
- #: my-calendar-core.php:1338
473
- msgid ""
474
- "I have read <a href=\"http://www.joedolson.com/articles/my-calendar/faq/"
475
- "\">the FAQ for this plug-in</a>."
476
- msgstr ""
477
-
478
- #: my-calendar-core.php:1341
479
- msgid ""
480
- "I have <a href=\"http://www.joedolson.com/donate.php\">made a donation to "
481
- "help support this plug-in</a>."
482
- msgstr ""
483
-
484
- #: my-calendar-core.php:1344
485
- msgid ""
486
- "I have <a href=\"http://www.joedolson.com/articles/my-calendar/users-guide/"
487
- "\">purchased the User's Guide</a>, but could not find an answer to this "
488
- "question."
489
- msgstr ""
490
-
491
- #: my-calendar-core.php:1350
492
- msgid "Send Support Request"
493
- msgstr ""
494
-
495
- #: my-calendar-core.php:1353
496
- msgid ""
497
- "The following additional information will be sent with your support request:"
498
- msgstr ""
499
-
500
- #: my-calendar-core.php:1373 my-calendar-templates.php:515
501
- msgid "Does not recur"
502
- msgstr ""
503
-
504
- #: my-calendar-core.php:1374 my-calendar-generator.php:146
505
- msgid "Days"
506
- msgstr ""
507
-
508
- #: my-calendar-core.php:1375
509
- msgid "Days, weekdays only"
510
- msgstr ""
511
-
512
- #: my-calendar-core.php:1376
513
- msgid "Weeks"
514
- msgstr ""
515
-
516
- #: my-calendar-core.php:1377
517
- msgid "Months by date (e.g., the 24th of each month)"
518
- msgstr ""
519
-
520
- #: my-calendar-core.php:1378
521
- msgid "Month by day (e.g., the 3rd Monday of each month)"
522
- msgstr ""
523
-
524
- #: my-calendar-core.php:1379 my-calendar-output.php:405
525
- msgid "Year"
526
- msgstr ""
527
-
528
- #: my-calendar-core.php:1635
529
- msgid "event"
530
- msgstr ""
531
-
532
- #: my-calendar-core.php:1636
533
- msgid "events"
534
- msgstr ""
535
-
536
- #: my-calendar-core.php:1637
537
- msgid "Event"
538
- msgstr ""
539
-
540
- #: my-calendar-core.php:1649
541
- msgid "Create New %s"
542
- msgstr ""
543
-
544
- #: my-calendar-core.php:1650
545
- msgid "Modify %s"
546
- msgstr ""
547
-
548
- #: my-calendar-core.php:1651
549
- msgid "New %s"
550
- msgstr ""
551
-
552
- #: my-calendar-core.php:1652
553
- msgid "View %s"
554
- msgstr ""
555
-
556
- #: my-calendar-core.php:1653
557
- msgid "Search %s"
558
- msgstr ""
559
-
560
- #: my-calendar-core.php:1654
561
- msgid "No %s found"
562
- msgstr ""
563
-
564
- #: my-calendar-core.php:1655
565
- msgid "No %s found in Trash"
566
- msgstr ""
567
-
568
- #: my-calendar-core.php:1691
569
- msgid "%s Categories"
570
- msgstr ""
571
-
572
- #: my-calendar-core.php:1709
573
- msgid "%1$s updated. <a href=\"%2$s\">View %1$s</a>"
574
- msgstr ""
575
-
576
- #: my-calendar-core.php:1710
577
- msgid "Custom field updated."
578
- msgstr ""
579
-
580
- #: my-calendar-core.php:1711
581
- msgid "Custom field deleted."
582
- msgstr ""
583
-
584
- #: my-calendar-core.php:1712
585
- msgid "%s updated."
586
- msgstr ""
587
-
588
- #. translators: %s: date and time of the revision
589
- #: my-calendar-core.php:1714
590
- msgid "%1$s restored to revision from %2$ss"
591
- msgstr ""
592
-
593
- #: my-calendar-core.php:1715
594
- msgid "%1$s published. <a href=\"%2$s\">View %3$s</a>"
595
- msgstr ""
596
-
597
- #: my-calendar-core.php:1716
598
- msgid "%s saved."
599
- msgstr ""
600
-
601
- #: my-calendar-core.php:1717
602
- msgid "%1$s submitted. <a target=\"_blank\" href=\"%2$s\">Preview %3$s</a>"
603
- msgstr ""
604
-
605
- #: my-calendar-core.php:1718
606
- msgid ""
607
- "%1$s scheduled for: <strong>%2$s</strong>. <a target=\"_blank\" href=\"%3$s"
608
- "\">Preview %4$s</a>"
609
- msgstr ""
610
-
611
- #: my-calendar-core.php:1719
612
- msgid "M j, Y @ G:i"
613
- msgstr ""
614
-
615
- #: my-calendar-core.php:1720
616
- msgid "%1$s draft updated. <a target=\"_blank\" href=\"%2$s\">Preview %3$s</a>"
617
- msgstr ""
618
-
619
- #: my-calendar-event-manager.php:162
620
- msgid "Delete Event"
621
- msgstr ""
622
-
623
- #: my-calendar-event-manager.php:162
624
- msgid "Are you sure you want to delete this event?"
625
- msgstr ""
626
-
627
- #: my-calendar-event-manager.php:178
628
- msgid "You do not have permission to delete that event."
629
- msgstr ""
630
-
631
- #: my-calendar-event-manager.php:192
632
- msgid "You do not have permission to approve that event."
633
- msgstr ""
634
-
635
- #: my-calendar-event-manager.php:207
636
- msgid "You do not have permission to reject that event."
637
- msgstr ""
638
-
639
- #: my-calendar-event-manager.php:239
640
- msgid "%1$d events deleted successfully out of %2$d selected"
641
- msgstr ""
642
-
643
- #: my-calendar-event-manager.php:241 my-calendar-event-manager.php:266
644
- #: my-calendar-event-manager.php:293 my-calendar-event-manager.php:459
645
- #: my-calendar-event-manager.php:546 my-calendar-event-manager.php:561
646
- #: my-calendar-event-manager.php:581 my-calendar-event-manager.php:1563
647
- #: my-calendar-event-manager.php:1566 my-calendar-event-manager.php:1575
648
- #: my-calendar-event-manager.php:1580 my-calendar-event-manager.php:1593
649
- #: my-calendar-event-manager.php:1599 my-calendar-event-manager.php:1604
650
- #: my-calendar-group-manager.php:50 my-calendar-group-manager.php:76
651
- #: my-calendar-group-manager.php:155 my-calendar-group-manager.php:609
652
- msgid "Error"
653
- msgstr ""
654
-
655
- #: my-calendar-event-manager.php:241
656
- msgid "Your events have not been deleted. Please investigate."
657
- msgstr ""
658
-
659
- #: my-calendar-event-manager.php:266
660
- msgid "Your events have not been approved. Please investigate."
661
- msgstr ""
662
-
663
- #: my-calendar-event-manager.php:271
664
- msgid "%1$d events approved successfully out of %2$d selected"
665
- msgstr ""
666
-
667
- #: my-calendar-event-manager.php:293
668
- msgid "Could not archive those events."
669
- msgstr ""
670
-
671
- #: my-calendar-event-manager.php:298
672
- msgid "%1$d events archived successfully out of %2$d selected."
673
- msgstr ""
674
-
675
- #: my-calendar-event-manager.php:305 my-calendar-settings.php:184
676
- #: my-calendar-settings.php:725 my-calendar.php:347
677
- msgid "Manage Events"
678
- msgstr ""
679
-
680
- #: my-calendar-event-manager.php:310
681
- msgid "My Events"
682
- msgstr ""
683
-
684
- #: my-calendar-event-manager.php:337 my-calendar-settings.php:368
685
- msgid ""
686
- "My Calendar has identified that you have the Calendar plugin by Kieran "
687
- "O'Shea installed. You can import those events and categories into the My "
688
- "Calendar database. Would you like to import these events?"
689
- msgstr ""
690
-
691
- #: my-calendar-event-manager.php:344 my-calendar-settings.php:374
692
- msgid "Import from Calendar"
693
- msgstr ""
694
-
695
- #: my-calendar-event-manager.php:349
696
- msgid ""
697
- "Although it is possible that this import could fail to import your events "
698
- "correctly, it should not have any impact on your existing Calendar database. "
699
- "If you encounter any problems, <a href=\"http://www.joedolson.com/contact.php"
700
- "\">please contact me</a>!"
701
- msgstr ""
702
-
703
- #: my-calendar-event-manager.php:391
704
- msgid "Return to Calendar"
705
- msgstr ""
706
-
707
- #: my-calendar-event-manager.php:401
708
- msgid "Currently editing your local calendar"
709
- msgstr ""
710
-
711
- #: my-calendar-event-manager.php:403
712
- msgid "Currently editing your central calendar"
713
- msgstr ""
714
-
715
- #: my-calendar-event-manager.php:409 my-calendar-event-manager.php:895
716
- #: my-calendar-group-manager.php:799
717
- msgid "Edit Event"
718
- msgstr ""
719
-
720
- #: my-calendar-event-manager.php:412 my-calendar-event-manager.php:421
721
- msgid "You must provide an event id in order to edit it"
722
- msgstr ""
723
-
724
- #: my-calendar-event-manager.php:418
725
- msgid "Copy Event"
726
- msgstr ""
727
-
728
- #: my-calendar-event-manager.php:459
729
- msgid "I'm sorry! I couldn't add that event to the database."
730
- msgstr ""
731
-
732
- #: my-calendar-event-manager.php:470
733
- msgid "Event saved. An administrator will review and approve your event."
734
- msgstr ""
735
-
736
- #: my-calendar-event-manager.php:481
737
- msgid "Event added. It will now show on the calendar."
738
- msgstr ""
739
-
740
- #: my-calendar-event-manager.php:483
741
- msgid " <a href=\"%s\">View Event</a>"
742
- msgstr ""
743
-
744
- #: my-calendar-event-manager.php:491 my-calendar-group-manager.php:48
745
- #: my-calendar-group-manager.php:151
746
- msgid "View <a href=\"%s\">your calendar</a>."
747
- msgstr ""
748
-
749
- #: my-calendar-event-manager.php:523
750
- msgid "Date/time information for this event has been updated."
751
- msgstr ""
752
-
753
- #: my-calendar-event-manager.php:546 my-calendar-group-manager.php:155
754
- msgid "Your event was not updated."
755
- msgstr ""
756
-
757
- #: my-calendar-event-manager.php:550 my-calendar-group-manager.php:54
758
- #: my-calendar-group-manager.php:159
759
- msgid "Event updated successfully"
760
- msgstr ""
761
-
762
- #: my-calendar-event-manager.php:554 my-calendar-group-manager.php:163
763
- msgid "You do not have sufficient permissions to edit that event."
764
- msgstr ""
765
-
766
- #: my-calendar-event-manager.php:561
767
- msgid "You can't delete an event if you haven't submitted an event id"
768
- msgstr ""
769
-
770
- #: my-calendar-event-manager.php:579
771
- msgid "Event deleted successfully"
772
- msgstr ""
773
-
774
- #: my-calendar-event-manager.php:581
775
- msgid ""
776
- "Despite issuing a request to delete, the event still remains in the "
777
- "database. Please investigate."
778
- msgstr ""
779
-
780
- #: my-calendar-event-manager.php:594 my-calendar-group-manager.php:175
781
- msgid "Sorry! That's an invalid event key."
782
- msgstr ""
783
-
784
- #: my-calendar-event-manager.php:598 my-calendar-group-manager.php:179
785
- msgid "Sorry! We couldn't find an event with that ID."
786
- msgstr ""
787
-
788
- #: my-calendar-event-manager.php:623
789
- msgid "This event must be approved in order for it to appear on the calendar."
790
- msgstr ""
791
-
792
- #: my-calendar-event-manager.php:672
793
- msgid "Event Description"
794
- msgstr ""
795
-
796
- #: my-calendar-event-manager.php:690
797
- msgid "Short Description"
798
- msgstr ""
799
-
800
- #: my-calendar-event-manager.php:700 my-calendar-group-manager.php:339
801
- msgid "Add an image:"
802
- msgstr ""
803
-
804
- #: my-calendar-event-manager.php:700 my-calendar-group-manager.php:339
805
- msgid "Upload"
806
- msgstr ""
807
-
808
- #: my-calendar-event-manager.php:714 my-calendar-event-manager.php:1299
809
- #: my-calendar-group-manager.php:770 my-calendar-output.php:119
810
- #: my-calendar-settings.php:430 my-calendar-templates.php:196
811
- msgid "Category"
812
- msgstr ""
813
-
814
- #: my-calendar-event-manager.php:735
815
- msgid "URL"
816
- msgstr ""
817
-
818
- #: my-calendar-event-manager.php:735
819
- msgid "Link will expire after event"
820
- msgstr ""
821
-
822
- #: my-calendar-event-manager.php:758
823
- msgid "Recurring"
824
- msgstr ""
825
-
826
- #: my-calendar-event-manager.php:761
827
- msgid "Recurring Events"
828
- msgstr ""
829
-
830
- #: my-calendar-event-manager.php:763
831
- msgid "Repeats"
832
- msgstr ""
833
-
834
- #: my-calendar-event-manager.php:763
835
- msgid "times"
836
- msgstr ""
837
-
838
- #: my-calendar-event-manager.php:764
839
- msgid "every"
840
- msgstr ""
841
-
842
- #: my-calendar-event-manager.php:765
843
- msgid "Units"
844
- msgstr ""
845
-
846
- #: my-calendar-event-manager.php:769
847
- msgid ""
848
- "Your entry is the number of events after the first occurrence of the event: "
849
- "a recurrence of <em>2</em> means the event will happen three times."
850
- msgstr ""
851
-
852
- #: my-calendar-event-manager.php:785
853
- msgid "Event Access"
854
- msgstr ""
855
-
856
- #: my-calendar-event-manager.php:797
857
- msgid "Event Registration Settings"
858
- msgstr ""
859
-
860
- #: my-calendar-event-manager.php:800
861
- msgid "Event Registration"
862
- msgstr ""
863
-
864
- #: my-calendar-event-manager.php:856
865
- msgid ""
866
- "This event ends after the next occurrence begins. Events must end "
867
- "<strong>before</strong> the next occurrence begins."
868
- msgstr ""
869
-
870
- #: my-calendar-event-manager.php:856
871
- msgid ""
872
- "Event end date: <strong>%s %s</strong>. Next occurrence starts: <strong>%s</"
873
- "strong>"
874
- msgstr ""
875
-
876
- #: my-calendar-event-manager.php:908
877
- msgid "Edit Event Post"
878
- msgstr ""
879
-
880
- #: my-calendar-event-manager.php:913
881
- msgid "Manage events"
882
- msgstr ""
883
-
884
- #: my-calendar-event-manager.php:924
885
- msgid ""
886
- "There was an error acquiring information about this event instance. The ID "
887
- "for this event instance was not provided. <strong>You are editing this "
888
- "entire recurrence set.</strong>"
889
- msgstr ""
890
-
891
- #: my-calendar-event-manager.php:928
892
- msgid "Event Details"
893
- msgstr ""
894
-
895
- #: my-calendar-event-manager.php:930 my-calendar-group-manager.php:300
896
- msgid "Event Title"
897
- msgstr ""
898
-
899
- #: my-calendar-event-manager.php:930 my-calendar-group-manager.php:300
900
- msgid "(required)"
901
- msgstr ""
902
-
903
- #: my-calendar-event-manager.php:942 my-calendar-event-manager.php:1343
904
- msgid "Approve"
905
- msgstr ""
906
-
907
- #: my-calendar-event-manager.php:944
908
- msgid "An administrator must approve your new event."
909
- msgstr ""
910
-
911
- #: my-calendar-event-manager.php:959
912
- msgid "This event is not spam"
913
- msgstr ""
914
-
915
- #: my-calendar-event-manager.php:966
916
- msgid "Post to Twitter (via WP to Twitter)"
917
- msgstr ""
918
-
919
- #: my-calendar-event-manager.php:976
920
- msgid "Host"
921
- msgstr ""
922
-
923
- #: my-calendar-event-manager.php:1007
924
- msgid "Date and Time"
925
- msgstr ""
926
-
927
- #: my-calendar-event-manager.php:1015
928
- msgid "Event Date and Time"
929
- msgstr ""
930
-
931
- #: my-calendar-event-manager.php:1022
932
- msgid "This is a multi-day event."
933
- msgstr ""
934
-
935
- #: my-calendar-event-manager.php:1024
936
- msgid "Enter start and end dates/times for each occurrence of the event."
937
- msgstr ""
938
-
939
- #: my-calendar-event-manager.php:1026
940
- msgid "Add another occurrence"
941
- msgstr ""
942
-
943
- #: my-calendar-event-manager.php:1027
944
- msgid "Remove last occurrence"
945
- msgstr ""
946
-
947
- #: my-calendar-event-manager.php:1032
948
- msgid "Scheduled dates for this event"
949
- msgstr ""
950
-
951
- #: my-calendar-event-manager.php:1034
952
- msgid ""
953
- "Editing a single date of an event changes only that date. Editing the root "
954
- "event changes all events in the series."
955
- msgstr ""
956
-
957
- #: my-calendar-event-manager.php:1045
958
- msgid "Related Events:"
959
- msgstr ""
960
-
961
- #: my-calendar-event-manager.php:1045
962
- msgid "Edit group"
963
- msgstr ""
964
-
965
- #: my-calendar-event-manager.php:1068 my-calendar-event-manager.php:1071
966
- #: my-calendar-group-manager.php:418 my-calendar-group-manager.php:421
967
- msgid "Event Location"
968
- msgstr ""
969
-
970
- #: my-calendar-event-manager.php:1077 my-calendar-group-manager.php:428
971
- msgid "Choose a preset location:"
972
- msgstr ""
973
-
974
- #: my-calendar-event-manager.php:1086 my-calendar-group-manager.php:441
975
- msgid "Add recurring locations for later use."
976
- msgstr ""
977
-
978
- #: my-calendar-event-manager.php:1101
979
- msgid "Special scheduling options"
980
- msgstr ""
981
-
982
- #: my-calendar-event-manager.php:1104
983
- msgid "Special Options"
984
- msgstr ""
985
-
986
- #: my-calendar-event-manager.php:1106
987
- msgid ""
988
- "Cancel this event if it occurs on a date with an event in the Holidays "
989
- "category"
990
- msgstr ""
991
-
992
- #: my-calendar-event-manager.php:1109
993
- msgid ""
994
- "If this event recurs, and falls on the 5th week of the month in a month with "
995
- "only four weeks, move it back one week."
996
- msgstr ""
997
-
998
- #: my-calendar-event-manager.php:1122
999
- msgid "Save Event"
1000
- msgstr ""
1001
-
1002
- #: my-calendar-event-manager.php:1151
1003
- msgid "Notes"
1004
- msgstr ""
1005
-
1006
- #: my-calendar-event-manager.php:1216
1007
- msgid "Clear filters"
1008
- msgstr ""
1009
-
1010
- #: my-calendar-event-manager.php:1242
1011
- msgid "Spam"
1012
- msgstr ""
1013
-
1014
- #: my-calendar-event-manager.php:1250
1015
- msgid "Search"
1016
- msgstr ""
1017
-
1018
- #: my-calendar-event-manager.php:1250 my-calendar-output.php:1544
1019
- #: my-calendar-output.php:1546
1020
- msgid "Search Events"
1021
- msgstr ""
1022
-
1023
- #: my-calendar-event-manager.php:1257 my-calendar-templates.php:201
1024
- msgid "Published"
1025
- msgstr ""
1026
-
1027
- #: my-calendar-event-manager.php:1258 my-calendar-templates.php:201
1028
- msgid "Reserved"
1029
- msgstr ""
1030
-
1031
- #: my-calendar-event-manager.php:1259
1032
- msgid "Archived"
1033
- msgstr ""
1034
-
1035
- #: my-calendar-event-manager.php:1260 my-calendar-group-manager.php:733
1036
- msgid "All"
1037
- msgstr ""
1038
-
1039
- #: my-calendar-event-manager.php:1269 my-calendar-group-manager.php:742
1040
- msgid "&laquo; Previous<span class=\"screen-reader-text\"> Events</span>"
1041
- msgstr ""
1042
-
1043
- #: my-calendar-event-manager.php:1270 my-calendar-group-manager.php:743
1044
- msgid "Next<span class=\"screen-reader-text\"> Events</span> &raquo;"
1045
- msgstr ""
1046
-
1047
- #: my-calendar-event-manager.php:1282 my-calendar-event-manager.php:1402
1048
- msgid "Delete events"
1049
- msgstr ""
1050
-
1051
- #: my-calendar-event-manager.php:1284 my-calendar-event-manager.php:1404
1052
- msgid "Approve events"
1053
- msgstr ""
1054
-
1055
- #: my-calendar-event-manager.php:1287 my-calendar-event-manager.php:1407
1056
- msgid "Archive events"
1057
- msgstr ""
1058
-
1059
- #: my-calendar-event-manager.php:1294 my-calendar-group-manager.php:245
1060
- msgid "Check/Uncheck all"
1061
- msgstr ""
1062
-
1063
- #: my-calendar-event-manager.php:1295 my-calendar-group-manager.php:765
1064
- #: my-calendar-settings.php:430 my-calendar-widgets.php:20
1065
- #: my-calendar-widgets.php:78 my-calendar-widgets.php:177
1066
- #: my-calendar-widgets.php:664
1067
- msgid "Title"
1068
- msgstr ""
1069
-
1070
- #: my-calendar-event-manager.php:1296 my-calendar-locations.php:244
1071
- #: my-calendar-output.php:1606
1072
- msgid "Location"
1073
- msgstr ""
1074
-
1075
- #: my-calendar-event-manager.php:1297 my-calendar-settings.php:391
1076
- msgid "Date/Time"
1077
- msgstr ""
1078
-
1079
- #: my-calendar-event-manager.php:1298 my-calendar-group-manager.php:769
1080
- #: my-calendar-settings.php:430
1081
- msgid "Author"
1082
- msgstr ""
1083
-
1084
- #: my-calendar-event-manager.php:1317
1085
- msgid "Possible spam"
1086
- msgstr ""
1087
-
1088
- #: my-calendar-event-manager.php:1333
1089
- msgid "Copy"
1090
- msgstr ""
1091
-
1092
- #: my-calendar-event-manager.php:1336 my-calendar-group-manager.php:801
1093
- #: my-calendar-output.php:363
1094
- msgid "Edit Group"
1095
- msgstr ""
1096
-
1097
- #: my-calendar-event-manager.php:1339 my-calendar-group-manager.php:805
1098
- msgid "Not editable."
1099
- msgstr ""
1100
-
1101
- #: my-calendar-event-manager.php:1343
1102
- msgid "Reject"
1103
- msgstr ""
1104
-
1105
- #: my-calendar-event-manager.php:1348
1106
- msgid "Approved"
1107
- msgstr ""
1108
-
1109
- #: my-calendar-event-manager.php:1349
1110
- msgid "Rejected"
1111
- msgstr ""
1112
-
1113
- #: my-calendar-event-manager.php:1350
1114
- msgid "Awaiting Approval"
1115
- msgstr ""
1116
-
1117
- #: my-calendar-event-manager.php:1356
1118
- msgid "Filter by location"
1119
- msgstr ""
1120
-
1121
- #: my-calendar-event-manager.php:1356 my-calendar-event-manager.php:1384
1122
- #: my-calendar-event-manager.php:1393
1123
- msgid "Show only: "
1124
- msgstr ""
1125
-
1126
- #: my-calendar-event-manager.php:1360 my-calendar-group-manager.php:768
1127
- msgid "Recurs"
1128
- msgstr ""
1129
-
1130
- #: my-calendar-event-manager.php:1368 my-calendar-group-manager.php:817
1131
- msgid "Never"
1132
- msgstr ""
1133
-
1134
- #: my-calendar-event-manager.php:1369 my-calendar-group-manager.php:818
1135
- #: my-calendar-templates.php:516
1136
- msgid "Daily"
1137
- msgstr ""
1138
-
1139
- #: my-calendar-event-manager.php:1369
1140
- msgid "Every %d days"
1141
- msgstr ""
1142
-
1143
- #: my-calendar-event-manager.php:1370 my-calendar-group-manager.php:819
1144
- msgid "Weekdays"
1145
- msgstr ""
1146
-
1147
- #: my-calendar-event-manager.php:1370
1148
- msgid "Every %d weekdays"
1149
- msgstr ""
1150
-
1151
- #: my-calendar-event-manager.php:1371 my-calendar-group-manager.php:820
1152
- #: my-calendar-templates.php:518
1153
- msgid "Weekly"
1154
- msgstr ""
1155
-
1156
- #: my-calendar-event-manager.php:1371
1157
- msgid "Every %d weeks"
1158
- msgstr ""
1159
-
1160
- #: my-calendar-event-manager.php:1372 my-calendar-group-manager.php:821
1161
- msgid "Bi-Weekly"
1162
- msgstr ""
1163
-
1164
- #: my-calendar-event-manager.php:1373 my-calendar-group-manager.php:822
1165
- msgid "Monthly (by date)"
1166
- msgstr ""
1167
-
1168
- #: my-calendar-event-manager.php:1373
1169
- msgid "Every %d months (by date)"
1170
- msgstr ""
1171
-
1172
- #: my-calendar-event-manager.php:1374 my-calendar-group-manager.php:823
1173
- msgid "Monthly (by day)"
1174
- msgstr ""
1175
-
1176
- #: my-calendar-event-manager.php:1375 my-calendar-group-manager.php:824
1177
- msgid "Yearly"
1178
- msgstr ""
1179
-
1180
- #: my-calendar-event-manager.php:1375
1181
- msgid "Every %d years"
1182
- msgstr ""
1183
-
1184
- #: my-calendar-event-manager.php:1379 my-calendar-event-manager.php:1380
1185
- msgid "&ndash; %d Times"
1186
- msgstr ""
1187
-
1188
- #: my-calendar-event-manager.php:1384
1189
- msgid "Filter by author"
1190
- msgstr ""
1191
-
1192
- #: my-calendar-event-manager.php:1393
1193
- msgid "Filter by category"
1194
- msgstr ""
1195
-
1196
- #: my-calendar-event-manager.php:1412
1197
- msgid "View Archived Events"
1198
- msgstr ""
1199
-
1200
- #: my-calendar-event-manager.php:1414
1201
- msgid "Return to Manage Events"
1202
- msgstr ""
1203
-
1204
- #: my-calendar-event-manager.php:1420
1205
- msgid "There are no events in the database meeting your current criteria."
1206
- msgstr ""
1207
-
1208
- #: my-calendar-event-manager.php:1563
1209
- msgid ""
1210
- "Your event end date must be either after or the same as your event begin date"
1211
- msgstr ""
1212
-
1213
- #: my-calendar-event-manager.php:1566
1214
- msgid ""
1215
- "Your date formatting is correct but one or more of your dates is invalid. "
1216
- "Check for number of days in month and leap year related errors."
1217
- msgstr ""
1218
-
1219
- #: my-calendar-event-manager.php:1575
1220
- msgid ""
1221
- "The time field must either be blank or be entered in the format hh:mm am/pm"
1222
- msgstr ""
1223
-
1224
- #: my-calendar-event-manager.php:1580
1225
- msgid ""
1226
- "The end time field must either be blank or be entered in the format hh:mm am/"
1227
- "pm"
1228
- msgstr ""
1229
-
1230
- #: my-calendar-event-manager.php:1593
1231
- msgid "An event title is required."
1232
- msgstr ""
1233
-
1234
- #: my-calendar-event-manager.php:1599
1235
- msgid "The repetition value must be 0 unless a type of recurrence is selected."
1236
- msgstr ""
1237
-
1238
- #: my-calendar-event-manager.php:1604
1239
- msgid "That event conflicts with a previously scheduled event."
1240
- msgstr ""
1241
-
1242
- #: my-calendar-event-manager.php:1804
1243
- msgid "Editing: "
1244
- msgstr ""
1245
-
1246
- #: my-calendar-event-manager.php:1890
1247
- msgid "Date (YYYY-MM-DD)"
1248
- msgstr ""
1249
-
1250
- #: my-calendar-event-manager.php:1891
1251
- msgid "From"
1252
- msgstr ""
1253
-
1254
- #: my-calendar-event-manager.php:1893
1255
- msgid "To"
1256
- msgstr ""
1257
-
1258
- #: my-calendar-event-manager.php:1897
1259
- msgid "All day event"
1260
- msgstr ""
1261
-
1262
- #: my-calendar-event-manager.php:1898
1263
- msgid "Hide end time"
1264
- msgstr ""
1265
-
1266
- #: my-calendar-event-manager.php:1901
1267
- msgid "End Date (YYYY-MM-DD, optional)"
1268
- msgstr ""
1269
-
1270
- #: my-calendar-event-manager.php:1921
1271
- msgid "Open"
1272
- msgstr ""
1273
-
1274
- #: my-calendar-event-manager.php:1922
1275
- msgid "Closed"
1276
- msgstr ""
1277
-
1278
- #: my-calendar-event-manager.php:1923
1279
- msgid "Does not apply"
1280
- msgstr ""
1281
-
1282
- #: my-calendar-event-manager.php:1926
1283
- msgid ""
1284
- "If this event recurs, it can only be registered for as a complete series."
1285
- msgstr ""
1286
-
1287
- #: my-calendar-event-manager.php:1932
1288
- msgid "Tickets URL"
1289
- msgstr ""
1290
-
1291
- #: my-calendar-event-manager.php:1935
1292
- msgid "Registration Information"
1293
- msgstr ""
1294
-
1295
- #: my-calendar-events.php:202 my-calendar-events.php:216
1296
- msgid "No related events"
1297
- msgstr ""
1298
-
1299
- #: my-calendar-generator.php:36
1300
- msgid "Shortcode Attributes"
1301
- msgstr ""
1302
-
1303
- #: my-calendar-generator.php:42
1304
- msgid "Location filter type:"
1305
- msgstr ""
1306
-
1307
- #: my-calendar-generator.php:44
1308
- msgid "All locations"
1309
- msgstr ""
1310
-
1311
- #: my-calendar-generator.php:45 my-calendar-settings.php:430
1312
- msgid "Location Name"
1313
- msgstr ""
1314
-
1315
- #: my-calendar-generator.php:46 my-calendar-group-manager.php:459
1316
- #: my-calendar-locations.php:330 my-calendar.php:269
1317
- msgid "City"
1318
- msgstr ""
1319
-
1320
- #: my-calendar-generator.php:47 my-calendar-group-manager.php:475
1321
- #: my-calendar-locations.php:387 my-calendar.php:272
1322
- msgid "State"
1323
- msgstr ""
1324
-
1325
- #: my-calendar-generator.php:48 my-calendar-group-manager.php:462
1326
- #: my-calendar-locations.php:348 my-calendar.php:275
1327
- msgid "Postal Code"
1328
- msgstr ""
1329
-
1330
- #: my-calendar-generator.php:49 my-calendar-group-manager.php:466
1331
- #: my-calendar-locations.php:366
1332
- msgid "Country"
1333
- msgstr ""
1334
-
1335
- #: my-calendar-generator.php:50 my-calendar-group-manager.php:463
1336
- #: my-calendar-group-manager.php:476 my-calendar-locations.php:357
1337
- #: my-calendar-locations.php:388
1338
- msgid "Region"
1339
- msgstr ""
1340
-
1341
- #: my-calendar-generator.php:54
1342
- msgid "Location filter value:"
1343
- msgstr ""
1344
-
1345
- #: my-calendar-generator.php:58
1346
- msgid ""
1347
- "<strong>Note:</strong> If you provide a location filter value, it must be an "
1348
- "exact match for that information as saved with your events. (e.g. \"Saint "
1349
- "Paul\" is not equivalent to \"saint paul\" or \"St. Paul\")"
1350
- msgstr ""
1351
-
1352
- #: my-calendar-generator.php:68 my-calendar-widgets.php:684
1353
- msgid "Limit by Author"
1354
- msgstr ""
1355
-
1356
- #: my-calendar-generator.php:70 my-calendar-widgets.php:686
1357
- msgid "All authors"
1358
- msgstr ""
1359
-
1360
- #: my-calendar-generator.php:75 my-calendar-widgets.php:691
1361
- msgid "Limit by Host"
1362
- msgstr ""
1363
-
1364
- #: my-calendar-generator.php:77 my-calendar-widgets.php:693
1365
- msgid "All hosts"
1366
- msgstr ""
1367
-
1368
- #: my-calendar-generator.php:85
1369
- msgid "Format"
1370
- msgstr ""
1371
-
1372
- #: my-calendar-generator.php:87
1373
- msgid "Grid"
1374
- msgstr ""
1375
-
1376
- #: my-calendar-generator.php:88
1377
- msgid "List"
1378
- msgstr ""
1379
-
1380
- #: my-calendar-generator.php:92 my-calendar-generator.php:150
1381
- msgid "Time Segment"
1382
- msgstr ""
1383
-
1384
- #: my-calendar-generator.php:94 my-calendar-output.php:400
1385
- #: my-calendar-output.php:512 my-calendar-output.php:519
1386
- #: my-calendar-output.php:525 my-calendar-widgets.php:699
1387
- msgid "Month"
1388
- msgstr ""
1389
-
1390
- #: my-calendar-generator.php:95 my-calendar-output.php:513
1391
- #: my-calendar-output.php:521 my-calendar-output.php:527
1392
- #: my-calendar-widgets.php:700
1393
- msgid "Week"
1394
- msgstr ""
1395
-
1396
- #: my-calendar-generator.php:96 my-calendar-output.php:515
1397
- #: my-calendar-output.php:522 my-calendar-output.php:529
1398
- msgid "Day"
1399
- msgstr ""
1400
-
1401
- #: my-calendar-generator.php:100
1402
- msgid ""
1403
- "For navigational fields above and below the calendar: the defaults specified "
1404
- "in your settings will be used if the attribute is left blank. Use "
1405
- "<code>none</code> to hide all navigation elements."
1406
- msgstr ""
1407
-
1408
- #: my-calendar-generator.php:103 my-calendar-widgets.php:676
1409
- msgid "Navigation above calendar"
1410
- msgstr ""
1411
-
1412
- #: my-calendar-generator.php:107 my-calendar-widgets.php:680
1413
- msgid "Navigation below calendar"
1414
- msgstr ""
1415
-
1416
- #: my-calendar-generator.php:115
1417
- msgid "Fallback Text"
1418
- msgstr ""
1419
-
1420
- #: my-calendar-generator.php:119 my-calendar-widgets.php:82
1421
- #: my-calendar-widgets.php:181
1422
- msgid "Template"
1423
- msgstr ""
1424
-
1425
- #: my-calendar-generator.php:127
1426
- msgid "Events/Days Before Current Day"
1427
- msgstr ""
1428
-
1429
- #: my-calendar-generator.php:131
1430
- msgid "Events/Days After Current Day"
1431
- msgstr ""
1432
-
1433
- #: my-calendar-generator.php:135
1434
- msgid "Events/Days to Skip"
1435
- msgstr ""
1436
-
1437
- #: my-calendar-generator.php:139
1438
- msgid "Fallback"
1439
- msgstr ""
1440
-
1441
- #: my-calendar-generator.php:143
1442
- msgid "Type of Upcoming Events List"
1443
- msgstr ""
1444
-
1445
- #: my-calendar-generator.php:152
1446
- msgid "Ascending"
1447
- msgstr ""
1448
-
1449
- #: my-calendar-generator.php:153
1450
- msgid "Descending"
1451
- msgstr ""
1452
-
1453
- #: my-calendar-generator.php:160
1454
- msgid "Generate Shortcode"
1455
- msgstr ""
1456
-
1457
- #: my-calendar-group-manager.php:50
1458
- msgid "Event not updated."
1459
- msgstr ""
1460
-
1461
- #: my-calendar-group-manager.php:52 my-calendar-group-manager.php:78
1462
- #: my-calendar-group-manager.php:157
1463
- msgid "Nothing was changed in that update."
1464
- msgstr ""
1465
-
1466
- #: my-calendar-group-manager.php:76
1467
- msgid "Event not grouped."
1468
- msgstr ""
1469
-
1470
- #: my-calendar-group-manager.php:80
1471
- msgid "Event grouped successfully"
1472
- msgstr ""
1473
-
1474
- #: my-calendar-group-manager.php:91 my-calendar-group-manager.php:387
1475
- #: my-calendar-group-manager.php:524
1476
- msgid "Edit Event Group"
1477
- msgstr ""
1478
-
1479
- #: my-calendar-group-manager.php:94
1480
- msgid "You must provide an event group id in order to edit it"
1481
- msgstr ""
1482
-
1483
- #: my-calendar-group-manager.php:100 my-calendar-group-manager.php:109
1484
- #: my-calendar-group-manager.php:295 my-calendar.php:351
1485
- msgid "Manage Event Groups"
1486
- msgstr ""
1487
-
1488
- #: my-calendar-group-manager.php:102
1489
- msgid ""
1490
- "Grouped events can be edited simultaneously. When you choose a group of "
1491
- "events to edit, the form will be pre-filled with the content applicable to "
1492
- "the member of the event group you started from. (e.g., if you click on the "
1493
- "\"Edit Group\" link for the 3rd of a set of events, the boxes will use the "
1494
- "content applicable to that event.). You will also receive a set of "
1495
- "checkboxes which will indicate which events in the group should have these "
1496
- "changes applied. (All grouped events can also be edited individually.)"
1497
- msgstr ""
1498
-
1499
- #: my-calendar-group-manager.php:111
1500
- msgid "Select an event group to edit."
1501
- msgstr ""
1502
-
1503
- #: my-calendar-group-manager.php:117
1504
- msgid "Create/Modify Groups"
1505
- msgstr ""
1506
-
1507
- #: my-calendar-group-manager.php:227
1508
- msgid ""
1509
- "<strong>NOTE:</strong> The group editable fields for the events in this "
1510
- "group do not match"
1511
- msgstr ""
1512
-
1513
- #: my-calendar-group-manager.php:227
1514
- msgid "The group editable fields for the events in this group match."
1515
- msgstr ""
1516
-
1517
- #: my-calendar-group-manager.php:234
1518
- msgid "Apply these changes to:"
1519
- msgstr ""
1520
-
1521
- #: my-calendar-group-manager.php:247
1522
- msgid "Remove checked events from this group"
1523
- msgstr ""
1524
-
1525
- #: my-calendar-group-manager.php:265
1526
- msgid "You must provide a group ID to edit groups"
1527
- msgstr ""
1528
-
1529
- #: my-calendar-group-manager.php:298
1530
- msgid "Enter your Event Information"
1531
- msgstr ""
1532
-
1533
- #: my-calendar-group-manager.php:300 my-calendar-group-manager.php:307
1534
- #: my-calendar-group-manager.php:317 my-calendar-group-manager.php:328
1535
- #: my-calendar-group-manager.php:339 my-calendar-group-manager.php:350
1536
- #: my-calendar-group-manager.php:370 my-calendar-group-manager.php:382
1537
- #: my-calendar-group-manager.php:399 my-calendar-group-manager.php:450
1538
- #: my-calendar-group-manager.php:453 my-calendar-group-manager.php:456
1539
- #: my-calendar-group-manager.php:459 my-calendar-group-manager.php:462
1540
- #: my-calendar-group-manager.php:463 my-calendar-group-manager.php:466
1541
- #: my-calendar-group-manager.php:469 my-calendar-group-manager.php:480
1542
- #: my-calendar-group-manager.php:483 my-calendar-group-manager.php:488
1543
- msgid "Fields do not match"
1544
- msgstr ""
1545
-
1546
- #: my-calendar-group-manager.php:307
1547
- msgid "Selected dates are a single multi-day event."
1548
- msgstr ""
1549
-
1550
- #: my-calendar-group-manager.php:315
1551
- msgid ""
1552
- "Event Description (<abbr title=\"hypertext markup language\">HTML</abbr> "
1553
- "allowed)"
1554
- msgstr ""
1555
-
1556
- #: my-calendar-group-manager.php:328
1557
- msgid ""
1558
- "Event Short Description (<abbr title=\"hypertext markup language\">HTML</"
1559
- "abbr> allowed)"
1560
- msgstr ""
1561
-
1562
- #: my-calendar-group-manager.php:350
1563
- msgid "Event Host"
1564
- msgstr ""
1565
-
1566
- #: my-calendar-group-manager.php:370
1567
- msgid "Event Category"
1568
- msgstr ""
1569
-
1570
- #: my-calendar-group-manager.php:382
1571
- msgid "Event Link (Optional)"
1572
- msgstr ""
1573
-
1574
- #: my-calendar-group-manager.php:382
1575
- msgid "Link will expire after event."
1576
- msgstr ""
1577
-
1578
- #: my-calendar-group-manager.php:396
1579
- msgid "Event Registration Options"
1580
- msgstr ""
1581
-
1582
- #: my-calendar-group-manager.php:399
1583
- msgid "Event Registration Status"
1584
- msgstr ""
1585
-
1586
- #: my-calendar-group-manager.php:450 my-calendar-locations.php:308
1587
- msgid "Name of Location (e.g. <em>Joe's Bar and Grill</em>)"
1588
- msgstr ""
1589
-
1590
- #: my-calendar-group-manager.php:453 my-calendar-locations.php:324
1591
- msgid "Street Address"
1592
- msgstr ""
1593
-
1594
- #: my-calendar-group-manager.php:456 my-calendar-locations.php:327
1595
- msgid "Street Address (2)"
1596
- msgstr ""
1597
-
1598
- #: my-calendar-group-manager.php:459 my-calendar-locations.php:339
1599
- msgid "State/Province"
1600
- msgstr ""
1601
-
1602
- #: my-calendar-group-manager.php:469 my-calendar-locations.php:381
1603
- msgid "Initial Zoom"
1604
- msgstr ""
1605
-
1606
- #: my-calendar-group-manager.php:471 my-calendar-locations.php:383
1607
- msgid "Neighborhood"
1608
- msgstr ""
1609
-
1610
- #: my-calendar-group-manager.php:472 my-calendar-locations.php:384
1611
- msgid "Small City"
1612
- msgstr ""
1613
-
1614
- #: my-calendar-group-manager.php:473 my-calendar-locations.php:385
1615
- msgid "Large City"
1616
- msgstr ""
1617
-
1618
- #: my-calendar-group-manager.php:474 my-calendar-locations.php:386
1619
- msgid "Greater Metro Area"
1620
- msgstr ""
1621
-
1622
- #: my-calendar-group-manager.php:480 my-calendar-locations.php:406
1623
- msgid "Phone"
1624
- msgstr ""
1625
-
1626
- #: my-calendar-group-manager.php:483 my-calendar-locations.php:412
1627
- msgid "Location URL"
1628
- msgstr ""
1629
-
1630
- #: my-calendar-group-manager.php:486 my-calendar-locations.php:393
1631
- msgid "GPS Coordinates (optional)"
1632
- msgstr ""
1633
-
1634
- #: my-calendar-group-manager.php:488 my-calendar-locations.php:398
1635
- msgid "Latitude"
1636
- msgstr ""
1637
-
1638
- #: my-calendar-group-manager.php:488 my-calendar-locations.php:398
1639
- msgid "Longitude"
1640
- msgstr ""
1641
-
1642
- #: my-calendar-group-manager.php:492 my-calendar-locations.php:416
1643
- msgid "Location Accessibility"
1644
- msgstr ""
1645
-
1646
- #: my-calendar-group-manager.php:609
1647
- msgid "The event title must be between 1 and 255 characters in length."
1648
- msgstr ""
1649
-
1650
- #: my-calendar-group-manager.php:731
1651
- msgid "Grouped Events"
1652
- msgstr ""
1653
-
1654
- #: my-calendar-group-manager.php:732
1655
- msgid "Ungrouped Events"
1656
- msgstr ""
1657
-
1658
- #: my-calendar-group-manager.php:736
1659
- msgid "Check a set of events to group them for mass editing."
1660
- msgstr ""
1661
-
1662
- #: my-calendar-group-manager.php:757 my-calendar-group-manager.php:851
1663
- msgid "Group checked events for mass editing"
1664
- msgstr ""
1665
-
1666
- #: my-calendar-group-manager.php:764
1667
- msgid "Group"
1668
- msgstr ""
1669
-
1670
- #: my-calendar-group-manager.php:766
1671
- msgid "Where"
1672
- msgstr ""
1673
-
1674
- #: my-calendar-group-manager.php:767
1675
- msgid "Starts"
1676
- msgstr ""
1677
-
1678
- #: my-calendar-group-manager.php:803
1679
- msgid "Ungrouped"
1680
- msgstr ""
1681
-
1682
- #: my-calendar-group-manager.php:829
1683
- msgid "Forever"
1684
- msgstr ""
1685
-
1686
- #: my-calendar-group-manager.php:831
1687
- msgid "%d Times"
1688
- msgstr ""
1689
-
1690
- #: my-calendar-group-manager.php:856
1691
- msgid "There are no events in the database!"
1692
- msgstr ""
1693
-
1694
- #: my-calendar-help.php:7
1695
- msgid "How to use My Calendar"
1696
- msgstr ""
1697
-
1698
- #: my-calendar-help.php:13 my-calendar.php:183 my-calendar.php:358
1699
- msgid "My Calendar Help"
1700
- msgstr ""
1701
-
1702
- #: my-calendar-help.php:17 my-calendar.php:181
1703
- msgid "Shortcode Generator"
1704
- msgstr ""
1705
-
1706
- #: my-calendar-help.php:18
1707
- msgid "Shortcodes"
1708
- msgstr ""
1709
-
1710
- #: my-calendar-help.php:19
1711
- msgid "Icons"
1712
- msgstr ""
1713
-
1714
- #: my-calendar-help.php:20
1715
- msgid "Styles"
1716
- msgstr ""
1717
-
1718
- #: my-calendar-help.php:21
1719
- msgid "Templating"
1720
- msgstr ""
1721
-
1722
- #: my-calendar-help.php:22
1723
- msgid "Support Form"
1724
- msgstr ""
1725
-
1726
- #: my-calendar-help.php:23 my-calendar-help.php:438
1727
- msgid "Helpful Information"
1728
- msgstr ""
1729
-
1730
- #: my-calendar-help.php:31 my-calendar.php:180
1731
- msgid "Getting Started"
1732
- msgstr ""
1733
-
1734
- #: my-calendar-help.php:34
1735
- msgid "Add the My Calendar shortcode (<code>[my_calendar]</code>) to a page."
1736
- msgstr ""
1737
-
1738
- #: my-calendar-help.php:35
1739
- msgid ""
1740
- "Add events by clicking on the Add/Edit Events link in the admin or on \"Add "
1741
- "Events\" in the toolbar."
1742
- msgstr ""
1743
-
1744
- #: my-calendar-help.php:36
1745
- msgid "Select your preferred stylesheet in the Styles Editor"
1746
- msgstr ""
1747
-
1748
- #: my-calendar-help.php:39
1749
- msgid ""
1750
- "Read more help documentation below or <a href=\"%s\">purchase the My "
1751
- "Calendar User's Guide</a> to learn more -- but the above is all that you "
1752
- "need to do to begin using the calendar."
1753
- msgstr ""
1754
-
1755
- #: my-calendar-help.php:47
1756
- msgid "My Calendar Shortcode Generator"
1757
- msgstr ""
1758
-
1759
- #: my-calendar-help.php:51
1760
- msgid "Main"
1761
- msgstr ""
1762
-
1763
- #: my-calendar-help.php:52
1764
- msgid "Upcoming"
1765
- msgstr ""
1766
-
1767
- #: my-calendar-help.php:53
1768
- msgid "Today"
1769
- msgstr ""
1770
-
1771
- #: my-calendar-help.php:73
1772
- msgid "Shortcode Syntax"
1773
- msgstr ""
1774
-
1775
- #: my-calendar-help.php:76
1776
- msgid "Main Calendar Shortcode (List or Grid, Weekly or Monthly view)"
1777
- msgstr ""
1778
-
1779
- #: my-calendar-help.php:78
1780
- msgid "Example Customized Shortcode"
1781
- msgstr ""
1782
-
1783
- #: my-calendar-help.php:81
1784
- msgid ""
1785
- "This shortcode shows the one-week view of the calendar on a post or page "
1786
- "including all categories and the category key, in a list format. The "
1787
- "standard previous/next navigation will be included above the calendar, the "
1788
- "link to the print format (if enabled) will be shown below."
1789
- msgstr ""
1790
-
1791
- #: my-calendar-help.php:84
1792
- msgid "Shortcode attributes:"
1793
- msgstr ""
1794
-
1795
- #: my-calendar-help.php:87
1796
- msgid "Names or IDs of categories in the calendar, comma or pipe separated."
1797
- msgstr ""
1798
-
1799
- #: my-calendar-help.php:88
1800
- msgid ""
1801
- "\"list\" or \"mini\"; exclude or any other value to show a calendar grid."
1802
- msgstr ""
1803
-
1804
- #: my-calendar-help.php:89
1805
- msgid ""
1806
- "Comma-separated list of navigation to display above or below the calendar. "
1807
- "Available: <strong>nav, toggle, jump, print, key, feeds, timeframe</strong>. "
1808
- "Order listed determines the order displayed. Defaults in settings will be "
1809
- "used if the attribute is blank. Use <em>none</em> to hide all navigation."
1810
- msgstr ""
1811
-
1812
- #: my-calendar-help.php:90
1813
- msgid ""
1814
- "Set to \"week\" to show a one week view or to \"day\" to show a single day "
1815
- "view. Any other value will show a month view. (Day view always shows as a "
1816
- "list.)"
1817
- msgstr ""
1818
-
1819
- #: my-calendar-help.php:91
1820
- msgid "Type of location data to restrict by."
1821
- msgstr ""
1822
-
1823
- #: my-calendar-help.php:92
1824
- msgid "Specific location information to filter to."
1825
- msgstr ""
1826
-
1827
- #: my-calendar-help.php:93
1828
- msgid "Author or comma-separated list (usernames or IDs) to show events from."
1829
- msgstr ""
1830
-
1831
- #: my-calendar-help.php:94
1832
- msgid "Host or comma-separated list (usernames or IDs) to show events from."
1833
- msgstr ""
1834
-
1835
- #: my-calendar-help.php:95
1836
- msgid "String to give shortcode a unique ID."
1837
- msgstr ""
1838
-
1839
- #: my-calendar-help.php:98
1840
- msgid ""
1841
- "The main My Calendar shortcode can be generated from a button in your post "
1842
- "and page editor. The mini calendar can also be accessed and configured as a "
1843
- "widget."
1844
- msgstr ""
1845
-
1846
- #: my-calendar-help.php:100
1847
- msgid "Additional Views (Upcoming events, today's events)"
1848
- msgstr ""
1849
-
1850
- #: my-calendar-help.php:103
1851
- msgid ""
1852
- "Displays the output of the Upcoming Events widget. <code>before</code> and "
1853
- "<code>after</code> are numbers; <code>type</code> is either \"event\" or "
1854
- "\"days\", and <code>category</code> and <code>author</code> work the same as "
1855
- "in the main calendar shortcode. Templates use the template codes listed "
1856
- "below. <code>fallback</code> provides text if no events meet your criteria. "
1857
- "Order sets sort order for the list &ndash; ascending (<code>asc</code>) or "
1858
- "descending (<code>desc</code>). <code>show_today</code> indicates whether to "
1859
- "include today's events in the list. <code>Skip</code> is how many events to "
1860
- "skip in the list."
1861
- msgstr ""
1862
-
1863
- #: my-calendar-help.php:107
1864
- msgid ""
1865
- "Displays the output of the Today's Events widget, with four configurable "
1866
- "attributes: category, author, template and fallback text."
1867
- msgstr ""
1868
-
1869
- #: my-calendar-help.php:110
1870
- msgid "Upcoming Events and Today's Events can also be configured as widgets."
1871
- msgstr ""
1872
-
1873
- #: my-calendar-help.php:114
1874
- msgid ""
1875
- "Displays a single event and/or all dates for that event. If template is set "
1876
- "to a blank value, will only display the list of occurrences. If the list "
1877
- "attribute is set blank, will only show the event template"
1878
- msgstr ""
1879
-
1880
- #: my-calendar-help.php:118
1881
- msgid "Calendar Filter Shortcodes"
1882
- msgstr ""
1883
-
1884
- #: my-calendar-help.php:122
1885
- msgid ""
1886
- "Displays all available filters as a single form. The <code>show</code> "
1887
- "attribute takes three keywords: categories, locations, and access, to "
1888
- "indicate which filters to show and in what order."
1889
- msgstr ""
1890
-
1891
- #: my-calendar-help.php:126
1892
- msgid ""
1893
- "List of event locations, as a list of links or as a select form. <code>show</"
1894
- "code> is either <code>list</code> or <code>form</code>, <code>type</code> is "
1895
- "<code>saved</code> (to show items from stored locations), or <code>custom</"
1896
- "code> (to show options configured in location settings). <code>datatype</"
1897
- "code> must be the type of data your limits are using: <code>name</code> "
1898
- "(business name), <code>city</code>, <code>state</code>, <code>country</"
1899
- "code>, <code>zip</code> (postal code), or <code>region</code>."
1900
- msgstr ""
1901
-
1902
- #: my-calendar-help.php:130
1903
- msgid ""
1904
- "List of event categories, either as a list of links or as a select dropdown "
1905
- "form. The <code>show</code> attribute can either be <code>list</code> or "
1906
- "<code>form</code>."
1907
- msgstr ""
1908
-
1909
- #: my-calendar-help.php:134
1910
- msgid ""
1911
- "List of filterable accessibility services, either as a list of links or as a "
1912
- "select dropdown form. The <code>show</code> attribute can either be "
1913
- "<code>list</code> or <code>form</code>."
1914
- msgstr ""
1915
-
1916
- #: my-calendar-help.php:136
1917
- msgid "Information Listing Shortcodes"
1918
- msgstr ""
1919
-
1920
- #: my-calendar-help.php:140
1921
- msgid ""
1922
- "List of locations. <code>datatype</code> is the type of data displayed; all "
1923
- "lists include a link to the map to that location. In addition to basic "
1924
- "location information as in the above shortcode, you can also use \"hcard\" "
1925
- "to display all available location information."
1926
- msgstr ""
1927
-
1928
- #: my-calendar-help.php:141
1929
- msgid ""
1930
- "Use <code>template</code> to show customized data, sorted by the "
1931
- "<code>datatype</code> value."
1932
- msgstr ""
1933
-
1934
- #: my-calendar-help.php:149
1935
- msgid "Category Icons"
1936
- msgstr ""
1937
-
1938
- #: my-calendar-help.php:152
1939
- msgid ""
1940
- "My Calendar is designed to manage multiple calendars. The basis for these "
1941
- "calendars are categories; you can setup a calendar page which includes all "
1942
- "categories, or you can dedicate separate pages to calendars in each "
1943
- "category. For an example, this might be useful for you in managing the tour "
1944
- "calendars for multiple bands; event calendars for a variety of locations, "
1945
- "etc."
1946
- msgstr ""
1947
-
1948
- #: my-calendar-help.php:155
1949
- msgid ""
1950
- "The pre-installed category icons may not be what you need. I assume that "
1951
- "you'll upload your own icons -- place your custom icons in a folder at \"my-"
1952
- "calendar-custom\" to avoid having them overwritten by upgrades."
1953
- msgstr ""
1954
-
1955
- #: my-calendar-help.php:155
1956
- msgid "You can alternately place icons in:"
1957
- msgstr ""
1958
-
1959
- #: my-calendar-help.php:163
1960
- msgid "Custom Styles"
1961
- msgstr ""
1962
-
1963
- #: my-calendar-help.php:166
1964
- msgid ""
1965
- "My Calendar comes with five default stylesheets. My Calendar will retain "
1966
- "your changes to stylesheets, but if you want to add an entirely new "
1967
- "stylesheet, you may wish to store it in the My Calendar custom styles "
1968
- "directory."
1969
- msgstr ""
1970
-
1971
- #: my-calendar-help.php:169
1972
- msgid "Your custom style directory is"
1973
- msgstr ""
1974
-
1975
- #: my-calendar-help.php:172
1976
- msgid ""
1977
- "You can also add custom styles to your custom directory or your theme "
1978
- "directory for print styles, mobile styles, and tablet styles. <code>mc-print."
1979
- "css</code>, <code>mc-mobile.css</code>, and <code>mc-tablet.css</code>."
1980
- msgstr ""
1981
-
1982
- #: my-calendar-help.php:180
1983
- msgid "Template Tags"
1984
- msgstr ""
1985
-
1986
- #: my-calendar-help.php:183
1987
- msgid ""
1988
- "All template tags support two attributes: before=\"value\" and after=\"value"
1989
- "\". The values of the attributes will be placed before and after the output "
1990
- "value. These attribute values <strong>must</strong> be wrapped in double "
1991
- "quotes."
1992
- msgstr ""
1993
-
1994
- #: my-calendar-help.php:186
1995
- msgid ""
1996
- "Date/Time template tags support the \"format\" attribute: format=\"M, Y\", "
1997
- "where the value is a PHP formatted date string. Only <code>dtstart</code> "
1998
- "and <code>dtend</code> include the full date/time information for formatting."
1999
- msgstr ""
2000
-
2001
- #: my-calendar-help.php:189
2002
- msgid "Example:"
2003
- msgstr ""
2004
-
2005
- #: my-calendar-help.php:191 my-calendar.php:208
2006
- msgid "Event Template Tags"
2007
- msgstr ""
2008
-
2009
- #: my-calendar-help.php:194
2010
- msgid "Displays the title of the event."
2011
- msgstr ""
2012
-
2013
- #: my-calendar-help.php:197
2014
- msgid ""
2015
- "Displays title of the event as a link if a URL is present, or the title "
2016
- "alone if no URL is available."
2017
- msgstr ""
2018
-
2019
- #: my-calendar-help.php:200
2020
- msgid "Displays the start time for the event."
2021
- msgstr ""
2022
-
2023
- #: my-calendar-help.php:203
2024
- msgid "Human language estimate of how long an event will run."
2025
- msgstr ""
2026
-
2027
- #: my-calendar-help.php:206
2028
- msgid ""
2029
- "Displays the start time for the event adjusted to the current user's time "
2030
- "zone settings. Returns <code>{time}</code> if user settings are disabled or "
2031
- "if the user has not selected a preferred time zone."
2032
- msgstr ""
2033
-
2034
- #: my-calendar-help.php:209
2035
- msgid ""
2036
- "Displays the end time for the event adjusted to the current user's time zone "
2037
- "settings. Returns <code>{endtime}</code> if user settings are disabled or if "
2038
- "the user has not selected a preferred time zone."
2039
- msgstr ""
2040
-
2041
- #: my-calendar-help.php:212
2042
- msgid "Displays the date on which the event begins."
2043
- msgstr ""
2044
-
2045
- #: my-calendar-help.php:215
2046
- msgid ""
2047
- "Displays the date on which the series of events began (for recurring events)."
2048
- msgstr ""
2049
-
2050
- #: my-calendar-help.php:218
2051
- msgid "Displays the date on which the event ends."
2052
- msgstr ""
2053
-
2054
- #: my-calendar-help.php:221
2055
- msgid "Displays the time at which the event ends."
2056
- msgstr ""
2057
-
2058
- #: my-calendar-help.php:224
2059
- msgid ""
2060
- "Displays the beginning date to the end date for events. Does not show end "
2061
- "date if same as start date."
2062
- msgstr ""
2063
-
2064
- #: my-calendar-help.php:227
2065
- msgid ""
2066
- "Displays the beginning and end times for events. Does not show end time if "
2067
- "same as start or if marked as hidden."
2068
- msgstr ""
2069
-
2070
- #: my-calendar-help.php:230
2071
- msgid "Timestamp for beginning of event."
2072
- msgstr ""
2073
-
2074
- #: my-calendar-help.php:233
2075
- msgid "Timestamp for end of event."
2076
- msgstr ""
2077
-
2078
- #: my-calendar-help.php:236
2079
- msgid ""
2080
- "For multi-day events displays an unordered list of dates and times for "
2081
- "events in this group. Otherwise, beginning date/time."
2082
- msgstr ""
2083
-
2084
- #: my-calendar-help.php:239
2085
- msgid "Displays the WordPress author who posted the event."
2086
- msgstr ""
2087
-
2088
- #: my-calendar-help.php:242
2089
- msgid "Displays the gravatar image for the event author."
2090
- msgstr ""
2091
-
2092
- #: my-calendar-help.php:245
2093
- msgid "Displays the name of the person assigned as host for the event."
2094
- msgstr ""
2095
-
2096
- #: my-calendar-help.php:248
2097
- msgid ""
2098
- "Displays the email address of the person assigned as host for the event."
2099
- msgstr ""
2100
-
2101
- #: my-calendar-help.php:251
2102
- msgid "Displays the gravatar image for the event host."
2103
- msgstr ""
2104
-
2105
- #: my-calendar-help.php:254
2106
- msgid "Displays the short version of the event description."
2107
- msgstr ""
2108
-
2109
- #: my-calendar-help.php:257
2110
- msgid "Displays short description without converting paragraphs."
2111
- msgstr ""
2112
-
2113
- #: my-calendar-help.php:260
2114
- msgid "Displays short description with any HTML stripped out."
2115
- msgstr ""
2116
-
2117
- #: my-calendar-help.php:263
2118
- msgid ""
2119
- "Like <code>the_excerpt();</code> displays shortdesc if provided, otherwise "
2120
- "excerpts description."
2121
- msgstr ""
2122
-
2123
- #: my-calendar-help.php:266
2124
- msgid "Displays the description of the event."
2125
- msgstr ""
2126
-
2127
- #: my-calendar-help.php:269
2128
- msgid "Displays description without converting paragraphs."
2129
- msgstr ""
2130
-
2131
- #: my-calendar-help.php:272
2132
- msgid "Displays description with any HTML stripped out."
2133
- msgstr ""
2134
-
2135
- #: my-calendar-help.php:275
2136
- msgid "Unordered list of accessibility options for this event."
2137
- msgstr ""
2138
-
2139
- #: my-calendar-help.php:278
2140
- msgid "Image associated with the event. (HTMl)"
2141
- msgstr ""
2142
-
2143
- #: my-calendar-help.php:281
2144
- msgid "Image associated with the event. (image URL only)"
2145
- msgstr ""
2146
-
2147
- #: my-calendar-help.php:284
2148
- msgid "Event post thumbnail, full size, full HTML"
2149
- msgstr ""
2150
-
2151
- #: my-calendar-help.php:290
2152
- msgid "Event post thumbnail, %s size, full HTML"
2153
- msgstr ""
2154
-
2155
- #: my-calendar-help.php:296
2156
- msgid "Displays the URL provided for the event."
2157
- msgstr ""
2158
-
2159
- #: my-calendar-help.php:299
2160
- msgid "Produces the URL to download an iCal formatted record for the event."
2161
- msgstr ""
2162
-
2163
- #: my-calendar-help.php:302
2164
- msgid ""
2165
- "Produces a hyperlink to download an iCal formatted record for the event."
2166
- msgstr ""
2167
-
2168
- #: my-calendar-help.php:305
2169
- msgid "URL to submit event to Google Calendar"
2170
- msgstr ""
2171
-
2172
- #: my-calendar-help.php:308
2173
- msgid "Link to submit event to Google Calendar, with class \"gcal\""
2174
- msgstr ""
2175
-
2176
- #: my-calendar-help.php:311
2177
- msgid "Shows the recurrence status of the event. (Daily, Weekly, etc.)"
2178
- msgstr ""
2179
-
2180
- #: my-calendar-help.php:314
2181
- msgid "Shows the number of repetitions of the event."
2182
- msgstr ""
2183
-
2184
- #: my-calendar-help.php:317
2185
- msgid ""
2186
- "Provides a link to an auto-generated page containing all information on the "
2187
- "given event."
2188
- msgstr ""
2189
-
2190
- #: my-calendar-help.php:317 my-calendar-help.php:323
2191
- msgid "Requires that the site URL has been provided on the Settings page"
2192
- msgstr ""
2193
-
2194
- #: my-calendar-help.php:320
2195
- msgid "Raw URL for the details link; empty if target URL not defined."
2196
- msgstr ""
2197
-
2198
- #: my-calendar-help.php:323
2199
- msgid ""
2200
- "Provides a link to the defined event URL when present, otherwise the "
2201
- "{details} link."
2202
- msgstr ""
2203
-
2204
- #: my-calendar-help.php:326
2205
- msgid ""
2206
- "Displays text indicating whether registration for the event is currently "
2207
- "open or closed; displays nothing if that choice is selected in the event."
2208
- msgstr ""
2209
-
2210
- #: my-calendar-help.php:329
2211
- msgid "URL to ticketing for event."
2212
- msgstr ""
2213
-
2214
- #: my-calendar-help.php:332
2215
- msgid "Registration information about this event."
2216
- msgstr ""
2217
-
2218
- #: my-calendar-help.php:335
2219
- msgid ""
2220
- "Displays the current status of the event: either \"Published\" or \"Reserved"
2221
- "\" - primary used in email templates."
2222
- msgstr ""
2223
-
2224
- #: my-calendar-help.php:338 my-calendar.php:257
2225
- msgid "Location Template Tags"
2226
- msgstr ""
2227
-
2228
- #: my-calendar-help.php:342
2229
- msgid "Displays the name of the location of the event."
2230
- msgstr ""
2231
-
2232
- #: my-calendar-help.php:345
2233
- msgid "Displays the first line of the site address."
2234
- msgstr ""
2235
-
2236
- #: my-calendar-help.php:348
2237
- msgid "Displays the second line of the site address."
2238
- msgstr ""
2239
-
2240
- #: my-calendar-help.php:351
2241
- msgid "Displays the city for the location."
2242
- msgstr ""
2243
-
2244
- #: my-calendar-help.php:354
2245
- msgid "Displays the state for the location."
2246
- msgstr ""
2247
-
2248
- #: my-calendar-help.php:357
2249
- msgid "Displays the postcode for the location."
2250
- msgstr ""
2251
-
2252
- #: my-calendar-help.php:360
2253
- msgid "Shows the custom region entered for the location."
2254
- msgstr ""
2255
-
2256
- #: my-calendar-help.php:363
2257
- msgid "Displays the country for the event location."
2258
- msgstr ""
2259
-
2260
- #: my-calendar-help.php:366
2261
- msgid "Output the URL for the location link."
2262
- msgstr ""
2263
-
2264
- #: my-calendar-help.php:369
2265
- msgid "Output the stored phone number for the location."
2266
- msgstr ""
2267
-
2268
- #: my-calendar-help.php:372
2269
- msgid ""
2270
- "Output a hyperlink to the location's listed link with default link text."
2271
- msgstr ""
2272
-
2273
- #: my-calendar-help.php:375
2274
- msgid ""
2275
- "Displays the event address in <a href=\"http://microformats.org/wiki/hcard"
2276
- "\">hcard</a> format."
2277
- msgstr ""
2278
-
2279
- #: my-calendar-help.php:378
2280
- msgid ""
2281
- "Displays a link to a Google Map of the event, if sufficient address "
2282
- "information is available. If not, will be empty."
2283
- msgstr ""
2284
-
2285
- #: my-calendar-help.php:381
2286
- msgid ""
2287
- "Produces the URL for the Google Map for the event location if sufficient "
2288
- "address information is available. If not, will be empty."
2289
- msgstr ""
2290
-
2291
- #: my-calendar-help.php:384
2292
- msgid ""
2293
- "Output Google Map if sufficient address information is available. If not, "
2294
- "will be empty."
2295
- msgstr ""
2296
-
2297
- #: my-calendar-help.php:387
2298
- msgid "Unordered list of accessibility options for this location."
2299
- msgstr ""
2300
-
2301
- #: my-calendar-help.php:390 my-calendar.php:292
2302
- msgid "Category Template Tags"
2303
- msgstr ""
2304
-
2305
- #: my-calendar-help.php:394
2306
- msgid "Displays the name of the category the event is in."
2307
- msgstr ""
2308
-
2309
- #: my-calendar-help.php:397
2310
- msgid "Produces the address of the current event's category icon."
2311
- msgstr ""
2312
-
2313
- #: my-calendar-help.php:400
2314
- msgid "Produces the HTML for the current event's category icon."
2315
- msgstr ""
2316
-
2317
- #: my-calendar-help.php:403
2318
- msgid "Produces the hex code for the current event's category color."
2319
- msgstr ""
2320
-
2321
- #: my-calendar-help.php:406
2322
- msgid "Displays the ID for the category the event is in."
2323
- msgstr ""
2324
-
2325
- #: my-calendar-help.php:409
2326
- msgid "Special use Template Tags"
2327
- msgstr ""
2328
-
2329
- #: my-calendar-help.php:413
2330
- msgid "A unique ID for the current instance of an event."
2331
- msgstr ""
2332
-
2333
- #: my-calendar-help.php:416
2334
- msgid ""
2335
- "The ID for the event record associated with the current instance of an event."
2336
- msgstr ""
2337
-
2338
- #: my-calendar-help.php:426
2339
- msgid "Get Plug-in Support"
2340
- msgstr ""
2341
-
2342
- #: my-calendar-help.php:431
2343
- msgid "My Calendar support requests can only be sent by administrators."
2344
- msgstr ""
2345
-
2346
- #: my-calendar-help.php:441
2347
- msgid ""
2348
- "<strong>Uninstalling the plugin</strong>: Although the WordPress standard "
2349
- "and expectation is for plug-ins to delete any custom database tables when "
2350
- "they're uninstalled, My Calendar <em>does not do this</em>. This was a "
2351
- "conscious decision on my part -- the data stored in your My Calendar tables "
2352
- "is yours; with the sole exception of the \"General\" category, you added "
2353
- "every piece of it yourself. As such, I feel it would be a major disservice "
2354
- "to you to delete this information if you uninstall the plug-in. As a result, "
2355
- "if you wish to get rid of the plug-in completely, you'll need to remove "
2356
- "those tables yourself. All your My Calendar settings will be deleted, "
2357
- "however."
2358
- msgstr ""
2359
-
2360
- #: my-calendar-help.php:444
2361
- msgid ""
2362
- "<strong>Donations</strong>: I appreciate anything you can give. $2 may not "
2363
- "seem like much, but it can really add up when thousands of people are using "
2364
- "the software. Please note that I am not a non-profit organization, and your "
2365
- "gifts are not tax deductible. Thank you!"
2366
- msgstr ""
2367
-
2368
- #: my-calendar-locations.php:17
2369
- msgid "Location Controls Updated"
2370
- msgstr ""
2371
-
2372
- #: my-calendar-locations.php:70
2373
- msgid "Location added successfully"
2374
- msgstr ""
2375
-
2376
- #: my-calendar-locations.php:72
2377
- msgid "Location could not be added to database"
2378
- msgstr ""
2379
-
2380
- #: my-calendar-locations.php:79
2381
- msgid "Location deleted successfully"
2382
- msgstr ""
2383
-
2384
- #: my-calendar-locations.php:81
2385
- msgid "Location could not be deleted"
2386
- msgstr ""
2387
-
2388
- #: my-calendar-locations.php:109
2389
- msgid "Location could not be edited."
2390
- msgstr ""
2391
-
2392
- #: my-calendar-locations.php:111
2393
- msgid "Location was not changed."
2394
- msgstr ""
2395
-
2396
- #: my-calendar-locations.php:113
2397
- msgid "Location edited successfully"
2398
- msgstr ""
2399
-
2400
- #: my-calendar-locations.php:135
2401
- msgid "Add New Location"
2402
- msgstr ""
2403
-
2404
- #: my-calendar-locations.php:137
2405
- msgid "Edit Location"
2406
- msgstr ""
2407
-
2408
- #: my-calendar-locations.php:144
2409
- msgid "Location Editor"
2410
- msgstr ""
2411
-
2412
- #: my-calendar-locations.php:162
2413
- msgid "Add Location"
2414
- msgstr ""
2415
-
2416
- #: my-calendar-locations.php:170
2417
- msgid "Add a New Location"
2418
- msgstr ""
2419
-
2420
- #: my-calendar-locations.php:174 my-calendar.php:350
2421
- msgid "Manage Locations"
2422
- msgstr ""
2423
-
2424
- #: my-calendar-locations.php:230
2425
- msgid "&laquo; Previous<span class=\"screen-reader-text\"> Locations</span>"
2426
- msgstr ""
2427
-
2428
- #: my-calendar-locations.php:231
2429
- msgid "Next<span class=\"screen-reader-text\"> Locations</span> &raquo;"
2430
- msgstr ""
2431
-
2432
- #: my-calendar-locations.php:263
2433
- msgid "There are no locations in the database yet!"
2434
- msgstr ""
2435
-
2436
- #: my-calendar-locations.php:266
2437
- msgid ""
2438
- "Please note: editing or deleting locations stored for re-use will have no "
2439
- "effect on any event previously scheduled at that location. The location "
2440
- "database exists purely as a shorthand method to enter frequently used "
2441
- "locations into event records."
2442
- msgstr ""
2443
-
2444
- #: my-calendar-locations.php:273
2445
- msgid "Control Input Options for Location Fields"
2446
- msgstr ""
2447
-
2448
- #: my-calendar-locations.php:282
2449
- msgid "Location Controls for %s"
2450
- msgstr ""
2451
-
2452
- #: my-calendar-locations.php:282
2453
- msgid "Value, Label; one per line"
2454
- msgstr ""
2455
-
2456
- #: my-calendar-locations.php:295
2457
- msgid "Save Location Controls"
2458
- msgstr ""
2459
-
2460
- #: my-calendar-locations.php:304
2461
- msgid "Copy this location into the locations table"
2462
- msgstr ""
2463
-
2464
- #: my-calendar-locations.php:322
2465
- msgid "Location Address"
2466
- msgstr ""
2467
-
2468
- #: my-calendar-locations.php:395
2469
- msgid ""
2470
- "If you supply GPS coordinates for your location, they will be used in place "
2471
- "of any other address information to provide your map link."
2472
- msgstr ""
2473
-
2474
- #: my-calendar-locations.php:404
2475
- msgid "Location Contact Information"
2476
- msgstr ""
2477
-
2478
- #: my-calendar-locations.php:409
2479
- msgid "Secondary Phone"
2480
- msgstr ""
2481
-
2482
- #: my-calendar-output.php:93
2483
- msgid "(%s in your time zone)"
2484
- msgstr ""
2485
-
2486
- #: my-calendar-output.php:99
2487
- msgid "Not Applicable"
2488
- msgstr ""
2489
-
2490
- #: my-calendar-output.php:235 my-calendar-output.php:345
2491
- msgid "Close"
2492
- msgstr ""
2493
-
2494
- #: my-calendar-output.php:244
2495
- msgid "Posted by"
2496
- msgstr ""
2497
-
2498
- #: my-calendar-output.php:262 my-calendar-templates.php:270
2499
- msgid "iCal"
2500
- msgstr ""
2501
-
2502
- #: my-calendar-output.php:302
2503
- msgid ""
2504
- "This event is in a series. Register for the first event in this series to "
2505
- "attend."
2506
- msgstr ""
2507
-
2508
- #: my-calendar-output.php:309
2509
- msgid "View full calendar"
2510
- msgstr ""
2511
-
2512
- #: my-calendar-output.php:371
2513
- msgid "Edit This Date"
2514
- msgstr ""
2515
-
2516
- #: my-calendar-output.php:371
2517
- msgid "Edit All"
2518
- msgstr ""
2519
-
2520
- #: my-calendar-output.php:371
2521
- msgid "Delete This Date"
2522
- msgstr ""
2523
-
2524
- #: my-calendar-output.php:371
2525
- msgid "Delete All"
2526
- msgstr ""
2527
-
2528
- #: my-calendar-output.php:433
2529
- msgid "Go"
2530
- msgstr ""
2531
-
2532
- #: my-calendar-output.php:459
2533
- msgid "Calendar: Print View"
2534
- msgstr ""
2535
-
2536
- #: my-calendar-output.php:478
2537
- msgid "Return to site"
2538
- msgstr ""
2539
-
2540
- #: my-calendar-output.php:491
2541
- msgid "View as Grid"
2542
- msgstr ""
2543
-
2544
- #: my-calendar-output.php:495
2545
- msgid "View as List"
2546
- msgstr ""
2547
-
2548
- #: my-calendar-output.php:588
2549
- msgid " and %d other event"
2550
- msgstr ""
2551
-
2552
- #: my-calendar-output.php:590
2553
- msgid " and %d other events"
2554
- msgstr ""
2555
-
2556
- #: my-calendar-output.php:668
2557
- msgid "Sorry, your search produced no results."
2558
- msgstr ""
2559
-
2560
- #: my-calendar-output.php:677
2561
- msgid "Events Search for &ldquo;%s&rdquo;"
2562
- msgstr ""
2563
-
2564
- #: my-calendar-output.php:757
2565
- msgid "<abbr title=\"Sunday\">Sun</abbr>"
2566
- msgstr ""
2567
-
2568
- #: my-calendar-output.php:758
2569
- msgid "<abbr title=\"Monday\">Mon</abbr>"
2570
- msgstr ""
2571
-
2572
- #: my-calendar-output.php:759
2573
- msgid "<abbr title=\"Tuesday\">Tues</abbr>"
2574
- msgstr ""
2575
-
2576
- #: my-calendar-output.php:760
2577
- msgid "<abbr title=\"Wednesday\">Wed</abbr>"
2578
- msgstr ""
2579
-
2580
- #: my-calendar-output.php:761
2581
- msgid "<abbr title=\"Thursday\">Thur</abbr>"
2582
- msgstr ""
2583
-
2584
- #: my-calendar-output.php:762
2585
- msgid "<abbr title=\"Friday\">Fri</abbr>"
2586
- msgstr ""
2587
-
2588
- #: my-calendar-output.php:763
2589
- msgid "<abbr title=\"Saturday\">Sat</abbr>"
2590
- msgstr ""
2591
-
2592
- #: my-calendar-output.php:768
2593
- msgid "<abbr title=\"Sunday\">S</abbr>"
2594
- msgstr ""
2595
-
2596
- #: my-calendar-output.php:769
2597
- msgid "<abbr title=\"Monday\">M</abbr>"
2598
- msgstr ""
2599
-
2600
- #: my-calendar-output.php:770
2601
- msgid "<abbr title=\"Tuesday\">T</abbr>"
2602
- msgstr ""
2603
-
2604
- #: my-calendar-output.php:771
2605
- msgid "<abbr title=\"Wednesday\">W</abbr>"
2606
- msgstr ""
2607
-
2608
- #: my-calendar-output.php:772
2609
- msgid "<abbr title=\"Thursday\">T</abbr>"
2610
- msgstr ""
2611
-
2612
- #: my-calendar-output.php:773
2613
- msgid "<abbr title=\"Friday\">F</abbr>"
2614
- msgstr ""
2615
-
2616
- #: my-calendar-output.php:774
2617
- msgid "<abbr title=\"Saturday\">S</abbr>"
2618
- msgstr ""
2619
-
2620
- #: my-calendar-output.php:875
2621
- msgid "Print View"
2622
- msgstr ""
2623
-
2624
- #: my-calendar-output.php:968
2625
- msgid "No events scheduled for today!"
2626
- msgstr ""
2627
-
2628
- #: my-calendar-output.php:987
2629
- msgid "and"
2630
- msgstr ""
2631
-
2632
- #: my-calendar-output.php:1002
2633
- msgid "Events in"
2634
- msgstr ""
2635
-
2636
- #: my-calendar-output.php:1034
2637
- msgid "There are no events scheduled during this period."
2638
- msgstr ""
2639
-
2640
- #: my-calendar-output.php:1142
2641
- msgid ""
2642
- "Unrecognized calendar format. Please use one of 'list','calendar', or 'mini'."
2643
- msgstr ""
2644
-
2645
- #: my-calendar-output.php:1181 my-calendar-output.php:1371
2646
- #: my-calendar-output.php:1374
2647
- msgid "All Categories"
2648
- msgstr ""
2649
-
2650
- #: my-calendar-output.php:1194
2651
- msgid "Subscribe by <abbr title=\"Really Simple Syndication\">RSS</abbr>"
2652
- msgstr ""
2653
-
2654
- #: my-calendar-output.php:1195
2655
- msgid "Download as <abbr title=\"iCal Events Export\">iCal</abbr>"
2656
- msgstr ""
2657
-
2658
- #: my-calendar-output.php:1218 my-calendar-settings.php:464
2659
- msgid "Next"
2660
- msgstr ""
2661
-
2662
- #: my-calendar-output.php:1244 my-calendar-output.php:1288
2663
- msgid "Week of "
2664
- msgstr ""
2665
-
2666
- #: my-calendar-output.php:1262 my-calendar-settings.php:463
2667
- msgid "Previous"
2668
- msgstr ""
2669
-
2670
- #: my-calendar-output.php:1329
2671
- msgid "Filter Events"
2672
- msgstr ""
2673
-
2674
- #: my-calendar-output.php:1346
2675
- msgid "(select to include)"
2676
- msgstr ""
2677
-
2678
- #: my-calendar-output.php:1391 my-calendar-output.php:1650
2679
- msgid "Submit"
2680
- msgstr ""
2681
-
2682
- #: my-calendar-output.php:1430 my-calendar-output.php:1431
2683
- msgid "Accessibility Services"
2684
- msgstr ""
2685
-
2686
- #: my-calendar-output.php:1433
2687
- msgid "No Limit"
2688
- msgstr ""
2689
-
2690
- #: my-calendar-output.php:1448
2691
- msgid "Limit by Access"
2692
- msgstr ""
2693
-
2694
- #: my-calendar-output.php:1585 my-calendar-output.php:1608
2695
- msgid "Show all"
2696
- msgstr ""
2697
-
2698
- #: my-calendar-settings.php:127
2699
- msgid "Categories imported successfully."
2700
- msgstr ""
2701
-
2702
- #: my-calendar-settings.php:127
2703
- msgid "Categories not imported."
2704
- msgstr ""
2705
-
2706
- #: my-calendar-settings.php:128
2707
- msgid "Events imported successfully."
2708
- msgstr ""
2709
-
2710
- #: my-calendar-settings.php:128
2711
- msgid "Events not imported."
2712
- msgstr ""
2713
-
2714
- #: my-calendar-settings.php:152
2715
- msgid "Dropping occurrences database table"
2716
- msgstr ""
2717
-
2718
- #: my-calendar-settings.php:154
2719
- msgid "Reinstalling occurrences database table."
2720
- msgstr ""
2721
-
2722
- #: my-calendar-settings.php:156
2723
- msgid "Generating event occurrences."
2724
- msgstr ""
2725
-
2726
- #: my-calendar-settings.php:158
2727
- msgid "Event generation completed."
2728
- msgstr ""
2729
-
2730
- #: my-calendar-settings.php:168
2731
- msgid "My Calendar Cache cleared"
2732
- msgstr ""
2733
-
2734
- #: my-calendar-settings.php:177
2735
- msgid "My Calendar Management Settings saved"
2736
- msgstr ""
2737
-
2738
- #: my-calendar-settings.php:182 my-calendar-settings.php:723
2739
- msgid "Add Events"
2740
- msgstr ""
2741
-
2742
- #: my-calendar-settings.php:183 my-calendar-settings.php:724
2743
- msgid "Approve Events"
2744
- msgstr ""
2745
-
2746
- #: my-calendar-settings.php:185 my-calendar-settings.php:726
2747
- msgid "Edit Categories"
2748
- msgstr ""
2749
-
2750
- #: my-calendar-settings.php:186 my-calendar-settings.php:727
2751
- msgid "Edit Locations"
2752
- msgstr ""
2753
-
2754
- #: my-calendar-settings.php:187 my-calendar-settings.php:728
2755
- msgid "Edit Styles"
2756
- msgstr ""
2757
-
2758
- #: my-calendar-settings.php:188 my-calendar-settings.php:729
2759
- msgid "Edit Behaviors"
2760
- msgstr ""
2761
-
2762
- #: my-calendar-settings.php:189 my-calendar-settings.php:730
2763
- msgid "Edit Templates"
2764
- msgstr ""
2765
-
2766
- #: my-calendar-settings.php:190 my-calendar-settings.php:731
2767
- msgid "Edit Settings"
2768
- msgstr ""
2769
-
2770
- #: my-calendar-settings.php:191 my-calendar-settings.php:732
2771
- msgid "View Help"
2772
- msgstr ""
2773
-
2774
- #: my-calendar-settings.php:205
2775
- msgid "My Calendar Permissions Updated"
2776
- msgstr ""
2777
-
2778
- #: my-calendar-settings.php:255
2779
- msgid "Output Settings saved"
2780
- msgstr ""
2781
-
2782
- #: my-calendar-settings.php:265
2783
- msgid "Date/Time Format Settings saved"
2784
- msgstr ""
2785
-
2786
- #: my-calendar-settings.php:284
2787
- msgid "Input Settings saved"
2788
- msgstr ""
2789
-
2790
- #: my-calendar-settings.php:292
2791
- msgid "Multisite settings saved"
2792
- msgstr ""
2793
-
2794
- #: my-calendar-settings.php:321
2795
- msgid "Custom text settings saved"
2796
- msgstr ""
2797
-
2798
- #: my-calendar-settings.php:337
2799
- msgid "Email notice settings saved"
2800
- msgstr ""
2801
-
2802
- #: my-calendar-settings.php:353
2803
- msgid "My Calendar Options"
2804
- msgstr ""
2805
-
2806
- #: my-calendar-settings.php:385
2807
- msgid "My Calendar Settings"
2808
- msgstr ""
2809
-
2810
- #: my-calendar-settings.php:388 my-calendar-settings.php:412
2811
- msgid "Management"
2812
- msgstr ""
2813
-
2814
- #: my-calendar-settings.php:389
2815
- msgid "Customizable Text"
2816
- msgstr ""
2817
-
2818
- #: my-calendar-settings.php:390
2819
- msgid "Output"
2820
- msgstr ""
2821
-
2822
- #: my-calendar-settings.php:392
2823
- msgid "Input"
2824
- msgstr ""
2825
-
2826
- #: my-calendar-settings.php:394
2827
- msgid "Multi-site"
2828
- msgstr ""
2829
-
2830
- #: my-calendar-settings.php:396
2831
- msgid "Permissions"
2832
- msgstr ""
2833
-
2834
- #: my-calendar-settings.php:397 my-calendar-settings.php:772
2835
- msgid "Email Notifications"
2836
- msgstr ""
2837
-
2838
- #: my-calendar-settings.php:406
2839
- msgid "My Calendar Management"
2840
- msgstr ""
2841
-
2842
- #: my-calendar-settings.php:414
2843
- msgid "Get data (events, categories and locations) from a remote database."
2844
- msgstr ""
2845
-
2846
- #: my-calendar-settings.php:416
2847
- msgid "Add this code to your theme's <code>functions.php</code> file:"
2848
- msgstr ""
2849
-
2850
- #: my-calendar-settings.php:421
2851
- msgid ""
2852
- "You will need to allow remote connections from this site to the site hosting "
2853
- "your My Calendar events. Replace the above placeholders with the host-site "
2854
- "information. The two sites must have the same WP table prefix. While this "
2855
- "option is enabled, you may not enter or edit events through this "
2856
- "installation."
2857
- msgstr ""
2858
-
2859
- #: my-calendar-settings.php:424
2860
- msgid "Enable approval options."
2861
- msgstr ""
2862
-
2863
- #: my-calendar-settings.php:425
2864
- msgid "Enable external API."
2865
- msgstr ""
2866
-
2867
- #: my-calendar-settings.php:428
2868
- msgid ""
2869
- "Clear current cache. (Necessary if you edit shortcodes to change displayed "
2870
- "categories, for example.)"
2871
- msgstr ""
2872
-
2873
- #: my-calendar-settings.php:430
2874
- msgid "Default Sort order for Admin Events List"
2875
- msgstr ""
2876
-
2877
- #: my-calendar-settings.php:430
2878
- msgid "Event ID"
2879
- msgstr ""
2880
-
2881
- #: my-calendar-settings.php:430
2882
- msgid "Description"
2883
- msgstr ""
2884
-
2885
- #: my-calendar-settings.php:430
2886
- msgid "Start Date"
2887
- msgstr ""
2888
-
2889
- #: my-calendar-settings.php:433
2890
- msgid "Currently editing my local calendar"
2891
- msgstr ""
2892
-
2893
- #: my-calendar-settings.php:433
2894
- msgid "Currently editing the network calendar"
2895
- msgstr ""
2896
-
2897
- #: my-calendar-settings.php:436
2898
- msgid ""
2899
- "You are currently working in the primary site for this network; your local "
2900
- "calendar is also the global table."
2901
- msgstr ""
2902
-
2903
- #: my-calendar-settings.php:439
2904
- msgid "Re-generate event occurrences table."
2905
- msgstr ""
2906
-
2907
- #: my-calendar-settings.php:443
2908
- msgid "Save Management Settings"
2909
- msgstr ""
2910
-
2911
- #: my-calendar-settings.php:447
2912
- msgid "My Calendar management settings are only available to administrators."
2913
- msgstr ""
2914
-
2915
- #: my-calendar-settings.php:455
2916
- msgid "Text Settings"
2917
- msgstr ""
2918
-
2919
- #: my-calendar-settings.php:460
2920
- msgid "Customize Text Fields"
2921
- msgstr ""
2922
-
2923
- #: my-calendar-settings.php:462
2924
- msgid "Label for all-day events"
2925
- msgstr ""
2926
-
2927
- #: my-calendar-settings.php:463
2928
- msgid "Previous events link"
2929
- msgstr ""
2930
-
2931
- #: my-calendar-settings.php:463 my-calendar-settings.php:464
2932
- msgid "Use <code>{date}</code> to display date in navigation."
2933
- msgstr ""
2934
-
2935
- #: my-calendar-settings.php:464
2936
- msgid "Next events link"
2937
- msgstr ""
2938
-
2939
- #: my-calendar-settings.php:465
2940
- msgid "If events are open"
2941
- msgstr ""
2942
-
2943
- #: my-calendar-settings.php:465
2944
- msgid "Registration is open"
2945
- msgstr ""
2946
-
2947
- #: my-calendar-settings.php:466
2948
- msgid "If events are closed"
2949
- msgstr ""
2950
-
2951
- #: my-calendar-settings.php:466
2952
- msgid "Registration is closed"
2953
- msgstr ""
2954
-
2955
- #: my-calendar-settings.php:467
2956
- msgid "Week view caption:"
2957
- msgstr ""
2958
-
2959
- #: my-calendar-settings.php:467
2960
- msgid "Available tag: <code>{date format=\"\"}</code>"
2961
- msgstr ""
2962
-
2963
- #: my-calendar-settings.php:468
2964
- msgid "Extended caption:"
2965
- msgstr ""
2966
-
2967
- #: my-calendar-settings.php:468
2968
- msgid "Follows month/year in list views."
2969
- msgstr ""
2970
-
2971
- #: my-calendar-settings.php:469
2972
- msgid "Event title template"
2973
- msgstr ""
2974
-
2975
- #: my-calendar-settings.php:469 my-calendar-settings.php:471
2976
- #: my-calendar-settings.php:779
2977
- msgid "Templating Help"
2978
- msgstr ""
2979
-
2980
- #: my-calendar-settings.php:470
2981
- msgid "Event details link text"
2982
- msgstr ""
2983
-
2984
- #: my-calendar-settings.php:470
2985
- msgid ""
2986
- "Tags: <code>{title}</code>, <code>{location}</code>, <code>{color}</code>, "
2987
- "<code>{icon}</code>, <code>{date}</code>, <code>{time}</code>."
2988
- msgstr ""
2989
-
2990
- #: my-calendar-settings.php:471
2991
- msgid "Event URL link text"
2992
- msgstr ""
2993
-
2994
- #: my-calendar-settings.php:472
2995
- msgid "Title element template"
2996
- msgstr ""
2997
-
2998
- #: my-calendar-settings.php:472
2999
- msgid "Current: %s"
3000
- msgstr ""
3001
-
3002
- #: my-calendar-settings.php:476
3003
- msgid "Save Custom Text Settings"
3004
- msgstr ""
3005
-
3006
- #: my-calendar-settings.php:485
3007
- msgid "Output Settings"
3008
- msgstr ""
3009
-
3010
- #: my-calendar-settings.php:490
3011
- msgid "Calendar Link Targets"
3012
- msgstr ""
3013
-
3014
- #: my-calendar-settings.php:494
3015
- msgid "Where is your main calendar page?"
3016
- msgstr ""
3017
-
3018
- #: my-calendar-settings.php:494 my-calendar-settings.php:495
3019
- msgid ""
3020
- "Can be any Page or Post which includes the <code>[my_calendar]</code> "
3021
- "shortcode."
3022
- msgstr ""
3023
-
3024
- #: my-calendar-settings.php:495
3025
- msgid ""
3026
- "Target <abbr title=\"Uniform resource locator\">URL</abbr> for mini calendar "
3027
- "date links:"
3028
- msgstr ""
3029
-
3030
- #: my-calendar-settings.php:496
3031
- msgid "Open calendar links to event details URL"
3032
- msgstr ""
3033
-
3034
- #: my-calendar-settings.php:500
3035
- msgid "Mini calendar widget date links to:"
3036
- msgstr ""
3037
-
3038
- #: my-calendar-settings.php:500
3039
- msgid "jQuery pop-up view"
3040
- msgstr ""
3041
-
3042
- #: my-calendar-settings.php:500
3043
- msgid "daily view page (above)"
3044
- msgstr ""
3045
-
3046
- #: my-calendar-settings.php:500
3047
- msgid "in-page anchor on main calendar page (list)"
3048
- msgstr ""
3049
-
3050
- #: my-calendar-settings.php:500
3051
- msgid "in-page anchor on main calendar page (grid)"
3052
- msgstr ""
3053
-
3054
- #: my-calendar-settings.php:506
3055
- msgid "Set Default Navigation Element Order (can be overridden in shortcodes)"
3056
- msgstr ""
3057
-
3058
- #: my-calendar-settings.php:513
3059
- msgid "Primary Previous/Next Buttons"
3060
- msgstr ""
3061
-
3062
- #: my-calendar-settings.php:514
3063
- msgid "Switch between list and grid views"
3064
- msgstr ""
3065
-
3066
- #: my-calendar-settings.php:515
3067
- msgid "Jump to any other month/year"
3068
- msgstr ""
3069
-
3070
- #: my-calendar-settings.php:516
3071
- msgid "Link to printable view"
3072
- msgstr ""
3073
-
3074
- #: my-calendar-settings.php:517
3075
- msgid "Toggle between day, week, and month view"
3076
- msgstr ""
3077
-
3078
- #: my-calendar-settings.php:518
3079
- msgid "The calendar"
3080
- msgstr ""
3081
-
3082
- #: my-calendar-settings.php:520
3083
- msgid "Links to RSS and iCal output"
3084
- msgstr ""
3085
-
3086
- #: my-calendar-settings.php:521
3087
- msgid "Elements below here will be hidden."
3088
- msgstr ""
3089
-
3090
- #: my-calendar-settings.php:543
3091
- msgid "Grid Layout Options"
3092
- msgstr ""
3093
-
3094
- #: my-calendar-settings.php:545
3095
- msgid "Show Weekends on Calendar"
3096
- msgstr ""
3097
-
3098
- #: my-calendar-settings.php:546
3099
- msgid "Switch to list view on mobile devices"
3100
- msgstr ""
3101
-
3102
- #: my-calendar-settings.php:552
3103
- msgid "List Layout Options"
3104
- msgstr ""
3105
-
3106
- #: my-calendar-settings.php:554
3107
- msgid "How many months of events to show at a time:"
3108
- msgstr ""
3109
-
3110
- #: my-calendar-settings.php:555
3111
- msgid ""
3112
- "Show the first event's title and the number of events that day next to the "
3113
- "date."
3114
- msgstr ""
3115
-
3116
- #: my-calendar-settings.php:561
3117
- msgid "Event Details Pop-up"
3118
- msgstr ""
3119
-
3120
- #: my-calendar-settings.php:562
3121
- msgid ""
3122
- "The checked items will be shown in your event details view. Does not apply "
3123
- "if you are using a custom template"
3124
- msgstr ""
3125
-
3126
- #: my-calendar-settings.php:564
3127
- msgid "Author's name"
3128
- msgstr ""
3129
-
3130
- #: my-calendar-settings.php:565
3131
- msgid "Link to single event iCal download"
3132
- msgstr ""
3133
-
3134
- #: my-calendar-settings.php:566
3135
- msgid "Link to submit event to Google Calendar"
3136
- msgstr ""
3137
-
3138
- #: my-calendar-settings.php:567
3139
- msgid "Hide Category icons"
3140
- msgstr ""
3141
-
3142
- #: my-calendar-settings.php:568
3143
- msgid "Link to Google Map"
3144
- msgstr ""
3145
-
3146
- #: my-calendar-settings.php:569
3147
- msgid "Event Address"
3148
- msgstr ""
3149
-
3150
- #: my-calendar-settings.php:570
3151
- msgid "Short description"
3152
- msgstr ""
3153
-
3154
- #: my-calendar-settings.php:571
3155
- msgid "Full description"
3156
- msgstr ""
3157
-
3158
- #: my-calendar-settings.php:572
3159
- msgid "Process WordPress shortcodes in descriptions"
3160
- msgstr ""
3161
-
3162
- #: my-calendar-settings.php:573
3163
- msgid "Link to event details (requires <a href='#mc_uri'>URL</a>)"
3164
- msgstr ""
3165
-
3166
- #: my-calendar-settings.php:574
3167
- msgid "External link"
3168
- msgstr ""
3169
-
3170
- #: my-calendar-settings.php:575
3171
- msgid "Registration info"
3172
- msgstr ""
3173
-
3174
- #: my-calendar-settings.php:579
3175
- msgid "Event Category Display"
3176
- msgstr ""
3177
-
3178
- #: my-calendar-settings.php:581
3179
- msgid "No category colors with titles."
3180
- msgstr ""
3181
-
3182
- #: my-calendar-settings.php:581
3183
- msgid "Titles are in category colors."
3184
- msgstr ""
3185
-
3186
- #: my-calendar-settings.php:581
3187
- msgid "Titles have category color as background."
3188
- msgstr ""
3189
-
3190
- #: my-calendar-settings.php:582
3191
- msgid "Optimize contrast for category colors."
3192
- msgstr ""
3193
-
3194
- #: my-calendar-settings.php:587
3195
- msgid "Event Scheduling Defaults"
3196
- msgstr ""
3197
-
3198
- #: my-calendar-settings.php:589
3199
- msgid "Event links expire after event passes."
3200
- msgstr ""
3201
-
3202
- #: my-calendar-settings.php:590
3203
- msgid ""
3204
- "If a recurring event falls on a date that doesn't exist (like the 5th "
3205
- "Wednesday in February), move it back one week."
3206
- msgstr ""
3207
-
3208
- #: my-calendar-settings.php:591
3209
- msgid ""
3210
- "If an event coincides with an event in the designated \"Holiday\" category, "
3211
- "do not show the event."
3212
- msgstr ""
3213
-
3214
- #: my-calendar-settings.php:595
3215
- msgid "Save Output Settings"
3216
- msgstr ""
3217
-
3218
- #: my-calendar-settings.php:603
3219
- msgid "Calendar Time Formats"
3220
- msgstr ""
3221
-
3222
- #: my-calendar-settings.php:608
3223
- msgid "Set default date/time formats"
3224
- msgstr ""
3225
-
3226
- #: my-calendar-settings.php:617
3227
- msgid "Month format (calendar headings)"
3228
- msgstr ""
3229
-
3230
- #: my-calendar-settings.php:618
3231
- msgid "Time format"
3232
- msgstr ""
3233
-
3234
- #: my-calendar-settings.php:619
3235
- msgid "Date in grid mode, week view"
3236
- msgstr ""
3237
-
3238
- #: my-calendar-settings.php:620
3239
- msgid "Date Format in other views"
3240
- msgstr ""
3241
-
3242
- #: my-calendar-settings.php:622
3243
- msgid ""
3244
- "Date formats use syntax from the <a href=\"http://php.net/date\">PHP "
3245
- "<code>date()</code> function</a>. Save to update sample output."
3246
- msgstr ""
3247
-
3248
- #: my-calendar-settings.php:624
3249
- msgid "iCal times are UTC"
3250
- msgstr ""
3251
-
3252
- #: my-calendar-settings.php:628
3253
- msgid "Save Date/Time Settings"
3254
- msgstr ""
3255
-
3256
- #: my-calendar-settings.php:638
3257
- msgid "Calendar Input Settings"
3258
- msgstr ""
3259
-
3260
- #: my-calendar-settings.php:643
3261
- msgid ""
3262
- "Select which input fields will be available when adding or editing events."
3263
- msgstr ""
3264
-
3265
- #: my-calendar-settings.php:648 my-calendar.php:387
3266
- msgid "Event Location Dropdown Menu"
3267
- msgstr ""
3268
-
3269
- #: my-calendar-settings.php:648 my-calendar.php:387
3270
- msgid "Event Short Description field"
3271
- msgstr ""
3272
-
3273
- #: my-calendar-settings.php:648 my-calendar.php:387
3274
- msgid "Event Description Field"
3275
- msgstr ""
3276
-
3277
- #: my-calendar-settings.php:648 my-calendar.php:387
3278
- msgid "Event Category field"
3279
- msgstr ""
3280
-
3281
- #: my-calendar-settings.php:648 my-calendar.php:387
3282
- msgid "Event Image field"
3283
- msgstr ""
3284
-
3285
- #: my-calendar-settings.php:648 my-calendar.php:387
3286
- msgid "Event Link field"
3287
- msgstr ""
3288
-
3289
- #: my-calendar-settings.php:648 my-calendar.php:387
3290
- msgid "Event Recurrence Options"
3291
- msgstr ""
3292
-
3293
- #: my-calendar-settings.php:648 my-calendar.php:387
3294
- msgid "Event Registration options"
3295
- msgstr ""
3296
-
3297
- #: my-calendar-settings.php:648 my-calendar.php:387
3298
- msgid "Event Location fields"
3299
- msgstr ""
3300
-
3301
- #: my-calendar-settings.php:648 my-calendar.php:387
3302
- msgid "Set Special Scheduling options"
3303
- msgstr ""
3304
-
3305
- #: my-calendar-settings.php:648 my-calendar.php:387
3306
- msgid "Event Accessibility"
3307
- msgstr ""
3308
-
3309
- #: my-calendar-settings.php:662
3310
- msgid "Administrators see all input options"
3311
- msgstr ""
3312
-
3313
- #: my-calendar-settings.php:666
3314
- msgid "Save Input Settings"
3315
- msgstr ""
3316
-
3317
- #: my-calendar-settings.php:676
3318
- msgid "Multisite Settings (Network Administrators only)"
3319
- msgstr ""
3320
-
3321
- #: my-calendar-settings.php:682
3322
- msgid "WP MultiSite configurations"
3323
- msgstr ""
3324
-
3325
- #: my-calendar-settings.php:683
3326
- msgid ""
3327
- "The central calendar is the calendar associated with the primary site in "
3328
- "your WordPress Multisite network."
3329
- msgstr ""
3330
-
3331
- #: my-calendar-settings.php:685
3332
- msgid "Site owners may only post to their local calendar"
3333
- msgstr ""
3334
-
3335
- #: my-calendar-settings.php:686
3336
- msgid "Site owners may only post to the central calendar"
3337
- msgstr ""
3338
-
3339
- #: my-calendar-settings.php:687
3340
- msgid "Site owners may manage either calendar"
3341
- msgstr ""
3342
-
3343
- #: my-calendar-settings.php:689
3344
- msgid ""
3345
- "Changes only effect input permissions. Public-facing calendars will be "
3346
- "unchanged."
3347
- msgstr ""
3348
-
3349
- #: my-calendar-settings.php:691
3350
- msgid "Sub-site calendars show events from their local calendar."
3351
- msgstr ""
3352
-
3353
- #: my-calendar-settings.php:692
3354
- msgid "Sub-site calendars show events from the central calendar."
3355
- msgstr ""
3356
-
3357
- #: my-calendar-settings.php:696
3358
- msgid "Save Multisite Settings"
3359
- msgstr ""
3360
-
3361
- #: my-calendar-settings.php:706
3362
- msgid "My Calendar Permissions"
3363
- msgstr ""
3364
-
3365
- #: my-calendar-settings.php:755
3366
- msgid "Save Permissions"
3367
- msgstr ""
3368
-
3369
- #: my-calendar-settings.php:759
3370
- msgid "My Calendar permission settings are only available to administrators."
3371
- msgstr ""
3372
-
3373
- #: my-calendar-settings.php:767
3374
- msgid "Calendar Email Settings"
3375
- msgstr ""
3376
-
3377
- #: my-calendar-settings.php:775
3378
- msgid "Send Email Notifications when new events are scheduled or reserved."
3379
- msgstr ""
3380
-
3381
- #: my-calendar-settings.php:776
3382
- msgid "Notification messages are sent to:"
3383
- msgstr ""
3384
-
3385
- #: my-calendar-settings.php:777
3386
- msgid "Notification messages are sent from:"
3387
- msgstr ""
3388
-
3389
- #: my-calendar-settings.php:778
3390
- msgid "Email subject"
3391
- msgstr ""
3392
-
3393
- #: my-calendar-settings.php:778
3394
- msgid "New event added"
3395
- msgstr ""
3396
-
3397
- #: my-calendar-settings.php:779
3398
- msgid "Message Body"
3399
- msgstr ""
3400
-
3401
- #: my-calendar-settings.php:779
3402
- msgid "New Event:"
3403
- msgstr ""
3404
-
3405
- #: my-calendar-settings.php:780
3406
- msgid "Send HTML email"
3407
- msgstr ""
3408
-
3409
- #: my-calendar-settings.php:784
3410
- msgid "Save Email Settings"
3411
- msgstr ""
3412
-
3413
- #: my-calendar-styles.php:90
3414
- msgid "Styles are disabled, and were not edited."
3415
- msgstr ""
3416
-
3417
- #: my-calendar-styles.php:92
3418
- msgid "The stylesheet has been updated."
3419
- msgstr ""
3420
-
3421
- #: my-calendar-styles.php:92
3422
- msgid "Write Error! Please verify write permissions on the style file."
3423
- msgstr ""
3424
-
3425
- #: my-calendar-styles.php:106
3426
- msgid "Stylesheet reset to default."
3427
- msgstr ""
3428
-
3429
- #: my-calendar-styles.php:109
3430
- msgid "Style Settings Saved"
3431
- msgstr ""
3432
-
3433
- #: my-calendar-styles.php:118
3434
- msgid "New theme selected."
3435
- msgstr ""
3436
-
3437
- #: my-calendar-styles.php:133
3438
- msgid ""
3439
- "Sorry. The file you are looking for doesn't appear to exist. Please check "
3440
- "your file name and location!"
3441
- msgstr ""
3442
-
3443
- #: my-calendar-styles.php:138
3444
- msgid "My Calendar Styles"
3445
- msgstr ""
3446
-
3447
- #: my-calendar-styles.php:143
3448
- msgid "Calendar Style Settings"
3449
- msgstr ""
3450
-
3451
- #: my-calendar-styles.php:151
3452
- msgid "Select My Calendar Theme"
3453
- msgstr ""
3454
-
3455
- #: my-calendar-styles.php:158
3456
- msgid "Your Custom Stylesheets"
3457
- msgstr ""
3458
-
3459
- #: my-calendar-styles.php:167
3460
- msgid "Installed Stylesheets"
3461
- msgstr ""
3462
-
3463
- #: my-calendar-styles.php:174
3464
- msgid "Choose Style"
3465
- msgstr ""
3466
-
3467
- #: my-calendar-styles.php:188
3468
- msgid ""
3469
- "My Calendar was unable to update your CSS files during the upgrade. Please "
3470
- "check your file permissions if you wish to edit your My Calendar styles. "
3471
- "Your previously stored styles are below. This message and these styles will "
3472
- "be deleted from the database when you successfully update your stylesheet."
3473
- msgstr ""
3474
-
3475
- #: my-calendar-styles.php:196
3476
- msgid "CSS Style Options"
3477
- msgstr ""
3478
-
3479
- #: my-calendar-styles.php:198
3480
- msgid "Apply CSS on these pages (comma separated IDs)"
3481
- msgstr ""
3482
-
3483
- #: my-calendar-styles.php:201
3484
- msgid "Restore My Calendar stylesheet"
3485
- msgstr ""
3486
-
3487
- #: my-calendar-styles.php:201
3488
- msgid "Disable My Calendar Stylesheet"
3489
- msgstr ""
3490
-
3491
- #: my-calendar-styles.php:204
3492
- msgid "Edit the stylesheet for My Calendar"
3493
- msgstr ""
3494
-
3495
- #: my-calendar-styles.php:217
3496
- msgid "Comparing Your Style with latest installed version of My Calendar"
3497
- msgstr ""
3498
-
3499
- #: my-calendar-styles.php:221
3500
- msgid "There have been updates to the stylesheet."
3501
- msgstr ""
3502
-
3503
- #: my-calendar-styles.php:221
3504
- msgid "Compare Your Stylesheet with latest installed version of My Calendar."
3505
- msgstr ""
3506
-
3507
- #: my-calendar-styles.php:226
3508
- msgid "Your stylesheet matches that included with My Calendar."
3509
- msgstr ""
3510
-
3511
- #: my-calendar-styles.php:232
3512
- msgid ""
3513
- "Resetting your stylesheet will set your stylesheet to the version of that "
3514
- "style currently distributed with the plug-in."
3515
- msgstr ""
3516
-
3517
- #: my-calendar-templates.php:79
3518
- msgid "Map<span> to %s</span>"
3519
- msgstr ""
3520
-
3521
- #: my-calendar-templates.php:129
3522
- msgid "Map"
3523
- msgstr ""
3524
-
3525
- #: my-calendar-templates.php:145
3526
- msgid "Visit web site<span class=\"screen-reader-text\">: %s</span>"
3527
- msgstr ""
3528
-
3529
- #: my-calendar-templates.php:220
3530
- msgid "Details about"
3531
- msgstr ""
3532
-
3533
- #: my-calendar-templates.php:248
3534
- msgid "<span class=\"screen-reader-text\">Send %1$s to </span>Google Calendar"
3535
- msgstr ""
3536
-
3537
- #: my-calendar-templates.php:279
3538
- msgid "Event Details %s"
3539
- msgstr ""
3540
-
3541
- #: my-calendar-templates.php:517
3542
- msgid "Daily, weekdays only"
3543
- msgstr ""
3544
-
3545
- #: my-calendar-templates.php:519
3546
- msgid "Bi-weekly"
3547
- msgstr ""
3548
-
3549
- #: my-calendar-templates.php:520
3550
- msgid "the %s of each month"
3551
- msgstr ""
3552
-
3553
- #: my-calendar-templates.php:521
3554
- msgid "the %s %s of each month"
3555
- msgstr ""
3556
-
3557
- #: my-calendar-templates.php:522
3558
- msgid "Annually"
3559
- msgstr ""
3560
-
3561
- #: my-calendar-templating.php:20
3562
- msgid "Grid Output Template saved"
3563
- msgstr ""
3564
-
3565
- #: my-calendar-templating.php:28
3566
- msgid "RSS Feed Output Template saved"
3567
- msgstr ""
3568
-
3569
- #: my-calendar-templating.php:36
3570
- msgid "List Output Template saved"
3571
- msgstr ""
3572
-
3573
- #: my-calendar-templating.php:44
3574
- msgid "Mini Output Template saved"
3575
- msgstr ""
3576
-
3577
- #: my-calendar-templating.php:52
3578
- msgid "Event Details Template saved"
3579
- msgstr ""
3580
-
3581
- #: my-calendar-templating.php:68
3582
- msgid "My Calendar Information Templates"
3583
- msgstr ""
3584
-
3585
- #: my-calendar-templating.php:73
3586
- msgid ""
3587
- "Advanced users may customize the HTML template for each event. This page "
3588
- "lets you create a customized view of your events in each context. All "
3589
- "available template tags are documented on the Help page. These default "
3590
- "templates are based on the default views with all output enabled. "
3591
- "<strong>Custom templates will override any other output rules in your "
3592
- "settings.</strong>"
3593
- msgstr ""
3594
-
3595
- #: my-calendar-templating.php:73
3596
- msgid "Templates Help"
3597
- msgstr ""
3598
-
3599
- #: my-calendar-templating.php:77
3600
- msgid "My Calendar: Grid Event Template"
3601
- msgstr ""
3602
-
3603
- #: my-calendar-templating.php:82
3604
- msgid "Use this grid event template"
3605
- msgstr ""
3606
-
3607
- #: my-calendar-templating.php:85
3608
- msgid "Your custom template for events in the calendar grid output."
3609
- msgstr ""
3610
-
3611
- #: my-calendar-templating.php:88
3612
- msgid "Save Grid Template"
3613
- msgstr ""
3614
-
3615
- #: my-calendar-templating.php:97
3616
- msgid "My Calendar: List Event Template"
3617
- msgstr ""
3618
-
3619
- #: my-calendar-templating.php:102
3620
- msgid "Use this list event template"
3621
- msgstr ""
3622
-
3623
- #: my-calendar-templating.php:105
3624
- msgid "Your custom template for events in calendar list output."
3625
- msgstr ""
3626
-
3627
- #: my-calendar-templating.php:108
3628
- msgid "Save List Template"
3629
- msgstr ""
3630
-
3631
- #: my-calendar-templating.php:117
3632
- msgid "My Calendar: Mini Calendar Template"
3633
- msgstr ""
3634
-
3635
- #: my-calendar-templating.php:122
3636
- msgid "Use this mini event template"
3637
- msgstr ""
3638
-
3639
- #: my-calendar-templating.php:125
3640
- msgid "Your custom template for events in sidebar/mini calendar output."
3641
- msgstr ""
3642
-
3643
- #: my-calendar-templating.php:128
3644
- msgid "Save Mini Template"
3645
- msgstr ""
3646
-
3647
- #: my-calendar-templating.php:137
3648
- msgid "My Calendar: Event Details Page Template"
3649
- msgstr ""
3650
-
3651
- #: my-calendar-templating.php:142
3652
- msgid "Use this details template"
3653
- msgstr ""
3654
-
3655
- #: my-calendar-templating.php:145
3656
- msgid "Your custom template for events on the event details page."
3657
- msgstr ""
3658
-
3659
- #: my-calendar-templating.php:148
3660
- msgid "Save Details Template"
3661
- msgstr ""
3662
-
3663
- #: my-calendar-templating.php:157
3664
- msgid "My Calendar: RSS Event Template"
3665
- msgstr ""
3666
-
3667
- #: my-calendar-templating.php:159
3668
- msgid ""
3669
- "Notice: HTML templates are very forgiving of errors. RSS templates are not. "
3670
- "Be sure to test your changes."
3671
- msgstr ""
3672
-
3673
- #: my-calendar-templating.php:163
3674
- msgid "Use this custom RSS event template"
3675
- msgstr ""
3676
-
3677
- #: my-calendar-templating.php:166
3678
- msgid "Your custom template for events in the RSS feed."
3679
- msgstr ""
3680
-
3681
- #: my-calendar-templating.php:169
3682
- msgid "Save RSS Template"
3683
- msgstr ""
3684
-
3685
- #: my-calendar-upgrade-db.php:13
3686
- msgid "My Calendar Database is updated."
3687
- msgstr ""
3688
-
3689
- #: my-calendar-upgrade-db.php:25 my-calendar-upgrade-db.php:33
3690
- msgid "The My Calendar database needs to be updated."
3691
- msgstr ""
3692
-
3693
- #: my-calendar-upgrade-db.php:26 my-calendar-upgrade-db.php:33
3694
- #: my-calendar-upgrade-db.php:46
3695
- msgid "Update now"
3696
- msgstr ""
3697
-
3698
- #: my-calendar-upgrade-db.php:45
3699
- msgid ""
3700
- "You haven't entered any events, so My Calendar can't tell whether your "
3701
- "database is up to date. If you can't add events, upgrade your database!"
3702
- msgstr ""
3703
-
3704
- #: my-calendar-widgets.php:6
3705
- msgid "My Calendar: Simple Event Search"
3706
- msgstr ""
3707
-
3708
- #: my-calendar-widgets.php:35
3709
- msgid "My Calendar: Today's Events"
3710
- msgstr ""
3711
-
3712
- #: my-calendar-widgets.php:85
3713
- msgid "Add calendar URL to use this option."
3714
- msgstr ""
3715
-
3716
- #: my-calendar-widgets.php:87 my-calendar-widgets.php:189
3717
- msgid "Widget title links to:"
3718
- msgstr ""
3719
-
3720
- #: my-calendar-widgets.php:91
3721
- msgid "Show this text if there are no events today:"
3722
- msgstr ""
3723
-
3724
- #: my-calendar-widgets.php:95 my-calendar-widgets.php:223
3725
- #: my-calendar-widgets.php:672
3726
- msgid "Category or categories to display:"
3727
- msgstr ""
3728
-
3729
- #: my-calendar-widgets.php:99 my-calendar-widgets.php:227
3730
- msgid "Author or authors to show:"
3731
- msgstr ""
3732
-
3733
- #: my-calendar-widgets.php:103 my-calendar-widgets.php:231
3734
- msgid "Host or hosts to show:"
3735
- msgstr ""
3736
-
3737
- #: my-calendar-widgets.php:126
3738
- msgid "My Calendar: Upcoming Events"
3739
- msgstr ""
3740
-
3741
- #: my-calendar-widgets.php:185
3742
- msgid "Widget Options"
3743
- msgstr ""
3744
-
3745
- #: my-calendar-widgets.php:193
3746
- msgid "Display upcoming events by:"
3747
- msgstr ""
3748
-
3749
- #: my-calendar-widgets.php:194
3750
- msgid "Events (e.g. 2 past, 3 future)"
3751
- msgstr ""
3752
-
3753
- #: my-calendar-widgets.php:195
3754
- msgid "Dates (e.g. 4 days past, 5 forward)"
3755
- msgstr ""
3756
-
3757
- #: my-calendar-widgets.php:196
3758
- msgid "Show current month"
3759
- msgstr ""
3760
-
3761
- #: my-calendar-widgets.php:197
3762
- msgid "Show current year"
3763
- msgstr ""
3764
-
3765
- #: my-calendar-widgets.php:201
3766
- msgid "Skip the first <em>n</em> events"
3767
- msgstr ""
3768
-
3769
- #: my-calendar-widgets.php:204
3770
- msgid "Events sort order:"
3771
- msgstr ""
3772
-
3773
- #: my-calendar-widgets.php:205
3774
- msgid "Ascending (near to far)"
3775
- msgstr ""
3776
-
3777
- #: my-calendar-widgets.php:206
3778
- msgid "Descending (far to near)"
3779
- msgstr ""
3780
-
3781
- #: my-calendar-widgets.php:216
3782
- msgid "Include today's events"
3783
- msgstr ""
3784
-
3785
- #: my-calendar-widgets.php:219
3786
- msgid "Show this text if there are no events meeting your criteria:"
3787
- msgstr ""
3788
-
3789
- #: my-calendar-widgets.php:626
3790
- msgid "My Calendar: Mini Calendar"
3791
- msgstr ""
3792
-
3793
- #: my-calendar-widgets.php:644
3794
- msgid "Calendar"
3795
- msgstr ""
3796
-
3797
- #: my-calendar-widgets.php:668
3798
- msgid "Widget Title Link"
3799
- msgstr ""
3800
-
3801
- #: my-calendar-widgets.php:698
3802
- msgid "Mini-Calendar Timespan:"
3803
- msgstr ""
3804
-
3805
- #: my-calendar.php:145
3806
- msgid "My Calendar: Submissions"
3807
- msgstr ""
3808
-
3809
- #: my-calendar.php:147
3810
- msgid ""
3811
- "Buy the <a href='http://www.joedolson.com/articles/my-calendar/submissions/' "
3812
- "rel='external'>My Calendar Submissions add-on</a> &mdash; let your audience "
3813
- "build your calendar."
3814
- msgstr ""
3815
-
3816
- #: my-calendar.php:148
3817
- msgid "Learn more!"
3818
- msgstr ""
3819
-
3820
- #: my-calendar.php:155
3821
- msgid "Support This Plug-in"
3822
- msgstr ""
3823
-
3824
- #: my-calendar.php:161
3825
- msgid "Help me help you:"
3826
- msgstr ""
3827
-
3828
- #: my-calendar.php:161
3829
- msgid "Buy the My Calendar User's Guide"
3830
- msgstr ""
3831
-
3832
- #: my-calendar.php:162
3833
- msgid ""
3834
- "<strong>Or make a donation today!</strong> Every donation counts - donate "
3835
- "$5, $20, or $100 and help me keep this plug-in running!"
3836
- msgstr ""
3837
-
3838
- #: my-calendar.php:167
3839
- msgid "Make a Donation"
3840
- msgstr ""
3841
-
3842
- #: my-calendar.php:177
3843
- msgid "Get Help"
3844
- msgstr ""
3845
-
3846
- #: my-calendar.php:182
3847
- msgid "Get Support"
3848
- msgstr ""
3849
-
3850
- #: my-calendar.php:184
3851
- msgid "Check out my other plug-ins"
3852
- msgstr ""
3853
-
3854
- #: my-calendar.php:185
3855
- msgid "Rate this plug-in 5 stars!"
3856
- msgstr ""
3857
-
3858
- #: my-calendar.php:186
3859
- msgid "Help translate this plug-in!"
3860
- msgstr ""
3861
-
3862
- #: my-calendar.php:212
3863
- msgid "Title of the event."
3864
- msgstr ""
3865
-
3866
- #: my-calendar.php:215
3867
- msgid ""
3868
- "Title of the event as a link if a URL is present, or the title alone if not."
3869
- msgstr ""
3870
-
3871
- #: my-calendar.php:218
3872
- msgid "Start time for the event."
3873
- msgstr ""
3874
-
3875
- #: my-calendar.php:221
3876
- msgid "Date on which the event begins."
3877
- msgstr ""
3878
-
3879
- #: my-calendar.php:224
3880
- msgid "Beginning date to end date; excludes end date if same as beginning."
3881
- msgstr ""
3882
-
3883
- #: my-calendar.php:227
3884
- msgid ""
3885
- "Multi-day events: an unordered list of dates/times. Otherwise, beginning "
3886
- "date/time."
3887
- msgstr ""
3888
-
3889
- #: my-calendar.php:230
3890
- msgid "Author who posted the event."
3891
- msgstr ""
3892
-
3893
- #: my-calendar.php:233
3894
- msgid "Name of the assigned host for the event."
3895
- msgstr ""
3896
-
3897
- #: my-calendar.php:236
3898
- msgid "Short event description."
3899
- msgstr ""
3900
-
3901
- #: my-calendar.php:239
3902
- msgid "Description of the event."
3903
- msgstr ""
3904
-
3905
- #: my-calendar.php:242
3906
- msgid "Image associated with the event."
3907
- msgstr ""
3908
-
3909
- #: my-calendar.php:245
3910
- msgid "URL provided for the event."
3911
- msgstr ""
3912
-
3913
- #: my-calendar.php:248
3914
- msgid "Link to an auto-generated page containing information about the event."
3915
- msgstr ""
3916
-
3917
- #: my-calendar.php:251
3918
- msgid "Whether event is currently open for registration."
3919
- msgstr ""
3920
-
3921
- #: my-calendar.php:254
3922
- msgid "Current status of event: either \"Published\" or \"Reserved.\""
3923
- msgstr ""
3924
-
3925
- #: my-calendar.php:260
3926
- msgid "Name of the location of the event."
3927
- msgstr ""
3928
-
3929
- #: my-calendar.php:263
3930
- msgid "First line of the site address."
3931
- msgstr ""
3932
-
3933
- #: my-calendar.php:266
3934
- msgid "Second line of the site address."
3935
- msgstr ""
3936
-
3937
- #: my-calendar.php:278
3938
- msgid "Custom region."
3939
- msgstr ""
3940
-
3941
- #: my-calendar.php:281
3942
- msgid "Country for the event location."
3943
- msgstr ""
3944
-
3945
- #: my-calendar.php:284
3946
- msgid "Output the URL for the location."
3947
- msgstr ""
3948
-
3949
- #: my-calendar.php:287
3950
- msgid ""
3951
- "Event address in <a href=\"http://microformats.org/wiki/hcard\">hcard</a> "
3952
- "format."
3953
- msgstr ""
3954
-
3955
- #: my-calendar.php:290
3956
- msgid "Link to Google Map to the event, if address information is available."
3957
- msgstr ""
3958
-
3959
- #: my-calendar.php:296
3960
- msgid "Name of the category of the event."
3961
- msgstr ""
3962
-
3963
- #: my-calendar.php:299
3964
- msgid "URL for the event's category icon."
3965
- msgstr ""
3966
-
3967
- #: my-calendar.php:302
3968
- msgid "Hex code for the event's category color."
3969
- msgstr ""
3970
-
3971
- #: my-calendar.php:305
3972
- msgid "ID of the category of the event."
3973
- msgstr ""
3974
-
3975
- #: my-calendar.php:308
3976
- msgid "All Template Tags &raquo;"
3977
- msgstr ""
3978
-
3979
- #. #-#-#-#-# plugin.pot (My Calendar 2.3.0) #-#-#-#-#
3980
- #. Plugin Name of the plugin/theme
3981
- #: my-calendar.php:327 my-calendar.php:329 my-calendar.php:334
3982
- #: my-calendar.php:336
3983
- msgid "My Calendar"
3984
- msgstr ""
3985
-
3986
- #: my-calendar.php:345
3987
- msgid "Add New Event"
3988
- msgstr ""
3989
-
3990
- #: my-calendar.php:349
3991
- msgid "Event Categories"
3992
- msgstr ""
3993
-
3994
- #: my-calendar.php:350
3995
- msgid "Event Locations"
3996
- msgstr ""
3997
-
3998
- #: my-calendar.php:351
3999
- msgid "Event Groups"
4000
- msgstr ""
4001
-
4002
- #: my-calendar.php:354
4003
- msgid "Style Editor"
4004
- msgstr ""
4005
-
4006
- #: my-calendar.php:355
4007
- msgid "Script Editor"
4008
- msgstr ""
4009
-
4010
- #: my-calendar.php:356
4011
- msgid "Template Editor"
4012
- msgstr ""
4013
-
4014
- #: my-calendar.php:364
4015
- msgid "Event Submissions"
4016
- msgstr ""
4017
-
4018
- #: my-calendar.php:365
4019
- msgid "Payments"
4020
- msgstr ""
4021
-
4022
- #: my-calendar.php:401
4023
- msgid "Apply"
4024
- msgstr ""
4025
-
4026
- #: my-calendar.php:404
4027
- msgid "Event editing fields to show"
4028
- msgstr ""
4029
-
4030
- #. Plugin URI of the plugin/theme
4031
- msgid "http://www.joedolson.com/articles/my-calendar/"
4032
- msgstr ""
4033
-
4034
- #. Description of the plugin/theme
4035
- msgid ""
4036
- "Accessible WordPress event calendar plugin. Show events from multiple "
4037
- "calendars on pages, in posts, or in widgets."
4038
- msgstr ""
4039
-
4040
- #. Author of the plugin/theme
4041
- msgid "Joseph C Dolson"
4042
- msgstr ""
4043
-
4044
- #. Author URI of the plugin/theme
4045
- msgid "http://www.joedolson.com"
4046
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
my-calendar-api.php CHANGED
@@ -114,6 +114,12 @@ function my_calendar_generate_vcal( $event_id = false ) {
114
  // need to modify date values to match real values using date above
115
  $array = mc_create_tags( $event );
116
 
 
 
 
 
 
 
117
  $template = "BEGIN:VCALENDAR
118
  VERSION:2.0
119
  METHOD:PUBLISH
@@ -128,7 +134,7 @@ DTSTART:{ical_start}
128
  DTEND:{ical_end}
129
  CATEGORIES:{category}
130
  URL;VALUE=URI:{link}
131
- DESCRIPTION;ENCODING=QUOTED-PRINTABLE:{ical_desc}
132
  END:VEVENT
133
  END:VCALENDAR";
134
  $template = apply_filters( 'mc_single_ical_template', $template, $array );
@@ -166,8 +172,8 @@ function mc_format_rss( $events ) {
166
  <pubDate>{rssdate}</pubDate>
167
  <dc:creator>{author}</dc:creator>
168
  <description><![CDATA[{rss_description}]]></description>
169
- <date>{dtstart}</date>
170
- <dateSubmitted>{rssdate}</dateSubmitted>
171
  <content:encoded><![CDATA[<div class='vevent'>
172
  <h1 class='summary'>{rss_title}</h1>
173
  <div class='description'>{rss_description}</div>
@@ -184,8 +190,7 @@ function mc_format_rss( $events ) {
184
  </item>\n";
185
 
186
  if ( get_option( 'mc_use_rss_template' ) == 1 ) {
187
- $templates = get_option( 'mc_templates' );
188
- $template = $templates['rss'];
189
  }
190
 
191
  $charset = get_bloginfo( 'charset' );
@@ -193,6 +198,7 @@ function mc_format_rss( $events ) {
193
  <rss version="2.0"
194
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
195
  xmlns:dc="http://purl.org/dc/elements/1.1/"
 
196
  xmlns:atom="http://www.w3.org/2005/Atom"
197
  xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
198
  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
@@ -224,6 +230,8 @@ function mc_format_rss( $events ) {
224
 
225
  // just a double check to try to ensure that the XML feed can be rendered.
226
  function mc_strip_to_xml( $value ) {
 
 
227
  $ret = $current = "";
228
  if ( empty( $value ) ) {
229
  return $ret;
@@ -290,7 +298,7 @@ DTSTART:{ical_start}
290
  DTEND:{ical_end}
291
  URL;VALUE=URI:{link}
292
  DESCRIPTION:{ical_desc}
293
- CATEGORIES:{category}
294
  END:VEVENT";
295
  // add ICAL headers
296
  $output = 'BEGIN:VCALENDAR
@@ -298,17 +306,27 @@ VERSION:2.0
298
  METHOD:PUBLISH
299
  PRODID:-//Accessible Web Design//My Calendar//http://www.joedolson.com//v' . $mc_version . '//EN';
300
  // to do : add support for other arguments
301
- $events = my_calendar_grab_events( $from, $to, $category, $ltype, $lvalue, $source, $author, $host );
302
  // my calendar grab events returns a flat array, but doesn't eliminate holiday cancellations; my-calendar_events eliminates those, but isn't a flat array.
303
  // rewrite array navigation so that this works.
304
- // $events = my_calendar_events( $from, $to, $category, $ltype, $lvalue, $source, $author, $host );
305
-
 
306
  if ( is_array( $events ) && ! empty( $events ) ) {
307
  foreach ( array_keys( $events ) as $key ) {
308
  $event =& $events[ $key ];
309
  if ( is_object( $event ) ) {
310
  if ( ! ( $event->category_private == 1 && ! is_user_logged_in() ) ) {
311
  $array = mc_create_tags( $event );
 
 
 
 
 
 
 
 
 
312
  $output .= "\n" . jd_draw_template( $array, $template, 'ical' );
313
  }
314
  }
@@ -323,4 +341,29 @@ PRODID:-//Accessible Web Design//My Calendar//http://www.joedolson.com//v' . $mc
323
  header( "Content-Disposition: inline; filename=my-calendar.ics" );
324
  }
325
  echo $output;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  }
114
  // need to modify date values to match real values using date above
115
  $array = mc_create_tags( $event );
116
 
117
+ $alarm = apply_filters( 'mc_event_has_alarm', array(), $event_id, $array['post'] );
118
+ $alert = '';
119
+ if ( !empty( $alarm ) ) {
120
+ $alert = mc_generate_alert_ical( $alarm );
121
+ }
122
+
123
  $template = "BEGIN:VCALENDAR
124
  VERSION:2.0
125
  METHOD:PUBLISH
134
  DTEND:{ical_end}
135
  CATEGORIES:{category}
136
  URL;VALUE=URI:{link}
137
+ DESCRIPTION;ENCODING=QUOTED-PRINTABLE:{ical_desc}$alert
138
  END:VEVENT
139
  END:VCALENDAR";
140
  $template = apply_filters( 'mc_single_ical_template', $template, $array );
172
  <pubDate>{rssdate}</pubDate>
173
  <dc:creator>{author}</dc:creator>
174
  <description><![CDATA[{rss_description}]]></description>
175
+ <ev:startdate>{dtstart}</ev:startdate>
176
+ <ev:enddate>{dtend}</ev:enddate>
177
  <content:encoded><![CDATA[<div class='vevent'>
178
  <h1 class='summary'>{rss_title}</h1>
179
  <div class='description'>{rss_description}</div>
190
  </item>\n";
191
 
192
  if ( get_option( 'mc_use_rss_template' ) == 1 ) {
193
+ $template = mc_get_template( 'rss' );
 
194
  }
195
 
196
  $charset = get_bloginfo( 'charset' );
198
  <rss version="2.0"
199
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
200
  xmlns:dc="http://purl.org/dc/elements/1.1/"
201
+ xmlns:ev="http://purl.org/rss/1.0/modules/event/"
202
  xmlns:atom="http://www.w3.org/2005/Atom"
203
  xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
204
  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
230
 
231
  // just a double check to try to ensure that the XML feed can be rendered.
232
  function mc_strip_to_xml( $value ) {
233
+ // if there's still an ampersand surrounded by whitespace, kill it.
234
+ $value = str_replace( ' & ', ' &amp; ', $value );
235
  $ret = $current = "";
236
  if ( empty( $value ) ) {
237
  return $ret;
298
  DTEND:{ical_end}
299
  URL;VALUE=URI:{link}
300
  DESCRIPTION:{ical_desc}
301
+ CATEGORIES:{category}{alert}
302
  END:VEVENT";
303
  // add ICAL headers
304
  $output = 'BEGIN:VCALENDAR
306
  METHOD:PUBLISH
307
  PRODID:-//Accessible Web Design//My Calendar//http://www.joedolson.com//v' . $mc_version . '//EN';
308
  // to do : add support for other arguments
309
+ //$events = my_calendar_grab_events( $from, $to, $category, $ltype, $lvalue, $source, $author, $host );
310
  // my calendar grab events returns a flat array, but doesn't eliminate holiday cancellations; my-calendar_events eliminates those, but isn't a flat array.
311
  // rewrite array navigation so that this works.
312
+ $events = my_calendar_events( $from, $to, $category, $ltype, $lvalue, $source, $author, $host );
313
+ $events = mc_flatten_event_array( $events );
314
+
315
  if ( is_array( $events ) && ! empty( $events ) ) {
316
  foreach ( array_keys( $events ) as $key ) {
317
  $event =& $events[ $key ];
318
  if ( is_object( $event ) ) {
319
  if ( ! ( $event->category_private == 1 && ! is_user_logged_in() ) ) {
320
  $array = mc_create_tags( $event );
321
+
322
+ $alarm = apply_filters( 'mc_event_has_alarm', array(), $event->event_id, $array['post'] );
323
+ $alert = '';
324
+ if ( !empty( $alarm ) ) {
325
+ $alert = mc_generate_alert_ical( $alarm );
326
+ }
327
+
328
+ $template = str_replace( '{alert}', $alert, $template );
329
+
330
  $output .= "\n" . jd_draw_template( $array, $template, 'ical' );
331
  }
332
  }
341
  header( "Content-Disposition: inline; filename=my-calendar.ics" );
342
  }
343
  echo $output;
344
+ }
345
+
346
+ function mc_generate_alert_ical( $alarm ) {
347
+ $defaults = array( 'TRIGGER' => '-PT30M', 'REPEAT' => '0', 'DURATION' => '', 'ACTION' => 'DISPLAY', 'DESCRIPTION' => '{title}' );
348
+ $values = array_merge( $defaults, $alarm );
349
+ $alert = "\nBEGIN:VALARM\n";
350
+ $alert .= "TRIGGER:$values[TRIGGER]\n";
351
+ $alert .= ( $values['REPEAT'] != 0 ) ? "REPEAT:$values[REPEAT]\n" : '';
352
+ $alert .= ( $values['DURATION'] != '' ) ? "REPEAT:$values[DURATION]\n" : '';
353
+ $alert .= "ACTION:$values[ACTION]\n";
354
+ $alert .= "DESCRIPTION:$values[DESCRIPTION]\n";
355
+ $alert .= "END:VALARM";
356
+
357
+ return $alert;
358
+ }
359
+
360
+ function mc_flatten_event_array( $events ) {
361
+ $flat = array();
362
+ foreach( $events as $event ) {
363
+ foreach( $event as $e ) {
364
+ $flat[] = $e;
365
+ }
366
+ }
367
+
368
+ return $flat;
369
  }
my-calendar-behaviors.php CHANGED
@@ -41,10 +41,11 @@ function edit_my_calendar_behaviors() {
41
  $mc_ajaxjs = stripcslashes( get_option( 'mc_ajaxjs' ) );
42
  $mc_show_js = stripcslashes( get_option( 'mc_show_js' ) );
43
  // Now we render the form
 
44
  ?>
45
  <div class="wrap jd-my-calendar">
46
  <?php my_calendar_check_db(); ?>
47
- <h2><?php _e( 'My Calendar Scripting', 'my-calendar' ); ?></h2>
48
 
49
  <div class="postbox-container jcd-wide">
50
  <div class="metabox-holder">
@@ -52,7 +53,7 @@ function edit_my_calendar_behaviors() {
52
  <div class="ui-sortable meta-box-sortables">
53
  <div class="postbox" id="cdiff">
54
 
55
- <h3><?php _e( 'My Calendar Script Manager', 'my-calendar' ); ?></h3>
56
 
57
  <div class="inside">
58
  <form id="my-calendar" method="post"
41
  $mc_ajaxjs = stripcslashes( get_option( 'mc_ajaxjs' ) );
42
  $mc_show_js = stripcslashes( get_option( 'mc_show_js' ) );
43
  // Now we render the form
44
+
45
  ?>
46
  <div class="wrap jd-my-calendar">
47
  <?php my_calendar_check_db(); ?>
48
+ <h1><?php _e( 'My Calendar Scripting', 'my-calendar' ); ?></h1>
49
 
50
  <div class="postbox-container jcd-wide">
51
  <div class="metabox-holder">
53
  <div class="ui-sortable meta-box-sortables">
54
  <div class="postbox" id="cdiff">
55
 
56
+ <h2><?php _e( 'My Calendar Script Manager', 'my-calendar' ); ?></h2>
57
 
58
  <div class="inside">
59
  <form id="my-calendar" method="post"
my-calendar-categories.php CHANGED
@@ -89,7 +89,7 @@ function my_calendar_manage_categories() {
89
  }
90
 
91
  if ( isset( $_POST['mode'] ) && $_POST['mode'] == 'add' ) {
92
- $term = wp_insert_term( $_POST['category_name'], 'mc-event-category' );
93
  if ( ! is_wp_error( $term ) ) {
94
  $term = $term['term_id'];
95
  } else {
@@ -102,6 +102,10 @@ function my_calendar_manage_categories() {
102
  'category_private' => ( ( isset( $_POST['category_private'] ) ) ? 1 : 0 ),
103
  'category_term' => $term
104
  );
 
 
 
 
105
  // actions and filters
106
  $add = apply_filters( 'mc_pre_add_category', $add, $_POST );
107
  $results = $mcdb->insert( my_calendar_categories_table(), $add, $formats );
@@ -214,9 +218,9 @@ function mc_edit_category_form( $view = 'edit', $catID = '' ) {
214
  }
215
  if ( $view == 'add' ) {
216
  ?>
217
- <h2><?php _e( 'Add Category', 'my-calendar' ); ?></h2>
218
  <?php } else { ?>
219
- <h2><?php _e( 'Edit Category', 'my-calendar' ); ?></h2>
220
  <?php } ?>
221
 
222
  <div class="postbox-container jcd-wide">
@@ -224,7 +228,7 @@ function mc_edit_category_form( $view = 'edit', $catID = '' ) {
224
 
225
  <div class="ui-sortable meta-box-sortables">
226
  <div class="postbox">
227
- <h3><?php _e( 'Category Editor', 'my-calendar' ); ?></h3>
228
 
229
  <div class="inside">
230
  <form id="my-calendar" method="post"
@@ -256,7 +260,9 @@ function mc_edit_category_form( $view = 'edit', $catID = '' ) {
256
  $color .= $cur_cat->category_color;
257
  } else {
258
  $color = '';
259
- } ?>
 
 
260
  <ul>
261
  <li>
262
  <label for="cat_name"><?php _e( 'Category Name', 'my-calendar' ); ?></label> <input
@@ -265,13 +271,13 @@ function mc_edit_category_form( $view = 'edit', $catID = '' ) {
265
  echo stripslashes( esc_attr( $cur_cat->category_name ) );
266
  } ?>"/>
267
  <label for="cat_color"><?php _e( 'Color', 'my-calendar' ); ?></label> <input
268
- type="text
269
  id="cat_color"
270
  name="category_color"
271
  class="mc-color-input"
272
  size="10"
273
  maxlength="7"
274
- value="<?php esc_attr_e( $color ); ?>"/>
275
  </li>
276
  <li>
277
  <label for="cat_icon"><?php _e( 'Category Icon', 'my-calendar' ); ?></label> <select
@@ -279,7 +285,7 @@ function mc_edit_category_form( $view = 'edit', $catID = '' ) {
279
  <?php
280
  foreach ( $iconlist as $value ) {
281
  $selected = ( ( ! empty( $cur_cat ) && is_object( $cur_cat ) ) && $cur_cat->category_icon == $value ) ? " selected='selected'" : '';
282
- echo "<option value='" . esc_attr( $value ) . "'$selected style='background: url(" . str_replace( 'my-calendar/', '', esc_url( $url . "$path/$value" ) ) . ") left 50% no-repeat;'>$value</option>";
283
  }
284
  ?>
285
  </select>
@@ -329,7 +335,7 @@ function mc_edit_category_form( $view = 'edit', $catID = '' ) {
329
  <?php } ?>
330
  <div class="ui-sortable meta-box-sortables">
331
  <div class="postbox">
332
- <h3><?php _e( 'Category List', 'my-calendar' ); ?></h3>
333
 
334
  <div class="inside">
335
  <?php mc_manage_categories(); ?>
@@ -353,7 +359,7 @@ function mc_manage_categories() {
353
  global $wpdb;
354
  $mcdb = $wpdb;
355
  ?>
356
- <h2><?php _e( 'Manage Categories', 'my-calendar' ); ?></h2><?php
357
  $co = ( ! isset( $_GET['co'] ) ) ? 1 : (int) $_GET['co'];
358
  switch ( $co ) {
359
  case 1:
@@ -384,20 +390,24 @@ function mc_manage_categories() {
384
  $class = '';
385
  foreach ( $categories as $cat ) {
386
  $class = ( $class == 'alternate' ) ? '' : 'alternate';
387
- $icon_src = ( mc_file_exists( $cat->category_icon ) ) ? mc_get_file( $cat->category_icon, 'url' ) : plugins_url( 'my-calendar/images/icons/' . $cat->category_icon );
 
 
 
 
388
  $background = ( strpos( $cat->category_color, '#' ) !== 0 ) ? '#' : '' . $cat->category_color;
389
  $foreground = mc_inverse_color( $background );
390
  ?>
391
  <tr class="<?php echo $class; ?>">
392
  <th scope="row"><?php echo $cat->category_id; ?></th>
393
- <td><?php echo stripslashes( $cat->category_name );
394
  if ( $cat->category_id == get_option( 'mc_default_category' ) ) {
395
  echo ' ' . __( '(Default)' );
396
  }
397
  if ( $cat->category_id == get_option( 'mc_skip_holidays_category' ) ) {
398
  echo ' ' . __( '(Holiday)' );
399
  } ?></td>
400
- <td style="background-color:<?php echo $background; ?>;color: <?php echo $foreground; ?>"><img src="<?php echo $icon_src; ?>" alt=""/> <?php echo $background; ?></td>
401
  <td><?php echo ( $cat->category_private == 1 ) ? __( 'Yes', 'my-calendar' ) : __( 'No', 'my-calendar' ); ?></td>
402
  <td><a
403
  href="<?php echo admin_url( "admin.php?page=my-calendar-categories&amp;mode=edit&amp;category_id=$cat->category_id" ); ?>"
89
  }
90
 
91
  if ( isset( $_POST['mode'] ) && $_POST['mode'] == 'add' ) {
92
+ $term = wp_insert_term( wp_kses_post( $_POST['category_name'] ), 'mc-event-category' );
93
  if ( ! is_wp_error( $term ) ) {
94
  $term = $term['term_id'];
95
  } else {
102
  'category_private' => ( ( isset( $_POST['category_private'] ) ) ? 1 : 0 ),
103
  'category_term' => $term
104
  );
105
+
106
+ $add = array_map( 'wp_kses_post', $add );
107
+
108
+
109
  // actions and filters
110
  $add = apply_filters( 'mc_pre_add_category', $add, $_POST );
111
  $results = $mcdb->insert( my_calendar_categories_table(), $add, $formats );
218
  }
219
  if ( $view == 'add' ) {
220
  ?>
221
+ <h1><?php _e( 'Add Category', 'my-calendar' ); ?></h1>
222
  <?php } else { ?>
223
+ <h1><?php _e( 'Edit Category', 'my-calendar' ); ?></h1>
224
  <?php } ?>
225
 
226
  <div class="postbox-container jcd-wide">
228
 
229
  <div class="ui-sortable meta-box-sortables">
230
  <div class="postbox">
231
+ <h2><?php _e( 'Category Editor', 'my-calendar' ); ?></h2>
232
 
233
  <div class="inside">
234
  <form id="my-calendar" method="post"
260
  $color .= $cur_cat->category_color;
261
  } else {
262
  $color = '';
263
+ }
264
+ $color = strip_tags( $color );
265
+ ?>
266
  <ul>
267
  <li>
268
  <label for="cat_name"><?php _e( 'Category Name', 'my-calendar' ); ?></label> <input
271
  echo stripslashes( esc_attr( $cur_cat->category_name ) );
272
  } ?>"/>
273
  <label for="cat_color"><?php _e( 'Color', 'my-calendar' ); ?></label> <input
274
+ type="text"
275
  id="cat_color"
276
  name="category_color"
277
  class="mc-color-input"
278
  size="10"
279
  maxlength="7"
280
+ value="<?php echo esc_attr( $color ); ?>"/>
281
  </li>
282
  <li>
283
  <label for="cat_icon"><?php _e( 'Category Icon', 'my-calendar' ); ?></label> <select
285
  <?php
286
  foreach ( $iconlist as $value ) {
287
  $selected = ( ( ! empty( $cur_cat ) && is_object( $cur_cat ) ) && $cur_cat->category_icon == $value ) ? " selected='selected'" : '';
288
+ echo "<option value='" . esc_attr( $value ) . "'$selected style='background: url(" . esc_url( str_replace( 'my-calendar/', '', $url ) . "$path/$value" ) . ") left 50% no-repeat;'>$value</option>";
289
  }
290
  ?>
291
  </select>
335
  <?php } ?>
336
  <div class="ui-sortable meta-box-sortables">
337
  <div class="postbox">
338
+ <h2><?php _e( 'Category List', 'my-calendar' ); ?></h2>
339
 
340
  <div class="inside">
341
  <?php mc_manage_categories(); ?>
359
  global $wpdb;
360
  $mcdb = $wpdb;
361
  ?>
362
+ <h1><?php _e( 'Manage Categories', 'my-calendar' ); ?></h1><?php
363
  $co = ( ! isset( $_GET['co'] ) ) ? 1 : (int) $_GET['co'];
364
  switch ( $co ) {
365
  case 1:
390
  $class = '';
391
  foreach ( $categories as $cat ) {
392
  $class = ( $class == 'alternate' ) ? '' : 'alternate';
393
+ if ( $cat->category_icon != '' ) {
394
+ $icon_src = ( mc_file_exists( $cat->category_icon ) ) ? mc_get_file( $cat->category_icon, 'url' ) : plugins_url( 'my-calendar/images/icons/' . $cat->category_icon );
395
+ } else {
396
+ $icon_src = false;
397
+ }
398
  $background = ( strpos( $cat->category_color, '#' ) !== 0 ) ? '#' : '' . $cat->category_color;
399
  $foreground = mc_inverse_color( $background );
400
  ?>
401
  <tr class="<?php echo $class; ?>">
402
  <th scope="row"><?php echo $cat->category_id; ?></th>
403
+ <td><?php echo stripslashes( wp_kses_post( $cat->category_name ) );
404
  if ( $cat->category_id == get_option( 'mc_default_category' ) ) {
405
  echo ' ' . __( '(Default)' );
406
  }
407
  if ( $cat->category_id == get_option( 'mc_skip_holidays_category' ) ) {
408
  echo ' ' . __( '(Holiday)' );
409
  } ?></td>
410
+ <td style="background-color:<?php echo $background; ?>;color: <?php echo $foreground; ?>"><?php echo ( $icon_src ) ? "<img src='$icon_src' alt='' />" : ''; ?> <?php echo $background; ?></td>
411
  <td><?php echo ( $cat->category_private == 1 ) ? __( 'Yes', 'my-calendar' ) : __( 'No', 'my-calendar' ); ?></td>
412
  <td><a
413
  href="<?php echo admin_url( "admin.php?page=my-calendar-categories&amp;mode=edit&amp;category_id=$cat->category_id" ); ?>"
my-calendar-core.php CHANGED
@@ -6,7 +6,15 @@ if ( ! defined( 'ABSPATH' ) ) {
6
  function my_calendar_add_feed() {
7
  add_feed( 'my-calendar-rss', 'my_calendar_rss' );
8
  add_feed( 'my-calendar-ics', 'my_calendar_ical' );
9
- add_feed( 'my-calendar-print', 'my_calendar_print' );
 
 
 
 
 
 
 
 
10
  }
11
 
12
  if ( ! function_exists( 'is_ssl' ) ) {
@@ -131,6 +139,7 @@ function mc_get_file( $file, $type = 'path' ) {
131
  $dir = plugin_dir_path( __FILE__ );
132
  $url = plugin_dir_url( __FILE__ );
133
  $base = basename( $dir );
 
134
  if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) {
135
  $path = ( $type == 'path' ) ? get_stylesheet_directory() . '/' . $file : get_stylesheet_directory_uri() . '/' . $file;
136
  }
@@ -145,7 +154,7 @@ function mc_get_file( $file, $type = 'path' ) {
145
  add_action( 'wp_enqueue_scripts', 'mc_register_styles' );
146
  function mc_register_styles() {
147
  global $wp_query;
148
- $stylesheet = mc_get_style_path( get_option( 'mc_css_file' ), 'url' );
149
  wp_register_style( 'my-calendar-reset', plugins_url( 'css/reset.css', __FILE__ ) );
150
  wp_register_style( 'my-calendar-style', $stylesheet, array( 'dashicons', 'my-calendar-reset' ) );
151
  $admin_stylesheet = plugins_url( 'css/mc-admin.css', __FILE__ );
@@ -285,7 +294,8 @@ function my_calendar_add_javascript() {
285
  date_i18n( 'D', strtotime( 'Saturday' ) )
286
  ) );
287
  wp_localize_script( 'pickadate.time', 'mc_time_format', apply_filters( 'mc_time_format', 'h:i A' ) );
288
-
 
289
  wp_enqueue_script( 'jquery.addfields', plugins_url( 'js/jquery.addfields.js', __FILE__ ), array( 'jquery' ) );
290
  if ( function_exists( 'wp_enqueue_media' ) && ! did_action( 'wp_enqueue_media' ) ) {
291
  wp_enqueue_media();
@@ -296,9 +306,8 @@ function my_calendar_add_javascript() {
296
  if ( isset( $_GET['page'] ) && ( $_GET['page'] == 'my-calendar-config' || $_GET['page'] == 'my-calendar-help' ) ) {
297
  wp_enqueue_script( 'mc.tabs' );
298
  wp_enqueue_script( 'mc.sortable' );
299
- //$firstItem = ( $_GET['page'] == 'my-calendar-config' ) ? 'my-calendar-manage' : 'mc_main';
300
- //wp_localize_script( 'mc.tabs', 'firstItem', $firstItem );
301
  }
 
302
  if ( isset( $_GET['page'] ) && ( $_GET['page'] == 'my-calendar-groups' || $_GET['page'] == 'my-calendar-manage' ) ) {
303
  wp_enqueue_script( 'jquery.checkall', plugins_url( 'js/jquery.checkall.js', __FILE__ ), array( 'jquery' ) );
304
  }
@@ -319,18 +328,21 @@ function my_calendar_write_js() {
319
  editable: true
320
  });
321
  $( '.mc-timepicker' ).pickatime({
322
- interval: 15,
323
  format: mc_time_format,
324
  editable: true
325
  });
326
  $('#mc-accordion').accordion({collapsible: true, active: false});
327
- <?php
328
- if ( function_exists( 'jd_doTwitterAPIPost' ) ) { ?>
 
329
  $('#mc_twitter').charCount({
330
  allowed: 140,
331
  counterText: '<?php _e('Characters left: ','my-calendar') ?>'
332
  });
333
- <?php } ?>
 
 
334
  });
335
  //]]>
336
  </script><?php
@@ -353,7 +365,7 @@ function mc_plugin_update_message() {
353
 
354
  function mc_footer_js() {
355
  global $wp_query;
356
- if ( mc_is_mobile() && get_option( 'mc_convert' ) == 'true' ) {
357
  return;
358
  } else {
359
  $pages = array();
@@ -454,14 +466,21 @@ function my_calendar_add_styles() {
454
  }
455
 
456
  function mc_get_current_url() {
457
- global $wp;
458
  $args = array();
459
  if ( isset( $_GET['page_id'] ) ) {
460
  $args = array( 'page_id' => $_GET['page_id'] );
461
  }
462
- $current_url = esc_url( home_url( add_query_arg( $args, $wp->request ) ) );
463
-
464
- return $current_url;
 
 
 
 
 
 
 
465
  }
466
 
467
  function mc_csv_to_array( $csv, $delimiter = ',', $enclosure = '"', $escape = '\\', $terminator = "\n" ) {
@@ -643,7 +662,8 @@ function check_my_calendar() {
643
  '2.2.10',
644
  '2.3.0',
645
  '2.3.11',
646
- '2.3.15'
 
647
  );
648
  foreach ( $valid_upgrades as $upgrade ) {
649
  if ( version_compare( $current_version, $upgrade, "<" ) ) {
@@ -678,13 +698,17 @@ function check_my_calendar() {
678
  function mc_do_upgrades( $upgrade_path ) {
679
  foreach ( $upgrade_path as $upgrade ) {
680
  switch ( $upgrade ) {
 
 
 
 
681
  // only upgrade db on most recent version
682
- case '2.4.0':
 
683
  $input_options = get_option( 'mc_input_options' );
684
  $input_options['event_host'] = 'on';
685
  update_option( 'mc_input_options', $input_options );
686
  add_option( 'mc_default_direction', 'DESC' );
687
- mc_upgrade_db();
688
  break;
689
  case '2.3.15':
690
  delete_option( 'mc_event_groups' );
@@ -702,34 +726,6 @@ function mc_do_upgrades( $upgrade_path ) {
702
  add_option( 'mc_use_permalinks', false );
703
  delete_option( 'mc_modified_feeds' );
704
  add_option( 'mc_location_controls', $locations );
705
- add_option( 'mc_location_access', array(
706
- '1' => __( 'Accessible Entrance', 'my-calendar' ),
707
- '2' => __( 'Accessible Parking Designated', 'my-calendar' ),
708
- '3' => __( 'Accessible Restrooms', 'my-calendar' ),
709
- '4' => __( 'Accessible Seating', 'my-calendar' ),
710
- '5' => __( 'Accessible Transportation Available', 'my-calendar' ),
711
- '6' => __( 'Wheelchair Accessible', 'my-calendar' ),
712
- '7' => __( 'Courtesy Wheelchairs', 'my-calendar' ),
713
- '8' => __( 'Bariatric Seating Available', 'my-calendar' ),
714
- '9' => __( 'Elevator to all public areas', 'my-calendar' ),
715
- '10' => __( 'Braille Signage', 'my-calendar' ),
716
- '11' => __( 'Fragrance-Free Policy', 'my-calendar' ),
717
- '12' => __( 'Other', 'my-calendar' )
718
- ) );
719
- add_option( 'mc_event_access', array(
720
- '1' => __( 'Audio Description', 'my-calendar' ),
721
- '2' => __( 'ASL Interpretation', 'my-calendar' ),
722
- '3' => __( 'ASL Interpretation with voicing', 'my-calendar' ),
723
- '4' => __( 'Deaf-Blind ASL', 'my-calendar' ),
724
- '5' => __( 'Real-time Captioning', 'my-calendar' ),
725
- '6' => __( 'Scripted Captioning', 'my-calendar' ),
726
- '7' => __( 'Assisted Listening Devices', 'my-calendar' ),
727
- '8' => __( 'Tactile/Touch Tour', 'my-calendar' ),
728
- '9' => __( 'Braille Playbill', 'my-calendar' ),
729
- '10' => __( 'Large Print Playbill', 'my-calendar' ),
730
- '11' => __( 'Sensory Friendly', 'my-calendar' ),
731
- '12' => __( 'Other', 'my-calendar' )
732
- ) );
733
  $mc_input_options = get_option( 'mc_input_options' );
734
  $mc_input_options['event_access'] = 'on';
735
  update_option( 'mc_input_options', $mc_input_options );
@@ -760,7 +756,6 @@ function mc_do_upgrades( $upgrade_path ) {
760
  break;
761
  case '2.0.0':
762
  mc_migrate_db();
763
- update_option( 'mc_db_version', '2.0.0' );
764
  $mc_input = get_option( 'mc_input_options' );
765
  if ( ! isset( $mc_input['event_specials'] ) ) {
766
  $mc_input['event_specials'] = 'on';
@@ -805,6 +800,7 @@ function mc_category_select( $data = false, $option = true ) {
805
  $cats = $mcdb->get_results( $sql );
806
  }
807
  if ( ! empty( $cats ) ) {
 
808
  foreach ( $cats as $cat ) {
809
  $c = '<option value="' . $cat->category_id . '"';
810
  if ( ! empty( $data ) ) {
@@ -817,7 +813,7 @@ function mc_category_select( $data = false, $option = true ) {
817
  $c .= ' selected="selected"';
818
  }
819
  }
820
- $c .= '>' . stripslashes( $cat->category_name ) . '</option>';
821
  if ( $cat->category_id != get_option( 'mc_default_category' ) ) {
822
  $list .= $c;
823
  } else {
@@ -855,7 +851,7 @@ function mc_location_select( $location = false ) {
855
  $l .= ' selected="selected"';
856
  }
857
  }
858
- $l .= '>' . stripslashes( $loc->location_label ) . '</option>';
859
  $list .= $l;
860
  }
861
 
@@ -996,21 +992,30 @@ function my_calendar_is_odd( $int ) {
996
  }
997
 
998
  /* Unless an admin, authors can only edit their own events if they don't have mc_manage_events capabilities. */
999
- function mc_can_edit_event( $author_id ) {
1000
  if ( ! is_user_logged_in() ) {
1001
  return false;
1002
  }
1003
- global $user_ID;
1004
-
 
 
 
 
 
 
 
 
 
1005
  if ( current_user_can( 'mc_manage_events' ) ) {
1006
  $return = true;
1007
- } elseif ( $user_ID == $author_id ) {
1008
  $return = true;
1009
  } else {
1010
  $return = false;
1011
  }
1012
 
1013
- return apply_filters( 'mc_can_edit_event', $return, $author_id );
1014
  }
1015
 
1016
  function jd_option_selected( $field, $value, $type = 'checkbox' ) {
@@ -1095,74 +1100,90 @@ function my_calendar_admin_bar() {
1095
 
1096
  // functions to route db queries
1097
  function my_calendar_table() {
1098
- $option = (int) get_site_option( 'mc_multisite' );
1099
- $choice = (int) get_option( 'mc_current_table' );
1100
- switch ( $option ) {
1101
- case 0:
1102
- return MY_CALENDAR_TABLE;
1103
- break;
1104
- case 1:
1105
- return MY_CALENDAR_GLOBAL_TABLE;
1106
- break;
1107
- case 2:
1108
- return ( $choice == 1 ) ? MY_CALENDAR_GLOBAL_TABLE : MY_CALENDAR_TABLE;
1109
- break;
1110
- default:
1111
- return MY_CALENDAR_TABLE;
 
 
 
 
1112
  }
1113
  }
1114
 
1115
  function my_calendar_event_table() {
1116
- $option = (int) get_site_option( 'mc_multisite' );
1117
- $choice = (int) get_option( 'mc_current_table' );
1118
- switch ( $option ) {
1119
- case 0:
1120
- return MY_CALENDAR_EVENTS_TABLE;
1121
- break;
1122
- case 1:
1123
- return MY_CALENDAR_GLOBAL_EVENT_TABLE;
1124
- break;
1125
- case 2:
1126
- return ( $choice == 1 ) ? MY_CALENDAR_GLOBAL_EVENT_TABLE : MY_CALENDAR_EVENTS_TABLE;
1127
- break;
1128
- default:
1129
- return MY_CALENDAR_EVENTS_TABLE;
 
 
 
 
1130
  }
1131
  }
1132
 
1133
  function my_calendar_categories_table() {
1134
- $option = (int) get_site_option( 'mc_multisite' );
1135
- $choice = (int) get_option( 'mc_current_table' );
1136
- switch ( $option ) {
1137
- case 0:
1138
- return MY_CALENDAR_CATEGORIES_TABLE;
1139
- break;
1140
- case 1:
1141
- return MY_CALENDAR_GLOBAL_CATEGORIES_TABLE;
1142
- break;
1143
- case 2:
1144
- return ( $choice == 1 ) ? MY_CALENDAR_GLOBAL_CATEGORIES_TABLE : MY_CALENDAR_CATEGORIES_TABLE;
1145
- break;
1146
- default:
1147
- return MY_CALENDAR_CATEGORIES_TABLE;
 
 
 
 
1148
  }
1149
  }
1150
 
1151
  function my_calendar_locations_table() {
1152
- $option = (int) get_site_option( 'mc_multisite' );
1153
- $choice = (int) get_option( 'mc_current_table' );
1154
- switch ( $option ) {
1155
- case 0:
1156
- return MY_CALENDAR_LOCATIONS_TABLE;
1157
- break;
1158
- case 1:
1159
- return MY_CALENDAR_GLOBAL_LOCATIONS_TABLE;
1160
- break;
1161
- case 2:
1162
- return ( $choice == 1 ) ? MY_CALENDAR_GLOBAL_LOCATIONS_TABLE : MY_CALENDAR_LOCATIONS_TABLE;
1163
- break;
1164
- default:
1165
- return MY_CALENDAR_LOCATIONS_TABLE;
 
 
 
 
1166
  }
1167
  }
1168
 
@@ -1205,7 +1226,7 @@ function my_calendar_send_email( $event ) {
1205
  function mc_spam( $event_url = '', $description = '', $post = array() ) {
1206
  global $akismet_api_host, $akismet_api_port, $current_user;
1207
  $wpcom_api_key = defined( 'WPCOM_API_KEY' ) ? WPCOM_API_KEY : false;
1208
- get_currentuserinfo();
1209
  if ( current_user_can( 'mc_manage_events' ) ) { // is a privileged user
1210
  return 0;
1211
  }
@@ -1399,7 +1420,7 @@ function mc_is_tablet() {
1399
  function mc_guess_calendar() {
1400
  global $wpdb;
1401
  $mcdb = $wpdb;
1402
- /* If you're looking at this, and have suggestions for other slugs I could be looking at, feel free to let me know. I didn't feel a need to be overly thorough. */
1403
  $my_guesses = array(
1404
  'calendar',
1405
  'events',
@@ -1450,9 +1471,9 @@ function mc_guess_calendar() {
1450
  return;
1451
  }
1452
 
1453
- function jcd_get_support_form() {
1454
  global $current_user;
1455
- get_currentuserinfo();
1456
  // send fields for My Calendar
1457
  $version = get_option( 'mc_version' );
1458
  $mc_db_version = get_option( 'mc_db_version' );
@@ -1498,7 +1519,7 @@ Version: $version
1498
  DB Version: $mc_db_version
1499
  URI: $mc_uri
1500
  CSS: $mc_css
1501
- License: Submissions: $license / Ticketing: $tickets_license
1502
  Requester Email: $current_user->user_email
1503
  Admin Email: $admin_email
1504
 
@@ -1566,7 +1587,7 @@ $plugins_string
1566
  <div><input type='hidden' name='_wpnonce' value='" . wp_create_nonce( 'my-calendar-nonce' ) . "' /></div>
1567
  <div>
1568
  <p>" .
1569
- __( 'Please note: I do keep records of those who have donated, <strong>but if your donation came from somebody other than your account at this web site, please note this in your message.</strong>', 'my-calendar' )
1570
  . "<p>
1571
  <code>" . __( 'From:', 'my-calendar' ) . " \"$current_user->display_name\" &lt;$current_user->user_email&gt;</code>
1572
  </p>
@@ -1574,7 +1595,7 @@ $plugins_string
1574
  <input type='checkbox' name='has_read_faq' id='has_read_faq' value='on' required='required' aria-required='true' /> <label for='has_read_faq'>" . __( 'I have read <a href="http://www.joedolson.com/my-calendar/faq/">the FAQ for this plug-in</a>.', 'my-calendar' ) . " <span>(required)</span></label>
1575
  </p>
1576
  <p>
1577
- <input type='checkbox' name='has_donated' id='has_donated' value='on' /> <label for='has_donated'>" . __( 'I have <a href="http://www.joedolson.com/donate.php">made a donation to help support this plug-in</a>.', 'my-calendar' ) . "</label>
1578
  </p>
1579
  <p>
1580
  <input type='checkbox' name='has_purchased' id='has_purchased' value='on' /> <label for='has_purchased'>" . __( 'I have <a href="http://www.joedolson.com/my-calendar/users-guide/">purchased the User\'s Guide</a>, but could not find an answer to this question.', 'my-calendar' ) . "</label>
@@ -1706,13 +1727,17 @@ function mc_delete_instances( $id ) {
1706
  }
1707
 
1708
  /*
1709
- @param: an array of POST data (or array containing dates); an event ID;
1710
- @return: nothing, unless testing.
 
 
 
1711
  */
1712
  function mc_increment_event( $id, $post = array(), $test = false ) {
1713
  global $wpdb;
1714
- $event = mc_get_event_core( $id );
1715
- $data = array();
 
1716
  if ( empty( $post ) ) {
1717
  $orig_begin = $event->event_begin . ' ' . $event->event_time;
1718
  $orig_end = $event->event_end . ' ' . $event->event_endtime;
@@ -1746,6 +1771,9 @@ function mc_increment_event( $id, $post = array(), $test = false ) {
1746
  if ( $test == 'test' && $i > 0 ) {
1747
  return $data;
1748
  }
 
 
 
1749
  if ( ! $test ) {
1750
  $wpdb->insert( my_calendar_event_table(), $data, $format );
1751
  }
@@ -1767,6 +1795,9 @@ function mc_increment_event( $id, $post = array(), $test = false ) {
1767
  if ( $test == 'test' && $i > 0 ) {
1768
  return $data;
1769
  }
 
 
 
1770
  if ( ! $test ) {
1771
  $sql = $wpdb->insert( my_calendar_event_table(), $data, $format );
1772
  }
@@ -1785,6 +1816,9 @@ function mc_increment_event( $id, $post = array(), $test = false ) {
1785
  if ( $test == 'test' && $i > 0 ) {
1786
  return $data;
1787
  }
 
 
 
1788
  if ( ! $test ) {
1789
  $wpdb->insert( my_calendar_event_table(), $data, $format );
1790
  }
@@ -1803,70 +1837,61 @@ function mc_increment_event( $id, $post = array(), $test = false ) {
1803
  if ( $test == 'test' && $i > 0 ) {
1804
  return $data;
1805
  }
 
 
 
1806
  if ( ! $test ) {
1807
  $wpdb->insert( my_calendar_event_table(), $data, $format );
1808
  }
1809
  }
1810
  break;
1811
- case "U": //important to keep track of which date variables are strings and which are timestamps
1812
- // This pattern handles monthly events by day.
1813
- //if ( $every != 1 ) {
1814
- // return an error?
1815
- // handle patterns that are something *other* than every month
1816
- /*
1817
- Idea: use mod to identify which months need to be checked. Check which date in each month.
1818
- */
1819
- //} else {
1820
- $week_of_event = week_of_month( date( 'd', strtotime( $event->event_begin ) ) );
1821
- $newbegin = my_calendar_add_date( $orig_begin, 28, 0, 0 );
1822
- $newend = my_calendar_add_date( $orig_end, 28, 0, 0 );
1823
- $fifth_week = $event->event_fifth_week;
1824
- $data = array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1825
  'occur_event_id' => $id,
1826
- 'occur_begin' => date( 'Y-m-d H:i:s', strtotime( $orig_begin ) ),
1827
- 'occur_end' => date( 'Y-m-d H:i:s', strtotime( $orig_end ) ),
1828
  'occur_group_id' => $group_id
1829
  );
1830
- /*
1831
  if ( $test == 'test' && $i > 0 ) {
1832
  return $data;
1833
  }
1834
- */
1835
  if ( ! $test ) {
1836
  $wpdb->insert( my_calendar_event_table(), $data, $format );
1837
  }
1838
- $numforward = $numforward - 1;
1839
- for ( $i = 0; $i <= $numforward; $i ++ ) {
1840
- $next_week_diff = ( date( 'm', $newbegin ) == date( 'm', my_calendar_add_date( date( 'Y-m-d', $newbegin ), 7, 0, 0 ) ) ) ? false : true;
1841
- $move_event = ( ( $fifth_week == 1 ) && ( $week_of_event == ( week_of_month( date( 'd', $newbegin ) ) + 1 ) ) && $next_week_diff == true ) ? true : false;
1842
- if ( $week_of_event == week_of_month( date( 'd', $newbegin ) ) || $move_event == true ) {
1843
- // continue;
1844
- } else {
1845
- $newbegin = my_calendar_add_date( date( 'Y-m-d H:i:s', $newbegin ), 7, 0, 0 );
1846
- $newend = my_calendar_add_date( date( 'Y-m-d H:i:s', $newend ), 7, 0, 0 );
1847
- $move_event = ( $fifth_week == 1 && $week_of_event == week_of_month( date( 'd', $newbegin ) ) + 1 ) ? true : false;
1848
- if ( $week_of_event == week_of_month( date( 'd', $newbegin ) ) || $move_event == true ) {
1849
- // continue;
1850
- } else {
1851
- $newbegin = my_calendar_add_date( date( 'Y-m-d H:i:s', $newbegin ), 14, 0, 0 );
1852
- $newend = my_calendar_add_date( date( 'Y-m-d H:i:s', $newend ), 14, 0, 0 );
1853
- }
1854
- }
1855
- $data = array(
1856
- 'occur_event_id' => $id,
1857
- 'occur_begin' => date( 'Y-m-d H:i:s', $newbegin ),
1858
- 'occur_end' => date( 'Y-m-d H:i:s', $newend ),
1859
- 'occur_group_id' => $group_id
1860
- );
1861
- if ( $test == 'test' && $i > 0 ) {
1862
- return $data;
1863
- }
1864
- if ( ! $test ) {
1865
- $wpdb->insert( my_calendar_event_table(), $data, $format );
1866
- }
1867
- $newbegin = my_calendar_add_date( date( 'Y-m-d H:i:s', $newbegin ), 28, 0, 0 );
1868
- $newend = my_calendar_add_date( date( 'Y-m-d H:i:s', $newend ), 28, 0, 0 );
1869
- //}
1870
  }
1871
  break;
1872
  case "Y":
@@ -1882,6 +1907,9 @@ function mc_increment_event( $id, $post = array(), $test = false ) {
1882
  if ( $test == 'test' && $i > 0 ) {
1883
  return $data;
1884
  }
 
 
 
1885
  if ( ! $test ) {
1886
  $wpdb->insert( my_calendar_event_table(), $data, $format );
1887
  }
@@ -1903,6 +1931,10 @@ function mc_increment_event( $id, $post = array(), $test = false ) {
1903
  }
1904
  }
1905
 
 
 
 
 
1906
  return $data;
1907
  }
1908
 
@@ -1973,7 +2005,7 @@ function mc_event_delete_posts( $deleted ) {
1973
  add_action( 'load-options-permalink.php', 'mc_load_permalinks' );
1974
  function mc_load_permalinks() {
1975
  if( isset( $_POST['mc_cpt_base'] ) ) {
1976
- update_option( 'mc_cpt_base', sanitize_title_with_dashes( $_POST['mc_cpt_base'] ) );
1977
  }
1978
 
1979
  // Add a settings field to the permalink page
6
  function my_calendar_add_feed() {
7
  add_feed( 'my-calendar-rss', 'my_calendar_rss' );
8
  add_feed( 'my-calendar-ics', 'my_calendar_ical' );
9
+ //add_feed( 'my-calendar-print', 'my_calendar_print' );
10
+ }
11
+
12
+ add_action( 'template_redirect', 'my_calendar_print_view' );
13
+ function my_calendar_print_view() {
14
+ if ( isset( $_GET['cid'] ) && $_GET['cid'] == 'mc-print-view' ) {
15
+ echo my_calendar_print();
16
+ exit;
17
+ }
18
  }
19
 
20
  if ( ! function_exists( 'is_ssl' ) ) {
139
  $dir = plugin_dir_path( __FILE__ );
140
  $url = plugin_dir_url( __FILE__ );
141
  $base = basename( $dir );
142
+ $path = ( $type == 'path' ) ? $dir . $file : $url . $file;
143
  if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) {
144
  $path = ( $type == 'path' ) ? get_stylesheet_directory() . '/' . $file : get_stylesheet_directory_uri() . '/' . $file;
145
  }
154
  add_action( 'wp_enqueue_scripts', 'mc_register_styles' );
155
  function mc_register_styles() {
156
  global $wp_query;
157
+ $stylesheet = apply_filters( 'mc_registered_stylesheet', mc_get_style_path( get_option( 'mc_css_file' ), 'url' ) );
158
  wp_register_style( 'my-calendar-reset', plugins_url( 'css/reset.css', __FILE__ ) );
159
  wp_register_style( 'my-calendar-style', $stylesheet, array( 'dashicons', 'my-calendar-reset' ) );
160
  $admin_stylesheet = plugins_url( 'css/mc-admin.css', __FILE__ );
294
  date_i18n( 'D', strtotime( 'Saturday' ) )
295
  ) );
296
  wp_localize_script( 'pickadate.time', 'mc_time_format', apply_filters( 'mc_time_format', 'h:i A' ) );
297
+ wp_localize_script( 'pickadate.time', 'mc_interval', apply_filters( 'mc_interval', '15' ) );
298
+
299
  wp_enqueue_script( 'jquery.addfields', plugins_url( 'js/jquery.addfields.js', __FILE__ ), array( 'jquery' ) );
300
  if ( function_exists( 'wp_enqueue_media' ) && ! did_action( 'wp_enqueue_media' ) ) {
301
  wp_enqueue_media();
306
  if ( isset( $_GET['page'] ) && ( $_GET['page'] == 'my-calendar-config' || $_GET['page'] == 'my-calendar-help' ) ) {
307
  wp_enqueue_script( 'mc.tabs' );
308
  wp_enqueue_script( 'mc.sortable' );
 
 
309
  }
310
+
311
  if ( isset( $_GET['page'] ) && ( $_GET['page'] == 'my-calendar-groups' || $_GET['page'] == 'my-calendar-manage' ) ) {
312
  wp_enqueue_script( 'jquery.checkall', plugins_url( 'js/jquery.checkall.js', __FILE__ ), array( 'jquery' ) );
313
  }
328
  editable: true
329
  });
330
  $( '.mc-timepicker' ).pickatime({
331
+ interval: parseInt( mc_interval ),
332
  format: mc_time_format,
333
  editable: true
334
  });
335
  $('#mc-accordion').accordion({collapsible: true, active: false});
336
+ <?php
337
+ if ( function_exists( 'jd_doTwitterAPIPost' ) ) {
338
+ ?>
339
  $('#mc_twitter').charCount({
340
  allowed: 140,
341
  counterText: '<?php _e('Characters left: ','my-calendar') ?>'
342
  });
343
+ <?php
344
+ }
345
+ ?>
346
  });
347
  //]]>
348
  </script><?php
365
 
366
  function mc_footer_js() {
367
  global $wp_query;
368
+ if ( mc_is_mobile() && apply_filters( 'mc_disable_mobile_js', false ) ) {
369
  return;
370
  } else {
371
  $pages = array();
466
  }
467
 
468
  function mc_get_current_url() {
469
+ global $wp, $wp_rewrite;
470
  $args = array();
471
  if ( isset( $_GET['page_id'] ) ) {
472
  $args = array( 'page_id' => $_GET['page_id'] );
473
  }
474
+ $current_url = home_url( add_query_arg( $args, $wp->request ) );
475
+
476
+ if ( $wp_rewrite->using_index_permalinks() && strpos( $current_url, 'index.php' ) === false ) {
477
+ $current_url = str_replace( home_url(), home_url( '/' ) . 'index.php', $home );
478
+ }
479
+ if ( $wp_rewrite->using_permalinks() ) {
480
+ $current_url = trailingslashit( $current_url );
481
+ }
482
+
483
+ return esc_url( $current_url );
484
  }
485
 
486
  function mc_csv_to_array( $csv, $delimiter = ',', $enclosure = '"', $escape = '\\', $terminator = "\n" ) {
662
  '2.2.10',
663
  '2.3.0',
664
  '2.3.11',
665
+ '2.3.15',
666
+ '2.4.4',
667
  );
668
  foreach ( $valid_upgrades as $upgrade ) {
669
  if ( version_compare( $current_version, $upgrade, "<" ) ) {
698
  function mc_do_upgrades( $upgrade_path ) {
699
  foreach ( $upgrade_path as $upgrade ) {
700
  switch ( $upgrade ) {
701
+ case '2.4.15':
702
+ update_option( 'mc_db_version', $mc_version );
703
+ mc_upgrade_db();
704
+ break;
705
  // only upgrade db on most recent version
706
+ case '2.4.4':
707
+ add_option( 'mc_display_more', 'true' );
708
  $input_options = get_option( 'mc_input_options' );
709
  $input_options['event_host'] = 'on';
710
  update_option( 'mc_input_options', $input_options );
711
  add_option( 'mc_default_direction', 'DESC' );
 
712
  break;
713
  case '2.3.15':
714
  delete_option( 'mc_event_groups' );
726
  add_option( 'mc_use_permalinks', false );
727
  delete_option( 'mc_modified_feeds' );
728
  add_option( 'mc_location_controls', $locations );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
729
  $mc_input_options = get_option( 'mc_input_options' );
730
  $mc_input_options['event_access'] = 'on';
731
  update_option( 'mc_input_options', $mc_input_options );
756
  break;
757
  case '2.0.0':
758
  mc_migrate_db();
 
759
  $mc_input = get_option( 'mc_input_options' );
760
  if ( ! isset( $mc_input['event_specials'] ) ) {
761
  $mc_input['event_specials'] = 'on';
800
  $cats = $mcdb->get_results( $sql );
801
  }
802
  if ( ! empty( $cats ) ) {
803
+ $cats = apply_filters( 'mc_category_list', $cats, $data, $option );
804
  foreach ( $cats as $cat ) {
805
  $c = '<option value="' . $cat->category_id . '"';
806
  if ( ! empty( $data ) ) {
813
  $c .= ' selected="selected"';
814
  }
815
  }
816
+ $c .= '>' . wp_kses_post( stripslashes( $cat->category_name ) ) . '</option>';
817
  if ( $cat->category_id != get_option( 'mc_default_category' ) ) {
818
  $list .= $c;
819
  } else {
851
  $l .= ' selected="selected"';
852
  }
853
  }
854
+ $l .= '>' . wp_kses_post( stripslashes( $loc->location_label ) ) . '</option>';
855
  $list .= $l;
856
  }
857
 
992
  }
993
 
994
  /* Unless an admin, authors can only edit their own events if they don't have mc_manage_events capabilities. */
995
+ function mc_can_edit_event( $event_id = false ) {
996
  if ( ! is_user_logged_in() ) {
997
  return false;
998
  }
999
+
1000
+ $current_user = wp_get_current_user();
1001
+ $user = $current_user->ID;
1002
+
1003
+ if ( $event_id && is_numeric( $event_id ) ) {
1004
+ $event = mc_get_event_core( $event_id );
1005
+ $event_author = $event->event_author;
1006
+ } else {
1007
+ return false;
1008
+ }
1009
+
1010
  if ( current_user_can( 'mc_manage_events' ) ) {
1011
  $return = true;
1012
+ } else if ( $user == $event_author ) {
1013
  $return = true;
1014
  } else {
1015
  $return = false;
1016
  }
1017
 
1018
+ return apply_filters( 'mc_can_edit_event', $return, $event_id );
1019
  }
1020
 
1021
  function jd_option_selected( $field, $value, $type = 'checkbox' ) {
1100
 
1101
  // functions to route db queries
1102
  function my_calendar_table() {
1103
+ if ( is_multisite() ) {
1104
+ $option = (int) get_site_option( 'mc_multisite' );
1105
+ $choice = (int) get_option( 'mc_current_table' );
1106
+ switch ( $option ) {
1107
+ case 0:
1108
+ return MY_CALENDAR_TABLE;
1109
+ break;
1110
+ case 1:
1111
+ return MY_CALENDAR_GLOBAL_TABLE;
1112
+ break;
1113
+ case 2:
1114
+ return ( $choice == 1 ) ? MY_CALENDAR_GLOBAL_TABLE : MY_CALENDAR_TABLE;
1115
+ break;
1116
+ default:
1117
+ return MY_CALENDAR_TABLE;
1118
+ }
1119
+ } else {
1120
+ return MY_CALENDAR_TABLE;
1121
  }
1122
  }
1123
 
1124
  function my_calendar_event_table() {
1125
+ if ( is_multisite() ) {
1126
+ $option = (int) get_site_option( 'mc_multisite' );
1127
+ $choice = (int) get_option( 'mc_current_table' );
1128
+ switch ( $option ) {
1129
+ case 0:
1130
+ return MY_CALENDAR_EVENTS_TABLE;
1131
+ break;
1132
+ case 1:
1133
+ return MY_CALENDAR_GLOBAL_EVENT_TABLE;
1134
+ break;
1135
+ case 2:
1136
+ return ( $choice == 1 ) ? MY_CALENDAR_GLOBAL_EVENT_TABLE : MY_CALENDAR_EVENTS_TABLE;
1137
+ break;
1138
+ default:
1139
+ return MY_CALENDAR_EVENTS_TABLE;
1140
+ }
1141
+ } else {
1142
+ return MY_CALENDAR_EVENTS_TABLE;
1143
  }
1144
  }
1145
 
1146
  function my_calendar_categories_table() {
1147
+ if ( is_multisite() ) {
1148
+ $option = (int) get_site_option( 'mc_multisite' );
1149
+ $choice = (int) get_option( 'mc_current_table' );
1150
+ switch ( $option ) {
1151
+ case 0:
1152
+ return MY_CALENDAR_CATEGORIES_TABLE;
1153
+ break;
1154
+ case 1:
1155
+ return MY_CALENDAR_GLOBAL_CATEGORIES_TABLE;
1156
+ break;
1157
+ case 2:
1158
+ return ( $choice == 1 ) ? MY_CALENDAR_GLOBAL_CATEGORIES_TABLE : MY_CALENDAR_CATEGORIES_TABLE;
1159
+ break;
1160
+ default:
1161
+ return MY_CALENDAR_CATEGORIES_TABLE;
1162
+ }
1163
+ } else {
1164
+ return MY_CALENDAR_CATEGORIES_TABLE;
1165
  }
1166
  }
1167
 
1168
  function my_calendar_locations_table() {
1169
+ if ( is_multisite() ) {
1170
+ $option = (int) get_site_option( 'mc_multisite' );
1171
+ $choice = (int) get_option( 'mc_current_table' );
1172
+ switch ( $option ) {
1173
+ case 0:
1174
+ return MY_CALENDAR_LOCATIONS_TABLE;
1175
+ break;
1176
+ case 1:
1177
+ return MY_CALENDAR_GLOBAL_LOCATIONS_TABLE;
1178
+ break;
1179
+ case 2:
1180
+ return ( $choice == 1 ) ? MY_CALENDAR_GLOBAL_LOCATIONS_TABLE : MY_CALENDAR_LOCATIONS_TABLE;
1181
+ break;
1182
+ default:
1183
+ return MY_CALENDAR_LOCATIONS_TABLE;
1184
+ }
1185
+ } else {
1186
+ return MY_CALENDAR_LOCATIONS_TABLE;
1187
  }
1188
  }
1189
 
1226
  function mc_spam( $event_url = '', $description = '', $post = array() ) {
1227
  global $akismet_api_host, $akismet_api_port, $current_user;
1228
  $wpcom_api_key = defined( 'WPCOM_API_KEY' ) ? WPCOM_API_KEY : false;
1229
+ $current_user = wp_get_current_user();
1230
  if ( current_user_can( 'mc_manage_events' ) ) { // is a privileged user
1231
  return 0;
1232
  }
1420
  function mc_guess_calendar() {
1421
  global $wpdb;
1422
  $mcdb = $wpdb;
1423
+ /* If you're looking at this, and have suggestions for other slugs I could be looking at, feel to let me know. I didn't feel a need to be overly thorough. */
1424
  $my_guesses = array(
1425
  'calendar',
1426
  'events',
1471
  return;
1472
  }
1473
 
1474
+ function mc_get_support_form() {
1475
  global $current_user;
1476
+ $current_user = wp_get_current_user();
1477
  // send fields for My Calendar
1478
  $version = get_option( 'mc_version' );
1479
  $mc_db_version = get_option( 'mc_db_version' );
1519
  DB Version: $mc_db_version
1520
  URI: $mc_uri
1521
  CSS: $mc_css
1522
+ Licenses: Pro - $license; Ticketing - $tickets_license
1523
  Requester Email: $current_user->user_email
1524
  Admin Email: $admin_email
1525
 
1587
  <div><input type='hidden' name='_wpnonce' value='" . wp_create_nonce( 'my-calendar-nonce' ) . "' /></div>
1588
  <div>
1589
  <p>" .
1590
+ __( '<strong>Note</strong>: I keep records of donations, but if your donation came from <em>somebody other than your account at this web site</em>, please note this in your message.', 'my-calendar' )
1591
  . "<p>
1592
  <code>" . __( 'From:', 'my-calendar' ) . " \"$current_user->display_name\" &lt;$current_user->user_email&gt;</code>
1593
  </p>
1595
  <input type='checkbox' name='has_read_faq' id='has_read_faq' value='on' required='required' aria-required='true' /> <label for='has_read_faq'>" . __( 'I have read <a href="http://www.joedolson.com/my-calendar/faq/">the FAQ for this plug-in</a>.', 'my-calendar' ) . " <span>(required)</span></label>
1596
  </p>
1597
  <p>
1598
+ <input type='checkbox' name='has_donated' id='has_donated' value='on' /> <label for='has_donated'>" . sprintf( __( 'I <a href="%s">made a donation to help support this plug-in</a>.', 'my-calendar' ), 'https://www.joedolson.com/donate/' ) . "</label>
1599
  </p>
1600
  <p>
1601
  <input type='checkbox' name='has_purchased' id='has_purchased' value='on' /> <label for='has_purchased'>" . __( 'I have <a href="http://www.joedolson.com/my-calendar/users-guide/">purchased the User\'s Guide</a>, but could not find an answer to this question.', 'my-calendar' ) . "</label>
1727
  }
1728
 
1729
  /*
1730
+ * @param integer $id Event ID in my_calendar db
1731
+ * @param array $post an array of POST data (or array containing dates)
1732
+ * @param boolean $test true if testing
1733
+ *
1734
+ * @return null by default; data array if testing
1735
  */
1736
  function mc_increment_event( $id, $post = array(), $test = false ) {
1737
  global $wpdb;
1738
+ $event = mc_get_event_core( $id );
1739
+ $data = array();
1740
+ $return = array();
1741
  if ( empty( $post ) ) {
1742
  $orig_begin = $event->event_begin . ' ' . $event->event_time;
1743
  $orig_end = $event->event_end . ' ' . $event->event_endtime;
1771
  if ( $test == 'test' && $i > 0 ) {
1772
  return $data;
1773
  }
1774
+ if ( $test == true ) {
1775
+ $return[] = $data;
1776
+ }
1777
  if ( ! $test ) {
1778
  $wpdb->insert( my_calendar_event_table(), $data, $format );
1779
  }
1795
  if ( $test == 'test' && $i > 0 ) {
1796
  return $data;
1797
  }
1798
+ if ( $test == true ) {
1799
+ $return[] = $data;
1800
+ }
1801
  if ( ! $test ) {
1802
  $sql = $wpdb->insert( my_calendar_event_table(), $data, $format );
1803
  }
1816
  if ( $test == 'test' && $i > 0 ) {
1817
  return $data;
1818
  }
1819
+ if ( $test == true ) {
1820
+ $return[] = $data;
1821
+ }
1822
  if ( ! $test ) {
1823
  $wpdb->insert( my_calendar_event_table(), $data, $format );
1824
  }
1837
  if ( $test == 'test' && $i > 0 ) {
1838
  return $data;
1839
  }
1840
+ if ( $test == true ) {
1841
+ $return[] = $data;
1842
+ }
1843
  if ( ! $test ) {
1844
  $wpdb->insert( my_calendar_event_table(), $data, $format );
1845
  }
1846
  }
1847
  break;
1848
+ case "U":
1849
+ // important to keep track of which date variables are strings and which are timestamps
1850
+ $week_of_event = week_of_month( date( 'd', strtotime( $event->event_begin ) ) );
1851
+ $newbegin = my_calendar_add_date( $orig_begin, 28, 0, 0 );
1852
+ $newend = my_calendar_add_date( $orig_end, 28, 0, 0 );
1853
+ $fifth_week = $event->event_fifth_week;
1854
+ $data = array(
1855
+ 'occur_event_id' => $id,
1856
+ 'occur_begin' => date( 'Y-m-d H:i:s', strtotime( $orig_begin ) ),
1857
+ 'occur_end' => date( 'Y-m-d H:i:s', strtotime( $orig_end ) ),
1858
+ 'occur_group_id' => $group_id
1859
+ );
1860
+
1861
+ if ( ! $test ) {
1862
+ $wpdb->insert( my_calendar_event_table(), $data, $format );
1863
+ }
1864
+ $numforward = $numforward - 1;
1865
+ for ( $i = 0; $i <= $numforward; $i ++ ) {
1866
+ $next_week_diff = ( date( 'm', $newbegin ) == date( 'm', my_calendar_add_date( date( 'Y-m-d', $newbegin ), 7, 0, 0 ) ) ) ? false : true;
1867
+ $move_event = ( ( $fifth_week == 1 ) && ( $week_of_event == ( week_of_month( date( 'd', $newbegin ) ) + 1 ) ) && $next_week_diff == true ) ? true : false;
1868
+ if ( $week_of_event == week_of_month( date( 'd', $newbegin ) ) || $move_event == true ) {
1869
+ // continue;
1870
+ } else {
1871
+ $newbegin = my_calendar_add_date( date( 'Y-m-d H:i:s', $newbegin ), 7, 0, 0 );
1872
+ $newend = my_calendar_add_date( date( 'Y-m-d H:i:s', $newend ), 7, 0, 0 );
1873
+ $move_event = ( $fifth_week == 1 && $week_of_event == week_of_month( date( 'd', $newbegin ) ) + 1 ) ? true : false;
1874
+ if ( $week_of_event == week_of_month( date( 'd', $newbegin ) ) || $move_event == true ) {
1875
+ // continue;
1876
+ } else {
1877
+ $newbegin = my_calendar_add_date( date( 'Y-m-d H:i:s', $newbegin ), 14, 0, 0 );
1878
+ $newend = my_calendar_add_date( date( 'Y-m-d H:i:s', $newend ), 14, 0, 0 );
1879
+ }
1880
+ }
1881
+ $data = array(
1882
  'occur_event_id' => $id,
1883
+ 'occur_begin' => date( 'Y-m-d H:i:s', $newbegin ),
1884
+ 'occur_end' => date( 'Y-m-d H:i:s', $newend ),
1885
  'occur_group_id' => $group_id
1886
  );
 
1887
  if ( $test == 'test' && $i > 0 ) {
1888
  return $data;
1889
  }
 
1890
  if ( ! $test ) {
1891
  $wpdb->insert( my_calendar_event_table(), $data, $format );
1892
  }
1893
+ $newbegin = my_calendar_add_date( date( 'Y-m-d H:i:s', $newbegin ), 28, 0, 0 );
1894
+ $newend = my_calendar_add_date( date( 'Y-m-d H:i:s', $newend ), 28, 0, 0 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1895
  }
1896
  break;
1897
  case "Y":
1907
  if ( $test == 'test' && $i > 0 ) {
1908
  return $data;
1909
  }
1910
+ if ( $test == true ) {
1911
+ $return[] = $data;
1912
+ }
1913
  if ( ! $test ) {
1914
  $wpdb->insert( my_calendar_event_table(), $data, $format );
1915
  }
1931
  }
1932
  }
1933
 
1934
+ if ( $test == true ) {
1935
+ return $return;
1936
+ }
1937
+
1938
  return $data;
1939
  }
1940
 
2005
  add_action( 'load-options-permalink.php', 'mc_load_permalinks' );
2006
  function mc_load_permalinks() {
2007
  if( isset( $_POST['mc_cpt_base'] ) ) {
2008
+ update_option( 'mc_cpt_base', sanitize_text_field( $_POST['mc_cpt_base'] ) );
2009
  }
2010
 
2011
  // Add a settings field to the permalink page
my-calendar-event-manager.php CHANGED
@@ -32,9 +32,9 @@ function mc_add_inner_box() {
32
  if ( $event_id ) {
33
  $url = admin_url( 'admin.php?page=my-calendar&mode=edit&event_id='.$event_id );
34
  $event = mc_get_event_core( $event_id );
35
- $content = "<p><strong>" . $event->event_title . '</strong><br />' . $event->event_begin . ' @ ' . $event->event_time . "</p>";
36
  if ( $event->event_label != '' ) {
37
- $content .= "<p>" . sprintf( __( '<strong>Location:</strong> %s', 'my-calendar' ), $event->event_label ) . "</p>";
38
  }
39
  $content .= "<p>" . sprintf( __( '<a href="%s">Edit event</a>.', 'my-calendar' ), $url ) . "</p>";
40
 
@@ -209,7 +209,7 @@ function manage_my_calendar() {
209
  if ( isset( $_GET['mode'] ) && $_GET['mode'] == 'delete' ) {
210
  $sql = "SELECT event_title, event_author FROM " . my_calendar_table() . " WHERE event_id=" . (int) $_GET['event_id'];
211
  $result = $mcdb->get_results( $sql, ARRAY_A );
212
- if ( mc_can_edit_event( $result[0]['event_author'] ) ) {
213
  if ( isset( $_GET['date'] ) ) {
214
  $event_instance = (int) $_GET['date'];
215
  $sql = "SELECT occur_begin FROM " . my_calendar_event_table() . " WHERE occur_id=" . $event_instance;
@@ -219,7 +219,7 @@ function manage_my_calendar() {
219
  $instance_date = '';
220
  } ?>
221
  <div class="error">
222
- <form action="<?php echo admin_url( 'admin.php?page=my-calendar' ); ?>" method="post">
223
  <p><strong><?php _e( 'Delete Event', 'my-calendar' ); ?>
224
  :</strong> <?php _e( 'Are you sure you want to delete this event?', 'my-calendar' ); ?>
225
  <input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce( 'my-calendar-nonce' ); ?>"/>
@@ -290,7 +290,7 @@ function manage_my_calendar() {
290
  $ea = "SELECT event_author FROM " . my_calendar_table() . " WHERE event_id = $value";
291
  $result = $mcdb->get_results( $ea, ARRAY_A );
292
  $total = count( $events );
293
- if ( mc_can_edit_event( $result[0]['event_author'] ) ) {
294
  $delete_occurrences = "DELETE FROM " . my_calendar_event_table() . " WHERE occur_event_id = $value";
295
  $mcdb->query( $delete_occurrences );
296
  $ids[] = (int) $value;
@@ -403,14 +403,13 @@ function manage_my_calendar() {
403
  }
404
  ?>
405
  <div class='wrap jd-my-calendar'>
406
- <div id="icon-edit" class="icon32"></div>
407
- <h2 class='mc-clear' id='mc-manage'><?php _e( 'Manage Events', 'my-calendar' ); ?></h2>
408
 
409
  <div class="postbox-container jcd-wide">
410
  <div class="metabox-holder">
411
  <div class="ui-sortable meta-box-sortables">
412
  <div class="postbox">
413
- <h3><?php _e( 'My Events', 'my-calendar' ); ?></h3>
414
 
415
  <div class="inside">
416
  <?php mc_list_events(); ?>
@@ -420,12 +419,7 @@ function manage_my_calendar() {
420
  </div>
421
  </div>
422
 
423
- <?php /* Todo
424
- if ( isset( $_POST['mc-import-csv'] ) ) {
425
-
426
- }
427
- $add = array( 'Import Events'=>'<form action="'.admin_url('admin.php?page=my-calendar-manage').'" method="POST"><div><label for="mc-import-csv">'.__('Upload CSV File','my-calendar').'<input type="file" name="mc-import-csv" id="mc-import-csv" /><input type="submit" value="'.__('Import Events','my-calendar').'" /></div></form>'); */
428
- mc_show_sidebar(); ?>
429
  </div>
430
  <?php
431
  }
@@ -474,6 +468,7 @@ function edit_my_calendar() {
474
  if ( ! wp_verify_nonce( $nonce, 'my-calendar-nonce' ) ) {
475
  die( "Security check failed" );
476
  }
 
477
  global $mc_output;
478
  $count = 0;
479
 
@@ -512,8 +507,7 @@ function edit_my_calendar() {
512
  }
513
  if ( $action == 'edit' ) {
514
  ?>
515
- <div id="icon-edit" class="icon32"></div>
516
- <h2><?php _e( 'Edit Event', 'my-calendar' ); ?></h2>
517
  <?php
518
  if ( empty( $event_id ) ) {
519
  echo "<div class='error'><p>" . __( "You must provide an event id in order to edit it", 'my-calendar' ) . "</p></div>";
@@ -522,8 +516,7 @@ function edit_my_calendar() {
522
  }
523
  } else if ( $action == 'copy' ) {
524
  ?>
525
- <div id="icon-edit" class="icon32"></div>
526
- <h2><?php _e( 'Copy Event', 'my-calendar' ); ?></h2>
527
  <?php
528
  if ( empty( $event_id ) ) {
529
  echo "<div class=\"error\"><p>" . __( "You must provide an event id in order to edit it", 'my-calendar' ) . "</p></div>";
@@ -532,8 +525,7 @@ function edit_my_calendar() {
532
  }
533
  } else {
534
  ?>
535
- <div id="icon-edit" class="icon32"></div>
536
- <h2><?php _e( 'Add Event', 'my-calendar' ); ?></h2><?php
537
  mc_edit_event_form();
538
  }
539
  mc_show_sidebar(); ?>
@@ -599,6 +591,7 @@ function my_calendar_save( $action, $output, $event_id = false ) {
599
  if ( ( $action == 'add' || $action == 'copy' ) && $proceed == true ) {
600
  $add = $output[2]; // add format here
601
  $add = apply_filters( 'mc_before_save_insert', $add );
 
602
  $result = $mcdb->insert( my_calendar_table(), $add, $formats );
603
  $event_id = $mcdb->insert_id;
604
  mc_increment_event( $event_id );
@@ -637,18 +630,19 @@ function my_calendar_save( $action, $output, $event_id = false ) {
637
  }
638
  }
639
  if ( $action == 'edit' && $proceed == true ) {
 
640
  $result = true;
641
  $url = ( get_option( 'mc_uri' ) != '' && ! is_numeric( get_option( 'mc_uri' ) ) ) ? '' . sprintf( __( 'View <a href="%s">your calendar</a>.', 'my-calendar' ), get_option( 'mc_uri' ) ) : '';
642
- $event_author = (int) ( $_POST['event_author'] );
643
- if ( mc_can_edit_event( $event_author ) ) {
644
  $update = $output[2];
645
  $update = apply_filters( 'mc_before_save_update', $update, $event_id );
 
646
  $date_changed = (
647
  $update['event_begin'] != $_POST['prev_event_begin'] ||
648
  date( "H:i:00", strtotime( $update['event_time'] ) ) != $_POST['prev_event_time'] ||
649
  $update['event_end'] != $_POST['prev_event_end'] ||
650
- ( date( "H:i:00", strtotime( $update['event_endtime'] ) ) != $_POST['prev_event_endtime'] && ( $_POST['prev_event_endtime'] != '' && date( "H:i:00", strtotime( $update['event_endtime'] ) ) != '23:59:59' ) ) )
651
- ? true : false; // this may need to be 00:00:00; will have to verify JCD TODO
652
  if ( isset( $_POST['event_instance'] ) ) {
653
  $is_changed = mc_compare( $update, $event_id );// compares the information sent to the information saved for a given event.
654
  $event_instance = (int) $_POST['event_instance'];
@@ -708,39 +702,44 @@ function my_calendar_save( $action, $output, $event_id = false ) {
708
  $message = "<div class='error'><p><strong>" . __( 'You do not have sufficient permissions to edit that event.', 'my-calendar' ) . "</strong></p></div>";
709
  }
710
  }
711
-
712
- if ( $action == 'delete' ) {
713
- // Deal with deleting an event from the database
714
- if ( empty( $event_id ) ) {
715
- $message = "<div class='error'><p><strong>" . __( 'Error', 'my-calendar' ) . ":</strong>" . __( "You can't delete an event if you haven't submitted an event id", 'my-calendar' ) . "</p></div>";
716
- } else {
717
- $post_id = mc_get_data( 'event_post', $event_id );
718
- if ( empty( $_POST['event_instance'] ) ) {
719
- $sql = "DELETE FROM " . my_calendar_table() . " WHERE event_id='" . (int) $event_id . "'";
720
- $delete_occurrences = "DELETE FROM " . my_calendar_event_table() . " WHERE occur_event_id = " . (int) $event_id;
721
- $mcdb->query( $delete_occurrences );
722
- $mcdb->query( $sql );
723
- $sql = "SELECT event_id FROM " . my_calendar_table() . " WHERE event_id='" . (int) $event_id . "'";
724
- $result = $mcdb->get_results( $sql );
725
- } else {
726
- $delete = "DELETE FROM " . my_calendar_event_table() . " WHERE occur_id = " . (int) $_POST['event_instance'];
727
- $result = $mcdb->get_results( $delete );
728
- }
729
- if ( empty( $result ) || empty( $result[0]->event_id ) ) {
730
- mc_delete_cache();
731
- // do an action using the event_id
732
- do_action( 'mc_delete_event', $event_id, $post_id );
733
- $message = "<div class='updated'><p>" . __( 'Event deleted successfully', 'my-calendar' ) . "</p></div>";
734
- } else {
735
- $message = "<div class='error'><p><strong>" . __( 'Error', 'my-calendar' ) . ":</strong>" . __( 'Despite issuing a request to delete, the event still remains in the database. Please investigate.', 'my-calendar' ) . "</p></div>";
736
- }
737
- }
738
- }
739
  $message = $message . "\n" . $output[3];
740
 
741
  return array( 'event_id' => $event_id, 'message' => $message );
742
  }
743
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
744
  function mc_form_data( $event_id = false ) {
745
  global $wpdb, $users_entries;
746
  $mcdb = $wpdb;
@@ -891,7 +890,7 @@ function mc_show_block( $field, $has_data, $data, $echo = true ) {
891
  $return = '
892
  <div class="mc-image-upload field-holder">
893
  <input type="hidden" name="event_image_id" value="" class="textfield" id="e_image_id" />
894
- <label for="e_image">' . __( "Add an image:", 'my-calendar' ) . '</label><br /><input type="text" name="event_image" id="e_image" size="60" value="' . esc_attr( $value ) . '" placeholder="http://yourdomain.com/image.jpg" /> <a href="#" class="button textfield-field">' . __( "Upload", 'my-calendar' ) . '</a>';
895
  if ( ! empty( $data->event_image ) ) {
896
  $return .= '<div class="event_image"><img src="' . esc_attr( $data->event_image ) . '" alt="" /></div>';
897
  } else {
@@ -952,13 +951,13 @@ function mc_show_block( $field, $has_data, $data, $echo = true ) {
952
  }
953
  if ( $show_block && empty( $_GET['date'] ) ) {
954
  $return = $pre . '
955
- <h3>' . __( 'Recurring', 'my-calendar' ) . '</h3>
956
  <div class="inside">' . $prev . '
957
  <fieldset>
958
  <legend class="screen-reader-text">' . __( 'Recurring Events', 'my-calendar' ) . '</legend>
959
  <p>
960
  <label for="e_repeats">' . __( 'Repeats', 'my-calendar' ) . ' <input type="text" name="event_repeats" aria-labelledby="e_repeats_label" id="e_repeats" size="1" value="' . esc_attr( $repeats ) . '" /> <span id="e_repeats_label">' . __( 'times', 'my-calendar' ) . '</span>, </label>
961
- <label for="e_every">' . __( 'every', 'my-calendar' ) . '</label> <input type="number" name="event_every" id="e_every" size="1" min="1" max="12" maxlength="1" value="' . esc_attr( $every ) . '" />
962
  <label for="e_recur" class="screen-reader-text">' . __( 'Units', 'my-calendar' ) . '</label>
963
  <select name="event_recur" id="e_recur">
964
  ' . mc_recur_options( $recur ) . '
@@ -987,7 +986,7 @@ function mc_show_block( $field, $has_data, $data, $echo = true ) {
987
  if ( $show_block ) {
988
  $label = __( 'Event Access', 'my-calendar' );
989
  $return = $pre . '
990
- <h3>' . $label . '</h3>
991
  <div class="inside">
992
  ' . mc_event_accessibility( '', $data, $label ) .
993
  apply_filters( 'mc_event_access_fields', '', $has_data, $data ) . '
@@ -997,7 +996,7 @@ function mc_show_block( $field, $has_data, $data, $echo = true ) {
997
  case 'event_open' :
998
  if ( $show_block ) {
999
  $return = $pre . '
1000
- <h3>' . __( 'Event Registration Settings', 'my-calendar' ) . '</h3>
1001
  <div class="inside">
1002
  <fieldset>
1003
  <legend class="screen-reader-text">' . __( 'Event Registration', 'my-calendar' ) . '</legend>
@@ -1163,7 +1162,7 @@ function mc_form_fields( $data, $mode, $event_id ) {
1163
  $text_link = '';
1164
  }
1165
  ?>
1166
- <h3><?php echo $text; ?></h3>
1167
  <div class="inside">
1168
  <p class='mc-controls'>
1169
  <a href="<?php echo admin_url( 'admin.php?page=my-calendar-manage' ); ?>"><?php echo ( current_user_can( 'mc_manage_events' ) ) ? __( 'Manage events', 'my-calendar' ) : __( 'Manage your events', 'my-calendar' ); ?></a>
@@ -1264,7 +1263,7 @@ function mc_form_fields( $data, $mode, $event_id ) {
1264
 
1265
  <div class="ui-sortable meta-box-sortables">
1266
  <div class="postbox">
1267
- <h3><?php _e( 'Date and Time', 'my-calendar' ); ?></h3>
1268
 
1269
  <div class="inside">
1270
  <?php if ( is_object( $data ) ) { // information for rewriting recurring data ?>
@@ -1347,7 +1346,7 @@ if ( mc_show_edit_block( 'event_location' ) || mc_show_edit_block( 'event_locati
1347
 
1348
  <div class="ui-sortable meta-box-sortables">
1349
  <div class="postbox">
1350
- <h3><?php _e( 'Event Location', 'my-calendar' ); ?></h3>
1351
 
1352
  <div class="inside location_form">
1353
  <fieldset>
@@ -1364,10 +1363,10 @@ if ( mc_show_edit_block( 'event_location' ) || mc_show_edit_block( 'event_locati
1364
  <option value="none"> --</option><?php
1365
  foreach ( $locs as $loc ) {
1366
  if ( is_object( $loc ) ) {
1367
- echo "<option value=\"" . $loc->location_id . "\">" . stripslashes( $loc->location_label ) . "</option>";
1368
  if ( is_object( $data ) ) {
1369
  if ( $loc->location_id == $data->event_location ) {
1370
- $current_location = "<span id='mc-current-location'>" . sprintf( __( 'Current location: %s', 'my-calendar' ), $loc->location_label ) . "</span>";
1371
  }
1372
  }
1373
  }
@@ -1398,7 +1397,7 @@ if ( mc_show_edit_block( 'event_specials' ) ) {
1398
  ?>
1399
  <div class="ui-sortable meta-box-sortables">
1400
  <div class="postbox">
1401
- <h3><?php _e( 'Special scheduling options', 'my-calendar' ); ?></h3>
1402
 
1403
  <div class="inside">
1404
  <fieldset>
@@ -1417,8 +1416,7 @@ if ( mc_show_edit_block( 'event_specials' ) ) {
1417
  </p>
1418
 
1419
  <p>
1420
- <label
1421
- for="e_fifth_week"><?php _e( 'If this event recurs, and falls on the 5th week of the month in a month with only four weeks, move it back one week.', 'my-calendar' ); ?></label>
1422
  <input type="checkbox" value="true" id="e_fifth_week"
1423
  name="event_fifth_week"<?php if ( $has_data && $data->event_fifth_week == '1' ) {
1424
  echo " checked=\"checked\"";
@@ -1447,6 +1445,26 @@ if ( mc_show_edit_block( 'event_specials' ) ) {
1447
  </div><?php
1448
  }
1449
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1450
  function mc_event_accessibility( $form, $data, $label ) {
1451
  $note_value = '';
1452
  $events_access = array();
@@ -1454,7 +1472,7 @@ function mc_event_accessibility( $form, $data, $label ) {
1454
  <fieldset>
1455
  <legend>$label</legend>
1456
  <ul class='accessibility-features checkboxes'>";
1457
- $access = apply_filters( 'mc_event_accessibility', get_option( 'mc_event_access' ) );
1458
  if ( ! empty( $data ) ) {
1459
  $events_access = get_post_meta( $data->event_post, '_mc_event_access', true );
1460
  }
@@ -1471,7 +1489,7 @@ function mc_event_accessibility( $form, $data, $label ) {
1471
  if ( isset( $events_access['notes'] ) ) {
1472
  $note_value = esc_attr( $events_access['notes'] );
1473
  }
1474
- $form .= '<li><label for="events_access_notes">' . __( 'Notes', 'my-calendar' ) . '</label> <input type="text" name="events_access[notes]" value="' . esc_attr( $note_value ) . '" /></li>';
1475
  $form .= "</ul>
1476
  </fieldset>";
1477
 
@@ -1483,15 +1501,25 @@ function mc_list_events() {
1483
  global $wpdb;
1484
  $mcdb = $wpdb;
1485
  if ( current_user_can( 'mc_approve_events' ) || current_user_can( 'mc_manage_events' ) || current_user_can( 'mc_add_events' ) ) {
1486
- $sortby = ( isset( $_GET['sort'] ) ) ? (int) $_GET['sort'] : get_option( 'mc_default_sort' );
1487
 
 
 
 
 
 
 
 
1488
  if ( isset( $_GET['order'] ) ) {
1489
  $sortdir = ( isset( $_GET['order'] ) && $_GET['order'] == 'ASC' ) ? 'ASC' : 'default';
1490
  $sortdir = ( isset( $_GET['order'] ) && $_GET['order'] == 'DESC' ) ? 'DESC' : $sortdir;
1491
  } else {
1492
  $sortdir = 'default';
1493
  }
1494
- $sortbydirection = ( $sortdir == 'default' ) ? get_option( 'mc_default_direction' ) : $sortdir;
 
 
 
 
1495
  if ( empty( $sortby ) ) {
1496
  $sortbyvalue = 'event_begin';
1497
  } else {
@@ -1521,7 +1549,7 @@ function mc_list_events() {
1521
  $sortbyvalue = "event_begin $sortbydirection, event_time";
1522
  }
1523
  }
1524
- $sorting = ( $sortbydirection == 'DESC' ) ? "&amp;order=ASC" : '';
1525
  $allow_filters = true;
1526
  $status = ( isset( $_GET['limit'] ) ) ? $_GET['limit'] : 'all';
1527
  $restrict = ( isset( $_GET['restrict'] ) ) ? $_GET['restrict'] : 'all';
@@ -1595,8 +1623,8 @@ function mc_list_events() {
1595
  $limit .= ( $restrict != 'event_flagged' ) ? " AND event_flagged = 0" : '';
1596
  }
1597
  if ( isset( $_POST['mcs'] ) ) {
1598
- $query = esc_sql( $_POST['mcs'] );
1599
- $limit .= " AND MATCH(event_title,event_desc,event_short,event_label,event_city) AGAINST ('$query' IN BOOLEAN MODE) ";
1600
  }
1601
  $limit .= ( $restrict != 'archived' ) ? " AND event_status = 1" : ' AND event_status = 0';
1602
  $events = $mcdb->get_results( "SELECT SQL_CALC_FOUND_ROWS * FROM " . my_calendar_table() . " $limit ORDER BY $sortbyvalue $sortbydirection LIMIT " . ( ( $current - 1 ) * $items_per_page ) . ", " . $items_per_page );
@@ -1688,7 +1716,7 @@ function mc_list_events() {
1688
  <thead>
1689
  <tr>
1690
  <th scope="col" style="width: 50px;"><input type='checkbox' class='selectall' id='mass_edit'/>
1691
- <label for='mass_edit'><b><?php __( 'Check/Uncheck all', 'my-calendar' ); ?></b></label> <a
1692
  href="<?php echo admin_url( "admin.php?page=my-calendar-manage&amp;sort=1$sorting" ); ?>"><?php _e( 'ID', 'my-calendar' ) ?></a>
1693
  </th>
1694
  <th scope="col"><a
@@ -1718,7 +1746,6 @@ function mc_list_events() {
1718
  $class = ( $class == 'alternate' ) ? 'even' : 'alternate';
1719
  $pending = ( $event->event_approved == 0 ) ? 'pending' : '';
1720
  $author = ( $event->event_author != 0 ) ? get_userdata( $event->event_author ) : 'Public Submitter';
1721
- $title = $event->event_title;
1722
 
1723
  if ( $event->event_flagged == 1 && ( isset( $_GET['restrict'] ) && $_GET['restrict'] == 'flagged' ) ) {
1724
  $spam = 'spam';
@@ -1734,7 +1761,7 @@ function mc_list_events() {
1734
  $delete_url = admin_url( "admin.php?page=my-calendar-manage&amp;mode=delete&amp;event_id=$event->event_id" );
1735
  $check = mc_test_occurrence_overlap( $event, true );
1736
  $problem = ( $check != '' ) ? 'problem' : '';
1737
- if ( current_user_can( 'mc_manage_events' ) || current_user_can( 'mc_approve_events' ) || mc_can_edit_event( $event->event_author ) ) {
1738
  ?>
1739
  <tr class="<?php echo "$class $spam $pending $problem"; ?>">
1740
  <th scope="row">
@@ -1742,11 +1769,11 @@ function mc_list_events() {
1742
  <label for="mc<?php echo $event->event_id; ?>"><?php echo $event->event_id; ?></label>
1743
  </th>
1744
  <td title="<?php echo esc_attr( substr( strip_tags( stripslashes( $event->event_desc ) ), 0, 240 ) ); ?>">
1745
- <strong><?php if ( mc_can_edit_event( $event->event_author ) ) { ?>
1746
  <a href="<?php echo $edit_url; ?>" class='edit'>
1747
  <?php } ?>
1748
- <?php echo $spam_label; echo stripslashes( $title ); ?>
1749
- <?php if ( mc_can_edit_event( $event->event_author ) ) {
1750
  echo "</a>";
1751
  if ( $check != '' ) {
1752
  echo '<br /><strong class="error">' . sprintf( __( 'There is a problem with this event. <a href="%s">View</a>', 'my-calendar' ), $edit_url ) . '</strong>';
@@ -1756,7 +1783,7 @@ function mc_list_events() {
1756
  <div class='row-actions' style="visibility:visible;">
1757
  <a href="<?php echo $copy_url; ?>"
1758
  class='copy'><?php _e( 'Copy', 'my-calendar' ); ?></a> |
1759
- <?php if ( mc_can_edit_event( $event->event_author ) ) { ?>
1760
  <a href="<?php echo $edit_url; ?>" class='edit'><?php _e( 'Edit', 'my-calendar' ); ?></a>
1761
  <?php if ( mc_event_is_grouped( $event->event_group_id ) ) { ?>
1762
  | <a href="<?php echo $group_url; ?>" class='edit group'><?php _e( 'Edit Group', 'my-calendar' ); ?></a>
@@ -1795,7 +1822,7 @@ function mc_list_events() {
1795
  </div>
1796
  </td>
1797
  <td>
1798
- <?php if ( $event->event_label != '' ) { ?><a class='mc_filter' href='<?php $elabel = urlencode( $event->event_label ); echo admin_url( "admin.php?page=my-calendar-manage&amp;filter=$elabel&amp;restrict=where" ); ?>' title="<?php _e( 'Filter by location', 'my-calendar' ); ?>"><span class="screen-reader-text"><?php _e( 'Show only: ', 'my-calendar' ); ?></span><?php echo stripslashes( $event->event_label ); ?></a><?php } ?>
1799
  </td>
1800
  <?php if ( $event->event_endtime != "23:59:59" ) {
1801
  $eventTime = date_i18n( get_option( 'mc_time_format' ), strtotime( $event->event_time ) );
@@ -1862,15 +1889,16 @@ function mc_list_events() {
1862
  $this_cat = $categories[ $key ];
1863
  }
1864
  }
 
1865
  ?>
1866
  <td>
1867
  <div class="category-color"
1868
- style="background-color:<?php echo ( strpos( $this_cat->category_color, '#' ) !== 0 ) ? '#' : '';
1869
- echo $this_cat->category_color; ?>;"></div>
1870
  <a class='mc_filter'
1871
  href='<?php echo admin_url( "admin.php?page=my-calendar-manage&amp;filter=$event->event_category&amp;restrict=category" ); ?>'
1872
  title="<?php _e( 'Filter by category', 'my-calendar' ); ?>"><span
1873
- class="screen-reader-text"><?php _e( 'Show only: ', 'my-calendar' ); ?></span><?php echo stripslashes( $this_cat->category_name ); ?>
1874
  </a></td>
1875
  <?php unset( $this_cat ); ?>
1876
  </tr>
@@ -1905,7 +1933,7 @@ function mc_list_events() {
1905
  <?php
1906
  } else {
1907
  ?>
1908
- <p><?php _e( "There are no events in the database meeting your current criteria.", 'my-calendar' ) ?></p><?php
1909
  }
1910
  }
1911
  }
@@ -1934,7 +1962,7 @@ function mc_check_data( $action, $post, $i ) {
1934
  // if this is an all weekdays event, and it's been scheduled to start on a weekend, the math gets nasty.
1935
  // ...AND there's no reason to allow it, since weekday events will NEVER happen on the weekend.
1936
  $begin = trim( $post['event_begin'][ $i ] );
1937
- $end = trim( $post['event_end'][ $i ] );
1938
  if ( $recur == 'E' && ( date( 'w', strtotime( $begin ) ) == 0 || date( 'w', strtotime( $begin ) ) == 6 ) ) {
1939
  if ( date( 'w', strtotime( $begin ) ) == 0 ) {
1940
  $newbegin = my_calendar_add_date( $begin, 1 );
@@ -1971,14 +1999,14 @@ function mc_check_data( $action, $post, $i ) {
1971
  $time = '00:00:00'; $endtime = '23:59:59';
1972
  }
1973
  $end = date( 'Y-m-d', strtotime( $end ) ); // regardless of entry format, convert.
1974
- $repeats = ( ! empty( $post['event_repeats'] ) || trim( $post['event_repeats'] ) == '' ) ? trim( $post['event_repeats'] ) : 0;
1975
  $host = ! empty( $post['event_host'] ) ? $post['event_host'] : $current_user->ID;
1976
  $category = ! empty( $post['event_category'] ) ? $post['event_category'] : '';
1977
  $event_link = ! empty( $post['event_link'] ) ? trim( $post['event_link'] ) : '';
1978
  $expires = ! empty( $post['event_link_expires'] ) ? $post['event_link_expires'] : '0';
1979
  $approved = ! empty( $post['event_approved'] ) ? $post['event_approved'] : '0';
1980
  $location_preset = ! empty( $post['location_preset'] ) ? $post['location_preset'] : '';
1981
- $event_author = ! empty( $post['event_author'] ) ? $post['event_author'] : $current_user->ID;
1982
  $event_open = ( isset( $post['event_open'] ) && $post['event_open'] !== 0 ) ? $post['event_open'] : '2';
1983
  $event_tickets = ( isset( $post['event_tickets'] ) ) ? trim( $post['event_tickets'] ) : '';
1984
  $event_registration = ( isset( $post['event_registration'] ) ) ? trim( $post['event_registration'] ) : '';
@@ -2046,6 +2074,9 @@ function mc_check_data( $action, $post, $i ) {
2046
  'location_phone2' => $event_phone2,
2047
  'location_access' => ( is_array( $event_access ) ) ? serialize( $event_access ) : ''
2048
  );
 
 
 
2049
  $loc_formats = array(
2050
  '%s',
2051
  '%s',
@@ -2069,7 +2100,7 @@ function mc_check_data( $action, $post, $i ) {
2069
  // Perform validation on the submitted dates - checks for valid years and months
2070
  if ( mc_checkdate( $begin ) && mc_checkdate( $end ) ) {
2071
  // Make sure dates are equal or end date is later than start date
2072
- if ( strtotime( $end ) < strtotime( $begin ) ) {
2073
  $errors .= "<div class='error'><p><strong>" . __( 'Error', 'my-calendar' ) . ":</strong> " . __( 'Your event end date must be either after or the same as your event begin date', 'my-calendar' ) . "</p></div>";
2074
  }
2075
  } else {
@@ -2121,6 +2152,9 @@ function mc_check_data( $action, $post, $i ) {
2121
  }
2122
 
2123
  if ( $errors == '' ) {
 
 
 
2124
  $ok = true;
2125
  $submit = array(
2126
  // strings
@@ -2168,6 +2202,8 @@ function mc_check_data( $action, $post, $i ) {
2168
  'event_longitude' => $event_longitude,
2169
  'event_latitude' => $event_latitude
2170
  );
 
 
2171
  } else {
2172
  $ok = false;
2173
  $event_access = ( is_array( $event_access ) ) ? serialize( $event_access ) : '';
@@ -2321,11 +2357,15 @@ function mc_group_id() {
2321
  return $next;
2322
  }
2323
 
2324
- function mc_instance_list( $id, $occur = false, $template = '<h3>{title}</h3>{description}', $list = '<li>{date}, {time}</li>', $before = "<ul>", $after = "</ul>" ) {
2325
  global $wpdb;
2326
  $id = (int) $id;
2327
  $output = '';
2328
- $sql = "SELECT * FROM " . my_calendar_event_table() . " WHERE occur_event_id=$id";
 
 
 
 
2329
  $results = $wpdb->get_results( $sql );
2330
  if ( is_array( $results ) && is_admin() ) {
2331
  foreach ( $results as $result ) {
@@ -2483,5 +2523,4 @@ function mc_post_update_event( $id ) {
2483
  $featured_image = wp_get_attachment_url( get_post_thumbnail_id( $post->ID ) );
2484
  $event_id = get_post_meta( $post->ID, '_mc_event_id', true );
2485
  mc_update_data( $event_id, 'event_image', $featured_image, '%s' );
2486
-
2487
  }
32
  if ( $event_id ) {
33
  $url = admin_url( 'admin.php?page=my-calendar&mode=edit&event_id='.$event_id );
34
  $event = mc_get_event_core( $event_id );
35
+ $content = "<p><strong>" . wp_kses_post( $event->event_title ) . '</strong><br />' . $event->event_begin . ' @ ' . $event->event_time . "</p>";
36
  if ( $event->event_label != '' ) {
37
+ $content .= "<p>" . sprintf( __( '<strong>Location:</strong> %s', 'my-calendar' ), wp_kses_post( $event->event_label ) ) . "</p>";
38
  }
39
  $content .= "<p>" . sprintf( __( '<a href="%s">Edit event</a>.', 'my-calendar' ), $url ) . "</p>";
40
 
209
  if ( isset( $_GET['mode'] ) && $_GET['mode'] == 'delete' ) {
210
  $sql = "SELECT event_title, event_author FROM " . my_calendar_table() . " WHERE event_id=" . (int) $_GET['event_id'];
211
  $result = $mcdb->get_results( $sql, ARRAY_A );
212
+ if ( mc_can_edit_event( (int) $_GET['event_id'] ) ) {
213
  if ( isset( $_GET['date'] ) ) {
214
  $event_instance = (int) $_GET['date'];
215
  $sql = "SELECT occur_begin FROM " . my_calendar_event_table() . " WHERE occur_id=" . $event_instance;
219
  $instance_date = '';
220
  } ?>
221
  <div class="error">
222
+ <form action="<?php echo admin_url( 'admin.php?page=my-calendar-manage' ); ?>" method="post">
223
  <p><strong><?php _e( 'Delete Event', 'my-calendar' ); ?>
224
  :</strong> <?php _e( 'Are you sure you want to delete this event?', 'my-calendar' ); ?>
225
  <input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce( 'my-calendar-nonce' ); ?>"/>
290
  $ea = "SELECT event_author FROM " . my_calendar_table() . " WHERE event_id = $value";
291
  $result = $mcdb->get_results( $ea, ARRAY_A );
292
  $total = count( $events );
293
+ if ( mc_can_edit_event( $value ) ) {
294
  $delete_occurrences = "DELETE FROM " . my_calendar_event_table() . " WHERE occur_event_id = $value";
295
  $mcdb->query( $delete_occurrences );
296
  $ids[] = (int) $value;
403
  }
404
  ?>
405
  <div class='wrap jd-my-calendar'>
406
+ <h1 id='mc-manage'><?php _e( 'Manage Events', 'my-calendar' ); ?></h1>
 
407
 
408
  <div class="postbox-container jcd-wide">
409
  <div class="metabox-holder">
410
  <div class="ui-sortable meta-box-sortables">
411
  <div class="postbox">
412
+ <h2><?php _e( 'My Events', 'my-calendar' ); ?></h2>
413
 
414
  <div class="inside">
415
  <?php mc_list_events(); ?>
419
  </div>
420
  </div>
421
 
422
+ <?php mc_show_sidebar(); ?>
 
 
 
 
 
423
  </div>
424
  <?php
425
  }
468
  if ( ! wp_verify_nonce( $nonce, 'my-calendar-nonce' ) ) {
469
  die( "Security check failed" );
470
  }
471
+
472
  global $mc_output;
473
  $count = 0;
474
 
507
  }
508
  if ( $action == 'edit' ) {
509
  ?>
510
+ <h1><?php _e( 'Edit Event', 'my-calendar' ); ?></h1>
 
511
  <?php
512
  if ( empty( $event_id ) ) {
513
  echo "<div class='error'><p>" . __( "You must provide an event id in order to edit it", 'my-calendar' ) . "</p></div>";
516
  }
517
  } else if ( $action == 'copy' ) {
518
  ?>
519
+ <h1><?php _e( 'Copy Event', 'my-calendar' ); ?></h1>
 
520
  <?php
521
  if ( empty( $event_id ) ) {
522
  echo "<div class=\"error\"><p>" . __( "You must provide an event id in order to edit it", 'my-calendar' ) . "</p></div>";
525
  }
526
  } else {
527
  ?>
528
+ <h1><?php _e( 'Add Event', 'my-calendar' ); ?></h1><?php
 
529
  mc_edit_event_form();
530
  }
531
  mc_show_sidebar(); ?>
591
  if ( ( $action == 'add' || $action == 'copy' ) && $proceed == true ) {
592
  $add = $output[2]; // add format here
593
  $add = apply_filters( 'mc_before_save_insert', $add );
594
+ // this db write takes most of the processing time for this process.
595
  $result = $mcdb->insert( my_calendar_table(), $add, $formats );
596
  $event_id = $mcdb->insert_id;
597
  mc_increment_event( $event_id );
630
  }
631
  }
632
  if ( $action == 'edit' && $proceed == true ) {
633
+ $current_user = wp_get_current_user();
634
  $result = true;
635
  $url = ( get_option( 'mc_uri' ) != '' && ! is_numeric( get_option( 'mc_uri' ) ) ) ? '' . sprintf( __( 'View <a href="%s">your calendar</a>.', 'my-calendar' ), get_option( 'mc_uri' ) ) : '';
636
+ if ( mc_can_edit_event( $event_id ) ) {
 
637
  $update = $output[2];
638
  $update = apply_filters( 'mc_before_save_update', $update, $event_id );
639
+ $endtime = date( "H:i:00", strtotime( $update['event_endtime'] ) );
640
  $date_changed = (
641
  $update['event_begin'] != $_POST['prev_event_begin'] ||
642
  date( "H:i:00", strtotime( $update['event_time'] ) ) != $_POST['prev_event_time'] ||
643
  $update['event_end'] != $_POST['prev_event_end'] ||
644
+ ( $endtime != $_POST['prev_event_endtime'] && ( $_POST['prev_event_endtime'] != '' && $endtime != '23:59:59' ) ) )
645
+ ? true : false;
646
  if ( isset( $_POST['event_instance'] ) ) {
647
  $is_changed = mc_compare( $update, $event_id );// compares the information sent to the information saved for a given event.
648
  $event_instance = (int) $_POST['event_instance'];
702
  $message = "<div class='error'><p><strong>" . __( 'You do not have sufficient permissions to edit that event.', 'my-calendar' ) . "</strong></p></div>";
703
  }
704
  }
705
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
706
  $message = $message . "\n" . $output[3];
707
 
708
  return array( 'event_id' => $event_id, 'message' => $message );
709
  }
710
 
711
+ function mc_delete_event( $event_id ) {
712
+ global $wpdb;
713
+ $mcdb = $wpdb;
714
+ // Deal with deleting an event from the database
715
+ if ( empty( $event_id ) ) {
716
+ $message = "<div class='error'><p><strong>" . __( 'Error', 'my-calendar' ) . ":</strong>" . __( "You can't delete an event if you haven't submitted an event id", 'my-calendar' ) . "</p></div>";
717
+ } else {
718
+ $post_id = mc_get_data( 'event_post', $event_id );
719
+ if ( empty( $_POST['event_instance'] ) ) {
720
+ $sql = "DELETE FROM " . my_calendar_table() . " WHERE event_id='" . (int) $event_id . "'";
721
+ $delete_occurrences = "DELETE FROM " . my_calendar_event_table() . " WHERE occur_event_id = " . (int) $event_id;
722
+ $mcdb->query( $delete_occurrences );
723
+ $mcdb->query( $sql );
724
+ $sql = "SELECT event_id FROM " . my_calendar_table() . " WHERE event_id='" . (int) $event_id . "'";
725
+ $result = $mcdb->get_results( $sql );
726
+ } else {
727
+ $delete = "DELETE FROM " . my_calendar_event_table() . " WHERE occur_id = " . (int) $_POST['event_instance'];
728
+ $result = $mcdb->get_results( $delete );
729
+ }
730
+ if ( empty( $result ) || empty( $result[0]->event_id ) ) {
731
+ mc_delete_cache();
732
+ // do an action using the event_id
733
+ do_action( 'mc_delete_event', $event_id, $post_id );
734
+ $message = "<div class='updated'><p>" . __( 'Event deleted successfully', 'my-calendar' ) . "</p></div>";
735
+ } else {
736
+ $message = "<div class='error'><p><strong>" . __( 'Error', 'my-calendar' ) . ":</strong>" . __( 'Despite issuing a request to delete, the event still remains in the database. Please investigate.', 'my-calendar' ) . "</p></div>";
737
+ }
738
+ }
739
+
740
+ return $message;
741
+ }
742
+
743
  function mc_form_data( $event_id = false ) {
744
  global $wpdb, $users_entries;
745
  $mcdb = $wpdb;
890
  $return = '
891
  <div class="mc-image-upload field-holder">
892
  <input type="hidden" name="event_image_id" value="" class="textfield" id="e_image_id" />
893
+ <label for="e_image">' . __( "Add an image:", 'my-calendar' ) . '</label><br /><input type="text" name="event_image" id="e_image" size="60" value="' . esc_attr( $value ) . '" placeholder="http://yourdomain.com/image.jpg" /> <button class="button textfield-field">' . __( "Upload", 'my-calendar' ) . '</button>';
894
  if ( ! empty( $data->event_image ) ) {
895
  $return .= '<div class="event_image"><img src="' . esc_attr( $data->event_image ) . '" alt="" /></div>';
896
  } else {
951
  }
952
  if ( $show_block && empty( $_GET['date'] ) ) {
953
  $return = $pre . '
954
+ <h2>' . __( 'Recurring', 'my-calendar' ) . '</h2>
955
  <div class="inside">' . $prev . '
956
  <fieldset>
957
  <legend class="screen-reader-text">' . __( 'Recurring Events', 'my-calendar' ) . '</legend>
958
  <p>
959
  <label for="e_repeats">' . __( 'Repeats', 'my-calendar' ) . ' <input type="text" name="event_repeats" aria-labelledby="e_repeats_label" id="e_repeats" size="1" value="' . esc_attr( $repeats ) . '" /> <span id="e_repeats_label">' . __( 'times', 'my-calendar' ) . '</span>, </label>
960
+ <label for="e_every">' . __( 'every', 'my-calendar' ) . '</label> <input type="number" name="event_every" id="e_every" size="1" min="1" max="99" maxlength="1" value="' . esc_attr( $every ) . '" />
961
  <label for="e_recur" class="screen-reader-text">' . __( 'Units', 'my-calendar' ) . '</label>
962
  <select name="event_recur" id="e_recur">
963
  ' . mc_recur_options( $recur ) . '
986
  if ( $show_block ) {
987
  $label = __( 'Event Access', 'my-calendar' );
988
  $return = $pre . '
989
+ <h2>' . $label . '</h2>
990
  <div class="inside">
991
  ' . mc_event_accessibility( '', $data, $label ) .
992
  apply_filters( 'mc_event_access_fields', '', $has_data, $data ) . '
996
  case 'event_open' :
997
  if ( $show_block ) {
998
  $return = $pre . '
999
+ <h2>' . __( 'Event Registration Settings', 'my-calendar' ) . '</h2>
1000
  <div class="inside">
1001
  <fieldset>
1002
  <legend class="screen-reader-text">' . __( 'Event Registration', 'my-calendar' ) . '</legend>
1162
  $text_link = '';
1163
  }
1164
  ?>
1165
+ <h2><?php echo $text; ?></h2>
1166
  <div class="inside">
1167
  <p class='mc-controls'>
1168
  <a href="<?php echo admin_url( 'admin.php?page=my-calendar-manage' ); ?>"><?php echo ( current_user_can( 'mc_manage_events' ) ) ? __( 'Manage events', 'my-calendar' ) : __( 'Manage your events', 'my-calendar' ); ?></a>
1263
 
1264
  <div class="ui-sortable meta-box-sortables">
1265
  <div class="postbox">
1266
+ <h2><?php _e( 'Date and Time', 'my-calendar' ); ?></h2>
1267
 
1268
  <div class="inside">
1269
  <?php if ( is_object( $data ) ) { // information for rewriting recurring data ?>
1346
 
1347
  <div class="ui-sortable meta-box-sortables">
1348
  <div class="postbox">
1349
+ <h2><?php _e( 'Event Location', 'my-calendar' ); ?></h2>
1350
 
1351
  <div class="inside location_form">
1352
  <fieldset>
1363
  <option value="none"> --</option><?php
1364
  foreach ( $locs as $loc ) {
1365
  if ( is_object( $loc ) ) {
1366
+ echo "<option value=\"" . $loc->location_id . "\">" . wp_kses_post( stripslashes( $loc->location_label ) ) . "</option>";
1367
  if ( is_object( $data ) ) {
1368
  if ( $loc->location_id == $data->event_location ) {
1369
+ $current_location = "<span id='mc-current-location'>" . sprintf( __( 'Current location: %s', 'my-calendar' ), wp_kses_post( $loc->location_label ) ) . "</span>";
1370
  }
1371
  }
1372
  }
1397
  ?>
1398
  <div class="ui-sortable meta-box-sortables">
1399
  <div class="postbox">
1400
+ <h2><?php _e( 'Special scheduling options', 'my-calendar' ); ?></h2>
1401
 
1402
  <div class="inside">
1403
  <fieldset>
1416
  </p>
1417
 
1418
  <p>
1419
+ <label for="e_fifth_week"><?php _e( 'If this event recurs, and falls on the 5th week of the month in a month with only four weeks, move it back one week.', 'my-calendar' ); ?></label>
 
1420
  <input type="checkbox" value="true" id="e_fifth_week"
1421
  name="event_fifth_week"<?php if ( $has_data && $data->event_fifth_week == '1' ) {
1422
  echo " checked=\"checked\"";
1445
  </div><?php
1446
  }
1447
 
1448
+ function mc_event_access() {
1449
+ $event_access = apply_filters( 'mc_event_access_choices', array(
1450
+ '1' => __( 'Audio Description', 'my-calendar' ),
1451
+ '2' => __( 'ASL Interpretation', 'my-calendar' ),
1452
+ '3' => __( 'ASL Interpretation with voicing', 'my-calendar' ),
1453
+ '4' => __( 'Deaf-Blind ASL', 'my-calendar' ),
1454
+ '5' => __( 'Real-time Captioning', 'my-calendar' ),
1455
+ '6' => __( 'Scripted Captioning', 'my-calendar' ),
1456
+ '7' => __( 'Assisted Listening Devices', 'my-calendar' ),
1457
+ '8' => __( 'Tactile/Touch Tour', 'my-calendar' ),
1458
+ '9' => __( 'Braille Playbill', 'my-calendar' ),
1459
+ '10' => __( 'Large Print Playbill', 'my-calendar' ),
1460
+ '11' => __( 'Sensory Friendly', 'my-calendar' ),
1461
+ '12' => __( 'Other', 'my-calendar' )
1462
+ )
1463
+ );
1464
+
1465
+ return $event_access;
1466
+ }
1467
+
1468
  function mc_event_accessibility( $form, $data, $label ) {
1469
  $note_value = '';
1470
  $events_access = array();
1472
  <fieldset>
1473
  <legend>$label</legend>
1474
  <ul class='accessibility-features checkboxes'>";
1475
+ $access = apply_filters( 'mc_event_accessibility', mc_event_access() );
1476
  if ( ! empty( $data ) ) {
1477
  $events_access = get_post_meta( $data->event_post, '_mc_event_access', true );
1478
  }
1489
  if ( isset( $events_access['notes'] ) ) {
1490
  $note_value = esc_attr( $events_access['notes'] );
1491
  }
1492
+ $form .= '<li><label for="events_access_notes">' . __( 'Notes', 'my-calendar' ) . '</label> <input type="text" id="events_access_notes" name="events_access[notes]" value="' . esc_attr( $note_value ) . '" /></li>';
1493
  $form .= "</ul>
1494
  </fieldset>";
1495
 
1501
  global $wpdb;
1502
  $mcdb = $wpdb;
1503
  if ( current_user_can( 'mc_approve_events' ) || current_user_can( 'mc_manage_events' ) || current_user_can( 'mc_add_events' ) ) {
 
1504
 
1505
+ $action = ! empty( $_POST['event_action'] ) ? $_POST['event_action'] : '';
1506
+ $event_id = ! empty( $_POST['event_id'] ) ? $_POST['event_id'] : '';
1507
+ if ( $action == 'delete' ) {
1508
+ $message = mc_delete_event( $event_id );
1509
+ echo $message;
1510
+ }
1511
+
1512
  if ( isset( $_GET['order'] ) ) {
1513
  $sortdir = ( isset( $_GET['order'] ) && $_GET['order'] == 'ASC' ) ? 'ASC' : 'default';
1514
  $sortdir = ( isset( $_GET['order'] ) && $_GET['order'] == 'DESC' ) ? 'DESC' : $sortdir;
1515
  } else {
1516
  $sortdir = 'default';
1517
  }
1518
+
1519
+ $default_direction = ( get_option( 'mc_default_direction' ) == '' ) ? 'ASC' : get_option( 'mc_default_direction' );
1520
+ $sortbydirection = ( $sortdir == 'default' ) ? $default_direction : $sortdir;
1521
+
1522
+ $sortby = ( isset( $_GET['sort'] ) ) ? $_GET['sort'] : get_option( 'mc_default_sort' );
1523
  if ( empty( $sortby ) ) {
1524
  $sortbyvalue = 'event_begin';
1525
  } else {
1549
  $sortbyvalue = "event_begin $sortbydirection, event_time";
1550
  }
1551
  }
1552
+ $sorting = ( $sortbydirection == 'DESC' ) ? "&amp;order=ASC" : '&amp;order=DESC';
1553
  $allow_filters = true;
1554
  $status = ( isset( $_GET['limit'] ) ) ? $_GET['limit'] : 'all';
1555
  $restrict = ( isset( $_GET['restrict'] ) ) ? $_GET['restrict'] : 'all';
1623
  $limit .= ( $restrict != 'event_flagged' ) ? " AND event_flagged = 0" : '';
1624
  }
1625
  if ( isset( $_POST['mcs'] ) ) {
1626
+ $query = $_POST['mcs'];
1627
+ $limit .= mc_prepare_search_query( $query );
1628
  }
1629
  $limit .= ( $restrict != 'archived' ) ? " AND event_status = 1" : ' AND event_status = 0';
1630
  $events = $mcdb->get_results( "SELECT SQL_CALC_FOUND_ROWS * FROM " . my_calendar_table() . " $limit ORDER BY $sortbyvalue $sortbydirection LIMIT " . ( ( $current - 1 ) * $items_per_page ) . ", " . $items_per_page );
1716
  <thead>
1717
  <tr>
1718
  <th scope="col" style="width: 50px;"><input type='checkbox' class='selectall' id='mass_edit'/>
1719
+ <label for='mass_edit' class="screen-reader-text"><?php _e( 'Check/Uncheck all', 'my-calendar' ); ?></label> <a
1720
  href="<?php echo admin_url( "admin.php?page=my-calendar-manage&amp;sort=1$sorting" ); ?>"><?php _e( 'ID', 'my-calendar' ) ?></a>
1721
  </th>
1722
  <th scope="col"><a
1746
  $class = ( $class == 'alternate' ) ? 'even' : 'alternate';
1747
  $pending = ( $event->event_approved == 0 ) ? 'pending' : '';
1748
  $author = ( $event->event_author != 0 ) ? get_userdata( $event->event_author ) : 'Public Submitter';
 
1749
 
1750
  if ( $event->event_flagged == 1 && ( isset( $_GET['restrict'] ) && $_GET['restrict'] == 'flagged' ) ) {
1751
  $spam = 'spam';
1761
  $delete_url = admin_url( "admin.php?page=my-calendar-manage&amp;mode=delete&amp;event_id=$event->event_id" );
1762
  $check = mc_test_occurrence_overlap( $event, true );
1763
  $problem = ( $check != '' ) ? 'problem' : '';
1764
+ if ( current_user_can( 'mc_manage_events' ) || current_user_can( 'mc_approve_events' ) || mc_can_edit_event( $event->event_id ) ) {
1765
  ?>
1766
  <tr class="<?php echo "$class $spam $pending $problem"; ?>">
1767
  <th scope="row">
1769
  <label for="mc<?php echo $event->event_id; ?>"><?php echo $event->event_id; ?></label>
1770
  </th>
1771
  <td title="<?php echo esc_attr( substr( strip_tags( stripslashes( $event->event_desc ) ), 0, 240 ) ); ?>">
1772
+ <strong><?php if ( mc_can_edit_event( $event->event_id ) ) { ?>
1773
  <a href="<?php echo $edit_url; ?>" class='edit'>
1774
  <?php } ?>
1775
+ <?php echo $spam_label; echo strip_tags( stripslashes( $event->event_title ) ); ?>
1776
+ <?php if ( mc_can_edit_event( $event->event_id ) ) {
1777
  echo "</a>";
1778
  if ( $check != '' ) {
1779
  echo '<br /><strong class="error">' . sprintf( __( 'There is a problem with this event. <a href="%s">View</a>', 'my-calendar' ), $edit_url ) . '</strong>';
1783
  <div class='row-actions' style="visibility:visible;">
1784
  <a href="<?php echo $copy_url; ?>"
1785
  class='copy'><?php _e( 'Copy', 'my-calendar' ); ?></a> |
1786
+ <?php if ( mc_can_edit_event( $event->event_id ) ) { ?>
1787
  <a href="<?php echo $edit_url; ?>" class='edit'><?php _e( 'Edit', 'my-calendar' ); ?></a>
1788
  <?php if ( mc_event_is_grouped( $event->event_group_id ) ) { ?>
1789
  | <a href="<?php echo $group_url; ?>" class='edit group'><?php _e( 'Edit Group', 'my-calendar' ); ?></a>
1822
  </div>
1823
  </td>
1824
  <td>
1825
+ <?php if ( $event->event_label != '' ) { ?><a class='mc_filter' href='<?php $elabel = urlencode( $event->event_label ); echo admin_url( "admin.php?page=my-calendar-manage&amp;filter=$elabel&amp;restrict=where" ); ?>' title="<?php _e( 'Filter by location', 'my-calendar' ); ?>"><span class="screen-reader-text"><?php _e( 'Show only: ', 'my-calendar' ); ?></span><?php echo strip_tags( stripslashes( $event->event_label ) ); ?></a><?php } ?>
1826
  </td>
1827
  <?php if ( $event->event_endtime != "23:59:59" ) {
1828
  $eventTime = date_i18n( get_option( 'mc_time_format' ), strtotime( $event->event_time ) );
1889
  $this_cat = $categories[ $key ];
1890
  }
1891
  }
1892
+ $color = strip_tags( $this_cat->category_color );
1893
  ?>
1894
  <td>
1895
  <div class="category-color"
1896
+ style="background-color:<?php echo ( strpos( $color, '#' ) !== 0 ) ? '#' : ''; echo $color; ?>;">
1897
+ </div>
1898
  <a class='mc_filter'
1899
  href='<?php echo admin_url( "admin.php?page=my-calendar-manage&amp;filter=$event->event_category&amp;restrict=category" ); ?>'
1900
  title="<?php _e( 'Filter by category', 'my-calendar' ); ?>"><span
1901
+ class="screen-reader-text"><?php _e( 'Show only: ', 'my-calendar' ); ?></span><?php echo wp_kses_post( stripslashes( $this_cat->category_name ) ); ?>
1902
  </a></td>
1903
  <?php unset( $this_cat ); ?>
1904
  </tr>
1933
  <?php
1934
  } else {
1935
  ?>
1936
+ <p class='mc-none'><?php _e( "There are no events in the database meeting your current criteria.", 'my-calendar' ) ?></p><?php
1937
  }
1938
  }
1939
  }
1962
  // if this is an all weekdays event, and it's been scheduled to start on a weekend, the math gets nasty.
1963
  // ...AND there's no reason to allow it, since weekday events will NEVER happen on the weekend.
1964
  $begin = trim( $post['event_begin'][ $i ] );
1965
+ $end = ( ! empty( $post['event_end'] ) ) ? trim( $post['event_end'][ $i ] ) : $post['event_begin'][ $i ];
1966
  if ( $recur == 'E' && ( date( 'w', strtotime( $begin ) ) == 0 || date( 'w', strtotime( $begin ) ) == 6 ) ) {
1967
  if ( date( 'w', strtotime( $begin ) ) == 0 ) {
1968
  $newbegin = my_calendar_add_date( $begin, 1 );
1999
  $time = '00:00:00'; $endtime = '23:59:59';
2000
  }
2001
  $end = date( 'Y-m-d', strtotime( $end ) ); // regardless of entry format, convert.
2002
+ $repeats = ( isset( $post['event_repeats'] ) ) ? trim( $post['event_repeats'] ) : 0;
2003
  $host = ! empty( $post['event_host'] ) ? $post['event_host'] : $current_user->ID;
2004
  $category = ! empty( $post['event_category'] ) ? $post['event_category'] : '';
2005
  $event_link = ! empty( $post['event_link'] ) ? trim( $post['event_link'] ) : '';
2006
  $expires = ! empty( $post['event_link_expires'] ) ? $post['event_link_expires'] : '0';
2007
  $approved = ! empty( $post['event_approved'] ) ? $post['event_approved'] : '0';
2008
  $location_preset = ! empty( $post['location_preset'] ) ? $post['location_preset'] : '';
2009
+ $event_author = ( ! empty( $post['event_author'] ) && is_numeric( $post['event_author'] ) ) ? $post['event_author'] : '';
2010
  $event_open = ( isset( $post['event_open'] ) && $post['event_open'] !== 0 ) ? $post['event_open'] : '2';
2011
  $event_tickets = ( isset( $post['event_tickets'] ) ) ? trim( $post['event_tickets'] ) : '';
2012
  $event_registration = ( isset( $post['event_registration'] ) ) ? trim( $post['event_registration'] ) : '';
2074
  'location_phone2' => $event_phone2,
2075
  'location_access' => ( is_array( $event_access ) ) ? serialize( $event_access ) : ''
2076
  );
2077
+
2078
+ $add_loc = array_map( 'wp_kses_post', $add_loc );
2079
+
2080
  $loc_formats = array(
2081
  '%s',
2082
  '%s',
2100
  // Perform validation on the submitted dates - checks for valid years and months
2101
  if ( mc_checkdate( $begin ) && mc_checkdate( $end ) ) {
2102
  // Make sure dates are equal or end date is later than start date
2103
+ if ( strtotime( "$end $endtime" ) < strtotime( "$begin $time" ) ) {
2104
  $errors .= "<div class='error'><p><strong>" . __( 'Error', 'my-calendar' ) . ":</strong> " . __( 'Your event end date must be either after or the same as your event begin date', 'my-calendar' ) . "</p></div>";
2105
  }
2106
  } else {
2152
  }
2153
 
2154
  if ( $errors == '' ) {
2155
+ $current_user = wp_get_current_user();
2156
+ $event_author = ( $event_author == $current_user->ID || current_user_can( 'mc_manage_events' ) ) ? $event_author : $current_user->ID;
2157
+
2158
  $ok = true;
2159
  $submit = array(
2160
  // strings
2202
  'event_longitude' => $event_longitude,
2203
  'event_latitude' => $event_latitude
2204
  );
2205
+ $submit = array_map( 'wp_kses_post', $submit );
2206
+
2207
  } else {
2208
  $ok = false;
2209
  $event_access = ( is_array( $event_access ) ) ? serialize( $event_access ) : '';
2357
  return $next;
2358
  }
2359
 
2360
+ function mc_instance_list( $id, $occur = false, $template = '<h3>{title}</h3>{description}', $list = '<li>{date}, {time}</li>', $before = "<ul>", $after = "</ul>", $instance = false ) {
2361
  global $wpdb;
2362
  $id = (int) $id;
2363
  $output = '';
2364
+ if ( $instance == true ) {
2365
+ $sql = "SELECT * FROM " . my_calendar_event_table() . " WHERE occur_id=$id";
2366
+ } else {
2367
+ $sql = "SELECT * FROM " . my_calendar_event_table() . " WHERE occur_event_id=$id";
2368
+ }
2369
  $results = $wpdb->get_results( $sql );
2370
  if ( is_array( $results ) && is_admin() ) {
2371
  foreach ( $results as $result ) {
2523
  $featured_image = wp_get_attachment_url( get_post_thumbnail_id( $post->ID ) );
2524
  $event_id = get_post_meta( $post->ID, '_mc_event_id', true );
2525
  mc_update_data( $event_id, 'event_image', $featured_image, '%s' );
 
2526
  }
my-calendar-events.php CHANGED
@@ -173,15 +173,23 @@ function mc_get_rss_events( $cat_id = false ) {
173
  return $output;
174
  }
175
 
176
- // get event basic info
 
 
 
 
177
  function mc_get_event_core( $id ) {
 
 
 
 
178
  global $wpdb;
179
  $mcdb = $wpdb;
180
  if ( get_option( 'mc_remote' ) == 'true' && function_exists( 'mc_remote_db' ) ) {
181
  $mcdb = mc_remote_db();
182
  }
183
  $event = $mcdb->get_row( "SELECT * FROM " . MY_CALENDAR_TABLE . " JOIN " . MY_CALENDAR_CATEGORIES_TABLE . " ON (event_category=category_id) WHERE event_id=$id" );
184
-
185
  return $event;
186
  }
187
 
@@ -199,6 +207,9 @@ function mc_get_first_event( $id ) {
199
 
200
  // get event instance (object or html)
201
  function mc_get_event( $id, $type = 'object' ) {
 
 
 
202
  // indicates whether you want a specific instance, or a general event
203
  global $wpdb;
204
  $mcdb = $wpdb;
@@ -294,6 +305,7 @@ function mc_related_events( $id, $return = false ) {
294
  */
295
  function my_calendar_events( $from, $to, $category, $ltype, $lvalue, $source, $author, $host, $search = '' ) {
296
  $events = my_calendar_grab_events( $from, $to, $category, $ltype, $lvalue, $source, $author, $host, null, $search );
 
297
  if ( ! get_option( 'mc_skip_holidays_category' ) || get_option( 'mc_skip_holidays_category' ) == '' ) {
298
  $holidays = array();
299
  } else {
@@ -333,7 +345,7 @@ function my_calendar_events_now( $category = 'default', $template = '<strong>{li
333
  ON (event_category=category_id)
334
  WHERE $select_category $select_location $select_author $select_host $limit_string
335
  AND ( CAST('$now' AS DATETIME) BETWEEN occur_begin AND occur_end )
336
- ORDER BY " . apply_filters( 'occur_begin', 'mc_primary_sort' ) . ", " . apply_filters( 'mc_secondary_sort', 'event_title ASC' );
337
  $events = $mcdb->get_results( $event_query );
338
  if ( ! empty( $events ) ) {
339
  foreach ( array_keys( $events ) as $key ) {
@@ -410,6 +422,7 @@ function my_calendar_grab_events( $from, $to, $category = null, $ltype = '', $lv
410
  if ( ! mc_checkdate( $from ) || ! mc_checkdate( $to ) ) {
411
  return array();
412
  } // not valid dates
 
413
  $caching = apply_filters( 'mc_caching_enabled', false, $ccategory, $ltype, $lvalue, $author, $host );
414
  $hash = md5( $from . $to . $ccategory . $cltype . $clvalue . $clauth . $clhost );
415
  if ( $source != 'upcoming' ) { // no caching on upcoming events by days widgets or lists
@@ -428,7 +441,7 @@ function my_calendar_grab_events( $from, $to, $category = null, $ltype = '', $lv
428
  $select_author = ( $clauth != 'all' ) ? mc_select_author( $clauth ) : '';
429
  $select_host = ( $clhost != 'all' ) ? mc_select_host( $clhost ) : '';
430
  $select_location = mc_limit_string( 'grab', $cltype, $clvalue );
431
-
432
  if ( $caching && $source != 'upcoming' ) {
433
  $select_category = '';
434
  $select_location = '';
@@ -439,7 +452,8 @@ function my_calendar_grab_events( $from, $to, $category = null, $ltype = '', $lv
439
 
440
  $arr_events = array();
441
  $limit_string = "event_flagged <> 1 AND event_approved = 1";
442
- $search = ( $search != '' ) ? " AND MATCH(event_title,event_desc,event_short,event_label,event_city,event_postcode,event_registration) AGAINST ('" . esc_sql( $search ) . "' IN BOOLEAN MODE) " : '';
 
443
  $event_query = "SELECT *, UNIX_TIMESTAMP(occur_begin) AS ts_occur_begin, UNIX_TIMESTAMP(occur_end) AS ts_occur_end
444
  FROM " . MY_CALENDAR_EVENTS_TABLE . "
445
  JOIN " . MY_CALENDAR_TABLE . "
@@ -451,8 +465,9 @@ function my_calendar_grab_events( $from, $to, $category = null, $ltype = '', $lv
451
  OR DATE(occur_end) BETWEEN '$from 00:00:00' AND '$to 23:59:59'
452
  OR ( DATE('$from') BETWEEN DATE(occur_begin) AND DATE(occur_end) )
453
  OR ( DATE('$to') BETWEEN DATE(occur_begin) AND DATE(occur_end) ) )
454
- ORDER BY occur_begin, " . apply_filters( 'mc_secondary_sort', 'event_title ASC' );
455
  $events = $mcdb->get_results( $event_query );
 
456
  if ( ! empty( $events ) ) {
457
  foreach ( array_keys( $events ) as $key ) {
458
  $event =& $events[ $key ];
@@ -474,6 +489,24 @@ function my_calendar_grab_events( $from, $to, $category = null, $ltype = '', $lv
474
  }
475
  }
476
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
477
  function mc_check_cache( $category, $ltype, $lvalue, $author, $host, $hash ) {
478
  $caching = apply_filters( 'mc_caching_enabled', false, $category, $ltype, $lvalue, $author, $host );
479
  if ( $caching == true ) {
173
  return $output;
174
  }
175
 
176
+ /**
177
+ * get event basic info
178
+ *
179
+ * @param integer $id Event ID in my_calendar db
180
+ */
181
  function mc_get_event_core( $id ) {
182
+ if ( !is_numeric( $id ) ) {
183
+ return;
184
+ }
185
+
186
  global $wpdb;
187
  $mcdb = $wpdb;
188
  if ( get_option( 'mc_remote' ) == 'true' && function_exists( 'mc_remote_db' ) ) {
189
  $mcdb = mc_remote_db();
190
  }
191
  $event = $mcdb->get_row( "SELECT * FROM " . MY_CALENDAR_TABLE . " JOIN " . MY_CALENDAR_CATEGORIES_TABLE . " ON (event_category=category_id) WHERE event_id=$id" );
192
+
193
  return $event;
194
  }
195
 
207
 
208
  // get event instance (object or html)
209
  function mc_get_event( $id, $type = 'object' ) {
210
+ if ( !is_numeric( $id ) ) {
211
+ return;
212
+ }
213
  // indicates whether you want a specific instance, or a general event
214
  global $wpdb;
215
  $mcdb = $wpdb;
305
  */
306
  function my_calendar_events( $from, $to, $category, $ltype, $lvalue, $source, $author, $host, $search = '' ) {
307
  $events = my_calendar_grab_events( $from, $to, $category, $ltype, $lvalue, $source, $author, $host, null, $search );
308
+
309
  if ( ! get_option( 'mc_skip_holidays_category' ) || get_option( 'mc_skip_holidays_category' ) == '' ) {
310
  $holidays = array();
311
  } else {
345
  ON (event_category=category_id)
346
  WHERE $select_category $select_location $select_author $select_host $limit_string
347
  AND ( CAST('$now' AS DATETIME) BETWEEN occur_begin AND occur_end )
348
+ ORDER BY " . apply_filters( 'mc_primary_sort', 'occur_begin' ) . ", " . apply_filters( 'mc_secondary_sort', 'event_title ASC' );
349
  $events = $mcdb->get_results( $event_query );
350
  if ( ! empty( $events ) ) {
351
  foreach ( array_keys( $events ) as $key ) {
422
  if ( ! mc_checkdate( $from ) || ! mc_checkdate( $to ) ) {
423
  return array();
424
  } // not valid dates
425
+
426
  $caching = apply_filters( 'mc_caching_enabled', false, $ccategory, $ltype, $lvalue, $author, $host );
427
  $hash = md5( $from . $to . $ccategory . $cltype . $clvalue . $clauth . $clhost );
428
  if ( $source != 'upcoming' ) { // no caching on upcoming events by days widgets or lists
441
  $select_author = ( $clauth != 'all' ) ? mc_select_author( $clauth ) : '';
442
  $select_host = ( $clhost != 'all' ) ? mc_select_host( $clhost ) : '';
443
  $select_location = mc_limit_string( 'grab', $cltype, $clvalue );
444
+
445
  if ( $caching && $source != 'upcoming' ) {
446
  $select_category = '';
447
  $select_location = '';
452
 
453
  $arr_events = array();
454
  $limit_string = "event_flagged <> 1 AND event_approved = 1";
455
+ $search = mc_prepare_search_query( $search );
456
+
457
  $event_query = "SELECT *, UNIX_TIMESTAMP(occur_begin) AS ts_occur_begin, UNIX_TIMESTAMP(occur_end) AS ts_occur_end
458
  FROM " . MY_CALENDAR_EVENTS_TABLE . "
459
  JOIN " . MY_CALENDAR_TABLE . "
465
  OR DATE(occur_end) BETWEEN '$from 00:00:00' AND '$to 23:59:59'
466
  OR ( DATE('$from') BETWEEN DATE(occur_begin) AND DATE(occur_end) )
467
  OR ( DATE('$to') BETWEEN DATE(occur_begin) AND DATE(occur_end) ) )
468
+ ORDER BY " . apply_filters( 'mc_primary_sort', 'occur_begin' ) . ", " . apply_filters( 'mc_secondary_sort', 'event_title ASC' );
469
  $events = $mcdb->get_results( $event_query );
470
+
471
  if ( ! empty( $events ) ) {
472
  foreach ( array_keys( $events ) as $key ) {
473
  $event =& $events[ $key ];
489
  }
490
  }
491
 
492
+ function mc_get_db_type() {
493
+ global $wpdb;
494
+ $mcdb = $wpdb;
495
+ $db_type = 'MyISAM';
496
+ if ( get_option( 'mc_remote' ) == 'true' && function_exists( 'mc_remote_db' ) ) {
497
+ $mcdb = mc_remote_db();
498
+ }
499
+ $my_calendar = MY_CALENDAR_TABLE;
500
+ $dbs = $mcdb->get_results( "SHOW TABLE STATUS WHERE name='$my_calendar'" );
501
+ foreach( $dbs as $db ) {
502
+ if ( $db->Name == MY_CALENDAR_TABLE ) {
503
+ $db_type = $db->Engine;
504
+ }
505
+ }
506
+
507
+ return $db_type;
508
+ }
509
+
510
  function mc_check_cache( $category, $ltype, $lvalue, $author, $host, $hash ) {
511
  $caching = apply_filters( 'mc_caching_enabled', false, $category, $ltype, $lvalue, $author, $host );
512
  if ( $caching == true ) {
my-calendar-generator.php CHANGED
@@ -111,6 +111,7 @@ function mc_generator( $type ) {
111
  <select name="format" id="format">
112
  <option value="calendar" selected="selected"><?php _e( 'Grid', 'my-calendar' ); ?></option>
113
  <option value="list"><?php _e( 'List', 'my-calendar' ); ?></option>
 
114
  </select>
115
  </p>
116
  <p>
111
  <select name="format" id="format">
112
  <option value="calendar" selected="selected"><?php _e( 'Grid', 'my-calendar' ); ?></option>
113
  <option value="list"><?php _e( 'List', 'my-calendar' ); ?></option>
114
+ <option value="mini"><?php _e( 'Mini', 'my-calendar' ); ?></option>
115
  </select>
116
  </p>
117
  <p>
my-calendar-group-manager.php CHANGED
@@ -90,8 +90,7 @@ function edit_my_calendar_groups() {
90
  my_calendar_check_db();
91
  if ( $action == 'edit' ) {
92
  ?>
93
- <div id="icon-edit" class="icon32"></div>
94
- <h2><?php _e( 'Edit Event Group', 'my-calendar' ); ?></h2>
95
  <?php
96
  if ( empty( $event_id ) || empty( $group_id ) ) {
97
  echo "<div class=\"error\"><p>" . __( "You must provide an event group id in order to edit it", 'my-calendar' ) . "</p></div>";
@@ -100,8 +99,7 @@ function edit_my_calendar_groups() {
100
  }
101
  } else {
102
  ?>
103
- <div id="icon-edit" class="icon32"></div>
104
- <h2><?php _e( 'Manage Event Groups', 'my-calendar' ); ?></h2>
105
  <p>
106
  <?php _e( 'Grouped events can be edited simultaneously. When you choose a group of events to edit, the form will be pre-filled with the content applicable to the member of the event group you started from. (e.g., if you click on the "Edit Group" link for the 3rd of a set of events, the boxes will use the content applicable to that event.). You will also receive a set of checkboxes which will indicate which events in the group should have these changes applied. (All grouped events can also be edited individually.)', 'my-calendar' ); ?>
107
  </p>
@@ -110,7 +108,7 @@ function edit_my_calendar_groups() {
110
  <div class="metabox-holder">
111
  <div class="ui-sortable meta-box-sortables">
112
  <div class="postbox">
113
- <h3><?php _e( 'Manage Event Groups', 'my-calendar' ); ?></h3>
114
 
115
  <div class="inside">
116
  <p><?php _e( 'Select an event group to edit.', 'my-calendar' ); ?></p>
@@ -119,7 +117,7 @@ function edit_my_calendar_groups() {
119
  </div>
120
  <div class="ui-sortable meta-box-sortables">
121
  <div class="postbox">
122
- <h3><?php _e( 'Create/Modify Groups', 'my-calendar' ); ?></h3>
123
  <?php mc_list_groups(); ?>
124
  </div>
125
  </div>
@@ -137,7 +135,7 @@ function my_calendar_save_group( $action, $output, $event_id = false ) {
137
  $message = '';
138
  if ( $action == 'edit' && $proceed == true ) {
139
  $event_author = (int) ( $_POST['event_author'] );
140
- if ( mc_can_edit_event( $event_author ) ) {
141
  $update = $output[2];
142
  $update = apply_filters( 'mc_update_group_data', $update, $event_author, $action, $event_id );
143
  $formats = array(
@@ -301,7 +299,7 @@ function mc_edit_groups( $mode = 'edit', $event_id = false, $group_id = false )
301
  function my_calendar_print_group_fields( $data, $mode, $event_id, $group_id = '' ) {
302
  global $user_ID, $wpdb;
303
  $mcdb = $wpdb;
304
- get_currentuserinfo();
305
  $has_data = ( empty( $data ) ) ? false : true;
306
  $user = get_userdata( $user_ID );
307
  $mc_input_administrator = ( get_option( 'mc_input_options_administrators' ) == 'true' && current_user_can( 'manage_options' ) ) ? true : false;
@@ -318,15 +316,15 @@ function my_calendar_print_group_fields( $data, $mode, $event_id, $group_id = ''
318
  } else {
319
  echo mc_group_id();
320
  } ?>"/>
321
- <input type="hidden" name="event_action" value="<?php esc_attr_e( $mode ); ?>"/>
322
- <input type="hidden" name="event_id" value="<?php esc_attr_e( $event_id ); ?>"/>
323
- <input type="hidden" name="event_author" value="<?php esc_attr_e( $user_ID ); ?>"/>
324
- <input type="hidden" name="event_post" value="<?php esc_attr_e( $data->event_post ); ?>"/>
325
  <input type="hidden" name="event_nonce_name" value="<?php echo wp_create_nonce( 'event_nonce' ); ?>"/>
326
  </div>
327
  <div class="ui-sortable meta-box-sortables">
328
  <div class="postbox">
329
- <h3><?php _e( 'Manage Event Groups', 'my-calendar' ); ?></h3>
330
 
331
  <div class="inside">
332
  <fieldset>
@@ -492,7 +490,7 @@ function my_calendar_print_group_fields( $data, $mode, $event_id, $group_id = ''
492
  ?>
493
  <div class="ui-sortable meta-box-sortables">
494
  <div class="postbox">
495
- <h3><?php _e( 'Event Registration Options', 'my-calendar' ); ?></h3>
496
 
497
  <div class="inside">
498
  <fieldset>
@@ -519,7 +517,7 @@ function my_calendar_print_group_fields( $data, $mode, $event_id, $group_id = ''
519
 
520
  <div class="ui-sortable meta-box-sortables">
521
  <div class="postbox">
522
- <h3><?php _e( 'Event Location', 'my-calendar' ); ?></h3>
523
 
524
  <div class="inside location_form">
525
  <fieldset>
@@ -690,7 +688,7 @@ function my_calendar_print_group_fields( $data, $mode, $event_id, $group_id = ''
690
  <legend><?php _e( 'Location Accessibility', 'my-calendar' ); ?></legend>
691
  <ul class='checkboxes'>
692
  <?php
693
- $access = apply_filters( 'mc_venue_accessibility', get_option( 'mc_location_access' ) );
694
  $access_list = '';
695
  if ( ! empty( $data ) ) {
696
  $location_access = unserialize( $data->event_access );
@@ -841,6 +839,9 @@ function mc_check_group_data( $action, $post ) {
841
  'event_longitude' => $event_longitude,
842
  'event_latitude' => $event_latitude
843
  );
 
 
 
844
  if ( $action == 'edit' ) {
845
  unset( $submit['event_author'] );
846
  }
@@ -884,6 +885,9 @@ function mc_check_group_data( $action, $post ) {
884
  function mc_list_groups() {
885
  global $wpdb;
886
  $mcdb = $wpdb;
 
 
 
887
  $sortby = ( isset( $_GET['sort'] ) ) ? (int) $_GET['sort'] : get_option( 'mc_default_sort' );
888
  if ( isset( $_GET['order'] ) ) {
889
  $sortdir = ( isset( $_GET['order'] ) && $_GET['order'] == 'ASC' ) ? 'ASC' : 'default';
@@ -926,7 +930,6 @@ function mc_list_groups() {
926
  $sorting = ( $sortbydirection == 'DESC' ) ? "&amp;order=ASC" : '';
927
 
928
  $current = empty( $_GET['paged'] ) ? 1 : intval( $_GET['paged'] );
929
- $user = get_current_user_id();
930
  $screen = get_current_screen();
931
  $option = $screen->get_option( 'per_page', 'option' );
932
  $items_per_page = get_user_meta( $user, $option, true );
@@ -1033,7 +1036,7 @@ function mc_list_groups() {
1033
  $spam_label = ( $event->event_flagged == 1 ) ? '<strong>Possible spam:</strong> ' : '';
1034
  $author = ( $event->event_author != 0 ) ? get_userdata( $event->event_author ) : 'Public Submitter';
1035
  if ( $event->event_link != '' ) {
1036
- $title = "<a href='" . esc_attr( $event->event_link ) . "'>$event->event_title</a>";
1037
  } else {
1038
  $title = $event->event_title;
1039
  } ?>
@@ -1044,19 +1047,19 @@ function mc_list_groups() {
1044
  <label for="mc<?php echo $event->event_id; ?>"><?php echo $event->event_id; ?></label></th>
1045
  <th scope="row"><?php echo ( $event->event_group_id == 0 ) ? '-' : $event->event_group_id; ?></th>
1046
  <td title="<?php echo esc_attr( substr( strip_tags( stripslashes( $event->event_desc ) ), 0, 240 ) ); ?>">
1047
- <strong><?php if (mc_can_edit_event( $event->event_author )) { ?>
1048
  <a href="<?php echo admin_url( "admin.php?page=my-calendar&amp;mode=edit&amp;event_id=$event->event_id" ); ?>"
1049
  class='edit'>
1050
  <?php
1051
  }
1052
  echo $spam_label;
1053
- echo stripslashes( $title ); ?>
1054
- <?php if ( mc_can_edit_event( $event->event_author ) ) {
1055
  echo "</a>";
1056
  } ?></strong>
1057
 
1058
  <div class='row-actions' style="visibility:visible;">
1059
- <?php if ( mc_can_edit_event( $event->event_author ) ) { ?>
1060
  <a href="<?php echo admin_url( "admin.php?page=my-calendar&amp;mode=edit&amp;event_id=$event->event_id" ); ?>"
1061
  class='edit'><?php _e( 'Edit Event', 'my-calendar' ); ?></a> |
1062
  <?php if ( mc_event_is_grouped( $event->event_group_id ) ) { ?>
@@ -1071,7 +1074,7 @@ function mc_list_groups() {
1071
  } ?>
1072
  </div>
1073
  </td>
1074
- <td><?php echo stripslashes( $event->event_label ); ?></td>
1075
  <?php if ( $event->event_time != "00:00:00" ) {
1076
  $eventTime = date_i18n( get_option( 'mc_time_format' ), strtotime( $event->event_time ) );
1077
  } else {
@@ -1121,8 +1124,8 @@ function mc_list_groups() {
1121
  ?>
1122
  <td>
1123
  <div class="category-color"
1124
- style="background-color:<?php echo ( strpos( $this_cat->category_color, '#' ) !== 0 ) ? '#' : '';
1125
- echo $this_cat->category_color; ?>;"></div> <?php echo stripslashes( $this_cat->category_name ); ?>
1126
  </td>
1127
  <?php unset( $this_cat ); ?>
1128
  </tr><?php
90
  my_calendar_check_db();
91
  if ( $action == 'edit' ) {
92
  ?>
93
+ <h1><?php _e( 'Edit Event Group', 'my-calendar' ); ?></h1>
 
94
  <?php
95
  if ( empty( $event_id ) || empty( $group_id ) ) {
96
  echo "<div class=\"error\"><p>" . __( "You must provide an event group id in order to edit it", 'my-calendar' ) . "</p></div>";
99
  }
100
  } else {
101
  ?>
102
+ <h1><?php _e( 'Manage Event Groups', 'my-calendar' ); ?></h1>
 
103
  <p>
104
  <?php _e( 'Grouped events can be edited simultaneously. When you choose a group of events to edit, the form will be pre-filled with the content applicable to the member of the event group you started from. (e.g., if you click on the "Edit Group" link for the 3rd of a set of events, the boxes will use the content applicable to that event.). You will also receive a set of checkboxes which will indicate which events in the group should have these changes applied. (All grouped events can also be edited individually.)', 'my-calendar' ); ?>
105
  </p>
108
  <div class="metabox-holder">
109
  <div class="ui-sortable meta-box-sortables">
110
  <div class="postbox">
111
+ <h2><?php _e( 'Manage Event Groups', 'my-calendar' ); ?></h2>
112
 
113
  <div class="inside">
114
  <p><?php _e( 'Select an event group to edit.', 'my-calendar' ); ?></p>
117
  </div>
118
  <div class="ui-sortable meta-box-sortables">
119
  <div class="postbox">
120
+ <h2><?php _e( 'Create/Modify Groups', 'my-calendar' ); ?></h2>
121
  <?php mc_list_groups(); ?>
122
  </div>
123
  </div>
135
  $message = '';
136
  if ( $action == 'edit' && $proceed == true ) {
137
  $event_author = (int) ( $_POST['event_author'] );
138
+ if ( mc_can_edit_event( $event_id ) ) {
139
  $update = $output[2];
140
  $update = apply_filters( 'mc_update_group_data', $update, $event_author, $action, $event_id );
141
  $formats = array(
299
  function my_calendar_print_group_fields( $data, $mode, $event_id, $group_id = '' ) {
300
  global $user_ID, $wpdb;
301
  $mcdb = $wpdb;
302
+ $current_user = wp_get_current_user();
303
  $has_data = ( empty( $data ) ) ? false : true;
304
  $user = get_userdata( $user_ID );
305
  $mc_input_administrator = ( get_option( 'mc_input_options_administrators' ) == 'true' && current_user_can( 'manage_options' ) ) ? true : false;
316
  } else {
317
  echo mc_group_id();
318
  } ?>"/>
319
+ <input type="hidden" name="event_action" value="<?php echo esc_attr( $mode ); ?>"/>
320
+ <input type="hidden" name="event_id" value="<?php echo esc_attr( $event_id ); ?>"/>
321
+ <input type="hidden" name="event_author" value="<?php echo esc_attr( $user_ID ); ?>"/>
322
+ <input type="hidden" name="event_post" value="<?php echo esc_attr( $data->event_post ); ?>"/>
323
  <input type="hidden" name="event_nonce_name" value="<?php echo wp_create_nonce( 'event_nonce' ); ?>"/>
324
  </div>
325
  <div class="ui-sortable meta-box-sortables">
326
  <div class="postbox">
327
+ <h2><?php _e( 'Manage Event Groups', 'my-calendar' ); ?></h2>
328
 
329
  <div class="inside">
330
  <fieldset>
490
  ?>
491
  <div class="ui-sortable meta-box-sortables">
492
  <div class="postbox">
493
+ <h2><?php _e( 'Event Registration Options', 'my-calendar' ); ?></h2>
494
 
495
  <div class="inside">
496
  <fieldset>
517
 
518
  <div class="ui-sortable meta-box-sortables">
519
  <div class="postbox">
520
+ <h2><?php _e( 'Event Location', 'my-calendar' ); ?></h2>
521
 
522
  <div class="inside location_form">
523
  <fieldset>
688
  <legend><?php _e( 'Location Accessibility', 'my-calendar' ); ?></legend>
689
  <ul class='checkboxes'>
690
  <?php
691
+ $access = apply_filters( 'mc_venue_accessibility', mc_location_access() );
692
  $access_list = '';
693
  if ( ! empty( $data ) ) {
694
  $location_access = unserialize( $data->event_access );
839
  'event_longitude' => $event_longitude,
840
  'event_latitude' => $event_latitude
841
  );
842
+
843
+ $submit = array_map( 'wp_kses_post', $submit );
844
+
845
  if ( $action == 'edit' ) {
846
  unset( $submit['event_author'] );
847
  }
885
  function mc_list_groups() {
886
  global $wpdb;
887
  $mcdb = $wpdb;
888
+ $current_user = wp_get_current_user();
889
+ $user = $current_user->ID;
890
+
891
  $sortby = ( isset( $_GET['sort'] ) ) ? (int) $_GET['sort'] : get_option( 'mc_default_sort' );
892
  if ( isset( $_GET['order'] ) ) {
893
  $sortdir = ( isset( $_GET['order'] ) && $_GET['order'] == 'ASC' ) ? 'ASC' : 'default';
930
  $sorting = ( $sortbydirection == 'DESC' ) ? "&amp;order=ASC" : '';
931
 
932
  $current = empty( $_GET['paged'] ) ? 1 : intval( $_GET['paged'] );
 
933
  $screen = get_current_screen();
934
  $option = $screen->get_option( 'per_page', 'option' );
935
  $items_per_page = get_user_meta( $user, $option, true );
1036
  $spam_label = ( $event->event_flagged == 1 ) ? '<strong>Possible spam:</strong> ' : '';
1037
  $author = ( $event->event_author != 0 ) ? get_userdata( $event->event_author ) : 'Public Submitter';
1038
  if ( $event->event_link != '' ) {
1039
+ $title = "<a href='" . esc_attr( $event->event_link ) . "'>" . wp_kses_post( $event->event_title ) . "</a>";
1040
  } else {
1041
  $title = $event->event_title;
1042
  } ?>
1047
  <label for="mc<?php echo $event->event_id; ?>"><?php echo $event->event_id; ?></label></th>
1048
  <th scope="row"><?php echo ( $event->event_group_id == 0 ) ? '-' : $event->event_group_id; ?></th>
1049
  <td title="<?php echo esc_attr( substr( strip_tags( stripslashes( $event->event_desc ) ), 0, 240 ) ); ?>">
1050
+ <strong><?php if ( mc_can_edit_event( $event->event_id ) ) { ?>
1051
  <a href="<?php echo admin_url( "admin.php?page=my-calendar&amp;mode=edit&amp;event_id=$event->event_id" ); ?>"
1052
  class='edit'>
1053
  <?php
1054
  }
1055
  echo $spam_label;
1056
+ echo strip_tags( stripslashes( $title ) ); ?>
1057
+ <?php if ( mc_can_edit_event( $event->event_id ) ) {
1058
  echo "</a>";
1059
  } ?></strong>
1060
 
1061
  <div class='row-actions' style="visibility:visible;">
1062
+ <?php if ( mc_can_edit_event( $event->event_id ) ) { ?>
1063
  <a href="<?php echo admin_url( "admin.php?page=my-calendar&amp;mode=edit&amp;event_id=$event->event_id" ); ?>"
1064
  class='edit'><?php _e( 'Edit Event', 'my-calendar' ); ?></a> |
1065
  <?php if ( mc_event_is_grouped( $event->event_group_id ) ) { ?>
1074
  } ?>
1075
  </div>
1076
  </td>
1077
+ <td><?php echo strip_tags( stripslashes( $event->event_label ) ); ?></td>
1078
  <?php if ( $event->event_time != "00:00:00" ) {
1079
  $eventTime = date_i18n( get_option( 'mc_time_format' ), strtotime( $event->event_time ) );
1080
  } else {
1124
  ?>
1125
  <td>
1126
  <div class="category-color"
1127
+ style="background-color:<?php echo strip_tags( ( strpos( $this_cat->category_color, '#' ) !== 0 ) ? '#' : '' );
1128
+ echo $this_cat->category_color; ?>;"></div> <?php echo wp_kses_post( stripslashes( $this_cat->category_name ) ); ?>
1129
  </td>
1130
  <?php unset( $this_cat ); ?>
1131
  </tr><?php
my-calendar-help.php CHANGED
@@ -7,14 +7,14 @@ function my_calendar_help() {
7
  ?>
8
 
9
  <div class="wrap jd-my-calendar">
10
- <h2><?php _e( 'How to use My Calendar', 'my-calendar' ); ?></h2>
11
 
12
  <div class="postbox-container jcd-wide">
13
  <div class="metabox-holder">
14
 
15
  <div class="ui-sortable meta-box-sortables" id="get-started">
16
  <div class="postbox">
17
- <h3 id="help"><?php _e( 'Getting Started', 'my-calendar' ); ?></h3>
18
 
19
  <div class="inside">
20
  <ul>
@@ -41,7 +41,7 @@ function my_calendar_help() {
41
 
42
  <div class="ui-sortable meta-box-sortables" id="mc-generator">
43
  <div class="postbox">
44
- <h3 id="help"><?php _e( "My Calendar Shortcode Generator", 'my-calendar' ); ?></h3>
45
 
46
  <div class="inside mc-tabs">
47
  <?php mc_generate(); ?>
@@ -68,7 +68,7 @@ function my_calendar_help() {
68
 
69
  <div class="ui-sortable meta-box-sortables">
70
  <div class="postbox" id="mc-shortcodes">
71
- <h3><?php _e( 'Shortcode Syntax', 'my-calendar' ); ?></h3>
72
 
73
  <div class="inside">
74
 
@@ -80,7 +80,7 @@ function my_calendar_help() {
80
  <p class="example"><code>[my_calendar format="list" above="nav" below="print" time="week"]</code></p>
81
 
82
  <p>
83
- <?php _e( 'This shortcode shows the one-week view of the calendar on a post or page including all categories and the category key, in a list format. The standard previous/next navigation will be included above the calendar, the link to the print format (if enabled) will be shown below.', 'my-calendar' ); ?>
84
  </p>
85
 
86
  <p>
@@ -198,7 +198,7 @@ function my_calendar_help() {
198
 
199
  <div class="ui-sortable meta-box-sortables" id="icons">
200
  <div class="postbox">
201
- <h3><?php _e( 'Category Icons', 'my-calendar' ); ?></h3>
202
 
203
  <div class="inside">
204
  <p>
@@ -215,7 +215,7 @@ function my_calendar_help() {
215
 
216
  <div class="ui-sortable meta-box-sortables" id="mc-styles">
217
  <div class="postbox">
218
- <h3><?php _e( 'Custom Styles', 'my-calendar' ); ?></h3>
219
 
220
  <div class="inside">
221
  <p>
@@ -235,7 +235,7 @@ function my_calendar_help() {
235
 
236
  <div class="ui-sortable meta-box-sortables" id="templates">
237
  <div class="postbox">
238
- <h3 id="template"><?php _e( 'Template Tags', 'my-calendar' ); ?></h3>
239
 
240
  <div class="inside">
241
  <p>
@@ -487,11 +487,18 @@ function my_calendar_help() {
487
 
488
  <div class="ui-sortable meta-box-sortables" id="get-support">
489
  <div class="postbox">
490
- <h3 id="support"><?php _e( 'Get Plug-in Support', 'my-calendar' ); ?></h3>
491
 
492
  <div class="inside">
 
 
 
 
 
 
 
493
  <?php if ( current_user_can( 'administrator' ) ) { ?>
494
- <?php jcd_get_support_form(); ?>
495
  <?php } else { ?>
496
  <?php _e( 'My Calendar support requests can only be sent by administrators.', 'my-calendar' ); ?>
497
  <?php } ?>
@@ -500,7 +507,7 @@ function my_calendar_help() {
500
 
501
  <div class="ui-sortable meta-box-sortables" id="notes">
502
  <div class="postbox">
503
- <h3 id="help"><?php _e( 'Helpful Information', 'my-calendar' ); ?></h3>
504
 
505
  <div class="inside">
506
  <p>
7
  ?>
8
 
9
  <div class="wrap jd-my-calendar">
10
+ <h1><?php _e( 'How to use My Calendar', 'my-calendar' ); ?></h1>
11
 
12
  <div class="postbox-container jcd-wide">
13
  <div class="metabox-holder">
14
 
15
  <div class="ui-sortable meta-box-sortables" id="get-started">
16
  <div class="postbox">
17
+ <h2 id="help"><?php _e( 'Getting Started', 'my-calendar' ); ?></h2>
18
 
19
  <div class="inside">
20
  <ul>
41
 
42
  <div class="ui-sortable meta-box-sortables" id="mc-generator">
43
  <div class="postbox">
44
+ <h2 id="generator"><?php _e( "My Calendar Shortcode Generator", 'my-calendar' ); ?></h2>
45
 
46
  <div class="inside mc-tabs">
47
  <?php mc_generate(); ?>
68
 
69
  <div class="ui-sortable meta-box-sortables">
70
  <div class="postbox" id="mc-shortcodes">
71
+ <h2><?php _e( 'Shortcode Syntax', 'my-calendar' ); ?></h2>
72
 
73
  <div class="inside">
74
 
80
  <p class="example"><code>[my_calendar format="list" above="nav" below="print" time="week"]</code></p>
81
 
82
  <p>
83
+ <?php _e( 'This shortcode shows the one-week view of the calendar on a post or page including all categories and the category key, in a list format. The standard previous/next navigation will be included above the calendar, the link to the print format will be shown below.', 'my-calendar' ); ?>
84
  </p>
85
 
86
  <p>
198
 
199
  <div class="ui-sortable meta-box-sortables" id="icons">
200
  <div class="postbox">
201
+ <h2><?php _e( 'Category Icons', 'my-calendar' ); ?></h2>
202
 
203
  <div class="inside">
204
  <p>
215
 
216
  <div class="ui-sortable meta-box-sortables" id="mc-styles">
217
  <div class="postbox">
218
+ <h2><?php _e( 'Custom Styles', 'my-calendar' ); ?></h2>
219
 
220
  <div class="inside">
221
  <p>
235
 
236
  <div class="ui-sortable meta-box-sortables" id="templates">
237
  <div class="postbox">
238
+ <h2 id="template"><?php _e( 'Template Tags', 'my-calendar' ); ?></h2>
239
 
240
  <div class="inside">
241
  <p>
487
 
488
  <div class="ui-sortable meta-box-sortables" id="get-support">
489
  <div class="postbox">
490
+ <h2 id="support"><?php _e( 'Get Plug-in Support', 'my-calendar' ); ?></h2>
491
 
492
  <div class="inside">
493
+ <div class='mc-support-me'>
494
+ <p>
495
+ <?php printf(
496
+ __( 'Please, consider a <a href="%s">donation</a> or a <a href="%s">purchase</a> to support My Calendar!', 'my-calendar' )
497
+ , "https://www.joedolson.com/donate/", "https://www.joedolson.com/my-calendar/pro/" ); ?>
498
+ </p>
499
+ </div>
500
  <?php if ( current_user_can( 'administrator' ) ) { ?>
501
+ <?php mc_get_support_form(); ?>
502
  <?php } else { ?>
503
  <?php _e( 'My Calendar support requests can only be sent by administrators.', 'my-calendar' ); ?>
504
  <?php } ?>
507
 
508
  <div class="ui-sortable meta-box-sortables" id="notes">
509
  <div class="postbox">
510
+ <h2 id="info"><?php _e( 'Helpful Information', 'my-calendar' ); ?></h2>
511
 
512
  <div class="inside">
513
  <p>
my-calendar-install.php CHANGED
@@ -24,14 +24,14 @@ $defaults = array(
24
  )
25
  );
26
 
27
- $grid_template = addslashes( '<span class="event-time dtstart value-title" title="{dtstart}">{time}<span class="time-separator"> - </span>{endtime before="<span class=\'end-time dtend\' title=\'{dtend}\'>" after="</span>"}</span>
28
 
29
  <div class="sub-details">
30
  {hcard}
31
  {details before="<p class=\'mc_details\'>" after="</p>"}
32
  <p><a href="{linking}" class="event-link external"><span class="screen-reader-text">More information about </span>{title}</a></p></div>' );
33
 
34
- $list_template = addslashes( '<span class="event-time dtstart value-title" title="{dtstart}">{time}<span class="time-separator"> - </span>{endtime before="<span class=\'end-time dtend value-title\' title=\'{dtend}\'>" after="</span>"}</span>
35
 
36
  <h3 class="event-title">{title}</h3>
37
 
@@ -40,7 +40,7 @@ $list_template = addslashes( '<span class="event-time dtstart value-title" title
40
  {details before="<p class=\'mc_details\'>" after="</p>"}
41
  <p><a href="{linking}" class="event-link external"><span class="screen-reader-text">More information about </span>{title}</a></p></div>' );
42
 
43
- $mini_template = addslashes( '<span class="event-time dtstart value-title" title="{dtstart}">{time}<span class="time-separator"> - </span>{endtime before="<span class=\'end-time dtend value-title\' title=\'{dtend}\'>" after="</span>"}</span>
44
 
45
  <h3 class="event-title">{title}</h3>
46
 
@@ -49,7 +49,7 @@ $mini_template = addslashes( '<span class="event-time dtstart value-title" title
49
  {hcard}
50
  <p><a href="{linking}" class="event-link external"><span class="screen-reader-text">More information about </span>{title}</a></p></div>' );
51
 
52
- $single_template = addslashes( '<span class="event-time dtstart value-title" title="{dtstart}">{time}<span class="time-separator"> - </span><span class="end-time dtend value-title" title="{dtend}">{endtime}</span></span>
53
 
54
  <div class="sub-details">
55
  {hcard}
@@ -103,7 +103,7 @@ $initial_db = "CREATE TABLE " . my_calendar_table() . " (
103
  event_tickets VARCHAR(255) NOT NULL,
104
  event_time TIME,
105
  event_endtime TIME,
106
- event_recur CHAR(2),
107
  event_repeats INT(3),
108
  event_status INT(1) NOT NULL DEFAULT '1',
109
  event_author BIGINT(20) UNSIGNED,
@@ -113,14 +113,14 @@ $initial_db = "CREATE TABLE " . my_calendar_table() . " (
113
  event_post BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
114
  event_link_expires TINYINT(1) NOT NULL,
115
  event_location BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
116
- event_label VARCHAR(60) NOT NULL,
117
- event_street VARCHAR(60) NOT NULL,
118
- event_street2 VARCHAR(60) NOT NULL,
119
- event_city VARCHAR(60) NOT NULL,
120
- event_state VARCHAR(60) NOT NULL,
121
  event_postcode VARCHAR(10) NOT NULL,
122
  event_region VARCHAR(255) NOT NULL,
123
- event_country VARCHAR(60) NOT NULL,
124
  event_url TEXT,
125
  event_longitude FLOAT(10,6) NOT NULL DEFAULT '0',
126
  event_latitude FLOAT(10,6) NOT NULL DEFAULT '0',
@@ -164,15 +164,15 @@ $initial_cat_db = "CREATE TABLE " . my_calendar_categories_table() . " (
164
 
165
  $initial_loc_db = "CREATE TABLE " . my_calendar_locations_table() . " (
166
  location_id INT(11) NOT NULL AUTO_INCREMENT,
167
- location_label VARCHAR(60) NOT NULL,
168
- location_street VARCHAR(60) NOT NULL,
169
- location_street2 VARCHAR(60) NOT NULL,
170
- location_city VARCHAR(60) NOT NULL,
171
- location_state VARCHAR(60) NOT NULL,
172
  location_postcode VARCHAR(10) NOT NULL,
173
  location_region VARCHAR(255) NOT NULL,
174
  location_url TEXT,
175
- location_country VARCHAR(60) NOT NULL,
176
  location_longitude FLOAT(10,6) NOT NULL DEFAULT '0',
177
  location_latitude FLOAT(10,6) NOT NULL DEFAULT '0',
178
  location_zoom INT(2) NOT NULL DEFAULT '14',
@@ -184,41 +184,13 @@ $initial_loc_db = "CREATE TABLE " . my_calendar_locations_table() . " (
184
 
185
  function mc_default_settings() {
186
  global $initial_db, $initial_occur_db, $initial_loc_db, $initial_cat_db, $grid_template, $rss_template, $list_template, $mini_template, $single_template, $mc_version, $defaults;
187
-
188
- add_option( 'mc_location_access', array(
189
- '1' => __( 'Accessible Entrance', 'my-calendar' ),
190
- '2' => __( 'Accessible Parking Designated', 'my-calendar' ),
191
- '3' => __( 'Accessible Restrooms', 'my-calendar' ),
192
- '4' => __( 'Accessible Seating', 'my-calendar' ),
193
- '5' => __( 'Accessible Transportation Available', 'my-calendar' ),
194
- '6' => __( 'Wheelchair Accessible', 'my-calendar' ),
195
- '7' => __( 'Courtesy Wheelchairs', 'my-calendar' ),
196
- '8' => __( 'Bariatric Seating Available', 'my-calendar' ),
197
- '9' => __( 'Elevator to all public areas', 'my-calendar' ),
198
- '10' => __( 'Braille Signage', 'my-calendar' ),
199
- '11' => __( 'Fragrance-Free Policy', 'my-calendar' ),
200
- '12' => __( 'Other', 'my-calendar' )
201
- ) );
202
- add_option( 'mc_event_access', array(
203
- '1' => __( 'Audio Description', 'my-calendar' ),
204
- '2' => __( 'ASL Interpretation', 'my-calendar' ),
205
- '3' => __( 'ASL Interpretation with voicing', 'my-calendar' ),
206
- '4' => __( 'Deaf-Blind ASL', 'my-calendar' ),
207
- '5' => __( 'Real-time Captioning', 'my-calendar' ),
208
- '6' => __( 'Scripted Captioning', 'my-calendar' ),
209
- '7' => __( 'Assisted Listening Devices', 'my-calendar' ),
210
- '8' => __( 'Tactile/Touch Tour', 'my-calendar' ),
211
- '9' => __( 'Braille Playbill', 'my-calendar' ),
212
- '10' => __( 'Large Print Playbill', 'my-calendar' ),
213
- '11' => __( 'Sensory Friendly', 'my-calendar' ),
214
- '12' => __( 'Other', 'my-calendar' )
215
- ) );
216
  add_option( 'mc_display_author', 'false' );
217
  add_option( 'mc_version', $mc_version );
218
  add_option( 'mc_use_styles', 'false' );
219
  add_option( 'mc_show_months', 1 );
220
  add_option( 'mc_show_map', 'true' );
221
  add_option( 'mc_show_address', 'false' );
 
222
  add_option( 'mc_calendar_javascript', 0 );
223
  add_option( 'mc_list_javascript', 0 );
224
  add_option( 'mc_mini_javascript', 0 );
@@ -299,7 +271,7 @@ function mc_default_settings() {
299
 
300
  function mc_generate_calendar_page( $slug ) {
301
  global $current_user;
302
- get_currentuserinfo();
303
  if ( ! is_page( $slug ) ) {
304
  $page = array(
305
  'post_title' => __( 'My Calendar', 'my-calendar' ),
24
  )
25
  );
26
 
27
+ $grid_template = addslashes( '<span class="event-time value-title" title="{dtstart}">{time}<span class="time-separator"> - </span>{endtime before="<span class=\'end-time\' title=\'{dtend}\'>" after="</span>"}</span>
28
 
29
  <div class="sub-details">
30
  {hcard}
31
  {details before="<p class=\'mc_details\'>" after="</p>"}
32
  <p><a href="{linking}" class="event-link external"><span class="screen-reader-text">More information about </span>{title}</a></p></div>' );
33
 
34
+ $list_template = addslashes( '<span class="event-time value-title" title="{dtstart}">{time}<span class="time-separator"> - </span>{endtime before="<span class=\'end-time value-title\' title=\'{dtend}\'>" after="</span>"}</span>
35
 
36
  <h3 class="event-title">{title}</h3>
37
 
40
  {details before="<p class=\'mc_details\'>" after="</p>"}
41
  <p><a href="{linking}" class="event-link external"><span class="screen-reader-text">More information about </span>{title}</a></p></div>' );
42
 
43
+ $mini_template = addslashes( '<span class="event-time value-title" title="{dtstart}">{time}<span class="time-separator"> - </span>{endtime before="<span class=\'end-time value-title\' title=\'{dtend}\'>" after="</span>"}</span>
44
 
45
  <h3 class="event-title">{title}</h3>
46
 
49
  {hcard}
50
  <p><a href="{linking}" class="event-link external"><span class="screen-reader-text">More information about </span>{title}</a></p></div>' );
51
 
52
+ $single_template = addslashes( '<span class="event-time value-title" title="{dtstart}">{time}<span class="time-separator"> - </span><span class="end-time value-title" title="{dtend}">{endtime}</span></span>
53
 
54
  <div class="sub-details">
55
  {hcard}
103
  event_tickets VARCHAR(255) NOT NULL,
104
  event_time TIME,
105
  event_endtime TIME,
106
+ event_recur CHAR(3),
107
  event_repeats INT(3),
108
  event_status INT(1) NOT NULL DEFAULT '1',
109
  event_author BIGINT(20) UNSIGNED,
113
  event_post BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
114
  event_link_expires TINYINT(1) NOT NULL,
115
  event_location BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
116
+ event_label VARCHAR(255) NOT NULL,
117
+ event_street VARCHAR(255) NOT NULL,
118
+ event_street2 VARCHAR(255) NOT NULL,
119
+ event_city VARCHAR(255) NOT NULL,
120
+ event_state VARCHAR(255) NOT NULL,
121
  event_postcode VARCHAR(10) NOT NULL,
122
  event_region VARCHAR(255) NOT NULL,
123
+ event_country VARCHAR(255) NOT NULL,
124
  event_url TEXT,
125
  event_longitude FLOAT(10,6) NOT NULL DEFAULT '0',
126
  event_latitude FLOAT(10,6) NOT NULL DEFAULT '0',
164
 
165
  $initial_loc_db = "CREATE TABLE " . my_calendar_locations_table() . " (
166
  location_id INT(11) NOT NULL AUTO_INCREMENT,
167
+ location_label VARCHAR(255) NOT NULL,
168
+ location_street VARCHAR(255) NOT NULL,
169
+ location_street2 VARCHAR(255) NOT NULL,
170
+ location_city VARCHAR(255) NOT NULL,
171
+ location_state VARCHAR(255) NOT NULL,
172
  location_postcode VARCHAR(10) NOT NULL,
173
  location_region VARCHAR(255) NOT NULL,
174
  location_url TEXT,
175
+ location_country VARCHAR(255) NOT NULL,
176
  location_longitude FLOAT(10,6) NOT NULL DEFAULT '0',
177
  location_latitude FLOAT(10,6) NOT NULL DEFAULT '0',
178
  location_zoom INT(2) NOT NULL DEFAULT '14',
184
 
185
  function mc_default_settings() {
186
  global $initial_db, $initial_occur_db, $initial_loc_db, $initial_cat_db, $grid_template, $rss_template, $list_template, $mini_template, $single_template, $mc_version, $defaults;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  add_option( 'mc_display_author', 'false' );
188
  add_option( 'mc_version', $mc_version );
189
  add_option( 'mc_use_styles', 'false' );
190
  add_option( 'mc_show_months', 1 );
191
  add_option( 'mc_show_map', 'true' );
192
  add_option( 'mc_show_address', 'false' );
193
+ add_option( 'mc_display_more', 'true' );
194
  add_option( 'mc_calendar_javascript', 0 );
195
  add_option( 'mc_list_javascript', 0 );
196
  add_option( 'mc_mini_javascript', 0 );
271
 
272
  function mc_generate_calendar_page( $slug ) {
273
  global $current_user;
274
+ $current_user = wp_get_current_user();
275
  if ( ! is_page( $slug ) ) {
276
  $page = array(
277
  'post_title' => __( 'My Calendar', 'my-calendar' ),
my-calendar-limits.php CHANGED
@@ -74,6 +74,28 @@ function mc_select_category( $category, $type = 'event', $group = 'events' ) {
74
  }
75
  }
76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  function mc_select_author( $author, $type = 'event' ) {
78
  $author = urldecode( $author );
79
  if ( $author == '' || $author == 'all' || $author == 'default' || $author == null ) {
@@ -296,7 +318,7 @@ function mc_limit_string( $type = '', $ltype = '', $lvalue = '' ) {
296
  }
297
 
298
  function mc_access_limit( $access ) {
299
- $options = get_option( 'mc_event_access' );
300
  $format = ( isset( $options[ $access ] ) ) ? esc_sql( $options[ $access ] ) : false;
301
  $limit_string = ( $format ) ? " event_access LIKE '%$format%' AND" : '';
302
 
74
  }
75
  }
76
 
77
+ function mc_prepare_search_query( $query ) {
78
+ $query = esc_sql( $query );
79
+ $db_type = mc_get_db_type();
80
+ if ( $query != '' ) {
81
+ if ( $db_type == 'MyISAM' ) {
82
+ $search = " AND MATCH(" . apply_filters( 'mc_search_fields', 'event_title,event_desc,event_short,event_label,event_city,event_postcode,event_registration' ) . ") AGAINST ( '$query' IN BOOLEAN MODE ) ";
83
+ } else {
84
+ $search = " AND event_title LIKE '%$query%' OR
85
+ event_desc LIKE '%$query%' OR
86
+ event_short LIKE '%$query%' OR
87
+ event_label LIKE '%$query%' OR
88
+ event_city LIKE '%$query%' OR
89
+ event_postcode LIKE '%$query%' OR
90
+ event_registration LIKE '%$query%' ";
91
+ }
92
+ } else {
93
+ $search = '';
94
+ }
95
+
96
+ return $search;
97
+ }
98
+
99
  function mc_select_author( $author, $type = 'event' ) {
100
  $author = urldecode( $author );
101
  if ( $author == '' || $author == 'all' || $author == 'default' || $author == null ) {
318
  }
319
 
320
  function mc_access_limit( $access ) {
321
+ $options = mc_event_access();
322
  $format = ( isset( $options[ $access ] ) ) ? esc_sql( $options[ $access ] ) : false;
323
  $limit_string = ( $format ) ? " event_access LIKE '%$format%' AND" : '';
324
 
my-calendar-locations.php CHANGED
@@ -59,6 +59,7 @@ function mc_mass_delete_locations() {
59
  function mc_insert_location( $add ) {
60
  global $wpdb;
61
  $mcdb = $wpdb;
 
62
  $formats = array( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%f', '%f', '%d', '%s', '%s', '%s' );
63
  $results = $mcdb->insert( my_calendar_locations_table(), $add, $formats );
64
 
@@ -68,6 +69,7 @@ function mc_insert_location( $add ) {
68
  function mc_modify_location( $update, $where ) {
69
  global $wpdb;
70
  $mcdb = $wpdb;
 
71
  $formats = array( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%f', '%f', '%d', '%s', '%s', '%s' );
72
  $results = $mcdb->update( my_calendar_locations_table(), $update, $where, $formats, '%d' );
73
 
@@ -144,10 +146,12 @@ function my_calendar_manage_locations() {
144
  'location_phone2' => $_POST['location_phone2'],
145
  'location_access' => isset( $_POST['location_access'] ) ? serialize( $_POST['location_access'] ) : ''
146
  );
 
147
  $where = array(
148
  'location_id' => (int) $_POST['location_id']
149
  );
150
  $results = mc_modify_location( $update, $where );
 
151
  do_action( 'mc_modify_location', $where, $update );
152
  if ( $results === false ) {
153
  echo "<div class=\"error\"><p><strong>" . __( 'Location could not be edited.', 'my-calendar' ) . "</strong></p></div>";
@@ -177,16 +181,16 @@ function mc_show_location_form( $view = 'add', $curID = '' ) {
177
  $has_data = ( empty( $cur_loc ) ) ? false : true;
178
  if ( $view == 'add' ) {
179
  ?>
180
- <h2><?php _e( 'Add New Location', 'my-calendar' ); ?></h2>
181
  <?php } else { ?>
182
- <h2><?php _e( 'Edit Location', 'my-calendar' ); ?></h2>
183
  <?php } ?>
184
  <div class="postbox-container jcd-wide">
185
  <div class="metabox-holder">
186
 
187
  <div class="ui-sortable meta-box-sortables">
188
  <div class="postbox">
189
- <h3><?php _e( 'Location Editor', 'my-calendar' ); ?></h3>
190
 
191
  <div class="inside location_form">
192
  <form id="my-calendar" method="post"
@@ -227,7 +231,7 @@ function mc_show_location_form( $view = 'add', $curID = '' ) {
227
  <?php } ?>
228
  <div class="ui-sortable meta-box-sortables">
229
  <div class="postbox">
230
- <h3><?php _e( 'Manage Locations', 'my-calendar' ); ?></h3>
231
 
232
  <div class="inside">
233
  <?php mc_manage_locations(); ?>
@@ -514,7 +518,7 @@ function mc_locations_fields( $has_data, $data, $context = 'location' ) {
514
  <fieldset>
515
  <legend>' . __( 'Location Accessibility', 'my-calendar' ) . '</legend>
516
  <ul class="accessibility-features checkboxes">';
517
- $access = apply_filters( 'mc_venue_accessibility', get_option( 'mc_location_access' ) );
518
  $access_list = '';
519
  if ( $has_data ) {
520
  if ( $context == 'location' ) {
@@ -544,6 +548,26 @@ function mc_locations_fields( $has_data, $data, $context = 'location' ) {
544
  return $return;
545
  }
546
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
547
  // get a specific field with an location ID
548
  function mc_location_data( $field, $id ) {
549
  if ( $id ) {
59
  function mc_insert_location( $add ) {
60
  global $wpdb;
61
  $mcdb = $wpdb;
62
+ $add = array_map( 'wp_kses_post', $add );
63
  $formats = array( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%f', '%f', '%d', '%s', '%s', '%s' );
64
  $results = $mcdb->insert( my_calendar_locations_table(), $add, $formats );
65
 
69
  function mc_modify_location( $update, $where ) {
70
  global $wpdb;
71
  $mcdb = $wpdb;
72
+ $update = array_map( 'wp_kses_post', $update );
73
  $formats = array( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%f', '%f', '%d', '%s', '%s', '%s' );
74
  $results = $mcdb->update( my_calendar_locations_table(), $update, $where, $formats, '%d' );
75
 
146
  'location_phone2' => $_POST['location_phone2'],
147
  'location_access' => isset( $_POST['location_access'] ) ? serialize( $_POST['location_access'] ) : ''
148
  );
149
+
150
  $where = array(
151
  'location_id' => (int) $_POST['location_id']
152
  );
153
  $results = mc_modify_location( $update, $where );
154
+
155
  do_action( 'mc_modify_location', $where, $update );
156
  if ( $results === false ) {
157
  echo "<div class=\"error\"><p><strong>" . __( 'Location could not be edited.', 'my-calendar' ) . "</strong></p></div>";
181
  $has_data = ( empty( $cur_loc ) ) ? false : true;
182
  if ( $view == 'add' ) {
183
  ?>
184
+ <h1><?php _e( 'Add New Location', 'my-calendar' ); ?></h1>
185
  <?php } else { ?>
186
+ <h1><?php _e( 'Edit Location', 'my-calendar' ); ?></h1>
187
  <?php } ?>
188
  <div class="postbox-container jcd-wide">
189
  <div class="metabox-holder">
190
 
191
  <div class="ui-sortable meta-box-sortables">
192
  <div class="postbox">
193
+ <h2><?php _e( 'Location Editor', 'my-calendar' ); ?></h2>
194
 
195
  <div class="inside location_form">
196
  <form id="my-calendar" method="post"
231
  <?php } ?>
232
  <div class="ui-sortable meta-box-sortables">
233
  <div class="postbox">
234
+ <h2><?php _e( 'Manage Locations', 'my-calendar' ); ?></h2>
235
 
236
  <div class="inside">
237
  <?php mc_manage_locations(); ?>
518
  <fieldset>
519
  <legend>' . __( 'Location Accessibility', 'my-calendar' ) . '</legend>
520
  <ul class="accessibility-features checkboxes">';
521
+ $access = apply_filters( 'mc_venue_accessibility', mc_location_access() );
522
  $access_list = '';
523
  if ( $has_data ) {
524
  if ( $context == 'location' ) {
548
  return $return;
549
  }
550
 
551
+ function mc_location_access() {
552
+ $location_access = apply_filters( 'mc_location_access_choices', array(
553
+ '1' => __( 'Accessible Entrance', 'my-calendar' ),
554
+ '2' => __( 'Accessible Parking Designated', 'my-calendar' ),
555
+ '3' => __( 'Accessible Restrooms', 'my-calendar' ),
556
+ '4' => __( 'Accessible Seating', 'my-calendar' ),
557
+ '5' => __( 'Accessible Transportation Available', 'my-calendar' ),
558
+ '6' => __( 'Wheelchair Accessible', 'my-calendar' ),
559
+ '7' => __( 'Courtesy Wheelchairs', 'my-calendar' ),
560
+ '8' => __( 'Bariatric Seating Available', 'my-calendar' ),
561
+ '9' => __( 'Elevator to all public areas', 'my-calendar' ),
562
+ '10' => __( 'Braille Signage', 'my-calendar' ),
563
+ '11' => __( 'Fragrance-Free Policy', 'my-calendar' ),
564
+ '12' => __( 'Other', 'my-calendar' )
565
+ )
566
+ );
567
+
568
+ return $location_access;
569
+ }
570
+
571
  // get a specific field with an location ID
572
  function mc_location_data( $field, $id ) {
573
  if ( $id ) {
my-calendar-output.php CHANGED
@@ -149,9 +149,11 @@ function mc_category_icon_title( $title, $post_id = null ) {
149
  if ( is_singular( 'mc-events' ) && in_the_loop() ) {
150
  if ( $post_id ) {
151
  $event_id = ( isset( $_GET['mc_id'] ) && is_numeric( $_GET['mc_id'] ) ) ? $_GET['mc_id'] : get_post_meta( $post_id, '_mc_event_id', true );
152
- $event = mc_get_event_core( $event_id );
153
- $icon = mc_category_icon( $event );
154
- $title = $icon . ' ' . $title;
 
 
155
  }
156
  }
157
 
@@ -175,10 +177,10 @@ function my_calendar_draw_event( $event, $type = "calendar", $process_date, $tim
175
  $header = $address = $more = $author = $list_title = $title = $output = $container = $short = $description = $link = $vcal = $gcal = '';
176
  $date_format = ( get_option( 'mc_date_format' ) != '' ) ? get_option( 'mc_date_format' ) : get_option( 'date_format' );
177
  $data = mc_create_tags( $event );
178
- $templates = get_option( 'mc_templates' );
179
  $details = '';
180
  if ( mc_show_details( $time, $type ) ) {
181
  $details = apply_filters( 'mc_custom_template', false, $data, $event, $type, $process_date, $time, $template );
 
182
  if ( $details === false ) {
183
  if ( $template != '' && mc_file_exists( sanitize_file_name( $template ) ) ) {
184
  $template = @file_get_contents( mc_get_file( sanitize_file_name( $template ) ) );
@@ -186,26 +188,26 @@ function my_calendar_draw_event( $event, $type = "calendar", $process_date, $tim
186
  } else {
187
  switch ( $type ) {
188
  case 'mini':
189
- $template = $templates['mini'];
190
  if ( get_option( 'mc_use_mini_template' ) == 1 ) {
191
  $details = jd_draw_template( $data, $template );
192
  }
193
  break;
194
  case 'list':
195
- $template = $templates['list'];
196
  if ( get_option( 'mc_use_list_template' ) == 1 ) {
197
  $details = jd_draw_template( $data, $template );
198
  }
199
  break;
200
  case 'single':
201
- $template = $templates['details'];
202
  if ( get_option( 'mc_use_details_template' ) == 1 ) {
203
  $details = jd_draw_template( $data, $template );
204
  }
205
  break;
206
  case 'calendar':
207
  default:
208
- $template = $templates['grid'];
209
  if ( get_option( 'mc_use_grid_template' ) == 1 ) {
210
  $details = jd_draw_template( $data, $template );
211
  }
@@ -216,6 +218,7 @@ function my_calendar_draw_event( $event, $type = "calendar", $process_date, $tim
216
  $mc_display_author = get_option( 'mc_display_author' );
217
  $display_map = get_option( 'mc_show_map' );
218
  $display_address = get_option( 'mc_show_address' );
 
219
  $uid = 'mc_' . $event->occur_id;
220
  $day_id = date( 'd', strtotime( $process_date ) );
221
 
@@ -224,18 +227,18 @@ function my_calendar_draw_event( $event, $type = "calendar", $process_date, $tim
224
  $header .= "<div id='$uid-$day_id-$type' class='mc-$uid $type-event " . "mc_" . sanitize_title( $event->category_name ) . " vevent'>\n";
225
 
226
  switch ( $type ) {
227
- case 'calendar' : $title_template = ( $templates['title'] == '' ) ? '{title}' : $templates['title']; break;
228
- case 'list' : $title_template = ( $templates['title_list'] == '' ) ? '{title}' : $templates['title_list']; break;
229
- case 'single' : $title_template = ( $templates['title_solo'] == '' ) ? '{title}' : $templates['title_solo']; break;
230
- default: $title_template = ( $templates['title'] == '' ) ? '{title}' : $templates['title'];
231
  }
232
-
233
  $event_title = jd_draw_template( $data, $title_template );
234
- $event_title = ( $event_title == '' ) ? jd_draw_template( $data, '{title}' ) : $event_title; //prevent empty titles
235
 
236
  if ( strpos( $event_title, 'href' ) === false && $type != 'mini' && $type != 'list' ) {
237
  if ( get_option( 'mc_open_uri' ) == 'true' ) {
238
- $details_link = mc_get_details_link( $event );
239
  $wrap = "<a href='$details_link' class='url summary$has_image'>";
240
  $balance = "</a>";
241
  } else {
@@ -248,12 +251,12 @@ function my_calendar_draw_event( $event, $type = "calendar", $process_date, $tim
248
  $current_date = date_i18n( apply_filters( 'mc_date_format', $date_format, 'details' ), strtotime( $process_date ) );
249
  $group_class = ( $event->event_span == 1 ) ? ' multidate group' . $event->event_group_id : '';
250
  $heading_level = apply_filters( 'mc_heading_level_table', 'h3', $type, $time, $template );
251
- $inner_heading = apply_filters( 'mc_heading_inner_title', $wrap . $image . trim( $event_title ) . $balance, $event_title );
252
  $header .= ( $type != 'single' && $type != 'list' ) ? "<$heading_level class='event-title summary$group_class' id='$uid-$day_id-$type-title'>$inner_heading</$heading_level>\n" : '';
253
  $event_title = ( $type == 'single' ) ? apply_filters( 'mc_single_event_title', $event_title, $event ) : $event_title;
254
  $title = ( $type == 'single' && ! is_singular( 'mc-events' ) ) ? "<h2 class='event-title summary'>$image $event_title</h2>\n" : '';
255
  $title = apply_filters( 'mc_event_title', $title, $event, $event_title, $image );
256
- $header .= $title;
257
  $close_image = apply_filters( 'mc_close_button', "<img src=\"" . plugin_dir_url( __FILE__ ) . "images/event-close.png\" alt='" . __( 'Close', 'my-calendar' ) . "' />" );
258
  $close_button = "<button aria-controls='$uid-$day_id-$type-details' class='mc-toggle close'>$close_image</button>";
259
 
@@ -266,7 +269,7 @@ function my_calendar_draw_event( $event, $type = "calendar", $process_date, $tim
266
  $address = mc_hcard( $event, $display_address, $display_map );
267
  }
268
  // end vcard
269
- $time = mc_time_html( $event, $type, $current_date );
270
  if ( $type == "list" ) {
271
  $heading_level = apply_filters( 'mc_heading_level_list', 'h3', $type, $time, $template );
272
  $list_title = "<$heading_level class='event-title summary' id='$uid-$day_id-$type-title'>$image" . $event_title . "</$heading_level>\n";
@@ -278,11 +281,11 @@ function my_calendar_draw_event( $event, $type = "calendar", $process_date, $tim
278
  }
279
  }
280
 
281
- if ( ! isset( $_GET['mc_id'] ) ) {
282
  $details_label = mc_get_details_label( $event, $data );
283
  $details_link = mc_get_details_link( $event );
284
  if ( _mc_is_url( $details_link ) ) {
285
- $more = "<p class='mc_details'><a href='$details_link'>$details_label</a></p>\n";
286
  } else {
287
  $more = '';
288
  }
@@ -298,7 +301,7 @@ function my_calendar_draw_event( $event, $type = "calendar", $process_date, $tim
298
 
299
  if ( function_exists( 'my_calendar_generate_vcal' ) && get_option( 'mc_show_event_vcal' ) == 'true' ) {
300
  $url = add_query_arg( 'vcal', $uid, home_url() );
301
- $vcal_link = "<p class='ical'><a rel='nofollow' href='$url'>" . __( 'iCal', 'my-calendar' ) . "</a></p>\n";
302
  $vcal = $vcal_link;
303
  }
304
  $sizes = get_intermediate_image_sizes();
@@ -315,21 +318,21 @@ function my_calendar_draw_event( $event, $type = "calendar", $process_date, $tim
315
  $image = ( $event->event_image != '' ) ? "<img src='$event->event_image' alt='' class='mc-image photo' />" : '';
316
  }
317
  if ( get_option( 'mc_desc' ) == 'true' || $type == 'single' ) {
318
- $description = wpautop( stripcslashes( $event->event_desc ), 1 );
319
  $description = "<div class='longdesc'>$description</div>";
320
  }
321
  if ( get_option( 'mc_short' ) == 'true' && $type != 'single' ) {
322
- $short = wpautop( stripcslashes( $event->event_short ), 1 );
323
  $short = "<div class='shortdesc'>$short</div>";
324
  }
325
 
326
  if ( get_option( 'mc_event_registration' ) == 'true' ) {
327
  switch ( $event->event_open ) {
328
  case '0':
329
- $status = get_option( 'mc_event_closed' );
330
  break;
331
  case '1':
332
- $status = get_option( 'mc_event_open' );
333
  break;
334
  case '2':
335
  $status = '';
@@ -343,7 +346,7 @@ function my_calendar_draw_event( $event, $type = "calendar", $process_date, $tim
343
 
344
  $status = ( $status != '' ) ? "<p>$status</p>" : '';
345
  $status = apply_filters( 'mc_registration_state', $status, $event );
346
- $return = ( $type == 'single' ) ? "<p><a href='" . get_option( 'mc_uri' ) . "'>" . __( 'View full calendar', 'my-calendar' ) . "</a></p>" : '';
347
 
348
  if ( ! mc_show_details( $time, $type ) ) {
349
  $description = $short = $status = '';
@@ -358,13 +361,13 @@ function my_calendar_draw_event( $event, $type = "calendar", $process_date, $tim
358
  if ( $event_link != '' && get_option( 'mc_event_link' ) != 'false' ) {
359
  $is_external = mc_external_link( $event_link );
360
  $external_class = ( $is_external ) ? "class='$type-link external'" : "class='$type-link'";
361
- $link_template = ( isset( $templates['link'] ) ) ? $templates['link'] : '{title}';
362
  $link_text = jd_draw_template( $data, $link_template );
363
- $link = "<p><a href='$event_link' $external_class>" . $link_text . "</a></p>";
364
  }
365
  $details = "\n"
366
  . $close
367
- . $time
368
  . $list_title
369
  . $image
370
  . "<div class='location'>"
@@ -390,15 +393,15 @@ function my_calendar_draw_event( $event, $type = "calendar", $process_date, $tim
390
  $img_class = ( $image != '' ) ? ' has-image' : ' no-image';
391
  $container = "<div id='$uid-$day_id-$type-details' class='details$img_class' role='alert' aria-labelledby='$uid-$day_id-$type-title'>\n";
392
  $container = apply_filters( 'mc_before_event', $container, $event, $type, $time );
393
- $details = $header . $container . $details;
394
  $details .= apply_filters( 'mc_after_event', '', $event, $type, $time );
395
  $details .= $close; // second close button
396
  $details .= "</div><!--ends .details--></div>";
397
  $details = apply_filters( 'mc_event_content', $details, $event, $type, $time );
398
  } else {
399
- $details = apply_filters( 'mc_before_event', $container, $event, $type, $time )
400
  . $header
401
- . apply_filters( 'mc_after_event', '', $event, $type, $time )
402
  . "</div>";
403
  }
404
 
@@ -413,7 +416,7 @@ add_filter( 'mc_after_event', 'mc_edit_panel', 10, 4 );
413
  function mc_edit_panel( $html, $event, $type, $time ) {
414
  // create edit links
415
  $edit = '';
416
- if ( mc_can_edit_event( $event->event_author ) && get_option( 'mc_remote' ) != 'true' ) {
417
  $mc_id = $event->occur_id;
418
  $groupedit = ( $event->event_group_id != 0 ) ? " &bull; <a href='" . admin_url( "admin.php?page=my-calendar-groups&amp;mode=edit&amp;event_id=$event->event_id&amp;group_id=$event->event_group_id" ) . "' class='group'>" . __( 'Edit Group', 'my-calendar' ) . "</a>\n" : '';
419
  $recurs = str_split( $event->event_recur, 1 );
@@ -446,13 +449,19 @@ function mc_build_date_switcher( $type = 'calendar', $cid = 'all', $time = 'mont
446
  $date_switcher .= '<div class="my-calendar-date-switcher">
447
  <form action="' . $current_url . '" method="get"><div>';
448
  $qsa = array();
449
- parse_str( $_SERVER['QUERY_STRING'], $qsa );
 
 
450
  if ( ! isset( $_GET['cid'] ) ) {
451
  $date_switcher .= '<input type="hidden" name="cid" value="' . esc_attr( $cid ) . '" />';
452
  }
453
  foreach ( $qsa as $name => $argument ) {
454
  $name = esc_attr( strip_tags( $name ) );
455
- $argument = esc_attr( strip_tags( $argument ) );
 
 
 
 
456
  if ( $name != 'month' && $name != 'yr' && $name != 'dy' ) {
457
  $date_switcher .= '<input type="hidden" name="' . $name . '" value="' . $argument . '" />';
458
  }
@@ -460,7 +469,7 @@ function mc_build_date_switcher( $type = 'calendar', $cid = 'all', $time = 'mont
460
  $day_switcher = '';
461
  if ( $time == 'day' ) {
462
  $day_switcher = '
463
- <label class="maybe-hide" for="' . $cid . '-day">' . __( 'Month', 'my-calendar' ) . ':</label> <select id="' . $cid . '-day" name="dy">' . "\n";
464
  for ( $i = 1; $i <= 31; $i++ ) {
465
  $day_switcher .= "<option value='$i'" . mc_day_comparison( $i ) . '>' . $i . '</option>' . "\n";
466
  }
@@ -515,39 +524,43 @@ function my_calendar_print() {
515
  $ltype = ( isset( $_GET['ltype'] ) ) ? $_GET['ltype'] : '';
516
  $lvalue = ( isset( $_GET['lvalue'] ) ) ? $_GET['lvalue'] : '';
517
  header( 'Content-Type: ' . get_bloginfo( 'html_type' ) . '; charset=' . get_bloginfo( 'charset' ) );
518
- echo '<!DOCTYPE html>
519
- <!--[if IE 7]>
520
- <html id="ie7" dir="' . ( is_rtl() ) ? 'rtl' : 'ltr' . '" lang="' . get_bloginfo( 'language' ) . '">
521
- <![endif]-->
522
- <!--[if IE 8]>
523
- <html id="ie8" dir="' . ( is_rtl() ) ? 'rtl' : 'ltr' . '" lang="' . get_bloginfo( 'language' ) . '">
524
- <![endif]-->
525
- <!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!-->
526
- <html dir="' . ( is_rtl() ) ? 'rtl' : 'ltr' . '" lang="' . get_bloginfo( 'language' ) . '">
527
  <!--<![endif]-->
528
  <head>
529
  <meta charset="' . get_bloginfo( 'charset' ) . '" />
530
  <meta name="viewport" content="width=device-width" />
531
  <title>' . get_bloginfo( 'name' ) . ' - ' . __( 'Calendar: Print View', 'my-calendar' ) . '</title>
532
  <meta name="generator" content="My Calendar for WordPress" />
533
- <meta name="robots" content="noindex,nofollow" />';
534
- if ( mc_file_exists( 'css/mc-print.css' ) ) {
535
- $stylesheet = mc_get_file( 'css/mc-print.css', 'url' );
536
- } else {
537
- $stylesheet = $url . "css/mc-print.css";
538
- }
539
- echo "
540
  <!-- Copy mc-print.css to your theme directory if you wish to replace the default print styles -->
541
- <link rel='stylesheet' href='$stylesheet' type='text/css' media='screen,print' />
542
  </head>
543
- <body>\n";
 
544
  echo my_calendar( 'print', 'calendar', $category, $time, $ltype, $lvalue, 'mc-print-view', '', '', null, null, 'none', 'none' );
545
  $return_url = ( get_option( 'mc_uri' ) != '' && ! is_numeric( get_option( 'mc_uri' ) ) ) ? get_option( 'mc_uri' ) : home_url();
546
- $add = $_GET;
 
 
 
 
 
 
 
 
 
547
  unset( $add['cid'] );
548
  unset( $add['feed'] );
549
- $return_url = mc_build_url( $add, array( 'feed', 'cid' ), $return_url );
550
- echo "<p class='return'><a href='$return_url'>" . __( 'Return to site', 'my-calendar' ) . "</a></p>";
 
551
  echo '
552
  </body>
553
  </html>';
@@ -570,8 +583,8 @@ function mc_format_toggle( $format, $toggle, $time ) {
570
  } else {
571
  $toggle = '';
572
  }
573
-
574
- return $toggle;
575
  }
576
 
577
  function mc_time_toggle( $format, $time, $toggle, $day, $month, $year ) {
@@ -615,7 +628,7 @@ function mc_time_toggle( $format, $time, $toggle, $day, $month, $year ) {
615
  $toggle = '';
616
  }
617
 
618
- return $toggle;
619
  }
620
 
621
  function mc_date_array( $timestamp, $period ) {
@@ -693,7 +706,7 @@ function mc_list_title( $events ) {
693
  } else {
694
  $cstate = sprintf( __( " and %d other events", 'my-calendar' ), $count );
695
  }
696
- $title = apply_filters( 'mc_list_event_title_hint', stripcslashes( $now->event_title ), $now ) . "<span class='mc-list-extended'>$cstate</span>";
697
 
698
  return $title;
699
  }
@@ -702,8 +715,7 @@ function mc_search_results( $query ) {
702
  $before = apply_filters( 'mc_past_search_results', 0, 'basic' );
703
  $after = apply_filters( 'mc_future_search_results', 10, 'basic' ); // return only future events, nearest 10
704
  if ( is_string( $query ) ) {
705
- $fields = apply_filters( 'mc_search_fields', 'event_title,event_desc,event_short,event_label,event_city,event_postcode,event_registration' );
706
- $search = " MATCH( $fields ) AGAINST ('$query' IN BOOLEAN MODE) AND ";
707
  $term = $query;
708
  } else {
709
  $search = apply_filters( 'mc_advanced_search', '', $query );
@@ -713,6 +725,7 @@ function mc_search_results( $query ) {
713
  }
714
 
715
  $event_array = mc_get_search_results( $search );
 
716
  //$event_array = mc_flatten_array( $event_array );
717
 
718
  if ( ! empty( $event_array ) ) {
@@ -746,6 +759,7 @@ function mc_flatten_array( $events ) {
746
  function mc_get_search_results( $search ) {
747
  global $wpdb;
748
  $mcdb = $wpdb;
 
749
  if ( get_option( 'mc_remote' ) == 'true' && function_exists( 'mc_remote_db' ) ) {
750
  $mcdb = mc_remote_db();
751
  }
@@ -762,7 +776,8 @@ function mc_get_search_results( $search ) {
762
  $host = ( isset( $search['host'] ) ) ? $search['host'] : null;
763
  $search = ( isset( $search['search'] ) ) ? $search['search'] : '';
764
 
765
- $event_array = my_calendar_events( $from, $to, $category, $ltype, $lvalue, 'search', $author, $host, $search );
 
766
  } else {
767
  $date = date( 'Y', current_time( 'timestamp' ) ) . '-' . date( 'm', current_time( 'timestamp' ) ) . '-' . date( 'd', current_time( 'timestamp' ) );
768
  // if a value is non-zero, I'll grab a handful of extra events so I can throw out holidays and others like that.
@@ -773,18 +788,18 @@ function mc_get_search_results( $search ) {
773
  JOIN " . MY_CALENDAR_TABLE . "
774
  ON (event_id=occur_event_id)
775
  JOIN " . MY_CALENDAR_CATEGORIES_TABLE . "
776
- ON (event_category=category_id) WHERE $search event_approved = 1 AND event_flagged <> 1
777
  AND DATE(occur_begin) < '$date' ORDER BY occur_begin DESC LIMIT 0,$before" );
778
  } else {
779
  $events1 = array();
780
  }
781
  $events3 = $mcdb->get_results( "SELECT *, UNIX_TIMESTAMP(occur_begin) AS ts_occur_begin, UNIX_TIMESTAMP(occur_end) AS ts_occur_end
782
- FROM " . MY_CALENDAR_EVENTS_TABLE . "
783
- JOIN " . MY_CALENDAR_TABLE . "
784
- ON (event_id=occur_event_id)
785
- JOIN " . MY_CALENDAR_CATEGORIES_TABLE . "
786
- ON (event_category=category_id) WHERE $search event_approved = 1 AND event_flagged <> 1
787
- AND DATE(occur_begin) = '$date'" );
788
  if ( $after > 0 ) {
789
  $after = $after + 5;
790
  $events2 = $mcdb->get_results( "SELECT *, UNIX_TIMESTAMP(occur_begin) AS ts_occur_begin, UNIX_TIMESTAMP(occur_end) AS ts_occur_end
@@ -792,7 +807,7 @@ function mc_get_search_results( $search ) {
792
  JOIN " . MY_CALENDAR_TABLE . "
793
  ON (event_id=occur_event_id)
794
  JOIN " . MY_CALENDAR_CATEGORIES_TABLE . "
795
- ON (event_category=category_id) WHERE $search event_approved = 1 AND event_flagged <> 1
796
  AND DATE(occur_begin) > '$date' ORDER BY occur_begin ASC LIMIT 0,$after" );
797
  } else {
798
  $events2 = array();
@@ -868,6 +883,7 @@ function mc_hidden_event() {
868
  }
869
  if ( is_object( $post ) && $post->post_type == 'mc-events' ) {
870
  $event_id = get_post_meta( $post->ID, '_mc_event_id', true );
 
871
  $event = mc_get_first_event( $event_id );
872
  if ( mc_event_is_hidden( $event ) ) {
873
  $do_redirect = true;
@@ -893,21 +909,31 @@ function mc_show_event_template( $content ) {
893
  if ( $post->post_type == 'mc-events' ) {
894
  if ( isset( $_GET['mc_id'] ) ) {
895
  $mc_id = intval( $_GET['mc_id'] );
 
896
  $event = mc_get_event( $mc_id, 'object' );
897
  $date = date( 'Y-m-d', strtotime( $event->occur_begin ) );
898
  $time = date( 'H:i:00', strtotime( $event->occur_begin ) );
899
  } else {
900
  $event_id = get_post_meta( $post->ID, '_mc_event_id', true );
901
- $event = mc_get_first_event( $event_id );
902
- $date = $event->event_begin;
903
- $time = $event->event_time;
 
 
 
 
904
  }
905
  if ( mc_event_is_hidden( $event ) ) {
906
  return $content;
907
  }
908
  if ( get_option( 'mc_use_details_template' ) == 1 ) {
909
- $new_content = apply_filters( 'mc_before_event', '', $event, 'single', $time );
910
- $new_content .= do_shortcode( apply_filters( 'mc_single_event_shortcode', get_post_meta( $post->ID, '_mc_event_shortcode', true ) ) );
 
 
 
 
 
911
  $new_content .= apply_filters( 'mc_after_event', '', $event, 'single', $time );
912
  } else {
913
  $new_content = my_calendar_draw_event( $event, 'single', $date, $time, '' );
@@ -931,7 +957,7 @@ function mc_event_is_hidden( $event ) {
931
  }
932
 
933
  // Actually do the printing of the calendar
934
- function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $lvalue = '', $id = '', $template = '', $content = '', $author = null, $host = null, $above = '', $below = '', $syear = false, $smonth = false, $sday = false ) {
935
  check_my_calendar();
936
  // category key needs to receive the original category settings.
937
  $original_category = $category;
@@ -989,7 +1015,24 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
989
  'smonth' => $smonth,
990
  'sday' => $sday
991
  );
992
- $hash = md5( implode( ',', $args ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
993
  $my_calendar_body .= apply_filters( 'mc_before_calendar', '', $args );
994
  $id = ( !$id ) ? "mc-$hash" : $id;
995
 
@@ -1009,7 +1052,7 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1009
 
1010
  $date_format = ( get_option( 'mc_date_format' ) != '' ) ? get_option( 'mc_date_format' ) : get_option( 'date_format' );
1011
 
1012
- if ( isset( $_GET['mc_id'] ) && $format != 'mini' ) {
1013
  // single event, main calendar only.
1014
  $mc_id = ( is_numeric( $_GET['mc_id'] ) ) ? $_GET['mc_id'] : false;
1015
  if ( $mc_id ) {
@@ -1120,6 +1163,7 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1120
  //echo "<p>Debug:<br />Day: $c_day<br />Month: $c_month<br />Year: $c_year<br />Date: ".date('Y-m-d',$current_date)."</p>";
1121
  $num = $mc_show_months - 1; // the value is total months to show; need additional months to show.
1122
 
 
1123
  if ( $format == "list" && $time != 'week' ) { // grid calendar can't show multiple months
1124
  if ( $num > 0 && $time != 'day' && $time != 'week' ) {
1125
  // grid calendar date calculation
@@ -1140,9 +1184,8 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1140
  } else {
1141
  $this_dates = mc_date_array( $current_date, $time );
1142
  }
1143
- $from = $this_dates['from'];
1144
- $to = $this_dates['to'];
1145
- //echo "<pre>$num $from, $to ($c_month,$c_day,$c_year)</pre>";
1146
  $event_array = my_calendar_events( $from, $to, $category, $ltype, $lvalue, 'calendar', $author, $host );
1147
  $no_events = ( empty( $event_array ) ) ? true : false;
1148
 
@@ -1159,7 +1202,7 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1159
  'yr' => $c_year,
1160
  'month' => $c_month,
1161
  'dy' => $c_day,
1162
- 'cid' => 'print'
1163
  );
1164
  $subtract = array();
1165
  if ( $ltype == '' ) {
@@ -1174,7 +1217,8 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1174
  $subtract[] = 'mcat';
1175
  unset( $add['mcat'] );
1176
  }
1177
- $mc_print_url = mc_build_url( $add, $subtract, mc_feed_base() . 'my-calendar-print' );
 
1178
  $print = "<div class='mc-print'><a href='$mc_print_url'>" . __( 'Print<span class="maybe-hide"> View</span>', 'my-calendar' ) . "</a></div>";
1179
  // set up format toggle
1180
  $toggle = ( in_array( 'toggle', $used ) ) ? mc_format_toggle( $format, 'yes', $time ) : '';
@@ -1182,7 +1226,12 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1182
  if ( in_array( 'timeframe', $used ) ) {
1183
  // if dy parameter not set, use today's date instead of first day of month.
1184
  if ( isset( $_GET['dy'] ) ) {
1185
- $weeks_day = first_day_of_week( $current_date );
 
 
 
 
 
1186
  } else {
1187
  $weeks_day = first_day_of_week( current_time( 'timestamp' ) );
1188
  }
@@ -1190,7 +1239,7 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1190
  if ( isset( $_GET['time'] ) && $_GET['time'] == 'day' ) {
1191
  // don't adjust day if viewing day format
1192
  } else {
1193
- if ( $day > 20 ) {
1194
  $day = date( 'j', strtotime( "$from + 1 week" ) );
1195
  }
1196
  }
@@ -1224,7 +1273,7 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1224
  </div>';
1225
  }
1226
  // set up rss feeds
1227
- if ( in_array( 'feeds', $used ) && $format != 'mini' ) {
1228
  $ical_m = ( isset( $_GET['month'] ) ) ? (int) $_GET['month'] : date( 'n' );
1229
  $ical_y = ( isset( $_GET['yr'] ) ) ? (int) $_GET['yr'] : date( 'Y' );
1230
  if ( !isset( $nLink ) ) {
@@ -1274,7 +1323,7 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1274
 
1275
  $my_calendar_body .= "<div class='mc-main $format $time'>" . $mc_topnav;
1276
  // single day uses independent cycling.
1277
- $dayclass = strtolower( date_i18n( 'D', mktime( 0, 0, 0, $c_month, $c_day, $c_year ) ) );
1278
  $from = $to = "$c_year-$c_month-$c_day";
1279
  //echo "<p>Debug: $from, $to, $category, $ltype, $lvalue, $author</p>";
1280
  $events = my_calendar_grab_events( $from, $to, $category, $ltype, $lvalue, 'calendar', $author, $host );
@@ -1295,9 +1344,10 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1295
  } else {
1296
  $mc_events .= __( 'No events scheduled for today!', 'my-calendar' );
1297
  }
1298
- $heading_level = apply_filters( 'mc_heading_level', 'h3', $format, $time, $template );
 
1299
  $my_calendar_body .= "
1300
- <$heading_level class='mc-single'>" . date_i18n( apply_filters( 'mc_date_format', $date_format, 'grid' ), strtotime( "$c_year-$c_month-$c_day" ) ) . "</$heading_level>" . '
1301
  <div id="mc-day" class="' . esc_attr( $dayclass . ' ' . $dateclass . ' ' . $events_class ) . '">' . "$mc_events\n</div>
1302
  </div>";
1303
  } else {
@@ -1314,20 +1364,21 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1314
  $through_month_header = date_i18n( $month_format, $through_date );
1315
  $values = array( 'date' => date( 'Y-m-d', $current_date ) );
1316
  // Add the calendar table and heading
1317
- $caption_text = ' ' . stripslashes( trim( get_option( 'mc_caption' ) ) ); // this option should be replaced JCD TODO
1318
  $my_calendar_body .= $mc_topnav;
1319
  if ( $format == "calendar" || $format == "mini" ) {
1320
- $table = apply_filters( 'mc_grid_wrapper', 'table' );
1321
  $my_calendar_body .= "\n<$table class=\"my-calendar-table\">\n";
1322
  $week_template = ( get_option( 'mc_week_caption' ) != '' ) ? get_option( 'mc_week_caption' ) : 'Week of {date format="M jS"}';
1323
  $week_caption = jd_draw_template( $values, stripslashes( $week_template ) );
1324
  $caption_heading = ( $time != 'week' ) ? $current_date_header . $caption_text : $week_caption . $caption_text;
1325
- $caption = apply_filters( 'mc_grid_caption', 'caption' );
1326
  $my_calendar_body .= "<$caption class=\"heading my-calendar-$time\">" . $caption_heading . "</$caption>\n";
1327
  } else {
1328
  // determine which header text to show depending on number of months displayed;
1329
  if ( $time != 'week' && $time != 'day' ) {
1330
- $list_heading = ( $num_months <= 1 ) ? __( 'Events in', 'my-calendar' ) . ' ' . $current_date_header . $caption_text . "\n" : $current_month_header . '&ndash;' . $through_month_header . $caption_text;
 
1331
  } else {
1332
  $list_heading = jd_draw_template( $values, stripslashes( get_option( 'mc_week_caption' ) ) );
1333
  }
@@ -1342,15 +1393,16 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1342
  'month+1'
1343
  ) )
1344
  ) {
1345
- $tr = apply_filters( 'mc_grid_week_wrapper', 'tr' );
1346
- $th = apply_filters( 'mc_grid_header_wrapper', 'th' );
 
1347
  $th .= ( $th == 'th' ) ? ' scope="col"' : '';
1348
  // If in a calendar format, print the headings of the days of the week
1349
  if ( $format == "list" ) {
1350
- $my_calendar_body .= "<ul id='$id' class='mc-list'>";
1351
  } else {
1352
- $my_calendar_body .= ( $tr == 'tr' ) ? "<thead>\n" : '';
1353
- $my_calendar_body .= "<$tr>\n";
1354
  for ( $i = 0; $i <= 6; $i ++ ) {
1355
  if ( $start_of_week == 0 ) {
1356
  $class = ( $i < 6 && $i > 0 ) ? 'day-heading' : 'weekend-heading';
@@ -1359,7 +1411,7 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1359
  }
1360
  $dayclass = strtolower( strip_tags( $abbrevs[ $i ] ) );
1361
  if ( ( $class == 'weekend-heading' && get_option( 'mc_show_weekends' ) == 'true' ) || $class != 'weekend-heading' ) {
1362
- $my_calendar_body .= "<$th class='$class $dayclass'>" . $name_days[ $i ] . "</$th>\n";
1363
  }
1364
  }
1365
  $my_calendar_body .= "\n</$tr>\n";
@@ -1380,7 +1432,7 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1380
  $is_weekend = ( date( 'N', $start ) < 6 ) ? false : true;
1381
  if ( get_option( 'mc_show_weekends' ) == 'true' || ( get_option( 'mc_show_weekends' ) != 'true' && ! $is_weekend ) ) {
1382
  if ( date( 'N', $start ) == $start_of_week && $format != "list" ) {
1383
- $my_calendar_body .= "<$tr>";
1384
  }
1385
  // date-based classes
1386
  $monthclass = ( date( 'n', $start ) == $c_month || $time != 'month' ) ? '' : 'nextmonth';
@@ -1392,12 +1444,12 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1392
  $events = ( isset( $event_array[ $date ] ) ) ? $event_array[ $date ] : array();
1393
  $events_class = mc_events_class( $events, $date );
1394
  if ( get_option( 'mc_list_javascript' ) != 1 ) {
1395
- $is_anchor = "<a href='#'>";
1396
- $is_close_anchor = "</a>";
1397
  } else {
1398
  $is_anchor = $is_close_anchor = "";
1399
  }
1400
- $td = apply_filters( 'mc_grid_day_wrapper', 'td' );
1401
  if ( ! empty( $events ) ) {
1402
  $event_output = my_calendar_draw_events( $events, $format, $date, $time, $template );
1403
  if ( $event_output === true ) {
@@ -1444,7 +1496,7 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1444
  'cid',
1445
  'mc_id'
1446
  ), get_option( 'mc_mini_uri' ) );
1447
- $link = ( get_option( 'mc_mini_uri' ) != '' ) ? $date_url . '#' . $atype . '-' . $c_year . '-' . $am . '-' . $ad : '#';
1448
  }
1449
  $element = "a href='$link'";
1450
  $close = 'a';
@@ -1463,7 +1515,6 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1463
  } else {
1464
  $title = '';
1465
  }
1466
- //if ( $monthclass != 'nextmonth' ) { // only show current month in list view.
1467
  if ( $event_output != '' ) {
1468
  $my_calendar_body .= "
1469
  <li id='$format-$date' class='mc-events " . esc_attr( "$dayclass $dateclass $events_class $odd" ) . "'>
@@ -1472,11 +1523,10 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1472
  </li>";
1473
  $odd = ( $odd == 'odd' ) ? 'even' : 'odd';
1474
  }
1475
- //}
1476
  } else {
1477
  $my_calendar_body .= "
1478
  <$td id='$format-$date' class='" . esc_attr( "$dayclass $dateclass $weekend_class $monthclass $events_class" ) . " day-with-date'>" . "
1479
- <$element class='mc-date $trigger'><span aria-hidden='true'>$thisday_heading</span><span class='screen-reader-text'><span class='screen-reader-text'>" . date_i18n( get_option( 'mc_date_format' ), strtotime( $date ) ) . "</span></span></$close>" .
1480
  $event_output . "
1481
  </$td>\n";
1482
  }
@@ -1507,8 +1557,8 @@ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $
1507
 
1508
  } while ( $start <= $end );
1509
  }
1510
- $table = apply_filters( 'mc_grid_wrapper', 'table' );
1511
- $end = ( $table == 'table' ) ? "\n</tbody>\n</table>" : "</$table>";
1512
  $my_calendar_body .= ( $format == "list" ) ? "\n</ul>" : $end;
1513
  } else {
1514
  if ( ! in_array( $format, array( 'list', 'calendar', 'mini' ) ) ) {
@@ -1560,15 +1610,15 @@ function my_category_key( $category ) {
1560
  if ( $cat->category_private == 1 ) {
1561
  $class .= " private";
1562
  }
1563
- $url = add_query_arg( 'mcat', $cat->category_id, mc_get_current_url() );
1564
  if ( $cat->category_icon != "" && get_option( 'mc_hide_icons' ) != 'true' ) {
1565
- $key .= '<li class="cat_' . $class . '"><a href="' . $url . '"><span class="category-color-sample"><img src="' . $path . $cat->category_icon . '" alt="" style="background:' . $hex . $cat->category_color . ';" /></span>' . stripcslashes( $cat->category_name ) . "</a></li>\n";
1566
  } else {
1567
- $key .= '<li class="cat_' . $class . '"><a href="' . $url . '"><span class="category-color-sample no-icon" style="background:' . $hex . $cat->category_color . ';"> &nbsp; </span>' . stripcslashes( $cat->category_name ) . "</a></li>\n";
1568
  }
1569
  }
1570
  if ( isset( $_GET['mcat'] ) ) {
1571
- $key .= "<li><a href='" . mc_get_current_url() . "'>" . __( 'All Categories', 'my-calendar' ) . "</a></li>";
1572
  }
1573
  $key .= "</ul>\n</div>";
1574
  $key = apply_filters( 'mc_category_key', $key, $categories );
@@ -1737,7 +1787,9 @@ function mc_filters( $args ) {
1737
  <div id='mc_filters'>
1738
  <form action='" . $current_url . "' method='get'>\n";
1739
  $qsa = array();
1740
- parse_str( $_SERVER['QUERY_STRING'], $qsa );
 
 
1741
  if ( ! isset( $_GET['cid'] ) ) {
1742
  $form .= '<input type="hidden" name="cid" value="all" />';
1743
  }
@@ -1794,7 +1846,9 @@ function my_calendar_categories_list( $show = 'list', $context = 'public', $grou
1794
  <div>" : '';
1795
  if ( $group == 'single' ) {
1796
  $qsa = array();
1797
- parse_str( $_SERVER['QUERY_STRING'], $qsa );
 
 
1798
  if ( ! isset( $_GET['cid'] ) ) {
1799
  $form .= '<input type="hidden" name="cid" value="all" />';
1800
  }
@@ -1822,7 +1876,7 @@ function my_calendar_categories_list( $show = 'list', $context = 'public', $grou
1822
  <option value="all" selected="selected">' . __( 'All Categories', 'my-calendar' ) . '</option>' . "\n";
1823
 
1824
  foreach ( $categories as $category ) {
1825
- $category_name = stripcslashes( $category->category_name );
1826
  $mcat = ( empty( $_GET['mcat'] ) ) ? '' : (int) $_GET['mcat'];
1827
  if ( $show == 'list' ) {
1828
  $this_url = mc_build_url( array( 'mcat' => $category->category_id ), array() );
@@ -1856,7 +1910,9 @@ function mc_access_list( $show = 'list', $group = 'single' ) {
1856
  <div>" : '';
1857
  if ( $group == 'single' ) {
1858
  $qsa = array();
1859
- parse_str( $_SERVER['QUERY_STRING'], $qsa );
 
 
1860
  if ( ! isset( $_GET['cid'] ) ) {
1861
  $form .= '<input type="hidden" name="cid" value="all" />';
1862
  }
@@ -1870,7 +1926,7 @@ function mc_access_list( $show = 'list', $group = 'single' ) {
1870
  }
1871
  $form .= ( $show == 'list' || $group == 'group' ) ? '' : '</div><p>';
1872
 
1873
- $access_options = get_option( 'mc_event_access' );
1874
  if ( ! empty( $access_options ) && count( $access_options ) >= 1 ) {
1875
  $output = "<div id='mc_access'>\n";
1876
  $url = mc_build_url( array( 'access' => 'all' ), array() );
@@ -1916,7 +1972,7 @@ function mc_build_url( $add, $subtract, $root = '' ) {
1916
  }
1917
  if ( $home == '' ) {
1918
  if ( is_front_page() ) {
1919
- $home = get_bloginfo( 'url' ) . '/';
1920
  } else if ( is_home() ) {
1921
  $page = get_option( 'page_for_posts' );
1922
  $home = get_permalink( $page );
@@ -1942,7 +1998,11 @@ function mc_build_url( $add, $subtract, $root = '' ) {
1942
  } else {
1943
  $char = ( $wp_rewrite->using_permalinks() ) ? '?' : '&amp;'; // this doesn't work -- may *never* need to be &. Consider
1944
  }
1945
-
 
 
 
 
1946
  return $home . $char . http_build_query( $variables, '', '&amp;' );
1947
  }
1948
 
@@ -2030,13 +2090,15 @@ function my_calendar_searchform( $type, $url ) {
2030
  $url = ( get_option( 'mc_uri' ) != '' ) ? get_option( 'mc_uri' ) : home_url();
2031
  }
2032
  return '
2033
- <form role="search" method="get" action="' . apply_filters( 'mc_search_page', esc_url( $url ) ) . '" >
2034
- <div class="mc-search">
2035
- <label class="screen-reader-text" for="mcs">' . __( 'Search Events', 'my-calendar' ) . '</label>
2036
- <input type="text" value="' . esc_attr( stripslashes( $query ) ) . '" name="mcs" id="mcs" />
2037
- <input type="submit" id="searchsubmit" value="' . __( 'Search Events', 'my-calendar' ) . '" />
2038
- </div>
2039
- </form>';
 
 
2040
  }
2041
 
2042
  return '';
@@ -2102,7 +2164,9 @@ function my_calendar_locations_list( $show = 'list', $type = 'saved', $datatype
2102
  $output .= "<input type='hidden' name='ltype' value='" . esc_attr( $ltype ) . "' />";
2103
  if ( $group == 'single' ) {
2104
  $qsa = array();
2105
- parse_str( $_SERVER['QUERY_STRING'], $qsa );
 
 
2106
  if ( ! isset( $_GET['cid'] ) ) {
2107
  $output .= '<input type="hidden" name="cid" value="all" />';
2108
  }
@@ -2123,7 +2187,7 @@ function my_calendar_locations_list( $show = 'list', $type = 'saved', $datatype
2123
  if ( $type == 'saved' ) {
2124
  foreach ( $location as $k => $value ) {
2125
  $vt = urlencode( trim( $value ) );
2126
- $value = stripcslashes( $value );
2127
  if ( $value == '' ) {
2128
  continue;
2129
  }
@@ -2134,7 +2198,7 @@ function my_calendar_locations_list( $show = 'list', $type = 'saved', $datatype
2134
  }
2135
  if ( $show == 'list' ) {
2136
  $selected = ( $vt == $loc ) ? " class='selected'" : '';
2137
- $this_url = mc_build_url( array( 'loc' => $vt, 'ltype' => $datatype ), array() );
2138
  $output .= " <li$selected><a rel='nofollow' href='$this_url'>$value</a></li>\n";
2139
  } else {
2140
  $selected = ( $vt == $loc ) ? " selected='selected'" : '';
@@ -2145,13 +2209,13 @@ function my_calendar_locations_list( $show = 'list', $type = 'saved', $datatype
2145
  }
2146
  } else {
2147
  $vk = urlencode( trim( $key ) );
2148
- $location = trim( $location );
2149
  if ( $location == '' ) {
2150
  continue;
2151
  }
2152
  if ( $show == 'list' ) {
2153
  $selected = ( $vk == $_GET['loc'] ) ? " class='selected'" : '';
2154
- $this_url = mc_build_url( array( 'loc' => $vk, 'ltype' => $datatype ), array() );
2155
  $output .= " <li$selected><a rel='nofollow' href='$this_url'>$location</a></li>\n";
2156
  } else {
2157
  $selected = ( $vk == $_GET['loc'] ) ? " selected='selected'" : '';
@@ -2187,7 +2251,7 @@ function mc_user_timezone() {
2187
  }
2188
  if ( get_option( 'mc_user_settings_enabled' ) == 'true' && $enabled == 'on' ) {
2189
  if ( is_user_logged_in() ) {
2190
- get_currentuserinfo();
2191
  $current_settings = get_user_meta( $user_ID, 'my_calendar_user_settings', true );
2192
  $tz = ( isset( $current_settings['my_calendar_tz_default'] ) ) ? $current_settings['my_calendar_tz_default'] : '';
2193
  } else {
149
  if ( is_singular( 'mc-events' ) && in_the_loop() ) {
150
  if ( $post_id ) {
151
  $event_id = ( isset( $_GET['mc_id'] ) && is_numeric( $_GET['mc_id'] ) ) ? $_GET['mc_id'] : get_post_meta( $post_id, '_mc_event_id', true );
152
+ if ( is_numeric( $event_id ) ) {
153
+ $event = mc_get_event_core( $event_id );
154
+ $icon = mc_category_icon( $event );
155
+ $title = $icon . ' ' . wp_kses_post( $title );
156
+ }
157
  }
158
  }
159
 
177
  $header = $address = $more = $author = $list_title = $title = $output = $container = $short = $description = $link = $vcal = $gcal = '';
178
  $date_format = ( get_option( 'mc_date_format' ) != '' ) ? get_option( 'mc_date_format' ) : get_option( 'date_format' );
179
  $data = mc_create_tags( $event );
 
180
  $details = '';
181
  if ( mc_show_details( $time, $type ) ) {
182
  $details = apply_filters( 'mc_custom_template', false, $data, $event, $type, $process_date, $time, $template );
183
+ $template = apply_filters( 'mc_use_custom_template', $template, $data, $event, $type, $process_date, $time );
184
  if ( $details === false ) {
185
  if ( $template != '' && mc_file_exists( sanitize_file_name( $template ) ) ) {
186
  $template = @file_get_contents( mc_get_file( sanitize_file_name( $template ) ) );
188
  } else {
189
  switch ( $type ) {
190
  case 'mini':
191
+ $template = mc_get_template( 'mini' );
192
  if ( get_option( 'mc_use_mini_template' ) == 1 ) {
193
  $details = jd_draw_template( $data, $template );
194
  }
195
  break;
196
  case 'list':
197
+ $template = mc_get_template( 'list' );
198
  if ( get_option( 'mc_use_list_template' ) == 1 ) {
199
  $details = jd_draw_template( $data, $template );
200
  }
201
  break;
202
  case 'single':
203
+ $template = mc_get_template( 'details' );
204
  if ( get_option( 'mc_use_details_template' ) == 1 ) {
205
  $details = jd_draw_template( $data, $template );
206
  }
207
  break;
208
  case 'calendar':
209
  default:
210
+ $template = mc_get_template( 'grid' );
211
  if ( get_option( 'mc_use_grid_template' ) == 1 ) {
212
  $details = jd_draw_template( $data, $template );
213
  }
218
  $mc_display_author = get_option( 'mc_display_author' );
219
  $display_map = get_option( 'mc_show_map' );
220
  $display_address = get_option( 'mc_show_address' );
221
+ $mc_display_more = get_option( 'mc_display_more' );
222
  $uid = 'mc_' . $event->occur_id;
223
  $day_id = date( 'd', strtotime( $process_date ) );
224
 
227
  $header .= "<div id='$uid-$day_id-$type' class='mc-$uid $type-event " . "mc_" . sanitize_title( $event->category_name ) . " vevent'>\n";
228
 
229
  switch ( $type ) {
230
+ case 'calendar' : $title_template = ( mc_get_template( 'title' ) == '' ) ? '{title}' : mc_get_template( 'title' ); break;
231
+ case 'list' : $title_template = ( mc_get_template( 'title_list' ) == '' ) ? '{title}' : mc_get_template( 'title_list' ); break;
232
+ case 'single' : $title_template = ( mc_get_template( 'title_solo' ) == '' ) ? '{title}' : mc_get_template( 'title_solo' ); break;
233
+ default: $title_template = ( mc_get_template( 'title' ) == '' ) ? '{title}' : mc_get_template( 'title' );
234
  }
235
+
236
  $event_title = jd_draw_template( $data, $title_template );
237
+ $event_title = ( $event_title == '' ) ? jd_draw_template( $data, '{title}' ) : wp_kses_post( $event_title ); //prevent empty titles
238
 
239
  if ( strpos( $event_title, 'href' ) === false && $type != 'mini' && $type != 'list' ) {
240
  if ( get_option( 'mc_open_uri' ) == 'true' ) {
241
+ $details_link = esc_url( mc_get_details_link( $event ) );
242
  $wrap = "<a href='$details_link' class='url summary$has_image'>";
243
  $balance = "</a>";
244
  } else {
251
  $current_date = date_i18n( apply_filters( 'mc_date_format', $date_format, 'details' ), strtotime( $process_date ) );
252
  $group_class = ( $event->event_span == 1 ) ? ' multidate group' . $event->event_group_id : '';
253
  $heading_level = apply_filters( 'mc_heading_level_table', 'h3', $type, $time, $template );
254
+ $inner_heading = apply_filters( 'mc_heading_inner_title', $wrap . $image . trim( $event_title ) . $balance, $event_title, $event );
255
  $header .= ( $type != 'single' && $type != 'list' ) ? "<$heading_level class='event-title summary$group_class' id='$uid-$day_id-$type-title'>$inner_heading</$heading_level>\n" : '';
256
  $event_title = ( $type == 'single' ) ? apply_filters( 'mc_single_event_title', $event_title, $event ) : $event_title;
257
  $title = ( $type == 'single' && ! is_singular( 'mc-events' ) ) ? "<h2 class='event-title summary'>$image $event_title</h2>\n" : '';
258
  $title = apply_filters( 'mc_event_title', $title, $event, $event_title, $image );
259
+ $header .= $title;
260
  $close_image = apply_filters( 'mc_close_button', "<img src=\"" . plugin_dir_url( __FILE__ ) . "images/event-close.png\" alt='" . __( 'Close', 'my-calendar' ) . "' />" );
261
  $close_button = "<button aria-controls='$uid-$day_id-$type-details' class='mc-toggle close'>$close_image</button>";
262
 
269
  $address = mc_hcard( $event, $display_address, $display_map );
270
  }
271
  // end vcard
272
+ $time_html = mc_time_html( $event, $type, $current_date );
273
  if ( $type == "list" ) {
274
  $heading_level = apply_filters( 'mc_heading_level_list', 'h3', $type, $time, $template );
275
  $list_title = "<$heading_level class='event-title summary' id='$uid-$day_id-$type-title'>$image" . $event_title . "</$heading_level>\n";
281
  }
282
  }
283
 
284
+ if ( $mc_display_more != 'false' && ! isset( $_GET['mc_id'] ) ) {
285
  $details_label = mc_get_details_label( $event, $data );
286
  $details_link = mc_get_details_link( $event );
287
  if ( _mc_is_url( $details_link ) ) {
288
+ $more = "<p class='mc_details'><a href='" . esc_url( $details_link ) . "'>$details_label</a></p>\n";
289
  } else {
290
  $more = '';
291
  }
301
 
302
  if ( function_exists( 'my_calendar_generate_vcal' ) && get_option( 'mc_show_event_vcal' ) == 'true' ) {
303
  $url = add_query_arg( 'vcal', $uid, home_url() );
304
+ $vcal_link = "<p class='ical'><a rel='nofollow' href='" . esc_url( $url ) . "'>" . __( 'iCal', 'my-calendar' ) . "</a></p>\n";
305
  $vcal = $vcal_link;
306
  }
307
  $sizes = get_intermediate_image_sizes();
318
  $image = ( $event->event_image != '' ) ? "<img src='$event->event_image' alt='' class='mc-image photo' />" : '';
319
  }
320
  if ( get_option( 'mc_desc' ) == 'true' || $type == 'single' ) {
321
+ $description = wpautop( stripcslashes( wp_kses_post( $event->event_desc ) ), 1 );
322
  $description = "<div class='longdesc'>$description</div>";
323
  }
324
  if ( get_option( 'mc_short' ) == 'true' && $type != 'single' ) {
325
+ $short = wpautop( stripcslashes( wp_kses_post( $event->event_short ) ), 1 );
326
  $short = "<div class='shortdesc'>$short</div>";
327
  }
328
 
329
  if ( get_option( 'mc_event_registration' ) == 'true' ) {
330
  switch ( $event->event_open ) {
331
  case '0':
332
+ $status = wp_kses_post( get_option( 'mc_event_closed' ) );
333
  break;
334
  case '1':
335
+ $status = wp_kses_post( get_option( 'mc_event_open' ) );
336
  break;
337
  case '2':
338
  $status = '';
346
 
347
  $status = ( $status != '' ) ? "<p>$status</p>" : '';
348
  $status = apply_filters( 'mc_registration_state', $status, $event );
349
+ $return = ( $type == 'single' ) ? "<p class='view-full'><a href='" . get_option( 'mc_uri' ) . "'>" . __( 'View full calendar', 'my-calendar' ) . "</a></p>" : '';
350
 
351
  if ( ! mc_show_details( $time, $type ) ) {
352
  $description = $short = $status = '';
361
  if ( $event_link != '' && get_option( 'mc_event_link' ) != 'false' ) {
362
  $is_external = mc_external_link( $event_link );
363
  $external_class = ( $is_external ) ? "class='$type-link external'" : "class='$type-link'";
364
+ $link_template = ( mc_get_template( 'link' ) != '' ) ? mc_get_template( 'link' ) : '{title}';
365
  $link_text = jd_draw_template( $data, $link_template );
366
+ $link = "<p><a href='" . esc_url( $event_link ) . "' $external_class>" . $link_text . "</a></p>";
367
  }
368
  $details = "\n"
369
  . $close
370
+ . $time_html
371
  . $list_title
372
  . $image
373
  . "<div class='location'>"
393
  $img_class = ( $image != '' ) ? ' has-image' : ' no-image';
394
  $container = "<div id='$uid-$day_id-$type-details' class='details$img_class' role='alert' aria-labelledby='$uid-$day_id-$type-title'>\n";
395
  $container = apply_filters( 'mc_before_event', $container, $event, $type, $time );
396
+ $details = $header . $container . apply_filters( 'mc_inner_content', $details, $event, $type, $time );
397
  $details .= apply_filters( 'mc_after_event', '', $event, $type, $time );
398
  $details .= $close; // second close button
399
  $details .= "</div><!--ends .details--></div>";
400
  $details = apply_filters( 'mc_event_content', $details, $event, $type, $time );
401
  } else {
402
+ $details = apply_filters( 'mc_before_event_no_details', $container, $event, $type, $time )
403
  . $header
404
+ . apply_filters( 'mc_after_event_no_details', '', $event, $type, $time )
405
  . "</div>";
406
  }
407
 
416
  function mc_edit_panel( $html, $event, $type, $time ) {
417
  // create edit links
418
  $edit = '';
419
+ if ( mc_can_edit_event( $event->event_id ) && get_option( 'mc_remote' ) != 'true' ) {
420
  $mc_id = $event->occur_id;
421
  $groupedit = ( $event->event_group_id != 0 ) ? " &bull; <a href='" . admin_url( "admin.php?page=my-calendar-groups&amp;mode=edit&amp;event_id=$event->event_id&amp;group_id=$event->event_group_id" ) . "' class='group'>" . __( 'Edit Group', 'my-calendar' ) . "</a>\n" : '';
422
  $recurs = str_split( $event->event_recur, 1 );
449
  $date_switcher .= '<div class="my-calendar-date-switcher">
450
  <form action="' . $current_url . '" method="get"><div>';
451
  $qsa = array();
452
+ if ( isset( $_SERVER['QUERY_STRING'] ) ) {
453
+ parse_str( $_SERVER['QUERY_STRING'], $qsa );
454
+ }
455
  if ( ! isset( $_GET['cid'] ) ) {
456
  $date_switcher .= '<input type="hidden" name="cid" value="' . esc_attr( $cid ) . '" />';
457
  }
458
  foreach ( $qsa as $name => $argument ) {
459
  $name = esc_attr( strip_tags( $name ) );
460
+ if ( is_array( $argument ) ) {
461
+ $argument = '';
462
+ } else {
463
+ $argument = esc_attr( strip_tags( $argument ) );
464
+ }
465
  if ( $name != 'month' && $name != 'yr' && $name != 'dy' ) {
466
  $date_switcher .= '<input type="hidden" name="' . $name . '" value="' . $argument . '" />';
467
  }
469
  $day_switcher = '';
470
  if ( $time == 'day' ) {
471
  $day_switcher = '
472
+ <label class="maybe-hide" for="' . $cid . '-day">' . __( 'Day', 'my-calendar' ) . ':</label> <select id="' . $cid . '-day" name="dy">' . "\n";
473
  for ( $i = 1; $i <= 31; $i++ ) {
474
  $day_switcher .= "<option value='$i'" . mc_day_comparison( $i ) . '>' . $i . '</option>' . "\n";
475
  }
524
  $ltype = ( isset( $_GET['ltype'] ) ) ? $_GET['ltype'] : '';
525
  $lvalue = ( isset( $_GET['lvalue'] ) ) ? $_GET['lvalue'] : '';
526
  header( 'Content-Type: ' . get_bloginfo( 'html_type' ) . '; charset=' . get_bloginfo( 'charset' ) );
527
+ if ( mc_file_exists( 'css/mc-print.css' ) ) {
528
+ $stylesheet = mc_get_file( 'css/mc-print.css', 'url' );
529
+ } else {
530
+ $stylesheet = $url . "css/mc-print.css";
531
+ }
532
+ $rtl = ( is_rtl() ) ? 'rtl' : 'ltr';
533
+ $head = '<!DOCTYPE html>
534
+ <html dir="' . $rtl . '" lang="' . get_bloginfo( 'language' ) . '">
 
535
  <!--<![endif]-->
536
  <head>
537
  <meta charset="' . get_bloginfo( 'charset' ) . '" />
538
  <meta name="viewport" content="width=device-width" />
539
  <title>' . get_bloginfo( 'name' ) . ' - ' . __( 'Calendar: Print View', 'my-calendar' ) . '</title>
540
  <meta name="generator" content="My Calendar for WordPress" />
541
+ <meta name="robots" content="noindex,nofollow" />
 
 
 
 
 
 
542
  <!-- Copy mc-print.css to your theme directory if you wish to replace the default print styles -->
543
+ <link rel="stylesheet" href="' . $stylesheet. '" type="text/css" media="screen,print" />
544
  </head>
545
+ <body>';
546
+ echo $head;
547
  echo my_calendar( 'print', 'calendar', $category, $time, $ltype, $lvalue, 'mc-print-view', '', '', null, null, 'none', 'none' );
548
  $return_url = ( get_option( 'mc_uri' ) != '' && ! is_numeric( get_option( 'mc_uri' ) ) ) ? get_option( 'mc_uri' ) : home_url();
549
+ $return_url = apply_filters( 'mc_print_return_url', $return_url, $category, $time, $ltype, $lvalue );
550
+
551
+ if ( isset( $_GET['href'] ) ) {
552
+ $ref_url = esc_url( urldecode( $_GET['href'] ) );
553
+ if ( $ref_url ) {
554
+ $return_url = $ref_url;
555
+ }
556
+ }
557
+
558
+ $add = array_map( 'esc_sql', $_GET );
559
  unset( $add['cid'] );
560
  unset( $add['feed'] );
561
+ unset( $add['href'] );
562
+ $return_url = mc_build_url( $add, array( 'feed', 'cid', 'href' ), $return_url );
563
+ echo "<p class='return'><a href='$return_url'>" . __( 'Return to calendar', 'my-calendar' ) . "</a></p>";
564
  echo '
565
  </body>
566
  </html>';
583
  } else {
584
  $toggle = '';
585
  }
586
+
587
+ return apply_filters( 'mc_format_toggle_html', $toggle, $format, $time );
588
  }
589
 
590
  function mc_time_toggle( $format, $time, $toggle, $day, $month, $year ) {
628
  $toggle = '';
629
  }
630
 
631
+ return apply_filters( 'mc_time_toggle_html', $toggle, $format, $time );
632
  }
633
 
634
  function mc_date_array( $timestamp, $period ) {
706
  } else {
707
  $cstate = sprintf( __( " and %d other events", 'my-calendar' ), $count );
708
  }
709
+ $title = apply_filters( 'mc_list_event_title_hint', wp_kses_post( stripcslashes( $now->event_title ) ), $now ) . "<span class='mc-list-extended'>$cstate</span>";
710
 
711
  return $title;
712
  }
715
  $before = apply_filters( 'mc_past_search_results', 0, 'basic' );
716
  $after = apply_filters( 'mc_future_search_results', 10, 'basic' ); // return only future events, nearest 10
717
  if ( is_string( $query ) ) {
718
+ $search = mc_prepare_search_query( $query );
 
719
  $term = $query;
720
  } else {
721
  $search = apply_filters( 'mc_advanced_search', '', $query );
725
  }
726
 
727
  $event_array = mc_get_search_results( $search );
728
+
729
  //$event_array = mc_flatten_array( $event_array );
730
 
731
  if ( ! empty( $event_array ) ) {
759
  function mc_get_search_results( $search ) {
760
  global $wpdb;
761
  $mcdb = $wpdb;
762
+ $event_array = array();
763
  if ( get_option( 'mc_remote' ) == 'true' && function_exists( 'mc_remote_db' ) ) {
764
  $mcdb = mc_remote_db();
765
  }
776
  $host = ( isset( $search['host'] ) ) ? $search['host'] : null;
777
  $search = ( isset( $search['search'] ) ) ? $search['search'] : '';
778
 
779
+ $event_array = my_calendar_events( $from, $to, $category, $ltype, $lvalue, 'search', $author, $host, $search );
780
+
781
  } else {
782
  $date = date( 'Y', current_time( 'timestamp' ) ) . '-' . date( 'm', current_time( 'timestamp' ) ) . '-' . date( 'd', current_time( 'timestamp' ) );
783
  // if a value is non-zero, I'll grab a handful of extra events so I can throw out holidays and others like that.
788
  JOIN " . MY_CALENDAR_TABLE . "
789
  ON (event_id=occur_event_id)
790
  JOIN " . MY_CALENDAR_CATEGORIES_TABLE . "
791
+ ON (event_category=category_id) WHERE event_approved = 1 $search AND event_flagged <> 1
792
  AND DATE(occur_begin) < '$date' ORDER BY occur_begin DESC LIMIT 0,$before" );
793
  } else {
794
  $events1 = array();
795
  }
796
  $events3 = $mcdb->get_results( "SELECT *, UNIX_TIMESTAMP(occur_begin) AS ts_occur_begin, UNIX_TIMESTAMP(occur_end) AS ts_occur_end
797
+ FROM " . MY_CALENDAR_EVENTS_TABLE . "
798
+ JOIN " . MY_CALENDAR_TABLE . "
799
+ ON (event_id=occur_event_id)
800
+ JOIN " . MY_CALENDAR_CATEGORIES_TABLE . "
801
+ ON (event_category=category_id) WHERE event_approved = 1 $search AND event_flagged <> 1
802
+ AND DATE(occur_begin) = '$date'" );
803
  if ( $after > 0 ) {
804
  $after = $after + 5;
805
  $events2 = $mcdb->get_results( "SELECT *, UNIX_TIMESTAMP(occur_begin) AS ts_occur_begin, UNIX_TIMESTAMP(occur_end) AS ts_occur_end
807
  JOIN " . MY_CALENDAR_TABLE . "
808
  ON (event_id=occur_event_id)
809
  JOIN " . MY_CALENDAR_CATEGORIES_TABLE . "
810
+ ON (event_category=category_id) WHERE event_approved = 1 $search AND event_flagged <> 1
811
  AND DATE(occur_begin) > '$date' ORDER BY occur_begin ASC LIMIT 0,$after" );
812
  } else {
813
  $events2 = array();
883
  }
884
  if ( is_object( $post ) && $post->post_type == 'mc-events' ) {
885
  $event_id = get_post_meta( $post->ID, '_mc_event_id', true );
886
+ if ( !$event_id ) { return; }
887
  $event = mc_get_first_event( $event_id );
888
  if ( mc_event_is_hidden( $event ) ) {
889
  $do_redirect = true;
909
  if ( $post->post_type == 'mc-events' ) {
910
  if ( isset( $_GET['mc_id'] ) ) {
911
  $mc_id = intval( $_GET['mc_id'] );
912
+ $event_id = get_post_meta( $post->ID, '_mc_event_id', true );
913
  $event = mc_get_event( $mc_id, 'object' );
914
  $date = date( 'Y-m-d', strtotime( $event->occur_begin ) );
915
  $time = date( 'H:i:00', strtotime( $event->occur_begin ) );
916
  } else {
917
  $event_id = get_post_meta( $post->ID, '_mc_event_id', true );
918
+ if ( is_numeric( $event_id ) ) {
919
+ $event = mc_get_first_event( $event_id );
920
+ $date = $event->event_begin;
921
+ $time = $event->event_time;
922
+ } else {
923
+ return $content;
924
+ }
925
  }
926
  if ( mc_event_is_hidden( $event ) ) {
927
  return $content;
928
  }
929
  if ( get_option( 'mc_use_details_template' ) == 1 ) {
930
+ $new_content = apply_filters( 'mc_before_event', '', $event, 'single', $time );
931
+ if ( isset( $_GET['mc_id'] ) ) {
932
+ $shortcode = str_replace( "event='$event_id'", "event='$mc_id' instance='1'", get_post_meta( $post->ID, '_mc_event_shortcode', true ) );
933
+ } else {
934
+ $shortcode = get_post_meta( $post->ID, '_mc_event_shortcode', true );
935
+ }
936
+ $new_content .= do_shortcode( apply_filters( 'mc_single_event_shortcode', $shortcode ) );
937
  $new_content .= apply_filters( 'mc_after_event', '', $event, 'single', $time );
938
  } else {
939
  $new_content = my_calendar_draw_event( $event, 'single', $date, $time, '' );
957
  }
958
 
959
  // Actually do the printing of the calendar
960
+ function my_calendar( $name, $format, $category, $time = 'month', $ltype = '', $lvalue = '', $id = '', $template = '', $content = '', $author = null, $host = null, $above = '', $below = '', $syear = false, $smonth = false, $sday = false, $source = 'shortcode' ) {
961
  check_my_calendar();
962
  // category key needs to receive the original category settings.
963
  $original_category = $category;
1015
  'smonth' => $smonth,
1016
  'sday' => $sday
1017
  );
1018
+ // args used in Md5 hash cannot include 'time' or 'format', since those can be changed by navigation.
1019
+ $hash_args = array(
1020
+ 'name' => $name,
1021
+ 'category' => $category,
1022
+ 'above' => $above,
1023
+ 'below' => $below,
1024
+ 'ltype' => $ltype,
1025
+ 'lvalue' => $lvalue,
1026
+ 'author' => $author,
1027
+ 'id' => $id,
1028
+ 'above' => $above,
1029
+ 'below' => $below,
1030
+ 'host' => $host,
1031
+ 'syear' => $syear,
1032
+ 'smonth' => $smonth,
1033
+ 'sday' => $sday
1034
+ );
1035
+ $hash = md5( implode( ',', $hash_args ) );
1036
  $my_calendar_body .= apply_filters( 'mc_before_calendar', '', $args );
1037
  $id = ( !$id ) ? "mc-$hash" : $id;
1038
 
1052
 
1053
  $date_format = ( get_option( 'mc_date_format' ) != '' ) ? get_option( 'mc_date_format' ) : get_option( 'date_format' );
1054
 
1055
+ if ( isset( $_GET['mc_id'] ) && $source != 'widget' ) {
1056
  // single event, main calendar only.
1057
  $mc_id = ( is_numeric( $_GET['mc_id'] ) ) ? $_GET['mc_id'] : false;
1058
  if ( $mc_id ) {
1163
  //echo "<p>Debug:<br />Day: $c_day<br />Month: $c_month<br />Year: $c_year<br />Date: ".date('Y-m-d',$current_date)."</p>";
1164
  $num = $mc_show_months - 1; // the value is total months to show; need additional months to show.
1165
 
1166
+
1167
  if ( $format == "list" && $time != 'week' ) { // grid calendar can't show multiple months
1168
  if ( $num > 0 && $time != 'day' && $time != 'week' ) {
1169
  // grid calendar date calculation
1184
  } else {
1185
  $this_dates = mc_date_array( $current_date, $time );
1186
  }
1187
+ $from = apply_filters( 'mc_from_date', $this_dates['from'] );
1188
+ $to = apply_filters( 'mc_to_date', $this_dates['to'] );
 
1189
  $event_array = my_calendar_events( $from, $to, $category, $ltype, $lvalue, 'calendar', $author, $host );
1190
  $no_events = ( empty( $event_array ) ) ? true : false;
1191
 
1202
  'yr' => $c_year,
1203
  'month' => $c_month,
1204
  'dy' => $c_day,
1205
+ 'href' => urlencode( mc_get_current_url() )
1206
  );
1207
  $subtract = array();
1208
  if ( $ltype == '' ) {
1217
  $subtract[] = 'mcat';
1218
  unset( $add['mcat'] );
1219
  }
1220
+ $print_add = array_merge( $add, array( 'cid' => 'mc-print-view' ) );
1221
+ $mc_print_url = mc_build_url( $print_add, $subtract, home_url() );
1222
  $print = "<div class='mc-print'><a href='$mc_print_url'>" . __( 'Print<span class="maybe-hide"> View</span>', 'my-calendar' ) . "</a></div>";
1223
  // set up format toggle
1224
  $toggle = ( in_array( 'toggle', $used ) ) ? mc_format_toggle( $format, 'yes', $time ) : '';
1226
  if ( in_array( 'timeframe', $used ) ) {
1227
  // if dy parameter not set, use today's date instead of first day of month.
1228
  if ( isset( $_GET['dy'] ) ) {
1229
+ $current_set = mktime( 0, 0, 0, $c_month, $_GET['dy'], $c_year );
1230
+ if ( date( 'N', $current_set ) == $start_of_week ) {
1231
+ $weeks_day = first_day_of_week( $current_set );
1232
+ } else {
1233
+ $weeks_day = first_day_of_week( $current_date );
1234
+ }
1235
  } else {
1236
  $weeks_day = first_day_of_week( current_time( 'timestamp' ) );
1237
  }
1239
  if ( isset( $_GET['time'] ) && $_GET['time'] == 'day' ) {
1240
  // don't adjust day if viewing day format
1241
  } else {
1242
+ if ( !isset( $_GET['dy'] ) && $day > 20 ) {
1243
  $day = date( 'j', strtotime( "$from + 1 week" ) );
1244
  }
1245
  }
1273
  </div>';
1274
  }
1275
  // set up rss feeds
1276
+ if ( in_array( 'feeds', $used ) ) {
1277
  $ical_m = ( isset( $_GET['month'] ) ) ? (int) $_GET['month'] : date( 'n' );
1278
  $ical_y = ( isset( $_GET['yr'] ) ) ? (int) $_GET['yr'] : date( 'Y' );
1279
  if ( !isset( $nLink ) ) {
1323
 
1324
  $my_calendar_body .= "<div class='mc-main $format $time'>" . $mc_topnav;
1325
  // single day uses independent cycling.
1326
+ $dayclass = strtolower( date( 'D', mktime( 0, 0, 0, $c_month, $c_day, $c_year ) ) );
1327
  $from = $to = "$c_year-$c_month-$c_day";
1328
  //echo "<p>Debug: $from, $to, $category, $ltype, $lvalue, $author</p>";
1329
  $events = my_calendar_grab_events( $from, $to, $category, $ltype, $lvalue, 'calendar', $author, $host );
1344
  } else {
1345
  $mc_events .= __( 'No events scheduled for today!', 'my-calendar' );
1346
  }
1347
+ $hl = apply_filters( 'mc_heading_level', 'h3', $format, $time, $template );
1348
+ $datetime = date_i18n( apply_filters( 'mc_date_format', $date_format, $format, $time ), strtotime( "$c_year-$c_month-$c_day" ) );
1349
  $my_calendar_body .= "
1350
+ <$hl class='mc-single'>" . apply_filters( 'mc_heading', $datetime, $format, $time ) . "</$hl>" . '
1351
  <div id="mc-day" class="' . esc_attr( $dayclass . ' ' . $dateclass . ' ' . $events_class ) . '">' . "$mc_events\n</div>
1352
  </div>";
1353
  } else {
1364
  $through_month_header = date_i18n( $month_format, $through_date );
1365
  $values = array( 'date' => date( 'Y-m-d', $current_date ) );
1366
  // Add the calendar table and heading
1367
+ $caption_text = ' ' . stripslashes( trim( get_option( 'mc_caption' ) ) );
1368
  $my_calendar_body .= $mc_topnav;
1369
  if ( $format == "calendar" || $format == "mini" ) {
1370
+ $table = apply_filters( 'mc_grid_wrapper', 'table', $format );
1371
  $my_calendar_body .= "\n<$table class=\"my-calendar-table\">\n";
1372
  $week_template = ( get_option( 'mc_week_caption' ) != '' ) ? get_option( 'mc_week_caption' ) : 'Week of {date format="M jS"}';
1373
  $week_caption = jd_draw_template( $values, stripslashes( $week_template ) );
1374
  $caption_heading = ( $time != 'week' ) ? $current_date_header . $caption_text : $week_caption . $caption_text;
1375
+ $caption = apply_filters( 'mc_grid_caption', 'caption', $format );
1376
  $my_calendar_body .= "<$caption class=\"heading my-calendar-$time\">" . $caption_heading . "</$caption>\n";
1377
  } else {
1378
  // determine which header text to show depending on number of months displayed;
1379
  if ( $time != 'week' && $time != 'day' ) {
1380
+ $list_heading = ( $num_months <= 1 ) ? $current_date_header . $caption_text . "\n" : $current_month_header . '&ndash;' . $through_month_header . $caption_text;
1381
+ $list_heading = sprintf( __( 'Events in %s', 'my-calendar' ), $list_heading );
1382
  } else {
1383
  $list_heading = jd_draw_template( $values, stripslashes( get_option( 'mc_week_caption' ) ) );
1384
  }
1393
  'month+1'
1394
  ) )
1395
  ) {
1396
+ $tr = apply_filters( 'mc_grid_week_wrapper', 'tr', $format );
1397
+ $th = apply_filters( 'mc_grid_header_wrapper', 'th', $format );
1398
+ $close_th = ( $th == 'th' ) ? 'th' : $th;
1399
  $th .= ( $th == 'th' ) ? ' scope="col"' : '';
1400
  // If in a calendar format, print the headings of the days of the week
1401
  if ( $format == "list" ) {
1402
+ $my_calendar_body .= "<ul id='list-$id' class='mc-list'>";
1403
  } else {
1404
+ $my_calendar_body .= ( $tr == 'tr' ) ? "<thead>\n" : '<div class="mc-table-body">';
1405
+ $my_calendar_body .= "<$tr class='mc-row'>\n";
1406
  for ( $i = 0; $i <= 6; $i ++ ) {
1407
  if ( $start_of_week == 0 ) {
1408
  $class = ( $i < 6 && $i > 0 ) ? 'day-heading' : 'weekend-heading';
1411
  }
1412
  $dayclass = strtolower( strip_tags( $abbrevs[ $i ] ) );
1413
  if ( ( $class == 'weekend-heading' && get_option( 'mc_show_weekends' ) == 'true' ) || $class != 'weekend-heading' ) {
1414
+ $my_calendar_body .= "<$th class='$class $dayclass'>" . $name_days[ $i ] . "</$close_th>\n";
1415
  }
1416
  }
1417
  $my_calendar_body .= "\n</$tr>\n";
1432
  $is_weekend = ( date( 'N', $start ) < 6 ) ? false : true;
1433
  if ( get_option( 'mc_show_weekends' ) == 'true' || ( get_option( 'mc_show_weekends' ) != 'true' && ! $is_weekend ) ) {
1434
  if ( date( 'N', $start ) == $start_of_week && $format != "list" ) {
1435
+ $my_calendar_body .= "<$tr class='mc-row'>";
1436
  }
1437
  // date-based classes
1438
  $monthclass = ( date( 'n', $start ) == $c_month || $time != 'month' ) ? '' : 'nextmonth';
1444
  $events = ( isset( $event_array[ $date ] ) ) ? $event_array[ $date ] : array();
1445
  $events_class = mc_events_class( $events, $date );
1446
  if ( get_option( 'mc_list_javascript' ) != 1 ) {
1447
+ $is_anchor = "<button type='button' class='mc-text-button'>";
1448
+ $is_close_anchor = "</button>";
1449
  } else {
1450
  $is_anchor = $is_close_anchor = "";
1451
  }
1452
+ $td = apply_filters( 'mc_grid_day_wrapper', 'td', $format );
1453
  if ( ! empty( $events ) ) {
1454
  $event_output = my_calendar_draw_events( $events, $format, $date, $time, $template );
1455
  if ( $event_output === true ) {
1496
  'cid',
1497
  'mc_id'
1498
  ), get_option( 'mc_mini_uri' ) );
1499
+ $link = esc_url( ( get_option( 'mc_mini_uri' ) != '' ) ? $date_url . '#' . $atype . '-' . $c_year . '-' . $am . '-' . $ad : '#' );
1500
  }
1501
  $element = "a href='$link'";
1502
  $close = 'a';
1515
  } else {
1516
  $title = '';
1517
  }
 
1518
  if ( $event_output != '' ) {
1519
  $my_calendar_body .= "
1520
  <li id='$format-$date' class='mc-events " . esc_attr( "$dayclass $dateclass $events_class $odd" ) . "'>
1523
  </li>";
1524
  $odd = ( $odd == 'odd' ) ? 'even' : 'odd';
1525
  }
 
1526
  } else {
1527
  $my_calendar_body .= "
1528
  <$td id='$format-$date' class='" . esc_attr( "$dayclass $dateclass $weekend_class $monthclass $events_class" ) . " day-with-date'>" . "
1529
+ <$element class='mc-date $trigger'><span aria-hidden='true'>$thisday_heading</span><span class='screen-reader-text'>" . date_i18n( get_option( 'mc_date_format' ), strtotime( $date ) ) . "</span></$close>" .
1530
  $event_output . "
1531
  </$td>\n";
1532
  }
1557
 
1558
  } while ( $start <= $end );
1559
  }
1560
+ $table = apply_filters( 'mc_grid_wrapper', 'table', $format );
1561
+ $end = ( $table == 'table' ) ? "\n</tbody>\n</table>" : "</div></$table>";
1562
  $my_calendar_body .= ( $format == "list" ) ? "\n</ul>" : $end;
1563
  } else {
1564
  if ( ! in_array( $format, array( 'list', 'calendar', 'mini' ) ) ) {
1610
  if ( $cat->category_private == 1 ) {
1611
  $class .= " private";
1612
  }
1613
+ $url = mc_build_url( array( 'mcat' => $cat->category_id ), array( 'mcat' ) );
1614
  if ( $cat->category_icon != "" && get_option( 'mc_hide_icons' ) != 'true' ) {
1615
+ $key .= '<li class="cat_' . $class . '"><a href="' . $url . '"><span class="category-color-sample"><img src="' . $path . $cat->category_icon . '" alt="" style="background:' . $hex . $cat->category_color . ';" /></span>' . wp_kses_post( stripcslashes( $cat->category_name ) ) . "</a></li>\n";
1616
  } else {
1617
+ $key .= '<li class="cat_' . $class . '"><a href="' . $url . '"><span class="category-color-sample no-icon" style="background:' . $hex . $cat->category_color . ';"> &nbsp; </span>' . wp_kses_post( stripcslashes( $cat->category_name ) ) . "</a></li>\n";
1618
  }
1619
  }
1620
  if ( isset( $_GET['mcat'] ) ) {
1621
+ $key .= "<li class='all-categories'><a href='" . esc_url( remove_query_arg( 'mcat', mc_get_current_url() ) ) . "'>" . apply_filters( 'mc_text_all_categories', __( 'All Categories', 'my-calendar' ) ) . "</a></li>";
1622
  }
1623
  $key .= "</ul>\n</div>";
1624
  $key = apply_filters( 'mc_category_key', $key, $categories );
1787
  <div id='mc_filters'>
1788
  <form action='" . $current_url . "' method='get'>\n";
1789
  $qsa = array();
1790
+ if ( isset( $_SERVER['QUERY_STRING'] ) ) {
1791
+ parse_str( $_SERVER['QUERY_STRING'], $qsa );
1792
+ }
1793
  if ( ! isset( $_GET['cid'] ) ) {
1794
  $form .= '<input type="hidden" name="cid" value="all" />';
1795
  }
1846
  <div>" : '';
1847
  if ( $group == 'single' ) {
1848
  $qsa = array();
1849
+ if ( isset( $_SERVER['QUERY_STRING'] ) ) {
1850
+ parse_str( $_SERVER['QUERY_STRING'], $qsa );
1851
+ }
1852
  if ( ! isset( $_GET['cid'] ) ) {
1853
  $form .= '<input type="hidden" name="cid" value="all" />';
1854
  }
1876
  <option value="all" selected="selected">' . __( 'All Categories', 'my-calendar' ) . '</option>' . "\n";
1877
 
1878
  foreach ( $categories as $category ) {
1879
+ $category_name = wp_kses_post( stripcslashes( $category->category_name ) );
1880
  $mcat = ( empty( $_GET['mcat'] ) ) ? '' : (int) $_GET['mcat'];
1881
  if ( $show == 'list' ) {
1882
  $this_url = mc_build_url( array( 'mcat' => $category->category_id ), array() );
1910
  <div>" : '';
1911
  if ( $group == 'single' ) {
1912
  $qsa = array();
1913
+ if ( isset( $_SERVER['QUERY_STRING'] ) ) {
1914
+ parse_str( $_SERVER['QUERY_STRING'], $qsa );
1915
+ }
1916
  if ( ! isset( $_GET['cid'] ) ) {
1917
  $form .= '<input type="hidden" name="cid" value="all" />';
1918
  }
1926
  }
1927
  $form .= ( $show == 'list' || $group == 'group' ) ? '' : '</div><p>';
1928
 
1929
+ $access_options = mc_event_access();
1930
  if ( ! empty( $access_options ) && count( $access_options ) >= 1 ) {
1931
  $output = "<div id='mc_access'>\n";
1932
  $url = mc_build_url( array( 'access' => 'all' ), array() );
1972
  }
1973
  if ( $home == '' ) {
1974
  if ( is_front_page() ) {
1975
+ $home = home_url( '/' );
1976
  } else if ( is_home() ) {
1977
  $page = get_option( 'page_for_posts' );
1978
  $home = get_permalink( $page );
1998
  } else {
1999
  $char = ( $wp_rewrite->using_permalinks() ) ? '?' : '&amp;'; // this doesn't work -- may *never* need to be &. Consider
2000
  }
2001
+ // escape this when you use it
2002
+ if ( $wp_rewrite->using_index_permalinks() && strpos( $home, 'index.php' ) === false ) {
2003
+ $home = str_replace( home_url(), home_url( '/' ) . 'index.php', $home );
2004
+ }
2005
+
2006
  return $home . $char . http_build_query( $variables, '', '&amp;' );
2007
  }
2008
 
2090
  $url = ( get_option( 'mc_uri' ) != '' ) ? get_option( 'mc_uri' ) : home_url();
2091
  }
2092
  return '
2093
+ <div class="mc-search-container" role="search">
2094
+ <form method="get" action="' . apply_filters( 'mc_search_page', esc_url( $url ) ) . '" >
2095
+ <div class="mc-search">
2096
+ <label class="screen-reader-text" for="mcs">' . __( 'Search Events', 'my-calendar' ) . '</label>
2097
+ <input type="text" value="' . esc_attr( stripslashes( $query ) ) . '" name="mcs" id="mcs" />
2098
+ <input type="submit" id="searchsubmit" value="' . __( 'Search Events', 'my-calendar' ) . '" />
2099
+ </div>
2100
+ </form>
2101
+ </div>';
2102
  }
2103
 
2104
  return '';
2164
  $output .= "<input type='hidden' name='ltype' value='" . esc_attr( $ltype ) . "' />";
2165
  if ( $group == 'single' ) {
2166
  $qsa = array();
2167
+ if ( isset( $_SERVER['QUERY_STRING'] ) ) {
2168
+ parse_str( $_SERVER['QUERY_STRING'], $qsa );
2169
+ }
2170
  if ( ! isset( $_GET['cid'] ) ) {
2171
  $output .= '<input type="hidden" name="cid" value="all" />';
2172
  }
2187
  if ( $type == 'saved' ) {
2188
  foreach ( $location as $k => $value ) {
2189
  $vt = urlencode( trim( $value ) );
2190
+ $value = wp_kses_post( stripcslashes( $value ) );
2191
  if ( $value == '' ) {
2192
  continue;
2193
  }
2198
  }
2199
  if ( $show == 'list' ) {
2200
  $selected = ( $vt == $loc ) ? " class='selected'" : '';
2201
+ $this_url = esc_url( mc_build_url( array( 'loc' => $vt, 'ltype' => $datatype ), array() ) );
2202
  $output .= " <li$selected><a rel='nofollow' href='$this_url'>$value</a></li>\n";
2203
  } else {
2204
  $selected = ( $vt == $loc ) ? " selected='selected'" : '';
2209
  }
2210
  } else {
2211
  $vk = urlencode( trim( $key ) );
2212
+ $location = wp_kses_post( trim( $location ) );
2213
  if ( $location == '' ) {
2214
  continue;
2215
  }
2216
  if ( $show == 'list' ) {
2217
  $selected = ( $vk == $_GET['loc'] ) ? " class='selected'" : '';
2218
+ $this_url = esc_url( mc_build_url( array( 'loc' => $vk, 'ltype' => $datatype ), array() ) );
2219
  $output .= " <li$selected><a rel='nofollow' href='$this_url'>$location</a></li>\n";
2220
  } else {
2221
  $selected = ( $vk == $_GET['loc'] ) ? " selected='selected'" : '';
2251
  }
2252
  if ( get_option( 'mc_user_settings_enabled' ) == 'true' && $enabled == 'on' ) {
2253
  if ( is_user_logged_in() ) {
2254
+ $current_user = wp_get_current_user();
2255
  $current_settings = get_user_meta( $user_ID, 'my_calendar_user_settings', true );
2256
  $tz = ( isset( $current_settings['my_calendar_tz_default'] ) ) ? $current_settings['my_calendar_tz_default'] : '';
2257
  } else {
my-calendar-settings.php CHANGED
@@ -268,6 +268,7 @@ function edit_my_calendar_config() {
268
  update_option( 'mc_show_map', ( ! empty( $_POST['mc_show_map'] ) && $_POST['mc_show_map'] == 'on' ) ? 'true' : 'false' );
269
  update_option( 'mc_gmap', ( ! empty( $_POST['mc_gmap'] ) && $_POST['mc_gmap'] == 'on' ) ? 'true' : 'false' );
270
  update_option( 'mc_show_address', ( ! empty( $_POST['mc_show_address'] ) && $_POST['mc_show_address'] == 'on' ) ? 'true' : 'false' );
 
271
  update_option( 'mc_hide_icons', ( ! empty( $_POST['mc_hide_icons'] ) && $_POST['mc_hide_icons'] == 'on' ) ? 'true' : 'false' );
272
  update_option( 'mc_apply_color', $_POST['mc_apply_color'] );
273
  update_option( 'mc_event_registration', ( ! empty( $_POST['mc_event_registration'] ) && $_POST['mc_event_registration'] == 'on' ) ? 'true' : 'false' );
@@ -311,7 +312,7 @@ function edit_my_calendar_config() {
311
 
312
  echo "<div class=\"updated\"><p><strong>" . __( 'Input Settings saved', 'my-calendar' ) . ".</strong></p></div>";
313
  }
314
- if ( current_user_can( 'manage_network' ) ) {
315
  if ( isset( $_POST['mc_network'] ) ) {
316
  $mc_multisite = (int) $_POST['mc_multisite'];
317
  update_site_option( 'mc_multisite', $mc_multisite );
@@ -392,8 +393,7 @@ function edit_my_calendar_config() {
392
 
393
  <div class="wrap jd-my-calendar mc-settings-page" id="mc_settings">
394
  <?php my_calendar_check_db(); ?>
395
- <div id="icon-options-general" class="icon32"><br/></div>
396
- <h2><?php _e( 'My Calendar Settings', 'my-calendar' ); ?></h2>
397
 
398
  <div class="mc-tabs settings postbox-container jcd-wide">
399
  <div class="metabox-holder">
@@ -433,7 +433,7 @@ function edit_my_calendar_config() {
433
  <li role="tab" id="tab_text" aria-controls="my-calendar-text"><a href="#my-calendar-text"><?php _e( 'Text', 'my-calendar' ); ?></a></li>
434
  <li role="tab" id="tab_output" aria-controls="mc-output"><a href="#mc-output"><?php _e( 'Output', 'my-calendar' ); ?></a></li>
435
  <li role="tab" id="tab_input" aria-controls="my-calendar-input"><a href="#my-calendar-input"><?php _e( 'Input', 'my-calendar' ); ?></a></li>
436
- <?php if ( current_user_can( 'manage_network' ) ) { ?>
437
  <li role="tab" id="tab_multi" aria-controls="my-calendar-multisite"><a href="#my-calendar-multisite"><?php _e( 'Multi-site', 'my-calendar' ); ?></a></li>
438
  <?php } ?>
439
  <li role="tab" id="tab_permissions" aria-controls="my-calendar-permissions"><a href="#my-calendar-permissions"><?php _e( 'Permissions', 'my-calendar' ); ?></a></li>
@@ -443,7 +443,7 @@ function edit_my_calendar_config() {
443
 
444
  <div class="ui-sortable meta-box-sortables">
445
  <div class="wptab postbox" aria-labelledby="tab_manage" role="tabpanel" aria-live="assertive" id="my-calendar-manage">
446
- <h3><?php _e( 'My Calendar Management', 'my-calendar' ); ?></h3>
447
 
448
  <div class="inside">
449
  <?php if ( current_user_can( 'administrator' ) ) { ?>
@@ -490,7 +490,7 @@ function edit_my_calendar_config() {
490
  '1' => __( 'Currently editing the network calendar', 'my-calendar' )
491
  ), '0', '', array(), 'radio' );
492
  } else {
493
- if ( get_option( 'mc_remote' ) != 'true' && current_user_can( 'manage_network' ) ) {
494
  ?>
495
  <li><?php _e( 'You are currently working in the primary site for this network; your local calendar is also the global table.', 'my-calendar' ); ?></li><?php
496
  }
@@ -510,7 +510,7 @@ function edit_my_calendar_config() {
510
  </div>
511
 
512
  <div class="wptab postbox" aria-labelledby="tab_text" role="tabpanel" aria-live="assertive" id="my-calendar-text">
513
- <h3><?php _e( 'Text Settings', 'my-calendar' ); ?></h3>
514
 
515
  <div class="inside">
516
  <form method="post" action="<?php echo admin_url( "admin.php?page=my-calendar-config#my-calendar-text" ); ?>">
@@ -563,7 +563,7 @@ function edit_my_calendar_config() {
563
  </div>
564
 
565
  <div class="wptab postbox" aria-labelledby="tab_output" role="tabpanel" aria-live="assertive" id="mc-output">
566
- <h3><?php _e( 'Output Settings', 'my-calendar' ); ?></h3>
567
 
568
  <div class="inside">
569
  <form method="post" action="<?php echo admin_url( "admin.php?page=my-calendar-config#mc-output" ); ?>">
@@ -574,8 +574,16 @@ function edit_my_calendar_config() {
574
  <legend><?php _e( 'Calendar Link Targets', 'my-calendar' ); ?></legend>
575
  <ul>
576
  <?php $guess = mc_guess_calendar(); ?>
577
- <li><?php mc_settings_field( 'mc_uri', __( 'Where is your main calendar page?', 'my-calendar' ), '', "$guess[message]", array( 'size' => '60' ), 'url' ); ?></li>
578
- <li><?php mc_settings_field( 'mc_use_permalinks', __( 'Use Pretty Permalinks for Events','my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>
 
 
 
 
 
 
 
 
579
  <li><?php mc_settings_field( 'mc_open_uri', __( 'Open calendar links to event details URL', 'my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>
580
  <li><?php mc_settings_field( 'mc_mini_uri', __( 'Target <abbr title="Uniform resource locator">URL</abbr> for mini calendar date links:', 'my-calendar' ), '', '', array( 'size' => '60' ), 'url' ); ?></li>
581
  <?php
@@ -597,7 +605,8 @@ function edit_my_calendar_config() {
597
  <li><?php mc_settings_field( 'mc_show_weekends', __( 'Show Weekends on Calendar', 'my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>
598
  <li><?php mc_settings_field( 'mc_convert', array(
599
  'true' => __( 'Switch to list view on mobile devices', 'my-calendar' ),
600
- 'mini' => __( 'Switch to mini calendar on mobile devices', 'my-calendar' )
 
601
  ), 'false', '', array(), 'radio' ); ?></li>
602
  </ul>
603
  </fieldset>
@@ -689,6 +698,7 @@ function edit_my_calendar_config() {
689
  <li><?php mc_settings_field( 'mc_desc', __( 'Full description', 'my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>
690
  <li><?php mc_settings_field( 'mc_process_shortcodes', __( 'Process WordPress shortcodes in descriptions', 'my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>
691
  <li><?php mc_settings_field( 'mc_event_link', __( 'External link', 'my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>
 
692
  <li><?php mc_settings_field( 'mc_event_registration', __( 'Registration info', 'my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>
693
  </ul>
694
  </fieldset>
@@ -712,7 +722,7 @@ function edit_my_calendar_config() {
712
  </div>
713
 
714
  <div class="wptab postbox" aria-labelledby="tab_input" role="tabpanel" aria-live="assertive" id="my-calendar-input">
715
- <h3><?php _e( 'Calendar Input Fields', 'my-calendar' ); ?></h3>
716
 
717
  <div class="inside">
718
  <form method="post" action="<?php echo admin_url( "admin.php?page=my-calendar-config#my-calendar-input" ); ?>">
@@ -785,9 +795,9 @@ function edit_my_calendar_config() {
785
  </div>
786
  </div>
787
 
788
- <?php if ( current_user_can( 'manage_network' ) ) { ?>
789
  <div class="wptab postbox" aria-labelledby="tab_multi" role="tabpanel" aria-live="assertive" id="my-calendar-multisite">
790
- <h3><?php _e( 'Multisite Settings (Network Administrators only)', 'my-calendar' ); ?></h3>
791
 
792
  <div class="inside">
793
  <p><?php _e( 'The central calendar is the calendar associated with the primary site in your WordPress Multisite network.', 'my-calendar' ); ?></p>
@@ -835,7 +845,7 @@ function edit_my_calendar_config() {
835
  <?php } ?>
836
 
837
  <div class="wptab postbox" aria-labelledby="tab_permissions" role="tabpanel" aria-live="assertive" id="my-calendar-permissions">
838
- <h3><?php _e( 'My Calendar Permissions', 'my-calendar' ); ?></h3>
839
 
840
  <div class="inside">
841
  <?php if ( current_user_can( 'administrator' ) ) { ?>
@@ -863,7 +873,7 @@ function edit_my_calendar_config() {
863
  if ( $role == 'administrator' ) {
864
  continue;
865
  }
866
- $role_container .= "<div class='mc_$role mc_permissions' id='mc_$role'><fieldset id='mc_$role' class='roles'><legend>$rolename</legend>";
867
  $role_container .= "<input type='hidden' value='none' name='mc_caps[" . $role . "][none]' />
868
  <ul class='mc-settings checkboxes'>";
869
  foreach ( $caps as $cap => $name ) {
@@ -886,7 +896,7 @@ function edit_my_calendar_config() {
886
  </div>
887
 
888
  <div class="wptab postbox" aria-labelledby="tab_email" role="tabpanel" aria-live="assertive" id="my-calendar-email">
889
- <h3><?php _e( 'Calendar Email Settings', 'my-calendar' ); ?></h3>
890
 
891
  <div class="inside">
892
  <form method="post" action="<?php echo admin_url( "admin.php?page=my-calendar-config#my-calendar-email" ); ?>">
268
  update_option( 'mc_show_map', ( ! empty( $_POST['mc_show_map'] ) && $_POST['mc_show_map'] == 'on' ) ? 'true' : 'false' );
269
  update_option( 'mc_gmap', ( ! empty( $_POST['mc_gmap'] ) && $_POST['mc_gmap'] == 'on' ) ? 'true' : 'false' );
270
  update_option( 'mc_show_address', ( ! empty( $_POST['mc_show_address'] ) && $_POST['mc_show_address'] == 'on' ) ? 'true' : 'false' );
271
+ update_option( 'mc_display_more', ( ! empty( $_POST['mc_display_more'] ) && $_POST['mc_display_more'] == 'on' ) ? 'true' : 'false' );
272
  update_option( 'mc_hide_icons', ( ! empty( $_POST['mc_hide_icons'] ) && $_POST['mc_hide_icons'] == 'on' ) ? 'true' : 'false' );
273
  update_option( 'mc_apply_color', $_POST['mc_apply_color'] );
274
  update_option( 'mc_event_registration', ( ! empty( $_POST['mc_event_registration'] ) && $_POST['mc_event_registration'] == 'on' ) ? 'true' : 'false' );
312
 
313
  echo "<div class=\"updated\"><p><strong>" . __( 'Input Settings saved', 'my-calendar' ) . ".</strong></p></div>";
314
  }
315
+ if ( current_user_can( 'manage_network' ) && is_multisite() ) {
316
  if ( isset( $_POST['mc_network'] ) ) {
317
  $mc_multisite = (int) $_POST['mc_multisite'];
318
  update_site_option( 'mc_multisite', $mc_multisite );
393
 
394
  <div class="wrap jd-my-calendar mc-settings-page" id="mc_settings">
395
  <?php my_calendar_check_db(); ?>
396
+ <h1><?php _e( 'My Calendar Settings', 'my-calendar' ); ?></h1>
 
397
 
398
  <div class="mc-tabs settings postbox-container jcd-wide">
399
  <div class="metabox-holder">
433
  <li role="tab" id="tab_text" aria-controls="my-calendar-text"><a href="#my-calendar-text"><?php _e( 'Text', 'my-calendar' ); ?></a></li>
434
  <li role="tab" id="tab_output" aria-controls="mc-output"><a href="#mc-output"><?php _e( 'Output', 'my-calendar' ); ?></a></li>
435
  <li role="tab" id="tab_input" aria-controls="my-calendar-input"><a href="#my-calendar-input"><?php _e( 'Input', 'my-calendar' ); ?></a></li>
436
+ <?php if ( current_user_can( 'manage_network' ) && is_multisite() ) { ?>
437
  <li role="tab" id="tab_multi" aria-controls="my-calendar-multisite"><a href="#my-calendar-multisite"><?php _e( 'Multi-site', 'my-calendar' ); ?></a></li>
438
  <?php } ?>
439
  <li role="tab" id="tab_permissions" aria-controls="my-calendar-permissions"><a href="#my-calendar-permissions"><?php _e( 'Permissions', 'my-calendar' ); ?></a></li>
443
 
444
  <div class="ui-sortable meta-box-sortables">
445
  <div class="wptab postbox" aria-labelledby="tab_manage" role="tabpanel" aria-live="assertive" id="my-calendar-manage">
446
+ <h2><?php _e( 'My Calendar Management', 'my-calendar' ); ?></h2>
447
 
448
  <div class="inside">
449
  <?php if ( current_user_can( 'administrator' ) ) { ?>
490
  '1' => __( 'Currently editing the network calendar', 'my-calendar' )
491
  ), '0', '', array(), 'radio' );
492
  } else {
493
+ if ( get_option( 'mc_remote' ) != 'true' && current_user_can( 'manage_network' ) && is_multisite() ) {
494
  ?>
495
  <li><?php _e( 'You are currently working in the primary site for this network; your local calendar is also the global table.', 'my-calendar' ); ?></li><?php
496
  }
510
  </div>
511
 
512
  <div class="wptab postbox" aria-labelledby="tab_text" role="tabpanel" aria-live="assertive" id="my-calendar-text">
513
+ <h2><?php _e( 'Text Settings', 'my-calendar' ); ?></h2>
514
 
515
  <div class="inside">
516
  <form method="post" action="<?php echo admin_url( "admin.php?page=my-calendar-config#my-calendar-text" ); ?>">
563
  </div>
564
 
565
  <div class="wptab postbox" aria-labelledby="tab_output" role="tabpanel" aria-live="assertive" id="mc-output">
566
+ <h2><?php _e( 'Output Settings', 'my-calendar' ); ?></h2>
567
 
568
  <div class="inside">
569
  <form method="post" action="<?php echo admin_url( "admin.php?page=my-calendar-config#mc-output" ); ?>">
574
  <legend><?php _e( 'Calendar Link Targets', 'my-calendar' ); ?></legend>
575
  <ul>
576
  <?php $guess = mc_guess_calendar(); ?>
577
+ <li><?php mc_settings_field( 'mc_uri', __( 'Where is your main calendar page?', 'my-calendar' ), '', "$guess[message]", array( 'size' => '60' ), 'url' ); ?></li>
578
+ <?php
579
+ if ( isset( $_POST['mc_use_permalinks'] ) && $note != '' ) {
580
+ $url = admin_url( 'options-permalink.php#mc_cpt_base' );
581
+ $note = ' <span class="mc-notice">' . sprintf( __( 'Go to <a href="%s">permalink settings</a> to set the base URL for events.', 'my-calendar' ) . '</span>', $url );
582
+ } else {
583
+ $note = '';
584
+ }
585
+ ?>
586
+ <li><?php mc_settings_field( 'mc_use_permalinks', __( 'Use Pretty Permalinks for Events','my-calendar' ), '', $note, array(), 'checkbox-single' ); ?></li>
587
  <li><?php mc_settings_field( 'mc_open_uri', __( 'Open calendar links to event details URL', 'my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>
588
  <li><?php mc_settings_field( 'mc_mini_uri', __( 'Target <abbr title="Uniform resource locator">URL</abbr> for mini calendar date links:', 'my-calendar' ), '', '', array( 'size' => '60' ), 'url' ); ?></li>
589
  <?php
605
  <li><?php mc_settings_field( 'mc_show_weekends', __( 'Show Weekends on Calendar', 'my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>
606
  <li><?php mc_settings_field( 'mc_convert', array(
607
  'true' => __( 'Switch to list view on mobile devices', 'my-calendar' ),
608
+ 'mini' => __( 'Switch to mini calendar on mobile devices', 'my-calendar' ),
609
+ 'none' => __( 'Do not switch calendar mode', 'my-calendar' )
610
  ), 'false', '', array(), 'radio' ); ?></li>
611
  </ul>
612
  </fieldset>
698
  <li><?php mc_settings_field( 'mc_desc', __( 'Full description', 'my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>
699
  <li><?php mc_settings_field( 'mc_process_shortcodes', __( 'Process WordPress shortcodes in descriptions', 'my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>
700
  <li><?php mc_settings_field( 'mc_event_link', __( 'External link', 'my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>
701
+ <li><?php mc_settings_field( 'mc_display_more', __( 'More details link', 'my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>
702
  <li><?php mc_settings_field( 'mc_event_registration', __( 'Registration info', 'my-calendar' ), '', '', array(), 'checkbox-single' ); ?></li>
703
  </ul>
704
  </fieldset>
722
  </div>
723
 
724
  <div class="wptab postbox" aria-labelledby="tab_input" role="tabpanel" aria-live="assertive" id="my-calendar-input">
725
+ <h2><?php _e( 'Calendar Input Fields', 'my-calendar' ); ?></h2>
726
 
727
  <div class="inside">
728
  <form method="post" action="<?php echo admin_url( "admin.php?page=my-calendar-config#my-calendar-input" ); ?>">
795
  </div>
796
  </div>
797
 
798
+ <?php if ( current_user_can( 'manage_network' ) && is_multisite() ) { ?>
799
  <div class="wptab postbox" aria-labelledby="tab_multi" role="tabpanel" aria-live="assertive" id="my-calendar-multisite">
800
+ <h2><?php _e( 'Multisite Settings (Network Administrators only)', 'my-calendar' ); ?></h2>
801
 
802
  <div class="inside">
803
  <p><?php _e( 'The central calendar is the calendar associated with the primary site in your WordPress Multisite network.', 'my-calendar' ); ?></p>
845
  <?php } ?>
846
 
847
  <div class="wptab postbox" aria-labelledby="tab_permissions" role="tabpanel" aria-live="assertive" id="my-calendar-permissions">
848
+ <h2><?php _e( 'My Calendar Permissions', 'my-calendar' ); ?></h2>
849
 
850
  <div class="inside">
851
  <?php if ( current_user_can( 'administrator' ) ) { ?>
873
  if ( $role == 'administrator' ) {
874
  continue;
875
  }
876
+ $role_container .= "<div class='mc_$role mc_permissions' id='container_mc_$role'><fieldset id='mc_$role' class='roles'><legend>$rolename</legend>";
877
  $role_container .= "<input type='hidden' value='none' name='mc_caps[" . $role . "][none]' />
878
  <ul class='mc-settings checkboxes'>";
879
  foreach ( $caps as $cap => $name ) {
896
  </div>
897
 
898
  <div class="wptab postbox" aria-labelledby="tab_email" role="tabpanel" aria-live="assertive" id="my-calendar-email">
899
+ <h2><?php _e( 'Calendar Email Settings', 'my-calendar' ); ?></h2>
900
 
901
  <div class="inside">
902
  <form method="post" action="<?php echo admin_url( "admin.php?page=my-calendar-config#my-calendar-email" ); ?>">
my-calendar-shortcodes.php CHANGED
@@ -136,10 +136,11 @@ function my_calendar_show_event( $atts ) {
136
  'template' => '<h3>{title}</h3>{description}',
137
  'list' => '<li>{date}, {time}</li>',
138
  'before' => '<ul>',
139
- 'after' => '</ul>'
 
140
  ), $atts, 'my_calendar_event' ) );
141
 
142
- return mc_instance_list( $event, false, $template, $list, $before, $after );
143
  }
144
 
145
  function my_calendar_search( $atts ) {
136
  'template' => '<h3>{title}</h3>{description}',
137
  'list' => '<li>{date}, {time}</li>',
138
  'before' => '<ul>',
139
+ 'after' => '</ul>',
140
+ 'instance' => false
141
  ), $atts, 'my_calendar_event' ) );
142
 
143
+ return mc_instance_list( $event, false, $template, $list, $before, $after, $instance );
144
  }
145
 
146
  function my_calendar_search( $atts ) {
my-calendar-styles.php CHANGED
@@ -98,8 +98,10 @@ function mc_write_styles( $stylefile, $my_calendar_style ) {
98
  }
99
 
100
  function edit_my_calendar_styles() {
 
101
  if ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT == true ) {
102
- exit;
 
103
  }
104
  $dir = plugin_dir_path( __FILE__ );
105
  if ( isset( $_POST['mc_edit_style'] ) ) {
@@ -110,13 +112,13 @@ function edit_my_calendar_styles() {
110
  $my_calendar_style = ( isset( $_POST['style'] ) ) ? stripcslashes( $_POST['style'] ) : false;
111
  $mc_css_file = stripcslashes( $_POST['mc_css_file'] );
112
 
113
- $stylefile = mc_get_style_path( $mc_css_file );
114
- $wrote_styles = ( $my_calendar_style !== false ) ? mc_write_styles( $stylefile, $my_calendar_style ) : 'disabled';
115
- if ( $wrote_styles == true ) {
116
- // updates from pre version 1.7.0
117
- delete_option( 'mc_file_permissions' );
118
- delete_option( 'mc_style' );
119
  }
 
120
  if ( $wrote_styles === 'disabled' ) {
121
  $message = "<p>" . __( "Styles are disabled, and were not edited.", 'my-calendar' ) . "</p>";
122
  } else {
@@ -166,12 +168,12 @@ function edit_my_calendar_styles() {
166
  ?>
167
  <div class="wrap jd-my-calendar">
168
  <?php my_calendar_check_db(); ?>
169
- <h2><?php _e( 'My Calendar Styles', 'my-calendar' ); ?></h2>
170
  <div class="postbox-container jcd-wide">
171
  <div class="metabox-holder">
172
  <div class="ui-sortable meta-box-sortables">
173
  <div class="postbox">
174
- <h3><?php _e( 'Calendar Style Settings', 'my-calendar' ); ?></h3>
175
 
176
  <div class="inside">
177
 
@@ -179,22 +181,24 @@ function edit_my_calendar_styles() {
179
  <div><input type="hidden" name="_wpnonce"
180
  value="<?php echo wp_create_nonce( 'my-calendar-nonce' ); ?>"/></div>
181
  <div><input type="hidden" value="true" name="mc_choose_style"/></div>
 
 
 
 
 
 
182
  <fieldset>
183
  <p>
184
  <label
185
  for="mc_css_file"><?php _e( 'Select My Calendar Theme', 'my-calendar' ); ?></label>
186
  <select name="mc_css_file" id="mc_css_file"><?php
187
- $custom_directory = str_replace( '/my-calendar/', '', $dir ) . '/my-calendar-custom/styles/';
188
- $directory = dirname( __FILE__ ) . '/styles/';
189
-
190
- $files = @my_csslist( $custom_directory );
191
  if ( ! empty( $files ) ) {
192
  echo "<optgroup label='" . __( 'Your Custom Stylesheets', 'my-calendar' ) . "'>\n";
193
  foreach ( $files as $value ) {
194
- $filepath = mc_get_style_path( $value );
 
195
  $path = pathinfo( $filepath );
196
- if ( $path['extension'] == 'css' ) {
197
- $test = "mc_custom_" . $value;
198
  $selected = ( get_option( 'mc_css_file' ) == $test ) ? " selected='selected'" : "";
199
  echo "<option value='mc_custom_$value'$selected>$value</option>\n";
200
  }
@@ -250,9 +254,10 @@ function edit_my_calendar_styles() {
250
  <?php if ( mc_is_custom_style( get_option( 'mc_css_file' ) ) ) {
251
  _e( 'The editor is not available for custom CSS files. Edit your custom CSS locally, then upload your changes.', 'my-calendar' );
252
  } else {
 
253
  ?>
254
  <label
255
- for="style"><?php _e( 'Edit the stylesheet for My Calendar', 'my-calendar' ); ?></label><br/><textarea
256
  class="style-editor" id="style" name="style" rows="30"
257
  cols="80"<?php if ( get_option( 'mc_use_styles' ) == 'true' ) {
258
  echo "disabled='disabled'";
@@ -320,7 +325,7 @@ function mc_text_diff( $left_string, $right_string, $args = null ) {
320
  if ( !$diff )
321
  return '';
322
  if ( $args['title'] ) {
323
- $r .= "<h3>$args[title]</h3>\n";
324
  }
325
 
326
  $r .= "<table class='diff'>\n";
98
  }
99
 
100
  function edit_my_calendar_styles() {
101
+ $edit_files = true;
102
  if ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT == true ) {
103
+ $edit_files = false;
104
+ echo "<div class='my-calendar-notice updated error'><p>" . __( 'File editing is disallowed in your WordPress installation. Edit your stylesheets offline.', 'my-calendar' ) . "</p></div>";
105
  }
106
  $dir = plugin_dir_path( __FILE__ );
107
  if ( isset( $_POST['mc_edit_style'] ) ) {
112
  $my_calendar_style = ( isset( $_POST['style'] ) ) ? stripcslashes( $_POST['style'] ) : false;
113
  $mc_css_file = stripcslashes( $_POST['mc_css_file'] );
114
 
115
+ if ( $edit_files ) {
116
+ $stylefile = mc_get_style_path( $mc_css_file );
117
+ $wrote_styles = ( $my_calendar_style !== false ) ? mc_write_styles( $stylefile, $my_calendar_style ) : 'disabled';
118
+ } else {
119
+ $wrote_styles = false;
 
120
  }
121
+
122
  if ( $wrote_styles === 'disabled' ) {
123
  $message = "<p>" . __( "Styles are disabled, and were not edited.", 'my-calendar' ) . "</p>";
124
  } else {
168
  ?>
169
  <div class="wrap jd-my-calendar">
170
  <?php my_calendar_check_db(); ?>
171
+ <h1><?php _e( 'My Calendar Styles', 'my-calendar' ); ?></h1>
172
  <div class="postbox-container jcd-wide">
173
  <div class="metabox-holder">
174
  <div class="ui-sortable meta-box-sortables">
175
  <div class="postbox">
176
+ <h2><?php _e( 'Calendar Style Settings', 'my-calendar' ); ?></h2>
177
 
178
  <div class="inside">
179
 
181
  <div><input type="hidden" name="_wpnonce"
182
  value="<?php echo wp_create_nonce( 'my-calendar-nonce' ); ?>"/></div>
183
  <div><input type="hidden" value="true" name="mc_choose_style"/></div>
184
+ <?php
185
+ $custom_directory = str_replace( '/my-calendar/', '', $dir ) . '/my-calendar-custom/styles/';
186
+ $directory = dirname( __FILE__ ) . '/styles/';
187
+
188
+ $files = @my_csslist( $custom_directory );
189
+ ?>
190
  <fieldset>
191
  <p>
192
  <label
193
  for="mc_css_file"><?php _e( 'Select My Calendar Theme', 'my-calendar' ); ?></label>
194
  <select name="mc_css_file" id="mc_css_file"><?php
 
 
 
 
195
  if ( ! empty( $files ) ) {
196
  echo "<optgroup label='" . __( 'Your Custom Stylesheets', 'my-calendar' ) . "'>\n";
197
  foreach ( $files as $value ) {
198
+ $test = "mc_custom_" . $value;
199
+ $filepath = mc_get_style_path( $test );
200
  $path = pathinfo( $filepath );
201
+ if ( $path['extension'] == 'css' ) {
 
202
  $selected = ( get_option( 'mc_css_file' ) == $test ) ? " selected='selected'" : "";
203
  echo "<option value='mc_custom_$value'$selected>$value</option>\n";
204
  }
254
  <?php if ( mc_is_custom_style( get_option( 'mc_css_file' ) ) ) {
255
  _e( 'The editor is not available for custom CSS files. Edit your custom CSS locally, then upload your changes.', 'my-calendar' );
256
  } else {
257
+ $disabled = ( $edit_files ) ? '' : ' disabled="disabled"';
258
  ?>
259
  <label
260
+ for="style"><?php _e( 'Edit the stylesheet for My Calendar', 'my-calendar' ); ?></label><br/><textarea <?php echo $disabled; ?>
261
  class="style-editor" id="style" name="style" rows="30"
262
  cols="80"<?php if ( get_option( 'mc_use_styles' ) == 'true' ) {
263
  echo "disabled='disabled'";
325
  if ( !$diff )
326
  return '';
327
  if ( $args['title'] ) {
328
+ $r .= "<h2>$args[title]</h2>\n";
329
  }
330
 
331
  $r .= "<table class='diff'>\n";
my-calendar-templates.php CHANGED
@@ -7,6 +7,8 @@ if ( ! defined( 'ABSPATH' ) ) {
7
  function jd_draw_template( $array, $template, $type = 'list' ) {
8
  $template = stripcslashes( $template );
9
  foreach ( $array as $key => $value ) {
 
 
10
  if ( is_object( $value ) && ! empty( $value ) ) {
11
  // null values return false...
12
  } else {
@@ -24,6 +26,7 @@ function jd_draw_template( $array, $template, $type = 'list' ) {
24
  if ( $matches ) {
25
  $number = count( $matches[0] );
26
  for ( $i=0; $i<=$number; $i++ ) {
 
27
  $before = @$matches[1][$i];
28
  $after = @$matches[2][$i];
29
  $format = @$matches[3][$i];
@@ -33,6 +36,7 @@ function jd_draw_template( $array, $template, $type = 'list' ) {
33
  $value = ( $value == '' ) ? '' : $before . $value . $after;
34
  $search = @$matches[0][$i];
35
  $template = str_replace( $search, $value, $template );
 
36
  }
37
  }
38
  } else { // don't do preg match (never required for RSS)
@@ -111,6 +115,7 @@ function mc_clean_location( $event, $source = 'event' ) {
111
  $event->location_label = '';
112
  }
113
  }
 
114
  return $event;
115
  }
116
 
@@ -123,14 +128,14 @@ function mc_maplink( $event, $request = 'map', $source = 'event' ) {
123
  }
124
  $zoom = ( $event->event_zoom != 0 ) ? $event->event_zoom : '15';
125
  $url = $event->event_url;
126
- $map_label = stripslashes( ( $event->event_label != "" ) ? $event->event_label : $event->event_title );
127
  $map_string = str_replace( " ", "+", $map_string );
128
  if ( $event->event_longitude != '0.000000' && $event->event_latitude != '0.000000' ) {
129
  $map_string = "$event->event_latitude,$event->event_longitude";
130
  }
131
  } else {
132
  $url = $event->location_url;
133
- $map_label = stripslashes( ( $event->location_label != "" ) ? $event->location_label : $event->event_title );
134
  $zoom = ( $event->location_zoom != 0 ) ? $event->location_zoom : '15';
135
  $map_string = str_replace( " ", "+", $map_string );
136
  if ( $event->location_longitude != '0.000000' && $event->location_latitude != '0.000000' ) {
@@ -138,11 +143,12 @@ function mc_maplink( $event, $request = 'map', $source = 'event' ) {
138
  }
139
  }
140
  if ( strlen( trim( $map_string ) ) > 6 ) {
141
- $map_url = "http://maps.google.com/maps?z=$zoom&amp;daddr=$map_string";
142
- $map = "<a href=\"$map_url\" class='map-link external'>" . sprintf( __( 'Map<span> to %s</span>', 'my-calendar' ), $map_label ) . "</a>";
 
143
  } else if ( esc_url( $url ) ) {
144
  $map_url = $url;
145
- $map = "<a href=\"$map_url\" class='map-link external map-url'>" . sprintf( __( 'Map<span> to %s</span>', 'my-calendar' ), $map_label ) . "</a>";
146
  } else {
147
  $map_url = '';
148
  $map = '';
@@ -173,14 +179,18 @@ function mc_hcard( $event, $address = 'true', $map = 'true', $source = 'event',
173
  $the_map = mc_maplink( $event, 'url', $source );
174
  $event = mc_clean_location( $event, $source );
175
  $url = ( $source == 'event' ) ? $event->event_url : $event->location_url;
176
- $label = stripslashes( ( $source == 'event' ) ? $event->event_label : $event->location_label );
177
- $street = stripslashes( ( $source == 'event' ) ? $event->event_street : $event->location_street );
178
- $street2 = stripslashes( ( $source == 'event' ) ? $event->event_street2 : $event->location_street2 );
179
- $city = stripslashes( ( $source == 'event' ) ? $event->event_city : $event->location_city );
180
- $state = stripslashes( ( $source == 'event' ) ? $event->event_state : $event->location_state );
181
- $zip = stripslashes( ( $source == 'event' ) ? $event->event_postcode : $event->location_postcode );
182
- $country = stripslashes( ( $source == 'event' ) ? $event->event_country : $event->location_country );
183
- $phone = stripslashes( ( $source == 'event' ) ? $event->event_phone : $event->location_phone );
 
 
 
 
184
  if ( ! $url && ! $label && ! $street && ! $street2 && ! $city && ! $state && ! $zip && ! $country && ! $phone ) {
185
  return '';
186
  }
@@ -227,30 +237,32 @@ function mc_create_tags( $event, $context = 'filters' ) {
227
  $e['access'] = mc_expand( get_post_meta( $event->event_post, '_mc_event_access', true ) );
228
 
229
  // date & time fields
230
- $real_end_date = $event->occur_end;
231
- $dtstart = mc_format_timestamp( strtotime( $event->occur_begin ) );
 
232
  $dtend = mc_format_timestamp( strtotime( $real_end_date ) );
233
 
234
  $e['date_utc'] = date_i18n( apply_filters( 'mc_date_format', $date_format, 'template_begin_ts' ), $event->ts_occur_begin );
235
  $e['date_end_utc'] = date_i18n( apply_filters( 'mc_date_format', $date_format, 'template_end_ts' ), $event->ts_occur_end );
236
  $notime = mc_notime_label( $event );
237
- $e['time'] = ( date( 'H:i:s', strtotime( $event->occur_begin ) ) == '00:00:00' ) ? $notime : date( get_option( 'mc_time_format' ), strtotime( $event->occur_begin ) );
238
- $e['time24'] = ( date( 'G:i', strtotime( $event->occur_begin ) ) == '00:00:00' ) ? $notime : date( get_option( 'mc_time_format' ), strtotime( $event->occur_begin ) );
239
  $endtime = ( $event->event_end == '23:59:59' ) ? '00:00:00' : date( 'H:i:s', strtotime( $real_end_date ) );
240
- $e['endtime'] = ( $real_end_date == $event->occur_begin || $event->event_hide_end == 1 || date( 'H:i:s', strtotime( $real_end_date ) ) == '23:59:59' ) ? '' : date_i18n( get_option( 'mc_time_format' ), strtotime( $endtime ) );
241
  $e['runtime'] = mc_runtime( $event->ts_occur_begin, $event->ts_occur_end, $event );
242
- $e['dtstart'] = date( 'Y-m-d\TH:i:s', strtotime( $event->occur_begin ) );// hcal formatted
243
  $e['dtend'] = date( 'Y-m-d\TH:i:s', strtotime( $real_end_date ) ); //hcal formatted end
244
  $e['rssdate'] = date( 'D, d M Y H:i:s +0000', strtotime( $event->event_added ) );
245
- $date = date_i18n( apply_filters( 'mc_date_format', $date_format, 'template_begin' ), strtotime( $event->occur_begin ) );
246
  $date_end = date_i18n( apply_filters( 'mc_date_format', $date_format, 'template_end' ), strtotime( $real_end_date ) );
247
- $date_arr = array( 'occur_begin' => $event->occur_begin, 'occur_end' => $real_end_date );
248
  $date_obj = (object) $date_arr;
249
  if ( $event->event_span == 1 ) {
250
  $dates = mc_event_date_span( $event->event_group_id, $event->event_span, array( 0 => $date_obj ) );
251
  } else {
252
  $dates = array();
253
  }
 
254
  $e['date'] = ( $event->event_span != 1 ) ? $date : mc_format_date_span( $dates, 'simple', $date );
255
  $e['enddate'] = $date_end;
256
  $e['daterange'] = ( $date == $date_end ) ? $date : "<span class='mc_db'>$date</span> <span>&ndash;</span> <span class='mc_de'>$date_end</span>";
@@ -258,7 +270,7 @@ function mc_create_tags( $event, $context = 'filters' ) {
258
  $e['datespan'] = ( $event->event_span == 1 || ( $e['date'] != $e['enddate'] ) ) ? mc_format_date_span( $dates ) : $date;
259
  $e['multidate'] = mc_format_date_span( $dates, 'complex', "<span class='fallback-date'>$date</span><span class='separator'>,</span> <span class='fallback-time'>$e[time]</span>&ndash;<span class='fallback-endtime'>$e[endtime]</span>" );
260
  $e['began'] = $event->event_begin; // returns date of first occurrence of an event.
261
- $e['recurs'] = mc_event_recur_string( $event );
262
  $e['repeats'] = $event->event_repeats;
263
 
264
  // category fields
@@ -300,7 +312,7 @@ function mc_create_tags( $event, $context = 'filters' ) {
300
  $e['date'],
301
  $e['time']
302
  );
303
- $e_label = str_replace( $tags, $replacements, $e_template );
304
  //$e_label = mc_get_details_label( $event, $e ); // recursive...hmmmm.
305
  $e_link = mc_get_details_link( $event );
306
  $e['link'] = mc_event_link( $event );
@@ -417,6 +429,14 @@ function mc_event_link( $event ) {
417
  return $link;
418
  }
419
 
 
 
 
 
 
 
 
 
420
  function mc_event_open( $event ) {
421
  if ( $event->event_open == '1' ) {
422
  $event_open = get_option( 'mc_event_open' );
@@ -437,6 +457,7 @@ function mc_generate_map( $event, $source = 'event' ) {
437
  $category_icon = "//maps.google.com/mapfiles/marker_green.png";
438
  }
439
  $address = addslashes( mc_map_string( $event, $source ) );
 
440
  if ( strlen( $address ) < 10 ) {
441
  return '';
442
  }
@@ -450,6 +471,7 @@ function mc_generate_map( $event, $source = 'event' ) {
450
  $width = apply_filters( 'mc_map_height', '100%', $event );
451
  $height = apply_filters( 'mc_map_height', '300px', $event );
452
  $styles = " style='width: $width;height: $height'";
 
453
  $value = "
454
  <script type='text/javascript'>
455
  (function ($) { 'use strict';
@@ -458,9 +480,9 @@ function mc_generate_map( $event, $source = 'event' ) {
458
  {
459
  marker:{
460
  values:[{
461
- address: '$address',
462
  options: { icon: new google.maps.MarkerImage( '$category_icon', new google.maps.Size(32,32,'px','px') ) },
463
- data:'$html'
464
  }],
465
  events:{
466
  click: function( marker, event, context ){
@@ -610,12 +632,13 @@ add_filter( 'mc_filter_shortcodes', 'mc_auto_excerpt', 10, 2 );
610
  function mc_auto_excerpt( $e, $event ) {
611
  $description = $e['description'];
612
  $shortdesc = $e['shortdesc'];
613
- $e['excerpt'] = $shortdesc;
614
  if ( $description != '' ) { // if description is empty, this won't work, so skip it.
615
  $num_words = apply_filters( 'mc_excerpt_length', 55 );
616
  $excerpt = wp_trim_words( $description, $num_words );
617
- $e['excerpt'] = ( $shortdesc == '' ) ? $excerpt : $shortdesc;
 
618
  }
 
619
 
620
  return $e;
621
  }
@@ -623,7 +646,7 @@ function mc_auto_excerpt( $e, $event ) {
623
  add_filter( 'mc_filter_image_data', 'mc_image_data', 10, 2 );
624
  function mc_image_data( $e, $event ) {
625
  $atts = apply_filters( 'mc_post_thumbnail_atts', array( 'class' => 'mc-image' ) );
626
- if ( isset( $event->event_post ) && is_numeric( $event->event_post ) && get_post_status( $event->event_post ) ) {
627
  $e['full'] = get_the_post_thumbnail( $event->event_post );
628
  $sizes = get_intermediate_image_sizes();
629
  $attach = get_post_thumbnail_id( $event->event_post );
@@ -654,13 +677,13 @@ function mc_image_data( $e, $event ) {
654
  return $e;
655
  }
656
 
657
- function mc_event_recur_string( $event ) {
658
  $recurs = str_split( $event->event_recur, 1 );
659
  $recur = $recurs[0];
660
  $every = ( isset( $recurs[1] ) ) ? $recurs[1] : 1;
661
- $month_date = date( 'dS', strtotime( $event->occur_begin ) );
662
- $day_name = date_i18n( 'l', strtotime( $event->occur_begin ) );
663
- $week_number = mc_ordinal( week_of_month( date( 'j', strtotime( $event->occur_begin ) ) ) + 1 );
664
  switch ( $recur ) {
665
  case 'S':
666
  $event_recur = __( 'Does not recur', 'my-calendar' );
7
  function jd_draw_template( $array, $template, $type = 'list' ) {
8
  $template = stripcslashes( $template );
9
  foreach ( $array as $key => $value ) {
10
+ // disallow anything not allowed in posts
11
+ $value = wp_kses_post( $value );
12
  if ( is_object( $value ) && ! empty( $value ) ) {
13
  // null values return false...
14
  } else {
26
  if ( $matches ) {
27
  $number = count( $matches[0] );
28
  for ( $i=0; $i<=$number; $i++ ) {
29
+ $orig = $value;
30
  $before = @$matches[1][$i];
31
  $after = @$matches[2][$i];
32
  $format = @$matches[3][$i];
36
  $value = ( $value == '' ) ? '' : $before . $value . $after;
37
  $search = @$matches[0][$i];
38
  $template = str_replace( $search, $value, $template );
39
+ $value = $orig;
40
  }
41
  }
42
  } else { // don't do preg match (never required for RSS)
115
  $event->location_label = '';
116
  }
117
  }
118
+
119
  return $event;
120
  }
121
 
128
  }
129
  $zoom = ( $event->event_zoom != 0 ) ? $event->event_zoom : '15';
130
  $url = $event->event_url;
131
+ $map_label = wp_kses_post( stripslashes( ( $event->event_label != "" ) ? $event->event_label : $event->event_title ) );
132
  $map_string = str_replace( " ", "+", $map_string );
133
  if ( $event->event_longitude != '0.000000' && $event->event_latitude != '0.000000' ) {
134
  $map_string = "$event->event_latitude,$event->event_longitude";
135
  }
136
  } else {
137
  $url = $event->location_url;
138
+ $map_label = wp_kses_post( stripslashes( ( $event->location_label != "" ) ? $event->location_label : $event->event_title ) );
139
  $zoom = ( $event->location_zoom != 0 ) ? $event->location_zoom : '15';
140
  $map_string = str_replace( " ", "+", $map_string );
141
  if ( $event->location_longitude != '0.000000' && $event->location_latitude != '0.000000' ) {
143
  }
144
  }
145
  if ( strlen( trim( $map_string ) ) > 6 ) {
146
+ $map_url = apply_filters( 'mc_map_url', "http://maps.google.com/maps?z=$zoom&amp;daddr=$map_string", $event );
147
+ $label = sprintf( apply_filters( 'mc_map_label', __( 'Map<span> to %s</span>', 'my-calendar' ), $event ), $map_label );
148
+ $map = "<a href=\"" . esc_url( $map_url ) . "\" class='map-link external'>" . $label . "</a>";
149
  } else if ( esc_url( $url ) ) {
150
  $map_url = $url;
151
+ $map = "<a href=\"$map_url\" class='map-link external map-url'>" . $label . "</a>";
152
  } else {
153
  $map_url = '';
154
  $map = '';
179
  $the_map = mc_maplink( $event, 'url', $source );
180
  $event = mc_clean_location( $event, $source );
181
  $url = ( $source == 'event' ) ? $event->event_url : $event->location_url;
182
+ $url = esc_url( $url );
183
+ $label = wp_kses_post( stripslashes( ( $source == 'event' ) ? $event->event_label : $event->location_label ) );
184
+ $street = wp_kses_post( stripslashes( ( $source == 'event' ) ? $event->event_street : $event->location_street ) );
185
+ $street2 = wp_kses_post( stripslashes( ( $source == 'event' ) ? $event->event_street2 : $event->location_street2 ) );
186
+ $city = wp_kses_post( stripslashes( ( $source == 'event' ) ? $event->event_city : $event->location_city ) );
187
+ $state = wp_kses_post( stripslashes( ( $source == 'event' ) ? $event->event_state : $event->location_state ) );
188
+ $state = wp_kses_post( stripslashes( ( $source == 'event' ) ? $event->event_state : $event->location_state ) );
189
+ $zip = wp_kses_post( stripslashes( ( $source == 'event' ) ? $event->event_postcode : $event->location_postcode ) );
190
+ $zip = wp_kses_post( stripslashes( ( $source == 'event' ) ? $event->event_postcode : $event->location_postcode ) );
191
+ $country = wp_kses_post( stripslashes( ( $source == 'event' ) ? $event->event_country : $event->location_country ) );
192
+ $country = wp_kses_post( stripslashes( ( $source == 'event' ) ? $event->event_country : $event->location_country ) );
193
+ $phone = wp_kses_post( stripslashes( ( $source == 'event' ) ? $event->event_phone : $event->location_phone ) );
194
  if ( ! $url && ! $label && ! $street && ! $street2 && ! $city && ! $state && ! $zip && ! $country && ! $phone ) {
195
  return '';
196
  }
237
  $e['access'] = mc_expand( get_post_meta( $event->event_post, '_mc_event_access', true ) );
238
 
239
  // date & time fields
240
+ $real_end_date = ( isset( $event->occur_end ) ) ? $event->occur_end : $event->event_end . ' ' . $event->event_endtime;
241
+ $real_begin_date = ( isset( $event->occur_begin ) ) ? $event->occur_begin : $event->event_begin . ' ' . $event->event_time;
242
+ $dtstart = mc_format_timestamp( strtotime( $real_begin_date ) );
243
  $dtend = mc_format_timestamp( strtotime( $real_end_date ) );
244
 
245
  $e['date_utc'] = date_i18n( apply_filters( 'mc_date_format', $date_format, 'template_begin_ts' ), $event->ts_occur_begin );
246
  $e['date_end_utc'] = date_i18n( apply_filters( 'mc_date_format', $date_format, 'template_end_ts' ), $event->ts_occur_end );
247
  $notime = mc_notime_label( $event );
248
+ $e['time'] = ( date( 'H:i:s', strtotime( $real_begin_date ) ) == '00:00:00' ) ? $notime : date( get_option( 'mc_time_format' ), strtotime( $real_begin_date ) );
249
+ $e['time24'] = ( date( 'G:i', strtotime( $real_begin_date ) ) == '00:00' ) ? $notime : date( get_option( 'mc_time_format' ), strtotime( $real_begin_date ) );
250
  $endtime = ( $event->event_end == '23:59:59' ) ? '00:00:00' : date( 'H:i:s', strtotime( $real_end_date ) );
251
+ $e['endtime'] = ( $real_end_date == $real_begin_date || $event->event_hide_end == 1 || date( 'H:i:s', strtotime( $real_end_date ) ) == '23:59:59' ) ? '' : date_i18n( get_option( 'mc_time_format' ), strtotime( $endtime ) );
252
  $e['runtime'] = mc_runtime( $event->ts_occur_begin, $event->ts_occur_end, $event );
253
+ $e['dtstart'] = date( 'Y-m-d\TH:i:s', strtotime( $real_begin_date ) );// hcal formatted
254
  $e['dtend'] = date( 'Y-m-d\TH:i:s', strtotime( $real_end_date ) ); //hcal formatted end
255
  $e['rssdate'] = date( 'D, d M Y H:i:s +0000', strtotime( $event->event_added ) );
256
+ $date = date_i18n( apply_filters( 'mc_date_format', $date_format, 'template_begin' ), strtotime( $real_begin_date ) );
257
  $date_end = date_i18n( apply_filters( 'mc_date_format', $date_format, 'template_end' ), strtotime( $real_end_date ) );
258
+ $date_arr = array( 'occur_begin' => $real_begin_date, 'occur_end' => $real_end_date );
259
  $date_obj = (object) $date_arr;
260
  if ( $event->event_span == 1 ) {
261
  $dates = mc_event_date_span( $event->event_group_id, $event->event_span, array( 0 => $date_obj ) );
262
  } else {
263
  $dates = array();
264
  }
265
+
266
  $e['date'] = ( $event->event_span != 1 ) ? $date : mc_format_date_span( $dates, 'simple', $date );
267
  $e['enddate'] = $date_end;
268
  $e['daterange'] = ( $date == $date_end ) ? $date : "<span class='mc_db'>$date</span> <span>&ndash;</span> <span class='mc_de'>$date_end</span>";
270
  $e['datespan'] = ( $event->event_span == 1 || ( $e['date'] != $e['enddate'] ) ) ? mc_format_date_span( $dates ) : $date;
271
  $e['multidate'] = mc_format_date_span( $dates, 'complex', "<span class='fallback-date'>$date</span><span class='separator'>,</span> <span class='fallback-time'>$e[time]</span>&ndash;<span class='fallback-endtime'>$e[endtime]</span>" );
272
  $e['began'] = $event->event_begin; // returns date of first occurrence of an event.
273
+ $e['recurs'] = mc_event_recur_string( $event, $real_begin_date );
274
  $e['repeats'] = $event->event_repeats;
275
 
276
  // category fields
312
  $e['date'],
313
  $e['time']
314
  );
315
+ $e_label = str_replace( $tags, $replacements, $e_template );
316
  //$e_label = mc_get_details_label( $event, $e ); // recursive...hmmmm.
317
  $e_link = mc_get_details_link( $event );
318
  $e['link'] = mc_event_link( $event );
429
  return $link;
430
  }
431
 
432
+ function mc_event_expired( $event ) {
433
+ if ( my_calendar_date_xcomp( $event->occur_end, date( 'Y-m-d', current_time( 'timestamp' ) ) ) ) {
434
+ return true;
435
+ }
436
+
437
+ return false;
438
+ }
439
+
440
  function mc_event_open( $event ) {
441
  if ( $event->event_open == '1' ) {
442
  $event_open = get_option( 'mc_event_open' );
457
  $category_icon = "//maps.google.com/mapfiles/marker_green.png";
458
  }
459
  $address = addslashes( mc_map_string( $event, $source ) );
460
+ $latlng = ( $event->event_latitude != '0.000000' && $event->event_longitude != '0.000000' ) ? "latLng: [$event->event_latitude, $event->event_longitude]," : false;
461
  if ( strlen( $address ) < 10 ) {
462
  return '';
463
  }
471
  $width = apply_filters( 'mc_map_height', '100%', $event );
472
  $height = apply_filters( 'mc_map_height', '300px', $event );
473
  $styles = " style='width: $width;height: $height'";
474
+ $location = ( !$latlng ) ? "address: '$address'," : $latlng;
475
  $value = "
476
  <script type='text/javascript'>
477
  (function ($) { 'use strict';
480
  {
481
  marker:{
482
  values:[{
483
+ $location
484
  options: { icon: new google.maps.MarkerImage( '$category_icon', new google.maps.Size(32,32,'px','px') ) },
485
+ data: \"$html\"
486
  }],
487
  events:{
488
  click: function( marker, event, context ){
632
  function mc_auto_excerpt( $e, $event ) {
633
  $description = $e['description'];
634
  $shortdesc = $e['shortdesc'];
 
635
  if ( $description != '' ) { // if description is empty, this won't work, so skip it.
636
  $num_words = apply_filters( 'mc_excerpt_length', 55 );
637
  $excerpt = wp_trim_words( $description, $num_words );
638
+ } else {
639
+ $excerpt = $shortdesc;
640
  }
641
+ $e['excerpt'] = $excerpt;
642
 
643
  return $e;
644
  }
646
  add_filter( 'mc_filter_image_data', 'mc_image_data', 10, 2 );
647
  function mc_image_data( $e, $event ) {
648
  $atts = apply_filters( 'mc_post_thumbnail_atts', array( 'class' => 'mc-image' ) );
649
+ if ( isset( $event->event_post ) && is_numeric( $event->event_post ) && get_post_status( $event->event_post ) && has_post_thumbnail( $event->event_post ) ) {
650
  $e['full'] = get_the_post_thumbnail( $event->event_post );
651
  $sizes = get_intermediate_image_sizes();
652
  $attach = get_post_thumbnail_id( $event->event_post );
677
  return $e;
678
  }
679
 
680
+ function mc_event_recur_string( $event, $real_begin_date ) {
681
  $recurs = str_split( $event->event_recur, 1 );
682
  $recur = $recurs[0];
683
  $every = ( isset( $recurs[1] ) ) ? $recurs[1] : 1;
684
+ $month_date = date( 'dS', strtotime( $real_begin_date ) );
685
+ $day_name = date_i18n( 'l', strtotime( $real_begin_date ) );
686
+ $week_number = mc_ordinal( week_of_month( date( 'j', strtotime( $real_begin_date ) ) ) + 1 );
687
  switch ( $recur ) {
688
  case 'S':
689
  $event_recur = __( 'Does not recur', 'my-calendar' );
my-calendar-templating.php CHANGED
@@ -63,7 +63,7 @@ function edit_mc_templates() {
63
  ?>
64
  <div class="wrap jd-my-calendar">
65
  <?php my_calendar_check_db(); ?>
66
- <h2><?php _e( 'My Calendar Information Templates', 'my-calendar' ); ?></h2>
67
 
68
  <div class="postbox-container jcd-wide">
69
  <div class="metabox-holder">
@@ -74,7 +74,7 @@ function edit_mc_templates() {
74
 
75
  <div class="ui-sortable meta-box-sortables">
76
  <div class="postbox">
77
- <h3><?php _e( 'My Calendar: Grid Event Template', 'my-calendar' ); ?></h3>
78
 
79
  <div class="inside">
80
  <form method="post" action="<?php echo admin_url( "admin.php?page=my-calendar-templates" ); ?>">
@@ -104,7 +104,7 @@ function edit_mc_templates() {
104
 
105
  <div class="ui-sortable meta-box-sortables">
106
  <div class="postbox">
107
- <h3><?php _e( 'My Calendar: List Event Template', 'my-calendar' ); ?></h3>
108
 
109
  <div class="inside">
110
  <form method="post" action="<?php echo admin_url( "admin.php?page=my-calendar-templates" ); ?>">
@@ -134,7 +134,7 @@ function edit_mc_templates() {
134
 
135
  <div class="ui-sortable meta-box-sortables">
136
  <div class="postbox">
137
- <h3><?php _e( 'My Calendar: Mini Calendar Template', 'my-calendar' ); ?></h3>
138
 
139
  <div class="inside">
140
  <form method="post" action="<?php echo admin_url( "admin.php?page=my-calendar-templates" ); ?>">
@@ -164,7 +164,7 @@ function edit_mc_templates() {
164
 
165
  <div class="ui-sortable meta-box-sortables">
166
  <div class="postbox">
167
- <h3><?php _e( 'My Calendar: Event Details Page Template', 'my-calendar' ); ?></h3>
168
 
169
  <div class="inside">
170
  <form method="post" action="<?php echo admin_url( "admin.php?page=my-calendar-templates" ); ?>">
@@ -194,7 +194,7 @@ function edit_mc_templates() {
194
 
195
  <div class="ui-sortable meta-box-sortables">
196
  <div class="postbox">
197
- <h3><?php _e( 'My Calendar: RSS Event Template', 'my-calendar' ); ?></h3>
198
 
199
  <div class="inside">
200
  <p><?php _e( 'Notice: HTML templates are very forgiving of errors. RSS templates are not. Be sure to test your changes.', 'my-calendar' ); ?></p>
63
  ?>
64
  <div class="wrap jd-my-calendar">
65
  <?php my_calendar_check_db(); ?>
66
+ <h1><?php _e( 'My Calendar Templates', 'my-calendar' ); ?></h1>
67
 
68
  <div class="postbox-container jcd-wide">
69
  <div class="metabox-holder">
74
 
75
  <div class="ui-sortable meta-box-sortables">
76
  <div class="postbox">
77
+ <h2><?php _e( 'My Calendar: Grid Event Template', 'my-calendar' ); ?></h2>
78
 
79
  <div class="inside">
80
  <form method="post" action="<?php echo admin_url( "admin.php?page=my-calendar-templates" ); ?>">
104
 
105
  <div class="ui-sortable meta-box-sortables">
106
  <div class="postbox">
107
+ <h2><?php _e( 'My Calendar: List Event Template', 'my-calendar' ); ?></h2>
108
 
109
  <div class="inside">
110
  <form method="post" action="<?php echo admin_url( "admin.php?page=my-calendar-templates" ); ?>">
134
 
135
  <div class="ui-sortable meta-box-sortables">
136
  <div class="postbox">
137
+ <h2><?php _e( 'My Calendar: Mini Calendar Template', 'my-calendar' ); ?></h2>
138
 
139
  <div class="inside">
140
  <form method="post" action="<?php echo admin_url( "admin.php?page=my-calendar-templates" ); ?>">
164
 
165
  <div class="ui-sortable meta-box-sortables">
166
  <div class="postbox">
167
+ <h2><?php _e( 'My Calendar: Event Details Page Template', 'my-calendar' ); ?></h2>
168
 
169
  <div class="inside">
170
  <form method="post" action="<?php echo admin_url( "admin.php?page=my-calendar-templates" ); ?>">
194
 
195
  <div class="ui-sortable meta-box-sortables">
196
  <div class="postbox">
197
+ <h2><?php _e( 'My Calendar: RSS Event Template', 'my-calendar' ); ?></h2>
198
 
199
  <div class="inside">
200
  <p><?php _e( 'Notice: HTML templates are very forgiving of errors. RSS templates are not. Be sure to test your changes.', 'my-calendar' ); ?></p>
my-calendar-widgets.php CHANGED
@@ -5,7 +5,11 @@ if ( ! defined( 'ABSPATH' ) ) {
5
 
6
  class my_calendar_simple_search extends WP_Widget {
7
  function __construct() {
8
- parent::__construct( false, $name = __( 'My Calendar: Simple Event Search', 'my-calendar' ) );
 
 
 
 
9
  }
10
 
11
  function widget( $args, $instance ) {
@@ -41,7 +45,7 @@ class my_calendar_simple_search extends WP_Widget {
41
 
42
  function update( $new, $old ) {
43
  $instance = $old;
44
- $instance['title'] = wp_kses_post( $new['title'] );
45
  $instance['url'] = esc_url_raw( $new['url'] );
46
 
47
  return $instance;
@@ -51,7 +55,7 @@ class my_calendar_simple_search extends WP_Widget {
51
  class my_calendar_today_widget extends WP_Widget {
52
 
53
  function __construct() {
54
- parent::__construct( false, $name = __( 'My Calendar: Today\'s Events', 'my-calendar' ) );
55
  }
56
 
57
  function widget( $args, $instance ) {
@@ -162,7 +166,7 @@ class my_calendar_today_widget extends WP_Widget {
162
  }
163
 
164
  function update( $new, $old ) {
165
- $instance = array_map( 'wp_kses_post', array_merge( $old, $new ) );
166
 
167
  return $instance;
168
  }
@@ -171,7 +175,7 @@ class my_calendar_today_widget extends WP_Widget {
171
  class my_calendar_upcoming_widget extends WP_Widget {
172
 
173
  function __construct() {
174
- parent::__construct( false, $name = __( 'My Calendar: Upcoming Events', 'my-calendar' ) );
175
  }
176
 
177
  function widget( $args, $instance ) {
@@ -385,10 +389,11 @@ class my_calendar_upcoming_widget extends WP_Widget {
385
  }
386
 
387
  function update( $new, $old ) {
388
- $instance = array_map( 'wp_kses_post', array_merge( $old, $new ) );
389
  if ( !isset( $new['my_calendar_upcoming_show_today'] ) ) {
390
  $instance['my_calendar_upcoming_show_today'] = 'no';
391
  }
 
392
  return $instance;
393
  }
394
  }
@@ -396,7 +401,8 @@ class my_calendar_upcoming_widget extends WP_Widget {
396
  // Widget upcoming events
397
  function my_calendar_upcoming_events( $before = 'default', $after = 'default', $type = 'default', $category = 'default', $template = 'default', $substitute = '', $order = 'asc', $skip = 0, $show_today = 'yes', $author = 'default', $host = 'default', $ltype = '', $lvalue = '', $from = '', $to = '' ) {
398
  global $default_template;
399
- $args = array( 'before'=>$before, 'after'=>$after, 'type'=>$type, 'category'=>$category, 'template'=>$template, 'fallback'=> $substitute, 'order' => $order, 'skip' => $skip, 'show_today'=> $show_today, 'author'=> $author, 'host'=>$host, 'ltype'=>$ltype, 'lvalue'=>$lvalue );
 
400
  $output = '';
401
  $widget_defaults = ( array ) get_option( 'mc_widget_defaults' );
402
  $display_upcoming_type = ( $type == 'default' ) ? $widget_defaults['upcoming']['type'] : $type;
@@ -415,9 +421,11 @@ function my_calendar_upcoming_events( $before = 'default', $after = 'default', $
415
  $template = ( $template == 'default' ) ? $widget_defaults['upcoming']['template'] : $template;
416
  $template = ( $template == '' ) ? $default_template : $template;
417
  $no_event_text = ( $substitute == '' ) ? $widget_defaults['upcoming']['text'] : $substitute;
418
- $header = "<ul id='upcoming-events'>";
 
419
  $footer = "</ul>";
420
- if ( $display_upcoming_type != 'events' ) {
 
421
  $temp_array = array();
422
  if ( $display_upcoming_type == "days" ) {
423
  $from = date( 'Y-m-d', strtotime( "-$before days" ) );
@@ -540,7 +548,7 @@ function my_calendar_upcoming_events( $before = 'default', $after = 'default', $
540
  set_transient( 'mc_cache_upcoming', $cache, 60 * 30 );
541
  }
542
  } else {
543
- $events = mc_get_all_events( $category, $before, $after, $show_today, $author, $host, $ltype, $lvalue ); // grab all events within reasonable proximity
544
  }
545
  $holiday_array = array();
546
  if ( ! get_option( 'mc_skip_holidays_category' ) || get_option( 'mc_skip_holidays_category' ) == '' ) {
@@ -562,7 +570,7 @@ function my_calendar_upcoming_events( $before = 'default', $after = 'default', $
562
  }
563
  }
564
  if ( $output != '' ) {
565
- $output = $header . $output . $footer;
566
 
567
  return ( get_option( 'mc_process_shortcodes' ) == 'true' ) ? do_shortcode( $output ) : $output;
568
  } else {
@@ -601,6 +609,7 @@ function mc_produce_upcoming_events( $events, $template, $type = 'list', $order
601
  $count = count( $events );
602
  $group = array();
603
  $spans = array();
 
604
  $extra = 0;
605
  $i = 0;
606
  // create near_events array
@@ -629,10 +638,11 @@ function mc_produce_upcoming_events( $events, $template, $type = 'list', $order
629
  $current = date( 'Y-m-d H:i:00', current_time( 'timestamp' ) );
630
  if ( $e ) {
631
  // if a multi-day event, show only once.
632
- if ( $e->occur_group_id != 0 && $e->event_span == 1 && in_array( $e->occur_group_id, $group ) ) {
633
  $md = true;
634
  } else {
635
  $group[] = $e->occur_group_id;
 
636
  $md = false;
637
  }
638
  // end multi-day reduction
@@ -653,7 +663,7 @@ function mc_produce_upcoming_events( $events, $template, $type = 'list', $order
653
  $near_events[] = $e;
654
  }
655
  } else if ( ( $past <= $before && $future <= $after ) ) {
656
- $near_events[] = $e; // if neither limit is reached, split off freely
657
  } else if ( $past <= $before && ( my_calendar_date_comp( $beginning, $current ) ) ) {
658
  $near_events[] = $e; // split off another past event
659
  } else if ( $future <= $after && ( ! my_calendar_date_comp( $end, $current ) ) ) {
@@ -661,18 +671,19 @@ function mc_produce_upcoming_events( $events, $template, $type = 'list', $order
661
  }
662
 
663
  if ( my_calendar_date_comp( $beginning, $current ) ) {
664
- if ( ! $same_event && ! $same_group ) {
665
  $past ++;
666
- }
667
  } else if ( my_calendar_date_equal( $beginning, $current ) ) {
668
  if ( $show_today == 'yes' ) {
669
  $extra ++;
670
  }
671
  } else if ( ! my_calendar_date_comp( $end, $current ) ) {
672
- if ( ! $same_event && ! $same_group ) {
673
  $future ++;
674
- }
675
  }
 
676
  $last_events[] = $e->occur_id;
677
  $last_group[] = $e->occur_group_id;
678
  $last_date = $beginning;
@@ -693,7 +704,6 @@ function mc_produce_upcoming_events( $events, $template, $type = 'list', $order
693
  if ( is_array( $events ) ) {
694
  foreach ( array_keys( $events ) as $key ) {
695
  $event =& $events[ $key ];
696
- //echo $event->event_title . " " . $event->event_group_id."<br />";
697
  $event_details = mc_create_tags( $event, $context );
698
  if ( get_option( 'mc_event_approve' ) == 'true' ) {
699
  if ( $event->event_approved != 0 ) {
@@ -719,8 +729,8 @@ function mc_produce_upcoming_events( $events, $template, $type = 'list', $order
719
  $class = "multiday";
720
  }
721
  if ( $type == 'list' ) {
722
- $prepend = "\n<li class=\"$class $category\">";
723
- $append = "</li>\n";
724
  } else {
725
  $prepend = $append = '';
726
  }
@@ -761,6 +771,8 @@ function my_calendar_todays_events( $category = 'default', $template = 'default'
761
  if ( $caching && is_array( $todays_cache ) && @$todays_cache[ $category ] ) {
762
  return @$todays_cache[ $category ];
763
  }
 
 
764
  global $default_template;
765
  $output = '';
766
 
@@ -780,7 +792,8 @@ function my_calendar_todays_events( $category = 'default', $template = 'default'
780
  }
781
  $events = my_calendar_events( $from, $to, $category, '', '', 'upcoming', $author, $host );
782
  $today = ( isset( $events[ $from ] ) ) ? $events[ $from ] : false;
783
- $header = "<ul id='todays-events'>";
 
784
  $footer = "</ul>";
785
  $groups = $todays_events = array();
786
  // quick loop through all events today to check for holidays
@@ -801,12 +814,14 @@ function my_calendar_todays_events( $category = 'default', $template = 'default'
801
  } else if ( $now > $ts ) {
802
  $class = 'past-event';
803
  }
 
 
804
  if ( get_option( 'mc_event_approve' ) == 'true' ) {
805
  if ( $e->event_approved != 0 ) {
806
- $todays_events[ $ts ][] = "<li class='$class $category'>" . jd_draw_template( $event_details, $template ) . "</li>";
807
  }
808
  } else {
809
- $todays_events[ $ts ][] = "<li class='$class $category'>" . jd_draw_template( $event_details, $template ) . "</li>";
810
  }
811
  }
812
  }
@@ -818,7 +833,7 @@ function my_calendar_todays_events( $category = 'default', $template = 'default'
818
  }
819
  }
820
  if ( count( $events ) != 0 ) {
821
- $return = $header . $output . $footer;
822
  } else {
823
  $return = stripcslashes( $no_event_text );
824
  }
@@ -839,12 +854,11 @@ function my_calendar_todays_events( $category = 'default', $template = 'default'
839
  class my_calendar_mini_widget extends WP_Widget {
840
 
841
  function __construct() {
842
- parent::__construct( false, $name = __( 'My Calendar: Mini Calendar', 'my-calendar' ) );
843
  }
844
 
845
  function widget( $args, $instance ) {
846
  extract( $args );
847
- $name = $format = 'mini';
848
  if ( ! empty( $instance ) ) {
849
  $the_title = apply_filters( 'widget_title', $instance['my_calendar_mini_title'], $instance, $args );
850
  $category = ( $instance['my_calendar_mini_category'] == '' ) ? 'all' : esc_attr( $instance['my_calendar_mini_category'] );
@@ -857,10 +871,14 @@ class my_calendar_mini_widget extends WP_Widget {
857
  } else {
858
  $the_title = $category = $time = $widget_link = $above = $below = '';
859
  }
860
- $title = empty( $the_title ) ? __( 'Calendar', 'my-calendar' ) : $the_title;
861
- $title = ( $widget_link != '' ) ? "<a href='$widget_link'>$title</a>" : $title;
862
- $title = ( $title != '' ) ? $before_title . $title . $after_title : '';
863
- $the_events = my_calendar( $name, $format, $category, $time, '', '', 'mini-calendar', '', '', $author, $host, $above, $below );
 
 
 
 
864
  if ( $the_events != '' ) {
865
  echo $before_widget . $title . $the_events . $after_widget;
866
  }
@@ -952,9 +970,9 @@ class my_calendar_mini_widget extends WP_Widget {
952
  }
953
 
954
  function update( $new, $instance ) {
955
- $instance['my_calendar_mini_title'] = wp_kses_post( $new['my_calendar_mini_title'] );
956
- $instance['my_calendar_mini_time'] = wp_kses_post( $new['my_calendar_mini_time'] );
957
- $instance['my_calendar_mini_category'] = wp_kses_post( $new['my_calendar_mini_category'] );
958
  $instance['above'] = ( isset( $new['above'] ) && $new['above'] != '' ) ? $new['above'] : 'none';
959
  $instance['mc_link'] = $new['mc_link'];
960
  $instance['below'] = ( isset( $new['below'] ) && $new['below'] != '' ) ? $new['below'] : 'none';
@@ -970,4 +988,12 @@ class my_calendar_mini_widget extends WP_Widget {
970
 
971
  return $instance;
972
  }
 
 
 
 
 
 
 
 
973
  }
5
 
6
  class my_calendar_simple_search extends WP_Widget {
7
  function __construct() {
8
+ parent::__construct(
9
+ false,
10
+ $name = __( 'My Calendar: Simple Event Search', 'my-calendar' ),
11
+ array( 'customize_selective_refresh' => true )
12
+ );
13
  }
14
 
15
  function widget( $args, $instance ) {
45
 
46
  function update( $new, $old ) {
47
  $instance = $old;
48
+ $instance['title'] = mc_kses_post( $new['title'] );
49
  $instance['url'] = esc_url_raw( $new['url'] );
50
 
51
  return $instance;
55
  class my_calendar_today_widget extends WP_Widget {
56
 
57
  function __construct() {
58
+ parent::__construct( false, $name = __( 'My Calendar: Today\'s Events', 'my-calendar' ), array( 'customize_selective_refresh' => true ) );
59
  }
60
 
61
  function widget( $args, $instance ) {
166
  }
167
 
168
  function update( $new, $old ) {
169
+ $instance = array_map( 'mc_kses_post', array_merge( $old, $new ) );
170
 
171
  return $instance;
172
  }
175
  class my_calendar_upcoming_widget extends WP_Widget {
176
 
177
  function __construct() {
178
+ parent::__construct( false, $name = __( 'My Calendar: Upcoming Events', 'my-calendar' ), array( 'customize_selective_refresh' => true ) );
179
  }
180
 
181
  function widget( $args, $instance ) {
389
  }
390
 
391
  function update( $new, $old ) {
392
+ $instance = array_map( 'mc_kses_post', array_merge( $old, $new ) );
393
  if ( !isset( $new['my_calendar_upcoming_show_today'] ) ) {
394
  $instance['my_calendar_upcoming_show_today'] = 'no';
395
  }
396
+
397
  return $instance;
398
  }
399
  }
401
  // Widget upcoming events
402
  function my_calendar_upcoming_events( $before = 'default', $after = 'default', $type = 'default', $category = 'default', $template = 'default', $substitute = '', $order = 'asc', $skip = 0, $show_today = 'yes', $author = 'default', $host = 'default', $ltype = '', $lvalue = '', $from = '', $to = '' ) {
403
  global $default_template;
404
+ $args = array( 'before'=>$before, 'after'=>$after, 'type'=>$type, 'category'=>$category, 'template'=>$template, 'fallback'=> $substitute, 'order' => $order, 'skip' => $skip, 'show_today'=> $show_today, 'author'=> $author, 'host'=>$host, 'ltype'=>$ltype, 'lvalue'=>$lvalue, 'from'=>$from, 'to'=>$to );
405
+ $hash = md5( implode( ',', $args ) );
406
  $output = '';
407
  $widget_defaults = ( array ) get_option( 'mc_widget_defaults' );
408
  $display_upcoming_type = ( $type == 'default' ) ? $widget_defaults['upcoming']['type'] : $type;
421
  $template = ( $template == 'default' ) ? $widget_defaults['upcoming']['template'] : $template;
422
  $template = ( $template == '' ) ? $default_template : $template;
423
  $no_event_text = ( $substitute == '' ) ? $widget_defaults['upcoming']['text'] : $substitute;
424
+ // $header = "<ul id='upcoming-events-$hash' class='upcoming-events'>";
425
+ $header = "<ul id='upcoming-events' class='upcoming-events'>";
426
  $footer = "</ul>";
427
+ $display_events = ( $display_upcoming_type == 'events' || $display_upcoming_type == 'event' ) ? true : false;
428
+ if ( ! $display_events ) {
429
  $temp_array = array();
430
  if ( $display_upcoming_type == "days" ) {
431
  $from = date( 'Y-m-d', strtotime( "-$before days" ) );
548
  set_transient( 'mc_cache_upcoming', $cache, 60 * 30 );
549
  }
550
  } else {
551
+ $events = mc_get_all_events( $category, $before, $after, $show_today, $author, $host, $ltype, $lvalue ); // grab all events within reasonable proximity
552
  }
553
  $holiday_array = array();
554
  if ( ! get_option( 'mc_skip_holidays_category' ) || get_option( 'mc_skip_holidays_category' ) == '' ) {
570
  }
571
  }
572
  if ( $output != '' ) {
573
+ $output = apply_filters( 'mc_upcoming_events_header', $header ) . $output . apply_filters( 'mc_upcoming_events_footer', $footer );
574
 
575
  return ( get_option( 'mc_process_shortcodes' ) == 'true' ) ? do_shortcode( $output ) : $output;
576
  } else {
609
  $count = count( $events );
610
  $group = array();
611
  $spans = array();
612
+ $occur = array();
613
  $extra = 0;
614
  $i = 0;
615
  // create near_events array
638
  $current = date( 'Y-m-d H:i:00', current_time( 'timestamp' ) );
639
  if ( $e ) {
640
  // if a multi-day event, show only once.
641
+ if ( $e->occur_group_id != 0 && $e->event_span == 1 && in_array( $e->occur_group_id, $group ) || in_array( $e->occur_id, $occur ) ) {
642
  $md = true;
643
  } else {
644
  $group[] = $e->occur_group_id;
645
+ $occur[] = $e->occur_id;
646
  $md = false;
647
  }
648
  // end multi-day reduction
663
  $near_events[] = $e;
664
  }
665
  } else if ( ( $past <= $before && $future <= $after ) ) {
666
+ $near_events[] = $e; // if neither limit is reached, split off ly
667
  } else if ( $past <= $before && ( my_calendar_date_comp( $beginning, $current ) ) ) {
668
  $near_events[] = $e; // split off another past event
669
  } else if ( $future <= $after && ( ! my_calendar_date_comp( $end, $current ) ) ) {
671
  }
672
 
673
  if ( my_calendar_date_comp( $beginning, $current ) ) {
674
+ //if ( ! $same_event && ! $same_group ) {
675
  $past ++;
676
+ //}
677
  } else if ( my_calendar_date_equal( $beginning, $current ) ) {
678
  if ( $show_today == 'yes' ) {
679
  $extra ++;
680
  }
681
  } else if ( ! my_calendar_date_comp( $end, $current ) ) {
682
+ //if ( ! $same_event && ! $same_group ) {
683
  $future ++;
684
+ //}
685
  }
686
+
687
  $last_events[] = $e->occur_id;
688
  $last_group[] = $e->occur_group_id;
689
  $last_date = $beginning;
704
  if ( is_array( $events ) ) {
705
  foreach ( array_keys( $events ) as $key ) {
706
  $event =& $events[ $key ];
 
707
  $event_details = mc_create_tags( $event, $context );
708
  if ( get_option( 'mc_event_approve' ) == 'true' ) {
709
  if ( $event->event_approved != 0 ) {
729
  $class = "multiday";
730
  }
731
  if ( $type == 'list' ) {
732
+ $prepend = apply_filters( 'mc_event_upcoming_before', "\n<li class=\"$class $category\">", $class, $category );
733
+ $append = apply_filters( 'mc_event_upcoming_after', "</li>\n" );
734
  } else {
735
  $prepend = $append = '';
736
  }
771
  if ( $caching && is_array( $todays_cache ) && @$todays_cache[ $category ] ) {
772
  return @$todays_cache[ $category ];
773
  }
774
+ $args = array( 'category'=>$category, 'template'=>$template, 'substitute'=>$substitute, 'author'=>$author, 'host'=>$host, 'date'=>$date );
775
+ $hash = md5( implode( ',', $args ) );
776
  global $default_template;
777
  $output = '';
778
 
792
  }
793
  $events = my_calendar_events( $from, $to, $category, '', '', 'upcoming', $author, $host );
794
  $today = ( isset( $events[ $from ] ) ) ? $events[ $from ] : false;
795
+ // $header = "<ul id='todays-events-$hash' class='todays-events'>";
796
+ $header = "<ul id='todays-events' class='todays-events'>";
797
  $footer = "</ul>";
798
  $groups = $todays_events = array();
799
  // quick loop through all events today to check for holidays
814
  } else if ( $now > $ts ) {
815
  $class = 'past-event';
816
  }
817
+ $prepend = apply_filters( 'mc_todays_events_before', "<li class='$class $category'>", $class, $category );
818
+ $append = apply_filters( 'mc_todays_events_after', "</li>" );
819
  if ( get_option( 'mc_event_approve' ) == 'true' ) {
820
  if ( $e->event_approved != 0 ) {
821
+ $todays_events[ $ts ][] = $prepend . jd_draw_template( $event_details, $template ) . $append;
822
  }
823
  } else {
824
+ $todays_events[ $ts ][] = $prepend . jd_draw_template( $event_details, $template ) . $append;
825
  }
826
  }
827
  }
833
  }
834
  }
835
  if ( count( $events ) != 0 ) {
836
+ $return = apply_filters( 'mc_todays_events_header', $header ) . $output . apply_filters( 'mc_todays_events_footer', $footer );
837
  } else {
838
  $return = stripcslashes( $no_event_text );
839
  }
854
  class my_calendar_mini_widget extends WP_Widget {
855
 
856
  function __construct() {
857
+ parent::__construct( false, $name = __( 'My Calendar: Mini Calendar', 'my-calendar' ), array( 'customize_selective_refresh' => true ) );
858
  }
859
 
860
  function widget( $args, $instance ) {
861
  extract( $args );
 
862
  if ( ! empty( $instance ) ) {
863
  $the_title = apply_filters( 'widget_title', $instance['my_calendar_mini_title'], $instance, $args );
864
  $category = ( $instance['my_calendar_mini_category'] == '' ) ? 'all' : esc_attr( $instance['my_calendar_mini_category'] );
871
  } else {
872
  $the_title = $category = $time = $widget_link = $above = $below = '';
873
  }
874
+
875
+ if ( $the_title != '' ) {
876
+ $title = ( $widget_link != '' ) ? "<a href='$widget_link'>$the_title</a>" : $the_title;
877
+ $title = ( $title != '' ) ? $before_title . $title . $after_title : '';
878
+ } else {
879
+ $title = '';
880
+ }
881
+ $the_events = my_calendar( 'mini', 'mini', $category, $time, '', '', str_replace( 'my_calendar', 'mc', $args['widget_id'] ), '', '', $author, $host, $above, $below, false, false, false, 'widget' );
882
  if ( $the_events != '' ) {
883
  echo $before_widget . $title . $the_events . $after_widget;
884
  }
970
  }
971
 
972
  function update( $new, $instance ) {
973
+ $instance['my_calendar_mini_title'] = mc_kses_post( $new['my_calendar_mini_title'] );
974
+ $instance['my_calendar_mini_time'] = mc_kses_post( $new['my_calendar_mini_time'] );
975
+ $instance['my_calendar_mini_category'] = mc_kses_post( $new['my_calendar_mini_category'] );
976
  $instance['above'] = ( isset( $new['above'] ) && $new['above'] != '' ) ? $new['above'] : 'none';
977
  $instance['mc_link'] = $new['mc_link'];
978
  $instance['below'] = ( isset( $new['below'] ) && $new['below'] != '' ) ? $new['below'] : 'none';
988
 
989
  return $instance;
990
  }
991
+ }
992
+
993
+ function mc_kses_post( $string ) {
994
+ if ( !is_string( $string ) ) {
995
+ return '';
996
+ } else {
997
+ return wp_kses_post( $string );
998
+ }
999
  }
my-calendar.php CHANGED
@@ -7,9 +7,9 @@ Author: Joseph C Dolson
7
  Author URI: http://www.joedolson.com
8
  Text Domain: my-calendar
9
  Domain Path: lang
10
- Version: 2.4.0
11
  */
12
- /* Copyright 2009-2015 Joe Dolson (email : joe@joedolson.com)
13
 
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ if ( ! defined( 'ABSPATH' ) ) {
30
  } // Exit if accessed directly
31
 
32
  global $mc_version, $wpdb;
33
- $mc_version = '2.4.0';
34
 
35
  // Define the tables used in My Calendar
36
  if ( is_multisite() && get_site_option( 'mc_multisite_show' ) == 1 ) {
@@ -92,15 +92,10 @@ include( dirname( __FILE__ ) . '/my-calendar-generator.php' );
92
  // Enable internationalisation
93
  add_action( 'plugins_loaded', 'mc_load_textdomain' );
94
  function mc_load_textdomain() {
 
95
  load_plugin_textdomain( 'my-calendar', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );
96
  }
97
 
98
- if ( version_compare( get_bloginfo( 'version' ), '3.0', '<' ) && is_ssl() ) {
99
- $wp_content_url = str_replace( 'http://', 'https://', get_option( 'siteurl' ) );
100
- } else {
101
- $wp_content_url = get_option( 'siteurl' );
102
- }
103
-
104
  // Add actions
105
  add_action( 'admin_menu', 'my_calendar_menu' );
106
  add_action( 'wp_head', 'my_calendar_wp_head' );
@@ -118,6 +113,7 @@ add_action( 'init', 'mc_export_vcal', 200 );
118
  add_filter( 'widget_text', 'do_shortcode', 9 );
119
  add_filter( 'plugin_action_links', 'mc_plugin_action', - 10, 2 );
120
  add_filter( 'wp_title', 'mc_event_filter', 10, 3 );
 
121
  // Customize canonical URL
122
  add_action( 'init', 'mc_custom_canonical' );
123
  function mc_custom_canonical() {
@@ -177,38 +173,38 @@ function mc_show_sidebar( $show = '', $add = false, $remove = false ) {
177
  <div class="postbox-container jcd-narrow">
178
  <div class="metabox-holder">
179
  <?php if ( ! $remove ) { ?>
180
- <?php if ( ! function_exists( 'mt_valid' ) ) { ?>
181
  <div class="ui-sortable meta-box-sortables">
182
- <div class="postbox my-tickets">
183
- <h3 class='sales'><strong><?php _e( 'My Tickets', 'my-calendar' ); ?></strong></h3>
184
 
185
  <div class="inside resources">
186
- <p class="mcsbuy"><?php _e( "Do you sell tickets to your events? <a href='https://wordpress.org/plugins/my-tickets/' rel='external'>Use My Tickets</a> and sell directly from My Calendar.", 'my-calendar' ); ?></p>
187
- <p><?php _e( 'My Tickets is a stand-alone ticket sales platform that integrates with My Calendar or sells tickets on any post.', 'my-tickets' ); ?></p>
188
 
189
- <p class="mc-button"><a href="https://www.joedolson.com/my-tickets/" rel="external"><?php _e( 'Read about My Tickets', 'my-calendar' ); ?></a>
190
  </p>
191
  </div>
192
  </div>
193
  </div>
194
  <?php } ?>
195
- <?php if ( ! function_exists( 'mcs_submit_exists' ) ) { ?>
196
  <div class="ui-sortable meta-box-sortables">
197
- <div class="postbox support">
198
- <h3 class='sales'><strong><?php _e( 'My Calendar Pro', 'my-calendar' ); ?></strong></h3>
199
 
200
  <div class="inside resources">
201
- <p class="mcsbuy"><?php _e( "Buy <a href='https://www.joedolson.com/my-calendar/pro/' rel='external'>My Calendar Pro</a> &mdash; a more powerful calendar for your site.", 'my-calendar' ); ?></p>
 
202
 
203
- <p class="mc-button"><a href="http://www.joedolson.com/my-calendar/pro/" rel="external"><?php _e( 'Learn more!', 'my-calendar' ); ?></a>
204
  </p>
205
  </div>
206
  </div>
207
  </div>
208
- <?php } ?>
209
  <div class="ui-sortable meta-box-sortables">
210
  <div class="postbox support">
211
- <h3><strong><?php _e( 'Support This Plug-in', 'my-calendar' ); ?></strong></h3>
212
 
213
  <div class="inside resources">
214
  <p>
@@ -234,14 +230,9 @@ function mc_show_sidebar( $show = '', $add = false, $remove = false ) {
234
 
235
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
236
  <p class="mcd">
237
- <input type="hidden" name="cmd" value="_s-xclick"/>
238
- <input type="hidden" name="hosted_button_id" value="UZBQUG2LKKMRW"/>
239
- <input type="image"
240
- src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"
241
- name="submit" alt="<?php _e( 'Make a Donation', 'my-calendar' ); ?>"/>
242
- <img alt=""
243
- src="https://www.paypalobjects.com/WEBSCR-640-20110429-1/en_US/i/scr/pixel.gif"
244
- width="1" height="1"/>
245
  </p>
246
  </form>
247
  </div>
@@ -250,7 +241,7 @@ function mc_show_sidebar( $show = '', $add = false, $remove = false ) {
250
  <?php } ?>
251
  <div class="ui-sortable meta-box-sortables">
252
  <div class="postbox">
253
- <h3><?php _e( 'Get Help', 'my-calendar' ); ?></h3>
254
 
255
  <div class="inside">
256
  <ul>
@@ -288,7 +279,7 @@ function mc_show_sidebar( $show = '', $add = false, $remove = false ) {
288
  ?>
289
  <div class="ui-sortable meta-box-sortables">
290
  <div class="postbox">
291
- <h3><?php echo $key; ?></h3>
292
 
293
  <div class='<?php echo sanitize_title( $key ); ?> inside'>
294
  <?php echo $value; ?>
@@ -301,7 +292,7 @@ function mc_show_sidebar( $show = '', $add = false, $remove = false ) {
301
  <?php if ( $show == 'templates' ) { ?>
302
  <div class="ui-sortable meta-box-sortables">
303
  <div class="postbox">
304
- <h3><?php _e( 'Event Template Tags', 'my-calendar' ); ?></h3>
305
 
306
  <div class='mc_template_tags inside'>
307
  <dl>
@@ -351,7 +342,7 @@ function mc_show_sidebar( $show = '', $add = false, $remove = false ) {
351
  <dd><?php _e( 'Current status of event: either "Published" or "Reserved."', 'my-calendar' ); ?></dd>
352
  </dl>
353
 
354
- <h4><?php _e( 'Location Template Tags', 'my-calendar' ); ?></h4>
355
  <dl>
356
  <dt><code>{location}</code></dt>
357
  <dd><?php _e( 'Name of the location of the event.', 'my-calendar' ); ?></dd>
@@ -386,7 +377,7 @@ function mc_show_sidebar( $show = '', $add = false, $remove = false ) {
386
  <dt><code>{link_map}</code></dt>
387
  <dd><?php _e( 'Link to Google Map to the event, if address information is available.', 'my-calendar' ); ?></dd>
388
  </dl>
389
- <h4><?php _e( 'Category Template Tags', 'my-calendar' ); ?></h4>
390
 
391
  <dl>
392
  <dt><code>{category}</code></dt>
@@ -417,19 +408,12 @@ function mc_show_sidebar( $show = '', $add = false, $remove = false ) {
417
  // Function to deal with adding the calendar menus
418
  function my_calendar_menu() {
419
  $icon_path = plugins_url( '/my-calendar/images' );
420
- if ( function_exists( 'add_object_page' ) ) {
 
421
  if ( get_option( 'mc_remote' ) != 'true' ) {
422
- add_object_page( __( 'My Calendar', 'my-calendar' ), __( 'My Calendar', 'my-calendar' ), 'mc_add_events', apply_filters( 'mc_modify_default', 'my-calendar' ), apply_filters( 'mc_modify_default_cb', 'edit_my_calendar' ), $icon_path . '/icon.png' );
423
  } else {
424
- add_object_page( __( 'My Calendar', 'my-calendar' ), __( 'My Calendar', 'my-calendar' ), 'mc_edit_settings', 'my-calendar', 'edit_my_calendar_config', $icon_path . '/icon.png' );
425
- }
426
- } else {
427
- if ( function_exists( 'add_menu_page' ) ) {
428
- if ( get_option( 'mc_remote' ) != 'true' ) {
429
- add_menu_page( __( 'My Calendar', 'my-calendar' ), __( 'My Calendar', 'my-calendar' ), 'mc_add_events', apply_filters( 'mc_modify_default', 'my-calendar' ), apply_filters( 'mc_modify_default_cb', 'edit_my_calendar' ), $icon_path . '/icon.png' );
430
- } else {
431
- add_menu_page( __( 'My Calendar', 'my-calendar' ), __( 'My Calendar', 'my-calendar' ), 'mc_edit_settings', 'my-calendar', 'edit_my_calendar_config', $icon_path . '/icon.png' );
432
- }
433
  }
434
  }
435
  if ( function_exists( 'add_submenu_page' ) ) {
7
  Author URI: http://www.joedolson.com
8
  Text Domain: my-calendar
9
  Domain Path: lang
10
+ Version: 2.4.19
11
  */
12
+ /* Copyright 2009-2016 Joe Dolson (email : joe@joedolson.com)
13
 
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License as published by
30
  } // Exit if accessed directly
31
 
32
  global $mc_version, $wpdb;
33
+ $mc_version = '2.4.19';
34
 
35
  // Define the tables used in My Calendar
36
  if ( is_multisite() && get_site_option( 'mc_multisite_show' ) == 1 ) {
92
  // Enable internationalisation
93
  add_action( 'plugins_loaded', 'mc_load_textdomain' );
94
  function mc_load_textdomain() {
95
+ // don't change this; just gradually remove shipped translations when .org trans become complete.
96
  load_plugin_textdomain( 'my-calendar', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );
97
  }
98
 
 
 
 
 
 
 
99
  // Add actions
100
  add_action( 'admin_menu', 'my_calendar_menu' );
101
  add_action( 'wp_head', 'my_calendar_wp_head' );
113
  add_filter( 'widget_text', 'do_shortcode', 9 );
114
  add_filter( 'plugin_action_links', 'mc_plugin_action', - 10, 2 );
115
  add_filter( 'wp_title', 'mc_event_filter', 10, 3 );
116
+
117
  // Customize canonical URL
118
  add_action( 'init', 'mc_custom_canonical' );
119
  function mc_custom_canonical() {
173
  <div class="postbox-container jcd-narrow">
174
  <div class="metabox-holder">
175
  <?php if ( ! $remove ) { ?>
176
+ <?php if ( ! function_exists( 'mcs_submit_exists' ) ) { ?>
177
  <div class="ui-sortable meta-box-sortables">
178
+ <div class="postbox sell support">
179
+ <h2 class='sales'><strong><?php _e( 'My Calendar Pro', 'my-calendar' ); ?></strong></h2>
180
 
181
  <div class="inside resources">
182
+ <p class="mcbuy"><?php _e( "Buy <a href='https://www.joedolson.com/my-calendar/pro/' rel='external'>My Calendar Pro</a> &mdash; a more powerful calendar for your site.", 'my-calendar' ); ?></p>
 
183
 
184
+ <p class="mc-button"><a href="http://www.joedolson.com/my-calendar/pro/" rel="external"><?php _e( 'Learn more!', 'my-calendar' ); ?></a>
185
  </p>
186
  </div>
187
  </div>
188
  </div>
189
  <?php } ?>
190
+ <?php if ( ! function_exists( 'mt_valid' ) ) { ?>
191
  <div class="ui-sortable meta-box-sortables">
192
+ <div class="postbox sell my-tickets">
193
+ <h2 class='sales'><strong><?php _e( 'My Tickets', 'my-calendar' ); ?></strong></h2>
194
 
195
  <div class="inside resources">
196
+ <p class="mcbuy"><?php _e( "Do you sell tickets to your events? <a href='https://wordpress.org/plugins/my-tickets/' rel='external'>Use My Tickets</a> and sell directly from My Calendar.", 'my-calendar' ); ?></p>
197
+ <p><?php _e( 'My Tickets integrates with My Calendar or sells tickets independently through posts and pages.', 'my-tickets' ); ?></p>
198
 
199
+ <p class="mc-button"><a href="https://wordpress.org/plugins/my-tickets/" rel="external"><?php _e( 'Download My Tickets', 'my-calendar' ); ?></a>
200
  </p>
201
  </div>
202
  </div>
203
  </div>
204
+ <?php } ?>
205
  <div class="ui-sortable meta-box-sortables">
206
  <div class="postbox support">
207
+ <h2><strong><?php _e( 'Support This Plug-in', 'my-calendar' ); ?></strong></h2>
208
 
209
  <div class="inside resources">
210
  <p>
230
 
231
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
232
  <p class="mcd">
233
+ <input type="hidden" name="cmd" value="_s-xclick" />
234
+ <input type="hidden" name="hosted_button_id" value="UZBQUG2LKKMRW" />
235
+ <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" name="submit" alt="<?php _e( 'Make a Donation', 'my-calendar' ); ?>" />
 
 
 
 
 
236
  </p>
237
  </form>
238
  </div>
241
  <?php } ?>
242
  <div class="ui-sortable meta-box-sortables">
243
  <div class="postbox">
244
+ <h2><?php _e( 'Get Help', 'my-calendar' ); ?></h2>
245
 
246
  <div class="inside">
247
  <ul>
279
  ?>
280
  <div class="ui-sortable meta-box-sortables">
281
  <div class="postbox">
282
+ <h2><?php echo $key; ?></h2>
283
 
284
  <div class='<?php echo sanitize_title( $key ); ?> inside'>
285
  <?php echo $value; ?>
292
  <?php if ( $show == 'templates' ) { ?>
293
  <div class="ui-sortable meta-box-sortables">
294
  <div class="postbox">
295
+ <h2><?php _e( 'Event Template Tags', 'my-calendar' ); ?></h2>
296
 
297
  <div class='mc_template_tags inside'>
298
  <dl>
342
  <dd><?php _e( 'Current status of event: either "Published" or "Reserved."', 'my-calendar' ); ?></dd>
343
  </dl>
344
 
345
+ <h3><?php _e( 'Location Template Tags', 'my-calendar' ); ?></h3>
346
  <dl>
347
  <dt><code>{location}</code></dt>
348
  <dd><?php _e( 'Name of the location of the event.', 'my-calendar' ); ?></dd>
377
  <dt><code>{link_map}</code></dt>
378
  <dd><?php _e( 'Link to Google Map to the event, if address information is available.', 'my-calendar' ); ?></dd>
379
  </dl>
380
+ <h3><?php _e( 'Category Template Tags', 'my-calendar' ); ?></h3>
381
 
382
  <dl>
383
  <dt><code>{category}</code></dt>
408
  // Function to deal with adding the calendar menus
409
  function my_calendar_menu() {
410
  $icon_path = plugins_url( '/my-calendar/images' );
411
+
412
+ if ( function_exists( 'add_menu_page' ) ) {
413
  if ( get_option( 'mc_remote' ) != 'true' ) {
414
+ add_menu_page( __( 'My Calendar', 'my-calendar' ), __( 'My Calendar', 'my-calendar' ), 'mc_add_events', apply_filters( 'mc_modify_default', 'my-calendar' ), apply_filters( 'mc_modify_default_cb', 'edit_my_calendar' ), $icon_path . '/icon.png' );
415
  } else {
416
+ add_menu_page( __( 'My Calendar', 'my-calendar' ), __( 'My Calendar', 'my-calendar' ), 'mc_edit_settings', 'my-calendar', 'edit_my_calendar_config', $icon_path . '/icon.png' );
 
 
 
 
 
 
 
 
417
  }
418
  }
419
  if ( function_exists( 'add_submenu_page' ) ) {
php-errors.log ADDED
File without changes
readme.txt CHANGED
@@ -1,11 +1,12 @@
1
  === My Calendar ===
2
  Contributors: joedolson
3
- Donate link: http://www.joedolson.com/donate.php
4
  Tags: calendar, dates, times, event, events, scheduling, schedule, event manager, event calendar, class, concert, conference, meeting, venue, location, box office, tickets, registration
5
- Requires at least: 3.9.8
6
- Tested up to: 4.3.0
 
 
7
  License: GPLv2 or later
8
- Stable tag: 2.3.32
9
 
10
  Accessible WordPress event calendar plugin. Show events from multiple calendars on pages, in posts, or in widgets.
11
 
@@ -48,17 +49,13 @@ Easy to use for anybody, My Calendar provides enormous flexibility for designers
48
  * Create events when you publish a blog post
49
  * Publish a blog post when you create an event
50
  * Advanced search features
 
51
 
52
  = Translations =
53
 
54
- Available translations (in order of completeness):
55
- Czech, Polish, Spanish (Spain), Portuguese (Portugal), French, Danish, Japanese, German, Russian, Dutch, Swedish, Italian, Hebrew, Galician, Portuguese (Brazil), Hindi, Turkish, Slovak, Finnish, Slovenian, Ukrainian, Romanian, Norwegian (Bokmal), Catalan, Hungarian, Afrikaans, Persian, Icelandic
56
 
57
- Visit the [My Calendar translations site](http://translate.joedolson.com/projects/my-calendar) to check the progress of a translation.
58
-
59
- Translating my plug-ins is always appreciated. Visit <a href="http://translate.joedolson.com">my translations site</a> to start getting your language into shape!
60
-
61
- <a href="http://www.joedolson.com/translator-credits/">Translator Credits</a>
62
 
63
  == Installation ==
64
 
@@ -85,17 +82,193 @@ Translating my plug-ins is always appreciated. Visit <a href="http://translate.j
85
 
86
  == Changelog ==
87
 
88
- = Future =
89
 
 
90
  * Refactor options storage
91
  * Update event taxonomies if category changed/source event taxonomy data from post
92
  * Custom link targets using mc_customize_details_link & template_redirect filter as pointer.
93
  * Handle stylesheet editing as additive (child styles), rather than editing the original stylesheet.
94
  * Update pickadate to version 3.6, when it's out. 3.5.6 has a regression that makes it useless for me.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
 
96
  = 2.4.0 =
97
 
98
  New features:
 
99
  * Set upcoming event class based on time, rather than date.
100
  * Add past/present classes to today's events widget
101
  * Assign Custom All Day label for each event.
@@ -123,8 +296,9 @@ New features:
123
  * Improved labeling of cell dates
124
 
125
  Bug fixes:
 
126
  * Stop setting all day events to end at midnight; use 11:59:59 and filter output
127
- * Rewrite iCal output so that the iCal download eliminates Holiday cancellations [todo]
128
  * Bug fix: Prevent extraneous variables from leaking into the navigation output.
129
  * Rendering post template in permalinks only applies within Loop.
130
  * Template attribute preg_match could only pick up 2 parameters
@@ -147,14 +321,17 @@ Bug fixes:
147
  * Prevent single event pages from displaying content if the event is in a private category.
148
 
149
  Important Changes:
 
150
  * Removed references to #jd_calendar and generate custom IDs. [breaking change
151
  * Revision of settings page [reorganize settings into tabs]
152
  * Reorganized settings pages.
153
 
154
  Other:
 
155
  * Moved changelog for versions prior to 2.3.0 into changelog.txt
156
 
157
  Translations:
 
158
  * Updated Polish, Portuguese (Portugal), Dutch, Turkish, Slovak, Norwegian, Hungarian, German, Spanish, Persian, Czech, Danish
159
 
160
  = 2.3.32 =
@@ -546,4 +723,4 @@ The search feature in My Calendar is pretty basic; but buying My Calendar Pro gi
546
 
547
  == Upgrade Notice ==
548
 
549
- * 2.3.30 - Important security update! Update now!
1
  === My Calendar ===
2
  Contributors: joedolson
3
+ Donate link: http://www.joedolson.com/donate/
4
  Tags: calendar, dates, times, event, events, scheduling, schedule, event manager, event calendar, class, concert, conference, meeting, venue, location, box office, tickets, registration
5
+ Requires at least: 4.0
6
+ Tested up to: 4.5
7
+ Stable tag: 2.4.18
8
+ Text domain: my-calendar
9
  License: GPLv2 or later
 
10
 
11
  Accessible WordPress event calendar plugin. Show events from multiple calendars on pages, in posts, or in widgets.
12
 
49
  * Create events when you publish a blog post
50
  * Publish a blog post when you create an event
51
  * Advanced search features
52
+ * Responsive mode
53
 
54
  = Translations =
55
 
56
+ Visit [Wordpress Translations](https://translate.wordpress.org/projects/wp-plugins/my-calendar) to check the progress of your translation.
 
57
 
58
+ Translating my plug-ins is always appreciated. Visit <a href="https://translate.wordpress.org/projects/wp-plugins/my-calendar">WordPress translations</a> to start getting your language into shape! Translations will only be published when they reach 100% completion.
 
 
 
 
59
 
60
  == Installation ==
61
 
82
 
83
  == Changelog ==
84
 
85
+ = Future Changes =
86
 
87
+ * Make annual view in list mode configurable on a calendar-specific basis rather than globally; effect date switcher; see https://www.joedolson.com/forums/topic/annual-calendar/#post-5427
88
  * Refactor options storage
89
  * Update event taxonomies if category changed/source event taxonomy data from post
90
  * Custom link targets using mc_customize_details_link & template_redirect filter as pointer.
91
  * Handle stylesheet editing as additive (child styles), rather than editing the original stylesheet.
92
  * Update pickadate to version 3.6, when it's out. 3.5.6 has a regression that makes it useless for me.
93
+ * Send admin notice when recurring event is about to end
94
+ * Change all shortcode 'template' attributes to reference stored templates in settings by name or ID.
95
+ * Feature Request: make unqualified event permalinks display next occurrence rather than first (last?) (show list of occurrences?)
96
+ * Create mechanism to get & display all events in a group (see group-manager.php line 253)
97
+ * Add option to insert new occurrences into an existing event. (Make single event recurring, add arbitrary date into group, etc.)
98
+ * Add option to insert events to both global & local calendar in multisite networks
99
+ * Revise month by day input & calculation methods
100
+ * Update hcalendar structures
101
+ * When month starts on Sunday, shows full previous month's week?
102
+ * Make iCal timezone configurable via URL params & eliminate that setting.
103
+
104
+ = 2.5.0 = (Unreleased)
105
+
106
+ Breaking Changes:
107
+
108
+ * Breaking change: upcoming events widget no longer uses ID 'upcoming-events'; use class '.upcoming-events'
109
+ * Breaking change: today's events widget no longer uses ID 'todays-events'; use class '.todays-events'
110
+
111
+ = 2.4.19 =
112
+
113
+ * IMPORTANT: SECURITY RELEASE
114
+ * Security fix: XSS vulnerability: user who could create or edit an event could insert a XSS attack.
115
+ * Security fix: Phishing vulnerability: user who could create or edit an event could insert an iFrame for phishing
116
+ * Security fix: Possible to programmatically alter the event being edited to push edits into a different event.
117
+ * Security fix: Possible to programmatically alter the author of the edited event.
118
+
119
+ Other changes in this release:
120
+
121
+ * Screen-reader-text class was duplicated on mini calendar dates
122
+ * New class: 'all-categories' on all categories link
123
+ * New filter: filter All Categories text
124
+ * New filter: filter Map URL & Map Label
125
+ * Bug fix: when sequentially switching from Month to Week to Month & back to Week, Week would revert to first week of month.
126
+ * Bug fix: Maintain current view when switching categories
127
+
128
+ = 2.4.18 =
129
+
130
+ * Add permalink settings notice to field note for clearer instructions.
131
+ * New filter: inner content filter for templates.
132
+ * Improve template handling when partial event passed to template
133
+ * Add filters to alter wrapper elements in Today's Events & Upcoming Events lists.
134
+ * Bug fix: {excerpt} template tag had invalid if/else logic.
135
+ * Remove files for Spanish, French, Polish, Portuguese, Japanese, and Czech translations in favor of language packs
136
+
137
+ = 2.4.17 =
138
+
139
+ * Bug fix: Google Maps calendar ignored Latitude/Longitude.
140
+ * Bug fix: missing ID attribute on form field
141
+ * Bug fix: replace an anchor with a button in admin
142
+ * Bug fix: missing label in manage events
143
+ * Bug fix: missing quote broke id attribute on manage categories
144
+ * Bug fix: duplicate IDs in tab UI structure on Settings page
145
+ * Add support for selective refresh in customizer
146
+ * Updated HTML hierarchy
147
+
148
+ = 2.4.16 =
149
+
150
+ * Minor CSS updates in calendar stylesheets
151
+ * Bug fix in widgets
152
+ * Bug fix in list JS with focus management (accessibility)
153
+
154
+ = 2.4.15 =
155
+
156
+ * Increase field length allowed for event location fields
157
+ * Picker CSS improvements
158
+ * Bug fixes on event search queries
159
+
160
+ = 2.4.14 =
161
+
162
+ * Bug fix: possible SQL error if event ID not saved in event post on event creation.
163
+ * Bug fix: database didn't allow recurring spacing larger than 9; input allowed up to 12.
164
+ * Bug fix: multiple uses of {dtstart format=''} in upcoming events caused repeated data.
165
+ * Bug fix: Escaping of address string in Google Maps
166
+ * Bug fix: Pass parameter to indicate whether calendar is rendered in widget or shortcode. Only render single view in shortcode.
167
+ * Bug fix: Custom stylesheets had to have same names as standard stylesheets
168
+ * Bug fix: Print view return link returns to previous page instead of My Calendar URL.
169
+ * Bug fix: Potential broken image icon in category manager
170
+ * Prep: Eliminate references to add_object_page(), deprecated in 4.5
171
+ * Prep: Eliminate referneces to get_currentuserinfo(), deprecated in 4.5
172
+ * Add Filter: make time interval filterable ('mc_interval')
173
+
174
+ = 2.4.13 =
175
+
176
+ * Allow feeds to show on mini calendar widget
177
+ * Bug fix (performance); only check table type for current table of interest.
178
+ * Bug fix: Allow mini widget calendar title to be blank.
179
+ * Bug fix: Catch some instances where a SQL error could be generated by missing data.
180
+ * Bug fix: Removed i18n of calendar day classes to avoid breaking HTML in non-latin languages. [Potentially breaking change]
181
+ * Bug fix: Improvement to stylesheet notices when file editing disallowed in WordPress
182
+ * Bug fix: Notice could be thrown if template parts not all set.
183
+ * Removed: Deprecated remaining parts of the migration path from 1.7.0 and earlier.
184
+ * Revalidate RSS feed
185
+ * Add filter to enable alerts on ical events.
186
+
187
+ = 2.4.12 =
188
+
189
+ * Bug fix: allow / character in permalink formats
190
+ * Bug fix: missing reference in CSS for Google Maps images
191
+ * Bug fix: Single event delete broken
192
+ * Bug fix: if event deleted from Manage Events screen, stay on Manage Events instead of shifting to Add New.
193
+ * Bug fix: Improper i18n in events list heading
194
+
195
+ = 2.4.11 =
196
+
197
+ * Bug fix: remove category parameter from 'All Categories'
198
+ * Bug fix: Invalid closing </th>
199
+ * Bug fix: Update gmap3 to version 6.0
200
+ * Bug fix: CSS conflict with max-width can cause Google Maps image to fail to render correctly.
201
+ * Bug fix: duplicate ID in list view breaking layout.
202
+ * I18n fix: Make accessibility strings translatable without requiring filters
203
+ * Change: Open list panels with a button.
204
+ * Update: Rewrote mc-list.js
205
+
206
+ = 2.4.10 =
207
+
208
+ * Bug fix: Better detection of whether or not multisite support is available.
209
+ * Bug fix: Stop disabling JS on mobile if format conversion is enabled.
210
+ * Bug fix: Pretty permalinks display of event date/time broken on recurring events.
211
+ * Bug fix: Handle use of using_index_permalinks() and produce correct URLs.
212
+ * New filter: 'mc_use_custom_template': pass a file name or template name to use a custom template for a given event display.
213
+ * Language updates: French, Russian, Catalan, Italian
214
+
215
+ = 2.4.9 =
216
+
217
+ * Bug fix: Make iCal support elimination of holiday collisions
218
+ * Bug fix: Compensate for other plug-ins defining their own tab styles on My Calendar's settings
219
+ * Bug fix: Fallback to My Calendar DB images if featured images missing on post.
220
+ * Add support: Search events without requiring MyISAM MySQL engine.
221
+ * Language updates: Portuguese (Brazil), German
222
+
223
+ = 2.4.8 =
224
+
225
+ * Bug fix: Md5 hash on arguments includes format & timeframe, so switching between options broke CID references
226
+ * Bug fix: clear undefined index notice occurring only under specific unusual server configurations
227
+
228
+ = 2.4.7 =
229
+
230
+ * Update Italian translation
231
+ * Bug fix: Ensure that mini calendar widgets have unique IDs
232
+ * Eliminate an obsolete variable.
233
+
234
+ = 2.4.6 =
235
+
236
+ * Bug fix: I just can't stop making stupid mistakes in print view. Sheesh.
237
+
238
+ = 2.4.5 =
239
+
240
+ * Mislabeled form field on date switcher.
241
+ * Add primary sort filter to main event function [props @ryanschweitzer]
242
+ * New filters on navigation tools.
243
+ * Bug fix: Print view loaded when iCal requested [broken in 2.4.4]
244
+ * Bug fix: Changes to Upcoming Events widget to better limit upcoming events lists.
245
+ * Language updates: Czech, Swedish, Finnish
246
+
247
+ = 2.4.4 =
248
+
249
+ * Bug fix: Stray character return in Print view
250
+ * Bug fix: Print view did not respect date changes
251
+ * Bug fix: Logic error in sort direction switching in admin when setting not configured
252
+ * Change: Print view no longer driven by feed API.
253
+ * Change: Added option to disable "More" link from settings
254
+
255
+ = 2.4.3 =
256
+
257
+ * Bug fix: reversed filter name/value pairing in SQL query.
258
+
259
+ = 2.4.2 =
260
+
261
+ * Bug fix: in Upcoming Events shortcode (mismatch between documentation & reality).
262
+
263
+ = 2.4.1 =
264
+
265
+ * Bug fix: Missing style in print.css
266
+ * Bug fix: Broken <head> in print view.
267
 
268
  = 2.4.0 =
269
 
270
  New features:
271
+
272
  * Set upcoming event class based on time, rather than date.
273
  * Add past/present classes to today's events widget
274
  * Assign Custom All Day label for each event.
296
  * Improved labeling of cell dates
297
 
298
  Bug fixes:
299
+
300
  * Stop setting all day events to end at midnight; use 11:59:59 and filter output
301
+ * Rewrite iCal output so that the iCal download eliminates Holiday cancellations
302
  * Bug fix: Prevent extraneous variables from leaking into the navigation output.
303
  * Rendering post template in permalinks only applies within Loop.
304
  * Template attribute preg_match could only pick up 2 parameters
321
  * Prevent single event pages from displaying content if the event is in a private category.
322
 
323
  Important Changes:
324
+
325
  * Removed references to #jd_calendar and generate custom IDs. [breaking change
326
  * Revision of settings page [reorganize settings into tabs]
327
  * Reorganized settings pages.
328
 
329
  Other:
330
+
331
  * Moved changelog for versions prior to 2.3.0 into changelog.txt
332
 
333
  Translations:
334
+
335
  * Updated Polish, Portuguese (Portugal), Dutch, Turkish, Slovak, Norwegian, Hungarian, German, Spanish, Persian, Czech, Danish
336
 
337
  = 2.3.32 =
723
 
724
  == Upgrade Notice ==
725
 
726
+ * 2.4.19: CRITICAL SECURITY UPDATE. UPDATE IMMEDIATELY.
styles/dark.css CHANGED
@@ -122,15 +122,15 @@
122
  border: 1px solid #aaf;
123
  }
124
 
125
- #upcoming-events .past-event {
126
  color: #aaa;
127
  }
128
 
129
- #upcoming-events .today {
130
  color: #eee;
131
  }
132
 
133
- #upcoming-events .future-event {
134
  color: #bbb;
135
  }
136
 
@@ -411,6 +411,11 @@
411
  width: 100%;
412
  }
413
 
 
 
 
 
 
414
  .mc-main.mini .day-with-date a {
415
  display: block;
416
  margin: -2px;
122
  border: 1px solid #aaf;
123
  }
124
 
125
+ .upcoming-events .past-event {
126
  color: #aaa;
127
  }
128
 
129
+ .upcoming-events .today {
130
  color: #eee;
131
  }
132
 
133
+ .upcoming-events .future-event {
134
  color: #bbb;
135
  }
136
 
411
  width: 100%;
412
  }
413
 
414
+ .mc-main .list-event .details img {
415
+ width: auto;
416
+ max-width: 100%;
417
+ }
418
+
419
  .mc-main.mini .day-with-date a {
420
  display: block;
421
  margin: -2px;
styles/inherit.css CHANGED
@@ -290,6 +290,11 @@
290
  width: 100%;
291
  }
292
 
 
 
 
 
 
293
  .mc-main.mini .day-with-date a {
294
  display: block;
295
  margin: -2px;
290
  width: 100%;
291
  }
292
 
293
+ .mc-main .list-event .details img {
294
+ width: auto;
295
+ max-width: 100%;
296
+ }
297
+
298
  .mc-main.mini .day-with-date a {
299
  display: block;
300
  margin: -2px;
styles/light.css CHANGED
@@ -90,15 +90,15 @@
90
  border: 1px solid #00a;
91
  }
92
 
93
- #upcoming-events .past-event {
94
  color: #777;
95
  }
96
 
97
- #upcoming-events .today {
98
  color: #111;
99
  }
100
 
101
- #upcoming-events .future-event {
102
  color: #555;
103
  }
104
 
@@ -366,6 +366,11 @@
366
  width: 100%;
367
  }
368
 
 
 
 
 
 
369
  .mc-main.mini .day-with-date a {
370
  display: block;
371
  margin: -2px;
90
  border: 1px solid #00a;
91
  }
92
 
93
+ .upcoming-events .past-event {
94
  color: #777;
95
  }
96
 
97
+ .upcoming-events .today {
98
  color: #111;
99
  }
100
 
101
+ .upcoming-events .future-event {
102
  color: #555;
103
  }
104
 
366
  width: 100%;
367
  }
368
 
369
+ .mc-main .list-event .details img {
370
+ width: auto;
371
+ max-width: 100%;
372
+ }
373
+
374
  .mc-main.mini .day-with-date a {
375
  display: block;
376
  margin: -2px;
styles/my-calendar.css CHANGED
@@ -102,15 +102,15 @@
102
  border: 1px solid #243f82;
103
  }
104
 
105
- #upcoming-events .past-event {
106
  color: #777;
107
  }
108
 
109
- #upcoming-events .today {
110
  color: #111;
111
  }
112
 
113
- #upcoming-events .future-event {
114
  color: #555;
115
  }
116
 
@@ -394,6 +394,11 @@
394
  width: 100%;
395
  }
396
 
 
 
 
 
 
397
  .mc-main.mini .day-with-date a {
398
  display: block;
399
  margin: -2px;
102
  border: 1px solid #243f82;
103
  }
104
 
105
+ .upcoming-events .past-event {
106
  color: #777;
107
  }
108
 
109
+ .upcoming-events .today {
110
  color: #111;
111
  }
112
 
113
+ .upcoming-events .future-event {
114
  color: #555;
115
  }
116
 
394
  width: 100%;
395
  }
396
 
397
+ .mc-main .list-event .details img {
398
+ width: auto;
399
+ max-width: 100%;
400
+ }
401
+
402
  .mc-main.mini .day-with-date a {
403
  display: block;
404
  margin: -2px;
styles/refresh.css CHANGED
@@ -98,15 +98,15 @@
98
  text-decoration: underline
99
  }
100
 
101
- #upcoming-events .past-event {
102
  color: #777
103
  }
104
 
105
- #upcoming-events .today {
106
  color: #111
107
  }
108
 
109
- #upcoming-events .future-event {
110
  color: #555
111
  }
112
 
@@ -425,6 +425,11 @@
425
  width: 100%
426
  }
427
 
 
 
 
 
 
428
  .mc-main.mini .day-with-date a {
429
  display: block;
430
  margin: -2px;
98
  text-decoration: underline
99
  }
100
 
101
+ .upcoming-events .past-event {
102
  color: #777
103
  }
104
 
105
+ .upcoming-events .today {
106
  color: #111
107
  }
108
 
109
+ .upcoming-events .future-event {
110
  color: #555
111
  }
112
 
425
  width: 100%
426
  }
427
 
428
+ .mc-main .list-event .details img {
429
+ width: auto;
430
+ max-width: 100%;
431
+ }
432
+
433
  .mc-main.mini .day-with-date a {
434
  display: block;
435
  margin: -2px;
templates/dark.css CHANGED
@@ -122,15 +122,15 @@
122
  border: 1px solid #aaf;
123
  }
124
 
125
- #upcoming-events .past-event {
126
  color: #aaa;
127
  }
128
 
129
- #upcoming-events .today {
130
  color: #eee;
131
  }
132
 
133
- #upcoming-events .future-event {
134
  color: #bbb;
135
  }
136
 
@@ -411,6 +411,11 @@
411
  width: 100%;
412
  }
413
 
 
 
 
 
 
414
  .mc-main.mini .day-with-date a {
415
  display: block;
416
  margin: -2px;
122
  border: 1px solid #aaf;
123
  }
124
 
125
+ .upcoming-events .past-event {
126
  color: #aaa;
127
  }
128
 
129
+ .upcoming-events .today {
130
  color: #eee;
131
  }
132
 
133
+ .upcoming-events .future-event {
134
  color: #bbb;
135
  }
136
 
411
  width: 100%;
412
  }
413
 
414
+ .mc-main .list-event .details img {
415
+ width: auto;
416
+ max-width: 100%;
417
+ }
418
+
419
  .mc-main.mini .day-with-date a {
420
  display: block;
421
  margin: -2px;
templates/inherit.css CHANGED
@@ -290,6 +290,11 @@
290
  width: 100%;
291
  }
292
 
 
 
 
 
 
293
  .mc-main.mini .day-with-date a {
294
  display: block;
295
  margin: -2px;
290
  width: 100%;
291
  }
292
 
293
+ .mc-main .list-event .details img {
294
+ width: auto;
295
+ max-width: 100%;
296
+ }
297
+
298
  .mc-main.mini .day-with-date a {
299
  display: block;
300
  margin: -2px;
templates/light.css CHANGED
@@ -90,15 +90,15 @@
90
  border: 1px solid #00a;
91
  }
92
 
93
- #upcoming-events .past-event {
94
  color: #777;
95
  }
96
 
97
- #upcoming-events .today {
98
  color: #111;
99
  }
100
 
101
- #upcoming-events .future-event {
102
  color: #555;
103
  }
104
 
@@ -366,6 +366,11 @@
366
  width: 100%;
367
  }
368
 
 
 
 
 
 
369
  .mc-main.mini .day-with-date a {
370
  display: block;
371
  margin: -2px;
90
  border: 1px solid #00a;
91
  }
92
 
93
+ .upcoming-events .past-event {
94
  color: #777;
95
  }
96
 
97
+ .upcoming-events .today {
98
  color: #111;
99
  }
100
 
101
+ .upcoming-events .future-event {
102
  color: #555;
103
  }
104
 
366
  width: 100%;
367
  }
368
 
369
+ .mc-main .list-event .details img {
370
+ width: auto;
371
+ max-width: 100%;
372
+ }
373
+
374
  .mc-main.mini .day-with-date a {
375
  display: block;
376
  margin: -2px;
templates/my-calendar.css CHANGED
@@ -102,15 +102,15 @@
102
  border: 1px solid #243f82;
103
  }
104
 
105
- #upcoming-events .past-event {
106
  color: #777;
107
  }
108
 
109
- #upcoming-events .today {
110
  color: #111;
111
  }
112
 
113
- #upcoming-events .future-event {
114
  color: #555;
115
  }
116
 
@@ -394,6 +394,11 @@
394
  width: 100%;
395
  }
396
 
 
 
 
 
 
397
  .mc-main.mini .day-with-date a {
398
  display: block;
399
  margin: -2px;
102
  border: 1px solid #243f82;
103
  }
104
 
105
+ .upcoming-events .past-event {
106
  color: #777;
107
  }
108
 
109
+ .upcoming-events .today {
110
  color: #111;
111
  }
112
 
113
+ .upcoming-events .future-event {
114
  color: #555;
115
  }
116
 
394
  width: 100%;
395
  }
396
 
397
+ .mc-main .list-event .details img {
398
+ width: auto;
399
+ max-width: 100%;
400
+ }
401
+
402
  .mc-main.mini .day-with-date a {
403
  display: block;
404
  margin: -2px;
templates/refresh.css CHANGED
@@ -98,15 +98,15 @@
98
  text-decoration: underline
99
  }
100
 
101
- #upcoming-events .past-event {
102
  color: #777
103
  }
104
 
105
- #upcoming-events .today {
106
  color: #111
107
  }
108
 
109
- #upcoming-events .future-event {
110
  color: #555
111
  }
112
 
@@ -425,6 +425,11 @@
425
  width: 100%
426
  }
427
 
 
 
 
 
 
428
  .mc-main.mini .day-with-date a {
429
  display: block;
430
  margin: -2px;
98
  text-decoration: underline
99
  }
100
 
101
+ .upcoming-events .past-event {
102
  color: #777
103
  }
104
 
105
+ .upcoming-events .today {
106
  color: #111
107
  }
108
 
109
+ .upcoming-events .future-event {
110
  color: #555
111
  }
112
 
425
  width: 100%
426
  }
427
 
428
+ .mc-main .list-event .details img {
429
+ width: auto;
430
+ max-width: 100%;
431
+ }
432
+
433
  .mc-main.mini .day-with-date a {
434
  display: block;
435
  margin: -2px;
uninstall.php CHANGED
@@ -11,6 +11,7 @@ if ( ! defined( 'ABSPATH' ) && ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
11
  delete_option( 'mc_show_months' );
12
  delete_option( 'mc_show_map' );
13
  delete_option( 'mc_show_address' );
 
14
  delete_option( 'mc_today_template' );
15
  delete_option( 'mc_upcoming_template' );
16
  delete_option( 'mc_today_title' );
11
  delete_option( 'mc_show_months' );
12
  delete_option( 'mc_show_map' );
13
  delete_option( 'mc_show_address' );
14
+ delete_option( 'mc_display_more' );
15
  delete_option( 'mc_today_template' );
16
  delete_option( 'mc_upcoming_template' );
17
  delete_option( 'mc_today_title' );