Quick Adsense - Version 2.8.7

Version Description

Download this release

Release Info

Developer namith.jawahar
Plugin Icon 128x128 Quick Adsense
Version 2.8.7
Comparing to
See all releases

Code changes from version 2.8.6 to 2.8.7

assets/css/jquery-ui.css CHANGED
@@ -1,880 +1,880 @@
1
- /*! jQuery UI - v1.13.1 - 2022-03-16
2
- * http://jqueryui.com
3
- * Includes: draggable.css, core.css, resizable.css, button.css, controlgroup.css, checkboxradio.css, dialog.css, tabs.css, theme.css
4
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=smoothness&cornerRadiusShadow=8px&offsetLeftShadow=-8px&offsetTopShadow=-8px&thicknessShadow=8px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=aaaaaa&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cd0a0a&fcError=cd0a0a&borderColorError=cd0a0a&bgImgOpacityError=95&bgTextureError=glass&bgColorError=fef1ec&iconColorHighlight=2e83ff&fcHighlight=363636&borderColorHighlight=fcefa1&bgImgOpacityHighlight=55&bgTextureHighlight=glass&bgColorHighlight=fbf9ee&iconColorActive=454545&fcActive=212121&borderColorActive=aaaaaa&bgImgOpacityActive=65&bgTextureActive=glass&bgColorActive=ffffff&iconColorHover=454545&fcHover=212121&borderColorHover=999999&bgImgOpacityHover=75&bgTextureHover=glass&bgColorHover=dadada&iconColorDefault=888888&fcDefault=555555&borderColorDefault=d3d3d3&bgImgOpacityDefault=75&bgTextureDefault=glass&bgColorDefault=e6e6e6&iconColorContent=222222&fcContent=222222&borderColorContent=aaaaaa&bgImgOpacityContent=75&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=222222&fcHeader=222222&borderColorHeader=aaaaaa&bgImgOpacityHeader=75&bgTextureHeader=highlight_soft&bgColorHeader=cccccc&cornerRadius=4px&fsDefault=1.1em&fwDefault=normal&ffDefault=Verdana%2CArial%2Csans-serif
5
- * Copyright jQuery Foundation and other contributors; Licensed MIT */
6
-
7
- .ui-draggable-handle {
8
- -ms-touch-action: none;
9
- touch-action: none;
10
- }
11
- /* Layout helpers
12
- ----------------------------------*/
13
- .ui-helper-hidden {
14
- display: none;
15
- }
16
- .ui-helper-hidden-accessible {
17
- border: 0;
18
- clip: rect(0 0 0 0);
19
- height: 1px;
20
- margin: -1px;
21
- overflow: hidden;
22
- padding: 0;
23
- position: absolute;
24
- width: 1px;
25
- }
26
- .ui-helper-reset {
27
- margin: 0;
28
- padding: 0;
29
- border: 0;
30
- outline: 0;
31
- line-height: 1.3;
32
- text-decoration: none;
33
- font-size: 100%;
34
- list-style: none;
35
- }
36
- .ui-helper-clearfix:before,
37
- .ui-helper-clearfix:after {
38
- content: "";
39
- display: table;
40
- border-collapse: collapse;
41
- }
42
- .ui-helper-clearfix:after {
43
- clear: both;
44
- }
45
- .ui-helper-zfix {
46
- width: 100%;
47
- height: 100%;
48
- top: 0;
49
- left: 0;
50
- position: absolute;
51
- opacity: 0;
52
- -ms-filter: "alpha(opacity=0)"; /* support: IE8 */
53
- }
54
-
55
- .ui-front {
56
- z-index: 100;
57
- }
58
-
59
-
60
- /* Interaction Cues
61
- ----------------------------------*/
62
- .ui-state-disabled {
63
- cursor: default !important;
64
- pointer-events: none;
65
- }
66
-
67
-
68
- /* Icons
69
- ----------------------------------*/
70
- .ui-icon {
71
- display: inline-block;
72
- vertical-align: middle;
73
- margin-top: -.25em;
74
- position: relative;
75
- text-indent: -99999px;
76
- overflow: hidden;
77
- background-repeat: no-repeat;
78
- }
79
-
80
- .ui-widget-icon-block {
81
- left: 50%;
82
- margin-left: -8px;
83
- display: block;
84
- }
85
-
86
- /* Misc visuals
87
- ----------------------------------*/
88
-
89
- /* Overlays */
90
- .ui-widget-overlay {
91
- position: fixed;
92
- top: 0;
93
- left: 0;
94
- width: 100%;
95
- height: 100%;
96
- }
97
- .ui-resizable {
98
- position: relative;
99
- }
100
- .ui-resizable-handle {
101
- position: absolute;
102
- font-size: 0.1px;
103
- display: block;
104
- -ms-touch-action: none;
105
- touch-action: none;
106
- }
107
- .ui-resizable-disabled .ui-resizable-handle,
108
- .ui-resizable-autohide .ui-resizable-handle {
109
- display: none;
110
- }
111
- .ui-resizable-n {
112
- cursor: n-resize;
113
- height: 7px;
114
- width: 100%;
115
- top: -5px;
116
- left: 0;
117
- }
118
- .ui-resizable-s {
119
- cursor: s-resize;
120
- height: 7px;
121
- width: 100%;
122
- bottom: -5px;
123
- left: 0;
124
- }
125
- .ui-resizable-e {
126
- cursor: e-resize;
127
- width: 7px;
128
- right: -5px;
129
- top: 0;
130
- height: 100%;
131
- }
132
- .ui-resizable-w {
133
- cursor: w-resize;
134
- width: 7px;
135
- left: -5px;
136
- top: 0;
137
- height: 100%;
138
- }
139
- .ui-resizable-se {
140
- cursor: se-resize;
141
- width: 12px;
142
- height: 12px;
143
- right: 1px;
144
- bottom: 1px;
145
- }
146
- .ui-resizable-sw {
147
- cursor: sw-resize;
148
- width: 9px;
149
- height: 9px;
150
- left: -5px;
151
- bottom: -5px;
152
- }
153
- .ui-resizable-nw {
154
- cursor: nw-resize;
155
- width: 9px;
156
- height: 9px;
157
- left: -5px;
158
- top: -5px;
159
- }
160
- .ui-resizable-ne {
161
- cursor: ne-resize;
162
- width: 9px;
163
- height: 9px;
164
- right: -5px;
165
- top: -5px;
166
- }
167
- .ui-button {
168
- padding: .4em 1em;
169
- display: inline-block;
170
- position: relative;
171
- line-height: normal;
172
- margin-right: .1em;
173
- cursor: pointer;
174
- vertical-align: middle;
175
- text-align: center;
176
- -webkit-user-select: none;
177
- -moz-user-select: none;
178
- -ms-user-select: none;
179
- user-select: none;
180
-
181
- /* Support: IE <= 11 */
182
- overflow: visible;
183
- }
184
-
185
- .ui-button,
186
- .ui-button:link,
187
- .ui-button:visited,
188
- .ui-button:hover,
189
- .ui-button:active {
190
- text-decoration: none;
191
- }
192
-
193
- /* to make room for the icon, a width needs to be set here */
194
- .ui-button-icon-only {
195
- width: 2em;
196
- box-sizing: border-box;
197
- text-indent: -9999px;
198
- white-space: nowrap;
199
- }
200
-
201
- /* no icon support for input elements */
202
- input.ui-button.ui-button-icon-only {
203
- text-indent: 0;
204
- }
205
-
206
- /* button icon element(s) */
207
- .ui-button-icon-only .ui-icon {
208
- position: absolute;
209
- top: 50%;
210
- left: 50%;
211
- margin-top: -8px;
212
- margin-left: -8px;
213
- }
214
-
215
- .ui-button.ui-icon-notext .ui-icon {
216
- padding: 0;
217
- width: 2.1em;
218
- height: 2.1em;
219
- text-indent: -9999px;
220
- white-space: nowrap;
221
-
222
- }
223
-
224
- input.ui-button.ui-icon-notext .ui-icon {
225
- width: auto;
226
- height: auto;
227
- text-indent: 0;
228
- white-space: normal;
229
- padding: .4em 1em;
230
- }
231
-
232
- /* workarounds */
233
- /* Support: Firefox 5 - 40 */
234
- input.ui-button::-moz-focus-inner,
235
- button.ui-button::-moz-focus-inner {
236
- border: 0;
237
- padding: 0;
238
- }
239
- .ui-controlgroup {
240
- vertical-align: middle;
241
- display: inline-block;
242
- }
243
- .ui-controlgroup > .ui-controlgroup-item {
244
- float: left;
245
- margin-left: 0;
246
- margin-right: 0;
247
- }
248
- .ui-controlgroup > .ui-controlgroup-item:focus,
249
- .ui-controlgroup > .ui-controlgroup-item.ui-visual-focus {
250
- z-index: 9999;
251
- }
252
- .ui-controlgroup-vertical > .ui-controlgroup-item {
253
- display: block;
254
- float: none;
255
- width: 100%;
256
- margin-top: 0;
257
- margin-bottom: 0;
258
- text-align: left;
259
- }
260
- .ui-controlgroup-vertical .ui-controlgroup-item {
261
- box-sizing: border-box;
262
- }
263
- .ui-controlgroup .ui-controlgroup-label {
264
- padding: .4em 1em;
265
- }
266
- .ui-controlgroup .ui-controlgroup-label span {
267
- font-size: 80%;
268
- }
269
- .ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item {
270
- border-left: none;
271
- }
272
- .ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item {
273
- border-top: none;
274
- }
275
- .ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content {
276
- border-right: none;
277
- }
278
- .ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content {
279
- border-bottom: none;
280
- }
281
-
282
- /* Spinner specific style fixes */
283
- .ui-controlgroup-vertical .ui-spinner-input {
284
-
285
- /* Support: IE8 only, Android < 4.4 only */
286
- width: 75%;
287
- width: calc( 100% - 2.4em );
288
- }
289
- .ui-controlgroup-vertical .ui-spinner .ui-spinner-up {
290
- border-top-style: solid;
291
- }
292
-
293
- .ui-checkboxradio-label .ui-icon-background {
294
- box-shadow: inset 1px 1px 1px #ccc;
295
- border-radius: .12em;
296
- border: none;
297
- }
298
- .ui-checkboxradio-radio-label .ui-icon-background {
299
- width: 16px;
300
- height: 16px;
301
- border-radius: 1em;
302
- overflow: visible;
303
- border: none;
304
- }
305
- .ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon,
306
- .ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon {
307
- background-image: none;
308
- width: 8px;
309
- height: 8px;
310
- border-width: 4px;
311
- border-style: solid;
312
- }
313
- .ui-checkboxradio-disabled {
314
- pointer-events: none;
315
- }
316
- .ui-dialog {
317
- position: absolute;
318
- top: 0;
319
- left: 0;
320
- padding: .2em;
321
- outline: 0;
322
- }
323
- .ui-dialog .ui-dialog-titlebar {
324
- padding: .4em 1em;
325
- position: relative;
326
- }
327
- .ui-dialog .ui-dialog-title {
328
- float: left;
329
- margin: .1em 0;
330
- white-space: nowrap;
331
- width: 90%;
332
- overflow: hidden;
333
- text-overflow: ellipsis;
334
- }
335
- .ui-dialog .ui-dialog-titlebar-close {
336
- position: absolute;
337
- right: .3em;
338
- top: 50%;
339
- width: 20px;
340
- margin: -10px 0 0 0;
341
- padding: 1px;
342
- height: 20px;
343
- }
344
- .ui-dialog .ui-dialog-content {
345
- position: relative;
346
- border: 0;
347
- padding: .5em 1em;
348
- background: none;
349
- overflow: auto;
350
- }
351
- .ui-dialog .ui-dialog-buttonpane {
352
- text-align: left;
353
- border-width: 1px 0 0 0;
354
- background-image: none;
355
- margin-top: .5em;
356
- padding: .3em 1em .5em .4em;
357
- }
358
- .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
359
- float: right;
360
- }
361
- .ui-dialog .ui-dialog-buttonpane button {
362
- margin: .5em .4em .5em 0;
363
- cursor: pointer;
364
- }
365
- .ui-dialog .ui-resizable-n {
366
- height: 2px;
367
- top: 0;
368
- }
369
- .ui-dialog .ui-resizable-e {
370
- width: 2px;
371
- right: 0;
372
- }
373
- .ui-dialog .ui-resizable-s {
374
- height: 2px;
375
- bottom: 0;
376
- }
377
- .ui-dialog .ui-resizable-w {
378
- width: 2px;
379
- left: 0;
380
- }
381
- .ui-dialog .ui-resizable-se,
382
- .ui-dialog .ui-resizable-sw,
383
- .ui-dialog .ui-resizable-ne,
384
- .ui-dialog .ui-resizable-nw {
385
- width: 7px;
386
- height: 7px;
387
- }
388
- .ui-dialog .ui-resizable-se {
389
- right: 0;
390
- bottom: 0;
391
- }
392
- .ui-dialog .ui-resizable-sw {
393
- left: 0;
394
- bottom: 0;
395
- }
396
- .ui-dialog .ui-resizable-ne {
397
- right: 0;
398
- top: 0;
399
- }
400
- .ui-dialog .ui-resizable-nw {
401
- left: 0;
402
- top: 0;
403
- }
404
- .ui-draggable .ui-dialog-titlebar {
405
- cursor: move;
406
- }
407
- .ui-tabs {
408
- position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
409
- padding: .2em;
410
- }
411
- .ui-tabs .ui-tabs-nav {
412
- margin: 0;
413
- padding: .2em .2em 0;
414
- }
415
- .ui-tabs .ui-tabs-nav li {
416
- list-style: none;
417
- float: left;
418
- position: relative;
419
- top: 0;
420
- margin: 1px .2em 0 0;
421
- border-bottom-width: 0;
422
- padding: 0;
423
- white-space: nowrap;
424
- }
425
- .ui-tabs .ui-tabs-nav .ui-tabs-anchor {
426
- float: left;
427
- padding: .5em 1em;
428
- text-decoration: none;
429
- }
430
- .ui-tabs .ui-tabs-nav li.ui-tabs-active {
431
- margin-bottom: -1px;
432
- padding-bottom: 1px;
433
- }
434
- .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
435
- .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
436
- .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
437
- cursor: text;
438
- }
439
- .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
440
- cursor: pointer;
441
- }
442
- .ui-tabs .ui-tabs-panel {
443
- display: block;
444
- border-width: 0;
445
- padding: 1em 1.4em;
446
- background: none;
447
- }
448
-
449
- /* Component containers
450
- ----------------------------------*/
451
- .ui-widget {
452
- font-family: Verdana,Arial,sans-serif;
453
- font-size: 1.1em;
454
- }
455
- .ui-widget .ui-widget {
456
- font-size: 1em;
457
- }
458
- .ui-widget input,
459
- .ui-widget select,
460
- .ui-widget textarea,
461
- .ui-widget button {
462
- font-family: Verdana,Arial,sans-serif;
463
- font-size: 1em;
464
- }
465
- .ui-widget.ui-widget-content {
466
- border: 1px solid #d3d3d3;
467
- }
468
- .ui-widget-content {
469
- border: 1px solid #aaaaaa;
470
- background: #ffffff;
471
- color: #222222;
472
- }
473
- .ui-widget-content a {
474
- color: #222222;
475
- }
476
- .ui-widget-header {
477
- border: 1px solid #aaaaaa;
478
- background: #cccccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;
479
- color: #222222;
480
- font-weight: bold;
481
- }
482
- .ui-widget-header a {
483
- color: #222222;
484
- }
485
-
486
- /* Interaction states
487
- ----------------------------------*/
488
- .ui-state-default,
489
- .ui-widget-content .ui-state-default,
490
- .ui-widget-header .ui-state-default,
491
- .ui-button,
492
-
493
- /* We use html here because we need a greater specificity to make sure disabled
494
- works properly when clicked or hovered */
495
- html .ui-button.ui-state-disabled:hover,
496
- html .ui-button.ui-state-disabled:active {
497
- border: 1px solid #d3d3d3;
498
- background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;
499
- font-weight: normal;
500
- color: #555555;
501
- }
502
- .ui-state-default a,
503
- .ui-state-default a:link,
504
- .ui-state-default a:visited,
505
- a.ui-button,
506
- a:link.ui-button,
507
- a:visited.ui-button,
508
- .ui-button {
509
- color: #555555;
510
- text-decoration: none;
511
- }
512
- .ui-state-hover,
513
- .ui-widget-content .ui-state-hover,
514
- .ui-widget-header .ui-state-hover,
515
- .ui-state-focus,
516
- .ui-widget-content .ui-state-focus,
517
- .ui-widget-header .ui-state-focus,
518
- .ui-button:hover,
519
- .ui-button:focus {
520
- border: 1px solid #999999;
521
- background: #dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;
522
- font-weight: normal;
523
- color: #212121;
524
- }
525
- .ui-state-hover a,
526
- .ui-state-hover a:hover,
527
- .ui-state-hover a:link,
528
- .ui-state-hover a:visited,
529
- .ui-state-focus a,
530
- .ui-state-focus a:hover,
531
- .ui-state-focus a:link,
532
- .ui-state-focus a:visited,
533
- a.ui-button:hover,
534
- a.ui-button:focus {
535
- color: #212121;
536
- text-decoration: none;
537
- }
538
-
539
- .ui-visual-focus {
540
- box-shadow: 0 0 3px 1px rgb(94, 158, 214);
541
- }
542
- .ui-state-active,
543
- .ui-widget-content .ui-state-active,
544
- .ui-widget-header .ui-state-active,
545
- a.ui-button:active,
546
- .ui-button:active,
547
- .ui-button.ui-state-active:hover {
548
- border: 1px solid #aaaaaa;
549
- background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
550
- font-weight: normal;
551
- color: #212121;
552
- }
553
- .ui-icon-background,
554
- .ui-state-active .ui-icon-background {
555
- border: #aaaaaa;
556
- background-color: #212121;
557
- }
558
- .ui-state-active a,
559
- .ui-state-active a:link,
560
- .ui-state-active a:visited {
561
- color: #212121;
562
- text-decoration: none;
563
- }
564
-
565
- /* Interaction Cues
566
- ----------------------------------*/
567
- .ui-state-highlight,
568
- .ui-widget-content .ui-state-highlight,
569
- .ui-widget-header .ui-state-highlight {
570
- border: 1px solid #fcefa1;
571
- background: #fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;
572
- color: #363636;
573
- }
574
- .ui-state-checked {
575
- border: 1px solid #fcefa1;
576
- background: #fbf9ee;
577
- }
578
- .ui-state-highlight a,
579
- .ui-widget-content .ui-state-highlight a,
580
- .ui-widget-header .ui-state-highlight a {
581
- color: #363636;
582
- }
583
- .ui-state-error,
584
- .ui-widget-content .ui-state-error,
585
- .ui-widget-header .ui-state-error {
586
- border: 1px solid #cd0a0a;
587
- background: #fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;
588
- color: #cd0a0a;
589
- }
590
- .ui-state-error a,
591
- .ui-widget-content .ui-state-error a,
592
- .ui-widget-header .ui-state-error a {
593
- color: #cd0a0a;
594
- }
595
- .ui-state-error-text,
596
- .ui-widget-content .ui-state-error-text,
597
- .ui-widget-header .ui-state-error-text {
598
- color: #cd0a0a;
599
- }
600
- .ui-priority-primary,
601
- .ui-widget-content .ui-priority-primary,
602
- .ui-widget-header .ui-priority-primary {
603
- font-weight: bold;
604
- }
605
- .ui-priority-secondary,
606
- .ui-widget-content .ui-priority-secondary,
607
- .ui-widget-header .ui-priority-secondary {
608
- opacity: .7;
609
- -ms-filter: "alpha(opacity=70)"; /* support: IE8 */
610
- font-weight: normal;
611
- }
612
- .ui-state-disabled,
613
- .ui-widget-content .ui-state-disabled,
614
- .ui-widget-header .ui-state-disabled {
615
- opacity: .35;
616
- -ms-filter: "alpha(opacity=35)"; /* support: IE8 */
617
- background-image: none;
618
- }
619
- .ui-state-disabled .ui-icon {
620
- -ms-filter: "alpha(opacity=35)"; /* support: IE8 - See #6059 */
621
- }
622
-
623
- /* Icons
624
- ----------------------------------*/
625
-
626
- /* states and images */
627
- .ui-icon {
628
- width: 16px;
629
- height: 16px;
630
- }
631
- .ui-icon,
632
- .ui-widget-content .ui-icon {
633
- background-image: url("images/ui-icons_222222_256x240.png");
634
- }
635
- .ui-widget-header .ui-icon {
636
- background-image: url("images/ui-icons_222222_256x240.png");
637
- }
638
- .ui-state-hover .ui-icon,
639
- .ui-state-focus .ui-icon,
640
- .ui-button:hover .ui-icon,
641
- .ui-button:focus .ui-icon {
642
- background-image: url("images/ui-icons_454545_256x240.png");
643
- }
644
- .ui-state-active .ui-icon,
645
- .ui-button:active .ui-icon {
646
- background-image: url("images/ui-icons_454545_256x240.png");
647
- }
648
- .ui-state-highlight .ui-icon,
649
- .ui-button .ui-state-highlight.ui-icon {
650
- background-image: url("images/ui-icons_2e83ff_256x240.png");
651
- }
652
- .ui-state-error .ui-icon,
653
- .ui-state-error-text .ui-icon {
654
- background-image: url("images/ui-icons_cd0a0a_256x240.png");
655
- }
656
- .ui-button .ui-icon {
657
- background-image: url("images/ui-icons_888888_256x240.png");
658
- }
659
-
660
- /* positioning */
661
- /* Three classes needed to override `.ui-button:hover .ui-icon` */
662
- .ui-icon-blank.ui-icon-blank.ui-icon-blank {
663
- background-image: none;
664
- }
665
- .ui-icon-caret-1-n { background-position: 0 0; }
666
- .ui-icon-caret-1-ne { background-position: -16px 0; }
667
- .ui-icon-caret-1-e { background-position: -32px 0; }
668
- .ui-icon-caret-1-se { background-position: -48px 0; }
669
- .ui-icon-caret-1-s { background-position: -65px 0; }
670
- .ui-icon-caret-1-sw { background-position: -80px 0; }
671
- .ui-icon-caret-1-w { background-position: -96px 0; }
672
- .ui-icon-caret-1-nw { background-position: -112px 0; }
673
- .ui-icon-caret-2-n-s { background-position: -128px 0; }
674
- .ui-icon-caret-2-e-w { background-position: -144px 0; }
675
- .ui-icon-triangle-1-n { background-position: 0 -16px; }
676
- .ui-icon-triangle-1-ne { background-position: -16px -16px; }
677
- .ui-icon-triangle-1-e { background-position: -32px -16px; }
678
- .ui-icon-triangle-1-se { background-position: -48px -16px; }
679
- .ui-icon-triangle-1-s { background-position: -65px -16px; }
680
- .ui-icon-triangle-1-sw { background-position: -80px -16px; }
681
- .ui-icon-triangle-1-w { background-position: -96px -16px; }
682
- .ui-icon-triangle-1-nw { background-position: -112px -16px; }
683
- .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
684
- .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
685
- .ui-icon-arrow-1-n { background-position: 0 -32px; }
686
- .ui-icon-arrow-1-ne { background-position: -16px -32px; }
687
- .ui-icon-arrow-1-e { background-position: -32px -32px; }
688
- .ui-icon-arrow-1-se { background-position: -48px -32px; }
689
- .ui-icon-arrow-1-s { background-position: -65px -32px; }
690
- .ui-icon-arrow-1-sw { background-position: -80px -32px; }
691
- .ui-icon-arrow-1-w { background-position: -96px -32px; }
692
- .ui-icon-arrow-1-nw { background-position: -112px -32px; }
693
- .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
694
- .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
695
- .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
696
- .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
697
- .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
698
- .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
699
- .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
700
- .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
701
- .ui-icon-arrowthick-1-n { background-position: 1px -48px; }
702
- .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
703
- .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
704
- .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
705
- .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
706
- .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
707
- .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
708
- .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
709
- .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
710
- .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
711
- .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
712
- .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
713
- .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
714
- .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
715
- .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
716
- .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
717
- .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
718
- .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
719
- .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
720
- .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
721
- .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
722
- .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
723
- .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
724
- .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
725
- .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
726
- .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
727
- .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
728
- .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
729
- .ui-icon-arrow-4 { background-position: 0 -80px; }
730
- .ui-icon-arrow-4-diag { background-position: -16px -80px; }
731
- .ui-icon-extlink { background-position: -32px -80px; }
732
- .ui-icon-newwin { background-position: -48px -80px; }
733
- .ui-icon-refresh { background-position: -64px -80px; }
734
- .ui-icon-shuffle { background-position: -80px -80px; }
735
- .ui-icon-transfer-e-w { background-position: -96px -80px; }
736
- .ui-icon-transferthick-e-w { background-position: -112px -80px; }
737
- .ui-icon-folder-collapsed { background-position: 0 -96px; }
738
- .ui-icon-folder-open { background-position: -16px -96px; }
739
- .ui-icon-document { background-position: -32px -96px; }
740
- .ui-icon-document-b { background-position: -48px -96px; }
741
- .ui-icon-note { background-position: -64px -96px; }
742
- .ui-icon-mail-closed { background-position: -80px -96px; }
743
- .ui-icon-mail-open { background-position: -96px -96px; }
744
- .ui-icon-suitcase { background-position: -112px -96px; }
745
- .ui-icon-comment { background-position: -128px -96px; }
746
- .ui-icon-person { background-position: -144px -96px; }
747
- .ui-icon-print { background-position: -160px -96px; }
748
- .ui-icon-trash { background-position: -176px -96px; }
749
- .ui-icon-locked { background-position: -192px -96px; }
750
- .ui-icon-unlocked { background-position: -208px -96px; }
751
- .ui-icon-bookmark { background-position: -224px -96px; }
752
- .ui-icon-tag { background-position: -240px -96px; }
753
- .ui-icon-home { background-position: 0 -112px; }
754
- .ui-icon-flag { background-position: -16px -112px; }
755
- .ui-icon-calendar { background-position: -32px -112px; }
756
- .ui-icon-cart { background-position: -48px -112px; }
757
- .ui-icon-pencil { background-position: -64px -112px; }
758
- .ui-icon-clock { background-position: -80px -112px; }
759
- .ui-icon-disk { background-position: -96px -112px; }
760
- .ui-icon-calculator { background-position: -112px -112px; }
761
- .ui-icon-zoomin { background-position: -128px -112px; }
762
- .ui-icon-zoomout { background-position: -144px -112px; }
763
- .ui-icon-search { background-position: -160px -112px; }
764
- .ui-icon-wrench { background-position: -176px -112px; }
765
- .ui-icon-gear { background-position: -192px -112px; }
766
- .ui-icon-heart { background-position: -208px -112px; }
767
- .ui-icon-star { background-position: -224px -112px; }
768
- .ui-icon-link { background-position: -240px -112px; }
769
- .ui-icon-cancel { background-position: 0 -128px; }
770
- .ui-icon-plus { background-position: -16px -128px; }
771
- .ui-icon-plusthick { background-position: -32px -128px; }
772
- .ui-icon-minus { background-position: -48px -128px; }
773
- .ui-icon-minusthick { background-position: -64px -128px; }
774
- .ui-icon-close { background-position: -80px -128px; }
775
- .ui-icon-closethick { background-position: -96px -128px; }
776
- .ui-icon-key { background-position: -112px -128px; }
777
- .ui-icon-lightbulb { background-position: -128px -128px; }
778
- .ui-icon-scissors { background-position: -144px -128px; }
779
- .ui-icon-clipboard { background-position: -160px -128px; }
780
- .ui-icon-copy { background-position: -176px -128px; }
781
- .ui-icon-contact { background-position: -192px -128px; }
782
- .ui-icon-image { background-position: -208px -128px; }
783
- .ui-icon-video { background-position: -224px -128px; }
784
- .ui-icon-script { background-position: -240px -128px; }
785
- .ui-icon-alert { background-position: 0 -144px; }
786
- .ui-icon-info { background-position: -16px -144px; }
787
- .ui-icon-notice { background-position: -32px -144px; }
788
- .ui-icon-help { background-position: -48px -144px; }
789
- .ui-icon-check { background-position: -64px -144px; }
790
- .ui-icon-bullet { background-position: -80px -144px; }
791
- .ui-icon-radio-on { background-position: -96px -144px; }
792
- .ui-icon-radio-off { background-position: -112px -144px; }
793
- .ui-icon-pin-w { background-position: -128px -144px; }
794
- .ui-icon-pin-s { background-position: -144px -144px; }
795
- .ui-icon-play { background-position: 0 -160px; }
796
- .ui-icon-pause { background-position: -16px -160px; }
797
- .ui-icon-seek-next { background-position: -32px -160px; }
798
- .ui-icon-seek-prev { background-position: -48px -160px; }
799
- .ui-icon-seek-end { background-position: -64px -160px; }
800
- .ui-icon-seek-start { background-position: -80px -160px; }
801
- /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
802
- .ui-icon-seek-first { background-position: -80px -160px; }
803
- .ui-icon-stop { background-position: -96px -160px; }
804
- .ui-icon-eject { background-position: -112px -160px; }
805
- .ui-icon-volume-off { background-position: -128px -160px; }
806
- .ui-icon-volume-on { background-position: -144px -160px; }
807
- .ui-icon-power { background-position: 0 -176px; }
808
- .ui-icon-signal-diag { background-position: -16px -176px; }
809
- .ui-icon-signal { background-position: -32px -176px; }
810
- .ui-icon-battery-0 { background-position: -48px -176px; }
811
- .ui-icon-battery-1 { background-position: -64px -176px; }
812
- .ui-icon-battery-2 { background-position: -80px -176px; }
813
- .ui-icon-battery-3 { background-position: -96px -176px; }
814
- .ui-icon-circle-plus { background-position: 0 -192px; }
815
- .ui-icon-circle-minus { background-position: -16px -192px; }
816
- .ui-icon-circle-close { background-position: -32px -192px; }
817
- .ui-icon-circle-triangle-e { background-position: -48px -192px; }
818
- .ui-icon-circle-triangle-s { background-position: -64px -192px; }
819
- .ui-icon-circle-triangle-w { background-position: -80px -192px; }
820
- .ui-icon-circle-triangle-n { background-position: -96px -192px; }
821
- .ui-icon-circle-arrow-e { background-position: -112px -192px; }
822
- .ui-icon-circle-arrow-s { background-position: -128px -192px; }
823
- .ui-icon-circle-arrow-w { background-position: -144px -192px; }
824
- .ui-icon-circle-arrow-n { background-position: -160px -192px; }
825
- .ui-icon-circle-zoomin { background-position: -176px -192px; }
826
- .ui-icon-circle-zoomout { background-position: -192px -192px; }
827
- .ui-icon-circle-check { background-position: -208px -192px; }
828
- .ui-icon-circlesmall-plus { background-position: 0 -208px; }
829
- .ui-icon-circlesmall-minus { background-position: -16px -208px; }
830
- .ui-icon-circlesmall-close { background-position: -32px -208px; }
831
- .ui-icon-squaresmall-plus { background-position: -48px -208px; }
832
- .ui-icon-squaresmall-minus { background-position: -64px -208px; }
833
- .ui-icon-squaresmall-close { background-position: -80px -208px; }
834
- .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
835
- .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
836
- .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
837
- .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
838
- .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
839
- .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
840
-
841
-
842
- /* Misc visuals
843
- ----------------------------------*/
844
-
845
- /* Corner radius */
846
- .ui-corner-all,
847
- .ui-corner-top,
848
- .ui-corner-left,
849
- .ui-corner-tl {
850
- border-top-left-radius: 4px;
851
- }
852
- .ui-corner-all,
853
- .ui-corner-top,
854
- .ui-corner-right,
855
- .ui-corner-tr {
856
- border-top-right-radius: 4px;
857
- }
858
- .ui-corner-all,
859
- .ui-corner-bottom,
860
- .ui-corner-left,
861
- .ui-corner-bl {
862
- border-bottom-left-radius: 4px;
863
- }
864
- .ui-corner-all,
865
- .ui-corner-bottom,
866
- .ui-corner-right,
867
- .ui-corner-br {
868
- border-bottom-right-radius: 4px;
869
- }
870
-
871
- /* Overlays */
872
- .ui-widget-overlay {
873
- background: #aaaaaa;
874
- opacity: .3;
875
- -ms-filter: Alpha(Opacity=30); /* support: IE8 */
876
- }
877
- .ui-widget-shadow {
878
- -webkit-box-shadow: -8px -8px 8px #aaaaaa;
879
- box-shadow: -8px -8px 8px #aaaaaa;
880
- }
1
+ /*! jQuery UI - v1.13.1 - 2022-03-16
2
+ * http://jqueryui.com
3
+ * Includes: draggable.css, core.css, resizable.css, button.css, controlgroup.css, checkboxradio.css, dialog.css, tabs.css, theme.css
4
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=smoothness&cornerRadiusShadow=8px&offsetLeftShadow=-8px&offsetTopShadow=-8px&thicknessShadow=8px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=aaaaaa&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cd0a0a&fcError=cd0a0a&borderColorError=cd0a0a&bgImgOpacityError=95&bgTextureError=glass&bgColorError=fef1ec&iconColorHighlight=2e83ff&fcHighlight=363636&borderColorHighlight=fcefa1&bgImgOpacityHighlight=55&bgTextureHighlight=glass&bgColorHighlight=fbf9ee&iconColorActive=454545&fcActive=212121&borderColorActive=aaaaaa&bgImgOpacityActive=65&bgTextureActive=glass&bgColorActive=ffffff&iconColorHover=454545&fcHover=212121&borderColorHover=999999&bgImgOpacityHover=75&bgTextureHover=glass&bgColorHover=dadada&iconColorDefault=888888&fcDefault=555555&borderColorDefault=d3d3d3&bgImgOpacityDefault=75&bgTextureDefault=glass&bgColorDefault=e6e6e6&iconColorContent=222222&fcContent=222222&borderColorContent=aaaaaa&bgImgOpacityContent=75&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=222222&fcHeader=222222&borderColorHeader=aaaaaa&bgImgOpacityHeader=75&bgTextureHeader=highlight_soft&bgColorHeader=cccccc&cornerRadius=4px&fsDefault=1.1em&fwDefault=normal&ffDefault=Verdana%2CArial%2Csans-serif
5
+ * Copyright jQuery Foundation and other contributors; Licensed MIT */
6
+
7
+ .ui-draggable-handle {
8
+ -ms-touch-action: none;
9
+ touch-action: none;
10
+ }
11
+ /* Layout helpers
12
+ ----------------------------------*/
13
+ .ui-helper-hidden {
14
+ display: none;
15
+ }
16
+ .ui-helper-hidden-accessible {
17
+ border: 0;
18
+ clip: rect(0 0 0 0);
19
+ height: 1px;
20
+ margin: -1px;
21
+ overflow: hidden;
22
+ padding: 0;
23
+ position: absolute;
24
+ width: 1px;
25
+ }
26
+ .ui-helper-reset {
27
+ margin: 0;
28
+ padding: 0;
29
+ border: 0;
30
+ outline: 0;
31
+ line-height: 1.3;
32
+ text-decoration: none;
33
+ font-size: 100%;
34
+ list-style: none;
35
+ }
36
+ .ui-helper-clearfix:before,
37
+ .ui-helper-clearfix:after {
38
+ content: "";
39
+ display: table;
40
+ border-collapse: collapse;
41
+ }
42
+ .ui-helper-clearfix:after {
43
+ clear: both;
44
+ }
45
+ .ui-helper-zfix {
46
+ width: 100%;
47
+ height: 100%;
48
+ top: 0;
49
+ left: 0;
50
+ position: absolute;
51
+ opacity: 0;
52
+ -ms-filter: "alpha(opacity=0)"; /* support: IE8 */
53
+ }
54
+
55
+ .ui-front {
56
+ z-index: 100;
57
+ }
58
+
59
+
60
+ /* Interaction Cues
61
+ ----------------------------------*/
62
+ .ui-state-disabled {
63
+ cursor: default !important;
64
+ pointer-events: none;
65
+ }
66
+
67
+
68
+ /* Icons
69
+ ----------------------------------*/
70
+ .ui-icon {
71
+ display: inline-block;
72
+ vertical-align: middle;
73
+ margin-top: -.25em;
74
+ position: relative;
75
+ text-indent: -99999px;
76
+ overflow: hidden;
77
+ background-repeat: no-repeat;
78
+ }
79
+
80
+ .ui-widget-icon-block {
81
+ left: 50%;
82
+ margin-left: -8px;
83
+ display: block;
84
+ }
85
+
86
+ /* Misc visuals
87
+ ----------------------------------*/
88
+
89
+ /* Overlays */
90
+ .ui-widget-overlay {
91
+ position: fixed;
92
+ top: 0;
93
+ left: 0;
94
+ width: 100%;
95
+ height: 100%;
96
+ }
97
+ .ui-resizable {
98
+ position: relative;
99
+ }
100
+ .ui-resizable-handle {
101
+ position: absolute;
102
+ font-size: 0.1px;
103
+ display: block;
104
+ -ms-touch-action: none;
105
+ touch-action: none;
106
+ }
107
+ .ui-resizable-disabled .ui-resizable-handle,
108
+ .ui-resizable-autohide .ui-resizable-handle {
109
+ display: none;
110
+ }
111
+ .ui-resizable-n {
112
+ cursor: n-resize;
113
+ height: 7px;
114
+ width: 100%;
115
+ top: -5px;
116
+ left: 0;
117
+ }
118
+ .ui-resizable-s {
119
+ cursor: s-resize;
120
+ height: 7px;
121
+ width: 100%;
122
+ bottom: -5px;
123
+ left: 0;
124
+ }
125
+ .ui-resizable-e {
126
+ cursor: e-resize;
127
+ width: 7px;
128
+ right: -5px;
129
+ top: 0;
130
+ height: 100%;
131
+ }
132
+ .ui-resizable-w {
133
+ cursor: w-resize;
134
+ width: 7px;
135
+ left: -5px;
136
+ top: 0;
137
+ height: 100%;
138
+ }
139
+ .ui-resizable-se {
140
+ cursor: se-resize;
141
+ width: 12px;
142
+ height: 12px;
143
+ right: 1px;
144
+ bottom: 1px;
145
+ }
146
+ .ui-resizable-sw {
147
+ cursor: sw-resize;
148
+ width: 9px;
149
+ height: 9px;
150
+ left: -5px;
151
+ bottom: -5px;
152
+ }
153
+ .ui-resizable-nw {
154
+ cursor: nw-resize;
155
+ width: 9px;
156
+ height: 9px;
157
+ left: -5px;
158
+ top: -5px;
159
+ }
160
+ .ui-resizable-ne {
161
+ cursor: ne-resize;
162
+ width: 9px;
163
+ height: 9px;
164
+ right: -5px;
165
+ top: -5px;
166
+ }
167
+ .ui-button {
168
+ padding: .4em 1em;
169
+ display: inline-block;
170
+ position: relative;
171
+ line-height: normal;
172
+ margin-right: .1em;
173
+ cursor: pointer;
174
+ vertical-align: middle;
175
+ text-align: center;
176
+ -webkit-user-select: none;
177
+ -moz-user-select: none;
178
+ -ms-user-select: none;
179
+ user-select: none;
180
+
181
+ /* Support: IE <= 11 */
182
+ overflow: visible;
183
+ }
184
+
185
+ .ui-button,
186
+ .ui-button:link,
187
+ .ui-button:visited,
188
+ .ui-button:hover,
189
+ .ui-button:active {
190
+ text-decoration: none;
191
+ }
192
+
193
+ /* to make room for the icon, a width needs to be set here */
194
+ .ui-button-icon-only {
195
+ width: 2em;
196
+ box-sizing: border-box;
197
+ text-indent: -9999px;
198
+ white-space: nowrap;
199
+ }
200
+
201
+ /* no icon support for input elements */
202
+ input.ui-button.ui-button-icon-only {
203
+ text-indent: 0;
204
+ }
205
+
206
+ /* button icon element(s) */
207
+ .ui-button-icon-only .ui-icon {
208
+ position: absolute;
209
+ top: 50%;
210
+ left: 50%;
211
+ margin-top: -8px;
212
+ margin-left: -8px;
213
+ }
214
+
215
+ .ui-button.ui-icon-notext .ui-icon {
216
+ padding: 0;
217
+ width: 2.1em;
218
+ height: 2.1em;
219
+ text-indent: -9999px;
220
+ white-space: nowrap;
221
+
222
+ }
223
+
224
+ input.ui-button.ui-icon-notext .ui-icon {
225
+ width: auto;
226
+ height: auto;
227
+ text-indent: 0;
228
+ white-space: normal;
229
+ padding: .4em 1em;
230
+ }
231
+
232
+ /* workarounds */
233
+ /* Support: Firefox 5 - 40 */
234
+ input.ui-button::-moz-focus-inner,
235
+ button.ui-button::-moz-focus-inner {
236
+ border: 0;
237
+ padding: 0;
238
+ }
239
+ .ui-controlgroup {
240
+ vertical-align: middle;
241
+ display: inline-block;
242
+ }
243
+ .ui-controlgroup > .ui-controlgroup-item {
244
+ float: left;
245
+ margin-left: 0;
246
+ margin-right: 0;
247
+ }
248
+ .ui-controlgroup > .ui-controlgroup-item:focus,
249
+ .ui-controlgroup > .ui-controlgroup-item.ui-visual-focus {
250
+ z-index: 9999;
251
+ }
252
+ .ui-controlgroup-vertical > .ui-controlgroup-item {
253
+ display: block;
254
+ float: none;
255
+ width: 100%;
256
+ margin-top: 0;
257
+ margin-bottom: 0;
258
+ text-align: left;
259
+ }
260
+ .ui-controlgroup-vertical .ui-controlgroup-item {
261
+ box-sizing: border-box;
262
+ }
263
+ .ui-controlgroup .ui-controlgroup-label {
264
+ padding: .4em 1em;
265
+ }
266
+ .ui-controlgroup .ui-controlgroup-label span {
267
+ font-size: 80%;
268
+ }
269
+ .ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item {
270
+ border-left: none;
271
+ }
272
+ .ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item {
273
+ border-top: none;
274
+ }
275
+ .ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content {
276
+ border-right: none;
277
+ }
278
+ .ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content {
279
+ border-bottom: none;
280
+ }
281
+
282
+ /* Spinner specific style fixes */
283
+ .ui-controlgroup-vertical .ui-spinner-input {
284
+
285
+ /* Support: IE8 only, Android < 4.4 only */
286
+ width: 75%;
287
+ width: calc( 100% - 2.4em );
288
+ }
289
+ .ui-controlgroup-vertical .ui-spinner .ui-spinner-up {
290
+ border-top-style: solid;
291
+ }
292
+
293
+ .ui-checkboxradio-label .ui-icon-background {
294
+ box-shadow: inset 1px 1px 1px #ccc;
295
+ border-radius: .12em;
296
+ border: none;
297
+ }
298
+ .ui-checkboxradio-radio-label .ui-icon-background {
299
+ width: 16px;
300
+ height: 16px;
301
+ border-radius: 1em;
302
+ overflow: visible;
303
+ border: none;
304
+ }
305
+ .ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon,
306
+ .ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon {
307
+ background-image: none;
308
+ width: 8px;
309
+ height: 8px;
310
+ border-width: 4px;
311
+ border-style: solid;
312
+ }
313
+ .ui-checkboxradio-disabled {
314
+ pointer-events: none;
315
+ }
316
+ .ui-dialog {
317
+ position: absolute;
318
+ top: 0;
319
+ left: 0;
320
+ padding: .2em;
321
+ outline: 0;
322
+ }
323
+ .ui-dialog .ui-dialog-titlebar {
324
+ padding: .4em 1em;
325
+ position: relative;
326
+ }
327
+ .ui-dialog .ui-dialog-title {
328
+ float: left;
329
+ margin: .1em 0;
330
+ white-space: nowrap;
331
+ width: 90%;
332
+ overflow: hidden;
333
+ text-overflow: ellipsis;
334
+ }
335
+ .ui-dialog .ui-dialog-titlebar-close {
336
+ position: absolute;
337
+ right: .3em;
338
+ top: 50%;
339
+ width: 20px;
340
+ margin: -10px 0 0 0;
341
+ padding: 1px;
342
+ height: 20px;
343
+ }
344
+ .ui-dialog .ui-dialog-content {
345
+ position: relative;
346
+ border: 0;
347
+ padding: .5em 1em;
348
+ background: none;
349
+ overflow: auto;
350
+ }
351
+ .ui-dialog .ui-dialog-buttonpane {
352
+ text-align: left;
353
+ border-width: 1px 0 0 0;
354
+ background-image: none;
355
+ margin-top: .5em;
356
+ padding: .3em 1em .5em .4em;
357
+ }
358
+ .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
359
+ float: right;
360
+ }
361
+ .ui-dialog .ui-dialog-buttonpane button {
362
+ margin: .5em .4em .5em 0;
363
+ cursor: pointer;
364
+ }
365
+ .ui-dialog .ui-resizable-n {
366
+ height: 2px;
367
+ top: 0;
368
+ }
369
+ .ui-dialog .ui-resizable-e {
370
+ width: 2px;
371
+ right: 0;
372
+ }
373
+ .ui-dialog .ui-resizable-s {
374
+ height: 2px;
375
+ bottom: 0;
376
+ }
377
+ .ui-dialog .ui-resizable-w {
378
+ width: 2px;
379
+ left: 0;
380
+ }
381
+ .ui-dialog .ui-resizable-se,
382
+ .ui-dialog .ui-resizable-sw,
383
+ .ui-dialog .ui-resizable-ne,
384
+ .ui-dialog .ui-resizable-nw {
385
+ width: 7px;
386
+ height: 7px;
387
+ }
388
+ .ui-dialog .ui-resizable-se {
389
+ right: 0;
390
+ bottom: 0;
391
+ }
392
+ .ui-dialog .ui-resizable-sw {
393
+ left: 0;
394
+ bottom: 0;
395
+ }
396
+ .ui-dialog .ui-resizable-ne {
397
+ right: 0;
398
+ top: 0;
399
+ }
400
+ .ui-dialog .ui-resizable-nw {
401
+ left: 0;
402
+ top: 0;
403
+ }
404
+ .ui-draggable .ui-dialog-titlebar {
405
+ cursor: move;
406
+ }
407
+ .ui-tabs {
408
+ position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
409
+ padding: .2em;
410
+ }
411
+ .ui-tabs .ui-tabs-nav {
412
+ margin: 0;
413
+ padding: .2em .2em 0;
414
+ }
415
+ .ui-tabs .ui-tabs-nav li {
416
+ list-style: none;
417
+ float: left;
418
+ position: relative;
419
+ top: 0;
420
+ margin: 1px .2em 0 0;
421
+ border-bottom-width: 0;
422
+ padding: 0;
423
+ white-space: nowrap;
424
+ }
425
+ .ui-tabs .ui-tabs-nav .ui-tabs-anchor {
426
+ float: left;
427
+ padding: .5em 1em;
428
+ text-decoration: none;
429
+ }
430
+ .ui-tabs .ui-tabs-nav li.ui-tabs-active {
431
+ margin-bottom: -1px;
432
+ padding-bottom: 1px;
433
+ }
434
+ .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
435
+ .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
436
+ .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
437
+ cursor: text;
438
+ }
439
+ .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
440
+ cursor: pointer;
441
+ }
442
+ .ui-tabs .ui-tabs-panel {
443
+ display: block;
444
+ border-width: 0;
445
+ padding: 1em 1.4em;
446
+ background: none;
447
+ }
448
+
449
+ /* Component containers
450
+ ----------------------------------*/
451
+ .ui-widget {
452
+ font-family: Verdana,Arial,sans-serif;
453
+ font-size: 1.1em;
454
+ }
455
+ .ui-widget .ui-widget {
456
+ font-size: 1em;
457
+ }
458
+ .ui-widget input,
459
+ .ui-widget select,
460
+ .ui-widget textarea,
461
+ .ui-widget button {
462
+ font-family: Verdana,Arial,sans-serif;
463
+ font-size: 1em;
464
+ }
465
+ .ui-widget.ui-widget-content {
466
+ border: 1px solid #d3d3d3;
467
+ }
468
+ .ui-widget-content {
469
+ border: 1px solid #aaaaaa;
470
+ background: #ffffff;
471
+ color: #222222;
472
+ }
473
+ .ui-widget-content a {
474
+ color: #222222;
475
+ }
476
+ .ui-widget-header {
477
+ border: 1px solid #aaaaaa;
478
+ background: #cccccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;
479
+ color: #222222;
480
+ font-weight: bold;
481
+ }
482
+ .ui-widget-header a {
483
+ color: #222222;
484
+ }
485
+
486
+ /* Interaction states
487
+ ----------------------------------*/
488
+ .ui-state-default,
489
+ .ui-widget-content .ui-state-default,
490
+ .ui-widget-header .ui-state-default,
491
+ .ui-button,
492
+
493
+ /* We use html here because we need a greater specificity to make sure disabled
494
+ works properly when clicked or hovered */
495
+ html .ui-button.ui-state-disabled:hover,
496
+ html .ui-button.ui-state-disabled:active {
497
+ border: 1px solid #d3d3d3;
498
+ background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;
499
+ font-weight: normal;
500
+ color: #555555;
501
+ }
502
+ .ui-state-default a,
503
+ .ui-state-default a:link,
504
+ .ui-state-default a:visited,
505
+ a.ui-button,
506
+ a:link.ui-button,
507
+ a:visited.ui-button,
508
+ .ui-button {
509
+ color: #555555;
510
+ text-decoration: none;
511
+ }
512
+ .ui-state-hover,
513
+ .ui-widget-content .ui-state-hover,
514
+ .ui-widget-header .ui-state-hover,
515
+ .ui-state-focus,
516
+ .ui-widget-content .ui-state-focus,
517
+ .ui-widget-header .ui-state-focus,
518
+ .ui-button:hover,
519
+ .ui-button:focus {
520
+ border: 1px solid #999999;
521
+ background: #dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;
522
+ font-weight: normal;
523
+ color: #212121;
524
+ }
525
+ .ui-state-hover a,
526
+ .ui-state-hover a:hover,
527
+ .ui-state-hover a:link,
528
+ .ui-state-hover a:visited,
529
+ .ui-state-focus a,
530
+ .ui-state-focus a:hover,
531
+ .ui-state-focus a:link,
532
+ .ui-state-focus a:visited,
533
+ a.ui-button:hover,
534
+ a.ui-button:focus {
535
+ color: #212121;
536
+ text-decoration: none;
537
+ }
538
+
539
+ .ui-visual-focus {
540
+ box-shadow: 0 0 3px 1px rgb(94, 158, 214);
541
+ }
542
+ .ui-state-active,
543
+ .ui-widget-content .ui-state-active,
544
+ .ui-widget-header .ui-state-active,
545
+ a.ui-button:active,
546
+ .ui-button:active,
547
+ .ui-button.ui-state-active:hover {
548
+ border: 1px solid #aaaaaa;
549
+ background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
550
+ font-weight: normal;
551
+ color: #212121;
552
+ }
553
+ .ui-icon-background,
554
+ .ui-state-active .ui-icon-background {
555
+ border: #aaaaaa;
556
+ background-color: #212121;
557
+ }
558
+ .ui-state-active a,
559
+ .ui-state-active a:link,
560
+ .ui-state-active a:visited {
561
+ color: #212121;
562
+ text-decoration: none;
563
+ }
564
+
565
+ /* Interaction Cues
566
+ ----------------------------------*/
567
+ .ui-state-highlight,
568
+ .ui-widget-content .ui-state-highlight,
569
+ .ui-widget-header .ui-state-highlight {
570
+ border: 1px solid #fcefa1;
571
+ background: #fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;
572
+ color: #363636;
573
+ }
574
+ .ui-state-checked {
575
+ border: 1px solid #fcefa1;
576
+ background: #fbf9ee;
577
+ }
578
+ .ui-state-highlight a,
579
+ .ui-widget-content .ui-state-highlight a,
580
+ .ui-widget-header .ui-state-highlight a {
581
+ color: #363636;
582
+ }
583
+ .ui-state-error,
584
+ .ui-widget-content .ui-state-error,
585
+ .ui-widget-header .ui-state-error {
586
+ border: 1px solid #cd0a0a;
587
+ background: #fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;
588
+ color: #cd0a0a;
589
+ }
590
+ .ui-state-error a,
591
+ .ui-widget-content .ui-state-error a,
592
+ .ui-widget-header .ui-state-error a {
593
+ color: #cd0a0a;
594
+ }
595
+ .ui-state-error-text,
596
+ .ui-widget-content .ui-state-error-text,
597
+ .ui-widget-header .ui-state-error-text {
598
+ color: #cd0a0a;
599
+ }
600
+ .ui-priority-primary,
601
+ .ui-widget-content .ui-priority-primary,
602
+ .ui-widget-header .ui-priority-primary {
603
+ font-weight: bold;
604
+ }
605
+ .ui-priority-secondary,
606
+ .ui-widget-content .ui-priority-secondary,
607
+ .ui-widget-header .ui-priority-secondary {
608
+ opacity: .7;
609
+ -ms-filter: "alpha(opacity=70)"; /* support: IE8 */
610
+ font-weight: normal;
611
+ }
612
+ .ui-state-disabled,
613
+ .ui-widget-content .ui-state-disabled,
614
+ .ui-widget-header .ui-state-disabled {
615
+ opacity: .35;
616
+ -ms-filter: "alpha(opacity=35)"; /* support: IE8 */
617
+ background-image: none;
618
+ }
619
+ .ui-state-disabled .ui-icon {
620
+ -ms-filter: "alpha(opacity=35)"; /* support: IE8 - See #6059 */
621
+ }
622
+
623
+ /* Icons
624
+ ----------------------------------*/
625
+
626
+ /* states and images */
627
+ .ui-icon {
628
+ width: 16px;
629
+ height: 16px;
630
+ }
631
+ .ui-icon,
632
+ .ui-widget-content .ui-icon {
633
+ background-image: url("images/ui-icons_222222_256x240.png");
634
+ }
635
+ .ui-widget-header .ui-icon {
636
+ background-image: url("images/ui-icons_222222_256x240.png");
637
+ }
638
+ .ui-state-hover .ui-icon,
639
+ .ui-state-focus .ui-icon,
640
+ .ui-button:hover .ui-icon,
641
+ .ui-button:focus .ui-icon {
642
+ background-image: url("images/ui-icons_454545_256x240.png");
643
+ }
644
+ .ui-state-active .ui-icon,
645
+ .ui-button:active .ui-icon {
646
+ background-image: url("images/ui-icons_454545_256x240.png");
647
+ }
648
+ .ui-state-highlight .ui-icon,
649
+ .ui-button .ui-state-highlight.ui-icon {
650
+ background-image: url("images/ui-icons_2e83ff_256x240.png");
651
+ }
652
+ .ui-state-error .ui-icon,
653
+ .ui-state-error-text .ui-icon {
654
+ background-image: url("images/ui-icons_cd0a0a_256x240.png");
655
+ }
656
+ .ui-button .ui-icon {
657
+ background-image: url("images/ui-icons_888888_256x240.png");
658
+ }
659
+
660
+ /* positioning */
661
+ /* Three classes needed to override `.ui-button:hover .ui-icon` */
662
+ .ui-icon-blank.ui-icon-blank.ui-icon-blank {
663
+ background-image: none;
664
+ }
665
+ .ui-icon-caret-1-n { background-position: 0 0; }
666
+ .ui-icon-caret-1-ne { background-position: -16px 0; }
667
+ .ui-icon-caret-1-e { background-position: -32px 0; }
668
+ .ui-icon-caret-1-se { background-position: -48px 0; }
669
+ .ui-icon-caret-1-s { background-position: -65px 0; }
670
+ .ui-icon-caret-1-sw { background-position: -80px 0; }
671
+ .ui-icon-caret-1-w { background-position: -96px 0; }
672
+ .ui-icon-caret-1-nw { background-position: -112px 0; }
673
+ .ui-icon-caret-2-n-s { background-position: -128px 0; }
674
+ .ui-icon-caret-2-e-w { background-position: -144px 0; }
675
+ .ui-icon-triangle-1-n { background-position: 0 -16px; }
676
+ .ui-icon-triangle-1-ne { background-position: -16px -16px; }
677
+ .ui-icon-triangle-1-e { background-position: -32px -16px; }
678
+ .ui-icon-triangle-1-se { background-position: -48px -16px; }
679
+ .ui-icon-triangle-1-s { background-position: -65px -16px; }
680
+ .ui-icon-triangle-1-sw { background-position: -80px -16px; }
681
+ .ui-icon-triangle-1-w { background-position: -96px -16px; }
682
+ .ui-icon-triangle-1-nw { background-position: -112px -16px; }
683
+ .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
684
+ .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
685
+ .ui-icon-arrow-1-n { background-position: 0 -32px; }
686
+ .ui-icon-arrow-1-ne { background-position: -16px -32px; }
687
+ .ui-icon-arrow-1-e { background-position: -32px -32px; }
688
+ .ui-icon-arrow-1-se { background-position: -48px -32px; }
689
+ .ui-icon-arrow-1-s { background-position: -65px -32px; }
690
+ .ui-icon-arrow-1-sw { background-position: -80px -32px; }
691
+ .ui-icon-arrow-1-w { background-position: -96px -32px; }
692
+ .ui-icon-arrow-1-nw { background-position: -112px -32px; }
693
+ .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
694
+ .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
695
+ .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
696
+ .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
697
+ .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
698
+ .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
699
+ .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
700
+ .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
701
+ .ui-icon-arrowthick-1-n { background-position: 1px -48px; }
702
+ .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
703
+ .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
704
+ .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
705
+ .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
706
+ .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
707
+ .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
708
+ .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
709
+ .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
710
+ .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
711
+ .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
712
+ .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
713
+ .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
714
+ .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
715
+ .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
716
+ .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
717
+ .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
718
+ .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
719
+ .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
720
+ .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
721
+ .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
722
+ .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
723
+ .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
724
+ .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
725
+ .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
726
+ .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
727
+ .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
728
+ .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
729
+ .ui-icon-arrow-4 { background-position: 0 -80px; }
730
+ .ui-icon-arrow-4-diag { background-position: -16px -80px; }
731
+ .ui-icon-extlink { background-position: -32px -80px; }
732
+ .ui-icon-newwin { background-position: -48px -80px; }
733
+ .ui-icon-refresh { background-position: -64px -80px; }
734
+ .ui-icon-shuffle { background-position: -80px -80px; }
735
+ .ui-icon-transfer-e-w { background-position: -96px -80px; }
736
+ .ui-icon-transferthick-e-w { background-position: -112px -80px; }
737
+ .ui-icon-folder-collapsed { background-position: 0 -96px; }
738
+ .ui-icon-folder-open { background-position: -16px -96px; }
739
+ .ui-icon-document { background-position: -32px -96px; }
740
+ .ui-icon-document-b { background-position: -48px -96px; }
741
+ .ui-icon-note { background-position: -64px -96px; }
742
+ .ui-icon-mail-closed { background-position: -80px -96px; }
743
+ .ui-icon-mail-open { background-position: -96px -96px; }
744
+ .ui-icon-suitcase { background-position: -112px -96px; }
745
+ .ui-icon-comment { background-position: -128px -96px; }
746
+ .ui-icon-person { background-position: -144px -96px; }
747
+ .ui-icon-print { background-position: -160px -96px; }
748
+ .ui-icon-trash { background-position: -176px -96px; }
749
+ .ui-icon-locked { background-position: -192px -96px; }
750
+ .ui-icon-unlocked { background-position: -208px -96px; }
751
+ .ui-icon-bookmark { background-position: -224px -96px; }
752
+ .ui-icon-tag { background-position: -240px -96px; }
753
+ .ui-icon-home { background-position: 0 -112px; }
754
+ .ui-icon-flag { background-position: -16px -112px; }
755
+ .ui-icon-calendar { background-position: -32px -112px; }
756
+ .ui-icon-cart { background-position: -48px -112px; }
757
+ .ui-icon-pencil { background-position: -64px -112px; }
758
+ .ui-icon-clock { background-position: -80px -112px; }
759
+ .ui-icon-disk { background-position: -96px -112px; }
760
+ .ui-icon-calculator { background-position: -112px -112px; }
761
+ .ui-icon-zoomin { background-position: -128px -112px; }
762
+ .ui-icon-zoomout { background-position: -144px -112px; }
763
+ .ui-icon-search { background-position: -160px -112px; }
764
+ .ui-icon-wrench { background-position: -176px -112px; }
765
+ .ui-icon-gear { background-position: -192px -112px; }
766
+ .ui-icon-heart { background-position: -208px -112px; }
767
+ .ui-icon-star { background-position: -224px -112px; }
768
+ .ui-icon-link { background-position: -240px -112px; }
769
+ .ui-icon-cancel { background-position: 0 -128px; }
770
+ .ui-icon-plus { background-position: -16px -128px; }
771
+ .ui-icon-plusthick { background-position: -32px -128px; }
772
+ .ui-icon-minus { background-position: -48px -128px; }
773
+ .ui-icon-minusthick { background-position: -64px -128px; }
774
+ .ui-icon-close { background-position: -80px -128px; }
775
+ .ui-icon-closethick { background-position: -96px -128px; }
776
+ .ui-icon-key { background-position: -112px -128px; }
777
+ .ui-icon-lightbulb { background-position: -128px -128px; }
778
+ .ui-icon-scissors { background-position: -144px -128px; }
779
+ .ui-icon-clipboard { background-position: -160px -128px; }
780
+ .ui-icon-copy { background-position: -176px -128px; }
781
+ .ui-icon-contact { background-position: -192px -128px; }
782
+ .ui-icon-image { background-position: -208px -128px; }
783
+ .ui-icon-video { background-position: -224px -128px; }
784
+ .ui-icon-script { background-position: -240px -128px; }
785
+ .ui-icon-alert { background-position: 0 -144px; }
786
+ .ui-icon-info { background-position: -16px -144px; }
787
+ .ui-icon-notice { background-position: -32px -144px; }
788
+ .ui-icon-help { background-position: -48px -144px; }
789
+ .ui-icon-check { background-position: -64px -144px; }
790
+ .ui-icon-bullet { background-position: -80px -144px; }
791
+ .ui-icon-radio-on { background-position: -96px -144px; }
792
+ .ui-icon-radio-off { background-position: -112px -144px; }
793
+ .ui-icon-pin-w { background-position: -128px -144px; }
794
+ .ui-icon-pin-s { background-position: -144px -144px; }
795
+ .ui-icon-play { background-position: 0 -160px; }
796
+ .ui-icon-pause { background-position: -16px -160px; }
797
+ .ui-icon-seek-next { background-position: -32px -160px; }
798
+ .ui-icon-seek-prev { background-position: -48px -160px; }
799
+ .ui-icon-seek-end { background-position: -64px -160px; }
800
+ .ui-icon-seek-start { background-position: -80px -160px; }
801
+ /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
802
+ .ui-icon-seek-first { background-position: -80px -160px; }
803
+ .ui-icon-stop { background-position: -96px -160px; }
804
+ .ui-icon-eject { background-position: -112px -160px; }
805
+ .ui-icon-volume-off { background-position: -128px -160px; }
806
+ .ui-icon-volume-on { background-position: -144px -160px; }
807
+ .ui-icon-power { background-position: 0 -176px; }
808
+ .ui-icon-signal-diag { background-position: -16px -176px; }
809
+ .ui-icon-signal { background-position: -32px -176px; }
810
+ .ui-icon-battery-0 { background-position: -48px -176px; }
811
+ .ui-icon-battery-1 { background-position: -64px -176px; }
812
+ .ui-icon-battery-2 { background-position: -80px -176px; }
813
+ .ui-icon-battery-3 { background-position: -96px -176px; }
814
+ .ui-icon-circle-plus { background-position: 0 -192px; }
815
+ .ui-icon-circle-minus { background-position: -16px -192px; }
816
+ .ui-icon-circle-close { background-position: -32px -192px; }
817
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
818
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
819
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
820
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
821
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
822
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
823
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
824
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
825
+ .ui-icon-circle-zoomin { background-position: -176px -192px; }
826
+ .ui-icon-circle-zoomout { background-position: -192px -192px; }
827
+ .ui-icon-circle-check { background-position: -208px -192px; }
828
+ .ui-icon-circlesmall-plus { background-position: 0 -208px; }
829
+ .ui-icon-circlesmall-minus { background-position: -16px -208px; }
830
+ .ui-icon-circlesmall-close { background-position: -32px -208px; }
831
+ .ui-icon-squaresmall-plus { background-position: -48px -208px; }
832
+ .ui-icon-squaresmall-minus { background-position: -64px -208px; }
833
+ .ui-icon-squaresmall-close { background-position: -80px -208px; }
834
+ .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
835
+ .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
836
+ .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
837
+ .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
838
+ .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
839
+ .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
840
+
841
+
842
+ /* Misc visuals
843
+ ----------------------------------*/
844
+
845
+ /* Corner radius */
846
+ .ui-corner-all,
847
+ .ui-corner-top,
848
+ .ui-corner-left,
849
+ .ui-corner-tl {
850
+ border-top-left-radius: 4px;
851
+ }
852
+ .ui-corner-all,
853
+ .ui-corner-top,
854
+ .ui-corner-right,
855
+ .ui-corner-tr {
856
+ border-top-right-radius: 4px;
857
+ }
858
+ .ui-corner-all,
859
+ .ui-corner-bottom,
860
+ .ui-corner-left,
861
+ .ui-corner-bl {
862
+ border-bottom-left-radius: 4px;
863
+ }
864
+ .ui-corner-all,
865
+ .ui-corner-bottom,
866
+ .ui-corner-right,
867
+ .ui-corner-br {
868
+ border-bottom-right-radius: 4px;
869
+ }
870
+
871
+ /* Overlays */
872
+ .ui-widget-overlay {
873
+ background: #aaaaaa;
874
+ opacity: .3;
875
+ -ms-filter: Alpha(Opacity=30); /* support: IE8 */
876
+ }
877
+ .ui-widget-shadow {
878
+ -webkit-box-shadow: -8px -8px 8px #aaaaaa;
879
+ box-shadow: -8px -8px 8px #aaaaaa;
880
+ }
assets/css/jquery-ui.min.css CHANGED
@@ -1,7 +1,7 @@
1
- /*! jQuery UI - v1.13.1 - 2022-03-16
2
- * http://jqueryui.com
3
- * Includes: draggable.css, core.css, resizable.css, button.css, controlgroup.css, checkboxradio.css, dialog.css, tabs.css, theme.css
4
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=smoothness&cornerRadiusShadow=8px&offsetLeftShadow=-8px&offsetTopShadow=-8px&thicknessShadow=8px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=aaaaaa&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cd0a0a&fcError=cd0a0a&borderColorError=cd0a0a&bgImgOpacityError=95&bgTextureError=glass&bgColorError=fef1ec&iconColorHighlight=2e83ff&fcHighlight=363636&borderColorHighlight=fcefa1&bgImgOpacityHighlight=55&bgTextureHighlight=glass&bgColorHighlight=fbf9ee&iconColorActive=454545&fcActive=212121&borderColorActive=aaaaaa&bgImgOpacityActive=65&bgTextureActive=glass&bgColorActive=ffffff&iconColorHover=454545&fcHover=212121&borderColorHover=999999&bgImgOpacityHover=75&bgTextureHover=glass&bgColorHover=dadada&iconColorDefault=888888&fcDefault=555555&borderColorDefault=d3d3d3&bgImgOpacityDefault=75&bgTextureDefault=glass&bgColorDefault=e6e6e6&iconColorContent=222222&fcContent=222222&borderColorContent=aaaaaa&bgImgOpacityContent=75&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=222222&fcHeader=222222&borderColorHeader=aaaaaa&bgImgOpacityHeader=75&bgTextureHeader=highlight_soft&bgColorHeader=cccccc&cornerRadius=4px&fsDefault=1.1em&fwDefault=normal&ffDefault=Verdana%2CArial%2Csans-serif
5
- * Copyright jQuery Foundation and other contributors; Licensed MIT */
6
-
7
  .ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;-ms-filter:"alpha(opacity=0)"}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-button{padding:.4em 1em;display:inline-block;position:relative;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2em;box-sizing:border-box;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-button-icon-only{text-indent:0}.ui-button-icon-only .ui-icon{position:absolute;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.ui-button.ui-icon-notext .ui-icon{padding:0;width:2.1em;height:2.1em;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-icon-notext .ui-icon{width:auto;height:auto;text-indent:0;white-space:normal;padding:.4em 1em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-controlgroup{vertical-align:middle;display:inline-block}.ui-controlgroup > .ui-controlgroup-item{float:left;margin-left:0;margin-right:0}.ui-controlgroup > .ui-controlgroup-item:focus,.ui-controlgroup > .ui-controlgroup-item.ui-visual-focus{z-index:9999}.ui-controlgroup-vertical > .ui-controlgroup-item{display:block;float:none;width:100%;margin-top:0;margin-bottom:0;text-align:left}.ui-controlgroup-vertical .ui-controlgroup-item{box-sizing:border-box}.ui-controlgroup .ui-controlgroup-label{padding:.4em 1em}.ui-controlgroup .ui-controlgroup-label span{font-size:80%}.ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item{border-left:none}.ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item{border-top:none}.ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content{border-right:none}.ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content{border-bottom:none}.ui-controlgroup-vertical .ui-spinner-input{width:75%;width:calc( 100% - 2.4em )}.ui-controlgroup-vertical .ui-spinner .ui-spinner-up{border-top-style:solid}.ui-checkboxradio-label .ui-icon-background{box-shadow:inset 1px 1px 1px #ccc;border-radius:.12em;border:none}.ui-checkboxradio-radio-label .ui-icon-background{width:16px;height:16px;border-radius:1em;overflow:visible;border:none}.ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon,.ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon{background-image:none;width:8px;height:8px;border-width:4px;border-style:solid}.ui-checkboxradio-disabled{pointer-events:none}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-n{height:2px;top:0}.ui-dialog .ui-resizable-e{width:2px;right:0}.ui-dialog .ui-resizable-s{height:2px;bottom:0}.ui-dialog .ui-resizable-w{width:2px;left:0}.ui-dialog .ui-resizable-se,.ui-dialog .ui-resizable-sw,.ui-dialog .ui-resizable-ne,.ui-dialog .ui-resizable-nw{width:7px;height:7px}.ui-dialog .ui-resizable-se{right:0;bottom:0}.ui-dialog .ui-resizable-sw{left:0;bottom:0}.ui-dialog .ui-resizable-ne{right:0;top:0}.ui-dialog .ui-resizable-nw{left:0;top:0}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget.ui-widget-content{border:1px solid #d3d3d3}.ui-widget-content{border:1px solid #aaa;background:#fff;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-button,html .ui-button.ui-state-disabled:hover,html .ui-button.ui-state-disabled:active{border:1px solid #d3d3d3;background:#e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button,.ui-button{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus,.ui-button:hover,.ui-button:focus{border:1px solid #999;background:#dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,a.ui-button:hover,a.ui-button:focus{color:#212121;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px rgb(94,158,214)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover{border:1px solid #aaa;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-icon-background,.ui-state-active .ui-icon-background{border:#aaa;background-color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;color:#363636}.ui-state-checked{border:1px solid #fcefa1;background:#fbf9ee}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;-ms-filter:"alpha(opacity=70)";font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;-ms-filter:"alpha(opacity=35)";background-image:none}.ui-state-disabled .ui-icon{-ms-filter:"alpha(opacity=35)"}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-button:hover .ui-icon,.ui-button:focus .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-active .ui-icon,.ui-button:active .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-highlight .ui-icon,.ui-button .ui-state-highlight.ui-icon{background-image:url("images/ui-icons_2e83ff_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cd0a0a_256x240.png")}.ui-button .ui-icon{background-image:url("images/ui-icons_888888_256x240.png")}.ui-icon-blank.ui-icon-blank.ui-icon-blank{background-image:none}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa;opacity:.3;-ms-filter:Alpha(Opacity=30)}.ui-widget-shadow{-webkit-box-shadow:-8px -8px 8px #aaa;box-shadow:-8px -8px 8px #aaa}
1
+ /*! jQuery UI - v1.13.1 - 2022-03-16
2
+ * http://jqueryui.com
3
+ * Includes: draggable.css, core.css, resizable.css, button.css, controlgroup.css, checkboxradio.css, dialog.css, tabs.css, theme.css
4
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=smoothness&cornerRadiusShadow=8px&offsetLeftShadow=-8px&offsetTopShadow=-8px&thicknessShadow=8px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=aaaaaa&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cd0a0a&fcError=cd0a0a&borderColorError=cd0a0a&bgImgOpacityError=95&bgTextureError=glass&bgColorError=fef1ec&iconColorHighlight=2e83ff&fcHighlight=363636&borderColorHighlight=fcefa1&bgImgOpacityHighlight=55&bgTextureHighlight=glass&bgColorHighlight=fbf9ee&iconColorActive=454545&fcActive=212121&borderColorActive=aaaaaa&bgImgOpacityActive=65&bgTextureActive=glass&bgColorActive=ffffff&iconColorHover=454545&fcHover=212121&borderColorHover=999999&bgImgOpacityHover=75&bgTextureHover=glass&bgColorHover=dadada&iconColorDefault=888888&fcDefault=555555&borderColorDefault=d3d3d3&bgImgOpacityDefault=75&bgTextureDefault=glass&bgColorDefault=e6e6e6&iconColorContent=222222&fcContent=222222&borderColorContent=aaaaaa&bgImgOpacityContent=75&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=222222&fcHeader=222222&borderColorHeader=aaaaaa&bgImgOpacityHeader=75&bgTextureHeader=highlight_soft&bgColorHeader=cccccc&cornerRadius=4px&fsDefault=1.1em&fwDefault=normal&ffDefault=Verdana%2CArial%2Csans-serif
5
+ * Copyright jQuery Foundation and other contributors; Licensed MIT */
6
+
7
  .ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;-ms-filter:"alpha(opacity=0)"}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-button{padding:.4em 1em;display:inline-block;position:relative;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2em;box-sizing:border-box;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-button-icon-only{text-indent:0}.ui-button-icon-only .ui-icon{position:absolute;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.ui-button.ui-icon-notext .ui-icon{padding:0;width:2.1em;height:2.1em;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-icon-notext .ui-icon{width:auto;height:auto;text-indent:0;white-space:normal;padding:.4em 1em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-controlgroup{vertical-align:middle;display:inline-block}.ui-controlgroup > .ui-controlgroup-item{float:left;margin-left:0;margin-right:0}.ui-controlgroup > .ui-controlgroup-item:focus,.ui-controlgroup > .ui-controlgroup-item.ui-visual-focus{z-index:9999}.ui-controlgroup-vertical > .ui-controlgroup-item{display:block;float:none;width:100%;margin-top:0;margin-bottom:0;text-align:left}.ui-controlgroup-vertical .ui-controlgroup-item{box-sizing:border-box}.ui-controlgroup .ui-controlgroup-label{padding:.4em 1em}.ui-controlgroup .ui-controlgroup-label span{font-size:80%}.ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item{border-left:none}.ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item{border-top:none}.ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content{border-right:none}.ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content{border-bottom:none}.ui-controlgroup-vertical .ui-spinner-input{width:75%;width:calc( 100% - 2.4em )}.ui-controlgroup-vertical .ui-spinner .ui-spinner-up{border-top-style:solid}.ui-checkboxradio-label .ui-icon-background{box-shadow:inset 1px 1px 1px #ccc;border-radius:.12em;border:none}.ui-checkboxradio-radio-label .ui-icon-background{width:16px;height:16px;border-radius:1em;overflow:visible;border:none}.ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon,.ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon{background-image:none;width:8px;height:8px;border-width:4px;border-style:solid}.ui-checkboxradio-disabled{pointer-events:none}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-n{height:2px;top:0}.ui-dialog .ui-resizable-e{width:2px;right:0}.ui-dialog .ui-resizable-s{height:2px;bottom:0}.ui-dialog .ui-resizable-w{width:2px;left:0}.ui-dialog .ui-resizable-se,.ui-dialog .ui-resizable-sw,.ui-dialog .ui-resizable-ne,.ui-dialog .ui-resizable-nw{width:7px;height:7px}.ui-dialog .ui-resizable-se{right:0;bottom:0}.ui-dialog .ui-resizable-sw{left:0;bottom:0}.ui-dialog .ui-resizable-ne{right:0;top:0}.ui-dialog .ui-resizable-nw{left:0;top:0}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget.ui-widget-content{border:1px solid #d3d3d3}.ui-widget-content{border:1px solid #aaa;background:#fff;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-button,html .ui-button.ui-state-disabled:hover,html .ui-button.ui-state-disabled:active{border:1px solid #d3d3d3;background:#e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button,.ui-button{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus,.ui-button:hover,.ui-button:focus{border:1px solid #999;background:#dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,a.ui-button:hover,a.ui-button:focus{color:#212121;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px rgb(94,158,214)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover{border:1px solid #aaa;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-icon-background,.ui-state-active .ui-icon-background{border:#aaa;background-color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;color:#363636}.ui-state-checked{border:1px solid #fcefa1;background:#fbf9ee}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;-ms-filter:"alpha(opacity=70)";font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;-ms-filter:"alpha(opacity=35)";background-image:none}.ui-state-disabled .ui-icon{-ms-filter:"alpha(opacity=35)"}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-button:hover .ui-icon,.ui-button:focus .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-active .ui-icon,.ui-button:active .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-highlight .ui-icon,.ui-button .ui-state-highlight.ui-icon{background-image:url("images/ui-icons_2e83ff_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cd0a0a_256x240.png")}.ui-button .ui-icon{background-image:url("images/ui-icons_888888_256x240.png")}.ui-icon-blank.ui-icon-blank.ui-icon-blank{background-image:none}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa;opacity:.3;-ms-filter:Alpha(Opacity=30)}.ui-widget-shadow{-webkit-box-shadow:-8px -8px 8px #aaa;box-shadow:-8px -8px 8px #aaa}
includes/adsense.php CHANGED
@@ -1,244 +1,244 @@
1
- <?php
2
- /**
3
- * Adsense specific features.
4
- */
5
-
6
- /**
7
- * Add inline script to hide the notice on clicking dismiss button.
8
- */
9
- add_action(
10
- 'admin_enqueue_scripts',
11
- function () {
12
- if ( current_user_can( 'manage_options' ) ) {
13
- wp_localize_script(
14
- 'jquery',
15
- 'quick_adsense_adstxt_adsense',
16
- [
17
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
18
- 'nonce' => wp_create_nonce( 'quick-adsense-adstxt-adsense-nonce' ),
19
- ]
20
- );
21
- wp_add_inline_script(
22
- 'jquery',
23
- quick_adsense_load_file( 'templates/js/script-admin-notice.php' )
24
- );
25
- }
26
- }
27
- );
28
-
29
- /**
30
- * This function checks for and displays the admin notice when needed.
31
- *
32
- * @param boolean $is_ajax Specific where the function is being called during an ajax call.
33
- */
34
- function quick_adsense_adstxt_adsense_admin_notice( $is_ajax = false ) {
35
- if ( current_user_can( 'manage_options' ) ) {
36
- if ( ! get_option( 'quick_adsense_adstxt_adsense_admin_notice_dismissed' ) ) {
37
- $adstxt_new_adsense_entries = get_transient( 'quick_adsense_adstxt_adsense_autocheck_content' );
38
- if ( 'CHECKED' !== $adstxt_new_adsense_entries ) {
39
- if ( ! isset( $adstxt_new_adsense_entries ) || ( false === $adstxt_new_adsense_entries ) ) {
40
- $adstxt_new_adsense_entries = quick_adsense_adstxt_adsense_get_status();
41
- }
42
- if ( ( false !== $adstxt_new_adsense_entries ) && is_array( $adstxt_new_adsense_entries ) ) {
43
- set_transient( 'quick_adsense_adstxt_adsense_autocheck_content', $adstxt_new_adsense_entries, DAY_IN_SECONDS );
44
- $screen = get_current_screen();
45
- quick_adsense_load_file(
46
- 'templates/block-adsense-adstxt-notice.php',
47
- [
48
- 'screen_id' => $screen->id,
49
- 'is_ajax' => $is_ajax,
50
- 'adstxt_new_adsense_entries' => implode( '<br />', $adstxt_new_adsense_entries ),
51
- ],
52
- true
53
- );
54
- } else {
55
- set_transient( 'quick_adsense_adstxt_adsense_autocheck_content', 'CHECKED', DAY_IN_SECONDS );
56
- }
57
- }
58
- }
59
- }
60
- }
61
- add_action( 'admin_notices', 'quick_adsense_adstxt_adsense_admin_notice' );
62
-
63
- /**
64
- * This function checks whether new entries need to be added to ads.txt based on the adcodes added.
65
- *
66
- * @return mixed False is no changes are needed, New ads.txt lines as an array if changes are required.
67
- */
68
- function quick_adsense_adstxt_adsense_get_status() {
69
- $file_handler = new QuickAdsense\FileHandler( 'ads.txt' );
70
- if ( $file_handler->exists() ) {
71
- $adsense_publisher_ids = quick_adsense_adstxt_adsense_get_publisherids();
72
- $adstxt_content = $file_handler->read();
73
- if ( false !== $adstxt_content ) {
74
- $adstxt_content_data = array_filter( explode( "\n", trim( $adstxt_content ) ), 'trim' );
75
- if ( is_array( $adstxt_content_data ) ) {
76
- $adstxt_existing_adsense_entries = [];
77
- foreach ( $adstxt_content_data as $line ) {
78
- if ( strpos( $line, 'google.com' ) !== false ) {
79
- $adstxt_existing_adsense_entries[] = $line;
80
- }
81
- }
82
-
83
- $adstxt_new_adsense_entries = [];
84
- if ( count( $adstxt_existing_adsense_entries ) === 0 ) {
85
- if ( is_array( $adsense_publisher_ids ) && ( count( $adsense_publisher_ids ) > 0 ) ) {
86
- foreach ( $adsense_publisher_ids as $adsense_publisher_id ) {
87
- $adstxt_new_adsense_entries[] = 'google.com, ' . $adsense_publisher_id . ', DIRECT, f08c47fec0942fa0';
88
- }
89
- }
90
- } else {
91
- if ( is_array( $adsense_publisher_ids ) && ( count( $adsense_publisher_ids ) > 0 ) ) {
92
- foreach ( $adsense_publisher_ids as $adsense_publisher_id ) {
93
- $entry_exists = false;
94
- foreach ( $adstxt_existing_adsense_entries as $adstxt_existing_adsense_entry ) {
95
- if ( strpos( $adstxt_existing_adsense_entry, $adsense_publisher_id ) !== false ) {
96
- $entry_exists = true;
97
- }
98
- }
99
- if ( false === $entry_exists ) {
100
- $adstxt_new_adsense_entries[] = 'google.com, ' . $adsense_publisher_id . ', DIRECT, f08c47fec0942fa0';
101
- }
102
- }
103
- }
104
- }
105
- }
106
- }
107
- }
108
- if ( isset( $adstxt_new_adsense_entries ) && count( $adstxt_new_adsense_entries ) > 0 ) {
109
- return $adstxt_new_adsense_entries;
110
- }
111
- return false;
112
- }
113
-
114
- /**
115
- * Function to extract publisher Ids from settings.
116
- *
117
- * @return mixed False if no publisher ids found, Array of publisher ids if publisher ids found.
118
- */
119
- function quick_adsense_adstxt_adsense_get_publisherids() {
120
- $adsense_publisher_ids = [];
121
-
122
- $settings = get_option( 'quick_adsense_settings' );
123
- if ( isset( $settings ) && is_array( $settings ) ) {
124
- for ( $i = 1; $i <= 10; $i++ ) {
125
- if ( isset( $settings[ 'onpost_ad_' . $i . '_content' ] ) && ( '' !== $settings[ 'onpost_ad_' . $i . '_content' ] ) ) {
126
- $temp = quick_adsense_adstxt_adsense_extract_publisherids( $settings[ 'onpost_ad_' . $i . '_content' ] );
127
- if ( false !== $temp ) {
128
- $adsense_publisher_ids = array_merge( $adsense_publisher_ids, $temp );
129
- }
130
- }
131
-
132
- if ( isset( $settings[ 'widget_ad_' . $i . '_content' ] ) && ( '' !== $settings[ 'widget_ad_' . $i . '_content' ] ) ) {
133
- $temp = quick_adsense_adstxt_adsense_extract_publisherids( $settings[ 'widget_ad_' . $i . '_content' ] );
134
- if ( false !== $temp ) {
135
- $adsense_publisher_ids = array_merge( $adsense_publisher_ids, $temp );
136
- }
137
- }
138
-
139
- if ( isset( $settings['header_embed_code'] ) && ( '' !== $settings['header_embed_code'] ) ) {
140
- $temp = quick_adsense_adstxt_adsense_extract_publisherids( $settings['header_embed_code'] );
141
- if ( false !== $temp ) {
142
- $adsense_publisher_ids = array_merge( $adsense_publisher_ids, $temp );
143
- }
144
- }
145
-
146
- if ( isset( $settings['footer_embed_code'] ) && ( '' !== $settings['footer_embed_code'] ) ) {
147
- $temp = quick_adsense_adstxt_adsense_extract_publisherids( $settings['footer_embed_code'] );
148
- if ( false !== $temp ) {
149
- $adsense_publisher_ids = array_merge( $adsense_publisher_ids, $temp );
150
- }
151
- }
152
- }
153
- }
154
- $adsense_publisher_ids = array_unique( $adsense_publisher_ids );
155
-
156
- if ( count( $adsense_publisher_ids ) > 0 ) {
157
- return $adsense_publisher_ids;
158
- }
159
- return false;
160
- }
161
-
162
- /**
163
- * Function to extract publisher Ids from provided adcode.
164
- *
165
- * @param string $ad_code The ad code.
166
- *
167
- * @return mixed False if no publisher ids found, Array of publisher ids if publisher ids found.
168
- */
169
- function quick_adsense_adstxt_adsense_extract_publisherids( $ad_code ) {
170
- $publisher_ids = [];
171
- if ( isset( $ad_code ) && ( '' !== $ad_code ) ) {
172
- if ( preg_match( '/googlesyndication.com/', $ad_code ) ) {
173
- if ( preg_match( '/data-ad-client=/', $ad_code ) ) {
174
- // ASYNC AD CODE.
175
- $ad_code_parts = explode( 'data-ad-client', $ad_code );
176
- } elseif ( preg_match( '/client=ca-pub-/', $ad_code ) ) {
177
- // NEW ASYNC AD CODE.
178
- $ad_code_parts = explode( 'ca-pub-', str_replace( 'ca-pub-', 'ca-pub-"', $ad_code ) );
179
- } else {
180
- // ORDINARY AD CODE.
181
- $ad_code_parts = explode( 'google_ad_client', $ad_code );
182
- }
183
- if ( isset( $ad_code_parts[1] ) && ( '' !== $ad_code_parts[1] ) ) {
184
- preg_match( '#"([a-zA-Z0-9-\s]+)"#', stripslashes( $ad_code_parts[1] ), $matches );
185
- if ( isset( $matches[1] ) && ( '' !== $matches[1] ) ) {
186
- $publisher_ids[] = str_replace( [ '"', ' ', 'ca-' ], [ '' ], $matches[1] );
187
- }
188
- }
189
- }
190
- }
191
-
192
- if ( count( $publisher_ids ) > 0 ) {
193
- return $publisher_ids;
194
- }
195
- return false;
196
- }
197
-
198
- /**
199
- * This action dismisses the Ads.txt admin notice permanently.
200
- */
201
- add_action(
202
- 'wp_ajax_quick_adsense_adstxt_adsense_admin_notice_dismiss',
203
- function () {
204
- if ( isset( $_POST['nonce'] ) && wp_verify_nonce( sanitize_key( $_POST['nonce'] ), 'quick-adsense-adstxt-adsense-nonce' ) && ( current_user_can( 'manage_options' ) ) ) {
205
- update_option( 'quick_adsense_adstxt_adsense_admin_notice_dismissed', 'true' );
206
- wp_send_json_success();
207
- }
208
- wp_send_json_error();
209
- }
210
- );
211
-
212
- /**
213
- * This action handles the Ajax trigerred Ads.txt update.
214
- */
215
- add_action(
216
- 'wp_ajax_quick_adsense_adstxt_adsense_auto_update',
217
- function () {
218
- if ( isset( $_POST['nonce'] ) && wp_verify_nonce( sanitize_key( $_POST['nonce'] ), 'quick-adsense-adstxt-adsense-nonce' ) && ( current_user_can( 'manage_options' ) ) ) {
219
- $adstxt_new_adsense_entries = quick_adsense_adstxt_adsense_get_status();
220
- $file_handler = new QuickAdsense\FileHandler( 'ads.txt' );
221
- if ( false !== $adstxt_new_adsense_entries ) {
222
- $adstxt_content = $file_handler->read();
223
- $adstxt_content_data = array_filter( explode( "\n", trim( $adstxt_content ) ), 'trim' );
224
- $adstxt_updated_content = array_filter( array_merge( $adstxt_content_data, $adstxt_new_adsense_entries ), 'trim' );
225
- }
226
- if ( isset( $adstxt_updated_content ) && is_array( $adstxt_updated_content ) && ( count( $adstxt_updated_content ) > 0 ) ) {
227
- $adstxt_updated_content = implode( "\n", $adstxt_updated_content );
228
- if ( $file_handler->write( $adstxt_updated_content ) ) {
229
- wp_send_json_success();
230
- } else {
231
- wp_send_json_error(
232
- quick_adsense_load_file(
233
- 'templates/block-adsense-adstxt-update-failed.php',
234
- [
235
- 'content' => $adstxt_updated_content,
236
- ]
237
- )
238
- );
239
- }
240
- }
241
- }
242
- wp_send_json_error();
243
- }
244
- );
1
+ <?php
2
+ /**
3
+ * Adsense specific features.
4
+ */
5
+
6
+ /**
7
+ * Add inline script to hide the notice on clicking dismiss button.
8
+ */
9
+ add_action(
10
+ 'admin_enqueue_scripts',
11
+ function () {
12
+ if ( current_user_can( 'manage_options' ) ) {
13
+ wp_localize_script(
14
+ 'jquery',
15
+ 'quick_adsense_adstxt_adsense',
16
+ [
17
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
18
+ 'nonce' => wp_create_nonce( 'quick-adsense-adstxt-adsense-nonce' ),
19
+ ]
20
+ );
21
+ wp_add_inline_script(
22
+ 'jquery',
23
+ quick_adsense_load_file( 'templates/js/script-admin-notice.php' )
24
+ );
25
+ }
26
+ }
27
+ );
28
+
29
+ /**
30
+ * This function checks for and displays the admin notice when needed.
31
+ *
32
+ * @param boolean $is_ajax Specific where the function is being called during an ajax call.
33
+ */
34
+ function quick_adsense_adstxt_adsense_admin_notice( $is_ajax = false ) {
35
+ if ( current_user_can( 'manage_options' ) ) {
36
+ if ( ! get_option( 'quick_adsense_adstxt_adsense_admin_notice_dismissed' ) ) {
37
+ $adstxt_new_adsense_entries = get_transient( 'quick_adsense_adstxt_adsense_autocheck_content' );
38
+ if ( 'CHECKED' !== $adstxt_new_adsense_entries ) {
39
+ if ( ! isset( $adstxt_new_adsense_entries ) || ( false === $adstxt_new_adsense_entries ) ) {
40
+ $adstxt_new_adsense_entries = quick_adsense_adstxt_adsense_get_status();
41
+ }
42
+ if ( ( false !== $adstxt_new_adsense_entries ) && is_array( $adstxt_new_adsense_entries ) ) {
43
+ set_transient( 'quick_adsense_adstxt_adsense_autocheck_content', $adstxt_new_adsense_entries, DAY_IN_SECONDS );
44
+ $screen = get_current_screen();
45
+ quick_adsense_load_file(
46
+ 'templates/block-adsense-adstxt-notice.php',
47
+ [
48
+ 'screen_id' => $screen->id,
49
+ 'is_ajax' => $is_ajax,
50
+ 'adstxt_new_adsense_entries' => implode( '<br />', $adstxt_new_adsense_entries ),
51
+ ],
52
+ true
53
+ );
54
+ } else {
55
+ set_transient( 'quick_adsense_adstxt_adsense_autocheck_content', 'CHECKED', DAY_IN_SECONDS );
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ add_action( 'admin_notices', 'quick_adsense_adstxt_adsense_admin_notice' );
62
+
63
+ /**
64
+ * This function checks whether new entries need to be added to ads.txt based on the adcodes added.
65
+ *
66
+ * @return mixed False is no changes are needed, New ads.txt lines as an array if changes are required.
67
+ */
68
+ function quick_adsense_adstxt_adsense_get_status() {
69
+ $file_handler = new QuickAdsense\FileHandler( 'ads.txt' );
70
+ if ( $file_handler->exists() ) {
71
+ $adsense_publisher_ids = quick_adsense_adstxt_adsense_get_publisherids();
72
+ $adstxt_content = $file_handler->read();
73
+ if ( false !== $adstxt_content ) {
74
+ $adstxt_content_data = array_filter( explode( "\n", trim( $adstxt_content ) ), 'trim' );
75
+ if ( is_array( $adstxt_content_data ) ) {
76
+ $adstxt_existing_adsense_entries = [];
77
+ foreach ( $adstxt_content_data as $line ) {
78
+ if ( strpos( $line, 'google.com' ) !== false ) {
79
+ $adstxt_existing_adsense_entries[] = $line;
80
+ }
81
+ }
82
+
83
+ $adstxt_new_adsense_entries = [];
84
+ if ( count( $adstxt_existing_adsense_entries ) === 0 ) {
85
+ if ( is_array( $adsense_publisher_ids ) && ( count( $adsense_publisher_ids ) > 0 ) ) {
86
+ foreach ( $adsense_publisher_ids as $adsense_publisher_id ) {
87
+ $adstxt_new_adsense_entries[] = 'google.com, ' . $adsense_publisher_id . ', DIRECT, f08c47fec0942fa0';
88
+ }
89
+ }
90
+ } else {
91
+ if ( is_array( $adsense_publisher_ids ) && ( count( $adsense_publisher_ids ) > 0 ) ) {
92
+ foreach ( $adsense_publisher_ids as $adsense_publisher_id ) {
93
+ $entry_exists = false;
94
+ foreach ( $adstxt_existing_adsense_entries as $adstxt_existing_adsense_entry ) {
95
+ if ( strpos( $adstxt_existing_adsense_entry, $adsense_publisher_id ) !== false ) {
96
+ $entry_exists = true;
97
+ }
98
+ }
99
+ if ( false === $entry_exists ) {
100
+ $adstxt_new_adsense_entries[] = 'google.com, ' . $adsense_publisher_id . ', DIRECT, f08c47fec0942fa0';
101
+ }
102
+ }
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
108
+ if ( isset( $adstxt_new_adsense_entries ) && count( $adstxt_new_adsense_entries ) > 0 ) {
109
+ return $adstxt_new_adsense_entries;
110
+ }
111
+ return false;
112
+ }
113
+
114
+ /**
115
+ * Function to extract publisher Ids from settings.
116
+ *
117
+ * @return mixed False if no publisher ids found, Array of publisher ids if publisher ids found.
118
+ */
119
+ function quick_adsense_adstxt_adsense_get_publisherids() {
120
+ $adsense_publisher_ids = [];
121
+
122
+ $settings = get_option( 'quick_adsense_settings' );
123
+ if ( isset( $settings ) && is_array( $settings ) ) {
124
+ for ( $i = 1; $i <= 10; $i++ ) {
125
+ if ( isset( $settings[ 'onpost_ad_' . $i . '_content' ] ) && ( '' !== $settings[ 'onpost_ad_' . $i . '_content' ] ) ) {
126
+ $temp = quick_adsense_adstxt_adsense_extract_publisherids( $settings[ 'onpost_ad_' . $i . '_content' ] );
127
+ if ( false !== $temp ) {
128
+ $adsense_publisher_ids = array_merge( $adsense_publisher_ids, $temp );
129
+ }
130
+ }
131
+
132
+ if ( isset( $settings[ 'widget_ad_' . $i . '_content' ] ) && ( '' !== $settings[ 'widget_ad_' . $i . '_content' ] ) ) {
133
+ $temp = quick_adsense_adstxt_adsense_extract_publisherids( $settings[ 'widget_ad_' . $i . '_content' ] );
134
+ if ( false !== $temp ) {
135
+ $adsense_publisher_ids = array_merge( $adsense_publisher_ids, $temp );
136
+ }
137
+ }
138
+
139
+ if ( isset( $settings['header_embed_code'] ) && ( '' !== $settings['header_embed_code'] ) ) {
140
+ $temp = quick_adsense_adstxt_adsense_extract_publisherids( $settings['header_embed_code'] );
141
+ if ( false !== $temp ) {
142
+ $adsense_publisher_ids = array_merge( $adsense_publisher_ids, $temp );
143
+ }
144
+ }
145
+
146
+ if ( isset( $settings['footer_embed_code'] ) && ( '' !== $settings['footer_embed_code'] ) ) {
147
+ $temp = quick_adsense_adstxt_adsense_extract_publisherids( $settings['footer_embed_code'] );
148
+ if ( false !== $temp ) {
149
+ $adsense_publisher_ids = array_merge( $adsense_publisher_ids, $temp );
150
+ }
151
+ }
152
+ }
153
+ }
154
+ $adsense_publisher_ids = array_unique( $adsense_publisher_ids );
155
+
156
+ if ( count( $adsense_publisher_ids ) > 0 ) {
157
+ return $adsense_publisher_ids;
158
+ }
159
+ return false;
160
+ }
161
+
162
+ /**
163
+ * Function to extract publisher Ids from provided adcode.
164
+ *
165
+ * @param string $ad_code The ad code.
166
+ *
167
+ * @return mixed False if no publisher ids found, Array of publisher ids if publisher ids found.
168
+ */
169
+ function quick_adsense_adstxt_adsense_extract_publisherids( $ad_code ) {
170
+ $publisher_ids = [];
171
+ if ( isset( $ad_code ) && ( '' !== $ad_code ) ) {
172
+ if ( preg_match( '/googlesyndication.com/', $ad_code ) ) {
173
+ if ( preg_match( '/data-ad-client=/', $ad_code ) ) {
174
+ // ASYNC AD CODE.
175
+ $ad_code_parts = explode( 'data-ad-client', $ad_code );
176
+ } elseif ( preg_match( '/client=ca-pub-/', $ad_code ) ) {
177
+ // NEW ASYNC AD CODE.
178
+ $ad_code_parts = explode( 'ca-pub-', str_replace( 'ca-pub-', 'ca-pub-"', $ad_code ) );
179
+ } else {
180
+ // ORDINARY AD CODE.
181
+ $ad_code_parts = explode( 'google_ad_client', $ad_code );
182
+ }
183
+ if ( isset( $ad_code_parts[1] ) && ( '' !== $ad_code_parts[1] ) ) {
184
+ preg_match( '#"([a-zA-Z0-9-\s]+)"#', stripslashes( $ad_code_parts[1] ), $matches );
185
+ if ( isset( $matches[1] ) && ( '' !== $matches[1] ) ) {
186
+ $publisher_ids[] = str_replace( [ '"', ' ', 'ca-' ], [ '' ], $matches[1] );
187
+ }
188
+ }
189
+ }
190
+ }
191
+
192
+ if ( count( $publisher_ids ) > 0 ) {
193
+ return $publisher_ids;
194
+ }
195
+ return false;
196
+ }
197
+
198
+ /**
199
+ * This action dismisses the Ads.txt admin notice permanently.
200
+ */
201
+ add_action(
202
+ 'wp_ajax_quick_adsense_adstxt_adsense_admin_notice_dismiss',
203
+ function () {
204
+ if ( isset( $_POST['nonce'] ) && wp_verify_nonce( sanitize_key( $_POST['nonce'] ), 'quick-adsense-adstxt-adsense-nonce' ) && ( current_user_can( 'manage_options' ) ) ) {
205
+ update_option( 'quick_adsense_adstxt_adsense_admin_notice_dismissed', 'true' );
206
+ wp_send_json_success();
207
+ }
208
+ wp_send_json_error();
209
+ }
210
+ );
211
+
212
+ /**
213
+ * This action handles the Ajax trigerred Ads.txt update.
214
+ */
215
+ add_action(
216
+ 'wp_ajax_quick_adsense_adstxt_adsense_auto_update',
217
+ function () {
218
+ if ( isset( $_POST['nonce'] ) && wp_verify_nonce( sanitize_key( $_POST['nonce'] ), 'quick-adsense-adstxt-adsense-nonce' ) && ( current_user_can( 'manage_options' ) ) ) {
219
+ $adstxt_new_adsense_entries = quick_adsense_adstxt_adsense_get_status();
220
+ $file_handler = new QuickAdsense\FileHandler( 'ads.txt' );
221
+ if ( false !== $adstxt_new_adsense_entries ) {
222
+ $adstxt_content = $file_handler->read();
223
+ $adstxt_content_data = array_filter( explode( "\n", trim( $adstxt_content ) ), 'trim' );
224
+ $adstxt_updated_content = array_filter( array_merge( $adstxt_content_data, $adstxt_new_adsense_entries ), 'trim' );
225
+ }
226
+ if ( isset( $adstxt_updated_content ) && is_array( $adstxt_updated_content ) && ( count( $adstxt_updated_content ) > 0 ) ) {
227
+ $adstxt_updated_content = implode( "\n", $adstxt_updated_content );
228
+ if ( $file_handler->write( $adstxt_updated_content ) ) {
229
+ wp_send_json_success();
230
+ } else {
231
+ wp_send_json_error(
232
+ quick_adsense_load_file(
233
+ 'templates/block-adsense-adstxt-update-failed.php',
234
+ [
235
+ 'content' => $adstxt_updated_content,
236
+ ]
237
+ )
238
+ );
239
+ }
240
+ }
241
+ }
242
+ wp_send_json_error();
243
+ }
244
+ );
includes/content.php CHANGED
@@ -1,685 +1,685 @@
1
- <?php
2
- $quick_adsense_ads_displayed = 0;
3
- $quick_adsense_ads_id = [];
4
- $quick_adsense_begin_end = 0;
5
-
6
- /**
7
- * Hook into the header to embed the Header tracking or ad code.
8
- */
9
- add_action(
10
- 'wp_head',
11
- function() {
12
- $settings = get_option( 'quick_adsense_settings' );
13
- if ( isset( $settings['header_embed_code'] ) && ( '' !== $settings['header_embed_code'] ) ) {
14
- echo wp_kses( $settings['header_embed_code'], quick_adsense_get_allowed_html() );
15
- }
16
- }
17
- );
18
-
19
- /**
20
- * Hook into the footer to embed the Footer tracking or ad code.
21
- */
22
- add_action(
23
- 'wp_footer',
24
- function() {
25
- $settings = get_option( 'quick_adsense_settings' );
26
- if ( isset( $settings['footer_embed_code'] ) && ( '' !== $settings['footer_embed_code'] ) ) {
27
- echo wp_kses( $settings['footer_embed_code'], quick_adsense_get_allowed_html() );
28
- }
29
- }
30
- );
31
-
32
- /**
33
- * Filter the post content to embed ads.
34
- */
35
- add_filter(
36
- 'the_content',
37
- function( $content ) {
38
- global $quick_adsense_ads_displayed;
39
- global $quick_adsense_ads_id;
40
- global $quick_adsense_begin_end;
41
- $settings = get_option( 'quick_adsense_settings' );
42
-
43
- if ( ! quick_adsense_postads_isactive( $settings, $content ) ) {
44
- $content = quick_adsense_content_clean_tags( $content );
45
- return $content;
46
- }
47
- /* Begin Enforce Max Ads Per Page Rule */
48
- $quick_adsense_ads_to_display = $settings['max_ads_per_page'];
49
- if ( strpos( $content, '<!--OffWidget-->' ) === false ) {
50
- for ( $i = 1; $i <= 10; $i++ ) {
51
- $widget_id = sanitize_title( str_replace( [ '(', ')' ], '', sprintf( 'AdsWidget%d (Quick Adsense)', $i ) ) );
52
- $quick_adsense_ads_to_display -= ( is_active_widget( true, $widget_id ) ) ? 1 : 0;
53
- }
54
- }
55
- if ( $quick_adsense_ads_displayed >= $quick_adsense_ads_to_display ) {
56
- $content = quick_adsense_content_clean_tags( $content );
57
- return $content;
58
- };
59
- /* End Enforce Max Ads Per Page Rule */
60
-
61
- /* Begin Check for Available Ad Blocks */
62
- if ( ! count( $quick_adsense_ads_id ) ) {
63
- for ( $i = 1; $i <= 10; $i++ ) {
64
- if ( isset( $settings[ 'onpost_ad_' . $i . '_content' ] ) && ! empty( $settings[ 'onpost_ad_' . $i . '_content' ] ) ) {
65
- if ( quick_adsense_advanced_postads_isactive( $settings, $i ) ) {
66
- array_push( $quick_adsense_ads_id, (string) $i );
67
- }
68
- }
69
- }
70
- }
71
- array_push( $quick_adsense_ads_id, 100 );
72
-
73
- if ( ! count( $quick_adsense_ads_id ) ) {
74
- $content = quick_adsense_content_clean_tags( $content );
75
- return $content;
76
- };
77
- /* End Check for Available Ad Blocks */
78
-
79
- /* Begin Insert StandIns for all Ad Blocks */
80
- $content = str_replace( '<p></p>', '##QA-TP1##', $content );
81
- $content = str_replace( '<p>&nbsp;</p>', '##QA-TP2##', $content );
82
- $offdef = ( strpos( $content, '<!--OffDef-->' ) !== false );
83
- if ( ! $offdef ) {
84
- $quick_adsense_ads_id_cus = [];
85
- $cusads = 'CusAds';
86
- $cusrnd = 'CusRnd';
87
-
88
- $quick_adsense_enable_position_after_more_tag = ( ( isset( $settings['enable_position_after_more_tag'] ) ) ? $settings['enable_position_after_more_tag'] : '' );
89
- $quick_adsense_ad_after_more_tag = ( ( isset( $settings['ad_after_more_tag'] ) ) ? $settings['ad_after_more_tag'] : '' );
90
-
91
- $quick_adsense_enable_position_before_last_para = ( ( isset( $settings['enable_position_before_last_para'] ) ) ? $settings['enable_position_before_last_para'] : '' );
92
- $quick_adsense_ad_before_last_para = ( ( isset( $settings['ad_before_last_para'] ) ) ? $settings['ad_before_last_para'] : '' );
93
-
94
- $quick_adsense_enable_position_beginning_of_post = ( ( isset( $settings['enable_position_beginning_of_post'] ) ) ? $settings['enable_position_beginning_of_post'] : '' );
95
- $quick_adsense_ad_beginning_of_post = ( ( isset( $settings['ad_beginning_of_post'] ) ) ? $settings['ad_beginning_of_post'] : '' );
96
-
97
- $quick_adsense_enable_position_middle_of_post = ( ( isset( $settings['enable_position_middle_of_post'] ) ) ? $settings['enable_position_middle_of_post'] : '' );
98
- $quick_adsense_ad_middle_of_post = ( ( isset( $settings['ad_middle_of_post'] ) ) ? $settings['ad_middle_of_post'] : '' );
99
-
100
- $quick_adsense_enable_position_end_of_post = ( ( isset( $settings['enable_position_end_of_post'] ) ) ? $settings['enable_position_end_of_post'] : '' );
101
- $quick_adsense_ad_end_of_post = ( ( isset( $settings['ad_end_of_post'] ) ) ? $settings['ad_end_of_post'] : '' );
102
-
103
- for ( $i = 1; $i <= 3; $i++ ) {
104
- $quick_adsense_enable_position_after_para[ $i ] = ( ( isset( $settings[ 'enable_position_after_para_option_' . $i ] ) ) ? $settings[ 'enable_position_after_para_option_' . $i ] : '' );
105
- $quick_adsense_ad_after_para[ $i ] = ( ( isset( $settings[ 'ad_after_para_option_' . $i ] ) ) ? $settings[ 'ad_after_para_option_' . $i ] : '' );
106
- $quick_adsense_position_after_para[ $i ] = ( ( isset( $settings[ 'position_after_para_option_' . $i ] ) ) ? $settings[ 'position_after_para_option_' . $i ] : '' );
107
- $quick_adsense_enable_jump_position_after_para[ $i ] = ( ( isset( $settings[ 'enable_jump_position_after_para_option_' . $i ] ) ) ? $settings[ 'enable_jump_position_after_para_option_' . $i ] : '' );
108
- }
109
-
110
- for ( $i = 1; $i <= 1; $i++ ) {
111
- $quick_adsense_enable_position_after_image = ( ( isset( $settings[ 'enable_position_after_image_option_' . $i ] ) ) ? $settings[ 'enable_position_after_image_option_' . $i ] : '' );
112
- $quick_adsense_ad_after_image = ( ( isset( $settings[ 'ad_after_image_option_' . $i ] ) ) ? $settings[ 'ad_after_image_option_' . $i ] : '' );
113
- $quick_adsense_position_after_image = ( ( isset( $settings[ 'position_after_image_option_' . $i ] ) ) ? $settings[ 'position_after_image_option_' . $i ] : '' );
114
- $quick_adsense_enable_jump_position_after_image = ( ( isset( $settings[ 'enable_jump_position_after_image_option_' . $i ] ) ) ? $settings[ 'enable_jump_position_after_image_option_' . $i ] : '' );
115
- }
116
-
117
- if ( 0 === $quick_adsense_ad_beginning_of_post ) {
118
- $quick_adsense_ad_beginning_of_post_stand_in = $cusrnd;
119
- } else {
120
- $quick_adsense_ad_beginning_of_post_stand_in = $cusads . $quick_adsense_ad_beginning_of_post;
121
- array_push( $quick_adsense_ads_id_cus, $quick_adsense_ad_beginning_of_post );
122
- };
123
- if ( 0 === $quick_adsense_ad_after_more_tag ) {
124
- $quick_adsense_ad_after_more_tag_stand_in = $cusrnd;
125
- } else {
126
- $quick_adsense_ad_after_more_tag_stand_in = $cusads . $quick_adsense_ad_after_more_tag;
127
- array_push( $quick_adsense_ads_id_cus, $quick_adsense_ad_after_more_tag );
128
- };
129
- if ( 0 === $quick_adsense_ad_middle_of_post ) {
130
- $quick_adsense_ad_middle_of_post_stand_in = $cusrnd;
131
- } else {
132
- $quick_adsense_ad_middle_of_post_stand_in = $cusads . $quick_adsense_ad_middle_of_post;
133
- array_push( $quick_adsense_ads_id_cus, $quick_adsense_ad_middle_of_post );
134
- };
135
- if ( 0 === $quick_adsense_ad_before_last_para ) {
136
- $quick_adsense_ad_before_last_para_stand_in = $cusrnd;
137
- } else {
138
- $quick_adsense_ad_before_last_para_stand_in = $cusads . $quick_adsense_ad_before_last_para;
139
- array_push( $quick_adsense_ads_id_cus, $quick_adsense_ad_before_last_para );
140
- };
141
- if ( 0 === $quick_adsense_ad_end_of_post ) {
142
- $quick_adsense_ad_end_of_post_stand_in = $cusrnd;
143
- } else {
144
- $quick_adsense_ad_end_of_post_stand_in = $cusads . $quick_adsense_ad_end_of_post;
145
- array_push( $quick_adsense_ads_id_cus, $quick_adsense_ad_end_of_post );
146
- };
147
- for ( $i = 1; $i <= 3; $i++ ) {
148
- if ( 0 === $quick_adsense_ad_after_para[ $i ] ) {
149
- $quick_adsense_ad_after_para_stand_in[ $i ] = $cusrnd;
150
- } else {
151
- $quick_adsense_ad_after_para_stand_in[ $i ] = $cusads . $quick_adsense_ad_after_para[ $i ];
152
- array_push( $quick_adsense_ads_id_cus, $quick_adsense_ad_after_para[ $i ] );
153
- };
154
- }
155
- if ( 0 === $quick_adsense_ad_after_image ) {
156
- $quick_adsense_ad_after_image_stand_in = $cusrnd;
157
- } else {
158
- $quick_adsense_ad_after_image_stand_in = $cusads . $quick_adsense_ad_after_image;
159
- array_push( $quick_adsense_ads_id_cus, $quick_adsense_ad_after_image );
160
- };
161
-
162
- if ( $quick_adsense_enable_position_middle_of_post && ( strpos( $content, '<!--OffMiddle-->' ) === false ) ) {
163
- if ( substr_count( strtolower( $content ), '</p>' ) >= 2 ) {
164
- $quick_adsense_selected_tag = '</p>';
165
- $content = str_replace( '</P>', $quick_adsense_selected_tag, $content );
166
- $quick_adsense_temp_array = explode( $quick_adsense_selected_tag, $content );
167
- $j = 0;
168
- $k = strlen( $content ) / 2;
169
- $quick_adsense_temp_array_count = count( $quick_adsense_temp_array );
170
- for ( $i = 0; $i < $quick_adsense_temp_array_count; $i++ ) {
171
- $j += strlen( $quick_adsense_temp_array[ $i ] ) + 4;
172
- if ( $j > $k ) {
173
- if ( ( $k - ( $j - strlen( $quick_adsense_temp_array[ $i ] ) ) ) > ( $j - $k ) && $i + 1 < count( $quick_adsense_temp_array ) ) {
174
- $quick_adsense_temp_array[ $i + 1 ] = '<!--' . $quick_adsense_ad_middle_of_post_stand_in . '-->' . $quick_adsense_temp_array[ $i + 1 ];
175
- } else {
176
- $quick_adsense_temp_array[ $i ] = '<!--' . $quick_adsense_ad_middle_of_post_stand_in . '-->' . $quick_adsense_temp_array[ $i ];
177
- }
178
- break;
179
- }
180
- $quick_adsense_temp_array_count = count( $quick_adsense_temp_array );
181
- }
182
- $content = implode( $quick_adsense_selected_tag, $quick_adsense_temp_array );
183
- }
184
- }
185
- if ( $quick_adsense_enable_position_after_more_tag && ( strpos( $content, '<!--OffAfMore-->' ) === false ) ) {
186
- $content = str_replace( '<span id="more-' . get_the_ID() . '"></span>', '<!--' . $quick_adsense_ad_after_more_tag_stand_in . '-->', $content );
187
- }
188
- if ( $quick_adsense_enable_position_beginning_of_post && ( strpos( $content, '<!--OffBegin-->' ) === false ) ) {
189
- $content = '<!--' . $quick_adsense_ad_beginning_of_post_stand_in . '-->' . $content;
190
- }
191
- if ( $quick_adsense_enable_position_end_of_post && ( strpos( $content, '<!--OffEnd-->' ) === false ) ) {
192
- $content = $content . '<!--' . $quick_adsense_ad_end_of_post_stand_in . '-->';
193
- }
194
- if ( $quick_adsense_enable_position_before_last_para && ( strpos( $content, '<!--OffBfLastPara-->' ) === false ) ) {
195
- $quick_adsense_selected_tag = '<p>';
196
- $content = str_replace( '<P>', $quick_adsense_selected_tag, $content );
197
- $quick_adsense_temp_array = explode( $quick_adsense_selected_tag, $content );
198
- if ( count( $quick_adsense_temp_array ) > 2 ) {
199
- $content = implode( $quick_adsense_selected_tag, array_slice( $quick_adsense_temp_array, 0, count( $quick_adsense_temp_array ) - 1 ) ) . '<!--' . $quick_adsense_ad_before_last_para_stand_in . '-->' . $quick_adsense_selected_tag . $quick_adsense_temp_array[ count( $quick_adsense_temp_array ) - 1 ];
200
- }
201
- }
202
- for ( $i = 1; $i <= 3; $i++ ) {
203
- if ( $quick_adsense_enable_position_after_para[ $i ] ) {
204
- $quick_adsense_selected_tag = '</p>';
205
- $content = str_replace( '</P>', $quick_adsense_selected_tag, $content );
206
- $quick_adsense_temp_array = explode( $quick_adsense_selected_tag, $content );
207
- if ( (int) $quick_adsense_position_after_para[ $i ] < count( $quick_adsense_temp_array ) ) {
208
- $content = implode( $quick_adsense_selected_tag, array_slice( $quick_adsense_temp_array, 0, $quick_adsense_position_after_para[ $i ] ) ) . $quick_adsense_selected_tag . '<!--' . $quick_adsense_ad_after_para_stand_in[ $i ] . '-->' . implode( $quick_adsense_selected_tag, array_slice( $quick_adsense_temp_array, $quick_adsense_position_after_para[ $i ] ) );
209
- } elseif ( $quick_adsense_enable_jump_position_after_para[ $i ] ) {
210
- $content = implode( $quick_adsense_selected_tag, $quick_adsense_temp_array ) . '<!--' . $quick_adsense_ad_after_para_stand_in[ $i ] . '-->';
211
- }
212
- }
213
- }
214
- if ( $quick_adsense_enable_position_after_image ) {
215
- $quick_adsense_selected_tag = '<img';
216
- $j = '>';
217
- $k = '[/caption]';
218
- $l = '</a>';
219
- $content = str_replace( '<IMG', $quick_adsense_selected_tag, $content );
220
- $content = str_replace( '</A>', $l, $content );
221
- $quick_adsense_temp_array = explode( $quick_adsense_selected_tag, $content );
222
- if ( (int) $quick_adsense_position_after_image < count( $quick_adsense_temp_array ) ) {
223
- $m = explode( $j, $quick_adsense_temp_array[ $quick_adsense_position_after_image ] );
224
- if ( count( $m ) > 1 ) {
225
- $n = explode( $k, $quick_adsense_temp_array[ $quick_adsense_position_after_image ] );
226
- $o = ( count( $n ) > 1 ) ? ( strpos( strtolower( $n[0] ), '[caption ' ) === false ) : false;
227
- $p = explode( $l, $quick_adsense_temp_array[ $quick_adsense_position_after_image ] );
228
- $q = ( count( $p ) > 1 ) ? ( strpos( strtolower( $p[0] ), '<a href' ) === false ) : false;
229
- if ( $quick_adsense_enable_jump_position_after_image && $o ) {
230
- $quick_adsense_temp_array[ $quick_adsense_position_after_image ] = implode( $k, array_slice( $n, 0, 1 ) ) . $k . "\r\n" . '<!--' . $quick_adsense_ad_after_image_stand_in . '-->' . "\r\n" . implode( $k, array_slice( $n, 1 ) );
231
- } elseif ( $q ) {
232
- $quick_adsense_temp_array[ $quick_adsense_position_after_image ] = implode( $l, array_slice( $p, 0, 1 ) ) . $l . "\r\n" . '<!--' . $quick_adsense_ad_after_image_stand_in . '-->' . "\r\n" . implode( $l, array_slice( $p, 1 ) );
233
- } else {
234
- $quick_adsense_temp_array[ $quick_adsense_position_after_image ] = implode( $j, array_slice( $m, 0, 1 ) ) . $j . "\r\n" . '<!--' . $quick_adsense_ad_after_image_stand_in . '-->' . "\r\n" . implode( $j, array_slice( $m, 1 ) );
235
- }
236
- }
237
- $content = implode( $quick_adsense_selected_tag, $quick_adsense_temp_array );
238
- }
239
- }
240
- }
241
- /* End Insert StandIns for all Ad Blocks */
242
-
243
- /* Begin Replace StandIns for all Ad Blocks */
244
- $content = '<!--EmptyClear-->' . $content . "\n" . '<div style="font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;"></div>';
245
- $content = quick_adsense_content_clean_tags( $content, true );
246
- $ismany = ( ! is_single() && ! is_page() );
247
- $showall = ( ( isset( $settings['enable_all_possible_ads'] ) ) ? $settings['enable_all_possible_ads'] : '' );
248
-
249
- if ( ! $offdef ) {
250
- $quick_adsense_ads_id_cus_count = count( $quick_adsense_ads_id_cus );
251
- for ( $i = 1; $i <= $quick_adsense_ads_id_cus_count; $i++ ) {
252
- if ( $showall || ! $ismany || $i !== $quick_adsense_begin_end ) {
253
- if ( ( ( strpos( $content, '<!--' . $cusads . $quick_adsense_ads_id_cus[ $i - 1 ] . '-->' ) !== false ) || ( strpos( $content, '<!--' . $cusads . $quick_adsense_ads_id_cus[ $i - 1 ] . '-->' ) !== false ) ) && in_array( $quick_adsense_ads_id_cus[ $i - 1 ], $quick_adsense_ads_id, true ) ) {
254
- $content = quick_adsense_content_replace_ads( $content, $cusads . $quick_adsense_ads_id_cus[ $i - 1 ], $quick_adsense_ads_id_cus[ $i - 1 ] );
255
- $content = quick_adsense_content_replace_ads( $content, $cusads . $quick_adsense_ads_id_cus[ $i - 1 ], $quick_adsense_ads_id_cus[ $i - 1 ] );
256
- $quick_adsense_ads_id = quick_adsense_content_del_element( $quick_adsense_ads_id, array_search( $quick_adsense_ads_id_cus[ $i - 1 ], $quick_adsense_ads_id, true ) );
257
- $quick_adsense_ads_displayed++;
258
- if ( $quick_adsense_ads_displayed >= $quick_adsense_ads_to_display || ! count( $quick_adsense_ads_id ) ) {
259
- $content = quick_adsense_content_clean_tags( $content );
260
- return $content;
261
- };
262
- $quick_adsense_begin_end = $i;
263
- if ( ! $showall && $ismany ) {
264
- break;
265
- }
266
- }
267
- }
268
- $quick_adsense_ads_id_cus_count = count( $quick_adsense_ads_id_cus );
269
- }
270
- }
271
-
272
- if ( $showall || ! $ismany ) {
273
- $j = 0;
274
- $quick_adsense_ads_id_count = count( $quick_adsense_ads_id );
275
- for ( $i = 1; $i <= $quick_adsense_ads_id_count; $i++ ) {
276
- if ( strpos( $content, '<!--Ads' . $quick_adsense_ads_id[ $j ] . '-->' ) !== false ) {
277
- $content = quick_adsense_content_replace_ads( $content, 'Ads' . $quick_adsense_ads_id[ $j ], $quick_adsense_ads_id[ $j ] );
278
- $quick_adsense_ads_id = quick_adsense_content_del_element( $quick_adsense_ads_id, $j );
279
- $quick_adsense_ads_displayed++;
280
- if ( ( $quick_adsense_ads_displayed >= $quick_adsense_ads_to_display ) || ! count( $quick_adsense_ads_id ) ) {
281
- $content = quick_adsense_content_clean_tags( $content );
282
- return $content;
283
- };
284
- } else {
285
- $j++;
286
- }
287
- $quick_adsense_ads_id_count = count( $quick_adsense_ads_id );
288
- }
289
- }
290
-
291
- if ( ( strpos( $content, '<!--' . $cusrnd . '-->' ) !== false ) && ( $showall || ! $ismany ) ) {
292
- $j = substr_count( $content, '<!--' . $cusrnd . '-->' );
293
- for ( $i = count( $quick_adsense_ads_id ); $i <= $j - 1; $i++ ) {
294
- array_push( $quick_adsense_ads_id, -1 );
295
- }
296
- shuffle( $quick_adsense_ads_id );
297
- for ( $i = 1; $i <= $j; $i++ ) {
298
- $content = quick_adsense_content_replace_ads( $content, $cusrnd, $quick_adsense_ads_id[0] );
299
- $quick_adsense_ads_id = quick_adsense_content_del_element( $quick_adsense_ads_id, 0 );
300
- $quick_adsense_ads_displayed++;
301
- if ( ( $quick_adsense_ads_displayed >= $quick_adsense_ads_to_display ) || ! count( $quick_adsense_ads_id ) ) {
302
- $content = quick_adsense_content_clean_tags( $content );
303
- return $content;
304
- };
305
- }
306
- }
307
- if ( ( strpos( $content, '<!--' . $cusrnd . '-->' ) !== false ) && ( $showall || ! $ismany ) ) {
308
- $quick_adsense_ads_id = $quick_adsense_ads_id;
309
- $key = array_search( '100', $quick_adsense_ads_id, true );
310
- if ( false !== $key ) {
311
- unset( $quick_adsense_ads_id[ $key ] );
312
- }
313
- $j = substr_count( $content, '<!--' . $cusrnd . '-->' );
314
- for ( $i = count( $quick_adsense_ads_id ); $i <= $j - 1; $i++ ) {
315
- array_push( $quick_adsense_ads_id, -1 );
316
- }
317
- shuffle( $quick_adsense_ads_id );
318
- for ( $i = 1; $i <= $j; $i++ ) {
319
- $content = quick_adsense_content_replace_ads( $content, $cusrnd, $quick_adsense_ads_id[0] );
320
- $quick_adsense_ads_id = quick_adsense_content_del_element( $quick_adsense_ads_id, 0 );
321
- $quick_adsense_ads_displayed++;
322
- if ( ( $quick_adsense_ads_displayed >= $quick_adsense_ads_to_display ) || ! count( $quick_adsense_ads_id ) ) {
323
- $content = quick_adsense_content_clean_tags( $content );
324
- return $content;
325
- };
326
- }
327
- }
328
-
329
- if ( strpos( $content, '<!--RndAds-->' ) !== false && ( $showall || ! $ismany ) ) {
330
- $quick_adsense_ads_id_tmp = [];
331
- shuffle( $quick_adsense_ads_id );
332
- for ( $i = 1; $i <= ( $quick_adsense_ads_to_display - $quick_adsense_ads_displayed ); $i++ ) {
333
- if ( $i <= count( $quick_adsense_ads_id ) ) {
334
- array_push( $quick_adsense_ads_id_tmp, $quick_adsense_ads_id[ $i - 1 ] );
335
- }
336
- }
337
- $j = substr_count( $content, '<!--RndAds-->' );
338
- for ( $i = count( $quick_adsense_ads_id_tmp ); $i <= $j - 1; $i++ ) {
339
- array_push( $quick_adsense_ads_id_tmp, -1 );
340
- }
341
- shuffle( $quick_adsense_ads_id_tmp );
342
- for ( $i = 1; $i <= $j; $i++ ) {
343
- $tmp = $quick_adsense_ads_id_tmp[0];
344
- $content = quick_adsense_content_replace_ads( $content, 'RndAds', $quick_adsense_ads_id_tmp[0] );
345
- $quick_adsense_ads_id_tmp = quick_adsense_content_del_element( $quick_adsense_ads_id_tmp, 0 );
346
- if ( -1 !== $tmp ) {
347
- $quick_adsense_ads_displayed++;
348
- };
349
- if ( $quick_adsense_ads_displayed >= $quick_adsense_ads_to_display || ! count( $quick_adsense_ads_id_tmp ) ) {
350
- $content = quick_adsense_content_clean_tags( $content );
351
- return $content;
352
- };
353
- }
354
- }
355
- /* End Replace StandIns for all Ad Blocks */
356
-
357
- $content = quick_adsense_content_clean_tags( $content );
358
- return $content;
359
- }
360
- );
361
-
362
- /**
363
- * This function checks whether the ads are active on a post.
364
- *
365
- * @param array $settings The user settings.
366
- * @param string $content The content.
367
- *
368
- * @return boolean true on success, false on faliure.
369
- */
370
- function quick_adsense_postads_isactive( $settings, $content ) {
371
- if ( is_feed() ) {
372
- return false;
373
- } elseif ( strpos( $content, '<!--NoAds-->' ) !== false ) {
374
- return false;
375
- } elseif ( strpos( $content, '<!--OffAds-->' ) !== false ) {
376
- return false;
377
- } elseif ( is_single() && ! ( isset( $settings['enable_on_posts'] ) ) ) {
378
- return false;
379
- } elseif ( is_page() && ! ( isset( $settings['enable_on_pages'] ) ) ) {
380
- return false;
381
- } elseif ( is_home() && ! ( isset( $settings['enable_on_homepage'] ) ) ) {
382
- return false;
383
- } elseif ( is_category() && ! ( isset( $settings['enable_on_categories'] ) ) ) {
384
- return false;
385
- } elseif ( is_archive() && ! ( isset( $settings['enable_on_archives'] ) ) ) {
386
- return false;
387
- } elseif ( is_tag() && ! ( isset( $settings['enable_on_tags'] ) ) ) {
388
- return false;
389
- } elseif ( is_user_logged_in() && ( isset( $settings['disable_for_loggedin_users'] ) ) ) {
390
- return false;
391
- } else {
392
- return true;
393
- }
394
- }
395
-
396
- /**
397
- * This function removes the quicktags from the content.
398
- *
399
- * @param string $content The content.
400
- * @param boolean $trimonly Just trim (remove p tags around the quicktag) or completly remove the quicktag.
401
- *
402
- * @return string The processed content.
403
- */
404
- function quick_adsense_content_clean_tags( $content, $trimonly = false ) {
405
- global $quick_adsense_ads_displayed;
406
- global $quick_adsense_ads_id;
407
- global $quick_adsense_begin_end;
408
- $quicktags = [
409
- 'EmptyClear',
410
- 'RndAds',
411
- 'NoAds',
412
- 'OffDef',
413
- 'OffAds',
414
- 'OffWidget',
415
- 'OffBegin',
416
- 'OffMiddle',
417
- 'OffEnd',
418
- 'OffBfMore',
419
- 'OffAfLastPara',
420
- 'CusRnd',
421
- ];
422
- for ( $i = 1; $i <= 10; $i++ ) {
423
- array_push( $quicktags, 'CusAds' . $i );
424
- array_push( $quicktags, 'Ads' . $i );
425
- };
426
- foreach ( $quicktags as $quicktag ) {
427
- if ( ( strpos( $content, '<!--' . $quicktag . '-->' ) !== false ) || ( 'EmptyClear' === $quicktag ) ) {
428
- if ( $trimonly ) {
429
- $content = str_replace( '<p><!--' . $quicktag . '--></p>', '<!--' . $quicktag . '-->', $content );
430
- } else {
431
- $content = str_replace( [ '<p><!--' . $quicktag . '--></p>', '<!--' . $quicktag . '-->' ], '', $content );
432
- $content = str_replace( '##QA-TP1##', '<p></p>', $content );
433
- $content = str_replace( '##QA-TP2##', '<p>&nbsp;</p>', $content );
434
- }
435
- }
436
- }
437
- if ( ! $trimonly && ( is_single() || is_page() ) ) {
438
- $quick_adsense_ads_displayed = 0;
439
- $quick_adsense_ads_id = [];
440
- $quick_adsense_begin_end = 0;
441
- }
442
- return $content;
443
- }
444
-
445
- /**
446
- * This function replaces the quicktag with the actual ad.
447
- *
448
- * @param string $content The content.
449
- * @param string $quicktag The quicktag.
450
- * @param integer $ad_index The array index.
451
- *
452
- * @return string The processed content.
453
- */
454
- function quick_adsense_content_replace_ads( $content, $quicktag, $ad_index ) {
455
- if ( strpos( $content, '<!--' . $quicktag . '-->' ) === false ) {
456
- return $content;
457
- }
458
- $settings = get_option( 'quick_adsense_settings' );
459
- $onpost_ad_styles = [
460
- '',
461
- 'float: left; margin: %1$dpx %1$dpx %1$dpx 0;',
462
- 'float: none; margin:%1$dpx 0 %1$dpx 0; text-align:center;',
463
- 'float: right; margin:%1$dpx 0 %1$dpx %1$dpx;',
464
- 'float: none; margin:0px;',
465
- ];
466
-
467
- if ( ( -1 !== $ad_index ) ) {
468
- $onpost_ad_alignment = ( ( isset( $settings[ 'onpost_ad_' . $ad_index . '_alignment' ] ) ) ? $settings[ 'onpost_ad_' . $ad_index . '_alignment' ] : '' );
469
- $onpost_ad_margin = ( ( isset( $settings[ 'onpost_ad_' . $ad_index . '_margin' ] ) ) ? $settings[ 'onpost_ad_' . $ad_index . '_margin' ] : '' );
470
- $onpost_ad_style = sprintf( $onpost_ad_styles[ (int) $onpost_ad_alignment ], $onpost_ad_margin );
471
- $onpost_ad_code = ( ( isset( $settings[ 'onpost_ad_' . $ad_index . '_content' ] ) ) ? $settings[ 'onpost_ad_' . $ad_index . '_content' ] : '' );
472
- $onpost_ad_code = '<div class="' . md5( get_bloginfo( 'url' ) ) . '" data-index="' . $ad_index . '" style="' . $onpost_ad_style . '">' . "\n" . $onpost_ad_code . "\n" . '</div>' . "\n";
473
- } else {
474
- $onpost_ad_code = '';
475
- }
476
- $content = explode( '<!--' . $quicktag . '-->', $content, 2 );
477
- return $content[0] . $onpost_ad_code . $content[1];
478
- }
479
-
480
- /**
481
- * Delete the selected item from the array by index.
482
- *
483
- * @param array $quick_adsense_temp_array The input array.
484
- * @param integer $index The array index.
485
- *
486
- * @return array The processed array.
487
- */
488
- function quick_adsense_content_del_element( $quick_adsense_temp_array, $index ) {
489
- $copy = [];
490
- if ( function_exists( 'quick_adsense_postads_update_impressions' ) ) {
491
- quick_adsense_postads_update_impressions( $quick_adsense_temp_array[ $index ] );
492
- }
493
- $quick_adsense_temp_array_count = count( $quick_adsense_temp_array );
494
- for ( $i = 0; $i < $quick_adsense_temp_array_count; $i++ ) {
495
- if ( $index !== $i ) {
496
- array_push( $copy, $quick_adsense_temp_array[ $i ] );
497
- $quick_adsense_temp_array_count = count( $quick_adsense_temp_array );
498
- }
499
- }
500
- return $copy;
501
- }
502
-
503
- /**
504
- * This function checks if the selected ad is active basedon the user settings.
505
- *
506
- * @param array $settings The user settings.
507
- * @param integer $index The ad index.
508
- *
509
- * @return boolean true on success, false on faliure.
510
- */
511
- function quick_adsense_advanced_postads_isactive( $settings, $index ) {
512
- $mobile_detect = new Mobile_Detect();
513
- // Begin Device Type.
514
- if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_device_mobile' ] ) && $mobile_detect->isMobile() ) {
515
- return false;
516
- }
517
- if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_device_tablet' ] ) && $mobile_detect->isTablet() ) {
518
- return false;
519
- }
520
- if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_device_desktop' ] ) && ! $mobile_detect->isMobile() && ! $mobile_detect->isTablet() ) {
521
- return false;
522
- }
523
- // End Device Type.
524
- // Begin Visitor Source.
525
- $referer = quick_adsense_get_value( $_SERVER, 'HTTP_REFERER' );
526
- if ( '' === $referer ) {
527
- if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_direct' ] ) ) {
528
- return false;
529
- }
530
- } else {
531
- if ( preg_match( '/www\.google.*|search\.msn.*|search\.yahoo.*|www\.bing.*|msxml\.excite\.com|search.lycos\.com|www\.alltheweb\.com|search\.aol\.com|ask\.com|www\.hotbot\.com|www\.metacrawler\.com|search\.netscape\.com|go\.google\.com|dpxml\.webcrawler\.com|search\.earthlink\.net|www\.ask\.co\.uk/i', $referer ) ) {
532
- if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_searchengine' ] ) ) {
533
- return false;
534
- }
535
- } else {
536
- if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_indirect' ] ) ) {
537
- return false;
538
- }
539
- }
540
- }
541
- // End Visitor Source.
542
- // Begin Visitor Type.
543
- if ( is_user_logged_in() ) {
544
- if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_loggedin' ] ) ) {
545
- return false;
546
- }
547
- } else {
548
- if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_guest' ] ) ) {
549
- return false;
550
- }
551
- }
552
- if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_bot' ] ) && $mobile_detect->is( 'Bot' ) ) {
553
- return false;
554
- }
555
- if (
556
- isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_knownbrowser' ] ) ||
557
- isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_unknownbrowser' ] )
558
- ) {
559
- if (
560
- $mobile_detect->match( '/msie|firefox|safari|chrome|edge|opera|netscape|maxthon|konqueror|mobile/i' )
561
- ) {
562
- if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_knownbrowser' ] ) ) {
563
- return false;
564
- }
565
- } else {
566
- if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_unknownbrowser' ] ) ) {
567
- return false;
568
- }
569
- }
570
- }
571
- // End Visitor Type.
572
- // Begin Geotargeting.
573
- if ( isset( $settings[ 'onpost_ad_' . $index . '_limit_visitor_country' ] ) && ( is_array( $settings[ 'onpost_ad_' . $index . '_limit_visitor_country' ] ) ) && ( count( $settings[ 'onpost_ad_' . $index . '_limit_visitor_country' ] ) > 0 ) ) {
574
- $user_ip = quick_adsense_get_value( $_SERVER, 'REMOTE_ADDR' );
575
- if ( '' !== $user_ip ) {
576
- $geo_ip = new \iriven\GeoIPCountry();
577
- $country_code = $geo_ip->resolve( $user_ip );
578
- if ( ! in_array( $country_code, $settings[ 'onpost_ad_' . $index . '_limit_visitor_country' ], true ) ) {
579
- return false;
580
- }
581
- }
582
- }
583
- // End Geotargeting.
584
- return true;
585
- }
586
-
587
- /**
588
- * This function increments the ad impressions for the ad at the selected index.
589
- *
590
- * @param integer $index The array index.
591
- */
592
- function quick_adsense_postads_update_impressions( $index ) {
593
- $settings = get_option( 'quick_adsense_settings' );
594
- if ( isset( $settings ) && isset( $settings[ 'onpost_ad_' . $index . '_enable_stats' ] ) ) {
595
- $stats = get_option( 'quick_adsense_onpost_ad_' . $index . '_stats' );
596
- if ( isset( $stats ) && is_array( $stats ) ) {
597
- if ( isset( $stats[ gmdate( 'dmY' ) ] ) ) {
598
- $stats[ gmdate( 'dmY' ) ]['i'] += 1;
599
- } else {
600
- $stats[ gmdate( 'dmY' ) ] = [
601
- 'i' => 1,
602
- 'c' => 0,
603
- ];
604
- $stats_count = count( $stats );
605
- while ( $stats_count > 30 ) {
606
- array_shift( $stats );
607
- $stats_count = count( $stats );
608
- }
609
- }
610
- } else {
611
- $stats = [
612
- gmdate( 'dmY' ) => [
613
- 'i' => 1,
614
- 'c' => 0,
615
- ],
616
- ];
617
- }
618
- update_option( 'quick_adsense_onpost_ad_' . $index . '_stats', $stats );
619
- }
620
- }
621
-
622
- /**
623
- * Add inline script to frontend to record ad stats.
624
- */
625
- add_action(
626
- 'wp_enqueue_scripts',
627
- function() {
628
- wp_enqueue_script( 'jquery' );
629
- wp_add_inline_script(
630
- 'jquery',
631
- quick_adsense_load_file(
632
- 'templates/js/script-frontend-stats.php',
633
- [
634
- 'target' => md5( get_bloginfo( 'url' ) ),
635
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
636
- 'nonce' => wp_create_nonce( 'quick-adsense-stats' ),
637
- ]
638
- )
639
- );
640
- }
641
- );
642
-
643
-
644
- add_action( 'wp_ajax_quick_adsense_onpost_ad_click', 'quick_adsense_onpost_ad_click' );
645
- add_action( 'wp_ajax_nopriv_quick_adsense_onpost_ad_click', 'quick_adsense_onpost_ad_click' );
646
- /**
647
- * Ajax handler for "quick_adsense_onpost_ad_click" action which updates the ad click stats.
648
- */
649
- function quick_adsense_onpost_ad_click() {
650
- if ( isset( $_POST['quick_adsense_nonce'] ) && wp_verify_nonce( sanitize_key( $_POST['quick_adsense_nonce'] ), 'quick-adsense-stats' ) ) {
651
- if ( isset( $_POST['quick_adsense_onpost_ad_index'] ) ) {
652
- $index = sanitize_key( $_POST['quick_adsense_onpost_ad_index'] );
653
- $settings = get_option( 'quick_adsense_settings' );
654
- if ( isset( $settings ) && isset( $settings[ 'onpost_ad_' . $index . '_enable_stats' ] ) ) {
655
- $stats = get_option( 'quick_adsense_onpost_ad_' . $index . '_stats' );
656
- if ( isset( $stats ) && is_array( $stats ) ) {
657
- if ( isset( $stats[ gmdate( 'dmY' ) ] ) ) {
658
- $stats[ gmdate( 'dmY' ) ]['c'] += 1;
659
- } else {
660
- $stats[ gmdate( 'dmY' ) ] = [
661
- 'i' => 0,
662
- 'c' => 1,
663
- ];
664
- $stats_count = count( $stats );
665
- while ( $stats_count > 30 ) {
666
- array_shift( $stats );
667
- $stats_count = count( $stats );
668
- }
669
- }
670
- } else {
671
- $stats = [
672
- gmdate( 'dmY' ) => [
673
- 'i' => 0,
674
- 'c' => 1,
675
- ],
676
- ];
677
- }
678
- update_option( 'quick_adsense_onpost_ad_' . $index . '_stats', $stats );
679
- wp_send_json_success();
680
- }
681
- }
682
- }
683
- wp_send_json_error();
684
- }
685
-
1
+ <?php
2
+ $quick_adsense_ads_displayed = 0;
3
+ $quick_adsense_ads_id = [];
4
+ $quick_adsense_begin_end = 0;
5
+
6
+ /**
7
+ * Hook into the header to embed the Header tracking or ad code.
8
+ */
9
+ add_action(
10
+ 'wp_head',
11
+ function() {
12
+ $settings = get_option( 'quick_adsense_settings' );
13
+ if ( isset( $settings['header_embed_code'] ) && ( '' !== $settings['header_embed_code'] ) ) {
14
+ echo wp_kses( $settings['header_embed_code'], quick_adsense_get_allowed_html() );
15
+ }
16
+ }
17
+ );
18
+
19
+ /**
20
+ * Hook into the footer to embed the Footer tracking or ad code.
21
+ */
22
+ add_action(
23
+ 'wp_footer',
24
+ function() {
25
+ $settings = get_option( 'quick_adsense_settings' );
26
+ if ( isset( $settings['footer_embed_code'] ) && ( '' !== $settings['footer_embed_code'] ) ) {
27
+ echo wp_kses( $settings['footer_embed_code'], quick_adsense_get_allowed_html() );
28
+ }
29
+ }
30
+ );
31
+
32
+ /**
33
+ * Filter the post content to embed ads.
34
+ */
35
+ add_filter(
36
+ 'the_content',
37
+ function( $content ) {
38
+ global $quick_adsense_ads_displayed;
39
+ global $quick_adsense_ads_id;
40
+ global $quick_adsense_begin_end;
41
+ $settings = get_option( 'quick_adsense_settings' );
42
+
43
+ if ( ! quick_adsense_postads_isactive( $settings, $content ) ) {
44
+ $content = quick_adsense_content_clean_tags( $content );
45
+ return $content;
46
+ }
47
+ /* Begin Enforce Max Ads Per Page Rule */
48
+ $quick_adsense_ads_to_display = $settings['max_ads_per_page'];
49
+ if ( strpos( $content, '<!--OffWidget-->' ) === false ) {
50
+ for ( $i = 1; $i <= 10; $i++ ) {
51
+ $widget_id = sanitize_title( str_replace( [ '(', ')' ], '', sprintf( 'AdsWidget%d (Quick Adsense)', $i ) ) );
52
+ $quick_adsense_ads_to_display -= ( is_active_widget( true, $widget_id ) ) ? 1 : 0;
53
+ }
54
+ }
55
+ if ( $quick_adsense_ads_displayed >= $quick_adsense_ads_to_display ) {
56
+ $content = quick_adsense_content_clean_tags( $content );
57
+ return $content;
58
+ };
59
+ /* End Enforce Max Ads Per Page Rule */
60
+
61
+ /* Begin Check for Available Ad Blocks */
62
+ if ( ! count( $quick_adsense_ads_id ) ) {
63
+ for ( $i = 1; $i <= 10; $i++ ) {
64
+ if ( isset( $settings[ 'onpost_ad_' . $i . '_content' ] ) && ! empty( $settings[ 'onpost_ad_' . $i . '_content' ] ) ) {
65
+ if ( quick_adsense_advanced_postads_isactive( $settings, $i ) ) {
66
+ array_push( $quick_adsense_ads_id, (string) $i );
67
+ }
68
+ }
69
+ }
70
+ }
71
+ array_push( $quick_adsense_ads_id, 100 );
72
+
73
+ if ( ! count( $quick_adsense_ads_id ) ) {
74
+ $content = quick_adsense_content_clean_tags( $content );
75
+ return $content;
76
+ };
77
+ /* End Check for Available Ad Blocks */
78
+
79
+ /* Begin Insert StandIns for all Ad Blocks */
80
+ $content = str_replace( '<p></p>', '##QA-TP1##', $content );
81
+ $content = str_replace( '<p>&nbsp;</p>', '##QA-TP2##', $content );
82
+ $offdef = ( strpos( $content, '<!--OffDef-->' ) !== false );
83
+ if ( ! $offdef ) {
84
+ $quick_adsense_ads_id_cus = [];
85
+ $cusads = 'CusAds';
86
+ $cusrnd = 'CusRnd';
87
+
88
+ $quick_adsense_enable_position_after_more_tag = ( ( isset( $settings['enable_position_after_more_tag'] ) ) ? $settings['enable_position_after_more_tag'] : '' );
89
+ $quick_adsense_ad_after_more_tag = ( ( isset( $settings['ad_after_more_tag'] ) ) ? $settings['ad_after_more_tag'] : '' );
90
+
91
+ $quick_adsense_enable_position_before_last_para = ( ( isset( $settings['enable_position_before_last_para'] ) ) ? $settings['enable_position_before_last_para'] : '' );
92
+ $quick_adsense_ad_before_last_para = ( ( isset( $settings['ad_before_last_para'] ) ) ? $settings['ad_before_last_para'] : '' );
93
+
94
+ $quick_adsense_enable_position_beginning_of_post = ( ( isset( $settings['enable_position_beginning_of_post'] ) ) ? $settings['enable_position_beginning_of_post'] : '' );
95
+ $quick_adsense_ad_beginning_of_post = ( ( isset( $settings['ad_beginning_of_post'] ) ) ? $settings['ad_beginning_of_post'] : '' );
96
+
97
+ $quick_adsense_enable_position_middle_of_post = ( ( isset( $settings['enable_position_middle_of_post'] ) ) ? $settings['enable_position_middle_of_post'] : '' );
98
+ $quick_adsense_ad_middle_of_post = ( ( isset( $settings['ad_middle_of_post'] ) ) ? $settings['ad_middle_of_post'] : '' );
99
+
100
+ $quick_adsense_enable_position_end_of_post = ( ( isset( $settings['enable_position_end_of_post'] ) ) ? $settings['enable_position_end_of_post'] : '' );
101
+ $quick_adsense_ad_end_of_post = ( ( isset( $settings['ad_end_of_post'] ) ) ? $settings['ad_end_of_post'] : '' );
102
+
103
+ for ( $i = 1; $i <= 3; $i++ ) {
104
+ $quick_adsense_enable_position_after_para[ $i ] = ( ( isset( $settings[ 'enable_position_after_para_option_' . $i ] ) ) ? $settings[ 'enable_position_after_para_option_' . $i ] : '' );
105
+ $quick_adsense_ad_after_para[ $i ] = ( ( isset( $settings[ 'ad_after_para_option_' . $i ] ) ) ? $settings[ 'ad_after_para_option_' . $i ] : '' );
106
+ $quick_adsense_position_after_para[ $i ] = ( ( isset( $settings[ 'position_after_para_option_' . $i ] ) ) ? $settings[ 'position_after_para_option_' . $i ] : '' );
107
+ $quick_adsense_enable_jump_position_after_para[ $i ] = ( ( isset( $settings[ 'enable_jump_position_after_para_option_' . $i ] ) ) ? $settings[ 'enable_jump_position_after_para_option_' . $i ] : '' );
108
+ }
109
+
110
+ for ( $i = 1; $i <= 1; $i++ ) {
111
+ $quick_adsense_enable_position_after_image = ( ( isset( $settings[ 'enable_position_after_image_option_' . $i ] ) ) ? $settings[ 'enable_position_after_image_option_' . $i ] : '' );
112
+ $quick_adsense_ad_after_image = ( ( isset( $settings[ 'ad_after_image_option_' . $i ] ) ) ? $settings[ 'ad_after_image_option_' . $i ] : '' );
113
+ $quick_adsense_position_after_image = ( ( isset( $settings[ 'position_after_image_option_' . $i ] ) ) ? $settings[ 'position_after_image_option_' . $i ] : '' );
114
+ $quick_adsense_enable_jump_position_after_image = ( ( isset( $settings[ 'enable_jump_position_after_image_option_' . $i ] ) ) ? $settings[ 'enable_jump_position_after_image_option_' . $i ] : '' );
115
+ }
116
+
117
+ if ( 0 === $quick_adsense_ad_beginning_of_post ) {
118
+ $quick_adsense_ad_beginning_of_post_stand_in = $cusrnd;
119
+ } else {
120
+ $quick_adsense_ad_beginning_of_post_stand_in = $cusads . $quick_adsense_ad_beginning_of_post;
121
+ array_push( $quick_adsense_ads_id_cus, $quick_adsense_ad_beginning_of_post );
122
+ };
123
+ if ( 0 === $quick_adsense_ad_after_more_tag ) {
124
+ $quick_adsense_ad_after_more_tag_stand_in = $cusrnd;
125
+ } else {
126
+ $quick_adsense_ad_after_more_tag_stand_in = $cusads . $quick_adsense_ad_after_more_tag;
127
+ array_push( $quick_adsense_ads_id_cus, $quick_adsense_ad_after_more_tag );
128
+ };
129
+ if ( 0 === $quick_adsense_ad_middle_of_post ) {
130
+ $quick_adsense_ad_middle_of_post_stand_in = $cusrnd;
131
+ } else {
132
+ $quick_adsense_ad_middle_of_post_stand_in = $cusads . $quick_adsense_ad_middle_of_post;
133
+ array_push( $quick_adsense_ads_id_cus, $quick_adsense_ad_middle_of_post );
134
+ };
135
+ if ( 0 === $quick_adsense_ad_before_last_para ) {
136
+ $quick_adsense_ad_before_last_para_stand_in = $cusrnd;
137
+ } else {
138
+ $quick_adsense_ad_before_last_para_stand_in = $cusads . $quick_adsense_ad_before_last_para;
139
+ array_push( $quick_adsense_ads_id_cus, $quick_adsense_ad_before_last_para );
140
+ };
141
+ if ( 0 === $quick_adsense_ad_end_of_post ) {
142
+ $quick_adsense_ad_end_of_post_stand_in = $cusrnd;
143
+ } else {
144
+ $quick_adsense_ad_end_of_post_stand_in = $cusads . $quick_adsense_ad_end_of_post;
145
+ array_push( $quick_adsense_ads_id_cus, $quick_adsense_ad_end_of_post );
146
+ };
147
+ for ( $i = 1; $i <= 3; $i++ ) {
148
+ if ( 0 === $quick_adsense_ad_after_para[ $i ] ) {
149
+ $quick_adsense_ad_after_para_stand_in[ $i ] = $cusrnd;
150
+ } else {
151
+ $quick_adsense_ad_after_para_stand_in[ $i ] = $cusads . $quick_adsense_ad_after_para[ $i ];
152
+ array_push( $quick_adsense_ads_id_cus, $quick_adsense_ad_after_para[ $i ] );
153
+ };
154
+ }
155
+ if ( 0 === $quick_adsense_ad_after_image ) {
156
+ $quick_adsense_ad_after_image_stand_in = $cusrnd;
157
+ } else {
158
+ $quick_adsense_ad_after_image_stand_in = $cusads . $quick_adsense_ad_after_image;
159
+ array_push( $quick_adsense_ads_id_cus, $quick_adsense_ad_after_image );
160
+ };
161
+
162
+ if ( $quick_adsense_enable_position_middle_of_post && ( strpos( $content, '<!--OffMiddle-->' ) === false ) ) {
163
+ if ( substr_count( strtolower( $content ), '</p>' ) >= 2 ) {
164
+ $quick_adsense_selected_tag = '</p>';
165
+ $content = str_replace( '</P>', $quick_adsense_selected_tag, $content );
166
+ $quick_adsense_temp_array = explode( $quick_adsense_selected_tag, $content );
167
+ $j = 0;
168
+ $k = strlen( $content ) / 2;
169
+ $quick_adsense_temp_array_count = count( $quick_adsense_temp_array );
170
+ for ( $i = 0; $i < $quick_adsense_temp_array_count; $i++ ) {
171
+ $j += strlen( $quick_adsense_temp_array[ $i ] ) + 4;
172
+ if ( $j > $k ) {
173
+ if ( ( $k - ( $j - strlen( $quick_adsense_temp_array[ $i ] ) ) ) > ( $j - $k ) && $i + 1 < count( $quick_adsense_temp_array ) ) {
174
+ $quick_adsense_temp_array[ $i + 1 ] = '<!--' . $quick_adsense_ad_middle_of_post_stand_in . '-->' . $quick_adsense_temp_array[ $i + 1 ];
175
+ } else {
176
+ $quick_adsense_temp_array[ $i ] = '<!--' . $quick_adsense_ad_middle_of_post_stand_in . '-->' . $quick_adsense_temp_array[ $i ];
177
+ }
178
+ break;
179
+ }
180
+ $quick_adsense_temp_array_count = count( $quick_adsense_temp_array );
181
+ }
182
+ $content = implode( $quick_adsense_selected_tag, $quick_adsense_temp_array );
183
+ }
184
+ }
185
+ if ( $quick_adsense_enable_position_after_more_tag && ( strpos( $content, '<!--OffAfMore-->' ) === false ) ) {
186
+ $content = str_replace( '<span id="more-' . get_the_ID() . '"></span>', '<!--' . $quick_adsense_ad_after_more_tag_stand_in . '-->', $content );
187
+ }
188
+ if ( $quick_adsense_enable_position_beginning_of_post && ( strpos( $content, '<!--OffBegin-->' ) === false ) ) {
189
+ $content = '<!--' . $quick_adsense_ad_beginning_of_post_stand_in . '-->' . $content;
190
+ }
191
+ if ( $quick_adsense_enable_position_end_of_post && ( strpos( $content, '<!--OffEnd-->' ) === false ) ) {
192
+ $content = $content . '<!--' . $quick_adsense_ad_end_of_post_stand_in . '-->';
193
+ }
194
+ if ( $quick_adsense_enable_position_before_last_para && ( strpos( $content, '<!--OffBfLastPara-->' ) === false ) ) {
195
+ $quick_adsense_selected_tag = '<p>';
196
+ $content = str_replace( '<P>', $quick_adsense_selected_tag, $content );
197
+ $quick_adsense_temp_array = explode( $quick_adsense_selected_tag, $content );
198
+ if ( count( $quick_adsense_temp_array ) > 2 ) {
199
+ $content = implode( $quick_adsense_selected_tag, array_slice( $quick_adsense_temp_array, 0, count( $quick_adsense_temp_array ) - 1 ) ) . '<!--' . $quick_adsense_ad_before_last_para_stand_in . '-->' . $quick_adsense_selected_tag . $quick_adsense_temp_array[ count( $quick_adsense_temp_array ) - 1 ];
200
+ }
201
+ }
202
+ for ( $i = 1; $i <= 3; $i++ ) {
203
+ if ( $quick_adsense_enable_position_after_para[ $i ] ) {
204
+ $quick_adsense_selected_tag = '</p>';
205
+ $content = str_replace( '</P>', $quick_adsense_selected_tag, $content );
206
+ $quick_adsense_temp_array = explode( $quick_adsense_selected_tag, $content );
207
+ if ( (int) $quick_adsense_position_after_para[ $i ] < count( $quick_adsense_temp_array ) ) {
208
+ $content = implode( $quick_adsense_selected_tag, array_slice( $quick_adsense_temp_array, 0, $quick_adsense_position_after_para[ $i ] ) ) . $quick_adsense_selected_tag . '<!--' . $quick_adsense_ad_after_para_stand_in[ $i ] . '-->' . implode( $quick_adsense_selected_tag, array_slice( $quick_adsense_temp_array, $quick_adsense_position_after_para[ $i ] ) );
209
+ } elseif ( $quick_adsense_enable_jump_position_after_para[ $i ] ) {
210
+ $content = implode( $quick_adsense_selected_tag, $quick_adsense_temp_array ) . '<!--' . $quick_adsense_ad_after_para_stand_in[ $i ] . '-->';
211
+ }
212
+ }
213
+ }
214
+ if ( $quick_adsense_enable_position_after_image ) {
215
+ $quick_adsense_selected_tag = '<img';
216
+ $j = '>';
217
+ $k = '[/caption]';
218
+ $l = '</a>';
219
+ $content = str_replace( '<IMG', $quick_adsense_selected_tag, $content );
220
+ $content = str_replace( '</A>', $l, $content );
221
+ $quick_adsense_temp_array = explode( $quick_adsense_selected_tag, $content );
222
+ if ( (int) $quick_adsense_position_after_image < count( $quick_adsense_temp_array ) ) {
223
+ $m = explode( $j, $quick_adsense_temp_array[ $quick_adsense_position_after_image ] );
224
+ if ( count( $m ) > 1 ) {
225
+ $n = explode( $k, $quick_adsense_temp_array[ $quick_adsense_position_after_image ] );
226
+ $o = ( count( $n ) > 1 ) ? ( strpos( strtolower( $n[0] ), '[caption ' ) === false ) : false;
227
+ $p = explode( $l, $quick_adsense_temp_array[ $quick_adsense_position_after_image ] );
228
+ $q = ( count( $p ) > 1 ) ? ( strpos( strtolower( $p[0] ), '<a href' ) === false ) : false;
229
+ if ( $quick_adsense_enable_jump_position_after_image && $o ) {
230
+ $quick_adsense_temp_array[ $quick_adsense_position_after_image ] = implode( $k, array_slice( $n, 0, 1 ) ) . $k . "\r\n" . '<!--' . $quick_adsense_ad_after_image_stand_in . '-->' . "\r\n" . implode( $k, array_slice( $n, 1 ) );
231
+ } elseif ( $q ) {
232
+ $quick_adsense_temp_array[ $quick_adsense_position_after_image ] = implode( $l, array_slice( $p, 0, 1 ) ) . $l . "\r\n" . '<!--' . $quick_adsense_ad_after_image_stand_in . '-->' . "\r\n" . implode( $l, array_slice( $p, 1 ) );
233
+ } else {
234
+ $quick_adsense_temp_array[ $quick_adsense_position_after_image ] = implode( $j, array_slice( $m, 0, 1 ) ) . $j . "\r\n" . '<!--' . $quick_adsense_ad_after_image_stand_in . '-->' . "\r\n" . implode( $j, array_slice( $m, 1 ) );
235
+ }
236
+ }
237
+ $content = implode( $quick_adsense_selected_tag, $quick_adsense_temp_array );
238
+ }
239
+ }
240
+ }
241
+ /* End Insert StandIns for all Ad Blocks */
242
+
243
+ /* Begin Replace StandIns for all Ad Blocks */
244
+ $content = '<!--EmptyClear-->' . $content . "\n" . '<div style="font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;"></div>';
245
+ $content = quick_adsense_content_clean_tags( $content, true );
246
+ $ismany = ( ! is_single() && ! is_page() );
247
+ $showall = ( ( isset( $settings['enable_all_possible_ads'] ) ) ? $settings['enable_all_possible_ads'] : '' );
248
+
249
+ if ( ! $offdef ) {
250
+ $quick_adsense_ads_id_cus_count = count( $quick_adsense_ads_id_cus );
251
+ for ( $i = 1; $i <= $quick_adsense_ads_id_cus_count; $i++ ) {
252
+ if ( $showall || ! $ismany || $i !== $quick_adsense_begin_end ) {
253
+ if ( ( ( strpos( $content, '<!--' . $cusads . $quick_adsense_ads_id_cus[ $i - 1 ] . '-->' ) !== false ) || ( strpos( $content, '<!--' . $cusads . $quick_adsense_ads_id_cus[ $i - 1 ] . '-->' ) !== false ) ) && in_array( $quick_adsense_ads_id_cus[ $i - 1 ], $quick_adsense_ads_id, true ) ) {
254
+ $content = quick_adsense_content_replace_ads( $content, $cusads . $quick_adsense_ads_id_cus[ $i - 1 ], $quick_adsense_ads_id_cus[ $i - 1 ] );
255
+ $content = quick_adsense_content_replace_ads( $content, $cusads . $quick_adsense_ads_id_cus[ $i - 1 ], $quick_adsense_ads_id_cus[ $i - 1 ] );
256
+ $quick_adsense_ads_id = quick_adsense_content_del_element( $quick_adsense_ads_id, array_search( $quick_adsense_ads_id_cus[ $i - 1 ], $quick_adsense_ads_id, true ) );
257
+ $quick_adsense_ads_displayed++;
258
+ if ( $quick_adsense_ads_displayed >= $quick_adsense_ads_to_display || ! count( $quick_adsense_ads_id ) ) {
259
+ $content = quick_adsense_content_clean_tags( $content );
260
+ return $content;
261
+ };
262
+ $quick_adsense_begin_end = $i;
263
+ if ( ! $showall && $ismany ) {
264
+ break;
265
+ }
266
+ }
267
+ }
268
+ $quick_adsense_ads_id_cus_count = count( $quick_adsense_ads_id_cus );
269
+ }
270
+ }
271
+
272
+ if ( $showall || ! $ismany ) {
273
+ $j = 0;
274
+ $quick_adsense_ads_id_count = count( $quick_adsense_ads_id );
275
+ for ( $i = 1; $i <= $quick_adsense_ads_id_count; $i++ ) {
276
+ if ( strpos( $content, '<!--Ads' . $quick_adsense_ads_id[ $j ] . '-->' ) !== false ) {
277
+ $content = quick_adsense_content_replace_ads( $content, 'Ads' . $quick_adsense_ads_id[ $j ], $quick_adsense_ads_id[ $j ] );
278
+ $quick_adsense_ads_id = quick_adsense_content_del_element( $quick_adsense_ads_id, $j );
279
+ $quick_adsense_ads_displayed++;
280
+ if ( ( $quick_adsense_ads_displayed >= $quick_adsense_ads_to_display ) || ! count( $quick_adsense_ads_id ) ) {
281
+ $content = quick_adsense_content_clean_tags( $content );
282
+ return $content;
283
+ };
284
+ } else {
285
+ $j++;
286
+ }
287
+ $quick_adsense_ads_id_count = count( $quick_adsense_ads_id );
288
+ }
289
+ }
290
+
291
+ if ( ( strpos( $content, '<!--' . $cusrnd . '-->' ) !== false ) && ( $showall || ! $ismany ) ) {
292
+ $j = substr_count( $content, '<!--' . $cusrnd . '-->' );
293
+ for ( $i = count( $quick_adsense_ads_id ); $i <= $j - 1; $i++ ) {
294
+ array_push( $quick_adsense_ads_id, -1 );
295
+ }
296
+ shuffle( $quick_adsense_ads_id );
297
+ for ( $i = 1; $i <= $j; $i++ ) {
298
+ $content = quick_adsense_content_replace_ads( $content, $cusrnd, $quick_adsense_ads_id[0] );
299
+ $quick_adsense_ads_id = quick_adsense_content_del_element( $quick_adsense_ads_id, 0 );
300
+ $quick_adsense_ads_displayed++;
301
+ if ( ( $quick_adsense_ads_displayed >= $quick_adsense_ads_to_display ) || ! count( $quick_adsense_ads_id ) ) {
302
+ $content = quick_adsense_content_clean_tags( $content );
303
+ return $content;
304
+ };
305
+ }
306
+ }
307
+ if ( ( strpos( $content, '<!--' . $cusrnd . '-->' ) !== false ) && ( $showall || ! $ismany ) ) {
308
+ $quick_adsense_ads_id = $quick_adsense_ads_id;
309
+ $key = array_search( '100', $quick_adsense_ads_id, true );
310
+ if ( false !== $key ) {
311
+ unset( $quick_adsense_ads_id[ $key ] );
312
+ }
313
+ $j = substr_count( $content, '<!--' . $cusrnd . '-->' );
314
+ for ( $i = count( $quick_adsense_ads_id ); $i <= $j - 1; $i++ ) {
315
+ array_push( $quick_adsense_ads_id, -1 );
316
+ }
317
+ shuffle( $quick_adsense_ads_id );
318
+ for ( $i = 1; $i <= $j; $i++ ) {
319
+ $content = quick_adsense_content_replace_ads( $content, $cusrnd, $quick_adsense_ads_id[0] );
320
+ $quick_adsense_ads_id = quick_adsense_content_del_element( $quick_adsense_ads_id, 0 );
321
+ $quick_adsense_ads_displayed++;
322
+ if ( ( $quick_adsense_ads_displayed >= $quick_adsense_ads_to_display ) || ! count( $quick_adsense_ads_id ) ) {
323
+ $content = quick_adsense_content_clean_tags( $content );
324
+ return $content;
325
+ };
326
+ }
327
+ }
328
+
329
+ if ( strpos( $content, '<!--RndAds-->' ) !== false && ( $showall || ! $ismany ) ) {
330
+ $quick_adsense_ads_id_tmp = [];
331
+ shuffle( $quick_adsense_ads_id );
332
+ for ( $i = 1; $i <= ( $quick_adsense_ads_to_display - $quick_adsense_ads_displayed ); $i++ ) {
333
+ if ( $i <= count( $quick_adsense_ads_id ) ) {
334
+ array_push( $quick_adsense_ads_id_tmp, $quick_adsense_ads_id[ $i - 1 ] );
335
+ }
336
+ }
337
+ $j = substr_count( $content, '<!--RndAds-->' );
338
+ for ( $i = count( $quick_adsense_ads_id_tmp ); $i <= $j - 1; $i++ ) {
339
+ array_push( $quick_adsense_ads_id_tmp, -1 );
340
+ }
341
+ shuffle( $quick_adsense_ads_id_tmp );
342
+ for ( $i = 1; $i <= $j; $i++ ) {
343
+ $tmp = $quick_adsense_ads_id_tmp[0];
344
+ $content = quick_adsense_content_replace_ads( $content, 'RndAds', $quick_adsense_ads_id_tmp[0] );
345
+ $quick_adsense_ads_id_tmp = quick_adsense_content_del_element( $quick_adsense_ads_id_tmp, 0 );
346
+ if ( -1 !== $tmp ) {
347
+ $quick_adsense_ads_displayed++;
348
+ };
349
+ if ( $quick_adsense_ads_displayed >= $quick_adsense_ads_to_display || ! count( $quick_adsense_ads_id_tmp ) ) {
350
+ $content = quick_adsense_content_clean_tags( $content );
351
+ return $content;
352
+ };
353
+ }
354
+ }
355
+ /* End Replace StandIns for all Ad Blocks */
356
+
357
+ $content = quick_adsense_content_clean_tags( $content );
358
+ return $content;
359
+ }
360
+ );
361
+
362
+ /**
363
+ * This function checks whether the ads are active on a post.
364
+ *
365
+ * @param array $settings The user settings.
366
+ * @param string $content The content.
367
+ *
368
+ * @return boolean true on success, false on faliure.
369
+ */
370
+ function quick_adsense_postads_isactive( $settings, $content ) {
371
+ if ( is_feed() ) {
372
+ return false;
373
+ } elseif ( strpos( $content, '<!--NoAds-->' ) !== false ) {
374
+ return false;
375
+ } elseif ( strpos( $content, '<!--OffAds-->' ) !== false ) {
376
+ return false;
377
+ } elseif ( is_single() && ! ( isset( $settings['enable_on_posts'] ) ) ) {
378
+ return false;
379
+ } elseif ( is_page() && ! ( isset( $settings['enable_on_pages'] ) ) ) {
380
+ return false;
381
+ } elseif ( is_home() && ! ( isset( $settings['enable_on_homepage'] ) ) ) {
382
+ return false;
383
+ } elseif ( is_category() && ! ( isset( $settings['enable_on_categories'] ) ) ) {
384
+ return false;
385
+ } elseif ( is_archive() && ! ( isset( $settings['enable_on_archives'] ) ) ) {
386
+ return false;
387
+ } elseif ( is_tag() && ! ( isset( $settings['enable_on_tags'] ) ) ) {
388
+ return false;
389
+ } elseif ( is_user_logged_in() && ( isset( $settings['disable_for_loggedin_users'] ) ) ) {
390
+ return false;
391
+ } else {
392
+ return true;
393
+ }
394
+ }
395
+
396
+ /**
397
+ * This function removes the quicktags from the content.
398
+ *
399
+ * @param string $content The content.
400
+ * @param boolean $trimonly Just trim (remove p tags around the quicktag) or completly remove the quicktag.
401
+ *
402
+ * @return string The processed content.
403
+ */
404
+ function quick_adsense_content_clean_tags( $content, $trimonly = false ) {
405
+ global $quick_adsense_ads_displayed;
406
+ global $quick_adsense_ads_id;
407
+ global $quick_adsense_begin_end;
408
+ $quicktags = [
409
+ 'EmptyClear',
410
+ 'RndAds',
411
+ 'NoAds',
412
+ 'OffDef',
413
+ 'OffAds',
414
+ 'OffWidget',
415
+ 'OffBegin',
416
+ 'OffMiddle',
417
+ 'OffEnd',
418
+ 'OffBfMore',
419
+ 'OffAfLastPara',
420
+ 'CusRnd',
421
+ ];
422
+ for ( $i = 1; $i <= 10; $i++ ) {
423
+ array_push( $quicktags, 'CusAds' . $i );
424
+ array_push( $quicktags, 'Ads' . $i );
425
+ };
426
+ foreach ( $quicktags as $quicktag ) {
427
+ if ( ( strpos( $content, '<!--' . $quicktag . '-->' ) !== false ) || ( 'EmptyClear' === $quicktag ) ) {
428
+ if ( $trimonly ) {
429
+ $content = str_replace( '<p><!--' . $quicktag . '--></p>', '<!--' . $quicktag . '-->', $content );
430
+ } else {
431
+ $content = str_replace( [ '<p><!--' . $quicktag . '--></p>', '<!--' . $quicktag . '-->' ], '', $content );
432
+ $content = str_replace( '##QA-TP1##', '<p></p>', $content );
433
+ $content = str_replace( '##QA-TP2##', '<p>&nbsp;</p>', $content );
434
+ }
435
+ }
436
+ }
437
+ if ( ! $trimonly && ( is_single() || is_page() ) ) {
438
+ $quick_adsense_ads_displayed = 0;
439
+ $quick_adsense_ads_id = [];
440
+ $quick_adsense_begin_end = 0;
441
+ }
442
+ return $content;
443
+ }
444
+
445
+ /**
446
+ * This function replaces the quicktag with the actual ad.
447
+ *
448
+ * @param string $content The content.
449
+ * @param string $quicktag The quicktag.
450
+ * @param integer $ad_index The array index.
451
+ *
452
+ * @return string The processed content.
453
+ */
454
+ function quick_adsense_content_replace_ads( $content, $quicktag, $ad_index ) {
455
+ if ( strpos( $content, '<!--' . $quicktag . '-->' ) === false ) {
456
+ return $content;
457
+ }
458
+ $settings = get_option( 'quick_adsense_settings' );
459
+ $onpost_ad_styles = [
460
+ '',
461
+ 'float: left; margin: %1$dpx %1$dpx %1$dpx 0;',
462
+ 'float: none; margin:%1$dpx 0 %1$dpx 0; text-align:center;',
463
+ 'float: right; margin:%1$dpx 0 %1$dpx %1$dpx;',
464
+ 'float: none; margin:0px;',
465
+ ];
466
+
467
+ if ( ( -1 !== $ad_index ) ) {
468
+ $onpost_ad_alignment = ( ( isset( $settings[ 'onpost_ad_' . $ad_index . '_alignment' ] ) ) ? $settings[ 'onpost_ad_' . $ad_index . '_alignment' ] : '' );
469
+ $onpost_ad_margin = ( ( isset( $settings[ 'onpost_ad_' . $ad_index . '_margin' ] ) ) ? $settings[ 'onpost_ad_' . $ad_index . '_margin' ] : '' );
470
+ $onpost_ad_style = sprintf( $onpost_ad_styles[ (int) $onpost_ad_alignment ], $onpost_ad_margin );
471
+ $onpost_ad_code = ( ( isset( $settings[ 'onpost_ad_' . $ad_index . '_content' ] ) ) ? $settings[ 'onpost_ad_' . $ad_index . '_content' ] : '' );
472
+ $onpost_ad_code = '<div class="' . md5( get_bloginfo( 'url' ) ) . '" data-index="' . $ad_index . '" style="' . $onpost_ad_style . '">' . "\n" . $onpost_ad_code . "\n" . '</div>' . "\n";
473
+ } else {
474
+ $onpost_ad_code = '';
475
+ }
476
+ $content = explode( '<!--' . $quicktag . '-->', $content, 2 );
477
+ return $content[0] . $onpost_ad_code . $content[1];
478
+ }
479
+
480
+ /**
481
+ * Delete the selected item from the array by index.
482
+ *
483
+ * @param array $quick_adsense_temp_array The input array.
484
+ * @param integer $index The array index.
485
+ *
486
+ * @return array The processed array.
487
+ */
488
+ function quick_adsense_content_del_element( $quick_adsense_temp_array, $index ) {
489
+ $copy = [];
490
+ if ( function_exists( 'quick_adsense_postads_update_impressions' ) ) {
491
+ quick_adsense_postads_update_impressions( $quick_adsense_temp_array[ $index ] );
492
+ }
493
+ $quick_adsense_temp_array_count = count( $quick_adsense_temp_array );
494
+ for ( $i = 0; $i < $quick_adsense_temp_array_count; $i++ ) {
495
+ if ( $index !== $i ) {
496
+ array_push( $copy, $quick_adsense_temp_array[ $i ] );
497
+ $quick_adsense_temp_array_count = count( $quick_adsense_temp_array );
498
+ }
499
+ }
500
+ return $copy;
501
+ }
502
+
503
+ /**
504
+ * This function checks if the selected ad is active basedon the user settings.
505
+ *
506
+ * @param array $settings The user settings.
507
+ * @param integer $index The ad index.
508
+ *
509
+ * @return boolean true on success, false on faliure.
510
+ */
511
+ function quick_adsense_advanced_postads_isactive( $settings, $index ) {
512
+ $mobile_detect = new Mobile_Detect();
513
+ // Begin Device Type.
514
+ if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_device_mobile' ] ) && $mobile_detect->isMobile() ) {
515
+ return false;
516
+ }
517
+ if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_device_tablet' ] ) && $mobile_detect->isTablet() ) {
518
+ return false;
519
+ }
520
+ if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_device_desktop' ] ) && ! $mobile_detect->isMobile() && ! $mobile_detect->isTablet() ) {
521
+ return false;
522
+ }
523
+ // End Device Type.
524
+ // Begin Visitor Source.
525
+ $referer = quick_adsense_get_value( $_SERVER, 'HTTP_REFERER' );
526
+ if ( '' === $referer ) {
527
+ if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_direct' ] ) ) {
528
+ return false;
529
+ }
530
+ } else {
531
+ if ( preg_match( '/www\.google.*|search\.msn.*|search\.yahoo.*|www\.bing.*|msxml\.excite\.com|search.lycos\.com|www\.alltheweb\.com|search\.aol\.com|ask\.com|www\.hotbot\.com|www\.metacrawler\.com|search\.netscape\.com|go\.google\.com|dpxml\.webcrawler\.com|search\.earthlink\.net|www\.ask\.co\.uk/i', $referer ) ) {
532
+ if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_searchengine' ] ) ) {
533
+ return false;
534
+ }
535
+ } else {
536
+ if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_indirect' ] ) ) {
537
+ return false;
538
+ }
539
+ }
540
+ }
541
+ // End Visitor Source.
542
+ // Begin Visitor Type.
543
+ if ( is_user_logged_in() ) {
544
+ if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_loggedin' ] ) ) {
545
+ return false;
546
+ }
547
+ } else {
548
+ if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_guest' ] ) ) {
549
+ return false;
550
+ }
551
+ }
552
+ if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_bot' ] ) && $mobile_detect->is( 'Bot' ) ) {
553
+ return false;
554
+ }
555
+ if (
556
+ isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_knownbrowser' ] ) ||
557
+ isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_unknownbrowser' ] )
558
+ ) {
559
+ if (
560
+ $mobile_detect->match( '/msie|firefox|safari|chrome|edge|opera|netscape|maxthon|konqueror|mobile/i' )
561
+ ) {
562
+ if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_knownbrowser' ] ) ) {
563
+ return false;
564
+ }
565
+ } else {
566
+ if ( isset( $settings[ 'onpost_ad_' . $index . '_hide_visitor_unknownbrowser' ] ) ) {
567
+ return false;
568
+ }
569
+ }
570
+ }
571
+ // End Visitor Type.
572
+ // Begin Geotargeting.
573
+ if ( isset( $settings[ 'onpost_ad_' . $index . '_limit_visitor_country' ] ) && ( is_array( $settings[ 'onpost_ad_' . $index . '_limit_visitor_country' ] ) ) && ( count( $settings[ 'onpost_ad_' . $index . '_limit_visitor_country' ] ) > 0 ) ) {
574
+ $user_ip = quick_adsense_get_value( $_SERVER, 'REMOTE_ADDR' );
575
+ if ( '' !== $user_ip ) {
576
+ $geo_ip = new \iriven\GeoIPCountry();
577
+ $country_code = $geo_ip->resolve( $user_ip );
578
+ if ( ! in_array( $country_code, $settings[ 'onpost_ad_' . $index . '_limit_visitor_country' ], true ) ) {
579
+ return false;
580
+ }
581
+ }
582
+ }
583
+ // End Geotargeting.
584
+ return true;
585
+ }
586
+
587
+ /**
588
+ * This function increments the ad impressions for the ad at the selected index.
589
+ *
590
+ * @param integer $index The array index.
591
+ */
592
+ function quick_adsense_postads_update_impressions( $index ) {
593
+ $settings = get_option( 'quick_adsense_settings' );
594
+ if ( isset( $settings ) && isset( $settings[ 'onpost_ad_' . $index . '_enable_stats' ] ) ) {
595
+ $stats = get_option( 'quick_adsense_onpost_ad_' . $index . '_stats' );
596
+ if ( isset( $stats ) && is_array( $stats ) ) {
597
+ if ( isset( $stats[ gmdate( 'dmY' ) ] ) ) {
598
+ $stats[ gmdate( 'dmY' ) ]['i'] += 1;
599
+ } else {
600
+ $stats[ gmdate( 'dmY' ) ] = [
601
+ 'i' => 1,
602
+ 'c' => 0,
603
+ ];
604
+ $stats_count = count( $stats );
605
+ while ( $stats_count > 30 ) {
606
+ array_shift( $stats );
607
+ $stats_count = count( $stats );
608
+ }
609
+ }
610
+ } else {
611
+ $stats = [
612
+ gmdate( 'dmY' ) => [
613
+ 'i' => 1,
614
+ 'c' => 0,
615
+ ],
616
+ ];
617
+ }
618
+ update_option( 'quick_adsense_onpost_ad_' . $index . '_stats', $stats );
619
+ }
620
+ }
621
+
622
+ /**
623
+ * Add inline script to frontend to record ad stats.
624
+ */
625
+ add_action(
626
+ 'wp_enqueue_scripts',
627
+ function() {
628
+ wp_enqueue_script( 'jquery' );
629
+ wp_add_inline_script(
630
+ 'jquery',
631
+ quick_adsense_load_file(
632
+ 'templates/js/script-frontend-stats.php',
633
+ [
634
+ 'target' => md5( get_bloginfo( 'url' ) ),
635
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
636
+ 'nonce' => wp_create_nonce( 'quick-adsense-stats' ),
637
+ ]
638
+ )
639
+ );
640
+ }
641
+ );
642
+
643
+
644
+ add_action( 'wp_ajax_quick_adsense_onpost_ad_click', 'quick_adsense_onpost_ad_click' );
645
+ add_action( 'wp_ajax_nopriv_quick_adsense_onpost_ad_click', 'quick_adsense_onpost_ad_click' );
646
+ /**
647
+ * Ajax handler for "quick_adsense_onpost_ad_click" action which updates the ad click stats.
648
+ */
649
+ function quick_adsense_onpost_ad_click() {
650
+ if ( isset( $_POST['quick_adsense_nonce'] ) && wp_verify_nonce( sanitize_key( $_POST['quick_adsense_nonce'] ), 'quick-adsense-stats' ) ) {
651
+ if ( isset( $_POST['quick_adsense_onpost_ad_index'] ) ) {
652
+ $index = sanitize_key( $_POST['quick_adsense_onpost_ad_index'] );
653
+ $settings = get_option( 'quick_adsense_settings' );
654
+ if ( isset( $settings ) && isset( $settings[ 'onpost_ad_' . $index . '_enable_stats' ] ) ) {
655
+ $stats = get_option( 'quick_adsense_onpost_ad_' . $index . '_stats' );
656
+ if ( isset( $stats ) && is_array( $stats ) ) {
657
+ if ( isset( $stats[ gmdate( 'dmY' ) ] ) ) {
658
+ $stats[ gmdate( 'dmY' ) ]['c'] += 1;
659
+ } else {
660
+ $stats[ gmdate( 'dmY' ) ] = [
661
+ 'i' => 0,
662
+ 'c' => 1,
663
+ ];
664
+ $stats_count = count( $stats );
665
+ while ( $stats_count > 30 ) {
666
+ array_shift( $stats );
667
+ $stats_count = count( $stats );
668
+ }
669
+ }
670
+ } else {
671
+ $stats = [
672
+ gmdate( 'dmY' ) => [
673
+ 'i' => 0,
674
+ 'c' => 1,
675
+ ],
676
+ ];
677
+ }
678
+ update_option( 'quick_adsense_onpost_ad_' . $index . '_stats', $stats );
679
+ wp_send_json_success();
680
+ }
681
+ }
682
+ }
683
+ wp_send_json_error();
684
+ }
685
+
includes/controls.php CHANGED
@@ -1,200 +1,200 @@
1
- <?php
2
- /**
3
- * Function to return the markup to display an HTML user input element.
4
- *
5
- * @param string $type The element type.
6
- * @param string $label The element label.
7
- * @param string $id The element id.
8
- * @param string $name The element name.
9
- * @param string $value The element value.
10
- * @param array $data The element data. Eg for options in a select.
11
- * @param string $class The element classes.
12
- * @param string $style The element styles.
13
- * @param string $placeholder The element placeholder.
14
- *
15
- * @return string the markup for the HTML element.
16
- */
17
- function quickadsense_get_control( $type, $label, $id, $name, $value = '', $data = null, $class = 'input widefat', $style = '', $placeholder = '' ) {
18
- $output = '';
19
- switch ( $type ) {
20
- case 'hidden':
21
- $output .= '<input type="text" id="' . $id . '" name="' . $name . '" value="' . $value . '" style="display: none;" />';
22
- break;
23
- case 'text':
24
- if ( '' !== $label ) {
25
- $output .= '<label for="' . $name . '">' . $label . '</label>';
26
- }
27
- $output .= '<input type="text" id="' . $id . '" name="' . $name . '" value="' . $value . '" class="multilanguage-input ' . $class . '" style="' . $style . '" placeholder="' . $placeholder . '" />';
28
- break;
29
- case 'password':
30
- if ( '' !== $label ) {
31
- $output .= '<label for="' . $name . '">' . $label . '</label>';
32
- }
33
- $output .= '<input type="password" id="' . $id . '" name="' . $name . '" value="' . $value . '" class="multilanguage-input ' . $class . '" style="' . $style . '" placeholder="' . $placeholder . '" />';
34
- break;
35
- case 'number':
36
- if ( '' !== $label ) {
37
- $output .= '<label for="' . $name . '">' . $label . '</label>';
38
- }
39
- $output .= '<input type="number" id="' . $id . '" name="' . $name . '" value="' . $value . '" class="multilanguage-input ' . $class . '" style="' . $style . '" placeholder="' . $placeholder . '" />';
40
- break;
41
- case 'checkbox':
42
- $output .= '<input type="checkbox" id="' . $id . '" name="' . $name . '" value="1" class="input" ' . checked( $value, 1, false ) . ' style="' . $style . '" />';
43
- if ( '' !== $label ) {
44
- $output .= '<label for="' . $name . '">' . $label . '</label>';
45
- }
46
- break;
47
- case 'textarea':
48
- if ( '' !== $label ) {
49
- $output .= '<label for="' . $name . '">' . $label . '</label><br />';
50
- }
51
- $output .= '<textarea id="' . $id . '" name="' . $name . '" class="multilanguage-input ' . $class . '" class="multilanguage-input ' . $class . '" style="height: 100px; ' . $style . '" placeholder="' . $placeholder . '">' . $value . '</textarea>';
52
- break;
53
- case 'textarea-big':
54
- if ( '' !== $label ) {
55
- $output .= '<label for="' . $name . '">' . $label . '</label><br />';
56
- }
57
- $output .= '<textarea id="' . $id . '" name="' . $name . '" class="multilanguage-input ' . $class . '" class="multilanguage-input ' . $class . '" style="height: 300px; ' . $style . '" placeholder="' . $placeholder . '">' . $value . '</textarea>';
58
- break;
59
- case 'select':
60
- if ( '' !== $label ) {
61
- $output .= '<label for="' . $name . '">' . $label . '</label>';
62
- }
63
- $output .= '<select id="' . $id . '" name="' . $name . '" class="' . $class . '" style="' . $style . '" >';
64
- if ( $data ) {
65
- foreach ( $data as $option ) {
66
- $metadata = '';
67
- if ( isset( $option['metadata'] ) && is_array( $option['metadata'] ) ) {
68
- foreach ( $option['metadata'] as $key => $metavalue ) {
69
- $metadata .= 'data-' . $key . '="' . $metavalue . '"';
70
- }
71
- }
72
- $output .= '<option ' . $metadata . ' value="' . $option['value'] . '" ' . selected( $value, $option['value'], false ) . '>' . $option['text'] . '</option>';
73
- }
74
- }
75
- $output .= '</select>';
76
- break;
77
- case 'upload':
78
- if ( '' !== $label ) {
79
- $output .= '<label for="' . $name . '">' . $label . '</label><br />';
80
- }
81
- $output .= '<input type="text" id="' . $id . '" name="' . $name . '" value="' . $value . '" class="' . $class . '" class="width: 74%;" style="' . $style . '" />';
82
- $output .= '<input type="button" value="Upload Image" class="quick_adsense_uploader_button" id="upload_image_button" class="width: 25%;" />';
83
- break;
84
- case 'multiselect':
85
- if ( '' !== $label ) {
86
- $output .= '<label for="' . $name . '">' . $label . '</label><br />';
87
- }
88
- $output .= '<select id="' . $id . '" name="' . $name . '" class="' . $class . '" multiple="multiple" style="height: 120px; ' . $style . '" >';
89
- if ( $data ) {
90
- foreach ( $data as $option ) {
91
- if ( is_array( $value ) && in_array( $option['value'], $value, true ) ) {
92
- $output .= '<option value="' . $option['value'] . '" selected="selected">' . $option['text'] . '</option>';
93
- } else {
94
- $output .= '<option value="' . $option['value'] . '">' . $option['text'] . '</option>';
95
- }
96
- }
97
- }
98
- $output .= '</select>';
99
- break;
100
- }
101
- return $output;
102
- }
103
-
104
- /**
105
- * Check for null and empty and returns the value or the default
106
- *
107
- * @param array $data The data.
108
- * @param string $field_name The name of field/key for data.
109
- * @param string $default The default value to send if the selected data value if empty or not set.
110
- */
111
- function quick_adsense_get_value( $data, $field_name, $default = '' ) {
112
- if ( isset( $data ) && is_array( $data ) && isset( $data[ $field_name ] ) && ( '' !== $data[ $field_name ] ) ) {
113
- return $data[ $field_name ];
114
- }
115
- return $default;
116
- }
117
-
118
- /**
119
- * Allowed HTML attributes and tags for the wp_kses function.
120
- */
121
- function quick_adsense_get_allowed_html() {
122
- $common_html_attributes = [
123
- 'id' => [],
124
- 'name' => [],
125
- 'class' => [],
126
- 'for' => [],
127
- 'href' => [],
128
- 'target' => [],
129
- 'rel' => [],
130
- 'title' => [],
131
- 'datetime' => [],
132
- 'style' => [],
133
- 'alt' => [],
134
- 'height' => [],
135
- 'src' => [],
136
- 'srcset' => [],
137
- 'width' => [],
138
- 'type' => [],
139
- 'value' => [],
140
- 'checked' => [],
141
- 'selected' => [],
142
- 'multiple' => [],
143
- 'data-index' => [],
144
- 'onclick' => [],
145
- 'async' => [],
146
- 'crossorigin' => [],
147
- 'action' => [],
148
- 'method' => [],
149
- 'content' => [],
150
- 'property' => [],
151
- 'data-ad-client' => [],
152
- 'data-ad-slot' => [],
153
- ];
154
- $common_html_tags = [
155
- 'a' => $common_html_attributes,
156
- 'abbr' => $common_html_attributes,
157
- 'b' => $common_html_attributes,
158
- 'br' => $common_html_attributes,
159
- 'blockquote' => $common_html_attributes,
160
- 'cite' => $common_html_attributes,
161
- 'code' => $common_html_attributes,
162
- 'del' => $common_html_attributes,
163
- 'dd' => $common_html_attributes,
164
- 'div' => $common_html_attributes,
165
- 'dl' => $common_html_attributes,
166
- 'dt' => $common_html_attributes,
167
- 'em' => $common_html_attributes,
168
- 'form' => $common_html_attributes,
169
- 'h1' => $common_html_attributes,
170
- 'h2' => $common_html_attributes,
171
- 'h3' => $common_html_attributes,
172
- 'h4' => $common_html_attributes,
173
- 'h5' => $common_html_attributes,
174
- 'h6' => $common_html_attributes,
175
- 'hr' => $common_html_attributes,
176
- 'i' => $common_html_attributes,
177
- 'img' => $common_html_attributes,
178
- 'ins' => $common_html_attributes,
179
- 'label' => $common_html_attributes,
180
- 'link' => $common_html_attributes,
181
- 'li' => $common_html_attributes,
182
- 'meta' => $common_html_attributes,
183
- 'ol' => $common_html_attributes,
184
- 'ul' => $common_html_attributes,
185
- 'p' => $common_html_attributes,
186
- 'q' => $common_html_attributes,
187
- 'span' => $common_html_attributes,
188
- 'strike' => $common_html_attributes,
189
- 'strong' => $common_html_attributes,
190
- 'script' => $common_html_attributes,
191
- 'noscript' => $common_html_attributes,
192
- 'style' => $common_html_attributes,
193
- 'input' => $common_html_attributes,
194
- 'textarea' => $common_html_attributes,
195
- 'title' => $common_html_attributes,
196
- 'select' => $common_html_attributes,
197
- 'option' => $common_html_attributes,
198
- ];
199
- return $common_html_tags;
200
- }
1
+ <?php
2
+ /**
3
+ * Function to return the markup to display an HTML user input element.
4
+ *
5
+ * @param string $type The element type.
6
+ * @param string $label The element label.
7
+ * @param string $id The element id.
8
+ * @param string $name The element name.
9
+ * @param string $value The element value.
10
+ * @param array $data The element data. Eg for options in a select.
11
+ * @param string $class The element classes.
12
+ * @param string $style The element styles.
13
+ * @param string $placeholder The element placeholder.
14
+ *
15
+ * @return string the markup for the HTML element.
16
+ */
17
+ function quickadsense_get_control( $type, $label, $id, $name, $value = '', $data = null, $class = 'input widefat', $style = '', $placeholder = '' ) {
18
+ $output = '';
19
+ switch ( $type ) {
20
+ case 'hidden':
21
+ $output .= '<input type="text" id="' . $id . '" name="' . $name . '" value="' . $value . '" style="display: none;" />';
22
+ break;
23
+ case 'text':
24
+ if ( '' !== $label ) {
25
+ $output .= '<label for="' . $name . '">' . $label . '</label>';
26
+ }
27
+ $output .= '<input type="text" id="' . $id . '" name="' . $name . '" value="' . $value . '" class="multilanguage-input ' . $class . '" style="' . $style . '" placeholder="' . $placeholder . '" />';
28
+ break;
29
+ case 'password':
30
+ if ( '' !== $label ) {
31
+ $output .= '<label for="' . $name . '">' . $label . '</label>';
32
+ }
33
+ $output .= '<input type="password" id="' . $id . '" name="' . $name . '" value="' . $value . '" class="multilanguage-input ' . $class . '" style="' . $style . '" placeholder="' . $placeholder . '" />';
34
+ break;
35
+ case 'number':
36
+ if ( '' !== $label ) {
37
+ $output .= '<label for="' . $name . '">' . $label . '</label>';
38
+ }
39
+ $output .= '<input type="number" id="' . $id . '" name="' . $name . '" value="' . $value . '" class="multilanguage-input ' . $class . '" style="' . $style . '" placeholder="' . $placeholder . '" />';
40
+ break;
41
+ case 'checkbox':
42
+ $output .= '<input type="checkbox" id="' . $id . '" name="' . $name . '" value="1" class="input" ' . checked( $value, 1, false ) . ' style="' . $style . '" />';
43
+ if ( '' !== $label ) {
44
+ $output .= '<label for="' . $name . '">' . $label . '</label>';
45
+ }
46
+ break;
47
+ case 'textarea':
48
+ if ( '' !== $label ) {
49
+ $output .= '<label for="' . $name . '">' . $label . '</label><br />';
50
+ }
51
+ $output .= '<textarea id="' . $id . '" name="' . $name . '" class="multilanguage-input ' . $class . '" class="multilanguage-input ' . $class . '" style="height: 100px; ' . $style . '" placeholder="' . $placeholder . '">' . $value . '</textarea>';
52
+ break;
53
+ case 'textarea-big':
54
+ if ( '' !== $label ) {
55
+ $output .= '<label for="' . $name . '">' . $label . '</label><br />';
56
+ }
57
+ $output .= '<textarea id="' . $id . '" name="' . $name . '" class="multilanguage-input ' . $class . '" class="multilanguage-input ' . $class . '" style="height: 300px; ' . $style . '" placeholder="' . $placeholder . '">' . $value . '</textarea>';
58
+ break;
59
+ case 'select':
60
+ if ( '' !== $label ) {
61
+ $output .= '<label for="' . $name . '">' . $label . '</label>';
62
+ }
63
+ $output .= '<select id="' . $id . '" name="' . $name . '" class="' . $class . '" style="' . $style . '" >';
64
+ if ( $data ) {
65
+ foreach ( $data as $option ) {
66
+ $metadata = '';
67
+ if ( isset( $option['metadata'] ) && is_array( $option['metadata'] ) ) {
68
+ foreach ( $option['metadata'] as $key => $metavalue ) {
69
+ $metadata .= 'data-' . $key . '="' . $metavalue . '"';
70
+ }
71
+ }
72
+ $output .= '<option ' . $metadata . ' value="' . $option['value'] . '" ' . selected( $value, $option['value'], false ) . '>' . $option['text'] . '</option>';
73
+ }
74
+ }
75
+ $output .= '</select>';
76
+ break;
77
+ case 'upload':
78
+ if ( '' !== $label ) {
79
+ $output .= '<label for="' . $name . '">' . $label . '</label><br />';
80
+ }
81
+ $output .= '<input type="text" id="' . $id . '" name="' . $name . '" value="' . $value . '" class="' . $class . '" class="width: 74%;" style="' . $style . '" />';
82
+ $output .= '<input type="button" value="Upload Image" class="quick_adsense_uploader_button" id="upload_image_button" class="width: 25%;" />';
83
+ break;
84
+ case 'multiselect':
85
+ if ( '' !== $label ) {
86
+ $output .= '<label for="' . $name . '">' . $label . '</label><br />';
87
+ }
88
+ $output .= '<select id="' . $id . '" name="' . $name . '" class="' . $class . '" multiple="multiple" style="height: 120px; ' . $style . '" >';
89
+ if ( $data ) {
90
+ foreach ( $data as $option ) {
91
+ if ( is_array( $value ) && in_array( $option['value'], $value, true ) ) {
92
+ $output .= '<option value="' . $option['value'] . '" selected="selected">' . $option['text'] . '</option>';
93
+ } else {
94
+ $output .= '<option value="' . $option['value'] . '">' . $option['text'] . '</option>';
95
+ }
96
+ }
97
+ }
98
+ $output .= '</select>';
99
+ break;
100
+ }
101
+ return $output;
102
+ }
103
+
104
+ /**
105
+ * Check for null and empty and returns the value or the default
106
+ *
107
+ * @param array $data The data.
108
+ * @param string $field_name The name of field/key for data.
109
+ * @param string $default The default value to send if the selected data value if empty or not set.
110
+ */
111
+ function quick_adsense_get_value( $data, $field_name, $default = '' ) {
112
+ if ( isset( $data ) && is_array( $data ) && isset( $data[ $field_name ] ) && ( '' !== $data[ $field_name ] ) ) {
113
+ return $data[ $field_name ];
114
+ }
115
+ return $default;
116
+ }
117
+
118
+ /**
119
+ * Allowed HTML attributes and tags for the wp_kses function.
120
+ */
121
+ function quick_adsense_get_allowed_html() {
122
+ $common_html_attributes = [
123
+ 'id' => [],
124
+ 'name' => [],
125
+ 'class' => [],
126
+ 'for' => [],
127
+ 'href' => [],
128
+ 'target' => [],
129
+ 'rel' => [],
130
+ 'title' => [],
131
+ 'datetime' => [],
132
+ 'style' => [],
133
+ 'alt' => [],
134
+ 'height' => [],
135
+ 'src' => [],
136
+ 'srcset' => [],
137
+ 'width' => [],
138
+ 'type' => [],
139
+ 'value' => [],
140
+ 'checked' => [],
141
+ 'selected' => [],
142
+ 'multiple' => [],
143
+ 'data-index' => [],
144
+ 'onclick' => [],
145
+ 'async' => [],
146
+ 'crossorigin' => [],
147
+ 'action' => [],
148
+ 'method' => [],
149
+ 'content' => [],
150
+ 'property' => [],
151
+ 'data-ad-client' => [],
152
+ 'data-ad-slot' => [],
153
+ ];
154
+ $common_html_tags = [
155
+ 'a' => $common_html_attributes,
156
+ 'abbr' => $common_html_attributes,
157
+ 'b' => $common_html_attributes,
158
+ 'br' => $common_html_attributes,
159
+ 'blockquote' => $common_html_attributes,
160
+ 'cite' => $common_html_attributes,
161
+ 'code' => $common_html_attributes,
162
+ 'del' => $common_html_attributes,
163
+ 'dd' => $common_html_attributes,
164
+ 'div' => $common_html_attributes,
165
+ 'dl' => $common_html_attributes,
166
+ 'dt' => $common_html_attributes,
167
+ 'em' => $common_html_attributes,
168
+ 'form' => $common_html_attributes,
169
+ 'h1' => $common_html_attributes,
170
+ 'h2' => $common_html_attributes,
171
+ 'h3' => $common_html_attributes,
172
+ 'h4' => $common_html_attributes,
173
+ 'h5' => $common_html_attributes,
174
+ 'h6' => $common_html_attributes,
175
+ 'hr' => $common_html_attributes,
176
+ 'i' => $common_html_attributes,
177
+ 'img' => $common_html_attributes,
178
+ 'ins' => $common_html_attributes,
179
+ 'label' => $common_html_attributes,
180
+ 'link' => $common_html_attributes,
181
+ 'li' => $common_html_attributes,
182
+ 'meta' => $common_html_attributes,
183
+ 'ol' => $common_html_attributes,
184
+ 'ul' => $common_html_attributes,
185
+ 'p' => $common_html_attributes,
186
+ 'q' => $common_html_attributes,
187
+ 'span' => $common_html_attributes,
188
+ 'strike' => $common_html_attributes,
189
+ 'strong' => $common_html_attributes,
190
+ 'script' => $common_html_attributes,
191
+ 'noscript' => $common_html_attributes,
192
+ 'style' => $common_html_attributes,
193
+ 'input' => $common_html_attributes,
194
+ 'textarea' => $common_html_attributes,
195
+ 'title' => $common_html_attributes,
196
+ 'select' => $common_html_attributes,
197
+ 'option' => $common_html_attributes,
198
+ ];
199
+ return $common_html_tags;
200
+ }
includes/loader.php CHANGED
@@ -1,24 +1,26 @@
1
- <?php
2
- /**
3
- * Return the content of the File after processing.
4
- *
5
- * @param string $file File name.
6
- * @param array $args Data to pass to the file.
7
- * @param boolean $echo Choose whether to echo or return the output.
8
- */
9
- function quick_adsense_load_file( $file, $args = [], $echo = false ) {
10
- if ( ( '' !== $file ) && file_exists( dirname( __FILE__ ) . '/' . $file ) ) {
11
- //phpcs:disable WordPress.PHP.DontExtract.extract_extract
12
- // Usage of extract() is necessary in this content to simulate templating functionality.
13
- extract( $args );
14
- //phpcs:enable
15
- ob_start();
16
- include dirname( __FILE__ ) . '/' . $file;
17
- $content = ob_get_contents();
18
- ob_end_clean();
19
- if ( $echo ) {
20
- echo wp_kses( $content, quick_adsense_get_allowed_html() );
21
- }
22
- return $content;
23
- }
24
- }
 
 
1
+ <?php
2
+ /**
3
+ * Return the content of the File after processing.
4
+ *
5
+ * @param string $file File name.
6
+ * @param array $args Data to pass to the file.
7
+ * @param boolean $echo Choose whether to echo or return the output.
8
+ */
9
+ function quick_adsense_load_file( $file, $args = [], $echo = false ) {
10
+ if ( ( '' !== $file ) && file_exists( dirname( __FILE__ ) . '/' . $file ) ) {
11
+ if ( is_array( $args ) ) {
12
+ //phpcs:disable WordPress.PHP.DontExtract.extract_extract
13
+ // Usage of extract() is necessary in this content to simulate templating functionality.
14
+ extract( $args );
15
+ //phpcs:enable
16
+ }
17
+ ob_start();
18
+ include dirname( __FILE__ ) . '/' . $file;
19
+ $content = ob_get_contents();
20
+ ob_end_clean();
21
+ if ( $echo ) {
22
+ echo wp_kses( $content, quick_adsense_get_allowed_html() );
23
+ }
24
+ return $content;
25
+ }
26
+ }
includes/quicktags.php CHANGED
@@ -1,39 +1,28 @@
1
- <?php
2
- /**
3
- * Quicktag Integration.
4
- */
5
-
6
- add_action(
7
- 'admin_print_footer_scripts',
8
- function() {
9
- if ( wp_script_is( 'quicktags' ) ) {
10
- $settings = get_option( 'quick_adsense_settings' );
11
- echo '<script type="text/javascript">';
12
- if ( isset( $settings['enable_quicktag_buttons'] ) && ( $settings['enable_quicktag_buttons'] ) ) {
13
- for ( $i = 1; $i <= 10; $i++ ) {
14
- if ( isset( $settings[ 'onpost_ad_' . $i . '_content' ] ) && ( '' !== $settings[ 'onpost_ad_' . $i . '_content' ] ) ) {
15
- echo 'QTags.addButton("quick_adsense_quicktag_onpost_ad_' . esc_js( $i ) . '", "Ads' . esc_js( $i ) . '", "\n<!--Ads' . esc_js( $i ) . '-->\n", "", "", "Ads' . esc_js( $i ) . '", 201);';
16
- }
17
- }
18
- if ( ! isset( $settings['disable_randomads_quicktag_button'] ) || ( ! $settings['disable_randomads_quicktag_button'] ) ) {
19
- echo 'QTags.addButton("quick_adsense_quicktag_randomads", "RndAds", "\n<!--RndAds-->\n", "", "", "Random Ads", 201);';
20
- }
21
- if ( ! isset( $settings['disable_disablead_quicktag_buttons'] ) || ( ! $settings['disable_disablead_quicktag_buttons'] ) ) {
22
- echo 'QTags.addButton("quick_adsense_quicktag_noads", "NoAds", "\n<!--NoAds-->\n", "", "", "No Ads", 201);';
23
- echo 'QTags.addButton("quick_adsense_quicktag_offdef", "OffDef", "\n<!--OffDef-->\n", "", "", "No Def", 201);';
24
- echo 'QTags.addButton("quick_adsense_quicktag_offwidget", "OffWidget", "\n<!--OffWidget-->\n", "", "", "No AdWidgets", 201);';
25
- }
26
- if ( ! isset( $settings['disable_positionad_quicktag_buttons'] ) || ( ! $settings['disable_positionad_quicktag_buttons'] ) ) {
27
- echo 'QTags.addButton("quick_adsense_quicktag_offbegin", "OffBegin", "\n<!--OffBegin-->\n", "", "", "Disable Beginning of Post Ads", 201);';
28
- echo 'QTags.addButton("quick_adsense_quicktag_offmiddle", "OffMiddle", "\n<!--OffMiddle-->\n", "", "", "Disable Middle of Post Ads", 201);';
29
- echo 'QTags.addButton("quick_adsense_quicktag_offend", "OffEnd", "\n<!--OffEnd-->\n", "", "", "Disable End of Post Ads", 201);';
30
- echo 'QTags.addButton("quick_adsense_quicktag_offafmore", "OffAfMore", "\n<!--OffAfMore-->\n", "", "", "OffAfMore", 201);';
31
- echo 'QTags.addButton("quick_adsense_quicktag_offbflastpara", "OffBfLastPara", "\n<!--OffBfLastPara-->\n", "", "", "OffBfLastPara", 201);';
32
- }
33
- }
34
-
35
- echo '</script>';
36
- }
37
- }
38
- );
39
-
1
+ <?php
2
+ /**
3
+ * Quicktag Integration.
4
+ */
5
+
6
+ add_action(
7
+ 'admin_enqueue_scripts',
8
+ function() {
9
+ $settings = get_option( 'quick_adsense_settings' );
10
+ if ( isset( $settings['enable_quicktag_buttons'] ) && ( $settings['enable_quicktag_buttons'] ) ) {
11
+ $args = [
12
+ 'active_ads' => [],
13
+ 'enable_randomads' => ( ( isset( $settings['disable_randomads_quicktag_button'] ) && ( $settings['disable_randomads_quicktag_button'] ) ) ? false : true ),
14
+ 'enable_disableads' => ( ( isset( $settings['disable_disablead_quicktag_buttons'] ) && ( $settings['disable_disablead_quicktag_buttons'] ) ) ? false : true ),
15
+ 'enable_positionads' => ( ( isset( $settings['disable_positionad_quicktag_buttons'] ) && ( $settings['disable_positionad_quicktag_buttons'] ) ) ? false : true ),
16
+ ];
17
+ for ( $i = 1; $i <= 10; $i++ ) {
18
+ if ( '' !== quick_adsense_get_value( $settings, 'onpost_ad_' . $i . '_content', '' ) ) {
19
+ $args['active_ads'][] = $i;
20
+ }
21
+ }
22
+ wp_add_inline_script(
23
+ 'quicktags',
24
+ quick_adsense_load_file( 'templates/js/quicktags.php', $args )
25
+ );
26
+ }
27
+ }
28
+ );
 
 
 
 
 
 
 
 
 
 
 
includes/settings.php CHANGED
@@ -1,192 +1,192 @@
1
- <?php
2
- /**
3
- * The plugin settings page.
4
- */
5
-
6
- /**
7
- * Add a settings page link to the plugin listing in the plugins admin page.
8
- */
9
- add_action(
10
- 'plugin_action_links_quick-adsense/quick-adsense.php',
11
- function ( $links ) {
12
- $links = array_merge(
13
- [ '<a href="' . esc_url( admin_url( '/admin.php?page=quick-adsense' ) ) . '">Settings</a>' ],
14
- $links
15
- );
16
- return $links;
17
- }
18
- );
19
-
20
- /**
21
- * Create the Admin menu entry for the settings page.
22
- */
23
- add_action(
24
- 'admin_menu',
25
- function () {
26
- add_menu_page(
27
- 'Quick Adsense Options',
28
- 'Quick Adsense',
29
- 'manage_options',
30
- 'quick-adsense',
31
- function () {
32
- // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
33
- // Contains textareas which need to allow output of scripts, iframes etc necessary to output ads and trackers.
34
- echo quick_adsense_load_file( 'templates/page-settings.php' );
35
- // phpcs:enable
36
- }
37
- );
38
- }
39
- );
40
-
41
- /**
42
- * Add scripts and styles for Settings page.
43
- */
44
- add_action(
45
- 'admin_enqueue_scripts',
46
- function ( $hook ) {
47
- global $wp_scripts;
48
- if ( ( 'toplevel_page_quick-adsense' === $hook ) && ( current_user_can( 'manage_options' ) ) ) {
49
- wp_enqueue_script( 'quick-adsense-chart-scripts', plugins_url( '../assets/js/chart.min.js', __FILE__ ), [ 'jquery', 'jquery-ui-core', 'jquery-ui-accordion', 'jquery-ui-dialog' ], '3.7.1', false );
50
- wp_enqueue_style( 'quick-adsense-jquery-ui-styles', plugins_url( '../assets/css/jquery-ui.min.css', __FILE__ ), [], '1.9.1' );
51
- wp_enqueue_style( 'quick-adsense-admin-styles', plugins_url( '../assets/css/admin.css', __FILE__ ), [], '2.8.2' );
52
- wp_enqueue_script( 'quick-adsense-admin-scripts', plugins_url( '../assets/js/admin.js', __FILE__ ), [ 'jquery', 'jquery-ui-core', 'jquery-ui-tabs', 'wp-util' ], '2.8.2', false );
53
- wp_localize_script(
54
- 'quick-adsense-admin-scripts',
55
- 'quick_adsense',
56
- [
57
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
58
- 'nonce' => wp_create_nonce( 'quick-adsense-nonce' ),
59
- ]
60
- );
61
- }
62
- }
63
- );
64
-
65
- /**
66
- * Register settings and sections.
67
- */
68
- add_action(
69
- 'admin_init',
70
- function () {
71
- if ( current_user_can( 'manage_options' ) ) {
72
- register_setting(
73
- 'quick_adsense_settings',
74
- 'quick_adsense_settings',
75
- function ( $input ) {
76
- delete_transient( 'quick_adsense_adstxt_adsense_autocheck_content' );
77
- return $input;
78
- }
79
- );
80
- $settings = get_option( 'quick_adsense_settings' );
81
- $settings['alignment_options'] = [
82
- [
83
- 'text' => 'Left',
84
- 'value' => '1',
85
- ],
86
- [
87
- 'text' => 'Center',
88
- 'value' => '2',
89
- ],
90
- [
91
- 'text' => 'Right',
92
- 'value' => '3',
93
- ],
94
- [
95
- 'text' => 'None',
96
- 'value' => '4',
97
- ],
98
- ];
99
- add_settings_section(
100
- 'quick_adsense_general',
101
- '',
102
- function () use ( $settings ) {
103
- echo wp_kses(
104
- quick_adsense_load_file( 'templates/section-general.php', $settings ),
105
- quick_adsense_get_allowed_html()
106
- );
107
- },
108
- 'quick-adsense-general'
109
- );
110
- $settings['location'] = 'onpost';
111
- add_settings_section(
112
- 'quick_adsense_onpost',
113
- '',
114
- function () use ( $settings ) {
115
- // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
116
- // Contains textareas which need to allow output of scripts, iframes etc necessary to output ads and trackers.
117
- echo quick_adsense_load_file( 'templates/section-onpost-content.php', $settings );
118
- // phpcs:enable
119
- },
120
- 'quick-adsense-onpost'
121
- );
122
- $settings['location'] = 'widgets';
123
- add_settings_section(
124
- 'quick_adsense_widgets',
125
- '',
126
- function () use ( $settings ) {
127
- // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
128
- // Contains textareas which need to allow output of scripts, iframes etc necessary to output ads and trackers.
129
- echo quick_adsense_load_file( 'templates/section-widgets.php', $settings );
130
- // phpcs:enable
131
- },
132
- 'quick-adsense-widgets'
133
- );
134
- $settings['location'] = 'header_footer_codes';
135
- add_settings_section(
136
- 'quick_adsense_header_footer_codes',
137
- '',
138
- function () use ( $settings ) {
139
- // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
140
- // Contains textareas which need to allow output of scripts, iframes etc necessary to output ads and trackers.
141
- echo quick_adsense_load_file( 'templates/section-header-footer.php', $settings );
142
- // phpcs:enable
143
- },
144
- 'quick-adsense-header-footer-codes'
145
- );
146
- }
147
- }
148
- );
149
-
150
- add_action(
151
- 'wp_ajax_quick_adsense_onpost_ad_reset_stats',
152
- function () {
153
- if ( isset( $_POST['nonce'] ) && wp_verify_nonce( sanitize_key( $_POST['nonce'] ), 'quick-adsense-nonce' ) && ( isset( $_POST['index'] ) ) && ( current_user_can( 'manage_options' ) ) ) {
154
- delete_option( 'quick_adsense_onpost_ad_' . sanitize_key( $_POST['index'] ) . '_stats' );
155
- wp_send_json_success();
156
- }
157
- wp_send_json_error();
158
- }
159
- );
160
-
161
-
162
- add_action(
163
- 'wp_ajax_quick_adsense_onpost_ad_get_stats_chart',
164
- function () {
165
- if ( isset( $_POST['nonce'] ) && wp_verify_nonce( sanitize_key( $_POST['nonce'] ), 'quick-adsense-nonce' ) && ( isset( $_POST['index'] ) ) && ( current_user_can( 'manage_options' ) ) ) {
166
- $stats = get_option( 'quick_adsense_onpost_ad_' . sanitize_key( $_POST['index'] ) . '_stats' );
167
- $stats_data = [];
168
- for ( $i = 0; $i < 30; $i++ ) {
169
- $clicks = 0;
170
- $impressions = 0;
171
- if ( isset( $stats ) && is_array( $stats ) && isset( $stats[ gmdate( 'dmY', strtotime( '-' . $i . ' day' ) ) ] ) ) {
172
- $clicks = $stats[ gmdate( 'dmY', strtotime( '-' . $i . ' day' ) ) ]['c'];
173
- $impressions = $stats[ gmdate( 'dmY', strtotime( '-' . $i . ' day' ) ) ]['i'];
174
- }
175
- $stats_data[] = [
176
- 'x' => gmdate( 'm/d/Y', strtotime( '-' . $i . ' day' ) ),
177
- 'y' => $impressions,
178
- 'y1' => $clicks,
179
- ];
180
- }
181
- wp_send_json_success(
182
- quick_adsense_load_file(
183
- 'templates/block-stats-chart.php',
184
- [
185
- 'stats_data' => wp_json_encode( $stats_data ),
186
- ]
187
- )
188
- );
189
- }
190
- wp_send_json_error();
191
- }
192
- );
1
+ <?php
2
+ /**
3
+ * The plugin settings page.
4
+ */
5
+
6
+ /**
7
+ * Add a settings page link to the plugin listing in the plugins admin page.
8
+ */
9
+ add_action(
10
+ 'plugin_action_links_quick-adsense/quick-adsense.php',
11
+ function ( $links ) {
12
+ $links = array_merge(
13
+ [ '<a href="' . esc_url( admin_url( '/admin.php?page=quick-adsense' ) ) . '">Settings</a>' ],
14
+ $links
15
+ );
16
+ return $links;
17
+ }
18
+ );
19
+
20
+ /**
21
+ * Create the Admin menu entry for the settings page.
22
+ */
23
+ add_action(
24
+ 'admin_menu',
25
+ function () {
26
+ add_menu_page(
27
+ 'Quick Adsense Options',
28
+ 'Quick Adsense',
29
+ 'manage_options',
30
+ 'quick-adsense',
31
+ function () {
32
+ // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
33
+ // Contains textareas which need to allow output of scripts, iframes etc necessary to output ads and trackers.
34
+ echo quick_adsense_load_file( 'templates/page-settings.php' );
35
+ // phpcs:enable
36
+ }
37
+ );
38
+ }
39
+ );
40
+
41
+ /**
42
+ * Add scripts and styles for Settings page.
43
+ */
44
+ add_action(
45
+ 'admin_enqueue_scripts',
46
+ function ( $hook ) {
47
+ global $wp_scripts;
48
+ if ( ( 'toplevel_page_quick-adsense' === $hook ) && ( current_user_can( 'manage_options' ) ) ) {
49
+ wp_enqueue_script( 'quick-adsense-chart-scripts', plugins_url( '../assets/js/chart.min.js', __FILE__ ), [ 'jquery', 'jquery-ui-core', 'jquery-ui-accordion', 'jquery-ui-dialog' ], '3.7.1', false );
50
+ wp_enqueue_style( 'quick-adsense-jquery-ui-styles', plugins_url( '../assets/css/jquery-ui.min.css', __FILE__ ), [], '1.9.1' );
51
+ wp_enqueue_style( 'quick-adsense-admin-styles', plugins_url( '../assets/css/admin.css', __FILE__ ), [], '2.8.2' );
52
+ wp_enqueue_script( 'quick-adsense-admin-scripts', plugins_url( '../assets/js/admin.js', __FILE__ ), [ 'jquery', 'jquery-ui-core', 'jquery-ui-tabs', 'wp-util' ], '2.8.2', false );
53
+ wp_localize_script(
54
+ 'quick-adsense-admin-scripts',
55
+ 'quick_adsense',
56
+ [
57
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
58
+ 'nonce' => wp_create_nonce( 'quick-adsense-nonce' ),
59
+ ]
60
+ );
61
+ }
62
+ }
63
+ );
64
+
65
+ /**
66
+ * Register settings and sections.
67
+ */
68
+ add_action(
69
+ 'admin_init',
70
+ function () {
71
+ if ( current_user_can( 'manage_options' ) ) {
72
+ register_setting(
73
+ 'quick_adsense_settings',
74
+ 'quick_adsense_settings',
75
+ function ( $input ) {
76
+ delete_transient( 'quick_adsense_adstxt_adsense_autocheck_content' );
77
+ return $input;
78
+ }
79
+ );
80
+ $settings = get_option( 'quick_adsense_settings' );
81
+ $settings['alignment_options'] = [
82
+ [
83
+ 'text' => 'Left',
84
+ 'value' => '1',
85
+ ],
86
+ [
87
+ 'text' => 'Center',
88
+ 'value' => '2',
89
+ ],
90
+ [
91
+ 'text' => 'Right',
92
+ 'value' => '3',
93
+ ],
94
+ [
95
+ 'text' => 'None',
96
+ 'value' => '4',
97
+ ],
98
+ ];
99
+ add_settings_section(
100
+ 'quick_adsense_general',
101
+ '',
102
+ function () use ( $settings ) {
103
+ echo wp_kses(
104
+ quick_adsense_load_file( 'templates/section-general.php', $settings ),
105
+ quick_adsense_get_allowed_html()
106
+ );
107
+ },
108
+ 'quick-adsense-general'
109
+ );
110
+ $settings['location'] = 'onpost';
111
+ add_settings_section(
112
+ 'quick_adsense_onpost',
113
+ '',
114
+ function () use ( $settings ) {
115
+ // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
116
+ // Contains textareas which need to allow output of scripts, iframes etc necessary to output ads and trackers.
117
+ echo quick_adsense_load_file( 'templates/section-onpost-content.php', $settings );
118
+ // phpcs:enable
119
+ },
120
+ 'quick-adsense-onpost'
121
+ );
122
+ $settings['location'] = 'widgets';
123
+ add_settings_section(
124
+ 'quick_adsense_widgets',
125
+ '',
126
+ function () use ( $settings ) {
127
+ // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
128
+ // Contains textareas which need to allow output of scripts, iframes etc necessary to output ads and trackers.
129
+ echo quick_adsense_load_file( 'templates/section-widgets.php', $settings );
130
+ // phpcs:enable
131
+ },
132
+ 'quick-adsense-widgets'
133
+ );
134
+ $settings['location'] = 'header_footer_codes';
135
+ add_settings_section(
136
+ 'quick_adsense_header_footer_codes',
137
+ '',
138
+ function () use ( $settings ) {
139
+ // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
140
+ // Contains textareas which need to allow output of scripts, iframes etc necessary to output ads and trackers.
141
+ echo quick_adsense_load_file( 'templates/section-header-footer.php', $settings );
142
+ // phpcs:enable
143
+ },
144
+ 'quick-adsense-header-footer-codes'
145
+ );
146
+ }
147
+ }
148
+ );
149
+
150
+ add_action(
151
+ 'wp_ajax_quick_adsense_onpost_ad_reset_stats',
152
+ function () {
153
+ if ( isset( $_POST['nonce'] ) && wp_verify_nonce( sanitize_key( $_POST['nonce'] ), 'quick-adsense-nonce' ) && ( isset( $_POST['index'] ) ) && ( current_user_can( 'manage_options' ) ) ) {
154
+ delete_option( 'quick_adsense_onpost_ad_' . sanitize_key( $_POST['index'] ) . '_stats' );
155
+ wp_send_json_success();
156
+ }
157
+ wp_send_json_error();
158
+ }
159
+ );
160
+
161
+
162
+ add_action(
163
+ 'wp_ajax_quick_adsense_onpost_ad_get_stats_chart',
164
+ function () {
165
+ if ( isset( $_POST['nonce'] ) && wp_verify_nonce( sanitize_key( $_POST['nonce'] ), 'quick-adsense-nonce' ) && ( isset( $_POST['index'] ) ) && ( current_user_can( 'manage_options' ) ) ) {
166
+ $stats = get_option( 'quick_adsense_onpost_ad_' . sanitize_key( $_POST['index'] ) . '_stats' );
167
+ $stats_data = [];
168
+ for ( $i = 0; $i < 30; $i++ ) {
169
+ $clicks = 0;
170
+ $impressions = 0;
171
+ if ( isset( $stats ) && is_array( $stats ) && isset( $stats[ gmdate( 'dmY', strtotime( '-' . $i . ' day' ) ) ] ) ) {
172
+ $clicks = $stats[ gmdate( 'dmY', strtotime( '-' . $i . ' day' ) ) ]['c'];
173
+ $impressions = $stats[ gmdate( 'dmY', strtotime( '-' . $i . ' day' ) ) ]['i'];
174
+ }
175
+ $stats_data[] = [
176
+ 'x' => gmdate( 'm/d/Y', strtotime( '-' . $i . ' day' ) ),
177
+ 'y' => $impressions,
178
+ 'y1' => $clicks,
179
+ ];
180
+ }
181
+ wp_send_json_success(
182
+ quick_adsense_load_file(
183
+ 'templates/block-stats-chart.php',
184
+ [
185
+ 'stats_data' => wp_json_encode( $stats_data ),
186
+ ]
187
+ )
188
+ );
189
+ }
190
+ wp_send_json_error();
191
+ }
192
+ );
includes/templates/adunit-onpost.php CHANGED
@@ -1,61 +1,61 @@
1
- <?php $adunit_index = quick_adsense_get_value( $args, 'adunit_index' ); ?>
2
- <div id="quick_adsense_onpost_adunits_control_<?php echo esc_attr( $adunit_index ); ?>" class="quick_adsense_onpost_adunits_control_wrapper">
3
- <div class="quick_adsense_onpost_adunits_label">Ads<?php echo esc_attr( $adunit_index ); ?></div>
4
- <div class="quick_adsense_onpost_adunits_control">
5
- <?php
6
- echo wp_kses(
7
- quickadsense_get_control(
8
- 'textarea',
9
- '',
10
- 'quick_adsense_settings_onpost_ad_' . $adunit_index . '_content',
11
- 'quick_adsense_settings[onpost_ad_' . $adunit_index . '_content]',
12
- quick_adsense_get_value( $args, 'onpost_ad_' . $adunit_index . '_content' ),
13
- null,
14
- 'input',
15
- 'display: block; margin: 0 0 10px 0',
16
- 'Enter Code'
17
- ),
18
- quick_adsense_get_allowed_html()
19
- );
20
- ?>
21
- <p class="quick_adsense_onpost_adunits_styling_controls">
22
- Alignment
23
- <?php
24
- echo wp_kses(
25
- quickadsense_get_control(
26
- 'select',
27
- '',
28
- 'quick_adsense_settings_onpost_ad_' . $adunit_index . '_alignment',
29
- 'quick_adsense_settings[onpost_ad_' . $adunit_index . '_alignment]',
30
- quick_adsense_get_value( $args, 'onpost_ad_' . $adunit_index . '_alignment' ),
31
- quick_adsense_get_value( $args, 'alignment_options' ),
32
- 'input',
33
- 'margin: -2px 20px 0 10px;'
34
- ),
35
- quick_adsense_get_allowed_html()
36
- );
37
- ?>
38
- <wbr />margin
39
- <?php
40
- echo wp_kses(
41
- quickadsense_get_control(
42
- 'number',
43
- '',
44
- 'quick_adsense_settings_onpost_ad_' . $adunit_index . '_margin',
45
- 'quick_adsense_settings[onpost_ad_' . $adunit_index . '_margin]',
46
- quick_adsense_get_value( $args, 'onpost_ad_' . $adunit_index . '_margin' ),
47
- null,
48
- 'input',
49
- 'margin: -2px 10px 0 10px; width: 52px;'
50
- ),
51
- quick_adsense_get_allowed_html()
52
- );
53
- ?>
54
- px
55
- </p>
56
- <?php
57
- quick_adsense_load_file( 'templates/block-adunit-advanced.php', $args, true );
58
- ?>
59
- </div>
60
- <div class="clear"></div>
61
- </div>
1
+ <?php $adunit_index = quick_adsense_get_value( $args, 'adunit_index' ); ?>
2
+ <div id="quick_adsense_onpost_adunits_control_<?php echo esc_attr( $adunit_index ); ?>" class="quick_adsense_onpost_adunits_control_wrapper">
3
+ <div class="quick_adsense_onpost_adunits_label">Ads<?php echo esc_attr( $adunit_index ); ?></div>
4
+ <div class="quick_adsense_onpost_adunits_control">
5
+ <?php
6
+ // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
7
+ // This textarea needs to allow output of scripts, iframes etc necessary to output ads and trackers.
8
+ echo quickadsense_get_control(
9
+ 'textarea',
10
+ '',
11
+ 'quick_adsense_settings_onpost_ad_' . $adunit_index . '_content',
12
+ 'quick_adsense_settings[onpost_ad_' . $adunit_index . '_content]',
13
+ quick_adsense_get_value( $args, 'onpost_ad_' . $adunit_index . '_content' ),
14
+ null,
15
+ 'input',
16
+ 'display: block; margin: 0 0 10px 0',
17
+ 'Enter Code'
18
+ );
19
+ // phpcs:enable
20
+ ?>
21
+ <p class="quick_adsense_onpost_adunits_styling_controls">
22
+ Alignment
23
+ <?php
24
+ echo wp_kses(
25
+ quickadsense_get_control(
26
+ 'select',
27
+ '',
28
+ 'quick_adsense_settings_onpost_ad_' . $adunit_index . '_alignment',
29
+ 'quick_adsense_settings[onpost_ad_' . $adunit_index . '_alignment]',
30
+ quick_adsense_get_value( $args, 'onpost_ad_' . $adunit_index . '_alignment' ),
31
+ quick_adsense_get_value( $args, 'alignment_options' ),
32
+ 'input',
33
+ 'margin: -2px 20px 0 10px;'
34
+ ),
35
+ quick_adsense_get_allowed_html()
36
+ );
37
+ ?>
38
+ <wbr />margin
39
+ <?php
40
+ echo wp_kses(
41
+ quickadsense_get_control(
42
+ 'number',
43
+ '',
44
+ 'quick_adsense_settings_onpost_ad_' . $adunit_index . '_margin',
45
+ 'quick_adsense_settings[onpost_ad_' . $adunit_index . '_margin]',
46
+ quick_adsense_get_value( $args, 'onpost_ad_' . $adunit_index . '_margin' ),
47
+ null,
48
+ 'input',
49
+ 'margin: -2px 10px 0 10px; width: 52px;'
50
+ ),
51
+ quick_adsense_get_allowed_html()
52
+ );
53
+ ?>
54
+ px
55
+ </p>
56
+ <?php
57
+ quick_adsense_load_file( 'templates/block-adunit-advanced.php', $args, true );
58
+ ?>
59
+ </div>
60
+ <div class="clear"></div>
61
+ </div>
includes/templates/adunit-widget.php CHANGED
@@ -1,23 +1,23 @@
1
- <?php $adunit_index = quick_adsense_get_value( $args, 'adunit_index' ); ?>
2
- <div id="quick_adsense_widget_adunits_control_<?php echo esc_attr( $adunit_index ); ?>" class="quick_adsense_widget_adunits_control_wrapper">
3
- <div class="quick_adsense_widget_adunits_label">AdsWidget<?php echo esc_attr( $adunit_index ); ?></div>
4
- <div class="quick_adsense_widget_adunits_control">
5
- <?php
6
- echo wp_kses(
7
- quickadsense_get_control(
8
- 'textarea',
9
- '',
10
- 'quick_adsense_settings_widget_ad_' . $adunit_index . '_content',
11
- 'quick_adsense_settings[widget_ad_' . $adunit_index . '_content]',
12
- quick_adsense_get_value( $args, 'widget_ad_' . $adunit_index . '_content' ),
13
- null,
14
- 'input',
15
- 'display: block; margin: 0 0 10px 0;',
16
- 'Enter Code'
17
- ),
18
- quick_adsense_get_allowed_html()
19
- );
20
- ?>
21
- </div>
22
- <div class="clear"></div>
23
- </div>
1
+ <?php $adunit_index = quick_adsense_get_value( $args, 'adunit_index' ); ?>
2
+ <div id="quick_adsense_widget_adunits_control_<?php echo esc_attr( $adunit_index ); ?>" class="quick_adsense_widget_adunits_control_wrapper">
3
+ <div class="quick_adsense_widget_adunits_label">AdsWidget<?php echo esc_attr( $adunit_index ); ?></div>
4
+ <div class="quick_adsense_widget_adunits_control">
5
+ <?php
6
+ // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
7
+ // This textarea needs to allow output of scripts, iframes etc necessary to output ads and trackers.
8
+ quickadsense_get_control(
9
+ 'textarea',
10
+ '',
11
+ 'quick_adsense_settings_widget_ad_' . $adunit_index . '_content',
12
+ 'quick_adsense_settings[widget_ad_' . $adunit_index . '_content]',
13
+ quick_adsense_get_value( $args, 'widget_ad_' . $adunit_index . '_content' ),
14
+ null,
15
+ 'input',
16
+ 'display: block; margin: 0 0 10px 0;',
17
+ 'Enter Code'
18
+ );
19
+ // phpcs:enable
20
+ ?>
21
+ </div>
22
+ <div class="clear"></div>
23
+ </div>
includes/templates/block-adunit-advanced.php CHANGED
@@ -1,202 +1,202 @@
1
- <?php
2
- $adunit_index = quick_adsense_get_value( $args, 'adunit_index' );
3
- $location = quick_adsense_get_value( $args, 'location' );
4
- ?>
5
- <p class="quick_adsense_<?php echo esc_attr( $location ); ?>_adunits_device_controls">
6
- <b>Hide by Device Type:</b><br />
7
- <?php
8
- echo wp_kses(
9
- quickadsense_get_control(
10
- 'checkbox',
11
- 'Mobile',
12
- 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_device_mobile',
13
- 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_device_mobile]',
14
- quick_adsense_get_value( $args, '_ad_' . $adunit_index . '_hide_device_mobile' ),
15
- null,
16
- 'input',
17
- 'margin: -1px 5px 0 0;'
18
- ),
19
- quick_adsense_get_allowed_html()
20
- );
21
- echo wp_kses(
22
- quickadsense_get_control(
23
- 'checkbox',
24
- 'Tablet',
25
- 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_device_tablet',
26
- 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_device_tablet]',
27
- quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_device_tablet' ),
28
- null,
29
- 'input',
30
- 'margin: -1px 5px 0 15px;'
31
- ),
32
- quick_adsense_get_allowed_html()
33
- );
34
- echo wp_kses(
35
- quickadsense_get_control(
36
- 'checkbox',
37
- 'Desktop',
38
- 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_device_desktop',
39
- 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_device_desktop]',
40
- quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_device_desktop' ),
41
- null,
42
- 'input',
43
- 'margin: -1px 5px 0 15px;'
44
- ),
45
- quick_adsense_get_allowed_html()
46
- );
47
- ?>
48
- </p>
49
- <p class="quick_adsense_<?php echo esc_attr( $location ); ?>_adunits_device_controls">
50
- <b>Hide by Visitor Source:</b><br />
51
- <?php
52
- echo wp_kses(
53
- quickadsense_get_control(
54
- 'checkbox',
55
- 'Search Engine',
56
- 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_visitor_searchengine',
57
- 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_visitor_searchengine]',
58
- quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_visitor_searchengine' ),
59
- null,
60
- 'input',
61
- 'margin: -1px 5px 0 0;'
62
- ),
63
- quick_adsense_get_allowed_html()
64
- );
65
- echo wp_kses(
66
- quickadsense_get_control(
67
- 'checkbox',
68
- 'Indirect',
69
- 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_visitor_indirect',
70
- 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_visitor_indirect]',
71
- quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_visitor_indirect' ),
72
- null,
73
- 'input',
74
- 'margin: -1px 5px 0 15px;'
75
- ),
76
- quick_adsense_get_allowed_html()
77
- );
78
- echo wp_kses(
79
- quickadsense_get_control(
80
- 'checkbox',
81
- 'Direct',
82
- 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_visitor_direct',
83
- 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_visitor_direct]',
84
- quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_visitor_direct' ),
85
- null,
86
- 'input',
87
- 'margin: -1px 5px 0 15px;'
88
- ),
89
- quick_adsense_get_allowed_html()
90
- );
91
- ?>
92
- </p>
93
- <p class="quick_adsense_<?php echo esc_attr( $location ); ?>_adunits_device_controls">
94
- <b>Hide by Visitor Type:</b><br />
95
- <?php
96
- echo wp_kses(
97
- quickadsense_get_control(
98
- 'checkbox',
99
- 'Bots',
100
- 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_visitor_bot',
101
- 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_visitor_bot]',
102
- quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_visitor_bot' ),
103
- null,
104
- 'input',
105
- 'margin: -1px 5px 0 0;'
106
- ),
107
- quick_adsense_get_allowed_html()
108
- );
109
- echo wp_kses(
110
- quickadsense_get_control(
111
- 'checkbox',
112
- 'Known Browser',
113
- 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_visitor_knownbrowser',
114
- 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_visitor_knownbrowser]',
115
- quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_visitor_knownbrowser' ),
116
- null,
117
- 'input',
118
- 'margin: -1px 5px 0 15px;'
119
- ),
120
- quick_adsense_get_allowed_html()
121
- );
122
- echo wp_kses(
123
- quickadsense_get_control(
124
- 'checkbox',
125
- 'Unknown Browser',
126
- 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_visitor_unknownbrowser',
127
- 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_visitor_unknownbrowser]',
128
- quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_visitor_unknownbrowser' ),
129
- null,
130
- 'input',
131
- 'margin: -1px 5px 0 15px;'
132
- ),
133
- quick_adsense_get_allowed_html()
134
- );
135
- ?>
136
- <br />
137
- <?php
138
- echo wp_kses(
139
- quickadsense_get_control(
140
- 'checkbox',
141
- 'Guest',
142
- 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_visitor_guest',
143
- 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_visitor_guest]',
144
- quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_visitor_guest' ),
145
- null,
146
- 'input',
147
- 'margin: -1px 5px 0 0;'
148
- ),
149
- quick_adsense_get_allowed_html()
150
- );
151
- echo wp_kses(
152
- quickadsense_get_control(
153
- 'checkbox',
154
- 'Logged-in',
155
- 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_visitor_loggedin',
156
- 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_visitor_loggedin]',
157
- quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_visitor_loggedin' ),
158
- null,
159
- 'input',
160
- 'margin: -1px 5px 0 15px;'
161
- ),
162
- quick_adsense_get_allowed_html()
163
- );
164
- ?>
165
- </p>
166
- <p class="quick_adsense_<?php echo esc_attr( $location ); ?>_adunits_device_controls">
167
- <b>Limit by Visitor Countries:</b><br />
168
- <?php
169
- echo wp_kses(
170
- quickadsense_get_control(
171
- 'multiselect',
172
- '',
173
- 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_limit_visitor_country',
174
- 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_limit_visitor_country][]',
175
- quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_limit_visitor_country' ),
176
- quick_adsense_get_countries()
177
- ),
178
- quick_adsense_get_allowed_html()
179
- );
180
- ?>
181
- </p>
182
- <p class="quick_adsense_<?php echo esc_attr( $location ); ?>_adunits_device_controls">
183
- <b>Ad Stats:</b><br />
184
- <?php
185
- echo wp_kses(
186
- quickadsense_get_control(
187
- 'checkbox',
188
- 'Enable Stats',
189
- 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_enable_stats',
190
- 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_enable_stats]',
191
- quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_enable_stats' ),
192
- null,
193
- 'input',
194
- 'margin: -1px 5px 0 0;'
195
- ),
196
- quick_adsense_get_allowed_html()
197
- );
198
- ?>
199
- <br />
200
- <input class="quick_adsense_<?php echo esc_attr( $location ); ?>_ad_show_stats input button-secondary" data-index="<?php echo esc_attr( $adunit_index ); ?>" type="button" value="View Stats" />&nbsp;
201
- <input class="quick_adsense_<?php echo esc_attr( $location ); ?>_ad_reset_stats input button-secondary right" data-index="<?php echo esc_attr( $adunit_index ); ?>" type="button" value="Reset Stats" />
202
- </p>
1
+ <?php
2
+ $adunit_index = quick_adsense_get_value( $args, 'adunit_index' );
3
+ $location = quick_adsense_get_value( $args, 'location' );
4
+ ?>
5
+ <p class="quick_adsense_<?php echo esc_attr( $location ); ?>_adunits_device_controls">
6
+ <b>Hide by Device Type:</b><br />
7
+ <?php
8
+ echo wp_kses(
9
+ quickadsense_get_control(
10
+ 'checkbox',
11
+ 'Mobile',
12
+ 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_device_mobile',
13
+ 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_device_mobile]',
14
+ quick_adsense_get_value( $args, '_ad_' . $adunit_index . '_hide_device_mobile' ),
15
+ null,
16
+ 'input',
17
+ 'margin: -1px 5px 0 0;'
18
+ ),
19
+ quick_adsense_get_allowed_html()
20
+ );
21
+ echo wp_kses(
22
+ quickadsense_get_control(
23
+ 'checkbox',
24
+ 'Tablet',
25
+ 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_device_tablet',
26
+ 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_device_tablet]',
27
+ quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_device_tablet' ),
28
+ null,
29
+ 'input',
30
+ 'margin: -1px 5px 0 15px;'
31
+ ),
32
+ quick_adsense_get_allowed_html()
33
+ );
34
+ echo wp_kses(
35
+ quickadsense_get_control(
36
+ 'checkbox',
37
+ 'Desktop',
38
+ 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_device_desktop',
39
+ 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_device_desktop]',
40
+ quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_device_desktop' ),
41
+ null,
42
+ 'input',
43
+ 'margin: -1px 5px 0 15px;'
44
+ ),
45
+ quick_adsense_get_allowed_html()
46
+ );
47
+ ?>
48
+ </p>
49
+ <p class="quick_adsense_<?php echo esc_attr( $location ); ?>_adunits_device_controls">
50
+ <b>Hide by Visitor Source:</b><br />
51
+ <?php
52
+ echo wp_kses(
53
+ quickadsense_get_control(
54
+ 'checkbox',
55
+ 'Search Engine',
56
+ 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_visitor_searchengine',
57
+ 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_visitor_searchengine]',
58
+ quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_visitor_searchengine' ),
59
+ null,
60
+ 'input',
61
+ 'margin: -1px 5px 0 0;'
62
+ ),
63
+ quick_adsense_get_allowed_html()
64
+ );
65
+ echo wp_kses(
66
+ quickadsense_get_control(
67
+ 'checkbox',
68
+ 'Indirect',
69
+ 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_visitor_indirect',
70
+ 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_visitor_indirect]',
71
+ quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_visitor_indirect' ),
72
+ null,
73
+ 'input',
74
+ 'margin: -1px 5px 0 15px;'
75
+ ),
76
+ quick_adsense_get_allowed_html()
77
+ );
78
+ echo wp_kses(
79
+ quickadsense_get_control(
80
+ 'checkbox',
81
+ 'Direct',
82
+ 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_visitor_direct',
83
+ 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_visitor_direct]',
84
+ quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_visitor_direct' ),
85
+ null,
86
+ 'input',
87
+ 'margin: -1px 5px 0 15px;'
88
+ ),
89
+ quick_adsense_get_allowed_html()
90
+ );
91
+ ?>
92
+ </p>
93
+ <p class="quick_adsense_<?php echo esc_attr( $location ); ?>_adunits_device_controls">
94
+ <b>Hide by Visitor Type:</b><br />
95
+ <?php
96
+ echo wp_kses(
97
+ quickadsense_get_control(
98
+ 'checkbox',
99
+ 'Bots',
100
+ 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_visitor_bot',
101
+ 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_visitor_bot]',
102
+ quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_visitor_bot' ),
103
+ null,
104
+ 'input',
105
+ 'margin: -1px 5px 0 0;'
106
+ ),
107
+ quick_adsense_get_allowed_html()
108
+ );
109
+ echo wp_kses(
110
+ quickadsense_get_control(
111
+ 'checkbox',
112
+ 'Known Browser',
113
+ 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_visitor_knownbrowser',
114
+ 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_visitor_knownbrowser]',
115
+ quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_visitor_knownbrowser' ),
116
+ null,
117
+ 'input',
118
+ 'margin: -1px 5px 0 15px;'
119
+ ),
120
+ quick_adsense_get_allowed_html()
121
+ );
122
+ echo wp_kses(
123
+ quickadsense_get_control(
124
+ 'checkbox',
125
+ 'Unknown Browser',
126
+ 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_visitor_unknownbrowser',
127
+ 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_visitor_unknownbrowser]',
128
+ quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_visitor_unknownbrowser' ),
129
+ null,
130
+ 'input',
131
+ 'margin: -1px 5px 0 15px;'
132
+ ),
133
+ quick_adsense_get_allowed_html()
134
+ );
135
+ ?>
136
+ <br />
137
+ <?php
138
+ echo wp_kses(
139
+ quickadsense_get_control(
140
+ 'checkbox',
141
+ 'Guest',
142
+ 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_visitor_guest',
143
+ 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_visitor_guest]',
144
+ quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_visitor_guest' ),
145
+ null,
146
+ 'input',
147
+ 'margin: -1px 5px 0 0;'
148
+ ),
149
+ quick_adsense_get_allowed_html()
150
+ );
151
+ echo wp_kses(
152
+ quickadsense_get_control(
153
+ 'checkbox',
154
+ 'Logged-in',
155
+ 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_hide_visitor_loggedin',
156
+ 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_hide_visitor_loggedin]',
157
+ quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_hide_visitor_loggedin' ),
158
+ null,
159
+ 'input',
160
+ 'margin: -1px 5px 0 15px;'
161
+ ),
162
+ quick_adsense_get_allowed_html()
163
+ );
164
+ ?>
165
+ </p>
166
+ <p class="quick_adsense_<?php echo esc_attr( $location ); ?>_adunits_device_controls">
167
+ <b>Limit by Visitor Countries:</b><br />
168
+ <?php
169
+ echo wp_kses(
170
+ quickadsense_get_control(
171
+ 'multiselect',
172
+ '',
173
+ 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_limit_visitor_country',
174
+ 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_limit_visitor_country][]',
175
+ quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_limit_visitor_country' ),
176
+ quick_adsense_get_countries()
177
+ ),
178
+ quick_adsense_get_allowed_html()
179
+ );
180
+ ?>
181
+ </p>
182
+ <p class="quick_adsense_<?php echo esc_attr( $location ); ?>_adunits_device_controls">
183
+ <b>Ad Stats:</b><br />
184
+ <?php
185
+ echo wp_kses(
186
+ quickadsense_get_control(
187
+ 'checkbox',
188
+ 'Enable Stats',
189
+ 'quick_adsense_settings_' . $location . '_ad_' . $adunit_index . '_enable_stats',
190
+ 'quick_adsense_settings[' . $location . '_ad_' . $adunit_index . '_enable_stats]',
191
+ quick_adsense_get_value( $args, $location . '_ad_' . $adunit_index . '_enable_stats' ),
192
+ null,
193
+ 'input',
194
+ 'margin: -1px 5px 0 0;'
195
+ ),
196
+ quick_adsense_get_allowed_html()
197
+ );
198
+ ?>
199
+ <br />
200
+ <input class="quick_adsense_<?php echo esc_attr( $location ); ?>_ad_show_stats input button-secondary" data-index="<?php echo esc_attr( $adunit_index ); ?>" type="button" value="View Stats" />&nbsp;
201
+ <input class="quick_adsense_<?php echo esc_attr( $location ); ?>_ad_reset_stats input button-secondary right" data-index="<?php echo esc_attr( $adunit_index ); ?>" type="button" value="Reset Stats" />
202
+ </p>
includes/templates/block-general-adsense.php CHANGED
@@ -1,30 +1,30 @@
1
- <div class="quick_adsense_block">
2
- <div class="quick_adsense_block_labels">Adsense</div>
3
- <div class="quick_adsense_block_controls">
4
- Place up to
5
- <?php
6
- $max_ads_count = [];
7
- for ( $i = 0; $i <= 10; $i++ ) {
8
- $max_ads_count[] = [
9
- 'text' => $i,
10
- 'value' => $i,
11
- ];
12
- }
13
- echo wp_kses(
14
- quickadsense_get_control(
15
- 'select',
16
- '',
17
- 'quick_adsense_settings_max_ads_per_page',
18
- 'quick_adsense_settings[max_ads_per_page]',
19
- quick_adsense_get_value( $args, 'max_ads_per_page' ),
20
- $max_ads_count,
21
- 'input',
22
- 'margin: -2px 10px 0 40px;'
23
- ),
24
- quick_adsense_get_allowed_html()
25
- );
26
- ?>
27
- Ads on a page
28
- </div>
29
- <div class="clear"></div>
30
- </div>
1
+ <div class="quick_adsense_block">
2
+ <div class="quick_adsense_block_labels">Adsense</div>
3
+ <div class="quick_adsense_block_controls">
4
+ Place up to
5
+ <?php
6
+ $max_ads_count = [];
7
+ for ( $i = 0; $i <= 10; $i++ ) {
8
+ $max_ads_count[] = [
9
+ 'text' => $i,
10
+ 'value' => $i,
11
+ ];
12
+ }
13
+ echo wp_kses(
14
+ quickadsense_get_control(
15
+ 'select',
16
+ '',
17
+ 'quick_adsense_settings_max_ads_per_page',
18
+ 'quick_adsense_settings[max_ads_per_page]',
19
+ quick_adsense_get_value( $args, 'max_ads_per_page' ),
20
+ $max_ads_count,
21
+ 'input',
22
+ 'margin: -2px 10px 0 40px;'
23
+ ),
24
+ quick_adsense_get_allowed_html()
25
+ );
26
+ ?>
27
+ Ads on a page
28
+ </div>
29
+ <div class="clear"></div>
30
+ </div>
includes/templates/block-general-appearance.php CHANGED
@@ -1,167 +1,167 @@
1
- <div class="quick_adsense_block">
2
- <div class="quick_adsense_block_labels">Appearance</div>
3
- <div class="quick_adsense_block_controls">
4
- <p>
5
- <span>
6
- <?php
7
- echo wp_kses(
8
- quickadsense_get_control(
9
- 'checkbox',
10
- '<b id="quick_adsense_settings_enable_on_posts_label">Posts</b>',
11
- 'quick_adsense_settings_enable_on_posts',
12
- 'quick_adsense_settings[enable_on_posts]',
13
- quick_adsense_get_value( $args, 'enable_on_posts' ),
14
- null,
15
- 'input',
16
- 'margin: -1px 10px 0 0;'
17
- ),
18
- quick_adsense_get_allowed_html()
19
- );
20
- ?>
21
- </span>
22
- <span>
23
- <?php
24
- echo wp_kses(
25
- quickadsense_get_control(
26
- 'checkbox',
27
- '<b id="quick_adsense_settings_enable_on_pages_label">Pages</b>',
28
- 'quick_adsense_settings_enable_on_pages',
29
- 'quick_adsense_settings[enable_on_pages]',
30
- quick_adsense_get_value( $args, 'enable_on_pages' ),
31
- null,
32
- 'input',
33
- 'margin: -1px 10px 0 15px;'
34
- ),
35
- quick_adsense_get_allowed_html()
36
- );
37
- ?>
38
- </span>
39
- </p>
40
- <p>
41
- <span>
42
- <?php
43
- echo wp_kses(
44
- quickadsense_get_control(
45
- 'checkbox',
46
- '<b id="quick_adsense_settings_enable_on_homepage_label">Homepage</b>',
47
- 'quick_adsense_settings_enable_on_homepage',
48
- 'quick_adsense_settings[enable_on_homepage]',
49
- quick_adsense_get_value( $args, 'enable_on_homepage' ),
50
- null,
51
- 'input',
52
- 'margin: -1px 10px 0 0;'
53
- ),
54
- quick_adsense_get_allowed_html()
55
- );
56
- ?>
57
- </span>
58
- <span>
59
- <?php
60
- echo wp_kses(
61
- quickadsense_get_control(
62
- 'checkbox',
63
- '<b id="quick_adsense_settings_enable_on_categories_label">Categories</b>',
64
- 'quick_adsense_settings_enable_on_categories',
65
- 'quick_adsense_settings[enable_on_categories]',
66
- quick_adsense_get_value( $args, 'enable_on_categories' ),
67
- null,
68
- 'input',
69
- 'margin: -1px 10px 0 15px;'
70
- ),
71
- quick_adsense_get_allowed_html()
72
- );
73
- ?>
74
- </span>
75
- <span>
76
- <?php
77
- echo wp_kses(
78
- quickadsense_get_control(
79
- 'checkbox',
80
- '<b id="quick_adsense_settings_enable_on_archives_label">Archives</b>',
81
- 'quick_adsense_settings_enable_on_archives',
82
- 'quick_adsense_settings[enable_on_archives]',
83
- quick_adsense_get_value( $args, 'enable_on_archives' ),
84
- null,
85
- 'input',
86
- 'margin: -1px 10px 0 15px;'
87
- ),
88
- quick_adsense_get_allowed_html()
89
- );
90
- ?>
91
- </span>
92
- <span>
93
- <?php
94
- echo wp_kses(
95
- quickadsense_get_control(
96
- 'checkbox',
97
- '<b id="quick_adsense_settings_enable_on_tags_label">Tags</b>',
98
- 'quick_adsense_settings_enable_on_tags',
99
- 'quick_adsense_settings[enable_on_tags]',
100
- quick_adsense_get_value( $args, 'enable_on_tags' ),
101
- null,
102
- 'input',
103
- 'margin: -1px 10px 0 15px;'
104
- ),
105
- quick_adsense_get_allowed_html()
106
- );
107
- ?>
108
- </span>
109
- <span>
110
- <?php
111
- echo wp_kses(
112
- quickadsense_get_control(
113
- 'checkbox',
114
- '<b id="quick_adsense_settings_enable_all_possible_ads_label">Place all possible Ads on these pages</b>',
115
- 'quick_adsense_settings_enable_all_possible_ads',
116
- 'quick_adsense_settings[enable_all_possible_ads]',
117
- quick_adsense_get_value( $args, 'enable_all_possible_ads' ),
118
- null,
119
- 'input',
120
- 'margin: -1px 10px 0 35px;'
121
- ),
122
- quick_adsense_get_allowed_html()
123
- );
124
- ?>
125
- </span>
126
- </p>
127
- <p>
128
- <span>
129
- <?php
130
- echo wp_kses(
131
- quickadsense_get_control(
132
- 'checkbox',
133
- '<b id="quick_adsense_settings_disable_widgets_on_homepage_label">Disable AdsWidget on Homepage</b>',
134
- 'quick_adsense_settings_disable_widgets_on_homepage',
135
- 'quick_adsense_settings[disable_widgets_on_homepage]',
136
- quick_adsense_get_value( $args, 'disable_widgets_on_homepage' ),
137
- null,
138
- 'input',
139
- 'margin: -1px 10px 0 0;'
140
- ),
141
- quick_adsense_get_allowed_html()
142
- );
143
- ?>
144
- </span>
145
- </p>
146
- <p>
147
- <span>
148
- <?php
149
- echo wp_kses(
150
- quickadsense_get_control(
151
- 'checkbox',
152
- '<b id="quick_adsense_settings_disable_for_loggedin_users_label">Hide Ads when user is logged in to WordPress</b>',
153
- 'quick_adsense_settings_disable_for_loggedin_users',
154
- 'quick_adsense_settings[disable_for_loggedin_users]',
155
- quick_adsense_get_value( $args, 'disable_for_loggedin_users' ),
156
- null,
157
- 'input',
158
- 'margin: -1px 10px 0 0;'
159
- ),
160
- quick_adsense_get_allowed_html()
161
- );
162
- ?>
163
- </span>
164
- </p>
165
- </div>
166
- <div class="clear"></div>
167
- </div>
1
+ <div class="quick_adsense_block">
2
+ <div class="quick_adsense_block_labels">Appearance</div>
3
+ <div class="quick_adsense_block_controls">
4
+ <p>
5
+ <span>
6
+ <?php
7
+ echo wp_kses(
8
+ quickadsense_get_control(
9
+ 'checkbox',
10
+ '<b id="quick_adsense_settings_enable_on_posts_label">Posts</b>',
11
+ 'quick_adsense_settings_enable_on_posts',
12
+ 'quick_adsense_settings[enable_on_posts]',
13
+ quick_adsense_get_value( $args, 'enable_on_posts' ),
14
+ null,
15
+ 'input',
16
+ 'margin: -1px 10px 0 0;'
17
+ ),
18
+ quick_adsense_get_allowed_html()
19
+ );
20
+ ?>
21
+ </span>
22
+ <span>
23
+ <?php
24
+ echo wp_kses(
25
+ quickadsense_get_control(
26
+ 'checkbox',
27
+ '<b id="quick_adsense_settings_enable_on_pages_label">Pages</b>',
28
+ 'quick_adsense_settings_enable_on_pages',
29
+ 'quick_adsense_settings[enable_on_pages]',
30
+ quick_adsense_get_value( $args, 'enable_on_pages' ),
31
+ null,
32
+ 'input',
33
+ 'margin: -1px 10px 0 15px;'
34
+ ),
35
+ quick_adsense_get_allowed_html()
36
+ );
37
+ ?>
38
+ </span>
39
+ </p>
40
+ <p>
41
+ <span>
42
+ <?php
43
+ echo wp_kses(
44
+ quickadsense_get_control(
45
+ 'checkbox',
46
+ '<b id="quick_adsense_settings_enable_on_homepage_label">Homepage</b>',
47
+ 'quick_adsense_settings_enable_on_homepage',
48
+ 'quick_adsense_settings[enable_on_homepage]',
49
+ quick_adsense_get_value( $args, 'enable_on_homepage' ),
50
+ null,
51
+ 'input',
52
+ 'margin: -1px 10px 0 0;'
53
+ ),
54
+ quick_adsense_get_allowed_html()
55
+ );
56
+ ?>
57
+ </span>
58
+ <span>
59
+ <?php
60
+ echo wp_kses(
61
+ quickadsense_get_control(
62
+ 'checkbox',
63
+ '<b id="quick_adsense_settings_enable_on_categories_label">Categories</b>',
64
+ 'quick_adsense_settings_enable_on_categories',
65
+ 'quick_adsense_settings[enable_on_categories]',
66
+ quick_adsense_get_value( $args, 'enable_on_categories' ),
67
+ null,
68
+ 'input',
69
+ 'margin: -1px 10px 0 15px;'
70
+ ),
71
+ quick_adsense_get_allowed_html()
72
+ );
73
+ ?>
74
+ </span>
75
+ <span>
76
+ <?php
77
+ echo wp_kses(
78
+ quickadsense_get_control(
79
+ 'checkbox',
80
+ '<b id="quick_adsense_settings_enable_on_archives_label">Archives</b>',
81
+ 'quick_adsense_settings_enable_on_archives',
82
+ 'quick_adsense_settings[enable_on_archives]',
83
+ quick_adsense_get_value( $args, 'enable_on_archives' ),
84
+ null,
85
+ 'input',
86
+ 'margin: -1px 10px 0 15px;'
87
+ ),
88
+ quick_adsense_get_allowed_html()
89
+ );
90
+ ?>
91
+ </span>
92
+ <span>
93
+ <?php
94
+ echo wp_kses(
95
+ quickadsense_get_control(
96
+ 'checkbox',
97
+ '<b id="quick_adsense_settings_enable_on_tags_label">Tags</b>',
98
+ 'quick_adsense_settings_enable_on_tags',
99
+ 'quick_adsense_settings[enable_on_tags]',
100
+ quick_adsense_get_value( $args, 'enable_on_tags' ),
101
+ null,
102
+ 'input',
103
+ 'margin: -1px 10px 0 15px;'
104
+ ),
105
+ quick_adsense_get_allowed_html()
106
+ );
107
+ ?>
108
+ </span>
109
+ <span>
110
+ <?php
111
+ echo wp_kses(
112
+ quickadsense_get_control(
113
+ 'checkbox',
114
+ '<b id="quick_adsense_settings_enable_all_possible_ads_label">Place all possible Ads on these pages</b>',
115
+ 'quick_adsense_settings_enable_all_possible_ads',
116
+ 'quick_adsense_settings[enable_all_possible_ads]',
117
+ quick_adsense_get_value( $args, 'enable_all_possible_ads' ),
118
+ null,
119
+ 'input',
120
+ 'margin: -1px 10px 0 35px;'
121
+ ),
122
+ quick_adsense_get_allowed_html()
123
+ );
124
+ ?>
125
+ </span>
126
+ </p>
127
+ <p>
128
+ <span>
129
+ <?php
130
+ echo wp_kses(
131
+ quickadsense_get_control(
132
+ 'checkbox',
133
+ '<b id="quick_adsense_settings_disable_widgets_on_homepage_label">Disable AdsWidget on Homepage</b>',
134
+ 'quick_adsense_settings_disable_widgets_on_homepage',
135
+ 'quick_adsense_settings[disable_widgets_on_homepage]',
136
+ quick_adsense_get_value( $args, 'disable_widgets_on_homepage' ),
137
+ null,
138
+ 'input',
139
+ 'margin: -1px 10px 0 0;'
140
+ ),
141
+ quick_adsense_get_allowed_html()
142
+ );
143
+ ?>
144
+ </span>
145
+ </p>
146
+ <p>
147
+ <span>
148
+ <?php
149
+ echo wp_kses(
150
+ quickadsense_get_control(
151
+ 'checkbox',
152
+ '<b id="quick_adsense_settings_disable_for_loggedin_users_label">Hide Ads when user is logged in to WordPress</b>',
153
+ 'quick_adsense_settings_disable_for_loggedin_users',
154
+ 'quick_adsense_settings[disable_for_loggedin_users]',
155
+ quick_adsense_get_value( $args, 'disable_for_loggedin_users' ),
156
+ null,
157
+ 'input',
158
+ 'margin: -1px 10px 0 0;'
159
+ ),
160
+ quick_adsense_get_allowed_html()
161
+ );
162
+ ?>
163
+ </span>
164
+ </p>
165
+ </div>
166
+ <div class="clear"></div>
167
+ </div>
includes/templates/block-general-quicktag.php CHANGED
@@ -1,91 +1,91 @@
1
- <div class="quick_adsense_block">
2
- <div class="quick_adsense_block_labels">Quicktag</div>
3
- <div class="quick_adsense_block_controls">
4
- <p>
5
- <?php
6
- echo wp_kses(
7
- quickadsense_get_control(
8
- 'checkbox',
9
- '<b>Show Quicktag Buttons on the HTML Edit Post SubPanel</b>',
10
- 'quick_adsense_settings_enable_quicktag_buttons',
11
- 'quick_adsense_settings[enable_quicktag_buttons]',
12
- quick_adsense_get_value( $args, 'enable_quicktag_buttons' ),
13
- null,
14
- 'input',
15
- 'margin: -1px 10px 0 0;'
16
- ),
17
- quick_adsense_get_allowed_html()
18
- );
19
- ?>
20
- </p>
21
- <p>
22
- <?php
23
- echo wp_kses(
24
- quickadsense_get_control(
25
- 'checkbox',
26
- 'Hide <b>&lt;!--RndAds--&gt;</b> from Quicktag Buttons',
27
- 'quick_adsense_settings_disable_randomads_quicktag_button',
28
- 'quick_adsense_settings[disable_randomads_quicktag_button]',
29
- quick_adsense_get_value( $args, 'disable_randomads_quicktag_button' ),
30
- null,
31
- 'input',
32
- 'margin: -1px 10px 0 0;'
33
- ),
34
- quick_adsense_get_allowed_html()
35
- );
36
- ?>
37
- </p>
38
- <p>
39
- <?php
40
- echo wp_kses(
41
- quickadsense_get_control(
42
- 'checkbox',
43
- 'Hide <b>&lt;!--NoAds--&gt;</b>, <b>&lt;!--OffDef--&gt;</b>, <b>&lt;!--OffWidget--&gt;</b> from Quicktag Buttons',
44
- 'quick_adsense_settings_disable_disablead_quicktag_buttons',
45
- 'quick_adsense_settings[disable_disablead_quicktag_buttons]',
46
- quick_adsense_get_value( $args, 'disable_disablead_quicktag_buttons' ),
47
- null,
48
- 'input',
49
- 'margin: -1px 10px 0 0;'
50
- ),
51
- quick_adsense_get_allowed_html()
52
- );
53
- ?>
54
- </p>
55
- <p>
56
- <?php
57
- echo wp_kses(
58
- quickadsense_get_control(
59
- 'checkbox',
60
- 'Hide <b>&lt;!--OffBegin--&gt;</b>, <b>&lt;!--OffMiddle--&gt;</b>, <b>&lt;!--OffEnd--&gt;</b>, <b>&lt;!--OffAfMore--&gt;</b>, <b>&lt;!--OffBfLastPara--&gt;</b> from Quicktag Buttons',
61
- 'quick_adsense_settings_disable_positionad_quicktag_buttons',
62
- 'quick_adsense_settings[disable_positionad_quicktag_buttons]',
63
- quick_adsense_get_value( $args, 'disable_positionad_quicktag_buttons' ),
64
- null,
65
- 'input',
66
- 'margin: -1px 10px 0 0;'
67
- ),
68
- quick_adsense_get_allowed_html()
69
- );
70
- ?>
71
- </p>
72
- <div class="clear"></div>
73
- Insert Ads into a post, on-the-fly:
74
- <ol>
75
- <li>Insert <b>&lt;!--Ads1--&gt;</b>, <b>&lt;!--Ads2--&gt;</b> etc. into a post to show the <b>Particular Ads</b> at specific location.</li>
76
- <li>Insert <b>&lt;!--RndAds--&gt;</b> (or more) into a post to show the <b>Random Ads</b> at specific location.</li>
77
- </ol>
78
- <div class="clear"></div>
79
- Disable Ads in a post, on-the-fly:
80
- <ol>
81
- <li>Insert <b>&lt;!--NoAds--&gt;</b> to disable all Ads in a post <i>(does not affect Ads on Sidebar)</i>.</li>
82
- <li>Insert <b>&lt;!--OffDef--&gt;</b> to disable the default positioned Ads, and use &lt;!--Ads1--&gt;, &lt;!--Ads2--&gt;, etc. to insert Ad <i>(does not affect Ads on Sidebar)</i>.</li>
83
- <li>Insert <b>&lt;!--OffWidget--&gt;</b> to disable all Ads on Sidebar.</li>
84
- <li>Insert <b>&lt;!--OffBegin--&gt;</b>, <b>&lt;!--OffMiddle--&gt;</b>, <b>&lt;!--OffEnd--&gt;</b> to <b>disable Ads at Beginning</b>, <b>Middle or End of Post</b>.</li>
85
- <li>Insert <b>&lt;!--OffAfMore--&gt;</b>, <b>&lt;!--OffBfLastPara--&gt;</b> to <b>disable Ads right after the &lt;!--more--&gt; tag</b>, or <b>right before the last Paragraph</b>.</li>
86
- </ol>
87
- <div class="clear"></div>
88
- <i>Tags can be inserted into a post via the additional Quicktag Buttons at the HTML Edit Post SubPanel.</i>
89
- </div>
90
- <div class="clear"></div>
91
- </div>
1
+ <div class="quick_adsense_block">
2
+ <div class="quick_adsense_block_labels">Quicktag</div>
3
+ <div class="quick_adsense_block_controls">
4
+ <p>
5
+ <?php
6
+ echo wp_kses(
7
+ quickadsense_get_control(
8
+ 'checkbox',
9
+ '<b>Show Quicktag Buttons on the HTML Edit Post SubPanel (Classic Editor)</b>',
10
+ 'quick_adsense_settings_enable_quicktag_buttons',
11
+ 'quick_adsense_settings[enable_quicktag_buttons]',
12
+ quick_adsense_get_value( $args, 'enable_quicktag_buttons' ),
13
+ null,
14
+ 'input',
15
+ 'margin: -1px 10px 0 0;'
16
+ ),
17
+ quick_adsense_get_allowed_html()
18
+ );
19
+ ?>
20
+ </p>
21
+ <p>
22
+ <?php
23
+ echo wp_kses(
24
+ quickadsense_get_control(
25
+ 'checkbox',
26
+ 'Hide <b>&lt;!--RndAds--&gt;</b> from Quicktag Buttons',
27
+ 'quick_adsense_settings_disable_randomads_quicktag_button',
28
+ 'quick_adsense_settings[disable_randomads_quicktag_button]',
29
+ quick_adsense_get_value( $args, 'disable_randomads_quicktag_button' ),
30
+ null,
31
+ 'input',
32
+ 'margin: -1px 10px 0 0;'
33
+ ),
34
+ quick_adsense_get_allowed_html()
35
+ );
36
+ ?>
37
+ </p>
38
+ <p>
39
+ <?php
40
+ echo wp_kses(
41
+ quickadsense_get_control(
42
+ 'checkbox',
43
+ 'Hide <b>&lt;!--NoAds--&gt;</b>, <b>&lt;!--OffDef--&gt;</b>, <b>&lt;!--OffWidget--&gt;</b> from Quicktag Buttons',
44
+ 'quick_adsense_settings_disable_disablead_quicktag_buttons',
45
+ 'quick_adsense_settings[disable_disablead_quicktag_buttons]',
46
+ quick_adsense_get_value( $args, 'disable_disablead_quicktag_buttons' ),
47
+ null,
48
+ 'input',
49
+ 'margin: -1px 10px 0 0;'
50
+ ),
51
+ quick_adsense_get_allowed_html()
52
+ );
53
+ ?>
54
+ </p>
55
+ <p>
56
+ <?php
57
+ echo wp_kses(
58
+ quickadsense_get_control(
59
+ 'checkbox',
60
+ 'Hide <b>&lt;!--OffBegin--&gt;</b>, <b>&lt;!--OffMiddle--&gt;</b>, <b>&lt;!--OffEnd--&gt;</b>, <b>&lt;!--OffAfMore--&gt;</b>, <b>&lt;!--OffBfLastPara--&gt;</b> from Quicktag Buttons',
61
+ 'quick_adsense_settings_disable_positionad_quicktag_buttons',
62
+ 'quick_adsense_settings[disable_positionad_quicktag_buttons]',
63
+ quick_adsense_get_value( $args, 'disable_positionad_quicktag_buttons' ),
64
+ null,
65
+ 'input',
66
+ 'margin: -1px 10px 0 0;'
67
+ ),
68
+ quick_adsense_get_allowed_html()
69
+ );
70
+ ?>
71
+ </p>
72
+ <div class="clear"></div>
73
+ Insert Ads into a post, on-the-fly:
74
+ <ol>
75
+ <li>Insert <b>&lt;!--Ads1--&gt;</b>, <b>&lt;!--Ads2--&gt;</b> etc. into a post to show the <b>Particular Ads</b> at specific location.</li>
76
+ <li>Insert <b>&lt;!--RndAds--&gt;</b> (or more) into a post to show the <b>Random Ads</b> at specific location.</li>
77
+ </ol>
78
+ <div class="clear"></div>
79
+ Disable Ads in a post, on-the-fly:
80
+ <ol>
81
+ <li>Insert <b>&lt;!--NoAds--&gt;</b> to disable all Ads in a post <i>(does not affect Ads on Sidebar)</i>.</li>
82
+ <li>Insert <b>&lt;!--OffDef--&gt;</b> to disable the default positioned Ads, and use &lt;!--Ads1--&gt;, &lt;!--Ads2--&gt;, etc. to insert Ad <i>(does not affect Ads on Sidebar)</i>.</li>
83
+ <li>Insert <b>&lt;!--OffWidget--&gt;</b> to disable all Ads on Sidebar.</li>
84
+ <li>Insert <b>&lt;!--OffBegin--&gt;</b>, <b>&lt;!--OffMiddle--&gt;</b>, <b>&lt;!--OffEnd--&gt;</b> to <b>disable Ads at Beginning</b>, <b>Middle or End of Post</b>.</li>
85
+ <li>Insert <b>&lt;!--OffAfMore--&gt;</b>, <b>&lt;!--OffBfLastPara--&gt;</b> to <b>disable Ads right after the &lt;!--more--&gt; tag</b>, or <b>right before the last Paragraph</b>.</li>
86
+ </ol>
87
+ <div class="clear"></div>
88
+ <i>Tags can be inserted into a post via the additional Quicktag Buttons at the HTML Edit Post SubPanel.</i>
89
+ </div>
90
+ <div class="clear"></div>
91
+ </div>
includes/templates/js/quicktags.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php foreach ( $args['active_ads'] as $adtive_ad_index ) { ?>
2
+ QTags.addButton("quick_adsense_quicktag_onpost_ad_<?php echo esc_js( $adtive_ad_index ); ?>", "Ads<?php echo esc_js( $adtive_ad_index ); ?>", "\n<!--Ads<?php echo esc_js( $adtive_ad_index ); ?>-->\n", "", "", "Ads<?php echo esc_js( $adtive_ad_index ); ?>", 201);
3
+ <?php } ?>
4
+ <?php if ( $args['enable_randomads'] ) { ?>
5
+ QTags.addButton("quick_adsense_quicktag_randomads", "RndAds", "\n<!--RndAds-->\n", "", "", "Random Ads", 201);
6
+ <?php } ?>
7
+ <?php if ( $args['enable_disableads'] ) { ?>
8
+ QTags.addButton("quick_adsense_quicktag_noads", "NoAds", "\n<!--NoAds-->\n", "", "", "No Ads", 201);
9
+ QTags.addButton("quick_adsense_quicktag_offdef", "OffDef", "\n<!--OffDef-->\n", "", "", "No Def", 201);
10
+ QTags.addButton("quick_adsense_quicktag_offwidget", "OffWidget", "\n<!--OffWidget-->\n", "", "", "No AdWidgets", 201);
11
+ <?php } ?>
12
+ <?php if ( $args['enable_positionads'] ) { ?>
13
+ QTags.addButton("quick_adsense_quicktag_offbegin", "OffBegin", "\n<!--OffBegin-->\n", "", "", "Disable Beginning of Post Ads", 201);
14
+ QTags.addButton("quick_adsense_quicktag_offmiddle", "OffMiddle", "\n<!--OffMiddle-->\n", "", "", "Disable Middle of Post Ads", 201);
15
+ QTags.addButton("quick_adsense_quicktag_offend", "OffEnd", "\n<!--OffEnd-->\n", "", "", "Disable End of Post Ads", 201);
16
+ QTags.addButton("quick_adsense_quicktag_offafmore", "OffAfMore", "\n<!--OffAfMore-->\n", "", "", "OffAfMore", 201);
17
+ QTags.addButton("quick_adsense_quicktag_offbflastpara", "OffBfLastPara", "\n<!--OffBfLastPara-->\n", "", "", "OffBfLastPara", 201);
18
+ <?php } ?>
includes/templates/js/script-admin-notice.php CHANGED
@@ -1,7 +1,13 @@
1
- jQuery(document).ready(function() {
2
- jQuery('.quick_adsense_adstxt_adsense_notice').on('click', '.notice-dismiss', function() {
3
- wp.ajax.post('quick_adsense_adstxt_adsense_admin_notice_dismiss', {
4
- nonce: quick_adsense_adstxt_adsense.nonce,
5
- });
6
- });
7
- });
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file contains the javascript code to handle admin notice related functions.
4
+ */
5
+
6
+ ?>
7
+ jQuery(document).ready(function() {
8
+ jQuery('.quick_adsense_adstxt_adsense_notice').on('click', '.notice-dismiss', function() {
9
+ wp.ajax.post('quick_adsense_adstxt_adsense_admin_notice_dismiss', {
10
+ nonce: quick_adsense_adstxt_adsense.nonce,
11
+ });
12
+ });
13
+ });
includes/templates/js/script-frontend-stats.php CHANGED
@@ -1,11 +1,17 @@
1
- jQuery(document).ready(function() {
2
- jQuery(".<?php echo esc_js( quick_adsense_get_value( $args, 'target' ) ); ?>").click(function() {
3
- jQuery.post(
4
- "<?php echo esc_js( quick_adsense_get_value( $args, 'ajax_url' ) ); ?>", {
5
- "action": "quick_adsense_onpost_ad_click",
6
- "quick_adsense_onpost_ad_index": jQuery(this).attr("data-index"),
7
- "quick_adsense_nonce": "<?php echo esc_js( quick_adsense_get_value( $args, 'nonce' ) ); ?>",
8
- }, function(response) { }
9
- );
10
- });
11
- });
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file contains the javascript code for stat collection related functions.
4
+ */
5
+
6
+ ?>
7
+ jQuery(document).ready(function() {
8
+ jQuery(".<?php echo esc_js( quick_adsense_get_value( $args, 'target' ) ); ?>").click(function() {
9
+ jQuery.post(
10
+ "<?php echo esc_js( quick_adsense_get_value( $args, 'ajax_url' ) ); ?>", {
11
+ "action": "quick_adsense_onpost_ad_click",
12
+ "quick_adsense_onpost_ad_index": jQuery(this).attr("data-index"),
13
+ "quick_adsense_nonce": "<?php echo esc_js( quick_adsense_get_value( $args, 'nonce' ) ); ?>",
14
+ }, function(response) { }
15
+ );
16
+ });
17
+ });
includes/templates/page-settings.php CHANGED
@@ -1,32 +1,32 @@
1
- <div class="wrap">
2
- <h2 id="quick_adsense_title">Quick Adsense Settings <span style="font-size: 14px;">(Version 2.8)</span></h2>
3
- <form id="quick_adsense_settings_form" method="post" action="options.php" name="wp_auto_commenter_form" style="display: none;">
4
- <?php settings_fields( 'quick_adsense_settings' ); ?>
5
- <div id="quick_adsense_settings_tabs">
6
- <ul>
7
- <li><a href="#tabs-settings">Settings</a></li>
8
- <li><a href="#tabs-post-body-ads">Ads on Post Body</a></li>
9
- <li><a href="#tabs-sidebar-widget-ads">Sidebar Widget</a></li>
10
- <li><a href="#tabs-header-footer-codes">Header / Footer Codes</a></li>
11
- </ul>
12
- <div id="tabs-settings">
13
- <div id="quick_adsense_top_sections_wrapper">
14
- <?php do_settings_sections( 'quick-adsense-general' ); ?>
15
- </div>
16
- <?php submit_button( 'Save Changes' ); ?>
17
- </div>
18
- <div id="tabs-post-body-ads">
19
- <?php do_settings_sections( 'quick-adsense-onpost' ); ?>
20
- <?php submit_button( 'Save Changes' ); ?>
21
- </div>
22
- <div id="tabs-sidebar-widget-ads">
23
- <?php do_settings_sections( 'quick-adsense-widgets' ); ?>
24
- <?php submit_button( 'Save Changes' ); ?>
25
- </div>
26
- <div id="tabs-header-footer-codes">
27
- <?php do_settings_sections( 'quick-adsense-header-footer-codes' ); ?>
28
- <?php submit_button( 'Save Changes' ); ?>
29
- </div>
30
- </div>
31
- </form>
32
- </div>
1
+ <div class="wrap">
2
+ <h2 id="quick_adsense_title">Quick Adsense Settings <span style="font-size: 14px;">(Version 2.8)</span></h2>
3
+ <form id="quick_adsense_settings_form" method="post" action="options.php" name="wp_auto_commenter_form" style="display: none;">
4
+ <?php settings_fields( 'quick_adsense_settings' ); ?>
5
+ <div id="quick_adsense_settings_tabs">
6
+ <ul>
7
+ <li><a href="#tabs-settings">Settings</a></li>
8
+ <li><a href="#tabs-post-body-ads">Ads on Post Body</a></li>
9
+ <li><a href="#tabs-sidebar-widget-ads">Sidebar Widget</a></li>
10
+ <li><a href="#tabs-header-footer-codes">Header / Footer Codes</a></li>
11
+ </ul>
12
+ <div id="tabs-settings">
13
+ <div id="quick_adsense_top_sections_wrapper">
14
+ <?php do_settings_sections( 'quick-adsense-general' ); ?>
15
+ </div>
16
+ <?php submit_button( 'Save Changes' ); ?>
17
+ </div>
18
+ <div id="tabs-post-body-ads">
19
+ <?php do_settings_sections( 'quick-adsense-onpost' ); ?>
20
+ <?php submit_button( 'Save Changes' ); ?>
21
+ </div>
22
+ <div id="tabs-sidebar-widget-ads">
23
+ <?php do_settings_sections( 'quick-adsense-widgets' ); ?>
24
+ <?php submit_button( 'Save Changes' ); ?>
25
+ </div>
26
+ <div id="tabs-header-footer-codes">
27
+ <?php do_settings_sections( 'quick-adsense-header-footer-codes' ); ?>
28
+ <?php submit_button( 'Save Changes' ); ?>
29
+ </div>
30
+ </div>
31
+ </form>
32
+ </div>
includes/templates/section-general.php CHANGED
@@ -1,13 +1,15 @@
1
- <div class="quick_adsense_block">
2
- <div class="quick_adsense_block_labels"><span>Options</span></div>
3
- <div class="quick_adsense_block_controls">
4
- <a id="quick_adsense_settings_reset_to_default" href="javascript:;">Reset to Default Settings</a>
5
- </div>
6
- <div class="clear"></div>
7
- </div>
8
- <?php
9
- quick_adsense_load_file( 'templates/block-general-adsense.php', $args, true );
10
- quick_adsense_load_file( 'templates/block-general-appearance.php', $args, true );
11
- quick_adsense_load_file( 'templates/block-general-assign-position.php', $args, true );
12
- quick_adsense_load_file( 'templates/block-general-quicktag.php', $args, true );
13
- ?>
 
 
1
+ <div class="quick_adsense_block">
2
+ <div class="quick_adsense_block_labels"><span>Options</span></div>
3
+ <div class="quick_adsense_block_controls">
4
+ <a id="quick_adsense_settings_reset_to_default" href="javascript:;">Reset to Default Settings</a>
5
+ </div>
6
+ <div class="clear"></div>
7
+ </div>
8
+ <?php
9
+ quick_adsense_load_file( 'templates/block-general-adsense.php', $args, true );
10
+ quick_adsense_load_file( 'templates/block-general-appearance.php', $args, true );
11
+ quick_adsense_load_file( 'templates/block-general-assign-position.php', $args, true );
12
+ if ( function_exists( 'is_plugin_active' ) && is_plugin_active( 'classic-editor/classic-editor.php' ) ) {
13
+ quick_adsense_load_file( 'templates/block-general-quicktag.php', $args, true );
14
+ }
15
+ ?>
includes/templates/section-header-footer.php CHANGED
@@ -3,32 +3,32 @@
3
  <label>Header Embed Code</label>
4
  <div>
5
  <?php
6
- echo wp_kses(
7
- quickadsense_get_control(
8
- 'textarea-big',
9
- '',
10
- 'quick_adsense_settings_header_embed_code',
11
- 'quick_adsense_settings[header_embed_code]',
12
- quick_adsense_get_value( $args, 'header_embed_code' )
13
- ),
14
- quick_adsense_get_allowed_html()
15
  );
 
16
  ?>
17
  </div>
18
  <div class="clear"></div>
19
  <label>Footer Embed Code</label>
20
  <div>
21
  <?php
22
- echo wp_kses(
23
- quickadsense_get_control(
24
- 'textarea-big',
25
- '',
26
- 'quick_adsense_settings_footer_embed_code',
27
- 'quick_adsense_settings[footer_embed_code]',
28
- quick_adsense_get_value( $args, 'footer_embed_code' )
29
- ),
30
- quick_adsense_get_allowed_html()
31
  );
 
32
  ?>
33
  </div>
34
  <div class="clear"></div>
3
  <label>Header Embed Code</label>
4
  <div>
5
  <?php
6
+ // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
7
+ // This textarea needs to allow output of scripts, iframes etc necessary to output ads and trackers.
8
+ echo quickadsense_get_control(
9
+ 'textarea-big',
10
+ '',
11
+ 'quick_adsense_settings_header_embed_code',
12
+ 'quick_adsense_settings[header_embed_code]',
13
+ quick_adsense_get_value( $args, 'header_embed_code' )
 
14
  );
15
+ // phpcs:enable
16
  ?>
17
  </div>
18
  <div class="clear"></div>
19
  <label>Footer Embed Code</label>
20
  <div>
21
  <?php
22
+ // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
23
+ // This textarea needs to allow output of scripts, iframes etc necessary to output ads and trackers.
24
+ echo quickadsense_get_control(
25
+ 'textarea-big',
26
+ '',
27
+ 'quick_adsense_settings_footer_embed_code',
28
+ 'quick_adsense_settings[footer_embed_code]',
29
+ quick_adsense_get_value( $args, 'footer_embed_code' )
 
30
  );
31
+ // phpcs:enable
32
  ?>
33
  </div>
34
  <div class="clear"></div>
includes/templates/section-onpost-content.php CHANGED
@@ -1,85 +1,91 @@
1
- <div id="quick_adsense_block_bottom" class="quick_adsense_block" style="margin: 30px 0 0;">
2
- <div class="quick_adsense_block_labels" style="width: auto;">
3
- <span>Adsense Codes - Ads on Post Body</span>
4
- </div>
5
- <div class="clear"></div>
6
- <p>Paste up to 10 Ads codes on Post Body as assigned above. Ads codes provided must not be identical, repeated codes may result the Ads not being display correctly. Ads will never displays more than once in a page.</p>
7
- </div>
8
-
9
- <div id="quick_adsense_onpost_content_controls_wrapper">
10
- <div id="quick_adsense_onpost_content_global_controls_wrapper">
11
- <p class="quick_adsense_onpost_adunits_styling_controls">
12
- <?php
13
- echo wp_kses(
14
- quickadsense_get_control(
15
- 'checkbox',
16
- '',
17
- 'quick_adsense_settings_onpost_enable_global_style',
18
- 'quick_adsense_settings[onpost_enable_global_style]',
19
- quick_adsense_get_value( $args, 'onpost_enable_global_style' ),
20
- null,
21
- 'input',
22
- 'margin: -3px 10px 0 0;'
23
- ),
24
- quick_adsense_get_allowed_html()
25
- );
26
- ?>
27
- <span>Use for all</span>
28
- <wbr />Alignment
29
- <?php
30
- echo wp_kses(
31
- quickadsense_get_control(
32
- 'select',
33
- '',
34
- 'quick_adsense_settings_onpost_global_alignment',
35
- 'quick_adsense_settings[onpost_global_alignment]',
36
- quick_adsense_get_value( $args, 'onpost_global_alignment' ),
37
- quick_adsense_get_value( $args, 'alignment_options' ),
38
- 'input',
39
- 'margin: -6px 20px 0 10px; width: 73px;'
40
- ),
41
- quick_adsense_get_allowed_html()
42
- );
43
- ?>
44
- <wbr />margin
45
- <?php
46
- echo wp_kses(
47
- quickadsense_get_control(
48
- 'number',
49
- '',
50
- 'quick_adsense_settings_onpost_global_margin',
51
- 'quick_adsense_settings[onpost_global_margin]',
52
- quick_adsense_get_value( $args, 'onpost_global_margin' ),
53
- null,
54
- 'input',
55
- 'margin: -1px 10px 0 10px; width: 62px;'
56
- ),
57
- quick_adsense_get_allowed_html()
58
- );
59
- ?>
60
- px
61
- </p>
62
- </div>
63
-
64
- <div id="quick_adsense_onpost_content_adunits_wrapper">
65
- <div id="quick_adsense_onpost_content_adunits_initial_wrapper">
66
- <?php
67
- for ( $i = 1; $i <= 3; $i++ ) {
68
- $args['adunit_index'] = $i;
69
- quick_adsense_load_file( 'templates/adunit-onpost.php', $args, true );
70
- }
71
- ?>
72
- </div>
73
- <div id="quick_adsense_onpost_content_adunits_all_wrapper" style="display: none;">
74
- <?php
75
- for ( $i = 4; $i <= 10; $i++ ) {
76
- $args['adunit_index'] = $i;
77
- quick_adsense_load_file( 'templates/adunit-onpost.php', $args, true );
78
- }
79
- ?>
80
- </div>
81
- <a id="quick_adsense_onpost_content_adunits_showall_button" class="input button-secondary">
82
- <span class="dashicons dashicons-arrow-down"></span> <b>Show All</b>
83
- </a>
84
- </div>
85
- </div>
 
 
 
 
 
 
1
+ <div id="quick_adsense_block_bottom" class="quick_adsense_block" style="margin: 30px 0 0;">
2
+ <div class="quick_adsense_block_labels" style="width: auto;">
3
+ <span>Adsense Codes - Ads on Post Body</span>
4
+ </div>
5
+ <div class="clear"></div>
6
+ <p>Paste up to 10 Ads codes on Post Body as assigned above. Ads codes provided must not be identical, repeated codes may result the Ads not being display correctly. Ads will never displays more than once in a page.</p>
7
+ </div>
8
+
9
+ <div id="quick_adsense_onpost_content_controls_wrapper">
10
+ <div id="quick_adsense_onpost_content_global_controls_wrapper">
11
+ <p class="quick_adsense_onpost_adunits_styling_controls">
12
+ <?php
13
+ echo wp_kses(
14
+ quickadsense_get_control(
15
+ 'checkbox',
16
+ '',
17
+ 'quick_adsense_settings_onpost_enable_global_style',
18
+ 'quick_adsense_settings[onpost_enable_global_style]',
19
+ quick_adsense_get_value( $args, 'onpost_enable_global_style' ),
20
+ null,
21
+ 'input',
22
+ 'margin: -3px 10px 0 0;'
23
+ ),
24
+ quick_adsense_get_allowed_html()
25
+ );
26
+ ?>
27
+ <span>Use for all</span>
28
+ <wbr />Alignment
29
+ <?php
30
+ echo wp_kses(
31
+ quickadsense_get_control(
32
+ 'select',
33
+ '',
34
+ 'quick_adsense_settings_onpost_global_alignment',
35
+ 'quick_adsense_settings[onpost_global_alignment]',
36
+ quick_adsense_get_value( $args, 'onpost_global_alignment' ),
37
+ quick_adsense_get_value( $args, 'alignment_options' ),
38
+ 'input',
39
+ 'margin: -6px 20px 0 10px; width: 73px;'
40
+ ),
41
+ quick_adsense_get_allowed_html()
42
+ );
43
+ ?>
44
+ <wbr />margin
45
+ <?php
46
+ echo wp_kses(
47
+ quickadsense_get_control(
48
+ 'number',
49
+ '',
50
+ 'quick_adsense_settings_onpost_global_margin',
51
+ 'quick_adsense_settings[onpost_global_margin]',
52
+ quick_adsense_get_value( $args, 'onpost_global_margin' ),
53
+ null,
54
+ 'input',
55
+ 'margin: -1px 10px 0 10px; width: 62px;'
56
+ ),
57
+ quick_adsense_get_allowed_html()
58
+ );
59
+ ?>
60
+ px
61
+ </p>
62
+ </div>
63
+
64
+ <div id="quick_adsense_onpost_content_adunits_wrapper">
65
+ <div id="quick_adsense_onpost_content_adunits_initial_wrapper">
66
+ <?php
67
+ for ( $i = 1; $i <= 3; $i++ ) {
68
+ $args['adunit_index'] = $i;
69
+ // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
70
+ // Contains a textarea which need to allow output of scripts, iframes etc necessary to output ads and trackers.
71
+ echo quick_adsense_load_file( 'templates/adunit-onpost.php', $args );
72
+ // phpcs:enable
73
+ }
74
+ ?>
75
+ </div>
76
+ <div id="quick_adsense_onpost_content_adunits_all_wrapper" style="display: none;">
77
+ <?php
78
+ for ( $i = 4; $i <= 10; $i++ ) {
79
+ $args['adunit_index'] = $i;
80
+ // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
81
+ // Contains a textarea which need to allow output of scripts, iframes etc necessary to output ads and trackers.
82
+ echo quick_adsense_load_file( 'templates/adunit-onpost.php', $args );
83
+ // phpcs:enable
84
+ }
85
+ ?>
86
+ </div>
87
+ <a id="quick_adsense_onpost_content_adunits_showall_button" class="input button-secondary">
88
+ <span class="dashicons dashicons-arrow-down"></span> <b>Show All</b>
89
+ </a>
90
+ </div>
91
+ </div>
includes/templates/section-widgets.php CHANGED
@@ -1,83 +1,89 @@
1
- <div id="quick_adsense_block_bottom" class="quick_adsense_block" style="margin: 30px 0 0;">
2
- <div class="quick_adsense_block_labels" style="width: auto;">
3
- <span>Adsense Codes - <a href="<?php echo esc_url( admin_url( 'widgets.php' ) ); ?>">Sidebar WIdget</a></span>
4
- </div>
5
- <div class="clear"></div>
6
- <p>Paste up to 10 Ads codes on Sidebar Widget. Ads codes provided must not be identical, repeated codes may result the Ads not being display correctly. Ads will never displays more than once in a page.</p>
7
- </div>
8
-
9
- <div id="quick_adsense_widget_controls_wrapper">
10
- <div id="quick_adsense_widget_global_controls_wrapper" style="visibility: hidden;">
11
- <p class="quick_adsense_widget_adunits_styling_controls">
12
- <?php
13
- echo wp_kses(
14
- quickadsense_get_control(
15
- 'checkbox',
16
- '',
17
- 'quick_adsense_settings_widget_enable_global_style',
18
- 'quick_adsense_settings[widget_enable_global_style]',
19
- quick_adsense_get_value( $args, 'widget_enable_global_style' ),
20
- null,
21
- 'input',
22
- 'margin: -3px 10px 0 0;'
23
- ),
24
- quick_adsense_get_allowed_html()
25
- );
26
- ?>
27
- <span>Use for all</span>
28
- <wbr />Alignment
29
- <?php
30
- echo wp_kses(
31
- quickadsense_get_control(
32
- 'select',
33
- '',
34
- 'quick_adsense_settings_widget_global_alignment',
35
- 'quick_adsense_settings[widget_global_alignment]',
36
- quick_adsense_get_value( $args, 'widget_global_alignment' ),
37
- quick_adsense_get_value( $args, 'alignment_options' ),
38
- 'input',
39
- 'margin: -6px 20px 0 10px; width: 73px;'
40
- ),
41
- quick_adsense_get_allowed_html()
42
- );
43
- ?>
44
- <wbr />margin
45
- <?php
46
- echo wp_kses(
47
- quickadsense_get_control(
48
- 'number',
49
- '',
50
- 'quick_adsense_settings_widget_global_margin',
51
- 'quick_adsense_settings[widget_global_margin]',
52
- quick_adsense_get_value( $args, 'widget_global_margin' ),
53
- null,
54
- 'input',
55
- 'margin: -1px 10px 0 10px; width: 62px;'
56
- ),
57
- quick_adsense_get_allowed_html()
58
- );
59
- ?>
60
- px
61
- </p>
62
- </div>
63
-
64
- <div id="quick_adsense_widget_adunits_wrapper">
65
- <div id="quick_adsense_widget_adunits_initial_wrapper">
66
- <?php
67
- for ( $i = 1; $i <= 3; $i++ ) {
68
- $args['adunit_index'] = $i;
69
- quick_adsense_load_file( 'templates/adunit-widget.php', $args, true );
70
- }
71
- ?>
72
- </div>
73
- <div id="quick_adsense_widget_adunits_all_wrapper" style="display: none;">
74
- <?php
75
- for ( $i = 4; $i <= 10; $i++ ) {
76
- $args['adunit_index'] = $i;
77
- quick_adsense_load_file( 'templates/adunit-widget.php', $args, true );
78
- }
79
- ?>
80
- </div>
81
- <a id="quick_adsense_widget_adunits_showall_button" class="input button-secondary"><span class="dashicons dashicons-arrow-down"></span> <b>Show All</b></a>
82
- </div>
83
- </div>
 
 
 
 
 
 
1
+ <div id="quick_adsense_block_bottom" class="quick_adsense_block" style="margin: 30px 0 0;">
2
+ <div class="quick_adsense_block_labels" style="width: auto;">
3
+ <span>Adsense Codes - <a href="<?php echo esc_url( admin_url( 'widgets.php' ) ); ?>">Sidebar WIdget</a></span>
4
+ </div>
5
+ <div class="clear"></div>
6
+ <p>Paste up to 10 Ads codes on Sidebar Widget. Ads codes provided must not be identical, repeated codes may result the Ads not being display correctly. Ads will never displays more than once in a page.</p>
7
+ </div>
8
+
9
+ <div id="quick_adsense_widget_controls_wrapper">
10
+ <div id="quick_adsense_widget_global_controls_wrapper" style="visibility: hidden;">
11
+ <p class="quick_adsense_widget_adunits_styling_controls">
12
+ <?php
13
+ echo wp_kses(
14
+ quickadsense_get_control(
15
+ 'checkbox',
16
+ '',
17
+ 'quick_adsense_settings_widget_enable_global_style',
18
+ 'quick_adsense_settings[widget_enable_global_style]',
19
+ quick_adsense_get_value( $args, 'widget_enable_global_style' ),
20
+ null,
21
+ 'input',
22
+ 'margin: -3px 10px 0 0;'
23
+ ),
24
+ quick_adsense_get_allowed_html()
25
+ );
26
+ ?>
27
+ <span>Use for all</span>
28
+ <wbr />Alignment
29
+ <?php
30
+ echo wp_kses(
31
+ quickadsense_get_control(
32
+ 'select',
33
+ '',
34
+ 'quick_adsense_settings_widget_global_alignment',
35
+ 'quick_adsense_settings[widget_global_alignment]',
36
+ quick_adsense_get_value( $args, 'widget_global_alignment' ),
37
+ quick_adsense_get_value( $args, 'alignment_options' ),
38
+ 'input',
39
+ 'margin: -6px 20px 0 10px; width: 73px;'
40
+ ),
41
+ quick_adsense_get_allowed_html()
42
+ );
43
+ ?>
44
+ <wbr />margin
45
+ <?php
46
+ echo wp_kses(
47
+ quickadsense_get_control(
48
+ 'number',
49
+ '',
50
+ 'quick_adsense_settings_widget_global_margin',
51
+ 'quick_adsense_settings[widget_global_margin]',
52
+ quick_adsense_get_value( $args, 'widget_global_margin' ),
53
+ null,
54
+ 'input',
55
+ 'margin: -1px 10px 0 10px; width: 62px;'
56
+ ),
57
+ quick_adsense_get_allowed_html()
58
+ );
59
+ ?>
60
+ px
61
+ </p>
62
+ </div>
63
+
64
+ <div id="quick_adsense_widget_adunits_wrapper">
65
+ <div id="quick_adsense_widget_adunits_initial_wrapper">
66
+ <?php
67
+ for ( $i = 1; $i <= 3; $i++ ) {
68
+ $args['adunit_index'] = $i;
69
+ // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
70
+ // Contains a textarea which need to allow output of scripts, iframes etc necessary to output ads and trackers.
71
+ echo quick_adsense_load_file( 'templates/adunit-widget.php', $args );
72
+ // phpcs:enable
73
+ }
74
+ ?>
75
+ </div>
76
+ <div id="quick_adsense_widget_adunits_all_wrapper" style="display: none;">
77
+ <?php
78
+ for ( $i = 4; $i <= 10; $i++ ) {
79
+ $args['adunit_index'] = $i;
80
+ // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
81
+ // Contains a textarea which need to allow output of scripts, iframes etc necessary to output ads and trackers.
82
+ echo quick_adsense_load_file( 'templates/adunit-widget.php', $args );
83
+ // phpcs:enable
84
+ }
85
+ ?>
86
+ </div>
87
+ <a id="quick_adsense_widget_adunits_showall_button" class="input button-secondary"><span class="dashicons dashicons-arrow-down"></span> <b>Show All</b></a>
88
+ </div>
89
+ </div>
quick-adsense.php CHANGED
@@ -1,25 +1,25 @@
1
- <?php
2
- /**
3
- * Plugin Name: Quick Adsense
4
- * Plugin URI: http://quickadsense.com/
5
- * Description: Quick Adsense offers a quicker & flexible way to insert Google Adsense or any Ads code into a blog post.
6
- * Author: namithjawahar
7
- * Author URI: https://smartlogix.co.in/
8
- * Version: 2.8.6
9
- */
10
- require_once dirname( __FILE__ ) . '/includes/loader.php';
11
- require_once dirname( __FILE__ ) . '/includes/countries.php';
12
- require_once dirname( __FILE__ ) . '/includes/defaults.php';
13
- require_once dirname( __FILE__ ) . '/includes/controls.php';
14
- require_once dirname( __FILE__ ) . '/includes/settings.php';
15
- require_once dirname( __FILE__ ) . '/includes/widgets.php';
16
- require_once dirname( __FILE__ ) . '/includes/quicktags.php';
17
- require_once dirname( __FILE__ ) . '/includes/content.php';
18
- require_once dirname( __FILE__ ) . '/includes/adsense.php';
19
- require_once dirname( __FILE__ ) . '/includes/class-filehandler.php';
20
- if ( ! class_exists( 'Mobile_Detect' ) ) {
21
- require_once dirname( __FILE__ ) . '/includes/vendor/MobileDetect/Mobile_Detect.php';
22
- }
23
- if ( ! class_exists( 'iriven\\GeoIPCountry' ) ) {
24
- require_once dirname( __FILE__ ) . '/includes/vendor/GeoIP/GeoIPCountry.php';
25
- }
1
+ <?php
2
+ /**
3
+ * Plugin Name: Quick Adsense
4
+ * Plugin URI: http://quickadsense.com/
5
+ * Description: Quick Adsense offers a quicker & flexible way to insert Google Adsense or any Ads code into a blog post.
6
+ * Author: namithjawahar
7
+ * Author URI: https://smartlogix.co.in/
8
+ * Version: 2.8.7
9
+ */
10
+ require_once dirname( __FILE__ ) . '/includes/loader.php';
11
+ require_once dirname( __FILE__ ) . '/includes/countries.php';
12
+ require_once dirname( __FILE__ ) . '/includes/defaults.php';
13
+ require_once dirname( __FILE__ ) . '/includes/controls.php';
14
+ require_once dirname( __FILE__ ) . '/includes/settings.php';
15
+ require_once dirname( __FILE__ ) . '/includes/widgets.php';
16
+ require_once dirname( __FILE__ ) . '/includes/quicktags.php';
17
+ require_once dirname( __FILE__ ) . '/includes/content.php';
18
+ require_once dirname( __FILE__ ) . '/includes/adsense.php';
19
+ require_once dirname( __FILE__ ) . '/includes/class-filehandler.php';
20
+ if ( ! class_exists( 'Mobile_Detect' ) ) {
21
+ require_once dirname( __FILE__ ) . '/includes/vendor/MobileDetect/Mobile_Detect.php';
22
+ }
23
+ if ( ! class_exists( 'iriven\\GeoIPCountry' ) ) {
24
+ require_once dirname( __FILE__ ) . '/includes/vendor/GeoIP/GeoIPCountry.php';
25
+ }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: namithjawahar
3
  Tags: WordPress Plugin, adsense, google adsense, random adsense, random ads, advertising, adsense insertion, ad manager, ad, yahoo, google, ads, text insertion, widget, sidebar, admin, posts, plugin
4
  Requires at least: 5.0
5
  Tested up to: 6.0
6
- Stable tag: 2.8.6
7
 
8
  Quick Adsense offers a quicker & flexible way to insert Google Adsense or any Ads code into a blog post.
9
 
3
  Tags: WordPress Plugin, adsense, google adsense, random adsense, random ads, advertising, adsense insertion, ad manager, ad, yahoo, google, ads, text insertion, widget, sidebar, admin, posts, plugin
4
  Requires at least: 5.0
5
  Tested up to: 6.0
6
+ Stable tag: 2.8.7
7
 
8
  Quick Adsense offers a quicker & flexible way to insert Google Adsense or any Ads code into a blog post.
9