Yasr – Yet Another Stars Rating - Version 2.9.1

Version Description

Download this release

Release Info

Developer Dudo
Plugin Icon 128x128 Yasr – Yet Another Stars Rating
Version 2.9.1
Comparing to
See all releases

Code changes from version 2.9.0 to 2.9.1

admin/classes/YasrEditCategory.php CHANGED
@@ -37,17 +37,24 @@ class YasrEditCategory {
37
  <tr class="form-field term-name-wrap">
38
  <th scope="row">
39
  <label for="yasr-default-itemtype-category">
40
- <?php _e( 'Select default itemType', 'yet-another-stars-rating' ) ?>
41
  </label>
42
  <span class="dashicons dashicons-lock"></span>
43
  <?php
44
- $string = sprintf(
45
- __('Upgrade to %s to unlock this feature', 'yet-another-stars-rating'),
46
- '<a href="https://yetanotherstarsrating.com/?utm_source=wp-plugin&utm_medium=edit_category&utm_campaign=yasr_editor_category#yasr-pro">YASR PRO</a>'
47
- );
48
  ?>
49
  <span class="description">
50
- <?php echo $string ?>
 
 
 
 
 
 
 
 
 
 
51
  </span>
52
  </th>
53
  <td>
@@ -59,7 +66,7 @@ class YasrEditCategory {
59
  disabled
60
  >
61
  <span class="description">
62
- <?php _e('Check to update YASR itemType', 'yet-another-stars-rating') ?>
63
  </span>
64
  </label>
65
  </td>
37
  <tr class="form-field term-name-wrap">
38
  <th scope="row">
39
  <label for="yasr-default-itemtype-category">
40
+ <?php esc_html_e( 'Select default itemType', 'yet-another-stars-rating' ) ?>
41
  </label>
42
  <span class="dashicons dashicons-lock"></span>
43
  <?php
44
+
 
 
 
45
  ?>
46
  <span class="description">
47
+ <?php
48
+ $url = 'https://yetanotherstarsrating.com/?utm_source=wp-plugin&utm_medium=edit_category&utm_campaign=yasr_editor_category#yasr-pro';
49
+ $url = esc_url($url);
50
+ printf(
51
+ esc_html__('Upgrade to %s to unlock this feature', 'yet-another-stars-rating'),
52
+ sprintf(
53
+ '<a href="%s">%s</a>',
54
+ $url,
55
+ 'YASR_PRO'
56
+ )
57
+ ); ?>
58
  </span>
59
  </th>
60
  <td>
66
  disabled
67
  >
68
  <span class="description">
69
+ <?php esc_html_e('Check to update YASR itemType', 'yet-another-stars-rating') ?>
70
  </span>
71
  </label>
72
  </td>
admin/css/yasr-admin.css CHANGED
@@ -1,903 +1,909 @@
1
- .yasr-star-rating {
2
- width: 0;
3
- position: relative;
4
- display: inline-block;
5
- background-image: url(../../includes/img/star_0.svg);
6
- background-position: 0 0;
7
- background-repeat: repeat-x;
8
- }
9
-
10
- .yasr-star-rating[data-title]:hover:after {
11
- content: attr(data-title);
12
- padding: 4px 8px;
13
- color: #333;
14
- position: absolute;
15
- left: 0;
16
- top: 100%;
17
- z-index: 20;
18
- white-space: nowrap;
19
- -moz-border-radius: 5px;
20
- -webkit-border-radius: 5px;
21
- border-radius: 5px;
22
- -moz-box-shadow: 0px 0px 4px #222;
23
- -webkit-box-shadow: 0px 0px 4px #222;
24
- box-shadow: 0px 0px 4px #222;
25
- background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
26
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #eeeeee), color-stop(1, #cccccc));
27
- background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
28
- background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
29
- background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
30
- background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
31
- }
32
-
33
- .yasr-star-rating .yasr-star-value {
34
- height: 100%;
35
- position: absolute;
36
- }
37
-
38
- .yasr-star-rating .yasr-star-value {
39
- position: absolute;
40
- height: 100%;
41
- width: 100%;
42
- background: url('../../includes/img/star_1.svg');
43
- background-repeat: repeat-x;
44
- }
45
-
46
-
47
- /********** Edit post / page rules **********/
48
-
49
- /*** Metabox top right ***/
50
-
51
- #yasr-matabox-top-right {
52
- text-align: center;
53
- }
54
-
55
- #yasr-overall-rating-text {
56
- display: block;
57
- }
58
-
59
- #yasr-vote-with-numbers-select-container {
60
- display: block;
61
- }
62
-
63
- .rich-snippet-title {
64
- font-weight: bold;
65
- margin-bottom: 5px;
66
- }
67
-
68
- /*** End metabox overall rating ***/
69
-
70
- #multi_rating_table {
71
- vertical-align: text-top;
72
- }
73
-
74
- .yasr-form-result {
75
- display: block;
76
- }
77
-
78
- /**** Metabox multi ****/
79
-
80
- .yasr-metabox-below-editor-content {
81
- border: 1px solid #DDD;
82
- padding-left: 15px;
83
- padding-bottom: 10px;
84
- padding-top: 15px;
85
- min-height: 200px;
86
- }
87
-
88
- .yasr-metabox-info-snippet-container {
89
- border: 1px solid #DDD;
90
- margin: 15px;
91
- padding: 5px;
92
- min-height: 50px;
93
- }
94
-
95
- .yasr-element-row-container-label-input {
96
- margin-left: 10px;
97
- margin-right: 10px;
98
- margin-top: 10px;
99
- }
100
-
101
- .yasr-element-row-container-label-input > label {
102
- display: inline-block;
103
- width: 130px;
104
- font-weight: bold;
105
- }
106
-
107
- .yasr-element-row-container-label-input > textarea {
108
- height: 7em;
109
- }
110
-
111
- .yasr-element-row-container-description {
112
- color: #737272;
113
- margin-top: 5px;
114
- margin-left: 10px;
115
- margin-bottom: 15px;
116
- }
117
-
118
- #yasr-multi-set-admin-choose-text {
119
- display: none;
120
- margin-bottom: 15px;
121
- margin-top: 10px;
122
- }
123
-
124
- #yasr-multi-set-admin-explain {
125
- display: none;
126
- margin-top: 20px;
127
- margin-left: 20px;
128
- }
129
-
130
-
131
- /************** Gutenberg *****************/
132
-
133
- .yasr-guten-block-panel {
134
- margin-top: 15px;
135
- }
136
-
137
- .yasr-guten-block-panel-center {
138
- text-align: center;
139
- }
140
-
141
- .yasr-guten-block-explain {
142
- display: block;
143
- font-style: italic;
144
- font-size: small;
145
- font-weight: bold;
146
- }
147
-
148
- /**************End Gutenberg *****************/
149
-
150
-
151
- /**************** Settings page *******************/
152
-
153
- /*** Top menu navigation ***/
154
- .yasr-no-underline {
155
- border-bottom: none !important;
156
- }
157
-
158
- .nav-tab-active, .nav-tab-active:hover {
159
- background-color: white;
160
- }
161
-
162
- .form-table th {
163
- border-right: 1px solid #ddd;
164
- }
165
- /** The rule above show a border in the table head **/
166
- .yasr-rankings th {
167
- border-right: none;
168
- }
169
-
170
- /*** End top navigation ***/
171
-
172
-
173
- /*** On / Off Switch ***/
174
-
175
- .yasr-onoffswitch-big {
176
- position: relative;
177
- width: 85px;
178
- -webkit-user-select: none;
179
- -moz-user-select: none;
180
- -ms-user-select: none;
181
- }
182
-
183
- .yasr-onoffswitch-big-center{
184
- margin: 0 auto;
185
- text-align: left;
186
- }
187
-
188
- .yasr-onoffswitch-checkbox {
189
- display: none !important;
190
- }
191
-
192
- .yasr-onoffswitch-label {
193
- display: block;
194
- overflow: hidden;
195
- cursor: pointer;
196
- border: 2px solid #FFFFFF;
197
- border-radius: 35px;
198
- }
199
-
200
- .yasr-onoffswitch-inner {
201
- display: block;
202
- width: 200%;
203
- margin-left: -100%;
204
- transition: margin 0.3s ease-in 0s;
205
- }
206
-
207
- .yasr-onoffswitch-inner:before, .yasr-onoffswitch-inner:after {
208
- display: block;
209
- float: left;
210
- width: 50%;
211
- height: 30px;
212
- padding: 0;
213
- line-height: 30px;
214
- font-size: 18px;
215
- color: white;
216
- font-family: Trebuchet, Arial, sans-serif;
217
- font-weight: bold;
218
- box-sizing: border-box !important; /*important for Gutenberg compatibility*/
219
-
220
- }
221
-
222
- .yasr-onoffswitch-inner:before {
223
- content: "YES";
224
- padding-left: 9px;
225
- background-color: #EEEEEE;
226
- color: #34A7C1;
227
- }
228
-
229
- .yasr-onoffswitch-inner:after {
230
- content: "NO";
231
- padding-right: 15px;
232
- background-color: #EEEEEE;
233
- color: #999999;
234
- text-align: right;
235
- }
236
-
237
- .yasr-onoffswitch-switch {
238
- display: block;
239
- width: 30px;
240
- margin: 0px;
241
- background: #A1A1A1;
242
- position: absolute;
243
- top: 0;
244
- bottom: 0;
245
- right: 51px;
246
- border: 2px solid #FFFFFF;
247
- border-radius: 35px;
248
- transition: all 0.1s ease-in 0s;
249
- }
250
-
251
- .yasr-onoffswitch-checkbox:checked + .yasr-onoffswitch-label .yasr-onoffswitch-inner {
252
- margin-left: 0;
253
- }
254
-
255
- .yasr-onoffswitch-checkbox:checked + .yasr-onoffswitch-label .yasr-onoffswitch-switch {
256
- right: 0px;
257
- background-color: #34A7C1;
258
- }
259
-
260
- /* Alternative with ON/OFF INSTEAD YES/NO text */
261
- .yasr-onoffswitch-onoff-inner:before {
262
- content: "ON";
263
- padding-left: 15px;
264
- background-color: #EEEEEE;
265
- color: #34A7C1;
266
- }
267
-
268
- .yasr-onoffswitch-onoff-inner:after {
269
- content: "OFF";
270
- padding-right: 9px;
271
- background-color: #EEEEEE;
272
- color: #999999;
273
- text-align: right;
274
- }
275
-
276
- /* Alternative with no text */
277
- .yasr-onoffswitch-notext-inner:before {
278
- content: "";
279
- padding-left: 9px;
280
- background-color: #EEEEEE;
281
- color: #34A7C1;
282
- }
283
-
284
- .yasr-onoffswitch-notext-inner:after {
285
- content: "";
286
- padding-right: 15px;
287
- background-color: #EEEEEE;
288
- color: #999999;
289
- text-align: right;
290
- }
291
-
292
- /*** End on of switch ***/
293
-
294
- .yasr-settings-description {
295
- color: #3c434a;
296
- font-weight: 400;
297
- padding-left: 5px;
298
- padding-top: 5px;
299
- }
300
-
301
- /*This is the div with the created shortcode*/
302
-
303
- .yasr-builder-ranking-container{
304
- display: flex;
305
- flex-direction: row;
306
- flex-wrap: wrap;
307
- justify-content: space-between;
308
- align-items: stretch;
309
- align-content: stretch;
310
- padding-top: 10px;
311
- padding-bottom: 10px;
312
- padding-left: 10px;
313
- }
314
-
315
- .yasr-builder-shortcode-container {
316
- border: dashed 2px gray;
317
- margin-bottom: 20px;
318
- padding: 20px;
319
- }
320
-
321
- .yasr-rankings-div-shortcode {
322
- margin-bottom: 20px;
323
- }
324
-
325
- #yasr-builder-shortcode-buttons-container {
326
- padding-left: 10px;
327
- }
328
-
329
- #yasr-ranking-source{
330
- max-width: 165px;
331
- }
332
-
333
- #yasr-ranking-ctg-container {
334
- margin-top: 15px;
335
- padding-right: 15px;
336
- display: flex;
337
- flex-wrap: wrap;
338
- }
339
-
340
- #yasr-ranking-ctg-container > span {
341
- margin: 5px 7px 2px 5px;
342
- text-align: center;
343
- }
344
-
345
- /*Div padding*/
346
- .yasr-div-fixed-65 {
347
- flex-grow: 1;
348
- flex-basis: 65%;
349
- text-align: left;
350
- }
351
-
352
- .yasr-div-fixed-35 {
353
- flex-grow: 1;
354
- flex-basis: 35%;
355
- text-align: left;
356
- }
357
-
358
- @media (min-width: 1177px) {
359
-
360
- .yasr-settingsdiv {
361
- float: left;
362
- display: block;
363
- width: 65%;
364
- background-color: #FFF;
365
- border: 1px solid #DDD;
366
- padding-left: 15px;
367
- padding-right: 15px;
368
- padding-bottom: 10px;
369
- min-height: 560px;
370
- }
371
-
372
- .yasr-settingsdiv hr{
373
- border-top: 3px solid #ddd;
374
- }
375
-
376
- .yasr-donatedivdx {
377
- float: right;
378
- clear: right;
379
- display: block !important;
380
- min-width: 250px;
381
- width: 15%;
382
- margin-bottom: 10px;
383
- background-color: #FFF;
384
- border: 1px solid #DDD;
385
- border-radius: 9px;
386
- padding: 20px;
387
- font-size: 14px;
388
- box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.15);
389
- }
390
-
391
- }
392
-
393
- /*** Multi page rules ***/
394
-
395
- @media (max-width: 1176px) {
396
-
397
- .yasr-settingsdiv {
398
- float: left;
399
- display: block;
400
- width: 95%;
401
- background-color: #FFF;
402
- border: 1px solid #DDD;
403
- padding-left: 10px;
404
- padding-right: 10px;
405
- padding-bottom: 5px;
406
- }
407
-
408
- .yasr-donatedivbottom {
409
- display: block !important;
410
- width: 95%;
411
- background-color: #FFF;
412
- margin-top: 10px;
413
- border: 1px solid #DDD;
414
- padding: 10px;
415
- font-size: 12px;
416
- }
417
-
418
- }
419
-
420
- .yasr-donate-title{
421
- margin-top: 0px;
422
- margin-bottom: 20px;
423
- padding-bottom: 10px;
424
- border-bottom: 1px solid #ddd;
425
- font-size: 1.3em;
426
- color: #23282d;
427
- display: block;
428
- font-weight: 600;
429
- }
430
-
431
- .yasr-donate-title a:hover, a:visited, a:link, a:active{
432
- text-decoration: none;
433
- }
434
-
435
- .yasr-donate-single-resource{
436
- margin-bottom: 12px;
437
- padding-bottom: 4px;
438
- border-bottom: 1px solid #ddd;
439
- display: block;
440
- }
441
-
442
- .yasr-donate-single-resource:last-child {
443
- border: none;
444
- margin-bottom: 0px;
445
- padding-bottom: 0px;
446
- }
447
-
448
- .yasr-donate-single-resource a{
449
- text-decoration: none;
450
- font-size: 15px;
451
- vertical-align: bottom;
452
- }
453
-
454
- .yasr-upgrade-to-pro {
455
- font-size: 14px;
456
- }
457
-
458
- .yasr-upgrade-to-pro li::before {
459
- margin-right: 7px;
460
- left: 0;
461
- font-weight: 700;
462
- content: "+";
463
- }
464
-
465
- .yasr-option-div {
466
- vertical-align: bottom;
467
- display: block;
468
- margin-bottom: 15px;
469
- }
470
-
471
- .yasr-img-option-size {
472
- vertical-align: middle;
473
- }
474
-
475
- .yasr-text-options-size {
476
- height: 30px;
477
- vertical-align: middle;
478
- padding-left: 8px;
479
- }
480
-
481
- #yasr-color-scheme-preview {
482
- border: 2px dashed #CCC;
483
- padding: 15px;
484
- margin: 10px;
485
- }
486
-
487
- .yasr-help-box-settings {
488
- display: none;
489
- border: 2px dashed #CCC;
490
- padding: 15px;
491
- margin: 10px;
492
- }
493
-
494
- .yasr-list-set-table {
495
- margin-left: 5px;
496
- }
497
-
498
- .yasr-space-settings-div {
499
- padding-bottom: 15px;
500
- clear: both;
501
- }
502
-
503
- .yasr-settings-row-24 {
504
- padding-left: 10px;
505
- display: flex;
506
- flex-wrap: wrap;
507
- }
508
-
509
- .yasr-settings-row-24 > div {
510
- flex: 0 0 24%;
511
- padding-top: 30px;
512
- }
513
-
514
- .yasr-settings-row-33 {
515
- padding-left: 10px;
516
- display: flex;
517
- flex-wrap: wrap;
518
- }
519
-
520
- .yasr-settings-row-33 > div {
521
- flex: 0 0 33%;
522
- padding-top: 30px;
523
- }
524
-
525
- .yasr-settings-row-35 {
526
- padding-left: 10px;
527
- display: flex;
528
- flex-wrap: wrap;
529
- }
530
-
531
- .yasr-settings-row-35 > div {
532
- flex: 0 0 35%;
533
- padding-top: 20px;
534
- }
535
-
536
- .yasr-settings-row-45 {
537
- padding-left: 10px;
538
- display: flex;
539
- flex-wrap: wrap;
540
- justify-content: space-between;
541
- }
542
-
543
- .yasr-settings-row-45 > div {
544
- /*It is 45 and applied space between*/
545
- flex: 0 0 45%;
546
- }
547
-
548
- .yasr-settings-row {
549
- display: flex;
550
- justify-content: space-between;
551
- }
552
-
553
- .yasr-settings-col-20 {
554
- flex: 0 0 30%;
555
- }
556
-
557
- .yasr-settings-col-30 {
558
- flex: 0 0 30%;
559
- }
560
-
561
- .yasr-settings-col-40 {
562
- flex: 0 0 40%;
563
- }
564
-
565
- .yasr-settings-col-50 {
566
- flex: 0 0 50%;
567
- }
568
-
569
- .yasr-settings-col-60 {
570
- flex: 0 0 60%;
571
- }
572
-
573
- .yasr-settings-col-70 {
574
- flex: 0 0 60%;
575
- }
576
-
577
- .yasr-settings-padding-left {
578
- padding-left: 10px;
579
- }
580
-
581
- .yasr-indented-answer {
582
- margin-top: 3px;
583
- margin-left: 10px;
584
- }
585
-
586
-
587
- /*** Rules for Multi set page ***/
588
-
589
- .yasr-multi-set-form-headers {
590
- text-align: center;
591
- }
592
-
593
- .yasr-multi-set-left {
594
- float: left;
595
- width: 40%;
596
- }
597
-
598
- .yasr-multi-set-right {
599
- float: right;
600
- width: 55%;
601
- }
602
-
603
- .yasr-new-multi-set {
604
- overflow: auto;
605
- margin-top: 10px;
606
- padding: 8px;
607
- border: 1px solid #DDD;
608
- background-color: #f7f7f7;
609
- }
610
-
611
- .yasr-manage-multiset {
612
- overflow: auto;
613
- margin-top: 10px;
614
- padding: 8px;
615
- border: 1px solid #DDD;
616
- background-color: #f7f7f7;
617
- }
618
-
619
- .yasr-manage-multiset-single {
620
- overflow: auto;
621
- margin-top: 10px;
622
- padding: 8px;
623
- border: 1px solid #DDD;
624
- background-color: #f7f7f7;
625
- }
626
-
627
-
628
- .yasr-input-text-multi-set {
629
- margin-left: 30px;
630
- margin-bottom: 10px;
631
- }
632
-
633
- #yasr-multi-set-response {
634
- margin-top: 10px;
635
- padding: 10px;
636
- border: 1px solid #DDD;
637
- background-color: #f7f7f7;
638
- }
639
-
640
- #yasr-multi-set-response2 {
641
- margin-top: 10px;
642
- padding: 10px;
643
- border: 1px solid #DDD;
644
- background-color: #f7f7f7;
645
- }
646
-
647
- #yasr-multi-set-doc-box {
648
- border: 2px dashed #CCC;
649
- padding: 15px;
650
- margin: 30px;
651
- }
652
-
653
- #yasr-table-form-edit-multi-set {
654
- width: 100%;
655
- }
656
-
657
- #yasr-table-form-edit-multi-set-header {
658
- text-align: center;
659
- padding: 5px;
660
- }
661
-
662
- #yasr-table-form-edit-multi-set-remove {
663
- text-align: center;
664
- padding: 5px;
665
- }
666
-
667
- .yasr-edit-form-remove-entire-set {
668
- padding-top: 30px;
669
- padding-bottom: 30px;
670
- text-align: center;
671
- color: red;
672
- }
673
-
674
- .yasr_table_multi_set_admin {
675
- border: 1px solid rgba(0, 0, 0, 0.1);
676
- padding: 10px;
677
- font-size: 20px;
678
- }
679
-
680
- @media (min-width: 972px) {
681
- .yasr_table_multi_set_admin {
682
- width: 70%;
683
- }
684
- }
685
-
686
-
687
- @media (max-width: 971px) {
688
- .yasr_table_multi_set_admin {
689
- width: 90%;
690
- }
691
- }
692
-
693
- .yasr_table_multi_set_admin td {
694
- width: 50%
695
- }
696
-
697
- .yasr_table_multi_set_admin tr:nth-child(odd) {
698
- background: #feffd3;
699
- }
700
-
701
- /* Define the background color for all the EVEN background rows */
702
- .yasr_table_multi_set_admin tr:nth-child(even) {
703
- background: #FFFFFF;
704
- }
705
-
706
-
707
- .yasr-multi-set-choose-theme {
708
- clear: both;
709
- padding: 10px;
710
- border: 1px solid #DDD;
711
- background-color: #f7f7f7;
712
- }
713
-
714
-
715
- /*** End rules for multi set admin page ***/
716
-
717
- /**** Yasr Aspect & Styles tab ***/
718
-
719
- .yasr-select-img-container > div {
720
- display: inline-block;
721
- padding-left: 15px;
722
- }
723
-
724
- .yasr-select-img-container > span {
725
- padding-top: 10px;
726
- }
727
-
728
- div.yasr-select-img-container input {
729
- display: block;
730
- margin: 10px 0 5px 8px !important;
731
- }
732
-
733
- #yasr-settings-stylish-image {
734
- max-width: 100%;
735
- height: auto;
736
- }
737
-
738
- #yasr-settings-stylish-image:hover {
739
- opacity: 0.4;
740
- }
741
-
742
- @media (max-width: 575px) {
743
-
744
- #yasr-settings-stylish-text {
745
-
746
- width: 50%;
747
- margin: auto;
748
- position: relative;
749
- top: -140px;
750
- background-color: #ffffff;
751
- border: 1px solid black;
752
- opacity: 0.8;
753
- font-size: 2vh;
754
- padding: 15px;
755
- visibility: hidden;
756
-
757
- }
758
-
759
- }
760
-
761
-
762
- @media (min-width: 576px) {
763
-
764
- #yasr-settings-stylish-text {
765
-
766
- width: 50%;
767
- margin: auto;
768
- position: relative;
769
- top: -288px;
770
- background-color: #ffffff;
771
- border: 2px solid black;
772
- opacity: 0.8;
773
- font-size: 2vh;
774
- padding: 15px;
775
- visibility: hidden;
776
-
777
- }
778
-
779
- }
780
-
781
-
782
- /**** End Yasr Aspect & Styles tab ***/
783
-
784
- /**** Migration Tools Page ****/
785
-
786
- .title-plugin-found{
787
- font-size: 18px;
788
- font-weight: bold;
789
- color: #2ca02c;
790
- }
791
-
792
- .title-noplugin-found{
793
- font-size: 18px;
794
- font-weight: bold;
795
- color: #ff4141;
796
- display: block;
797
- }
798
-
799
- .yasr-alert-box {
800
- margin-top: 15px;
801
- margin-bottom: 15px;
802
- margin-left: 10px;
803
- padding: 10px;
804
- padding-left: 30px;
805
- border: #ff806e 2px dashed;
806
- width: 70%;
807
- }
808
-
809
- /**** End Migration Tools Page ****/
810
-
811
-
812
- /*** Popup in tinymce ***/
813
-
814
-
815
- .yasr-underline {
816
- border-bottom: 1px solid #CCC !important;
817
- }
818
-
819
- #yasr-tinypopup-link-doc {
820
- float: right;
821
- font-size: 12px;
822
- }
823
-
824
- #yasr-overall-choose-size {
825
- display: none;
826
- margin-top: 20px;
827
- border: 2px dashed #CCC;
828
- padding-bottom: 10px;
829
- margin-left: 8px;
830
- padding-left: 8px;
831
- }
832
-
833
- .yasr-tinymce-button-size {
834
- padding-top: 5px;
835
- }
836
-
837
- #yasr-visitor-choose-size {
838
- display: none;
839
- margin-top: 20px;
840
- border: 2px dashed #CCC;
841
- padding-bottom: 10px;
842
- margin-left: 8px;
843
- padding-left: 8px;
844
- }
845
-
846
-
847
- /*** End popup tinymce***/
848
-
849
-
850
- .yasr-log-container {
851
- width: 98%;
852
- }
853
-
854
- .yasr-log-div-child {
855
- padding-top: 5px;
856
- border-bottom: 1px solid #BBD8E7;
857
- padding-bottom: 20px;
858
- }
859
-
860
- .yasr-log-image {
861
- list-style-type: none;
862
- display: inline-block;
863
- float: left;
864
- }
865
-
866
- .yasr-log-child-head {
867
- padding-left: 37px;
868
- }
869
-
870
- #yasr-log-vote {
871
- color: red;
872
- }
873
-
874
- #yasr-log-vote-users {
875
- color: green;
876
- }
877
-
878
- .yasr-log-post {
879
- color: #2683AE;
880
- }
881
-
882
- .yasr-log-ip-date {
883
- padding-top: 5px;
884
- }
885
-
886
- .yasr-log-ip {
887
- float: left;
888
- padding-left: 5px;
889
- }
890
-
891
- .yasr-log-date {
892
- float: right;
893
- }
894
-
895
- #yasr-log-next-rows {
896
- padding-top: 15px;
897
- text-align: right;
898
- }
899
-
900
- #yasr-log-page-navigation {
901
- padding-top: 7px;
902
- text-align: center;
 
 
 
 
 
 
903
  }
1
+ .yasr-star-rating {
2
+ width: 0;
3
+ position: relative;
4
+ display: inline-block;
5
+ background-image: url(../../includes/img/star_0.svg);
6
+ background-position: 0 0;
7
+ background-repeat: repeat-x;
8
+ }
9
+
10
+ .yasr-star-rating[data-title]:hover:after {
11
+ content: attr(data-title);
12
+ padding: 4px 8px;
13
+ color: #333;
14
+ position: absolute;
15
+ left: 0;
16
+ top: 100%;
17
+ z-index: 20;
18
+ white-space: nowrap;
19
+ -moz-border-radius: 5px;
20
+ -webkit-border-radius: 5px;
21
+ border-radius: 5px;
22
+ -moz-box-shadow: 0px 0px 4px #222;
23
+ -webkit-box-shadow: 0px 0px 4px #222;
24
+ box-shadow: 0px 0px 4px #222;
25
+ background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
26
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #eeeeee), color-stop(1, #cccccc));
27
+ background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
28
+ background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
29
+ background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
30
+ background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
31
+ }
32
+
33
+ .yasr-star-rating .yasr-star-value {
34
+ height: 100%;
35
+ position: absolute;
36
+ }
37
+
38
+ .yasr-star-rating .yasr-star-value {
39
+ position: absolute;
40
+ height: 100%;
41
+ width: 100%;
42
+ background: url('../../includes/img/star_1.svg');
43
+ background-repeat: repeat-x;
44
+ }
45
+
46
+
47
+ /********** Edit post / page rules **********/
48
+
49
+ /*** Metabox top right ***/
50
+
51
+ #yasr-matabox-top-right {
52
+ text-align: center;
53
+ }
54
+
55
+ #yasr-overall-rating-text {
56
+ display: block;
57
+ }
58
+
59
+ #yasr-vote-with-numbers-select-container {
60
+ display: block;
61
+ }
62
+
63
+ .rich-snippet-title {
64
+ font-weight: bold;
65
+ margin-bottom: 5px;
66
+ }
67
+
68
+ /*** End metabox overall rating ***/
69
+
70
+ #multi_rating_table {
71
+ vertical-align: text-top;
72
+ }
73
+
74
+ .yasr-form-result {
75
+ display: block;
76
+ }
77
+
78
+ /**** Metabox multi ****/
79
+
80
+ .yasr-metabox-below-editor-content {
81
+ border: 1px solid #DDD;
82
+ padding-left: 15px;
83
+ padding-bottom: 10px;
84
+ padding-top: 15px;
85
+ min-height: 200px;
86
+ }
87
+
88
+ .yasr-metabox-info-snippet-container {
89
+ border: 1px solid #DDD;
90
+ margin: 15px;
91
+ padding: 5px;
92
+ min-height: 50px;
93
+ }
94
+
95
+ .yasr-element-row-container-label-input {
96
+ margin-left: 10px;
97
+ margin-right: 10px;
98
+ margin-top: 10px;
99
+ }
100
+
101
+ .yasr-element-row-container-label-input > label {
102
+ display: inline-block;
103
+ width: 130px;
104
+ font-weight: bold;
105
+ }
106
+
107
+ .yasr-element-row-container-label-input > textarea {
108
+ height: 7em;
109
+ }
110
+
111
+ .yasr-element-row-container-description {
112
+ color: #737272;
113
+ margin-top: 5px;
114
+ margin-left: 10px;
115
+ margin-bottom: 15px;
116
+ }
117
+
118
+ #yasr-multi-set-admin-choose-text {
119
+ display: none;
120
+ margin-bottom: 15px;
121
+ margin-top: 10px;
122
+ }
123
+
124
+ #yasr-multi-set-admin-explain {
125
+ display: none;
126
+ margin-top: 20px;
127
+ margin-left: 20px;
128
+ }
129
+
130
+
131
+ /************** Gutenberg *****************/
132
+
133
+ .yasr-guten-block-panel {
134
+ margin-top: 15px;
135
+ }
136
+
137
+ .yasr-guten-block-panel-center {
138
+ text-align: center;
139
+ }
140
+
141
+ .yasr-guten-block-explain {
142
+ display: block;
143
+ font-style: italic;
144
+ font-size: small;
145
+ font-weight: bold;
146
+ }
147
+
148
+ /**************End Gutenberg *****************/
149
+
150
+
151
+ /**************** Settings page *******************/
152
+
153
+ /*** Top menu navigation ***/
154
+ .yasr-no-underline {
155
+ border-bottom: none !important;
156
+ }
157
+
158
+ .nav-tab-active, .nav-tab-active:hover {
159
+ background-color: white;
160
+ }
161
+
162
+ .form-table th {
163
+ border-right: 1px solid #ddd;
164
+ }
165
+ /** The rule above show a border in the table head **/
166
+ .yasr-rankings th {
167
+ border-right: none;
168
+ }
169
+
170
+ /*** End top navigation ***/
171
+
172
+ .yasr-settings-table {
173
+ min-height: 867px;
174
+ display: block;
175
+ }
176
+
177
+ /*** On / Off Switch ***/
178
+
179
+ .yasr-onoffswitch-big {
180
+ position: relative;
181
+ width: 85px;
182
+ -webkit-user-select: none;
183
+ -moz-user-select: none;
184
+ -ms-user-select: none;
185
+ }
186
+
187
+ .yasr-onoffswitch-big-center{
188
+ margin: 0 auto;
189
+ text-align: left;
190
+ }
191
+
192
+ .yasr-onoffswitch-checkbox {
193
+ display: none !important;
194
+ }
195
+
196
+ .yasr-onoffswitch-label {
197
+ display: block;
198
+ overflow: hidden;
199
+ cursor: pointer;
200
+ border: 2px solid #FFFFFF;
201
+ border-radius: 35px;
202
+ }
203
+
204
+ .yasr-onoffswitch-inner {
205
+ display: block;
206
+ width: 200%;
207
+ margin-left: -100%;
208
+ transition: margin 0.3s ease-in 0s;
209
+ }
210
+
211
+ .yasr-onoffswitch-inner:before, .yasr-onoffswitch-inner:after {
212
+ display: block;
213
+ float: left;
214
+ width: 50%;
215
+ height: 30px;
216
+ padding: 0;
217
+ line-height: 30px;
218
+ font-size: 18px;
219
+ color: white;
220
+ font-family: Trebuchet, Arial, sans-serif;
221
+ font-weight: bold;
222
+ box-sizing: border-box !important; /*important for Gutenberg compatibility*/
223
+
224
+ }
225
+
226
+ .yasr-onoffswitch-inner:before {
227
+ content: "YES";
228
+ padding-left: 9px;
229
+ background-color: #EEEEEE;
230
+ color: #34A7C1;
231
+ }
232
+
233
+ .yasr-onoffswitch-inner:after {
234
+ content: "NO";
235
+ padding-right: 15px;
236
+ background-color: #EEEEEE;
237
+ color: #999999;
238
+ text-align: right;
239
+ }
240
+
241
+ .yasr-onoffswitch-switch {
242
+ display: block;
243
+ width: 30px;
244
+ margin: 0px;
245
+ background: #A1A1A1;
246
+ position: absolute;
247
+ top: 0;
248
+ bottom: 0;
249
+ right: 51px;
250
+ border: 2px solid #FFFFFF;
251
+ border-radius: 35px;
252
+ transition: all 0.1s ease-in 0s;
253
+ }
254
+
255
+ .yasr-onoffswitch-checkbox:checked + .yasr-onoffswitch-label .yasr-onoffswitch-inner {
256
+ margin-left: 0;
257
+ }
258
+
259
+ .yasr-onoffswitch-checkbox:checked + .yasr-onoffswitch-label .yasr-onoffswitch-switch {
260
+ right: 0px;
261
+ background-color: #34A7C1;
262
+ }
263
+
264
+ /* Alternative with ON/OFF INSTEAD YES/NO text */
265
+ .yasr-onoffswitch-onoff-inner:before {
266
+ content: "ON";
267
+ padding-left: 15px;
268
+ background-color: #EEEEEE;
269
+ color: #34A7C1;
270
+ }
271
+
272
+ .yasr-onoffswitch-onoff-inner:after {
273
+ content: "OFF";
274
+ padding-right: 9px;
275
+ background-color: #EEEEEE;
276
+ color: #999999;
277
+ text-align: right;
278
+ }
279
+
280
+ /* Alternative with no text */
281
+ .yasr-onoffswitch-notext-inner:before {
282
+ content: "";
283
+ padding-left: 9px;
284
+ background-color: #EEEEEE;
285
+ color: #34A7C1;
286
+ }
287
+
288
+ .yasr-onoffswitch-notext-inner:after {
289
+ content: "";
290
+ padding-right: 15px;
291
+ background-color: #EEEEEE;
292
+ color: #999999;
293
+ text-align: right;
294
+ }
295
+
296
+ /*** End on of switch ***/
297
+
298
+ .yasr-settings-description {
299
+ color: #3c434a;
300
+ font-weight: 400;
301
+ padding-left: 5px;
302
+ padding-top: 5px;
303
+ }
304
+
305
+ /*This is the div with the created shortcode*/
306
+
307
+ .yasr-builder-ranking-container{
308
+ display: flex;
309
+ flex-direction: row;
310
+ flex-wrap: wrap;
311
+ justify-content: space-between;
312
+ align-items: stretch;
313
+ align-content: stretch;
314
+ padding-top: 10px;
315
+ padding-bottom: 10px;
316
+ padding-left: 10px;
317
+ }
318
+
319
+ .yasr-builder-shortcode-container {
320
+ border: dashed 2px gray;
321
+ margin-bottom: 20px;
322
+ padding: 20px;
323
+ }
324
+
325
+ .yasr-rankings-div-shortcode {
326
+ margin-bottom: 20px;
327
+ }
328
+
329
+ #yasr-builder-shortcode-buttons-container {
330
+ padding-left: 10px;
331
+ }
332
+
333
+ #yasr-ranking-source{
334
+ max-width: 165px;
335
+ }
336
+
337
+ #yasr-ranking-ctg-container {
338
+ margin-top: 15px;
339
+ padding-right: 15px;
340
+ display: flex;
341
+ flex-wrap: wrap;
342
+ }
343
+
344
+ #yasr-ranking-ctg-container > span {
345
+ margin: 5px 7px 2px 5px;
346
+ text-align: center;
347
+ }
348
+
349
+ /*Div padding*/
350
+ .yasr-div-fixed-65 {
351
+ flex-grow: 1;
352
+ flex-basis: 65%;
353
+ text-align: left;
354
+ }
355
+
356
+ .yasr-div-fixed-35 {
357
+ flex-grow: 1;
358
+ flex-basis: 35%;
359
+ text-align: left;
360
+ }
361
+
362
+ @media (min-width: 1177px) {
363
+
364
+ .yasr-settingsdiv {
365
+ float: left;
366
+ display: block;
367
+ width: 65%;
368
+ background-color: #FFF;
369
+ border: 1px solid #DDD;
370
+ padding-left: 15px;
371
+ padding-right: 15px;
372
+ padding-bottom: 10px;
373
+ min-height: 560px;
374
+ }
375
+
376
+ .yasr-settingsdiv hr{
377
+ border-top: 3px solid #ddd;
378
+ }
379
+
380
+ .yasr-donatedivdx {
381
+ float: right;
382
+ min-width: 250px;
383
+ width: 15%;
384
+ margin-bottom: 10px;
385
+ background-color: #FFF;
386
+ border: 1px solid #DDD;
387
+ border-radius: 9px;
388
+ padding: 20px;
389
+ font-size: 14px;
390
+ box-shadow: 0 0 5px 0 rgba(0,0,0,0.15);
391
+ }
392
+
393
+ }
394
+
395
+ /*** Multi page rules ***/
396
+
397
+ @media (max-width: 1176px) {
398
+
399
+ .yasr-settingsdiv {
400
+ float: left;
401
+ display: block;
402
+ width: 95%;
403
+ background-color: #FFF;
404
+ border: 1px solid #DDD;
405
+ padding-left: 10px;
406
+ padding-right: 10px;
407
+ padding-bottom: 5px;
408
+ }
409
+
410
+ .yasr-donatedivdx {
411
+ width: 95%;
412
+ background-color: #FFF;
413
+ margin-top: 10px;
414
+ border: 1px solid #DDD;
415
+ padding: 10px;
416
+ font-size: 14px;
417
+ }
418
+
419
+ .yasr-clear-both-dynamic {
420
+ padding-bottom: 15px;
421
+ clear: both;
422
+ }
423
+
424
+ }
425
+
426
+ .yasr-donate-title{
427
+ margin-top: 0px;
428
+ margin-bottom: 20px;
429
+ padding-bottom: 10px;
430
+ border-bottom: 1px solid #ddd;
431
+ font-size: 1.3em;
432
+ color: #23282d;
433
+ display: block;
434
+ font-weight: 600;
435
+ }
436
+
437
+ .yasr-donate-title a:hover, a:visited, a:link, a:active{
438
+ text-decoration: none;
439
+ }
440
+
441
+ .yasr-donate-single-resource{
442
+ margin-bottom: 12px;
443
+ padding-bottom: 4px;
444
+ border-bottom: 1px solid #ddd;
445
+ display: block;
446
+ }
447
+
448
+ .yasr-donate-single-resource:last-child {
449
+ border: none;
450
+ margin-bottom: 0px;
451
+ padding-bottom: 0px;
452
+ }
453
+
454
+ .yasr-donate-single-resource a{
455
+ text-decoration: none;
456
+ font-size: 15px;
457
+ vertical-align: bottom;
458
+ }
459
+
460
+ .yasr-upgrade-to-pro {
461
+ font-size: 14px;
462
+ }
463
+
464
+ .yasr-upgrade-to-pro li::before {
465
+ margin-right: 7px;
466
+ left: 0;
467
+ font-weight: 700;
468
+ content: "+";
469
+ }
470
+
471
+ .yasr-option-div {
472
+ vertical-align: bottom;
473
+ display: block;
474
+ margin-bottom: 15px;
475
+ }
476
+
477
+ .yasr-img-option-size {
478
+ vertical-align: middle;
479
+ }
480
+
481
+ .yasr-text-options-size {
482
+ height: 30px;
483
+ vertical-align: middle;
484
+ padding-left: 8px;
485
+ }
486
+
487
+ #yasr-color-scheme-preview {
488
+ border: 2px dashed #CCC;
489
+ padding: 15px;
490
+ margin: 10px;
491
+ }
492
+
493
+ .yasr-help-box-settings {
494
+ display: none;
495
+ border: 2px dashed #CCC;
496
+ padding: 15px;
497
+ margin: 10px;
498
+ }
499
+
500
+ .yasr-list-set-table {
501
+ margin-left: 5px;
502
+ }
503
+
504
+ .yasr-space-settings-div {
505
+ padding-bottom: 15px;
506
+ clear: both;
507
+ }
508
+
509
+ .yasr-settings-row-24 {
510
+ padding-left: 10px;
511
+ display: flex;
512
+ flex-wrap: wrap;
513
+ }
514
+
515
+ .yasr-settings-row-24 > div {
516
+ flex: 0 0 24%;
517
+ padding-top: 30px;
518
+ }
519
+
520
+ .yasr-settings-row-33 {
521
+ padding-left: 10px;
522
+ display: flex;
523
+ flex-wrap: wrap;
524
+ }
525
+
526
+ .yasr-settings-row-33 > div {
527
+ flex: 0 0 33%;
528
+ padding-top: 30px;
529
+ }
530
+
531
+ .yasr-settings-row-35 {
532
+ padding-left: 10px;
533
+ display: flex;
534
+ flex-wrap: wrap;
535
+ }
536
+
537
+ .yasr-settings-row-35 > div {
538
+ flex: 0 0 35%;
539
+ padding-top: 20px;
540
+ }
541
+
542
+ .yasr-settings-row-45 {
543
+ padding-left: 10px;
544
+ display: flex;
545
+ flex-wrap: wrap;
546
+ justify-content: space-between;
547
+ }
548
+
549
+ .yasr-settings-row-45 > div {
550
+ /*It is 45 and applied space between*/
551
+ flex: 0 0 45%;
552
+ }
553
+
554
+ .yasr-settings-row {
555
+ display: flex;
556
+ justify-content: space-between;
557
+ }
558
+
559
+ .yasr-settings-col-20 {
560
+ flex: 0 0 30%;
561
+ }
562
+
563
+ .yasr-settings-col-30 {
564
+ flex: 0 0 30%;
565
+ }
566
+
567
+ .yasr-settings-col-40 {
568
+ flex: 0 0 40%;
569
+ }
570
+
571
+ .yasr-settings-col-50 {
572
+ flex: 0 0 50%;
573
+ }
574
+
575
+ .yasr-settings-col-60 {
576
+ flex: 0 0 60%;
577
+ }
578
+
579
+ .yasr-settings-col-70 {
580
+ flex: 0 0 60%;
581
+ }
582
+
583
+ .yasr-settings-padding-left {
584
+ padding-left: 10px;
585
+ }
586
+
587
+ .yasr-indented-answer {
588
+ margin-top: 3px;
589
+ margin-left: 10px;
590
+ }
591
+
592
+
593
+ /*** Rules for Multi set page ***/
594
+
595
+ .yasr-multi-set-form-headers {
596
+ text-align: center;
597
+ }
598
+
599
+ .yasr-multi-set-left {
600
+ float: left;
601
+ width: 40%;
602
+ }
603
+
604
+ .yasr-multi-set-right {
605
+ float: right;
606
+ width: 55%;
607
+ }
608
+
609
+ .yasr-new-multi-set {
610
+ overflow: auto;
611
+ margin-top: 10px;
612
+ padding: 8px;
613
+ border: 1px solid #DDD;
614
+ background-color: #f7f7f7;
615
+ }
616
+
617
+ .yasr-manage-multiset {
618
+ overflow: auto;
619
+ margin-top: 10px;
620
+ padding: 8px;
621
+ border: 1px solid #DDD;
622
+ background-color: #f7f7f7;
623
+ }
624
+
625
+ .yasr-manage-multiset-single {
626
+ overflow: auto;
627
+ margin-top: 10px;
628
+ padding: 8px;
629
+ border: 1px solid #DDD;
630
+ background-color: #f7f7f7;
631
+ }
632
+
633
+
634
+ .yasr-input-text-multi-set {
635
+ margin-left: 30px;
636
+ margin-bottom: 10px;
637
+ }
638
+
639
+ #yasr-multi-set-response {
640
+ margin-top: 10px;
641
+ padding: 10px;
642
+ border: 1px solid #DDD;
643
+ background-color: #f7f7f7;
644
+ }
645
+
646
+ #yasr-multi-set-response2 {
647
+ margin-top: 10px;
648
+ padding: 10px;
649
+ border: 1px solid #DDD;
650
+ background-color: #f7f7f7;
651
+ }
652
+
653
+ #yasr-multi-set-doc-box {
654
+ border: 2px dashed #CCC;
655
+ padding: 15px;
656
+ margin: 30px;
657
+ }
658
+
659
+ #yasr-table-form-edit-multi-set {
660
+ width: 100%;
661
+ }
662
+
663
+ #yasr-table-form-edit-multi-set-header {
664
+ text-align: center;
665
+ padding: 5px;
666
+ }
667
+
668
+ #yasr-table-form-edit-multi-set-remove {
669
+ text-align: center;
670
+ padding: 5px;
671
+ }
672
+
673
+ .yasr-edit-form-remove-entire-set {
674
+ padding-top: 30px;
675
+ padding-bottom: 30px;
676
+ text-align: center;
677
+ color: red;
678
+ }
679
+
680
+ .yasr_table_multi_set_admin {
681
+ border: 1px solid rgba(0, 0, 0, 0.1);
682
+ padding: 10px;
683
+ font-size: 20px;
684
+ }
685
+
686
+ @media (min-width: 972px) {
687
+ .yasr_table_multi_set_admin {
688
+ width: 70%;
689
+ }
690
+ }
691
+
692
+
693
+ @media (max-width: 971px) {
694
+ .yasr_table_multi_set_admin {
695
+ width: 90%;
696
+ }
697
+ }
698
+
699
+ .yasr_table_multi_set_admin td {
700
+ width: 50%
701
+ }
702
+
703
+ .yasr_table_multi_set_admin tr:nth-child(odd) {
704
+ background: #feffd3;
705
+ }
706
+
707
+ /* Define the background color for all the EVEN background rows */
708
+ .yasr_table_multi_set_admin tr:nth-child(even) {
709
+ background: #FFFFFF;
710
+ }
711
+
712
+
713
+ .yasr-multi-set-choose-theme {
714
+ clear: both;
715
+ padding: 10px;
716
+ border: 1px solid #DDD;
717
+ background-color: #f7f7f7;
718
+ }
719
+
720
+
721
+ /*** End rules for multi set admin page ***/
722
+
723
+ /**** Yasr Aspect & Styles tab ***/
724
+
725
+ .yasr-select-img-container > div {
726
+ display: inline-block;
727
+ padding-left: 15px;
728
+ }
729
+
730
+ .yasr-select-img-container > span {
731
+ padding-top: 10px;
732
+ }
733
+
734
+ div.yasr-select-img-container input {
735
+ display: block;
736
+ margin: 10px 0 5px 8px !important;
737
+ }
738
+
739
+ #yasr-settings-stylish-image {
740
+ max-width: 100%;
741
+ height: auto;
742
+ }
743
+
744
+ #yasr-settings-stylish-image:hover {
745
+ opacity: 0.4;
746
+ }
747
+
748
+ @media (max-width: 575px) {
749
+
750
+ #yasr-settings-stylish-text {
751
+
752
+ width: 50%;
753
+ margin: auto;
754
+ position: relative;
755
+ top: -140px;
756
+ background-color: #ffffff;
757
+ border: 1px solid black;
758
+ opacity: 0.8;
759
+ font-size: 2vh;
760
+ padding: 15px;
761
+ visibility: hidden;
762
+
763
+ }
764
+
765
+ }
766
+
767
+
768
+ @media (min-width: 576px) {
769
+
770
+ #yasr-settings-stylish-text {
771
+
772
+ width: 50%;
773
+ margin: auto;
774
+ position: relative;
775
+ top: -288px;
776
+ background-color: #ffffff;
777
+ border: 2px solid black;
778
+ opacity: 0.8;
779
+ font-size: 2vh;
780
+ padding: 15px;
781
+ visibility: hidden;
782
+
783
+ }
784
+
785
+ }
786
+
787
+
788
+ /**** End Yasr Aspect & Styles tab ***/
789
+
790
+ /**** Migration Tools Page ****/
791
+
792
+ .title-plugin-found{
793
+ font-size: 18px;
794
+ font-weight: bold;
795
+ color: #2ca02c;
796
+ }
797
+
798
+ .title-noplugin-found{
799
+ font-size: 18px;
800
+ font-weight: bold;
801
+ color: #ff4141;
802
+ display: block;
803
+ }
804
+
805
+ .yasr-alert-box {
806
+ margin-top: 15px;
807
+ margin-bottom: 15px;
808
+ margin-left: 10px;
809
+ padding: 10px;
810
+ padding-left: 30px;
811
+ border: #ff806e 2px dashed;
812
+ width: 70%;
813
+ }
814
+
815
+ /**** End Migration Tools Page ****/
816
+
817
+
818
+ /*** Popup in tinymce ***/
819
+
820
+
821
+ .yasr-underline {
822
+ border-bottom: 1px solid #CCC !important;
823
+ }
824
+
825
+ #yasr-tinypopup-link-doc {
826
+ float: right;
827
+ font-size: 12px;
828
+ }
829
+
830
+ #yasr-overall-choose-size {
831
+ display: none;
832
+ margin-top: 20px;
833
+ border: 2px dashed #CCC;
834
+ padding-bottom: 10px;
835
+ margin-left: 8px;
836
+ padding-left: 8px;
837
+ }
838
+
839
+ .yasr-tinymce-button-size {
840
+ padding-top: 5px;
841
+ }
842
+
843
+ #yasr-visitor-choose-size {
844
+ display: none;
845
+ margin-top: 20px;
846
+ border: 2px dashed #CCC;
847
+ padding-bottom: 10px;
848
+ margin-left: 8px;
849
+ padding-left: 8px;
850
+ }
851
+
852
+
853
+ /*** End popup tinymce***/
854
+
855
+
856
+ .yasr-log-container {
857
+ width: 98%;
858
+ }
859
+
860
+ .yasr-log-div-child {
861
+ padding-top: 5px;
862
+ border-bottom: 1px solid #BBD8E7;
863
+ padding-bottom: 20px;
864
+ }
865
+
866
+ .yasr-log-image {
867
+ list-style-type: none;
868
+ display: inline-block;
869
+ float: left;
870
+ }
871
+
872
+ .yasr-log-child-head {
873
+ padding-left: 37px;
874
+ }
875
+
876
+ #yasr-log-vote {
877
+ color: red;
878
+ }
879
+
880
+ #yasr-log-vote-users {
881
+ color: green;
882
+ }
883
+
884
+ .yasr-log-post {
885
+ color: #2683AE;
886
+ }
887
+
888
+ .yasr-log-ip-date {
889
+ padding-top: 5px;
890
+ }
891
+
892
+ .yasr-log-ip {
893
+ float: left;
894
+ padding-left: 5px;
895
+ }
896
+
897
+ .yasr-log-date {
898
+ float: right;
899
+ }
900
+
901
+ #yasr-log-next-rows {
902
+ padding-top: 15px;
903
+ text-align: right;
904
+ }
905
+
906
+ #yasr-log-page-navigation {
907
+ padding-top: 7px;
908
+ text-align: center;
909
  }
admin/editor/YasrEditorHooks.php CHANGED
@@ -441,10 +441,10 @@ class YasrEditorHooks {
441
  if (is_admin()) {
442
  add_thickbox();
443
  echo '<a href="#TB_inline?width=530&height=600&inlineId=yasr-tinypopup-form"
444
- id="yasr-shortcode-creator"
445
- class="button thickbox">
446
- <span class="dashicons dashicons-star-half" style="vertical-align: middle;"></span> Yasr Shortcode
447
- </a>';
448
 
449
  }
450
  }
@@ -481,7 +481,6 @@ class YasrEditorHooks {
481
 
482
  <div id="yasr-content-tab-main" class="yasr-content-tab-tinymce">
483
  <table id="yasr-table-tiny-popup-main" class="form-table">
484
-
485
  <tr>
486
  <th>
487
  <label for="yasr-overall">
@@ -494,7 +493,7 @@ class YasrEditorHooks {
494
  class="button-primary"
495
  id="yasr-overall"
496
  name="yasr-overall"
497
- value="<?php _e('Insert Overall Rating', 'yet-another-stars-rating'); ?>"
498
  />
499
  <br/>
500
  <small>
@@ -507,11 +506,10 @@ class YasrEditorHooks {
507
  </small>
508
  <div class="yasr-tinymce-button-size">
509
  <?php
510
- echo self::yasr_tinymce_return_button('yasr_overall_rating');
511
  ?>
512
  </div>
513
  </div>
514
-
515
  </td>
516
  </tr>
517
 
@@ -522,8 +520,12 @@ class YasrEditorHooks {
522
  </label>
523
  </th>
524
  <td>
525
- <input type="button" class="button-primary" name="yasr-visitor-votes" id="yasr-visitor-votes"
526
- value="<?php _e("Insert Visitor Votes", 'yet-another-stars-rating'); ?>"/><br/>
 
 
 
 
527
  <small>
528
  <?php _e('Insert the ability for your visitors to vote', 'yet-another-stars-rating'); ?>
529
  </small>
@@ -534,7 +536,7 @@ class YasrEditorHooks {
534
  </small>
535
  <div class="yasr-tinymce-button-size">
536
  <?php
537
- echo self::yasr_tinymce_return_button('yasr_visitor_votes');
538
  ?>
539
  </div>
540
  </div>
@@ -549,9 +551,11 @@ class YasrEditorHooks {
549
  <td>
550
  <?php foreach ($multi_set as $name) { ?>
551
  <label>
552
- <input type="radio" value="<?php echo $name->set_id ?>" name="yasr_tinymce_pick_set"
 
 
553
  class="yasr_tinymce_select_set">
554
- <?php echo $name->set_name ?>
555
  </label>
556
  <br/>
557
  <?php } //End foreach ?>
@@ -581,10 +585,11 @@ class YasrEditorHooks {
581
  </p>
582
 
583
  <p>
584
- <input type="button" class="button-primary"
 
585
  name="yasr-insert-multiset"
586
  id="yasr-insert-multiset-select"
587
- value="<?php _e("Insert Multi Set", 'yet-another-stars-rating') ?>"/
588
  >
589
  <br/>
590
  </p>
@@ -630,9 +635,9 @@ class YasrEditorHooks {
630
  </th>
631
  <td>
632
  <?php
633
- echo self::yasr_tinymce_return_button(
634
- 'yasr_most_or_highest_rated_posts', 'Insert Users ranking'
635
- )
636
  ?>
637
  <br/>
638
  <small>
@@ -690,10 +695,10 @@ class YasrEditorHooks {
690
  <div style="font-size: medium">
691
  <?php
692
  echo(
693
- sprintf(__('%s Click here %s to customize the ranking and see a live preview',
694
- 'yet-another-stars-rating'),
695
- '<a href="options-general.php?page=yasr_settings_page&tab=rankings">', '</a>')
696
- );
697
  ?>
698
  </div>
699
 
@@ -729,17 +734,17 @@ class YasrEditorHooks {
729
  $data_attribute = "[$shortcode size=\"$size_low\"]";
730
 
731
  $html_to_return .= '<input type="button"
732
- class="button-secondary yasr-tinymce-shortcode-buttons"
733
- value="' . __($size, 'yet-another-stars-rating') . '"
734
- data-shortcode=\'' . $data_attribute . '\'
735
- />&nbsp;';
736
  }
737
  }
738
  else {
739
  $data_attribute = "[$shortcode]";
740
  $html_to_return .= '<input type="button"
741
  class="button-primary yasr-tinymce-shortcode-buttons"
742
- value="' . __($value, 'yet-another-stars-rating') . '"
743
  data-shortcode=\'' . $data_attribute . '\'
744
  />&nbsp;';
745
  }
441
  if (is_admin()) {
442
  add_thickbox();
443
  echo '<a href="#TB_inline?width=530&height=600&inlineId=yasr-tinypopup-form"
444
+ id="yasr-shortcode-creator"
445
+ class="button thickbox">
446
+ <span class="dashicons dashicons-star-half" style="vertical-align: middle;"></span> Yasr Shortcode
447
+ </a>';
448
 
449
  }
450
  }
481
 
482
  <div id="yasr-content-tab-main" class="yasr-content-tab-tinymce">
483
  <table id="yasr-table-tiny-popup-main" class="form-table">
 
484
  <tr>
485
  <th>
486
  <label for="yasr-overall">
493
  class="button-primary"
494
  id="yasr-overall"
495
  name="yasr-overall"
496
+ value="<?php esc_attr_e('Insert Overall Rating', 'yet-another-stars-rating'); ?>"
497
  />
498
  <br/>
499
  <small>
506
  </small>
507
  <div class="yasr-tinymce-button-size">
508
  <?php
509
+ echo self::yasr_tinymce_return_button('yasr_overall_rating');
510
  ?>
511
  </div>
512
  </div>
 
513
  </td>
514
  </tr>
515
 
520
  </label>
521
  </th>
522
  <td>
523
+ <input type="button"
524
+ class="button-primary"
525
+ name="yasr-visitor-votes"
526
+ id="yasr-visitor-votes"
527
+ value="<?php esc_attr_e("Insert Visitor Votes", 'yet-another-stars-rating'); ?>"/>
528
+ <br/>
529
  <small>
530
  <?php _e('Insert the ability for your visitors to vote', 'yet-another-stars-rating'); ?>
531
  </small>
536
  </small>
537
  <div class="yasr-tinymce-button-size">
538
  <?php
539
+ echo self::yasr_tinymce_return_button('yasr_visitor_votes');
540
  ?>
541
  </div>
542
  </div>
551
  <td>
552
  <?php foreach ($multi_set as $name) { ?>
553
  <label>
554
+ <input type="radio"
555
+ value="<?php echo esc_attr($name->set_id) ?>"
556
+ name="yasr_tinymce_pick_set"
557
  class="yasr_tinymce_select_set">
558
+ <?php echo esc_attr($name->set_name); ?>
559
  </label>
560
  <br/>
561
  <?php } //End foreach ?>
585
  </p>
586
 
587
  <p>
588
+ <input type="button"
589
+ class="button-primary"
590
  name="yasr-insert-multiset"
591
  id="yasr-insert-multiset-select"
592
+ value="<?php esc_attr_e("Insert Multi Set", 'yet-another-stars-rating') ?>"/
593
  >
594
  <br/>
595
  </p>
635
  </th>
636
  <td>
637
  <?php
638
+ echo self::yasr_tinymce_return_button(
639
+ 'yasr_most_or_highest_rated_posts', 'Insert Users ranking'
640
+ )
641
  ?>
642
  <br/>
643
  <small>
695
  <div style="font-size: medium">
696
  <?php
697
  echo(
698
+ sprintf(__('%s Click here %s to customize the ranking and see a live preview',
699
+ 'yet-another-stars-rating'),
700
+ '<a href="options-general.php?page=yasr_settings_page&tab=rankings">', '</a>')
701
+ );
702
  ?>
703
  </div>
704
 
734
  $data_attribute = "[$shortcode size=\"$size_low\"]";
735
 
736
  $html_to_return .= '<input type="button"
737
+ class="button-secondary yasr-tinymce-shortcode-buttons"
738
+ value="' . esc_attr__($size, 'yet-another-stars-rating') . '"
739
+ data-shortcode=\'' . $data_attribute . '\'
740
+ />&nbsp;';
741
  }
742
  }
743
  else {
744
  $data_attribute = "[$shortcode]";
745
  $html_to_return .= '<input type="button"
746
  class="button-primary yasr-tinymce-shortcode-buttons"
747
+ value="' . esc_attr__($value, 'yet-another-stars-rating') . '"
748
  data-shortcode=\'' . $data_attribute . '\'
749
  />&nbsp;';
750
  }
admin/editor/yasr-metabox-multiple-rating.php CHANGED
@@ -45,7 +45,7 @@ if ($n_multi_set > 1) {
45
  <select id="select_set" autocomplete="off">
46
  <?php
47
  foreach ($multi_set as $name) {
48
- echo "<option value='$name->set_id'>$name->set_name</option>";
49
  } //End foreach
50
  ?>
51
  </select>
@@ -54,7 +54,7 @@ if ($n_multi_set > 1) {
54
  <button href="#" class="button-delete" id="yasr-button-select-set"><?php _e("Select"); ?></button>
55
 
56
  <span id="yasr-loader-select-multi-set" style="display:none;" >&nbsp;
57
- <img src="<?php echo YASR_IMG_DIR . "/loader.gif" ?>" alt="yasr-loader">
58
  </span>
59
  </div>
60
 
@@ -65,9 +65,9 @@ if ($n_multi_set > 1) {
65
  ?>
66
 
67
  <div id="yasr-editor-multiset-container"
68
- data-nmultiset="<?php echo $n_multi_set ?>"
69
- data-setid="<?php echo $set_id ?>"
70
- data-postid="<?php echo $post_id ?>
71
  ">
72
 
73
  <span id="yasr-multi-set-admin-choose-text">
45
  <select id="select_set" autocomplete="off">
46
  <?php
47
  foreach ($multi_set as $name) {
48
+ echo "<option value='".esc_attr($name->set_id)."'>".esc_attr($name->set_name)."</option>";
49
  } //End foreach
50
  ?>
51
  </select>
54
  <button href="#" class="button-delete" id="yasr-button-select-set"><?php _e("Select"); ?></button>
55
 
56
  <span id="yasr-loader-select-multi-set" style="display:none;" >&nbsp;
57
+ <img src="<?php echo esc_url(YASR_IMG_DIR . "/loader.gif") ?>" alt="yasr-loader">
58
  </span>
59
  </div>
60
 
65
  ?>
66
 
67
  <div id="yasr-editor-multiset-container"
68
+ data-nmultiset="<?php echo esc_attr($n_multi_set) ?>"
69
+ data-setid="<?php echo esc_attr($set_id) ?>"
70
+ data-postid="<?php echo esc_attr($post_id) ?>
71
  ">
72
 
73
  <span id="yasr-multi-set-admin-choose-text">
admin/editor/yasr-metabox-schema.php CHANGED
@@ -87,8 +87,8 @@ $itemType_obj = new YasrMetaboxSchemaFields($saved_data);
87
  type="text"
88
  id="yasr-schema-title"
89
  name="yasr_schema_title"
90
- placeholder="<?php echo wp_strip_all_tags(get_the_title()) ?>"
91
- value="<?php echo $saved_data['yasr_schema_title'] ?>"
92
  >
93
  </div>
94
  <div class="yasr-element-row-container-description">
87
  type="text"
88
  id="yasr-schema-title"
89
  name="yasr_schema_title"
90
+ placeholder="<?php echo esc_attr(get_the_title()) ?>"
91
+ value="<?php echo esc_attr($saved_data['yasr_schema_title']) ?>"
92
  >
93
  </div>
94
  <div class="yasr-element-row-container-description">
admin/editor/yasr-metabox-top-right.php CHANGED
@@ -38,7 +38,10 @@ wp_nonce_field('yasr_nonce_is_post_review_action', 'yasr_nonce_is_post_review');
38
 
39
  <div id="yasr-matabox-top-right">
40
 
41
- <input type='hidden' name='yasr_overall_rating' id='yasr-overall-rating-value' value='<?php echo $overall_rating?>'>
 
 
 
42
  <div id="yasr-vote-overall-stars-container">
43
  <div id="yasr-vote-overall-stars">
44
  <span id="yasr-overall-rating-text">
38
 
39
  <div id="yasr-matabox-top-right">
40
 
41
+ <input type='hidden'
42
+ name='yasr_overall_rating'
43
+ id='yasr-overall-rating-value'
44
+ value='<?php echo esc_attr($overall_rating);?>'>
45
  <div id="yasr-vote-overall-stars-container">
46
  <div id="yasr-vote-overall-stars">
47
  <span id="yasr-overall-rating-text">
admin/settings/aspect_style/yasr-settings-style-actions.php CHANGED
@@ -52,7 +52,7 @@ function yasr_style_options_choose_stars_lite_callback($style_options) {
52
  <label for="radio-img-rater">
53
  <span class='yasr_pro_stars_set'>
54
  <?php
55
- echo '<img src="' . YASR_IMG_DIR . 'stars_rater.png">';
56
  ?>
57
  </span>
58
  </label>
@@ -65,7 +65,7 @@ function yasr_style_options_choose_stars_lite_callback($style_options) {
65
  <label for="radio-img-yasr">
66
  <span class='yasr_pro_stars_set'>
67
  <?php
68
- echo '<img src="' . YASR_IMG_DIR . 'stars_rater_yasr.png">';
69
  ?>
70
  </span>
71
  </label>
@@ -78,7 +78,7 @@ function yasr_style_options_choose_stars_lite_callback($style_options) {
78
  <label for="radio-img-oxy">
79
  <span class='yasr_pro_stars_set'>
80
  <?php
81
- echo '<img src="' . YASR_IMG_DIR . 'stars_rater_oxy.png">';
82
  ?>
83
  </span>
84
  </label>
@@ -89,19 +89,18 @@ function yasr_style_options_choose_stars_lite_callback($style_options) {
89
  <div id="yasr-settings-stylish-stars" style="margin-top: 30px">
90
  <div id="yasr-settings-stylish-image-container">
91
  <?php
92
- echo "<img id=\"yasr-settings-stylish-image\" src=" . YASR_IMG_DIR . "yasr-pro-stars.png>";
93
  ?>
94
  </div>
95
  </div>
96
 
97
  <div id='yasr-settings-stylish-text'>
98
-
99
  <?php
100
- $text = __('Looking for more?', 'yet-another-stars-rating');
101
- $text .= '<br />';
102
- $text .= sprintf(__('Upgrade to %s', 'yet-another-stars-rating'), '<a href="?page=yasr_settings_page-pricing">Yasr Pro!</a>');
103
 
104
- echo $text;
105
  ?>
106
 
107
  </div>
52
  <label for="radio-img-rater">
53
  <span class='yasr_pro_stars_set'>
54
  <?php
55
+ echo '<img src="' . esc_url(YASR_IMG_DIR . 'stars_rater.png').'">';
56
  ?>
57
  </span>
58
  </label>
65
  <label for="radio-img-yasr">
66
  <span class='yasr_pro_stars_set'>
67
  <?php
68
+ echo '<img src="' . esc_url(YASR_IMG_DIR . 'stars_rater_yasr.png').'">';
69
  ?>
70
  </span>
71
  </label>
78
  <label for="radio-img-oxy">
79
  <span class='yasr_pro_stars_set'>
80
  <?php
81
+ echo '<img src="' . esc_url(YASR_IMG_DIR . 'stars_rater_oxy.png').'">';
82
  ?>
83
  </span>
84
  </label>
89
  <div id="yasr-settings-stylish-stars" style="margin-top: 30px">
90
  <div id="yasr-settings-stylish-image-container">
91
  <?php
92
+ echo '<img id="yasr-settings-stylish-image" src=' . esc_url(YASR_IMG_DIR . 'yasr-pro-stars.png').'>';
93
  ?>
94
  </div>
95
  </div>
96
 
97
  <div id='yasr-settings-stylish-text'>
 
98
  <?php
99
+ $text = __('Looking for more?', 'yet-another-stars-rating');
100
+ $text .= '<br />';
101
+ $text .= sprintf(__('Upgrade to %s', 'yet-another-stars-rating'), '<a href="?page=yasr_settings_page-pricing">Yasr Pro!</a>');
102
 
103
+ echo wp_kses_post($text);
104
  ?>
105
 
106
  </div>
admin/settings/aspect_style/yasr-settings-style-functions.php CHANGED
@@ -105,13 +105,13 @@ function yasr_color_scheme_multiset_callback($style_options) {
105
  <div id="yasr-color-scheme-preview" style="display:none">
106
  <?php
107
  _e("Light theme", 'yet-another-stars-rating');
108
- echo "<br /><br /><img src='" . YASR_IMG_DIR . "yasr-multi-set.png'>";
109
 
110
  echo "<br /> <br />";
111
 
112
  _e("Dark theme", 'yet-another-stars-rating');
113
- echo "<br /><br /><img src='" . YASR_IMG_DIR . "dark-multi-set.png'>";
114
- ?>
115
  </div>
116
 
117
  <p>
105
  <div id="yasr-color-scheme-preview" style="display:none">
106
  <?php
107
  _e("Light theme", 'yet-another-stars-rating');
108
+ echo '<br /><br /><img src="' . esc_url(YASR_IMG_DIR . 'yasr-multi-set.png').'" alt="light-multiset">';
109
 
110
  echo "<br /> <br />";
111
 
112
  _e("Dark theme", 'yet-another-stars-rating');
113
+ echo '<br /><br /><img src="' . esc_url(YASR_IMG_DIR . 'dark-multi-set.png').'" alt="dark-multiset">';
114
+ ?>
115
  </div>
116
 
117
  <p>
admin/settings/classes/YasrSettings.php CHANGED
@@ -479,7 +479,7 @@ class YasrSettings {
479
  <?php _e('Example', 'yet-another-stars-rating') ?>:
480
  </strong>
481
  <br />
482
- <img src="<?php echo YASR_IMG_DIR . 'yasr-settings-stats.png'?>"
483
  class="yasr-help-box-settings"
484
  style="display: block; width: 330px"
485
  alt="yasr-statsexplained">
@@ -562,7 +562,7 @@ class YasrSettings {
562
  <input type="button"
563
  id="yasr-settings-custom-texts"
564
  class="button"
565
- value="<?php _e('Restore defaults', 'yet-another-stars-rating') ?>">
566
  </div>
567
 
568
  <div id="yasr-doc-custom-text-div">
@@ -578,9 +578,9 @@ class YasrSettings {
578
 
579
  _e('Leave a field empty to disable it.', 'yet-another-stars-rating');
580
  echo '<br /><br/>';
581
- echo $string_custom_overall;
582
  echo '<br /><br/>';
583
- echo $string_custom_visitor;
584
  echo '<br /><br/>';
585
 
586
  _e('You can use these html tags:', 'yet-another-stars-rating');
@@ -658,7 +658,7 @@ class YasrSettings {
658
  <br/>
659
  <input type='text' name='yasr_general_options[publisher_name]'
660
  id="yasr-general-options-publisher-name"
661
- class="yasr-additional-info-inputs" <?php printf('value="%s"', $publisher_name); ?>
662
  maxlength="180"/>
663
  <div class="yasr-element-row-container-description">
664
  <label for="yasr-general-options-publisher-name">
@@ -669,7 +669,7 @@ class YasrSettings {
669
  <input type='text' name='yasr_general_options[publisher_logo]'
670
  id="yasr-general-options-publisher-logo"
671
  class="yasr-blogPosting-additional-info-inputs"
672
- <?php printf('value="%s"', $publisher_logo); ?>
673
  maxlength="300"/>
674
  <div class="yasr-element-row-container-description">
675
  <label for="yasr-general-options-publisher-logo">
@@ -682,7 +682,7 @@ class YasrSettings {
682
  <div class="yasr-settings-col-40" id="yasr-blogPosting-additional-info">
683
  <div class="yasr-help-box-settings" style="display:block">
684
  <?php
685
- echo(sprintf(
686
  __('Please keep in mind that since September, 16, 2019 blogPosting itemType will
687
  no show stars in SERP anymore. %sHere%s the announcement by Google.',
688
  'yet-another-stars-rating'),
@@ -690,7 +690,7 @@ class YasrSettings {
690
  '</a>')
691
  );
692
  echo "<br /><br />";
693
- echo (sprintf(
694
  __('Also, %sread Google guidelines%s', 'yet-another-stars-rating'),
695
  '<a href="https://developers.google.com/search/docs/data-types/review-snippet#guidelines">',
696
  '</a>.')
@@ -736,13 +736,13 @@ class YasrSettings {
736
  $caching_plugin = new YasrFindCachingPlugins();
737
  $caching_plugin_found = $caching_plugin->cachingPluginFound();
738
  if($caching_plugin_found !== false) {
739
- echo '<div class="yasr-element-row-container-description">'.
740
  sprintf(
741
  __('Since you\'re using the caching plugin %s you should enable this.',
742
  'yet-another-stars-rating'),
743
  '<strong>'.$caching_plugin_found.'</strong>'
744
  ).
745
- '</div>';
746
  }
747
  ?>
748
  </div>
@@ -770,7 +770,7 @@ class YasrSettings {
770
  '<a href="https://en.wikipedia.org/wiki/General_Data_Protection_Regulation">GDPR</a>',
771
  '<strong>', '</strong>', '<br />'
772
  );
773
- echo $string;
774
  ?>
775
  </div>
776
  </div>
@@ -920,7 +920,7 @@ class YasrSettings {
920
  );
921
  } elseif($property['type'] === 'textarea') {
922
  $string_input = YasrPhpFieldsHelper::textArea('', '', $property['name'], '', '',
923
- $option[$property['name']]);
924
  }
925
  } //to use text, there is no need to set the type element
926
  else {
@@ -932,9 +932,9 @@ class YasrSettings {
932
  echo $string_input;
933
 
934
  if(isset($property['description']) && $property['description'] !== '') {
935
- echo '<div class="yasr-element-row-container-description">'
936
  . $property['description'] .
937
- '</div>';
938
  }
939
 
940
  }
479
  <?php _e('Example', 'yet-another-stars-rating') ?>:
480
  </strong>
481
  <br />
482
+ <img src="<?php echo esc_url(YASR_IMG_DIR . 'yasr-settings-stats.png')?>"
483
  class="yasr-help-box-settings"
484
  style="display: block; width: 330px"
485
  alt="yasr-statsexplained">
562
  <input type="button"
563
  id="yasr-settings-custom-texts"
564
  class="button"
565
+ value="<?php esc_attr_e('Restore defaults', 'yet-another-stars-rating') ?>">
566
  </div>
567
 
568
  <div id="yasr-doc-custom-text-div">
578
 
579
  _e('Leave a field empty to disable it.', 'yet-another-stars-rating');
580
  echo '<br /><br/>';
581
+ echo wp_kses_post($string_custom_overall);
582
  echo '<br /><br/>';
583
+ echo wp_kses_post($string_custom_visitor);
584
  echo '<br /><br/>';
585
 
586
  _e('You can use these html tags:', 'yet-another-stars-rating');
658
  <br/>
659
  <input type='text' name='yasr_general_options[publisher_name]'
660
  id="yasr-general-options-publisher-name"
661
+ class="yasr-additional-info-inputs" <?php printf('value="%s"', esc_attr($publisher_name)); ?>
662
  maxlength="180"/>
663
  <div class="yasr-element-row-container-description">
664
  <label for="yasr-general-options-publisher-name">
669
  <input type='text' name='yasr_general_options[publisher_logo]'
670
  id="yasr-general-options-publisher-logo"
671
  class="yasr-blogPosting-additional-info-inputs"
672
+ <?php printf('value="%s"', esc_url($publisher_logo)); ?>
673
  maxlength="300"/>
674
  <div class="yasr-element-row-container-description">
675
  <label for="yasr-general-options-publisher-logo">
682
  <div class="yasr-settings-col-40" id="yasr-blogPosting-additional-info">
683
  <div class="yasr-help-box-settings" style="display:block">
684
  <?php
685
+ echo wp_kses_post(sprintf(
686
  __('Please keep in mind that since September, 16, 2019 blogPosting itemType will
687
  no show stars in SERP anymore. %sHere%s the announcement by Google.',
688
  'yet-another-stars-rating'),
690
  '</a>')
691
  );
692
  echo "<br /><br />";
693
+ echo wp_kses_post(sprintf(
694
  __('Also, %sread Google guidelines%s', 'yet-another-stars-rating'),
695
  '<a href="https://developers.google.com/search/docs/data-types/review-snippet#guidelines">',
696
  '</a>.')
736
  $caching_plugin = new YasrFindCachingPlugins();
737
  $caching_plugin_found = $caching_plugin->cachingPluginFound();
738
  if($caching_plugin_found !== false) {
739
+ echo wp_kses_post('<div class="yasr-element-row-container-description">'.
740
  sprintf(
741
  __('Since you\'re using the caching plugin %s you should enable this.',
742
  'yet-another-stars-rating'),
743
  '<strong>'.$caching_plugin_found.'</strong>'
744
  ).
745
+ '</div>');
746
  }
747
  ?>
748
  </div>
770
  '<a href="https://en.wikipedia.org/wiki/General_Data_Protection_Regulation">GDPR</a>',
771
  '<strong>', '</strong>', '<br />'
772
  );
773
+ echo wp_kses_post($string);
774
  ?>
775
  </div>
776
  </div>
920
  );
921
  } elseif($property['type'] === 'textarea') {
922
  $string_input = YasrPhpFieldsHelper::textArea('', '', $property['name'], '', '',
923
+ esc_textarea($option[$property['name']]));
924
  }
925
  } //to use text, there is no need to set the type element
926
  else {
932
  echo $string_input;
933
 
934
  if(isset($property['description']) && $property['description'] !== '') {
935
+ echo wp_kses_post('<div class="yasr-element-row-container-description">'
936
  . $property['description'] .
937
+ '</div>');
938
  }
939
 
940
  }
admin/settings/classes/YasrSettingsRankings.php CHANGED
@@ -84,7 +84,7 @@ class YasrSettingsRankings {
84
  <strong>
85
  <?php
86
  _e( 'How many rows?', 'yet-another-stars-rating');
87
- echo YASR_LOCKED_FEATURE;
88
  ?>
89
  </strong>
90
  <br/>
@@ -97,9 +97,9 @@ class YasrSettingsRankings {
97
 
98
  for ($i = 2; $i <= 99; $i ++) {
99
  if ($i === 10) { //default value
100
- echo "<option value='$i' selected='selected'>$i</option>\n";
101
  } else {
102
- echo "<option value='$i'>$i</option>\n";
103
  }
104
  } //End for
105
 
@@ -116,7 +116,7 @@ class YasrSettingsRankings {
116
  <strong>
117
  <?php _e('Size', 'yet-another-stars-rating'); ?>
118
  </strong>
119
- <?php echo YASR_LOCKED_FEATURE; ?>
120
  <br/>
121
  <?php
122
  $name = 'yasr-builder-size';
@@ -144,7 +144,7 @@ class YasrSettingsRankings {
144
  $class = 'yasr-vv-default-view yasr-builder-elements-parents';
145
  $id = 'yasr-default-view';
146
 
147
- echo $option_title.YASR_LOCKED_FEATURE;
148
  echo YasrPhpFieldsHelper::radio( '', $class, $array_options, $name, $default, $id );
149
  ?>
150
  </div>
@@ -157,7 +157,7 @@ class YasrSettingsRankings {
157
  <strong>
158
  <?php
159
  _e('At least...', 'yet-another-stars-rating');
160
- echo YASR_LOCKED_FEATURE;
161
  ?>
162
  </strong>
163
  <!-- Min. number of votes for most rated -->
@@ -170,9 +170,9 @@ class YasrSettingsRankings {
170
  <?php
171
  for ($i = 1; $i <= 99; $i ++) {
172
  if ($i === 1) { //default value
173
- echo "<option value='$i' selected='selected'>$i</option>\n";
174
  } else {
175
- echo "<option value='$i'>$i</option>\n";
176
  }
177
  } //End for
178
  ?>
@@ -191,9 +191,9 @@ class YasrSettingsRankings {
191
  <?php
192
  for ($i = 1; $i <= 99; $i ++) {
193
  if ($i === 1) { //default value
194
- echo "<option value='$i' selected='selected'>$i</option>\n";
195
  } else {
196
- echo "<option value='$i'>$i</option>\n";
197
  }
198
  } //End for
199
  ?>
@@ -214,7 +214,7 @@ class YasrSettingsRankings {
214
  $option_title = __('Show text before or after the stars?', 'yet-another-stars-rating');
215
  $class = 'yasr-builder-custom-text-overall yasr-builder-elements-parents';
216
  $array_options = array (
217
- 'no' => __('No', 'yet-another-stars-rating'),
218
  'before' => __('Yes, before the stars', 'yet-another-stars-rating'),
219
  'after' => __('Yes, after the stars', 'yet-another-stars-rating')
220
  );
@@ -222,7 +222,7 @@ class YasrSettingsRankings {
222
  $default = 'no';
223
  $id = 'yasr-builder-ov-radio-text';
224
 
225
- echo '<strong>'.$option_title.'</strong>'.YASR_LOCKED_FEATURE;
226
  echo YasrPhpFieldsHelper::radio('', $class, $array_options, $name, $default, $id);
227
  ?>
228
  <br />
@@ -232,7 +232,7 @@ class YasrSettingsRankings {
232
  <br/>
233
  <label for="yasr-builder-customize-ov-text">
234
  <input type="text" name="yasr-builder-customize-ov-text"
235
- value="<?php _e("Rating:", 'yet-another-stars-rating') ?>"
236
  id="yasr-builder-customize-ov-text"
237
  class="yasr-builder-elements-childs"
238
  maxlength="30">
@@ -240,10 +240,10 @@ class YasrSettingsRankings {
240
  <div>
241
  <small>
242
  <?php
243
- echo sprintf(
244
  __('Use return %s to insert the text.', 'yet-another-stars-rating'),
245
  '<strong>(&#8629;)</strong>'
246
- );
247
  ?>
248
  </small>
249
  </div>
@@ -256,7 +256,7 @@ class YasrSettingsRankings {
256
  <div class="yasr-builder-div-fluid" id="yasr-builder-datepicker" style="display: none">
257
  <?php
258
  $name_id = 'yasr-builder-datepicker-start';
259
- echo '<strong>'.__('Start Date', 'yet-another-stars-rating').'</strong>' . YASR_LOCKED_FEATURE;
260
  echo YasrPhpFieldsHelper::text(
261
  'yasr-option-div yasr-builder-elements-parents',
262
  '',
@@ -265,7 +265,7 @@ class YasrSettingsRankings {
265
  );
266
 
267
  $name_id = 'yasr-builder-datepicker-end';
268
- echo '<strong>'.__('End Date', 'yet-another-stars-rating').'</strong>' . YASR_LOCKED_FEATURE;
269
  echo YasrPhpFieldsHelper::text(
270
  'yasr-option-div yasr-builder-elements-parents',
271
  '',
@@ -298,7 +298,7 @@ class YasrSettingsRankings {
298
  $class = 'yasr-builder-enable-category yasr-builder-elements-parents';
299
  $id = 'yasr-builder-rankings-category';
300
 
301
- echo $option_title.YASR_LOCKED_FEATURE;
302
  echo YasrPhpFieldsHelper::radio('', $class, $array_options, $name, $default, $id);
303
 
304
  ?>
@@ -323,15 +323,16 @@ class YasrSettingsRankings {
323
  $newline_row = 5;
324
  }
325
  foreach ($categories as $category) {
 
326
  echo '<span>
327
  <input type="checkbox"
328
  name="yasr-builder-category-checked"
329
  class="yasr-builder-category yasr-builder-elements-childs"
330
- id="yasr-builder-category-checked['.$i.']"
331
- value="'.$category->term_taxonomy_id .'"
332
- data-category-name="'. $category->name .'"
333
  autocomplete="off"
334
- /><label for="yasr-builder-category-checked['.$i.']">'
335
  . $category->name .
336
  '</label>';
337
  //close div
@@ -364,7 +365,7 @@ class YasrSettingsRankings {
364
  $class = 'yasr-builder-enable-cpt yasr-builder-elements-parents';
365
  $id = 'yasr-builder-enable-cpt-radio';
366
 
367
- echo $option_title.YASR_LOCKED_FEATURE;
368
  echo YasrPhpFieldsHelper::radio('', $class, $array_options, $name, $default, $id);
369
 
370
  echo '<br />';
@@ -372,14 +373,15 @@ class YasrSettingsRankings {
372
  $i = 0;
373
  $checked = 'checked';
374
  foreach ($this->custom_post_types as $post_type_slug) {
 
375
  if($i > 0) {
376
  $checked = '';
377
  }
378
  echo '<input type="radio" name="yasr-builder-custom-post-radio"
379
  class="yasr-builder-custom-post-radio yasr-builder-elements-childs"
380
- id="yasr-builder-custom-post-radio['.$i.']"
381
- value="'.$post_type_slug.'" '.$checked.' />
382
- '.$post_type_slug.'
383
  <br />';
384
  $i ++;
385
  }
@@ -424,7 +426,7 @@ class YasrSettingsRankings {
424
  <select id="yasr-ranking-multiset-select" autocomplete="off">
425
  <?php
426
  foreach ($this->multi_set_array as $name) {
427
- echo "<option value='$name->set_id'>$name->set_name</option>";
428
  } //End foreach
429
  ?>
430
  </select>
84
  <strong>
85
  <?php
86
  _e( 'How many rows?', 'yet-another-stars-rating');
87
+ echo wp_kses_post(YASR_LOCKED_FEATURE);
88
  ?>
89
  </strong>
90
  <br/>
97
 
98
  for ($i = 2; $i <= 99; $i ++) {
99
  if ($i === 10) { //default value
100
+ echo '<option value="'.esc_attr($i).'" selected="selected">'.esc_attr($i).'</option>\n';
101
  } else {
102
+ echo '<option value="'.esc_attr($i).'">'.esc_attr($i).'</option>\n';
103
  }
104
  } //End for
105
 
116
  <strong>
117
  <?php _e('Size', 'yet-another-stars-rating'); ?>
118
  </strong>
119
+ <?php echo wp_kses_post(YASR_LOCKED_FEATURE); ?>
120
  <br/>
121
  <?php
122
  $name = 'yasr-builder-size';
144
  $class = 'yasr-vv-default-view yasr-builder-elements-parents';
145
  $id = 'yasr-default-view';
146
 
147
+ echo wp_kses_post($option_title.YASR_LOCKED_FEATURE);
148
  echo YasrPhpFieldsHelper::radio( '', $class, $array_options, $name, $default, $id );
149
  ?>
150
  </div>
157
  <strong>
158
  <?php
159
  _e('At least...', 'yet-another-stars-rating');
160
+ echo wp_kses_post(YASR_LOCKED_FEATURE);
161
  ?>
162
  </strong>
163
  <!-- Min. number of votes for most rated -->
170
  <?php
171
  for ($i = 1; $i <= 99; $i ++) {
172
  if ($i === 1) { //default value
173
+ echo '<option value="'.esc_attr($i).'" selected="selected">'.esc_attr($i).'</option>\n';
174
  } else {
175
+ echo '<option value="'.esc_attr($i).'">'.esc_attr($i).'</option>\n';
176
  }
177
  } //End for
178
  ?>
191
  <?php
192
  for ($i = 1; $i <= 99; $i ++) {
193
  if ($i === 1) { //default value
194
+ echo '<option value="'.esc_attr($i).'" selected="selected">'.esc_attr($i).'</option>\n';
195
  } else {
196
+ echo '<option value="'.esc_attr($i).'">'.esc_attr($i).'</option>\n';
197
  }
198
  } //End for
199
  ?>
214
  $option_title = __('Show text before or after the stars?', 'yet-another-stars-rating');
215
  $class = 'yasr-builder-custom-text-overall yasr-builder-elements-parents';
216
  $array_options = array (
217
+ 'no' => __('No', 'yet-another-stars-rating'),
218
  'before' => __('Yes, before the stars', 'yet-another-stars-rating'),
219
  'after' => __('Yes, after the stars', 'yet-another-stars-rating')
220
  );
222
  $default = 'no';
223
  $id = 'yasr-builder-ov-radio-text';
224
 
225
+ echo wp_kses_post('<strong>'.$option_title.'</strong>'.YASR_LOCKED_FEATURE);
226
  echo YasrPhpFieldsHelper::radio('', $class, $array_options, $name, $default, $id);
227
  ?>
228
  <br />
232
  <br/>
233
  <label for="yasr-builder-customize-ov-text">
234
  <input type="text" name="yasr-builder-customize-ov-text"
235
+ value="<?php esc_attr_e("Rating:", 'yet-another-stars-rating') ?>"
236
  id="yasr-builder-customize-ov-text"
237
  class="yasr-builder-elements-childs"
238
  maxlength="30">
240
  <div>
241
  <small>
242
  <?php
243
+ echo wp_kses_post(sprintf(
244
  __('Use return %s to insert the text.', 'yet-another-stars-rating'),
245
  '<strong>(&#8629;)</strong>'
246
+ ));
247
  ?>
248
  </small>
249
  </div>
256
  <div class="yasr-builder-div-fluid" id="yasr-builder-datepicker" style="display: none">
257
  <?php
258
  $name_id = 'yasr-builder-datepicker-start';
259
+ echo wp_kses_post('<strong>'.__('Start Date', 'yet-another-stars-rating').'</strong>' . YASR_LOCKED_FEATURE);
260
  echo YasrPhpFieldsHelper::text(
261
  'yasr-option-div yasr-builder-elements-parents',
262
  '',
265
  );
266
 
267
  $name_id = 'yasr-builder-datepicker-end';
268
+ echo wp_kses_post('<strong>'.__('End Date', 'yet-another-stars-rating').'</strong>' . YASR_LOCKED_FEATURE);
269
  echo YasrPhpFieldsHelper::text(
270
  'yasr-option-div yasr-builder-elements-parents',
271
  '',
298
  $class = 'yasr-builder-enable-category yasr-builder-elements-parents';
299
  $id = 'yasr-builder-rankings-category';
300
 
301
+ echo wp_kses_post($option_title.YASR_LOCKED_FEATURE);
302
  echo YasrPhpFieldsHelper::radio('', $class, $array_options, $name, $default, $id);
303
 
304
  ?>
323
  $newline_row = 5;
324
  }
325
  foreach ($categories as $category) {
326
+ $id = "yasr-builder-category-checked[$i]";
327
  echo '<span>
328
  <input type="checkbox"
329
  name="yasr-builder-category-checked"
330
  class="yasr-builder-category yasr-builder-elements-childs"
331
+ id="'.esc_attr($id).'"
332
+ value="'.esc_attr($category->term_taxonomy_id) .'"
333
+ data-category-name="'. esc_attr($category->name) .'"
334
  autocomplete="off"
335
+ /><label for="'.esc_attr($id).'">'
336
  . $category->name .
337
  '</label>';
338
  //close div
365
  $class = 'yasr-builder-enable-cpt yasr-builder-elements-parents';
366
  $id = 'yasr-builder-enable-cpt-radio';
367
 
368
+ echo wp_kses_post($option_title.YASR_LOCKED_FEATURE);
369
  echo YasrPhpFieldsHelper::radio('', $class, $array_options, $name, $default, $id);
370
 
371
  echo '<br />';
373
  $i = 0;
374
  $checked = 'checked';
375
  foreach ($this->custom_post_types as $post_type_slug) {
376
+ $id = "yasr-builder-custom-post-radio[$i]";
377
  if($i > 0) {
378
  $checked = '';
379
  }
380
  echo '<input type="radio" name="yasr-builder-custom-post-radio"
381
  class="yasr-builder-custom-post-radio yasr-builder-elements-childs"
382
+ id="'.esc_attr($id).'"
383
+ value="'.esc_attr($post_type_slug).'" '.esc_attr($checked).' />
384
+ '.esc_attr($post_type_slug).'
385
  <br />';
386
  $i ++;
387
  }
426
  <select id="yasr-ranking-multiset-select" autocomplete="off">
427
  <?php
428
  foreach ($this->multi_set_array as $name) {
429
+ echo '<option value="'.esc_attr($name->set_id).'">'.esc_attr($name->set_name).'</option>';
430
  } //End foreach
431
  ?>
432
  </select>
admin/settings/migrations/yasr-settings-migration-page.php CHANGED
@@ -28,7 +28,7 @@ $plugin_imported = get_option('yasr_plugin_imported');
28
 
29
  <h3><?php _e('Migration Tools', 'yet-another-stars-rating'); ?></h3>
30
 
31
- <table class="form-table" id="yasr-migrate-table">
32
  <tr>
33
  <td>
34
  <div>
@@ -55,14 +55,14 @@ $plugin_imported = get_option('yasr_plugin_imported');
55
  $number_of_stars = (int)get_option('postratings_max', false);
56
 
57
  if ($number_of_stars && $number_of_stars !== 5) {
58
- echo '<div class="yasr-indented-answer" style="margin-top: 10px;">';
59
- echo sprintf(__('You\' re using a star set different from 5 %s
60
  Import can not be done', 'yet-another-stars-rating'), '<br />');
61
- echo '</div>';
 
62
  } else {
63
-
64
- echo '<div class="yasr-indented-answer" style="margin-top: 10px;">';
65
- echo sprintf(__(
66
  '%s Please note: %s depending on the settings, Wp-PostRatings may save data in different ways. %s
67
  The only way to be sure to get ALL data is, for every single post or page, getting the total
68
  number of votes, and save the current average as the rating for all votes. %s
@@ -72,13 +72,15 @@ $plugin_imported = get_option('yasr_plugin_imported');
72
  the import.',
73
  'yet-another-stars-rating'
74
  ), '<strong>', '</strong>', '<br />', '<br />', '<br />');
75
- echo '</div>';
 
 
76
 
77
  if (is_array($plugin_imported) && array_key_exists('wppr', $plugin_imported)) {
78
- echo '<div class="yasr-indented-answer" style="margin-top: 10px;">'
79
  . __('You\'ve already imported WP-PostRatings data on', 'yet-another-stars-rating') .
80
  '&nbsp;<strong>' . $plugin_imported['wppr']['date'] . '</strong>
81
- </div>';
82
  } else {
83
 
84
  $number_of_queries_wppr = (int) $rating_plugin_exists->yasr_count_wppr_query_number();
@@ -93,7 +95,7 @@ $plugin_imported = get_option('yasr_plugin_imported');
93
  <?php _e('Import data', 'yet-another-stars-rating') ?>
94
  </button>
95
  <input type="hidden" id="yasr-import-wppr-nonce"
96
- value="<?php echo $nonce_import_wppr ?>">
97
  </div>
98
  <div id="yasr-import-wppr-answer" class="yasr-indented-answer">
99
  </div>
28
 
29
  <h3><?php _e('Migration Tools', 'yet-another-stars-rating'); ?></h3>
30
 
31
+ <table class="form-table yasr-settings-table" id="yasr-migrate-table">
32
  <tr>
33
  <td>
34
  <div>
55
  $number_of_stars = (int)get_option('postratings_max', false);
56
 
57
  if ($number_of_stars && $number_of_stars !== 5) {
58
+ $error = '<div class="yasr-indented-answer" style="margin-top: 10px;">';
59
+ $error .= sprintf(__('You\' re using a star set different from 5 %s
60
  Import can not be done', 'yet-another-stars-rating'), '<br />');
61
+ $error .= '</div>';
62
+ echo wp_kses_post($error);
63
  } else {
64
+ $info = '<div class="yasr-indented-answer" style="margin-top: 10px;">';
65
+ $info .= sprintf(__(
 
66
  '%s Please note: %s depending on the settings, Wp-PostRatings may save data in different ways. %s
67
  The only way to be sure to get ALL data is, for every single post or page, getting the total
68
  number of votes, and save the current average as the rating for all votes. %s
72
  the import.',
73
  'yet-another-stars-rating'
74
  ), '<strong>', '</strong>', '<br />', '<br />', '<br />');
75
+ $info.='</div>';
76
+
77
+ echo wp_kses_post($info);
78
 
79
  if (is_array($plugin_imported) && array_key_exists('wppr', $plugin_imported)) {
80
+ echo wp_kses_post('<div class="yasr-indented-answer" style="margin-top: 10px;">'
81
  . __('You\'ve already imported WP-PostRatings data on', 'yet-another-stars-rating') .
82
  '&nbsp;<strong>' . $plugin_imported['wppr']['date'] . '</strong>
83
+ </div>');
84
  } else {
85
 
86
  $number_of_queries_wppr = (int) $rating_plugin_exists->yasr_count_wppr_query_number();
95
  <?php _e('Import data', 'yet-another-stars-rating') ?>
96
  </button>
97
  <input type="hidden" id="yasr-import-wppr-nonce"
98
+ value="<?php echo esc_attr($nonce_import_wppr) ?>">
99
  </div>
100
  <div id="yasr-import-wppr-answer" class="yasr-indented-answer">
101
  </div>
admin/settings/rankings/yasr-ranking-builder.php CHANGED
@@ -28,7 +28,7 @@ $cr_setting = new YasrSettingsRankings($custom_post_types);
28
 
29
  <h3> <?php _e('Rankings Options', 'yasr-pro');?> </h3>
30
 
31
- <table class="form-table" id="yasr-pro-charts-options">
32
  <!--Builder Container-->
33
  <tr>
34
  <td>
28
 
29
  <h3> <?php _e('Rankings Options', 'yasr-pro');?> </h3>
30
 
31
+ <table class="form-table yasr-settings-table" id="yasr-pro-charts-options">
32
  <!--Builder Container-->
33
  <tr>
34
  <td>
admin/settings/yasr-settings-functions-misc.php CHANGED
@@ -195,29 +195,18 @@ function yasr_description_strucutured_data()
195
  return $name . $div_desc . $description . $end_div;
196
  }
197
 
198
- function yasr_upgrade_pro_box( $position = false )
199
  {
200
 
201
  if ( yasr_fs()->is_free_plan() ) {
202
-
203
- if ( $position === "bottom" ) {
204
- $yasr_upgrade_class = "yasr-donatedivbottom";
205
- } else {
206
- $yasr_upgrade_class = "yasr-donatedivdx";
207
- }
208
-
209
  ?>
210
 
211
- <div class="<?php
212
- echo $yasr_upgrade_class ;
213
- ?>" style="display: none">
214
-
215
  <h2 class="yasr-donate-title" style="color: #34A7C1">
216
  <?php
217
  _e( 'Upgrade to YASR Pro', 'yet-another-stars-rating' );
218
  ?>
219
  </h2>
220
-
221
  <div class="yasr-upgrade-to-pro">
222
  <ul>
223
  <li><strong><?php
@@ -283,16 +272,9 @@ function yasr_upgrade_pro_box( $position = false )
283
  * Since version 1.9.5
284
  *
285
  */
286
- function yasr_resources_box( $position = false )
287
  {
288
-
289
- if ( $position === "bottom" ) {
290
- $yasr_metabox_class = "yasr-donatedivbottom";
291
- } else {
292
- $yasr_metabox_class = "yasr-donatedivdx";
293
- }
294
-
295
- $div = "<div class='{$yasr_metabox_class}' id='yasr-resources-box' style='display:none;'>";
296
  $text = '<div class="yasr-donate-title">Resources</div>';
297
  $text .= '<div class="yasr-donate-single-resource">
298
  <span class="dashicons dashicons-star-filled" style="color: #ccc"></span>
@@ -317,18 +299,16 @@ function yasr_resources_box( $position = false )
317
  </a>
318
  </div>';
319
  $div_and_text = $div . $text . '</div>';
320
- echo $div_and_text ;
321
  }
322
 
323
- function yasr_buy_cofee( $position = false )
 
 
 
 
 
324
  {
325
-
326
- if ( $position === "bottom" ) {
327
- $yasr_metabox_class = "yasr-donatedivbottom";
328
- } else {
329
- $yasr_metabox_class = "yasr-donatedivdx";
330
- }
331
-
332
  $buymecofeetext = __( 'Coffee is vital to make YASR development going on!', 'yet-another-stars-rating' );
333
  $buymecofeetext .= '<br />';
334
 
@@ -338,7 +318,7 @@ function yasr_buy_cofee( $position = false )
338
  $buymecofeetext .= __( 'If you are enjoying YASR, please consider to buy me a coffee, thanks!', 'yet-another-stars-rating' );
339
  }
340
 
341
- $div = "<div class='{$yasr_metabox_class}' id='yasr-buy-cofee' style='display:none;'>";
342
  $text = '<div class="yasr-donate-title">' . __( 'Buy me a coffee!', 'yet-another-stars-rating' ) . '</div>';
343
  $text .= '<div style="text-align: center">';
344
  $text .= '<a href="https://www.buymeacoffee.com/dariocurvino" target="_blank">
@@ -349,22 +329,38 @@ function yasr_buy_cofee( $position = false )
349
  $text .= $buymecofeetext;
350
  $text .= '</div>';
351
  $div_and_text = $div . $text . '</div>';
352
- echo $div_and_text ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
353
  }
354
 
355
  /** Add a box on the right for asking to rate 5 stars on Wordpress.org
356
  * Since version 0.9.0
357
  */
358
- function yasr_ask_rating( $position = false )
359
  {
360
-
361
- if ( $position === "bottom" ) {
362
- $yasr_metabox_class = "yasr-donatedivbottom";
363
- } else {
364
- $yasr_metabox_class = "yasr-donatedivdx";
365
- }
366
-
367
- $div = "<div class='{$yasr_metabox_class}' id='yasr-ask-five-stars' style='display:none;'>";
368
  $text = '<div class="yasr-donate-title">' . __( 'Can I ask your help?', 'yet-another-stars-rating' ) . '</div>';
369
  $text .= '<div style="font-size: 32px; color: #F1CB32; text-align:center; margin-bottom: 20px; margin-top: -5px;">
370
  <span class="dashicons dashicons-star-filled" style="font-size: 26px;"></span>
@@ -380,19 +376,21 @@ function yasr_ask_rating( $position = false )
380
  $text .= "<br /><br />";
381
  $text .= "<em>> Dario Curvino</em>";
382
  $div_and_text = $div . $text . '</div>';
383
- echo $div_and_text ;
384
  }
385
 
386
- /****
387
- Yasr Right settings panel, since version 1.9.5
388
- ****/
389
- function yasr_right_settings_panel( $position = false )
 
390
  {
391
- do_action( 'yasr_right_settings_panel_box', $position );
392
- yasr_upgrade_pro_box( $position );
393
- yasr_resources_box( $position );
394
- yasr_buy_cofee( $position );
395
- yasr_ask_rating( $position );
 
396
  }
397
 
398
  /** Change default admin footer on yasr settings pages
195
  return $name . $div_desc . $description . $end_div;
196
  }
197
 
198
+ function yasr_upgrade_pro_box()
199
  {
200
 
201
  if ( yasr_fs()->is_free_plan() ) {
 
 
 
 
 
 
 
202
  ?>
203
 
204
+ <div class="yasr-donatedivdx">
 
 
 
205
  <h2 class="yasr-donate-title" style="color: #34A7C1">
206
  <?php
207
  _e( 'Upgrade to YASR Pro', 'yet-another-stars-rating' );
208
  ?>
209
  </h2>
 
210
  <div class="yasr-upgrade-to-pro">
211
  <ul>
212
  <li><strong><?php
272
  * Since version 1.9.5
273
  *
274
  */
275
+ function yasr_resources_box()
276
  {
277
+ $div = "<div class='yasr-donatedivdx' id='yasr-resources-box'>";
 
 
 
 
 
 
 
278
  $text = '<div class="yasr-donate-title">Resources</div>';
279
  $text .= '<div class="yasr-donate-single-resource">
280
  <span class="dashicons dashicons-star-filled" style="color: #ccc"></span>
299
  </a>
300
  </div>';
301
  $div_and_text = $div . $text . '</div>';
302
+ echo wp_kses_post( $div_and_text ) ;
303
  }
304
 
305
+ /**
306
+ * Adds buy a cofee box
307
+ *
308
+ * @author Dario Curvino <@dudo>
309
+ */
310
+ function yasr_buy_cofee()
311
  {
 
 
 
 
 
 
 
312
  $buymecofeetext = __( 'Coffee is vital to make YASR development going on!', 'yet-another-stars-rating' );
313
  $buymecofeetext .= '<br />';
314
 
318
  $buymecofeetext .= __( 'If you are enjoying YASR, please consider to buy me a coffee, thanks!', 'yet-another-stars-rating' );
319
  }
320
 
321
+ $div = "<div class='yasr-donatedivdx' id='yasr-buy-cofee'>";
322
  $text = '<div class="yasr-donate-title">' . __( 'Buy me a coffee!', 'yet-another-stars-rating' ) . '</div>';
323
  $text .= '<div style="text-align: center">';
324
  $text .= '<a href="https://www.buymeacoffee.com/dariocurvino" target="_blank">
329
  $text .= $buymecofeetext;
330
  $text .= '</div>';
331
  $div_and_text = $div . $text . '</div>';
332
+ echo wp_kses_post( $div_and_text ) ;
333
+ }
334
+
335
+ /**
336
+ * Show related plugins
337
+ *
338
+ * @author Dario Curvino <@dudo>
339
+ */
340
+ function yasr_related_plugins()
341
+ {
342
+ $movie_helper_description = __( 'Movie Helper allows you to easily add links to movie and tv shows, just by searching
343
+ them while you\'re writing your content. Search, click, done!', 'yet-another-stars-rating' );
344
+ $div = "<div class='yasr-donatedivdx' id='yasr-buy-cofee'>";
345
+ $text = '<div class="yasr-donate-title">' . __( 'You may also like...', 'yet-another-stars-rating' ) . '</div>';
346
+ $text .= '<div style="text-align: center">';
347
+ $text .= '<a href="https://wordpress.org/plugins/yet-another-movie/" target="_blank">
348
+ <img src="' . YASR_IMG_DIR . '/movie_helper.svg" alt="Movie Helper" >
349
+ </a>';
350
+ $text .= '</div>';
351
+ $text .= '<div style="margin-top: 15px;">';
352
+ $text .= $movie_helper_description;
353
+ $text .= '</div>';
354
+ $div_and_text = $div . $text . '</div>';
355
+ echo wp_kses_post( $div_and_text ) ;
356
  }
357
 
358
  /** Add a box on the right for asking to rate 5 stars on Wordpress.org
359
  * Since version 0.9.0
360
  */
361
+ function yasr_ask_rating()
362
  {
363
+ $div = "<div class='yasr-donatedivdx' id='yasr-ask-five-stars'>";
 
 
 
 
 
 
 
364
  $text = '<div class="yasr-donate-title">' . __( 'Can I ask your help?', 'yet-another-stars-rating' ) . '</div>';
365
  $text .= '<div style="font-size: 32px; color: #F1CB32; text-align:center; margin-bottom: 20px; margin-top: -5px;">
366
  <span class="dashicons dashicons-star-filled" style="font-size: 26px;"></span>
376
  $text .= "<br /><br />";
377
  $text .= "<em>> Dario Curvino</em>";
378
  $div_and_text = $div . $text . '</div>';
379
+ echo wp_kses_post( $div_and_text ) ;
380
  }
381
 
382
+ /**
383
+ * @author Dario Curvino <@dudo>
384
+ * @since 1.9.5
385
+ */
386
+ function yasr_right_settings_panel()
387
  {
388
+ do_action( 'yasr_right_settings_panel_box' );
389
+ yasr_upgrade_pro_box();
390
+ yasr_resources_box();
391
+ yasr_buy_cofee();
392
+ yasr_related_plugins();
393
+ yasr_ask_rating();
394
  }
395
 
396
  /** Change default admin footer on yasr settings pages
admin/settings/yasr-settings-page.php CHANGED
@@ -78,14 +78,8 @@ if (!current_user_can('manage_options')) {
78
  } //End tab ur options
79
 
80
  if ($active_tab === 'migration_tools') {
81
- ?>
82
- <?php
83
- //include migration functions
84
- include(YASR_ABSOLUTE_PATH_ADMIN . '/settings/migrations/yasr-settings-migration-page.php');
85
- ?>
86
- <div class="yasr-space-settings-div">
87
- </div>
88
- <?php
89
  } //End tab migration
90
 
91
  //Adds new tab content here
@@ -95,16 +89,9 @@ if (!current_user_can('manage_options')) {
95
 
96
  </div> <!--End yasr-settingsdiv-->
97
 
 
98
  <?php
99
- //Print panel to the right
100
  yasr_right_settings_panel();
101
- ?>
102
-
103
- <div>
104
- </div>
105
-
106
- <?php
107
- yasr_right_settings_panel('bottom');
108
  ?>
109
  <!--End div wrap-->
110
  </div>
78
  } //End tab ur options
79
 
80
  if ($active_tab === 'migration_tools') {
81
+ //include migration functions
82
+ include(YASR_ABSOLUTE_PATH_ADMIN . '/settings/migrations/yasr-settings-migration-page.php');
 
 
 
 
 
 
83
  } //End tab migration
84
 
85
  //Adds new tab content here
89
 
90
  </div> <!--End yasr-settingsdiv-->
91
 
92
+ <div class="yasr-clear-both-dynamic"></div>
93
  <?php
 
94
  yasr_right_settings_panel();
 
 
 
 
 
 
 
95
  ?>
96
  <!--End div wrap-->
97
  </div>
admin/settings/yasr-stats-page.php CHANGED
@@ -1,156 +1,136 @@
1
- <?php
2
-
3
- /*
4
-
5
- Copyright 2014 Dario Curvino (email : d.curvino@tiscali.it)
6
-
7
- This program is free software: you can redistribute it and/or modify
8
- it under the terms of the GNU General Public License as published by
9
- the Free Software Foundation, either version 2 of the License, or
10
- (at your option) any later version.
11
-
12
- This program is distributed in the hope that it will be useful,
13
- but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- GNU General Public License for more details.
16
-
17
- You should have received a copy of the GNU General Public License
18
- along with this program. If not, see <http://www.gnu.org/licenses/>
19
- */
20
-
21
- if (!defined('ABSPATH')) {
22
- exit('You\'re not allowed to see this page');
23
- } // Exit if accessed directly
24
-
25
- if (!current_user_can('manage_options')) {
26
- wp_die(__('You do not have sufficient permissions to access this page.', 'yet-another-stars-rating'));
27
- }
28
-
29
- ?>
30
-
31
- <div class="wrap">
32
-
33
- <h2>Yet Another Stars Rating: <?php _e("Ratings Stats", 'yet-another-stars-rating'); ?></h2>
34
-
35
- <?php
36
- if (isset($_GET['tab'])) {
37
- $active_tab = $_GET['tab'];
38
- } else {
39
- $active_tab = 'logs';
40
- }
41
- ?>
42
-
43
- <h2 class="nav-tab-wrapper yasr-no-underline">
44
-
45
- <a href="?page=yasr_stats_page&tab=logs" class="nav-tab
46
- <?php echo ($active_tab === 'logs') ? 'nav-tab-active' : ''; ?>"
47
- >
48
- <?php _e("Visitor Votes", 'yet-another-stars-rating'); ?>
49
- </a>
50
-
51
- <a href="?page=yasr_stats_page&tab=logs_multi" class="nav-tab
52
- <?php echo ($active_tab === 'logs_multi') ? 'nav-tab-active' : ''; ?>"
53
- >
54
- <?php _e("MultiSet", 'yet-another-stars-rating'); ?>
55
- </a>
56
-
57
- <a href="?page=yasr_stats_page&tab=overall" class="nav-tab
58
- <?php echo ($active_tab === 'overall') ? 'nav-tab-active' : ''; ?>"
59
- >
60
- <?php _e("Overall Rating", 'yet-another-stars-rating'); ?>
61
- </a>
62
-
63
- <?php
64
- //Use this hooks to add tabs in the stats page
65
- do_action('yasr_add_stats_tab', $active_tab);
66
- ?>
67
-
68
- <a href="?page=yasr_settings_page-pricing" class="nav-tab">
69
- <?php _e("Upgrade", 'yet-another-stars-rating'); ?>
70
- </a>
71
-
72
- </h2>
73
-
74
- <?php
75
-
76
- if ($active_tab === 'logs' || $active_tab === '') {
77
- ?>
78
-
79
- <div class="yasr-settingsdiv">
80
- <form action="#" id="" method="POST">
81
- <?php
82
- wp_nonce_field('yasr-delete-stats-logs', 'yasr-nonce-delete-stats-logs');
83
- $yasr_stats_log_table = new YasrStats($active_tab);
84
- $yasr_stats_log_table->prepare_items();
85
- $yasr_stats_log_table->display();
86
- ?>
87
- </form>
88
- </div>
89
-
90
- <?php
91
- yasr_right_settings_panel();
92
- ?>
93
-
94
- <div class="yasr-space-settings-div">
95
- </div>
96
-
97
- <?php
98
-
99
- } //End if tab 'logs'
100
-
101
- if ($active_tab === 'logs_multi') {
102
- ?>
103
-
104
- <div class="yasr-settingsdiv">
105
- <form action="#" id="" method="POST">
106
- <?php
107
- wp_nonce_field('yasr-delete-stats-logs', 'yasr-nonce-delete-stats-logs');
108
- $yasr_stats_log_table = new YasrStats($active_tab);
109
- $yasr_stats_log_table->prepare_items();
110
- $yasr_stats_log_table->display();
111
- ?>
112
- </form>
113
- </div>
114
-
115
- <?php
116
- yasr_right_settings_panel();
117
- ?>
118
-
119
- <div class="yasr-space-settings-div">
120
- </div>
121
-
122
- <?php
123
-
124
- } //End if tab 'general_settings'
125
-
126
- if ($active_tab === 'overall') {
127
- ?>
128
-
129
- <div class="yasr-settingsdiv">
130
- <form action="#" id="" method="POST">
131
- <?php
132
- wp_nonce_field('yasr-delete-stats-logs', 'yasr-nonce-delete-stats-logs');
133
- $yasr_stats_log_table = new YasrStats($active_tab);
134
- $yasr_stats_log_table->prepare_items();
135
- $yasr_stats_log_table->display();
136
- ?>
137
- </form>
138
- </div>
139
-
140
- <?php
141
- yasr_right_settings_panel();
142
- ?>
143
-
144
- <div class="yasr-space-settings-div">
145
- </div>
146
-
147
- <?php
148
-
149
- } //End if tab 'overall'
150
-
151
- do_action('yasr_settings_check_active_tab', $active_tab);
152
- yasr_right_settings_panel('bottom');
153
- ?>
154
-
155
- <!--End div wrap-->
156
- </div>
1
+ <?php
2
+
3
+ /*
4
+
5
+ Copyright 2014 Dario Curvino (email : d.curvino@tiscali.it)
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 2 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see <http://www.gnu.org/licenses/>
19
+ */
20
+
21
+ if (!defined('ABSPATH')) {
22
+ exit('You\'re not allowed to see this page');
23
+ } // Exit if accessed directly
24
+
25
+ if (!current_user_can('manage_options')) {
26
+ wp_die(__('You do not have sufficient permissions to access this page.', 'yet-another-stars-rating'));
27
+ }
28
+
29
+ if (isset($_GET['tab'])) {
30
+ $active_tab = $_GET['tab'];
31
+ } else {
32
+ $active_tab = 'logs';
33
+ }
34
+
35
+ ?>
36
+
37
+ <div class="wrap">
38
+ <h2>Yet Another Stars Rating: <?php _e("Ratings Stats", 'yet-another-stars-rating'); ?></h2>
39
+
40
+ <h2 class="nav-tab-wrapper yasr-no-underline">
41
+
42
+ <a href="?page=yasr_stats_page&tab=logs" class="nav-tab
43
+ <?php echo ($active_tab === 'logs') ? 'nav-tab-active' : ''; ?>"
44
+ >
45
+ <?php _e("Visitor Votes", 'yet-another-stars-rating'); ?>
46
+ </a>
47
+
48
+ <a href="?page=yasr_stats_page&tab=logs_multi" class="nav-tab
49
+ <?php echo ($active_tab === 'logs_multi') ? 'nav-tab-active' : ''; ?>"
50
+ >
51
+ <?php _e("MultiSet", 'yet-another-stars-rating'); ?>
52
+ </a>
53
+
54
+ <a href="?page=yasr_stats_page&tab=overall" class="nav-tab
55
+ <?php echo ($active_tab === 'overall') ? 'nav-tab-active' : ''; ?>"
56
+ >
57
+ <?php _e("Overall Rating", 'yet-another-stars-rating'); ?>
58
+ </a>
59
+
60
+ <?php
61
+ //Use this hooks to add tabs in the stats page
62
+ do_action('yasr_add_stats_tab', $active_tab);
63
+ ?>
64
+
65
+ <a href="?page=yasr_settings_page-pricing" class="nav-tab">
66
+ <?php _e("Upgrade", 'yet-another-stars-rating'); ?>
67
+ </a>
68
+
69
+ </h2>
70
+
71
+ <?php
72
+
73
+ if ($active_tab === 'logs' || $active_tab === '') {
74
+ ?>
75
+
76
+ <div class="yasr-settingsdiv yasr-settings-table">
77
+ <div class="yasr-settings-table">
78
+ <form action="#" id="" method="POST">
79
+ <?php
80
+ wp_nonce_field('yasr-delete-stats-logs', 'yasr-nonce-delete-stats-logs');
81
+ $yasr_stats_log_table = new YasrStats($active_tab);
82
+ $yasr_stats_log_table->prepare_items();
83
+ $yasr_stats_log_table->display();
84
+ ?>
85
+ </form>
86
+ </div>
87
+ </div>
88
+
89
+ <?php
90
+
91
+ } //End if tab 'logs'
92
+
93
+ if ($active_tab === 'logs_multi') {
94
+ ?>
95
+ <div class="yasr-settingsdiv yasr-settings-table">
96
+ <div class="yasr-settings-table">
97
+ <form action="#" id="" method="POST">
98
+ <?php
99
+ wp_nonce_field('yasr-delete-stats-logs', 'yasr-nonce-delete-stats-logs');
100
+ $yasr_stats_log_table = new YasrStats($active_tab);
101
+ $yasr_stats_log_table->prepare_items();
102
+ $yasr_stats_log_table->display();
103
+ ?>
104
+ </form>
105
+ </div>
106
+ </div>
107
+ <?php
108
+
109
+ } //End if tab 'general_settings'
110
+
111
+ if ($active_tab === 'overall') {
112
+ ?>
113
+ <div class="yasr-settingsdiv">
114
+ <div class="yasr-settings-table">
115
+ <form action="#" id="" method="POST">
116
+ <?php
117
+ wp_nonce_field('yasr-delete-stats-logs', 'yasr-nonce-delete-stats-logs');
118
+ $yasr_stats_log_table = new YasrStats($active_tab);
119
+ $yasr_stats_log_table->prepare_items();
120
+ $yasr_stats_log_table->display();
121
+ ?>
122
+ </form>
123
+ </div>
124
+ </div>
125
+ <?php
126
+
127
+ } //End if tab 'overall'
128
+
129
+ do_action('yasr_settings_check_active_tab', $active_tab);
130
+ ?>
131
+
132
+ <div class="yasr-clear-both-dynamic"></div>
133
+
134
+ <?php yasr_right_settings_panel(); ?>
135
+
136
+ </div><!--End div wrap-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/classes/YasrCustomPostTypes.php CHANGED
@@ -1,5 +1,26 @@
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
  /**
5
  * @since 2.3.3
1
  <?php
2
 
3
+ /*
4
+
5
+ Copyright 2014 Dario Curvino (email : d.curvino@tiscali.it)
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 2 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see <http://www.gnu.org/licenses/>
19
+ */
20
+
21
+ if (!defined('ABSPATH')) {
22
+ exit('You\'re not allowed to see this page');
23
+ } // Exit if accessed directly
24
 
25
  /**
26
  * @since 2.3.3
includes/classes/YasrPhpFieldsHelper.php CHANGED
@@ -1,5 +1,27 @@
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /**
4
  * Class based on https://github.com/Dudo1985/phpFieldsHelper
5
  *
1
  <?php
2
 
3
+ /*
4
+
5
+ Copyright 2014 Dario Curvino (email : d.curvino@tiscali.it)
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 2 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see <http://www.gnu.org/licenses/>
19
+ */
20
+
21
+ if (!defined('ABSPATH')) {
22
+ exit('You\'re not allowed to see this page');
23
+ } // Exit if accessed directly
24
+
25
  /**
26
  * Class based on https://github.com/Dudo1985/phpFieldsHelper
27
  *
includes/img/movie_helper.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2119.53 566.24"><defs><style>.a{fill:#333;}.b{fill:#194172;}.c{fill:#d8eaf8;}.d{fill:#174172;}.e{fill:#f0f7fc;}.f{fill:#143b60;}.g{fill:#fff;}</style></defs><title>movie-helper-logo-horizontal</title><path class="a" d="M801.09,354.67,776,407.6q-5.49,10.59-13.62,10.59T748.74,407l-25.49-52.35V438H696V298.4h26.86L762.27,379l39.21-80.58h26.86V438H801.09Z" transform="translate(-36.47 -19.7)"/><path class="a" d="M969.1,361.73v10.58q0,35.1-13.23,51t-42.45,15.88q-29.2,0-42.25-15.88t-13-51.57V361.53q0-32.53,13.23-48.43t42-15.88q28.71,0,42.25,16.08T969.1,361.73Zm-27.25,10v-7.25q0-18.83-4.7-30-5.49-12.93-23.53-12.94-18.24,0-23.72,12.94-4.51,10.59-4.51,30v7.25q0,25.3,7.06,34.12a21.73,21.73,0,0,0,8.13,6.37,29.06,29.06,0,0,0,12.94,2.65,29.37,29.37,0,0,0,12.84-2.55A22.87,22.87,0,0,0,934.6,406a26.3,26.3,0,0,0,4.51-9.8Q941.86,386.63,941.85,371.72Z" transform="translate(-36.47 -19.7)"/><path class="a" d="M1099.87,298.4,1056,430.15q-3.54,9-12.55,9-9.4,0-12.94-9L987.14,298.4h28.23l28,91,28-91Z" transform="translate(-36.47 -19.7)"/><path class="a" d="M1153.79,438h-27.25V298.4h27.25Z" transform="translate(-36.47 -19.7)"/><path class="a" d="M1288.08,438h-49.4q-23.54,0-33-8.13t-9.51-28.73V298.4h91.95v24.31h-64.69v32.74h45.29l-2,24.31h-43.32v19.41q0,8.24,3.72,11.37t13.53,3.14h47.44Z" transform="translate(-36.47 -19.7)"/><path class="a" d="M1502.55,438H1475.3V381.53h-51.17V438h-27.25V298.4h27.25v59h51.17v-59h27.25Z" transform="translate(-36.47 -19.7)"/><path class="a" d="M1634.89,438h-49.41q-23.52,0-33-8.13t-9.51-28.73V298.4h92v24.31h-64.7v32.74h45.29l-2,24.31h-43.33v19.41q0,8.24,3.73,11.37t13.52,3.14h47.45Z" transform="translate(-36.47 -19.7)"/><path class="a" d="M1757.42,438h-41.56q-23.53,0-34-9.12t-10.49-29.7V298.4h27.26V399.17q0,8.24,3.72,11.37t13.53,3.14h41.56Z" transform="translate(-36.47 -19.7)"/><path class="a" d="M1877.11,310.46q12.06,12,12.06,35.38t-12.06,35.39q-12.06,12.06-34,12.06h-26.86V438H1789V298.4h54.11Q1865,298.4,1877.11,310.46Zm-15.19,35.38q0-23.13-20.2-23.13h-25.48v46.07h25.48q9.81,0,15-5.29T1861.92,345.84Z" transform="translate(-36.47 -19.7)"/><path class="a" d="M2013.86,438h-49.4q-23.54,0-33-8.13t-9.51-28.73V298.4h91.95v24.31h-64.7v32.74h45.29l-2,24.31h-43.33v19.41q0,8.24,3.73,11.37t13.53,3.14h47.44Z" transform="translate(-36.47 -19.7)"/><path class="a" d="M2156,438h-31.57l-27.25-51.76h-19.6V438h-27.25V328.4q0-15.69,7.25-22.84t24.31-7.16H2105q20.78,0,33,12.65t12.26,32.05q0,14.11-7.36,24.41a38.09,38.09,0,0,1-18.13,14.21Zm-38.52-80.48a21,21,0,0,0,5.58-14.9q0-8.92-5.39-14.41t-14.41-5.49h-13.53q-12.15,0-12.15,12.35v28.43h25.68A18.61,18.61,0,0,0,2117.48,357.51Z" transform="translate(-36.47 -19.7)"/><path class="b" d="M204.79,347.74l-85.44-48.41a30.78,30.78,0,0,0-41.92,11.58l-37,65.2a30.81,30.81,0,0,0,11.63,42l85.43,48.4Z" transform="translate(-36.47 -19.7)"/><path class="b" d="M437.92,347.74l85.44-48.41a30.82,30.82,0,0,1,42,11.58l36.93,65.2a30.79,30.79,0,0,1-11.58,42l-85.44,48.4Z" transform="translate(-36.47 -19.7)"/><polygon class="c" points="264.32 163.78 294.83 163.78 286.77 100.27 272.39 100.27 264.32 163.78"/><path class="d" d="M331.3,186H300.79a2.48,2.48,0,0,1-2.48-2.81l8.07-63.51a2.49,2.49,0,0,1,2.48-2.18h14.38a2.49,2.49,0,0,1,2.48,2.18l8.06,63.51A2.5,2.5,0,0,1,331.3,186Zm-27.67-5h24.83L321,122.47h-10Z" transform="translate(-36.47 -19.7)"/><path class="b" d="M368.56,243.94V186.12c0-10-10.46-18.11-23.36-18.11H288.36c-12.88,0-23.34,8.1-23.34,18.11v57.82Z" transform="translate(-36.47 -19.7)"/><path class="c" d="M577.84,466.69c0,48.14-31.24,89.71-75.42,107.23a126.38,126.38,0,0,1-46.63,8.86H181.45a126.34,126.34,0,0,1-46.66-8.87c-44.17-17.52-75.41-59.09-75.41-107.22,0-63.88,82.23-257.54,259.22-257.54C497.85,209.15,577.84,402.81,577.84,466.69Z" transform="translate(-36.47 -19.7)"/><path class="d" d="M455.79,585.93H181.45a128.85,128.85,0,0,1-47.82-9.1A124.87,124.87,0,0,1,78,533.61a114.29,114.29,0,0,1-21.73-66.92c0-17.36,5.77-42.27,15.82-68.32a359.74,359.74,0,0,1,48.06-86.3C156.72,263.68,220.88,206,318.6,206c98.85,0,163,57.68,199.35,106.06a355.66,355.66,0,0,1,47.53,86.31c9.85,26,15.51,50.86,15.51,68.31a114.33,114.33,0,0,1-21.74,66.93,124.76,124.76,0,0,1-55.67,43.22A129,129,0,0,1,455.79,585.93ZM318.6,212.3c-95.13,0-157.72,56.32-193.48,103.56C94.78,356,62.52,422.45,62.52,466.69a108,108,0,0,0,20.56,63.25A118.48,118.48,0,0,0,136,571a122.51,122.51,0,0,0,45.5,8.66H455.79A122.7,122.7,0,0,0,501.26,571a118.45,118.45,0,0,0,52.88-41,108.12,108.12,0,0,0,20.55-63.26c0-33.29-21.65-97.47-61.77-150.83C477.4,268.61,414.86,212.3,318.6,212.3Z" transform="translate(-36.47 -19.7)"/><path class="e" d="M561.66,478.67c0,40.83-28.36,73.59-63.61,92.2a117.71,117.71,0,0,1-45,8.62H180.41c-16.5,0-27.85-5.58-41.08-11.83-35.25-18.61-63.77-48.16-63.77-89,0-59.89,77.09-241.45,243-241.45C486.66,237.22,561.66,418.78,561.66,478.67Z" transform="translate(-36.47 -19.7)"/><path class="d" d="M318.74,282.09c-138.92,0-203.56,143.8-203.56,185.21s43.06,75.34,95.77,75.34H426.27c52.7,0,95.82-33.89,95.82-75.34S459.44,282.09,318.74,282.09Z" transform="translate(-36.47 -19.7)"/><path class="f" d="M318.7,301.86c-128.38,0-188.11,132.89-188.11,171.16s39.79,69.62,88.5,69.62h199c48.71,0,88.56-31.32,88.56-69.62S448.73,301.86,318.7,301.86Z" transform="translate(-36.47 -19.7)"/><path class="g" d="M260.68,406.17a37.14,37.14,0,0,1-37.34,36.89c-20.65,0-37.39-16.55-37.39-36.89s16.74-36.89,37.39-36.89A37.12,37.12,0,0,1,260.68,406.17Z" transform="translate(-36.47 -19.7)"/><path class="g" d="M451.26,406.17c0,20.34-16.72,36.89-37.37,36.89s-37.39-16.55-37.39-36.89,16.77-36.89,37.39-36.89A37.13,37.13,0,0,1,451.26,406.17Z" transform="translate(-36.47 -19.7)"/><path class="d" d="M285.9,21.48,371.75,70a13.07,13.07,0,0,1,0,22.85L285.9,141.43c-9,5.07-20.2-1.27-20.2-11.43V32.9C265.7,22.75,276.92,16.41,285.9,21.48Z" transform="translate(-36.47 -19.7)"/><path class="g" d="M259,484H383c2.15,0-4,39-61,40C266,525,256.38,484,259,484Z" transform="translate(-36.47 -19.7)"/></svg>
includes/shortcodes/classes/YasrShortcodesAjax.php CHANGED
@@ -488,10 +488,10 @@ class YasrShortcodesAjax {
488
  */
489
  public function returnVVStats() {
490
  if (isset($_POST['post_id']) && $_POST['post_id'] !== '') {
491
- $post_id = (int) $_POST['post_id'];
492
  }
493
  else {
494
- return;
495
  }
496
 
497
  $votes_array = YasrDatabaseRatings::getVisitorVotes($post_id);
488
  */
489
  public function returnVVStats() {
490
  if (isset($_POST['post_id']) && $_POST['post_id'] !== '') {
491
+ $post_id = (int)$_POST['post_id'];
492
  }
493
  else {
494
+ die('Missing post ID');
495
  }
496
 
497
  $votes_array = YasrDatabaseRatings::getVisitorVotes($post_id);
includes/shortcodes/classes/YasrVisitorMultiSet.php CHANGED
@@ -50,7 +50,7 @@ class YasrVisitorMultiSet extends YasrMultiSet {
50
  $image = YASR_IMG_DIR . "/loader.gif";
51
  $this->loader_html = "<span class='yasr-loader-multiset-visitor'
52
  id='yasr-loader-multiset-visitor-$post_set_id'>
53
- &nbsp;<img src='$image' title='yasr-loader' alt='yasr-loader'>
54
  </span>";
55
 
56
  $this->button_html = "<input type='submit'
50
  $image = YASR_IMG_DIR . "/loader.gif";
51
  $this->loader_html = "<span class='yasr-loader-multiset-visitor'
52
  id='yasr-loader-multiset-visitor-$post_set_id'>
53
+ &nbsp;<img src='".esc_url($image)."' title='yasr-loader' alt='yasr-loader'>
54
  </span>";
55
 
56
  $this->button_html = "<input type='submit'
includes/shortcodes/classes/YasrVisitorVotes.php CHANGED
@@ -156,7 +156,7 @@ class YasrVisitorVotes extends YasrShortcode {
156
  YasrShortcode::enqueueReadonlyAndMultisetScript();
157
 
158
  //Use this filter to customize yasr_visitor_votes readonly
159
- return apply_filters('yasr_vv_ro_shortcode', $shortcode_html, $stored_votes);
160
  }
161
 
162
  /**
156
  YasrShortcode::enqueueReadonlyAndMultisetScript();
157
 
158
  //Use this filter to customize yasr_visitor_votes readonly
159
+ return apply_filters('yasr_vv_ro_shortcode', $shortcode_html, $stored_votes, $this->post_id);
160
  }
161
 
162
  /**
includes/yasr-includes-functions.php CHANGED
@@ -33,7 +33,7 @@ function yasr_add_scripts_includes() {
33
  wp_enqueue_script( 'yasr-global-data' );
34
 
35
  $yasr_visitor_votes_loader = '<div id="loader-visitor-rating" style="display: inline-block">&nbsp; '.
36
- ' <img src=' . YASR_IMG_DIR . 'loader.gif title="yasr-loader" alt="yasr-loader"></div>';
37
 
38
  $yasr_common_data = json_encode(array(
39
  'ajaxurl' => admin_url('admin-ajax.php'),
33
  wp_enqueue_script( 'yasr-global-data' );
34
 
35
  $yasr_visitor_votes_loader = '<div id="loader-visitor-rating" style="display: inline-block">&nbsp; '.
36
+ ' <img src="' . esc_url(YASR_IMG_DIR . 'loader.gif').'" title="yasr-loader" alt="yasr-loader"></div>';
37
 
38
  $yasr_common_data = json_encode(array(
39
  'ajaxurl' => admin_url('admin-ajax.php'),
public/classes/YasrRichSnippets.php CHANGED
@@ -23,7 +23,8 @@ class YasrRichSnippets {
23
  */
24
  public function addSchema($content) {
25
  //if both shortcodes ov_rating and visitor votes didn't run, return $content
26
- if (!defined('YASR_OV_ATTRIBUTES') && !defined('YASR_VV_ATTRIBUTES')) {
 
27
  return $content;
28
  }
29
 
@@ -73,7 +74,10 @@ class YasrRichSnippets {
73
  if (is_singular() && is_main_query()) {
74
  $rich_snippet = $this->returnRichSnippets($post_id, $review_choosen, $content, $overall_rating, $visitor_votes);
75
 
76
- return $content . $script_type . json_encode($rich_snippet) . $end_script_type;
 
 
 
77
  }
78
 
79
  return $content;
@@ -81,6 +85,8 @@ class YasrRichSnippets {
81
  } //End function
82
 
83
  /**
 
 
84
  * @author Dario Curvino <@dudo>
85
  * @since 2.8.0
86
  * @param $post_id
@@ -89,24 +95,11 @@ class YasrRichSnippets {
89
  * @param $overall_rating
90
  * @param $visitor_votes
91
  *
92
- * @return array|mixed|void
93
  */
94
  public function returnRichSnippets($post_id, $review_choosen, $content, $overall_rating, $visitor_votes) {
95
  $rich_snippet_data = $this->richSnippetsGetData($post_id);
96
-
97
- $rich_snippet['@context'] = 'https://schema.org/';
98
- $rich_snippet['@type'] = $review_choosen;
99
- $rich_snippet['name'] = $rich_snippet_data['review_name'];
100
-
101
- $cleaned_content = wp_strip_all_tags(strip_shortcodes($content));
102
- $rich_snippet['description'] = wp_trim_words($cleaned_content, 55, '...');
103
-
104
- $rich_snippet['image'] = array(
105
- '@type' => 'ImageObject',
106
- 'url' => $rich_snippet_data['post_image_url'],
107
- 'width' => $rich_snippet_data['post_image_size'][0],
108
- 'height' => $rich_snippet_data['post_image_size'][1]
109
- );
110
 
111
  //Add everywhere except for blogPosting
112
  if ($review_choosen !== 'BlogPosting') {
@@ -127,6 +120,17 @@ class YasrRichSnippets {
127
  $rich_snippet = $filtered_rich_snippet;
128
  }
129
 
 
 
 
 
 
 
 
 
 
 
 
130
  return $rich_snippet;
131
  }
132
 
@@ -222,7 +226,7 @@ class YasrRichSnippets {
222
  * @param $cleaned_content
223
  * @param $overall_rating
224
  *
225
- * @return array|void
226
  */
227
  private function richSnippetsReview($rich_snippet_data, $cleaned_content, $overall_rating) {
228
  if ($overall_rating) {
@@ -247,7 +251,7 @@ class YasrRichSnippets {
247
 
248
  return $rich_snippet;
249
  }
250
-
251
  }
252
 
253
  /**
@@ -256,7 +260,7 @@ class YasrRichSnippets {
256
  *
257
  * @param $visitor_votes
258
  *
259
- * @return array|void
260
  */
261
  private function richSnippetsAggregateRating ($visitor_votes) {
262
  if ($visitor_votes && $visitor_votes['sum_votes'] !== 0 && $visitor_votes['number_of_votes'] !== 0) {
@@ -273,6 +277,30 @@ class YasrRichSnippets {
273
 
274
  return $rich_snippet;
275
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  }
277
 
278
  /**
@@ -377,8 +405,8 @@ class YasrRichSnippets {
377
  'availability' => $post_meta['yasr_product_price_availability'],
378
  'url' => $post_meta['yasr_product_price_url'],
379
  );
380
-
381
  }
 
382
  return $rich_snippet;
383
  }
384
 
23
  */
24
  public function addSchema($content) {
25
  //if both shortcodes ov_rating and visitor votes didn't run, return $content
26
+ if (!defined('YASR_OV_ATTRIBUTES') && !defined('YASR_VV_ATTRIBUTES')
27
+ && !defined('YASR_PRO_UR_COMMENT_RICH_SNIPPET')) {
28
  return $content;
29
  }
30
 
74
  if (is_singular() && is_main_query()) {
75
  $rich_snippet = $this->returnRichSnippets($post_id, $review_choosen, $content, $overall_rating, $visitor_votes);
76
 
77
+ //If $rich snippet here is not false return microdata
78
+ if($rich_snippet !== false) {
79
+ return $content . $script_type . json_encode($rich_snippet) . $end_script_type;
80
+ }
81
  }
82
 
83
  return $content;
85
  } //End function
86
 
87
  /**
88
+ * Return rich snippets, or false if both aggregateRating and Review are empty after the last filter
89
+ *
90
  * @author Dario Curvino <@dudo>
91
  * @since 2.8.0
92
  * @param $post_id
95
  * @param $overall_rating
96
  * @param $visitor_votes
97
  *
98
+ * @return array|bool
99
  */
100
  public function returnRichSnippets($post_id, $review_choosen, $content, $overall_rating, $visitor_votes) {
101
  $rich_snippet_data = $this->richSnippetsGetData($post_id);
102
+ $cleaned_content = wp_strip_all_tags(strip_shortcodes($content));
 
 
 
 
 
 
 
 
 
 
 
 
 
103
 
104
  //Add everywhere except for blogPosting
105
  if ($review_choosen !== 'BlogPosting') {
120
  $rich_snippet = $filtered_rich_snippet;
121
  }
122
 
123
+ //if review and aggregateRating are still false after the filter, do not return rich snippets
124
+ if((!isset($rich_snippet['Review']) || $rich_snippet['Review'] === false)
125
+ && (!isset($rich_snippet['aggregateRating']) || $rich_snippet['aggregateRating'] === false)) {
126
+ return false;
127
+ }
128
+
129
+ $rich_snippet = array_merge(
130
+ $this->richSnippetsCommon($review_choosen, $rich_snippet_data, $cleaned_content),
131
+ $rich_snippet
132
+ );
133
+
134
  return $rich_snippet;
135
  }
136
 
226
  * @param $cleaned_content
227
  * @param $overall_rating
228
  *
229
+ * @return array|false
230
  */
231
  private function richSnippetsReview($rich_snippet_data, $cleaned_content, $overall_rating) {
232
  if ($overall_rating) {
251
 
252
  return $rich_snippet;
253
  }
254
+ return false;
255
  }
256
 
257
  /**
260
  *
261
  * @param $visitor_votes
262
  *
263
+ * @return array|false
264
  */
265
  private function richSnippetsAggregateRating ($visitor_votes) {
266
  if ($visitor_votes && $visitor_votes['sum_votes'] !== 0 && $visitor_votes['number_of_votes'] !== 0) {
277
 
278
  return $rich_snippet;
279
  }
280
+ return false;
281
+ }
282
+
283
+ /**
284
+ * @author Dario Curvino <@dudo>
285
+ * @since
286
+ * @return array
287
+ */
288
+ private function richSnippetsCommon ($review_choosen, $rich_snippet_data, $cleaned_content) {
289
+ $rich_snippet = array();
290
+ $rich_snippet['@context'] = 'https://schema.org/';
291
+ $rich_snippet['@type'] = $review_choosen;
292
+ $rich_snippet['name'] = $rich_snippet_data['review_name'];
293
+
294
+ $rich_snippet['description'] = wp_trim_words($cleaned_content, 55, '...');
295
+
296
+ $rich_snippet['image'] = array(
297
+ '@type' => 'ImageObject',
298
+ 'url' => $rich_snippet_data['post_image_url'],
299
+ 'width' => $rich_snippet_data['post_image_size'][0],
300
+ 'height' => $rich_snippet_data['post_image_size'][1]
301
+ );
302
+
303
+ return $rich_snippet;
304
  }
305
 
306
  /**
405
  'availability' => $post_meta['yasr_product_price_availability'],
406
  'url' => $post_meta['yasr_product_price_url'],
407
  );
 
408
  }
409
+
410
  return $rich_snippet;
411
  }
412
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: rating, rate post, rate page, star rating, google rating, votes
4
  Requires at least: 5.0
5
  Contributors: Dudo
6
  Tested up to: 5.9
7
- Stable tag: 2.9.0
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
  Boost the way people interact with your site with an easy WordPress stars rating system! With schema.org rich snippets YASR will improve your SEO
@@ -197,6 +197,11 @@ Yes, YASR is 100% fully compatible with PHP 8
197
 
198
  The full changelog can be found in the plugin's directory. Recent entries:
199
 
 
 
 
 
 
200
  = 2.9.0 =
201
  * FIXED: ranking yasr_most_or_highest_rated_posts doesn't load in some circumstances
202
 
4
  Requires at least: 5.0
5
  Contributors: Dudo
6
  Tested up to: 5.9
7
+ Stable tag: 2.9.1
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
  Boost the way people interact with your site with an easy WordPress stars rating system! With schema.org rich snippets YASR will improve your SEO
197
 
198
  The full changelog can be found in the plugin's directory. Recent entries:
199
 
200
+ 2.9.1
201
+ * FIXED: if shortcode exists for a post or page, but there are no ratings, wrong rich snippets are returned
202
+
203
+
204
+
205
  = 2.9.0 =
206
  * FIXED: ranking yasr_most_or_highest_rated_posts doesn't load in some circumstances
207
 
yet-another-stars-rating.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Yet Another Stars Rating
5
  * Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
6
  * Description: Boost the way people interact with your site with an easy WordPress stars rating system! With schema.org rich snippets YASR will improve your SEO
7
- * Version: 2.9.0
8
  * Requires at least: 5.6
9
  * Requires PHP: 5.4
10
  * Author: Dario Curvino
@@ -78,7 +78,7 @@ if ( !function_exists( 'yasr_fs' ) ) {
78
  yasr_fs();
79
  // Signal that SDK was initiated.
80
  do_action( 'yasr_fs_loaded' );
81
- define( 'YASR_VERSION_NUM', '2.9.0' );
82
  //Plugin absolute path
83
  //e.g. /var/www/html/plugin_development/wp-content/plugins/yet-another-stars-rating
84
  define( 'YASR_ABSOLUTE_PATH', __DIR__ );
4
  * Plugin Name: Yet Another Stars Rating
5
  * Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
6
  * Description: Boost the way people interact with your site with an easy WordPress stars rating system! With schema.org rich snippets YASR will improve your SEO
7
+ * Version: 2.9.1
8
  * Requires at least: 5.6
9
  * Requires PHP: 5.4
10
  * Author: Dario Curvino
78
  yasr_fs();
79
  // Signal that SDK was initiated.
80
  do_action( 'yasr_fs_loaded' );
81
+ define( 'YASR_VERSION_NUM', '2.9.1' );
82
  //Plugin absolute path
83
  //e.g. /var/www/html/plugin_development/wp-content/plugins/yet-another-stars-rating
84
  define( 'YASR_ABSOLUTE_PATH', __DIR__ );