Version Description
- Improvement - Compatibility with the latest WordPress PHP_CodeSniffer rules.
- Improvement - Updated the Schema URL to the https instead of HTTP.
- Fix - Tabs conflict with the Astra theme.
- Fix - Image field is required error showing in the Recipe schema.
- Fix - Remove the support for Rating in the service schema as per the new Google update.
Download this release
Release Info
Developer | brainstormworg |
Plugin | All In One Schema Rich Snippets |
Version | 1.6.1 |
Comparing to | |
See all releases |
Code changes from version 1.6.0 to 1.6.1
- admin/css/admin.css +0 -6
- admin/index.php +1235 -1218
- css/style.css +1 -0
- functions.php +1352 -1337
- index.php +378 -316
- init.php +681 -561
- js/cmb.js +3 -2
- languages/all-in-one-schemaorg-rich-snippets.pot +1455 -0
- meta-boxes.php +1053 -935
- readme.txt +9 -2
- settings.php +184 -168
admin/css/admin.css
CHANGED
@@ -1,10 +1,4 @@
|
|
1 |
html{ display:block !important;}
|
2 |
-
.etabs { margin: 0; padding: 0; }
|
3 |
-
.tab { display: inline-block; zoom:1; *display:inline; background: #fff; border: solid 1px #999; border-bottom: none; -moz-border-radius: 4px 4px 0 0; -webkit-border-radius: 4px 4px 0 0; font-weight:bold; }
|
4 |
-
.tab a { box-shadow: none; font-size: 14px; line-height: 2em; display: block; padding: 0 10px; outline: none; text-decoration:none; color:rgb(175, 175, 175); }
|
5 |
-
.tab a:hover { text-decoration: none; color:#0073aa; }
|
6 |
-
.tab a.active { font-weight: bold; text-decoration:none; color:#333; }
|
7 |
-
.tab.active a:hover { text-decoration: none; color:#0073aa; }
|
8 |
.tab-container { width: 95%; }
|
9 |
.get_in_touch { margin: 10px; font-size: 14px;cursor: pointer;}
|
10 |
#bsf-postbox-container-2 {width: 65%;}
|
1 |
html{ display:block !important;}
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
.tab-container { width: 95%; }
|
3 |
.get_in_touch { margin: 10px; font-size: 14px;cursor: pointer;}
|
4 |
#bsf-postbox-container-2 {width: 65%;}
|
admin/index.php
CHANGED
@@ -1,1218 +1,1235 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
$
|
41 |
-
if( !
|
42 |
-
$
|
43 |
-
}
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
$
|
64 |
-
}
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
<td
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
<td
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
<td
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
<td
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
<tr>
|
212 |
-
<td align="right"><strong><label>'.
|
213 |
-
<td><input class="bsf_text_medium" type="text" name="
|
214 |
-
</tr>
|
215 |
-
<tr>
|
216 |
-
<td align="right"><strong><label>'.
|
217 |
-
<td><input class="bsf_text_medium" type="text" name="
|
218 |
-
</tr>
|
219 |
-
<tr>
|
220 |
-
<td align="right"><strong><label>'.
|
221 |
-
<td><input class="bsf_text_medium" type="text" name="
|
222 |
-
</tr>
|
223 |
-
<tr
|
224 |
-
|
225 |
-
<td
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
<td
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
<td
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
<td
|
271 |
-
|
272 |
-
|
273 |
-
<tr>
|
274 |
-
<td></td>
|
275 |
-
<td><input
|
276 |
-
</tr>
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
<td
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
<td
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
<td
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
<tr
|
422 |
-
|
423 |
-
<td
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
<tr>
|
443 |
-
<td
|
444 |
-
<td><input
|
445 |
-
</tr>
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
<td
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
<td
|
469 |
-
|
470 |
-
|
471 |
-
<tr>
|
472 |
-
<td></td>
|
473 |
-
<td><input
|
474 |
-
</tr>
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
<tr>
|
492 |
-
|
493 |
-
<td
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
<td
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
<
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
<
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
</
|
613 |
-
<
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
<div class="bsf-schema-features-1">
|
625 |
-
<div class="bsf-schema-features-wrap">
|
626 |
-
<div class="bsf-schema-features-icon">
|
627 |
-
<img src="'.plugins_url(
|
628 |
-
</div>
|
629 |
-
<div class="bsf-schema-features-cont">
|
630 |
-
<h3>
|
631 |
-
<p>Schema Pro
|
632 |
-
</div>
|
633 |
-
</div>
|
634 |
-
</div>
|
635 |
-
<div class="bsf-schema-features-1">
|
636 |
-
<div class="bsf-schema-features-wrap">
|
637 |
-
<div class="bsf-schema-features-icon">
|
638 |
-
<img src="'.plugins_url(
|
639 |
-
</div>
|
640 |
-
<div class="bsf-schema-features-cont">
|
641 |
-
<h3>
|
642 |
-
<p>Schema Pro
|
643 |
-
</div>
|
644 |
-
</div>
|
645 |
-
</div>
|
646 |
-
<div class="bsf-schema-features-1">
|
647 |
-
<div class="bsf-schema-features-wrap">
|
648 |
-
<div class="bsf-schema-features-icon">
|
649 |
-
<img src="'.plugins_url(
|
650 |
-
</div>
|
651 |
-
<div class="bsf-schema-features-cont">
|
652 |
-
<h3>
|
653 |
-
<p>Schema Pro lets you
|
654 |
-
</div>
|
655 |
-
</div>
|
656 |
-
</div>
|
657 |
-
<div class="bsf-schema-features-1">
|
658 |
-
<div class="bsf-schema-features-wrap">
|
659 |
-
<div class="bsf-schema-features-icon">
|
660 |
-
<img src="'.plugins_url(
|
661 |
-
</div>
|
662 |
-
<div class="bsf-schema-features-cont">
|
663 |
-
<h3>
|
664 |
-
<p>Schema Pro
|
665 |
-
</div>
|
666 |
-
</div>
|
667 |
-
</div>
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
<
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
<
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
<
|
757 |
-
<
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
<
|
764 |
-
<
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
<
|
773 |
-
<
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
</
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
<
|
864 |
-
<
|
865 |
-
<
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
</
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
}
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
{
|
938 |
-
if(isset($_POST[$option]))
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
$status
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
if(isset($_POST['
|
948 |
-
{
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
{
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
)
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
else {
|
1012 |
-
foreach(array('snippet_title','software_rating','software_agr','software_price','software_name','software_os','software_website') as $option)
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
}
|
1042 |
-
|
1043 |
-
{
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
}
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
}
|
1090 |
-
|
1091 |
-
{
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
if($option_to_reset
|
1098 |
-
delete_option('
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
if($option_to_reset
|
1105 |
-
delete_option('
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
if($option_to_reset
|
1112 |
-
delete_option('
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
{
|
1124 |
-
require_once
|
1125 |
-
if(
|
1126 |
-
add_review_option();
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
if($option_to_reset
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
if($option_to_reset
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
if($option_to_reset
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
{
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
<tr><td
|
1204 |
-
<td
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Start object buffering to supress warning messages.
|
4 |
+
*
|
5 |
+
* @package Schema - All In One Schema Rich Snippets.
|
6 |
+
*/
|
7 |
+
|
8 |
+
ob_start();
|
9 |
+
if ( is_admin() ) {
|
10 |
+
add_action( 'admin_footer', 'add_footer_script' );
|
11 |
+
}
|
12 |
+
/**
|
13 |
+
* Enqueues the styles in admin dashboard.
|
14 |
+
*
|
15 |
+
* @return void
|
16 |
+
*/
|
17 |
+
function bsf_admin_styles() {
|
18 |
+
wp_enqueue_style( 'star_style' );
|
19 |
+
wp_enqueue_style( 'meta_style' );
|
20 |
+
wp_enqueue_script( 'bsf_jquery' );
|
21 |
+
wp_enqueue_script( 'jquery-ui-core' );
|
22 |
+
wp_enqueue_script( 'bsf_jquery_star' );
|
23 |
+
}
|
24 |
+
/**
|
25 |
+
* Enqueues the scripts in admin dashboard.
|
26 |
+
*
|
27 |
+
* @return void
|
28 |
+
*/
|
29 |
+
function add_the_script() {
|
30 |
+
wp_enqueue_script( 'postbox' );
|
31 |
+
wp_enqueue_style( 'admin_style' );
|
32 |
+
}
|
33 |
+
add_action( 'admin_print_scripts', 'add_the_script' );
|
34 |
+
/**
|
35 |
+
* The Main Admin Dashboard for Rich Snippets Plugin.
|
36 |
+
*
|
37 |
+
* @return void
|
38 |
+
*/
|
39 |
+
function rich_snippet_dashboard() {
|
40 |
+
$plugins_url = plugins_url();
|
41 |
+
if ( ! get_option( 'bsf_woocom_init_setting' ) ) {
|
42 |
+
$args_woocom = true;
|
43 |
+
} else {
|
44 |
+
$args_woocom = get_option( 'bsf_woocom_setting' );
|
45 |
+
}
|
46 |
+
|
47 |
+
$args_review = get_option( 'bsf_review' );
|
48 |
+
$args_event = get_option( 'bsf_event' );
|
49 |
+
$args_person = get_option( 'bsf_person' );
|
50 |
+
$args_product = get_option( 'bsf_product' );
|
51 |
+
$args_recipe = get_option( 'bsf_recipe' );
|
52 |
+
$args_soft = get_option( 'bsf_software' );
|
53 |
+
$args_video = get_option( 'bsf_video' );
|
54 |
+
$args_article = get_option( 'bsf_article' );
|
55 |
+
$args_service = get_option( 'bsf_service' );
|
56 |
+
|
57 |
+
$woo_setting = '';
|
58 |
+
if ( ! empty( $args_woocom ) ) {
|
59 |
+
$woo_setting = 'Checked';
|
60 |
+
}
|
61 |
+
|
62 |
+
if ( isset( $args_event['event_desc'] ) ) {
|
63 |
+
$event_desc = $args_event['event_desc'];
|
64 |
+
} else {
|
65 |
+
$event_desc = null;
|
66 |
+
}
|
67 |
+
|
68 |
+
if ( isset( $args_recipe['author_name'] ) ) {
|
69 |
+
$author_name = $args_recipe['author_name'];
|
70 |
+
} else {
|
71 |
+
$author_name = null;
|
72 |
+
}
|
73 |
+
|
74 |
+
if ( isset( $args_recipe['recipe_desc'] ) ) {
|
75 |
+
$recipe_desc = $args_recipe['recipe_desc'];
|
76 |
+
} else {
|
77 |
+
$recipe_desc = null;
|
78 |
+
}
|
79 |
+
|
80 |
+
if ( isset( $args_service['provider_location'] ) ) {
|
81 |
+
$provider_location = $args_service['provider_location'];
|
82 |
+
} else {
|
83 |
+
$provider_location = null;
|
84 |
+
}
|
85 |
+
|
86 |
+
$args_color = get_option( 'bsf_custom' );
|
87 |
+
echo '<div class="wrap">';
|
88 |
+
echo '<div id="star-icons-32" class="icon32"></div><h2>' . esc_html__( 'All in One Schema.org Rich Snippets - Dashboard', 'all-in-one-schemaorg-rich-snippets' ) . '</h2>';
|
89 |
+
echo '<div id="post-body" class="columns-2">';
|
90 |
+
echo '<div class="clear"></div>';
|
91 |
+
echo '<div id="bsf-postbox-container-2" class="postbox-container"><div id="tab-container" class="tab-container">';
|
92 |
+
echo '<ul class="nav-tab-wrapper bsf-tab-wraper">
|
93 |
+
<li><a href="#tab-1" class="nav-tab">' . esc_html__( 'Configuration', 'all-in-one-schemaorg-rich-snippets' ) . '</a></li>
|
94 |
+
<li><a href="#tab-4" class="nav-tab">' . esc_html__( 'Customization', 'all-in-one-schemaorg-rich-snippets' ) . '</a></li>
|
95 |
+
|
96 |
+
<li><a href="#tab-3" class="nav-tab">' . esc_html__( 'FAQs', 'all-in-one-schemaorg-rich-snippets' ) . '</a></li>
|
97 |
+
<li><a href="#tab-5" class="nav-tab">' . esc_html__( 'Getting Started', 'all-in-one-schemaorg-rich-snippets' ) . '</a></li>
|
98 |
+
</ul>
|
99 |
+
<div class="clear"></div>
|
100 |
+
<div class="panel-container bsf-panel">
|
101 |
+
<div id="tab-1">
|
102 |
+
<div id="poststuff">
|
103 |
+
<div class="schema-notice-head">
|
104 |
+
<p>' . esc_html__( 'Choose the schema markup and update the strings you want to display on the front-end.', 'all-in-one-schemaorg-rich-snippets' ) . '</p>
|
105 |
+
</div>
|
106 |
+
<div id="postbox-container-2" class="postbox-container">
|
107 |
+
<div class="meta-box-sortables ui-sortable">
|
108 |
+
<div class="postbox closed">
|
109 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
110 |
+
<h3 class="hndle"><span>' . esc_html__( 'Item Review', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
|
111 |
+
<div class="inside">
|
112 |
+
<div class="table">
|
113 |
+
<p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Item Review Rich Snippets —</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
|
114 |
+
<form id="bsf_review_form" method="post">
|
115 |
+
' . wp_nonce_field( 'snippet_review_form_action', 'snippet_review_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
116 |
+
. '
|
117 |
+
<table class="bsf_metabox">
|
118 |
+
<tbody>
|
119 |
+
<tr>
|
120 |
+
<td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
121 |
+
<td><input class="bsf_text_medium" type="text" name="review_title" value="' . esc_attr( stripslashes( $args_review['review_title'] ) ) . '"/></td>
|
122 |
+
</tr>
|
123 |
+
<tr>
|
124 |
+
<td align="right"><strong><label>' . esc_html__( 'Reviewer :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
125 |
+
<td><input class="bsf_text_medium" type="text" name="item_reviewer" value="' . esc_attr( stripslashes( $args_review['item_reviewer'] ) ) . '"/></td>
|
126 |
+
</tr>
|
127 |
+
<tr>
|
128 |
+
<td align="right"><strong><label>' . esc_html__( 'Review Date :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
129 |
+
<td><input class="bsf_text_medium" type="text" name="review_date" value="' . esc_attr( stripslashes( $args_review['review_date'] ) ) . '"/></td>
|
130 |
+
</tr>
|
131 |
+
<tr>
|
132 |
+
<td align="right"><strong><label>' . esc_html__( 'Item Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
133 |
+
<td><input class="bsf_text_medium" type="text" name="item_name" value="' . esc_attr( stripslashes( $args_review['item_name'] ) ) . '"/></td>
|
134 |
+
</tr>
|
135 |
+
<tr>
|
136 |
+
<td align="right"><strong><label>' . esc_html__( 'Item Ratings :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
137 |
+
<td><input class="bsf_text_medium" type="text" name="item_rating" value="' . esc_attr( stripslashes( $args_review['item_rating'] ) ) . '"/></td>
|
138 |
+
</tr>
|
139 |
+
<tr><td colspan="2"></td></tr>
|
140 |
+
<tr>
|
141 |
+
<td></td>
|
142 |
+
<td><input type="submit" class="button-primary" name="item_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/> <a class="button-primary" href="?page=rich_snippet_dashboard&action=reset&options=review">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
|
143 |
+
</tr>
|
144 |
+
</tbody>
|
145 |
+
</table>
|
146 |
+
</form>
|
147 |
+
</div>
|
148 |
+
</div>
|
149 |
+
</div>
|
150 |
+
<div class="postbox closed">
|
151 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
152 |
+
<h3 class="hndle"><span>' . esc_html__( 'Events', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
|
153 |
+
<div class="inside">
|
154 |
+
<div class="table">
|
155 |
+
<p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Events Rich Snippets —</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
|
156 |
+
<form id="bsf_event_form" method="post">
|
157 |
+
' . wp_nonce_field( 'snippet_event_form_action', 'snippet_event_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
158 |
+
. '
|
159 |
+
<table class="bsf_metabox">
|
160 |
+
<tbody>
|
161 |
+
<tr>
|
162 |
+
<td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
163 |
+
<td><input class="bsf_text_medium" type="text" name="snippet_title" value="' . esc_attr( stripslashes( $args_event['snippet_title'] ) ) . '"/></td>
|
164 |
+
</tr>
|
165 |
+
<tr>
|
166 |
+
<td align="right"><strong><label>' . esc_html__( 'Event Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
167 |
+
<td><input class="bsf_text_medium" type="text" name="event_title" value="' . esc_attr( stripslashes( $args_event['event_title'] ) ) . '"/></td>
|
168 |
+
</tr>
|
169 |
+
<tr>
|
170 |
+
<td align="right"><strong><label>' . esc_html__( 'Event Location :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
171 |
+
<td><input class="bsf_text_medium" type="text" name="event_location" value="' . esc_attr( stripslashes( $args_event['event_location'] ) ) . '"/></td>
|
172 |
+
</tr>
|
173 |
+
<tr>
|
174 |
+
<td align="right"><strong><label>' . esc_html__( 'Start Time :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
175 |
+
<td><input class="bsf_text_medium" type="text" name="start_time" value="' . esc_attr( stripslashes( $args_event['start_time'] ) ) . '"/></td>
|
176 |
+
</tr>
|
177 |
+
<tr>
|
178 |
+
<td align="right"><strong><label>' . esc_html__( 'End Time :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
179 |
+
<td><input class="bsf_text_medium" type="text" name="end_time" value="' . esc_attr( stripslashes( $args_event['end_time'] ) ) . '"/></td>
|
180 |
+
</tr>
|
181 |
+
<tr>
|
182 |
+
<td align="right"><strong><label>' . esc_html__( 'Description :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
183 |
+
<td><input class="bsf_text_medium" type="text" name="event_desc" value="' . esc_attr( stripslashes( $event_desc ) ) . '"/></td>
|
184 |
+
</tr>
|
185 |
+
<tr>
|
186 |
+
<td align="right"><strong><label>' . esc_html__( 'Ticket Promotion :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
187 |
+
<td><input class="bsf_text_medium" type="text" name="events_price" value="' . esc_attr( stripslashes( $args_event['events_price'] ) ) . '"/></td>
|
188 |
+
</tr>
|
189 |
+
<tr><td colspan="2"></td></tr>
|
190 |
+
<tr>
|
191 |
+
<td></td>
|
192 |
+
<td><input type="submit" class="button-primary" name="event_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/> <a class="button-primary" href="?page=rich_snippet_dashboard&action=reset&options=event">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
|
193 |
+
</tr>
|
194 |
+
</tbody>
|
195 |
+
</table>
|
196 |
+
</form>
|
197 |
+
</div>
|
198 |
+
</div>
|
199 |
+
</div>
|
200 |
+
<div class="postbox closed">
|
201 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
202 |
+
<h3 class="hndle"><span>' . esc_html__( 'Person', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
|
203 |
+
<div class="inside">
|
204 |
+
<div class="table">
|
205 |
+
<p>' . wp_kses_post( __( "Strings to be displayed on frontend for <strong>Person's Rich Snippets —</strong>", 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
|
206 |
+
<form id="bsf_person_form" method="post">
|
207 |
+
' . wp_nonce_field( 'snippet_person_form_action', 'snippet_person_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
208 |
+
. '
|
209 |
+
<table class="bsf_metabox">
|
210 |
+
<tbody>
|
211 |
+
<tr>
|
212 |
+
<td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
213 |
+
<td><input class="bsf_text_medium" type="text" name="snippet_title" value="' . esc_attr( stripslashes( $args_person['snippet_title'] ) ) . '"/></td>
|
214 |
+
</tr>
|
215 |
+
<tr>
|
216 |
+
<td align="right"><strong><label>' . esc_html__( "Person's Name :", 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
217 |
+
<td><input class="bsf_text_medium" type="text" name="person_name" value="' . esc_attr( stripslashes( $args_person['person_name'] ) ) . '"/></td>
|
218 |
+
</tr>
|
219 |
+
<tr>
|
220 |
+
<td align="right"><strong><label>' . esc_html__( 'Nick Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
221 |
+
<td><input class="bsf_text_medium" type="text" name="person_nickname" value="' . esc_attr( stripslashes( $args_person['person_nickname'] ) ) . '"/></td>
|
222 |
+
</tr>
|
223 |
+
<tr>
|
224 |
+
<td align="right"><strong><label>' . esc_html__( 'Job Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
225 |
+
<td><input class="bsf_text_medium" type="text" name="person_job_title" value="' . esc_attr( stripslashes( $args_person['person_job_title'] ) ) . '"/></td>
|
226 |
+
</tr>
|
227 |
+
<tr>
|
228 |
+
<td align="right"><strong><label>' . esc_html__( 'Home page :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
229 |
+
<td><input class="bsf_text_medium" type="text" name="person_website" value="' . esc_attr( stripslashes( $args_person['person_website'] ) ) . '"/></td>
|
230 |
+
</tr>
|
231 |
+
<tr>
|
232 |
+
<td align="right"><strong><label>' . esc_html__( 'Company Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
233 |
+
<td><input class="bsf_text_medium" type="text" name="person_company" value="' . esc_attr( stripslashes( $args_person['person_company'] ) ) . '"/></td>
|
234 |
+
</tr>
|
235 |
+
<tr>
|
236 |
+
<td align="right"><strong><label>' . esc_html__( 'Address :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
237 |
+
<td><input class="bsf_text_medium" type="text" name="person_address" value="' . esc_attr( stripslashes( $args_person['person_address'] ) ) . '"/></td>
|
238 |
+
</tr>
|
239 |
+
<tr><td colspan="2"></td></tr>
|
240 |
+
<tr>
|
241 |
+
<td></td>
|
242 |
+
<td><input type="submit" class="button-primary" name="person_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/> <a class="button-primary" href="?page=rich_snippet_dashboard&action=reset&options=person">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
|
243 |
+
</tr>
|
244 |
+
</tbody>
|
245 |
+
</table>
|
246 |
+
</form>
|
247 |
+
</div>
|
248 |
+
</div>
|
249 |
+
</div>
|
250 |
+
<div class="postbox closed">
|
251 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
252 |
+
<h3 class="hndle"><span>' . esc_html__( 'Product', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
|
253 |
+
<div class="inside">
|
254 |
+
<div class="table">
|
255 |
+
<p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Product Rich Snippets —</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
|
256 |
+
<form id="bsf_product_form" method="post">
|
257 |
+
' . wp_nonce_field( 'snippet_product_form_action', 'snippet_product_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
258 |
+
. '
|
259 |
+
<table class="bsf_metabox">
|
260 |
+
<tbody>
|
261 |
+
<tr>
|
262 |
+
<td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
263 |
+
<td><input class="bsf_text_medium" type="text" name="snippet_title" value="' . esc_attr( stripslashes( $args_product['snippet_title'] ) ) . '"/></td>
|
264 |
+
</tr>
|
265 |
+
<tr>
|
266 |
+
<td align="right"><strong><label>' . esc_html__( 'Author Rating :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
267 |
+
<td><input class="bsf_text_medium" type="text" name="product_rating" value="' . esc_attr( stripslashes( $args_product['product_rating'] ) ) . '"/></td>
|
268 |
+
</tr>
|
269 |
+
<tr>
|
270 |
+
<td align="right"><strong><label>' . esc_html__( 'Brand Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
271 |
+
<td><input class="bsf_text_medium" type="text" name="product_brand" value="' . esc_attr( stripslashes( $args_product['product_brand'] ) ) . '"/></td>
|
272 |
+
</tr>
|
273 |
+
<tr>
|
274 |
+
<td align="right"><strong><label>' . esc_html__( 'Product Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
275 |
+
<td><input class="bsf_text_medium" type="text" name="product_name" value="' . esc_attr( stripslashes( $args_product['product_name'] ) ) . '"/></td>
|
276 |
+
</tr>
|
277 |
+
<tr>
|
278 |
+
<td align="right"><strong><label>' . esc_html__( 'User Rating :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
279 |
+
<td><input class="bsf_text_medium" type="text" name="product_agr" value="' . esc_attr( stripslashes( $args_product['product_agr'] ) ) . '"/></td>
|
280 |
+
</tr>
|
281 |
+
<tr>
|
282 |
+
<td align="right"><strong><label>' . esc_html__( 'Price :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
283 |
+
<td><input class="bsf_text_medium" type="text" name="product_price" value="' . esc_attr( stripslashes( $args_product['product_price'] ) ) . '"/></td>
|
284 |
+
</tr>
|
285 |
+
<tr>
|
286 |
+
<td align="right"><strong><label>' . esc_html__( 'Product Availability :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
287 |
+
<td><input class="bsf_text_medium" type="text" name="product_avail" value="' . esc_attr( stripslashes( $args_product['product_avail'] ) ) . '"/></td>
|
288 |
+
</tr>
|
289 |
+
<tr><td colspan="2"></td></tr>
|
290 |
+
<tr>
|
291 |
+
<td></td>
|
292 |
+
<td><input type="submit" class="button-primary" name="product_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/> <a class="button-primary" href="?page=rich_snippet_dashboard&action=reset&options=product">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
|
293 |
+
</tr>
|
294 |
+
</tbody>
|
295 |
+
</table>
|
296 |
+
</form>
|
297 |
+
</div>
|
298 |
+
</div>
|
299 |
+
</div>
|
300 |
+
<div class="postbox closed">
|
301 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
302 |
+
<h3 class="hndle"><span>' . esc_html__( 'Recipe', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
|
303 |
+
<div class="inside">
|
304 |
+
<div class="table">
|
305 |
+
<p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Recipe Rich Snippets —</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
|
306 |
+
<form id="bsf_recipe_form" method="post">
|
307 |
+
' . wp_nonce_field( 'snippet_recipe_form_action', 'snippet_recipe_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
308 |
+
. '
|
309 |
+
<table class="bsf_metabox">
|
310 |
+
<tbody>
|
311 |
+
<tr>
|
312 |
+
<td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
313 |
+
<td><input class="bsf_text_medium" type="text" name="snippet_title" value="' . esc_attr( stripslashes( $args_recipe['snippet_title'] ) ) . '"/></td>
|
314 |
+
</tr>
|
315 |
+
<tr>
|
316 |
+
<td align="right"><strong><label>' . esc_html__( 'Recipe Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
317 |
+
<td><input class="bsf_text_medium" type="text" name="recipe_name" value="' . esc_attr( stripslashes( $args_recipe['recipe_name'] ) ) . '"/></td>
|
318 |
+
</tr>
|
319 |
+
<tr>
|
320 |
+
<td align="right"><strong><label>' . esc_html__( 'Author Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
321 |
+
<td><input class="bsf_text_medium" type="text" name="author_name" value="' . esc_attr( stripslashes( $author_name ) ) . '"/></td>
|
322 |
+
</tr>
|
323 |
+
<tr>
|
324 |
+
<td align="right"><strong><label>' . esc_html__( 'Published On : ', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
325 |
+
<td><input class="bsf_text_medium" type="text" name="recipe_pub" value="' . esc_attr( stripslashes( $args_recipe['recipe_pub'] ) ) . '"/></td>
|
326 |
+
</tr>
|
327 |
+
<tr>
|
328 |
+
<td align="right"><strong><label>' . esc_html__( 'Preparation Time:', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
329 |
+
<td><input class="bsf_text_medium" type="text" name="recipe_prep" value="' . esc_attr( stripslashes( $args_recipe['recipe_prep'] ) ) . '"/></td>
|
330 |
+
</tr>
|
331 |
+
<tr>
|
332 |
+
<td align="right"><strong><label>' . esc_html__( 'Cook Time :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
333 |
+
<td><input class="bsf_text_medium" type="text" name="recipe_cook" value="' . esc_attr( stripslashes( $args_recipe['recipe_cook'] ) ) . '"/></td>
|
334 |
+
</tr>
|
335 |
+
<tr>
|
336 |
+
<td align="right"><strong><label>' . esc_html__( 'Total Time :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
337 |
+
<td><input class="bsf_text_medium" type="text" name="recipe_time" value="' . esc_attr( stripslashes( $args_recipe['recipe_time'] ) ) . '"/></td>
|
338 |
+
</tr>
|
339 |
+
<tr>
|
340 |
+
<td align="right"><strong><label>' . esc_html__( 'Description :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
341 |
+
<td><input class="bsf_text_medium" type="text" name="recipe_desc" value="' . esc_attr( stripslashes( $recipe_desc ) ) . '"/></td>
|
342 |
+
</tr>
|
343 |
+
<tr>
|
344 |
+
<td align="right"><strong><label>' . esc_html__( 'Average Rating:', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
345 |
+
<td><input class="bsf_text_medium" type="text" name="recipe_rating" value="' . esc_attr( stripslashes( $args_recipe['recipe_rating'] ) ) . '"/></td>
|
346 |
+
</tr>
|
347 |
+
<tr><td colspan="2"></td></tr>
|
348 |
+
<tr>
|
349 |
+
<td></td>
|
350 |
+
<td><input type="submit" class="button-primary" name="recipe_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/> <a class="button-primary" href="?page=rich_snippet_dashboard&action=reset&options=recipe">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
|
351 |
+
</tr>
|
352 |
+
</tbody>
|
353 |
+
</table>
|
354 |
+
</form>
|
355 |
+
</div>
|
356 |
+
</div>
|
357 |
+
</div>
|
358 |
+
<div class="postbox closed">
|
359 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
360 |
+
<h3 class="hndle"><span>' . esc_html__( 'Software Application', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
|
361 |
+
<div class="inside">
|
362 |
+
<div class="table">
|
363 |
+
<p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Software Application Rich Snippets —</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
|
364 |
+
<form id="bsf_software_form" method="post">
|
365 |
+
' . wp_nonce_field( 'snippet_soft_app_form_action', 'snippet_soft_app_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
366 |
+
. '
|
367 |
+
<table class="bsf_metabox">
|
368 |
+
<tbody>
|
369 |
+
<tr>
|
370 |
+
<td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
371 |
+
<td><input class="bsf_text_medium" type="text" name="snippet_title" value="' . esc_attr( stripslashes( $args_soft['snippet_title'] ) ) . '"/></td>
|
372 |
+
</tr>
|
373 |
+
<tr>
|
374 |
+
<td align="right"><strong><label>' . esc_html__( 'Author Rating :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
375 |
+
<td><input class="bsf_text_medium" type="text" name="software_rating" value="' . esc_attr( stripslashes( $args_soft['software_rating'] ) ) . '"/></td>
|
376 |
+
</tr>
|
377 |
+
<tr>
|
378 |
+
<td align="right"><strong><label>' . esc_html__( 'User Rating :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
379 |
+
<td><input class="bsf_text_medium" type="text" name="software_agr" value="' . esc_attr( stripslashes( $args_soft['software_agr'] ) ) . '"/></td>
|
380 |
+
</tr>
|
381 |
+
<tr>
|
382 |
+
<td align="right"><strong><label>' . esc_html__( 'Software Price :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
383 |
+
<td><input class="bsf_text_medium" type="text" name="software_price" value="' . esc_attr( stripslashes( $args_soft['software_price'] ) ) . '"/></td>
|
384 |
+
</tr>
|
385 |
+
<tr>
|
386 |
+
<td align="right"><strong><label>' . esc_html__( 'Software Name:', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
387 |
+
<td><input class="bsf_text_medium" type="text" name="software_name" value="' . esc_attr( stripslashes( $args_soft['software_name'] ) ) . '"/></td>
|
388 |
+
</tr>
|
389 |
+
<tr>
|
390 |
+
<td align="right"><strong><label>' . esc_html__( 'Operating System :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
391 |
+
<td><input class="bsf_text_medium" type="text" name="software_os" value="' . esc_attr( stripslashes( $args_soft['software_os'] ) ) . '"/></td>
|
392 |
+
</tr>
|
393 |
+
<tr>
|
394 |
+
<td align="right"><strong><label>' . esc_html__( 'Landing Page:', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
395 |
+
<td><input class="bsf_text_medium" type="text" name="software_website" value="' . esc_attr( stripslashes( $args_soft['software_website'] ) ) . '"/></td>
|
396 |
+
</tr>
|
397 |
+
<tr><td colspan="2"></td></tr>
|
398 |
+
<tr>
|
399 |
+
<td></td>
|
400 |
+
<td><input type="submit" class="button-primary" name="software_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/> <a class="button-primary" href="?page=rich_snippet_dashboard&action=reset&options=software">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
|
401 |
+
</tr>
|
402 |
+
</tbody>
|
403 |
+
</table>
|
404 |
+
</form>
|
405 |
+
</div>
|
406 |
+
</div>
|
407 |
+
</div>
|
408 |
+
|
409 |
+
|
410 |
+
<div class="postbox closed">
|
411 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
412 |
+
<h3 class="hndle"><span>' . esc_html__( 'Video', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
|
413 |
+
<div class="inside">
|
414 |
+
<div class="table">
|
415 |
+
<p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Video Rich Snippets —</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
|
416 |
+
<form id="bsf_video_form" method="post">
|
417 |
+
' . wp_nonce_field( 'snippet_video_form_action', 'snippet_video_nonce_field' )//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
418 |
+
. '
|
419 |
+
<table class="bsf_metabox">
|
420 |
+
<tbody>
|
421 |
+
<tr>
|
422 |
+
<td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
423 |
+
<td><input class="bsf_text_medium" type="text" name="snippet_title" value="' . esc_attr( stripslashes( $args_video['snippet_title'] ) ) . '"/></td>
|
424 |
+
</tr>
|
425 |
+
<tr>
|
426 |
+
<td align="right"><strong><label>' . esc_html__( 'Video Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
427 |
+
<td><input class="bsf_text_medium" type="text" name="video_title" value="' . esc_attr( stripslashes( $args_video['video_title'] ) ) . '"/></td>
|
428 |
+
</tr>
|
429 |
+
<tr>
|
430 |
+
<td align="right"><strong><label>' . esc_html__( 'Description :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
431 |
+
<td><input class="bsf_text_medium" type="text" name="video_desc" value="' . esc_attr( stripslashes( $args_video['video_desc'] ) ) . '"/></td>
|
432 |
+
</tr>
|
433 |
+
<tr>
|
434 |
+
<td align="right"><strong><label>' . esc_html__( 'Video Duration :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
435 |
+
<td><input class="bsf_text_medium" type="text" name="video_time" value="' . esc_attr( stripslashes( $args_video['video_time'] ) ) . '"/></td>
|
436 |
+
</tr>
|
437 |
+
<tr>
|
438 |
+
<td align="right"><strong><label>' . esc_html__( 'Video Upload Date :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
439 |
+
<td><input class="bsf_text_medium" type="text" name="video_date" value="' . esc_attr( stripslashes( $args_video['video_date'] ) ) . '"/></td>
|
440 |
+
</tr>
|
441 |
+
<tr><td colspan="2"></td></tr>
|
442 |
+
<tr>
|
443 |
+
<td></td>
|
444 |
+
<td><input type="submit" class="button-primary" name="video_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/> <a class="button-primary" href="?page=rich_snippet_dashboard&action=reset&options=video">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
|
445 |
+
</tr>
|
446 |
+
</tbody>
|
447 |
+
</table>
|
448 |
+
</form>
|
449 |
+
</div>
|
450 |
+
</div>
|
451 |
+
</div>
|
452 |
+
<div class="postbox closed">
|
453 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
454 |
+
<h3 class="hndle"><span>' . esc_html__( 'Article', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
|
455 |
+
<div class="inside">
|
456 |
+
<div class="table">
|
457 |
+
<p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Article Rich Snippets —</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
|
458 |
+
<form id="bsf_article_form" method="post">
|
459 |
+
' . wp_nonce_field( 'snippet_article_form_action', 'snippet_article_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
460 |
+
. '
|
461 |
+
<table class="bsf_metabox">
|
462 |
+
<tbody>
|
463 |
+
<tr>
|
464 |
+
<td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
465 |
+
<td><input class="bsf_text_medium" type="text" name="snippet_title" value="' . esc_attr( stripslashes( $args_article['snippet_title'] ) ) . '"/></td>
|
466 |
+
</tr>
|
467 |
+
<tr>
|
468 |
+
<td align="right"><strong><label>' . esc_html__( 'Article Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
469 |
+
<td><input class="bsf_text_medium" type="text" name="article_name" value="' . esc_attr( stripslashes( $args_article['article_name'] ) ) . '"/></td>
|
470 |
+
</tr>
|
471 |
+
<tr>
|
472 |
+
<td align="right"><strong><label>' . esc_html__( 'Author :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
473 |
+
<td><input class="bsf_text_medium" type="text" name="article_author" value="' . esc_attr( stripslashes( $args_article['article_author'] ) ) . '"/></td>
|
474 |
+
</tr>
|
475 |
+
<tr>
|
476 |
+
<td align="right"><strong><label>' . esc_html__( 'Description :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
477 |
+
<td><input class="bsf_text_medium" type="text" name="article_desc" value="' . esc_attr( stripslashes( $args_article['article_desc'] ) ) . '"/></td>
|
478 |
+
</tr>
|
479 |
+
<tr>
|
480 |
+
<td align="right"><strong><label>' . esc_html__( 'Image :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
481 |
+
<td><input class="bsf_text_medium" type="text" name="article_image" value="' . esc_attr( stripslashes( $args_article['article_image'] ) ) . '"/></td>
|
482 |
+
</tr>
|
483 |
+
<tr>
|
484 |
+
<td align="right"><strong><label>' . esc_html__( 'Publisher :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
485 |
+
<td><input class="bsf_text_medium" type="text" name="article_publisher" value="' . esc_attr( stripslashes( $args_article['article_publisher'] ) ) . '"/></td>
|
486 |
+
</tr>
|
487 |
+
<tr>
|
488 |
+
<td align="right"><strong><label>' . esc_html__( 'Publisher Logo :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
489 |
+
<td><input class="bsf_text_medium" type="text" name="article_publisher_logo" value="' . esc_attr( stripslashes( $args_article['article_publisher_logo'] ) ) . '"/></td>
|
490 |
+
</tr>
|
491 |
+
<tr><td colspan="2"></td></tr>
|
492 |
+
<tr>
|
493 |
+
<td></td>
|
494 |
+
<td><input type="submit" class="button-primary" name="article_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/> <a class="button-primary" href="?page=rich_snippet_dashboard&action=reset&options=article">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
|
495 |
+
</tr>
|
496 |
+
</tbody>
|
497 |
+
</table>
|
498 |
+
</form>
|
499 |
+
</div>
|
500 |
+
</div>
|
501 |
+
</div>
|
502 |
+
<div class="postbox closed">
|
503 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
504 |
+
<h3 class="hndle"><span>' . esc_html__( 'Service', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
|
505 |
+
<div class="inside">
|
506 |
+
<div class="table">
|
507 |
+
<p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Service Rich Snippets —</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
|
508 |
+
<form id="bsf_service_form" method="post">
|
509 |
+
' . wp_nonce_field( 'snippet_service_form_action', 'snippet_service_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
510 |
+
. '
|
511 |
+
<table class="bsf_metabox">
|
512 |
+
<tbody>
|
513 |
+
<tr>
|
514 |
+
<td align="right"><strong><label>' . esc_html__( 'Rich Snippet Title :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
515 |
+
<td><input class="bsf_text_medium" type="text" name="snippet_title" value="' . esc_attr( stripslashes( $args_service['snippet_title'] ) ) . '"/></td>
|
516 |
+
</tr>
|
517 |
+
<tr>
|
518 |
+
<td align="right"><strong><label>' . esc_html__( 'Service Type :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
519 |
+
<td><input class="bsf_text_medium" type="text" name="service_type" value="' . esc_attr( stripslashes( $args_service['service_type'] ) ) . '"/></td>
|
520 |
+
</tr>
|
521 |
+
<tr>
|
522 |
+
<td align="right"><strong><label>' . esc_html__( 'Area :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
523 |
+
<td><input class="bsf_text_medium" type="text" name="service_area" value="' . esc_attr( stripslashes( $args_service['service_area'] ) ) . '"/></td>
|
524 |
+
</tr>
|
525 |
+
<tr>
|
526 |
+
<td align="right"><strong><label>' . esc_html__( 'Description :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
527 |
+
<td><input class="bsf_text_medium" type="text" name="service_desc" value="' . esc_attr( stripslashes( $args_service['service_desc'] ) ) . '"/></td>
|
528 |
+
</tr>
|
529 |
+
<tr>
|
530 |
+
<td align="right"><strong><label>' . esc_html__( 'Provider Name :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
531 |
+
<td><input class="bsf_text_medium" type="text" name="service_provider_name" value="' . esc_attr( stripslashes( $args_service['service_provider_name'] ) ) . '"/></td>
|
532 |
+
</tr>
|
533 |
+
<tr>
|
534 |
+
<td align="right"><strong><label>' . esc_html__( 'Provider Location :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
535 |
+
<td><input class="bsf_text_medium" type="text" name="provider_location" value="' . esc_attr( stripslashes( $provider_location ) ) . '"/></td>
|
536 |
+
</tr>
|
537 |
+
<tr>
|
538 |
+
<td align="right"><strong><label>' . esc_html__( 'URL :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
539 |
+
<td><input class="bsf_text_medium" type="text" name="service_channel" value="' . esc_attr( stripslashes( $args_service['service_channel'] ) ) . '"/></td>
|
540 |
+
</tr>
|
541 |
+
<tr>
|
542 |
+
<td align="right"><strong><label>' . esc_html__( 'URL Text :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
543 |
+
<td><input class="bsf_text_medium" type="text" name="service_url_link" value="' . esc_attr( stripslashes( $args_service['service_url_link'] ) ) . '"/></td>
|
544 |
+
</tr>
|
545 |
+
<tr>
|
546 |
+
<td align="right"><strong><label>' . esc_html__( 'Service Rating :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
|
547 |
+
<td><input class="bsf_text_medium" type="text" name="service_rating" value="' . esc_attr( stripslashes( $args_service['service_rating'] ) ) . '"/></td>
|
548 |
+
</tr>
|
549 |
+
<tr><td colspan="2"></td></tr>
|
550 |
+
<tr>
|
551 |
+
<td></td>
|
552 |
+
<td><input type="submit" class="button-primary" name="service_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/> <a class="button-primary" href="?page=rich_snippet_dashboard&action=reset&options=service">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
|
553 |
+
</tr>
|
554 |
+
</tbody>
|
555 |
+
</table>
|
556 |
+
</form>
|
557 |
+
</div>
|
558 |
+
</div>
|
559 |
+
</div>
|
560 |
+
<!-- Post blox -->
|
561 |
+
|
562 |
+
</div>
|
563 |
+
<div class="schema-notice">
|
564 |
+
<p>' . wp_kses_post( __( "Need some more schema types with automation to implement schema markup? Get the latest and premium schema markup plugin to automate the process of adding schema markup on your entire website. <br><a href='https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_medium=configure' target='_blank'> Know more about Schema Pro.</a>", 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
|
565 |
+
</div>
|
566 |
+
</div>
|
567 |
+
</div>
|
568 |
+
</div>
|
569 |
+
|
570 |
+
|
571 |
+
<div id="tab-5">
|
572 |
+
<div id="poststuff">
|
573 |
+
<div id="postbox-container-17" class="postbox-container">
|
574 |
+
<div class="meta-box-sortables ui-sortable bsf-even-even">
|
575 |
+
<div class="bsf-postbox">
|
576 |
+
<h3 class="bsf-hndle" style="margin-top:0;"><span>' . esc_html__( 'Welcome to All In One Schema Rich Snippets', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
|
577 |
+
<div class="inside">
|
578 |
+
<p>Thank you for choosing All-in-one Schema Rich Snippets - the most popular WordPress schema markup plugin!</p>
|
579 |
+
|
580 |
+
<p>All-in-one Schema Rich Snippets helps you add different schema content types to your site so that you can communicate precise information about your web pages to search engines and get rich snippets.</p>
|
581 |
+
<div class="bsf-xs-separator"></div>
|
582 |
+
<h3>Supported types of Schemas:</h3>
|
583 |
+
<ul class="schema-types">
|
584 |
+
<div class="schema-type-col-2">
|
585 |
+
<li>Review</li>
|
586 |
+
<li>Event</li>
|
587 |
+
<li>Services</li>
|
588 |
+
</div>
|
589 |
+
<div class="schema-type-col-2">
|
590 |
+
<li>Person</li>
|
591 |
+
<li>Product</li>
|
592 |
+
</div>
|
593 |
+
<div class="schema-type-col-2">
|
594 |
+
<li>Video</li>
|
595 |
+
<li>Articles</li>
|
596 |
+
</div>
|
597 |
+
<div class="schema-type-col-2">
|
598 |
+
<li>Recipe</li>
|
599 |
+
<li>Software Application</li>
|
600 |
+
</div>
|
601 |
+
</ul>
|
602 |
+
<div class="bsf-xs-separator"></div>
|
603 |
+
</div>
|
604 |
+
</div>
|
605 |
+
</div>
|
606 |
+
<div class="meta-box-sortables ui-sortable bsf-even-odd">
|
607 |
+
<h3 class="bsf-hndle"><span>' . esc_html__( 'How it works', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
|
608 |
+
<div class="inside">
|
609 |
+
<ol class="bsf-li-counter">
|
610 |
+
<li>' . esc_html__( 'Configure The Settings', 'all-in-one-schemaorg-rich-snippets' ) . '
|
611 |
+
<p>' . esc_html__( 'Go to the “Rich Snippets” option in your WordPress dashboard. Under the Configuration tab, select your desired schema type and update the strings you want to display on the front-end. You can use the Customization tab to manage how your rich snippet content box will look.', 'all-in-one-schemaorg-rich-snippets' ) . '</p></li>
|
612 |
+
<li>' . esc_html__( 'Add Markup To Pages', 'all-in-one-schemaorg-rich-snippets' ) . '<p>' . esc_html__( 'Edit the posts or pages where you wish to add rich snippets and scroll down to the “Configure Rich Snippet” meta box to add schema markup.', 'all-in-one-schemaorg-rich-snippets' ) . '</p></li>
|
613 |
+
<li>' . esc_html__( 'Test Your Rich Snippets', 'all-in-one-schemaorg-rich-snippets' ) . '<p>' . wp_kses_post( __( "Google Structured Data Testing is a widely used online tool to test structured data. Open the <a href='https://search.google.com/structured-data/testing-tool/u/0/' target='_blank'>Google Structured Testing Tool</a> and fetch your website URL to test the schema markup you’ve just implemented on your webpages.", 'all-in-one-schemaorg-rich-snippets' ) ) . '</p></li>
|
614 |
+
</ol>
|
615 |
+
</div>
|
616 |
+
</div>
|
617 |
+
<div class="meta-box-sortables ui-sortable bsf-even-even">
|
618 |
+
<h3 class="bsf-hndle"><span>' . esc_html__( 'Want to Automate Your Schema Markup?', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
|
619 |
+
<div class="inside">
|
620 |
+
<h3>' . esc_html__( 'Consider Schema Pro', 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
|
621 |
+
<p>' . wp_kses_post( __( 'Schema Pro is an advanced schema markup plugin that automates the process of adding schema markup on multiple pages with just a few clicks. Schema Pro uses JSON-LD markup, which is the latest technology recommended by Google. With it, you can kick those front-end content boxes to the curb and<b> get rich snippets without displaying any new human-readable content</b> on your site.', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
|
622 |
+
<h3></h3>
|
623 |
+
<div class="bsf-schema-desc">
|
624 |
+
<div class="bsf-schema-features-1">
|
625 |
+
<div class="bsf-schema-features-wrap">
|
626 |
+
<div class="bsf-schema-features-icon">
|
627 |
+
<img src="' . esc_url( plugins_url( '/all-in-one-schemaorg-rich-snippets/images/click.png' ) ) . '"/>
|
628 |
+
</div>
|
629 |
+
<div class="bsf-schema-features-cont">
|
630 |
+
<h3>Schema Markup Automation</h3>
|
631 |
+
<p>Schema Pro automates the process of adding schema markup on your website. Just configure your markup one time and you can easily apply it to hundreds or thousands of pages.</p>
|
632 |
+
</div>
|
633 |
+
</div>
|
634 |
+
</div>
|
635 |
+
<div class="bsf-schema-features-1">
|
636 |
+
<div class="bsf-schema-features-wrap">
|
637 |
+
<div class="bsf-schema-features-icon">
|
638 |
+
<img src="' . esc_url( plugins_url( '/all-in-one-schemaorg-rich-snippets/images/seo.png' ) ) . '"/>
|
639 |
+
</div>
|
640 |
+
<div class="bsf-schema-features-cont">
|
641 |
+
<h3>Complete Schema Implementation</h3>
|
642 |
+
<p>Schema Pro gives you the full benefits of schema markup with both organization level and content type schemas. Implement organization level markup site-wide and content type on specific pages.</p>
|
643 |
+
</div>
|
644 |
+
</div>
|
645 |
+
</div>
|
646 |
+
<div class="bsf-schema-features-1">
|
647 |
+
<div class="bsf-schema-features-wrap">
|
648 |
+
<div class="bsf-schema-features-icon">
|
649 |
+
<img src="' . esc_url( plugins_url( '/all-in-one-schemaorg-rich-snippets/images/website.png' ) ) . '"/>
|
650 |
+
</div>
|
651 |
+
<div class="bsf-schema-features-cont">
|
652 |
+
<h3>Advanced Targeting Rules</h3>
|
653 |
+
<p>Schema Pro lets you use pinpoint inclusion/exclusion rules to apply different schema content types on both a post type or individual post level.</p>
|
654 |
+
</div>
|
655 |
+
</div>
|
656 |
+
</div>
|
657 |
+
<div class="bsf-schema-features-1">
|
658 |
+
<div class="bsf-schema-features-wrap">
|
659 |
+
<div class="bsf-schema-features-icon">
|
660 |
+
<img src="' . esc_url( plugins_url( '/all-in-one-schemaorg-rich-snippets/images/custom.png' ) ) . '"/>
|
661 |
+
</div>
|
662 |
+
<div class="bsf-schema-features-cont">
|
663 |
+
<h3>Custom Field Support<h3>
|
664 |
+
<p>Schema Pro comes with all the necessary fields for each content type, as well as support for your own custom fields. It lets you map existing custom fields or create new ones to suit your needs.</p>
|
665 |
+
</div>
|
666 |
+
</div>
|
667 |
+
</div>
|
668 |
+
<div class="bsf-schema-features-1">
|
669 |
+
<div class="bsf-schema-features-wrap">
|
670 |
+
<div class="bsf-schema-features-icon">
|
671 |
+
<img src="' . esc_url( plugins_url( '/all-in-one-schemaorg-rich-snippets/images/quick.png' ) ) . '"/>
|
672 |
+
</div>
|
673 |
+
<div class="bsf-schema-features-cont">
|
674 |
+
<h3>Accuracy and Testing</h3>
|
675 |
+
<p>Schema Pro lets you implement accurate markup and analyse your schema implementation instantly so you can rest assured that you’ve implemented it right.</p>
|
676 |
+
</div>
|
677 |
+
</div>
|
678 |
+
</div>
|
679 |
+
<div class="bsf-schema-features-1">
|
680 |
+
<div class="bsf-schema-features-wrap">
|
681 |
+
<div class="bsf-schema-features-icon">
|
682 |
+
<img src="' . esc_url( plugins_url( '/all-in-one-schemaorg-rich-snippets/images/acf.png' ) ) . '"/>
|
683 |
+
</div>
|
684 |
+
<div class="bsf-schema-features-cont">
|
685 |
+
<h3>Compatibility with Yoast SEO, ACF, PODS </h3>
|
686 |
+
<p>Schema Pro is compatible with popular third-party plugins. It can inherit the settings from Yoast SEO and fetch custom fields that you've created using the ACF or PODS plugins.</p>
|
687 |
+
</div>
|
688 |
+
</div>
|
689 |
+
</div>
|
690 |
+
</div>
|
691 |
+
</div>
|
692 |
+
</div>
|
693 |
+
<div class="meta-box-sortables ui-sortable bsf-even-odd">
|
694 |
+
<h3 class="bsf-hndle"><span>' . esc_html__( 'With Schema Pro, you can…', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
|
695 |
+
<div class="inside">
|
696 |
+
<ol class="bsf-li-counter">
|
697 |
+
<li>Automate schema markup for your entire website.</li>
|
698 |
+
<li>Implement schema markup faster and more accurately.</li>
|
699 |
+
<li>Target different post types with different Schema types.</li>
|
700 |
+
</ol>
|
701 |
+
</div>
|
702 |
+
</div>
|
703 |
+
<div class="meta-box-sortables ui-sortable bsf-even-even">
|
704 |
+
<h3 class="bsf-hndle"><span>' . esc_html__( 'Testimonials', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
|
705 |
+
<div class="inside">
|
706 |
+
<div class="bsf-schema">
|
707 |
+
<div class="bsf-testimonial-wrap">
|
708 |
+
<div class="bsf-schema-features-wrap">
|
709 |
+
<div class="bsf-schema-testimonial-icon">
|
710 |
+
<img src="' . esc_url( plugins_url( '/all-in-one-schemaorg-rich-snippets/images/adam-circle.jpg' ) ) . '"/>
|
711 |
+
</div>
|
712 |
+
<div class="bsf-schema-features-cont">
|
713 |
+
<p>I have used every Schema Plugin for WordPress over the last few years, hundreds of dollars invested, and Schema Pro blows them all out of the water. It’s the only schema plugin you need.</p>
|
714 |
+
<b>Adam Preiser,</b> <span>Founder of WPCrafter.com</span>
|
715 |
+
</div>
|
716 |
+
</div>
|
717 |
+
</div>
|
718 |
+
<div class="bsf-ls-separator"></div>
|
719 |
+
<div class="bsf-testimonial-wrap">
|
720 |
+
<div class="bsf-schema-features-wrap">
|
721 |
+
<div class="bsf-schema-testimonial-icon">
|
722 |
+
<img src="' . esc_url( plugins_url( '/all-in-one-schemaorg-rich-snippets/images/kylevan.png' ) ) . '"/>
|
723 |
+
</div>
|
724 |
+
<div class="bsf-schema-features-cont">
|
725 |
+
<p>Schema Pro has unlocked a powerful set of tools that produced results almost immediately. As a non-coder, a solution like this allows me to set up and stand out against the competition- and it couldn't be any easier to use!</p>
|
726 |
+
<b>Kyle Van Deusen,</b> <span> Owner at ogalweb.com</span>
|
727 |
+
</div>
|
728 |
+
</div>
|
729 |
+
</div>
|
730 |
+
</div>
|
731 |
+
</div>
|
732 |
+
</div>
|
733 |
+
<div class="meta-box-sortables ui-sortable bsf-even-odd testimonial-wraper">
|
734 |
+
<div class="inside">
|
735 |
+
<div class="bsf-schema">
|
736 |
+
<div class="bsf-schema-button-wrap">
|
737 |
+
<a href="https://wpschema.com/pricing/?utm_source=allinone&utm_campaign=repo&utm_medium=welcome" target="_blank" class="bsf-btn bsf-btn-lg btn-btn-purple">Get Schema Pro</a>
|
738 |
+
</div>
|
739 |
+
<div class="bsf-schema-button-wrap">
|
740 |
+
<a href="https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_medium=welcome" target="_blank" class="bsf-btn bsf-btn-lg btn-btn-grey">See All Features</a>
|
741 |
+
</div>
|
742 |
+
</div>
|
743 |
+
</div>
|
744 |
+
</div>
|
745 |
+
</div>
|
746 |
+
</div>
|
747 |
+
</div>
|
748 |
+
|
749 |
+
<div id="tab-3">
|
750 |
+
<div id="poststuff">
|
751 |
+
<div id="postbox-container-5" class="postbox-container">
|
752 |
+
<div class="meta-box-sortables ui-sortable">
|
753 |
+
<div class="postbox closed">
|
754 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
755 |
+
<h3 class="hndle">' . esc_html__( 'Where can I test my schema markup implementation?', 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
|
756 |
+
<div class="inside">
|
757 |
+
<p>' . esc_html__( 'You can use the standard Google Structured Data Testing Tool to test your schema markup implementation. You can also take a look at the preview of how your search result might look.', 'all-in-one-schemaorg-rich-snippets' ) . ' <a href="http://www.google.com/webmasters/tools/richsnippets" target="_blank">Click Here.</a></p>
|
758 |
+
</div>
|
759 |
+
</div>
|
760 |
+
<div class="postbox closed">
|
761 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
762 |
+
<h3 class="hndle">' . esc_html__( 'Do I have to fill in all the details?', 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
|
763 |
+
<div class="inside">
|
764 |
+
<p>' . esc_html__( 'No. But, every schema type has some fields that HAVE to be filled as stated by Google. Therefore, it is recommended to fill these required fields in the schema markup you are implementing.', 'all-in-one-schemaorg-rich-snippets' ) . '</p>
|
765 |
+
</div>
|
766 |
+
</div>
|
767 |
+
<div class="postbox closed">
|
768 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
769 |
+
<h3 class="hndle">' . esc_html__( 'Why does the plugin create extra content in the frontend? Can I hide it?', 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
|
770 |
+
<div class="inside">
|
771 |
+
<p>We understand that you don't like the content that gets displayed on your page / post. However, as per the strong recommendation of Google, MicroData should be clearly visible to the user.</p>
|
772 |
+
<p>Here is a reference link of what Google says. <a href="https://sites.google.com/site/webmasterhelpforum/en/faq-rich-snippets#display" target="_blank"> https://sites.google.com/site/webmasterhelpforum/en/faq-rich-snippets#display</a></p>
|
773 |
+
<p> If you still do not want your schema markup to affect your frontend design, you can use <a href="https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_medium=faq" target="_blank">Schema Pro</a> - our advanced Schema markup plugin that is built with the latest JSON- LD technology which does not require a content box to be displayed on the front-end.</p>
|
774 |
+
</div>
|
775 |
+
</div>
|
776 |
+
<div class="postbox closed">
|
777 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
778 |
+
<h3 class="hndle">' . esc_html__( 'Does the plugin work with other plugins like WordPress SEO, WooCommerce, etc?', 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
|
779 |
+
<div class="inside">
|
780 |
+
<p>Well, the plugin works perfectly with most of the other plugins as the only thing "All in One Schema.org Rich Snippets" does is - it gives you power to add Rich Snippets MicroData to your pages and posts easily. <br><br>If you come across a conflict with any other plugin, please do not hesitate to report an issue.</p>
|
781 |
+
</div>
|
782 |
+
</div>
|
783 |
+
<div class="postbox closed">
|
784 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
785 |
+
<h3 class="hndle">' . esc_html__( 'How long will it take to show up rich snippets for my search results?', 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
|
786 |
+
<div class="inside">
|
787 |
+
<p>We cannot assure the time it will take to display a rich snippet for your search results. This is completely dependent on when your website is crawled by the search engine. However, there are many more factors, such as your website authority that contribute to the time taken for your website to be crawled and a rich snippet displayed.</p>
|
788 |
+
<p>If rich snippets are not appearing in your search results as of yet, most probably they might start appearing as soon as Google or other search engines find your website more authoritative.</p>
|
789 |
+
<p>Meanwhile - you can validate and see the preview of your rich snippets on <a target="_blank" href="http://www.google.com/webmasters/tools/richsnippets">[ Google Structured Data Testing Tool ]</a> .</p>
|
790 |
+
</div>
|
791 |
+
</div>
|
792 |
+
<div class="postbox closed">
|
793 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
794 |
+
<h3 class="hndle">' . esc_html__( "I don't see the feature I want. How can I get it?", 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
|
795 |
+
<div class="inside">
|
796 |
+
<p>' . wp_kses_post( __( "<a href='https://wpschema.com/contact/' target='_blank'>Get in touch</a> with us to ask if this feature is in our development roadmap. If it is not in our roadmap, and if you still think this feature would make the plugin better, we have a couple of options for you:", 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
|
797 |
+
<ol>
|
798 |
+
<li>' . esc_html__( 'Code the new feature if you are a developer and submit your code. If we include this feature in our releases, credits will be given to you.', 'all-in-one-schemaorg-rich-snippets' ) . '</li>
|
799 |
+
<li>' . esc_html__( 'Offer a sponsorship to get this feature done for all plugin users OR request a professional customisation service.', 'all-in-one-schemaorg-rich-snippets' ) . '</li>
|
800 |
+
</ol>
|
801 |
+
</div>
|
802 |
+
</div>
|
803 |
+
</div>
|
804 |
+
</div>
|
805 |
+
</div>
|
806 |
+
</div>
|
807 |
+
<!-- Tab 4-->
|
808 |
+
<div id="tab-4">
|
809 |
+
<div id="poststuff">
|
810 |
+
<div id="postbox-container-11" class="postbox-container">
|
811 |
+
<div class="meta-box-sortables ui-sortable">
|
812 |
+
<div class="postbox">
|
813 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
814 |
+
<h3 class="hndle">' . wp_kses_post( __( '<span>Customize the look and feel of rich snippet box</span>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</h3>
|
815 |
+
<div class="inside">
|
816 |
+
<form id="bsf_css_editor" method="post" onsubmit="return false;" action="">
|
817 |
+
' . wp_nonce_field( 'snippet_color_form_action', 'snippet_color_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
818 |
+
. '
|
819 |
+
<table class="bsf_metabox">
|
820 |
+
<tr>
|
821 |
+
<th> <label for="snippet_box_bg"> ' . esc_html__( 'Box Background ', 'all-in-one-schemaorg-rich-snippets' ) . ' </label> </th>
|
822 |
+
<td> <input type="text" name="snippet_box_bg" id="snippet_box_bg" value="' . esc_attr( stripslashes( $args_color['snippet_box_bg'] ) ) . '" class="snippet_box_bg" /> </td>
|
823 |
+
</tr>
|
824 |
+
<tr>
|
825 |
+
<th> <label for="snippet_title_bg"> ' . esc_html__( 'Title Background', 'all-in-one-schemaorg-rich-snippets' ) . ' </label> </th>
|
826 |
+
<td> <input type="text" name="snippet_title_bg" id="snippet_title_bg" value="' . esc_attr( stripslashes( $args_color['snippet_title_bg'] ) ) . '" class="snippet_title_bg" /> </td>
|
827 |
+
</tr>
|
828 |
+
<tr>
|
829 |
+
<th> <label for="snippet_border"> ' . esc_html__( 'Border Color', 'all-in-one-schemaorg-rich-snippets' ) . ' </label> </th>
|
830 |
+
<td> <input type="text" name="snippet_border" id="snippet_border" value="' . esc_attr( stripslashes( $args_color['snippet_border'] ) ) . '" class="snippet_border" /> </td>
|
831 |
+
</tr>
|
832 |
+
<tr>
|
833 |
+
<th> <label for="snippet_title_color"> ' . esc_html__( 'Title Color', 'all-in-one-schemaorg-rich-snippets' ) . ' </label> </th>
|
834 |
+
<td> <input type="text" name="snippet_title_color" id="snippet_title_color" value="' . esc_attr( stripslashes( $args_color['snippet_title_color'] ) ) . '" class="snippet_title_color" /> </td>
|
835 |
+
</tr>
|
836 |
+
<tr>
|
837 |
+
<th> <label for="snippet_box_color"> ' . esc_html__( 'Snippet Text Color', 'all-in-one-schemaorg-rich-snippets' ) . ' </label> </th>
|
838 |
+
<td> <input type="text" name="snippet_box_color" id="snippet_box_color" value="' . esc_attr( stripslashes( $args_color['snippet_box_color'] ) ) . '" class="snippet_box_color" /> </td>
|
839 |
+
</tr>
|
840 |
+
<tr>
|
841 |
+
<td></td>
|
842 |
+
<td><input id="submit_colors" class="button-primary" type="submit" value="Update Colors" /> <a class="button-primary" href="?page=rich_snippet_dashboard&action=reset&options=color">' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . '</a></td>
|
843 |
+
</tr>
|
844 |
+
</table>
|
845 |
+
</form>
|
846 |
+
</div>
|
847 |
+
</div>
|
848 |
+
<div class="schema-notice">
|
849 |
+
<p>' . wp_kses_post( __( "Don't want to add a content box on the front-end? Get the latest and premium schema markup plugin that adds Google recommended JSON-LD structured data format without the content box. <a href='https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_medium=customize' target='_blank'> Know more about Schema Pro.</a>", 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
|
850 |
+
</div>
|
851 |
+
</div>
|
852 |
+
</div>
|
853 |
+
</div>
|
854 |
+
</div>
|
855 |
+
</div>
|
856 |
+
|
857 |
+
</div>
|
858 |
+
</div>
|
859 |
+
<div class="postbox-container" id="bsf-postbox-container-1" >
|
860 |
+
<div id="side-sortables" class="meta-box-sortables ui-sortable">
|
861 |
+
<div class="postbox bsf-woocommerce-setting closed">
|
862 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
863 |
+
<h3 class="get_in_touch">' . esc_html__( 'WooCommerce Configuration', 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
|
864 |
+
<div class="inside">
|
865 |
+
<form id="bsf_css_editor" method="post" action="">
|
866 |
+
' . wp_nonce_field( 'snippet_woocommerce_form_action', 'snippet_woocommerce_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
867 |
+
. '
|
868 |
+
<p> ' . esc_html__( 'WooCommerce comes with Schema.org code by default and using our plugin on WooCommerce product pages does will add duplicate schema so it is not recommended. If you could still like to enable our plugin on WooCommerce products, please enable this option.', 'all-in-one-schemaorg-rich-snippets' ) . ' </p>
|
869 |
+
<table class="bsf_metabox" > <input type="hidden" name="site_url" value="' . esc_url( site_url() ) . '" /> </p>
|
870 |
+
<tr>
|
871 |
+
<td>
|
872 |
+
<input type="checkbox" name="woocommerce_option" id="woocommerce_option" value="1" ' . esc_attr( $woo_setting ) . ' />
|
873 |
+
<label for="woocommerce_option">Enable schema on WooCommerce products</label>
|
874 |
+
</td>
|
875 |
+
</tr>
|
876 |
+
<tr>
|
877 |
+
<td>
|
878 |
+
<input style="margin-top:10px;" type="submit" class="button-primary" name="setting_submit" value="' . esc_html__( 'Update ', 'all-in-one-schemaorg-rich-snippets' ) . '"/>
|
879 |
+
</td>
|
880 |
+
</tr>
|
881 |
+
</table>
|
882 |
+
</form>
|
883 |
+
</div>
|
884 |
+
</div>' . get_support( 1 ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
885 |
+
. '
|
886 |
+
</div>';
|
887 |
+
echo '
|
888 |
+
<script src="' . esc_url( plugin_dir_url( __FILE__ ) ) //phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript
|
889 |
+
. 'js/jquery.easytabs.min.js"></script>
|
890 |
+
<script src="' . esc_url( plugin_dir_url( __FILE__ ) ) //phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript
|
891 |
+
. 'js/jquery.hashchange.min.js"></script>
|
892 |
+
<script language="javascript">
|
893 |
+
jQuery("#tab-container").easytabs();
|
894 |
+
jQuery("#postbox-container-1").css({"width":"87%","padding-right":"2%"});
|
895 |
+
jQuery("#postbox-container-2").css("width","35%");
|
896 |
+
jQuery("#postbox-container-3").css({"width":"87%","padding-right":"2%"});
|
897 |
+
jQuery("#postbox-container-4").css("width","35%");
|
898 |
+
jQuery("#postbox-container-5").css({"width":"87%","padding-right":"2%"});
|
899 |
+
jQuery("#postbox-container-6").css("width","35%");
|
900 |
+
jQuery("#postbox-container-7").css("width","35%");
|
901 |
+
jQuery("#postbox-container-8").css("width","35%");
|
902 |
+
jQuery("#postbox-container-9").css("width","35%");
|
903 |
+
jQuery("#postbox-container-10").css("width","35%");
|
904 |
+
jQuery("#postbox-container-11").css({"width":"87%","padding-right":"2%"});
|
905 |
+
jQuery(".postbox h3").click( function() {
|
906 |
+
jQuery(jQuery(this).parent().get(0)).toggleClass("closed");
|
907 |
+
});
|
908 |
+
jQuery(".handlediv").click( function() {
|
909 |
+
jQuery(jQuery(this).parent().get(0)).toggleClass("closed");
|
910 |
+
});
|
911 |
+
</script>';
|
912 |
+
}
|
913 |
+
// Update options.
|
914 |
+
if ( isset( $_POST['setting_submit'] ) ) {
|
915 |
+
if ( ! isset( $_POST['snippet_woocommerce_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_woocommerce_nonce_field'], 'snippet_woocommerce_form_action' )
|
916 |
+
) {
|
917 |
+
print 'Sorry, your nonce did not verify.';
|
918 |
+
exit;
|
919 |
+
} else {
|
920 |
+
$args = null;
|
921 |
+
if ( isset( $_POST['woocommerce_option'] ) ) {
|
922 |
+
$args = true;
|
923 |
+
} else {
|
924 |
+
$args = false;
|
925 |
+
}
|
926 |
+
update_option( 'bsf_woocom_init_setting', 'done' );
|
927 |
+
$status = update_option( 'bsf_woocom_setting', $args );
|
928 |
+
display_status( $status );
|
929 |
+
}
|
930 |
+
}
|
931 |
+
if ( isset( $_POST['item_submit'] ) ) {
|
932 |
+
if ( ! isset( $_POST['snippet_review_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_review_nonce_field'], 'snippet_review_form_action' )
|
933 |
+
) {
|
934 |
+
print 'Sorry, your nonce did not verify.';
|
935 |
+
exit;
|
936 |
+
} else {
|
937 |
+
foreach ( array( 'review_title', 'item_reviewer', 'review_date', 'item_name', 'item_rating' ) as $option ) {
|
938 |
+
if ( isset( $_POST[ $option ] ) ) {
|
939 |
+
$args[ $option ] = esc_attr( $_POST[ $option ] );
|
940 |
+
}
|
941 |
+
}
|
942 |
+
$status = update_option( 'bsf_review', $args );
|
943 |
+
display_status( $status );
|
944 |
+
}
|
945 |
+
}
|
946 |
+
if ( isset( $_POST['event_submit'] ) ) {
|
947 |
+
if ( ! isset( $_POST['snippet_event_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_event_nonce_field'], 'snippet_event_form_action' )
|
948 |
+
) {
|
949 |
+
print 'Sorry, your nonce did not verify.';
|
950 |
+
exit;
|
951 |
+
} else {
|
952 |
+
foreach ( array( 'snippet_title', 'event_title', 'event_location', 'event_performer', 'start_time', 'end_time', 'event_desc', 'events_price' ) as $option ) {
|
953 |
+
if ( isset( $_POST[ $option ] ) ) {
|
954 |
+
$args[ $option ] = esc_attr( $_POST[ $option ] );
|
955 |
+
}
|
956 |
+
}
|
957 |
+
$status = update_option( 'bsf_event', $args );
|
958 |
+
display_status( $status );
|
959 |
+
}
|
960 |
+
}
|
961 |
+
if ( isset( $_POST['person_submit'] ) ) {
|
962 |
+
if ( ! isset( $_POST['snippet_person_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_person_nonce_field'], 'snippet_person_form_action' )
|
963 |
+
) {
|
964 |
+
print 'Sorry, your nonce did not verify.';
|
965 |
+
exit;
|
966 |
+
} else {
|
967 |
+
foreach ( array( 'snippet_title', 'person_name', 'person_nickname', 'person_job_title', 'person_website', 'person_company', 'person_address' ) as $option ) {
|
968 |
+
if ( isset( $_POST[ $option ] ) ) {
|
969 |
+
$args[ $option ] = esc_attr( $_POST[ $option ] );
|
970 |
+
}
|
971 |
+
}
|
972 |
+
$status = update_option( 'bsf_person', $args );
|
973 |
+
display_status( $status );
|
974 |
+
}
|
975 |
+
}
|
976 |
+
if ( isset( $_POST['product_submit'] ) ) {
|
977 |
+
if ( ! isset( $_POST['snippet_product_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_product_nonce_field'], 'snippet_product_form_action' )
|
978 |
+
) {
|
979 |
+
print 'Sorry, your nonce did not verify.';
|
980 |
+
exit;
|
981 |
+
} else {
|
982 |
+
foreach ( array( 'snippet_title', 'product_rating', 'product_brand', 'product_name', 'product_agr', 'product_price', 'product_avail' ) as $option ) {
|
983 |
+
if ( isset( $_POST[ $option ] ) ) {
|
984 |
+
$args[ $option ] = esc_attr( $_POST[ $option ] );
|
985 |
+
}
|
986 |
+
}
|
987 |
+
$status = update_option( 'bsf_product', $args );
|
988 |
+
display_status( $status );
|
989 |
+
}
|
990 |
+
}
|
991 |
+
if ( isset( $_POST['recipe_submit'] ) ) {
|
992 |
+
if ( ! isset( $_POST['snippet_recipe_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_recipe_nonce_field'], 'snippet_recipe_form_action' )
|
993 |
+
) {
|
994 |
+
print 'Sorry, your nonce did not verify.';
|
995 |
+
exit;
|
996 |
+
} else {
|
997 |
+
foreach ( array( 'snippet_title', 'recipe_name', 'author_name', 'recipe_pub', 'recipe_prep', 'recipe_cook', 'recipe_time', 'recipe_desc', 'recipe_rating' ) as $option ) {
|
998 |
+
if ( isset( $_POST[ $option ] ) ) {
|
999 |
+
$args[ $option ] = esc_attr( $_POST[ $option ] );
|
1000 |
+
}
|
1001 |
+
}
|
1002 |
+
$status = update_option( 'bsf_recipe', $args );
|
1003 |
+
display_status( $status );
|
1004 |
+
}
|
1005 |
+
}
|
1006 |
+
if ( isset( $_POST['software_submit'] ) ) {
|
1007 |
+
if ( ! isset( $_POST['snippet_soft_app_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_soft_app_nonce_field'], 'snippet_soft_app_form_action' )
|
1008 |
+
) {
|
1009 |
+
print 'Sorry, your nonce did not verify.';
|
1010 |
+
exit;
|
1011 |
+
} else {
|
1012 |
+
foreach ( array( 'snippet_title', 'software_rating', 'software_agr', 'software_price', 'software_name', 'software_os', 'software_website' ) as $option ) {
|
1013 |
+
if ( isset( $_POST[ $option ] ) ) {
|
1014 |
+
$args[ $option ] = esc_attr( $_POST[ $option ] );
|
1015 |
+
}
|
1016 |
+
}
|
1017 |
+
$status = update_option( 'bsf_software', $args );
|
1018 |
+
display_status( $status );
|
1019 |
+
}
|
1020 |
+
}
|
1021 |
+
if ( isset( $_POST['video_submit'] ) ) {
|
1022 |
+
if ( ! isset( $_POST['snippet_video_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_video_nonce_field'], 'snippet_video_form_action' )
|
1023 |
+
) {
|
1024 |
+
print 'Sorry, your nonce did not verify.';
|
1025 |
+
exit;
|
1026 |
+
} else {
|
1027 |
+
foreach ( array( 'snippet_title', 'video_title', 'video_desc', 'video_time', 'video_date' ) as $option ) {
|
1028 |
+
if ( isset( $_POST[ $option ] ) ) {
|
1029 |
+
$args[ $option ] = esc_attr( $_POST[ $option ] );
|
1030 |
+
}
|
1031 |
+
}
|
1032 |
+
$status = update_option( 'bsf_video', $args );
|
1033 |
+
display_status( $status );
|
1034 |
+
}
|
1035 |
+
}
|
1036 |
+
if ( isset( $_POST['article_submit'] ) ) {
|
1037 |
+
if ( ! isset( $_POST['snippet_article_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_article_nonce_field'], 'snippet_article_form_action' )
|
1038 |
+
) {
|
1039 |
+
print 'Sorry, your nonce did not verify.';
|
1040 |
+
exit;
|
1041 |
+
} else {
|
1042 |
+
foreach ( array( 'snippet_title', 'article_name', 'article_author', 'article_desc', 'article_image', 'article_publisher', 'article_publisher_logo' ) as $option ) {
|
1043 |
+
if ( isset( $_POST[ $option ] ) ) {
|
1044 |
+
$args[ $option ] = esc_attr( $_POST[ $option ] );
|
1045 |
+
}
|
1046 |
+
}
|
1047 |
+
$status = update_option( 'bsf_article', $args );
|
1048 |
+
display_status( $status );
|
1049 |
+
}
|
1050 |
+
}
|
1051 |
+
if ( isset( $_POST['service_submit'] ) ) {
|
1052 |
+
if ( ! isset( $_POST['snippet_service_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_service_nonce_field'], 'snippet_service_form_action' )
|
1053 |
+
) {
|
1054 |
+
print 'Sorry, your nonce did not verify.';
|
1055 |
+
exit;
|
1056 |
+
} else {
|
1057 |
+
foreach ( array( 'snippet_title', 'service_type', 'service_area', 'service_desc', 'service_provider_name', 'provider_location', 'service_rating', 'service_channel', 'service_url_link' ) as $option ) {
|
1058 |
+
if ( isset( $_POST[ $option ] ) ) {
|
1059 |
+
$args[ $option ] = esc_attr( $_POST[ $option ] );
|
1060 |
+
}
|
1061 |
+
}
|
1062 |
+
$status = update_option( 'bsf_service', $args );
|
1063 |
+
display_status( $status );
|
1064 |
+
}
|
1065 |
+
}
|
1066 |
+
/**
|
1067 |
+
* Display status.
|
1068 |
+
*
|
1069 |
+
* @param string $status .
|
1070 |
+
*/
|
1071 |
+
function display_status( $status ) {
|
1072 |
+
if ( $status ) {
|
1073 |
+
echo '<div class="updated"><p>' . esc_html__( 'Success! Your changes were successfully saved!', 'all-in-one-schemaorg-rich-snippets' ) . '</p></div>';
|
1074 |
+
} else {
|
1075 |
+
echo '<div class="error"><p>' . esc_html__( 'Sorry, Your changes are not saved!', 'all-in-one-schemaorg-rich-snippets' ) . '</p></div>';
|
1076 |
+
}
|
1077 |
+
}
|
1078 |
+
if ( isset( $_GET['action'] ) ) {
|
1079 |
+
if ( 'reset' == esc_attr( $_GET['action'] ) ) {
|
1080 |
+
$option_to_reset = esc_attr( $_GET['options'] );
|
1081 |
+
if ( 'review' == $option_to_reset ) {
|
1082 |
+
delete_option( 'bsf_review' );
|
1083 |
+
}
|
1084 |
+
if ( 'event' == $option_to_reset ) {
|
1085 |
+
delete_option( 'bsf_event' );
|
1086 |
+
}
|
1087 |
+
if ( 'person' == $option_to_reset ) {
|
1088 |
+
delete_option( 'bsf_person' );
|
1089 |
+
}
|
1090 |
+
|
1091 |
+
if ( 'product' == $option_to_reset ) {
|
1092 |
+
delete_option( 'bsf_product' );
|
1093 |
+
}
|
1094 |
+
if ( 'recipe' == $option_to_reset ) {
|
1095 |
+
delete_option( 'bsf_recipe' );
|
1096 |
+
}
|
1097 |
+
if ( 'software' == $option_to_reset ) {
|
1098 |
+
delete_option( 'bsf_software' );
|
1099 |
+
}
|
1100 |
+
if ( 'video' == $option_to_reset ) {
|
1101 |
+
delete_option( 'bsf_video' );
|
1102 |
+
}
|
1103 |
+
|
1104 |
+
if ( 'article' == $option_to_reset ) {
|
1105 |
+
delete_option( 'bsf_article' );
|
1106 |
+
}
|
1107 |
+
if ( 'service' == $option_to_reset ) {
|
1108 |
+
delete_option( 'bsf_service' );
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
if ( 'color' == $option_to_reset ) {
|
1112 |
+
delete_option( 'bsf_custom' );
|
1113 |
+
}
|
1114 |
+
|
1115 |
+
bsf_reset_options( $option_to_reset );
|
1116 |
+
}
|
1117 |
+
}
|
1118 |
+
/**
|
1119 |
+
* BSF reset option.
|
1120 |
+
*
|
1121 |
+
* @param string $option_to_reset .
|
1122 |
+
*/
|
1123 |
+
function bsf_reset_options( $option_to_reset ) {
|
1124 |
+
require_once dirname( esc_html__FILEesc_html__ ) . '/../settings.php';
|
1125 |
+
if ( 'review' == $option_to_reset ) {
|
1126 |
+
add_review_option();
|
1127 |
+
}
|
1128 |
+
if ( 'event' == $option_to_reset ) {
|
1129 |
+
add_event_option();
|
1130 |
+
}
|
1131 |
+
if ( 'person' == $option_to_reset ) {
|
1132 |
+
add_person_option();
|
1133 |
+
}
|
1134 |
+
if ( 'product' == $option_to_reset ) {
|
1135 |
+
add_product_option();
|
1136 |
+
}
|
1137 |
+
if ( 'recipe' == $option_to_reset ) {
|
1138 |
+
add_recipe_option();
|
1139 |
+
}
|
1140 |
+
if ( 'software' == $option_to_reset ) {
|
1141 |
+
add_software_option();
|
1142 |
+
}
|
1143 |
+
if ( 'video' == $option_to_reset ) {
|
1144 |
+
add_video_option();
|
1145 |
+
}
|
1146 |
+
if ( 'article' == $option_to_reset ) {
|
1147 |
+
add_article_option();
|
1148 |
+
}
|
1149 |
+
if ( 'service' == $option_to_reset ) {
|
1150 |
+
add_service_option();
|
1151 |
+
}
|
1152 |
+
if ( 'color' == $option_to_reset ) {
|
1153 |
+
add_color_option();
|
1154 |
+
}
|
1155 |
+
|
1156 |
+
header( 'location:?page=rich_snippet_dashboard' );
|
1157 |
+
}
|
1158 |
+
/**
|
1159 |
+
* Add footer script.
|
1160 |
+
*/
|
1161 |
+
function add_footer_script() {
|
1162 |
+
?>
|
1163 |
+
<script type="text/javascript">
|
1164 |
+
jQuery("#submit_colors").click(function()
|
1165 |
+
{
|
1166 |
+
var data = jQuery("#bsf_css_editor").serialize();
|
1167 |
+
var form_data = "action=bsf_submit_color&" + data;
|
1168 |
+
//alert(form_data);
|
1169 |
+
jQuery.post(ajaxurl, form_data,
|
1170 |
+
function (response) {
|
1171 |
+
alert(response);
|
1172 |
+
}
|
1173 |
+
);
|
1174 |
+
});
|
1175 |
+
jQuery("#support_form").submit(function()
|
1176 |
+
{
|
1177 |
+
var data = jQuery("#support_form").serialize();
|
1178 |
+
var form_data = "action=bsf_submit_request&" + data;
|
1179 |
+
// alert(form_data);
|
1180 |
+
jQuery.post(ajaxurl, form_data,
|
1181 |
+
function (response) {
|
1182 |
+
alert(response);
|
1183 |
+
jQuery("#support_form .bsf_text_medium, #support_form .bsf_textarea_small").val("");
|
1184 |
+
}
|
1185 |
+
);
|
1186 |
+
});
|
1187 |
+
</script>
|
1188 |
+
<?php }
|
1189 |
+
/**
|
1190 |
+
* Get support.
|
1191 |
+
*/
|
1192 |
+
function get_support() {
|
1193 |
+
|
1194 |
+
$html = '
|
1195 |
+
<div class="postbox bsf-contact closed">
|
1196 |
+
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
|
1197 |
+
<h3 class="get_in_touch">' . esc_html__( 'Get in touch with the Plugin Developers', 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
|
1198 |
+
<div class="inside">
|
1199 |
+
<form name="support" id="support_form" action="" method="post" onsubmit="return false;">'
|
1200 |
+
. wp_nonce_field( 'aiosrs_support_form', 'aiosrs_support_form_nonce' ) . '
|
1201 |
+
<p> ' . esc_html__( 'Just fill out the form below and your message will be emailed to the Plugin Developers.', 'all-in-one-schemaorg-rich-snippets' ) . ' </p>
|
1202 |
+
<table class="bsf_metabox" > <input type="hidden" name="site_url" value="' . site_url() . '" /> </p>
|
1203 |
+
<tr><td><label for="name"><strong>' . esc_html__( 'Your Name:', 'all-in-one-schemaorg-rich-snippets' ) . '<span style="color:red;"> *</span></strong> </label></td>
|
1204 |
+
<td><input required="required" type="text" class="bsf_text_medium" name="name" /></td></tr>
|
1205 |
+
<tr><td><label for="email"><strong>' . esc_html__( 'Your Email:', 'all-in-one-schemaorg-rich-snippets' ) . '<span style="color:red;"> *</span></strong> </label></td>
|
1206 |
+
<td><input required="required" type="text" class="bsf_text_medium" name="email" /></td></tr>
|
1207 |
+
<tr><td><label for="post_url"><strong>' . esc_html__( 'Reference URL:', 'all-in-one-schemaorg-rich-snippets' ) . '<span style="color:red;"> *</span></strong> </label></td>
|
1208 |
+
<td><input required="required" type="text" class="bsf_text_medium" name="post_url" /></td></tr>
|
1209 |
+
<tr><td><label for="subject"><strong>' . esc_html__( 'Subject:', 'all-in-one-schemaorg-rich-snippets' ) . '</strong> </label></td>
|
1210 |
+
<td>
|
1211 |
+
<select class="select_full" name="subject">
|
1212 |
+
<option value="question"> I have a question </option>
|
1213 |
+
<option value="bug"> I found a bug </option>
|
1214 |
+
<option value="help"> I need help </option>
|
1215 |
+
<option value="professional"> I need professional service </option>
|
1216 |
+
<option value="contribute"> I want to contribute my code</option>
|
1217 |
+
<option value="other"> Other </option>
|
1218 |
+
</select>
|
1219 |
+
</td><td></td></tr>
|
1220 |
+
<tr><td class="bsf_label"><label for="message"><strong>' . esc_html__( 'Your Query in Brief:', 'all-in-one-schemaorg-rich-snippets' ) . '</strong> </label></td>
|
1221 |
+
<td rowspan="4"><textarea class="bsf_textarea_small" name="message" required></textarea> </td></tr>
|
1222 |
+
<tr></tr> <tr></tr> <tr></tr>
|
1223 |
+
<tr><td></td>
|
1224 |
+
<td><input id="submit_request" class="button-primary" type="submit" value="Submit Request" /> <span id="status"></span></td></tr>
|
1225 |
+
</table>
|
1226 |
+
</form>
|
1227 |
+
</div>
|
1228 |
+
</div>
|
1229 |
+
</div>
|
1230 |
+
</div>
|
1231 |
+
</div>
|
1232 |
+
';
|
1233 |
+
return $html;
|
1234 |
+
}
|
1235 |
+
?>
|
css/style.css
CHANGED
@@ -101,6 +101,7 @@
|
|
101 |
margin: -2px 2px;
|
102 |
border: none !important;
|
103 |
padding: 0 !important;
|
|
|
104 |
}
|
105 |
.rating-count {
|
106 |
font-weight:bold;
|
101 |
margin: -2px 2px;
|
102 |
border: none !important;
|
103 |
padding: 0 !important;
|
104 |
+
display: inline-block;
|
105 |
}
|
106 |
.rating-count {
|
107 |
font-weight:bold;
|
functions.php
CHANGED
@@ -1,1337 +1,1352 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Template Name: Plugin Functions
|
4 |
-
*
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
*
|
10 |
-
*
|
11 |
-
* @
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
add_action( '
|
17 |
-
|
18 |
-
|
19 |
-
add_action( '
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
function
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
$
|
77 |
-
|
78 |
-
$
|
79 |
-
$
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
$
|
85 |
-
$
|
86 |
-
$
|
87 |
-
$
|
88 |
-
$
|
89 |
-
$
|
90 |
-
$
|
91 |
-
$
|
92 |
-
$
|
93 |
-
$
|
94 |
-
$
|
95 |
-
$
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
$review .=
|
117 |
-
|
118 |
-
|
119 |
-
{
|
120 |
-
if( $args_review['
|
121 |
-
$review .=
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
$review .=
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
$
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
if(
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
$review .= "
|
238 |
-
}
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
$
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
$review .= "
|
252 |
-
}
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
$
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
{
|
307 |
-
$event .= '<
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
$
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
{
|
325 |
-
|
326 |
-
|
327 |
-
$event .='
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
$event .= '
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
$event .= '
|
357 |
-
}
|
358 |
-
if(trim($
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
$event .= '
|
363 |
-
}
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
</div></div>
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
<span
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
</span>';
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
{
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
{
|
504 |
-
if($args_person['
|
505 |
-
$people .= '<div class="snippet-label-img">'.esc_attr( stripslashes(
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
$people .= '<div
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
$
|
560 |
-
}
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
$
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
$product .= '<div class="
|
595 |
-
if(
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
$product .= '
|
615 |
-
}
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
$
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
$
|
654 |
-
$
|
655 |
-
|
656 |
-
$
|
657 |
-
|
658 |
-
$
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
$
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
{
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
{
|
701 |
-
if($args_recipe['
|
702 |
-
$recipe .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_recipe['
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
$
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
$software
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
$
|
755 |
-
$
|
756 |
-
|
757 |
-
$
|
758 |
-
$
|
759 |
-
$
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
$software
|
797 |
-
$software
|
798 |
-
|
799 |
-
|
800 |
-
{
|
801 |
-
if($args_soft['software_name']
|
802 |
-
$software .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_soft['software_name'] ) ).'</div>';
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
{
|
807 |
-
if($args_soft['software_os']
|
808 |
-
$software .= '<div class="snippet-label-img">'.esc_attr( stripslashes( $args_soft['software_os'] ) ).'</div>';
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
{
|
813 |
-
$software .= '<div class="snippet-label-img">Software Category</div>';
|
814 |
-
$software
|
815 |
-
}
|
816 |
-
if(trim($software_price)
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
$software .= '<div class="snippet-data-img"> <span itemprop="offers" itemscope itemtype="
|
821 |
-
<span itemprop="priceCurrency">'.esc_attr( $software_cur ).'</span> <span itemprop="price"> '.esc_attr( $software_price ).'</span></div><div class="snippet-clear"></div>';
|
822 |
-
|
823 |
-
}
|
824 |
-
if(trim($software_desc)
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
$software .= ' <div class="snippet-data-img"> <span itemprop="description">'.esc_attr( htmlspecialchars_decode( $software_desc ) ).'</span></div><div class="snippet-clear"></div>';
|
829 |
-
}
|
830 |
-
if(trim($software_landing)
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
$software .= '<div class="snippet-data-img"> <a itemprop="featureList" href="'.esc_url( $software_landing ).'">'.esc_attr( $software_landing ).'</a></div><div class="snippet-clear"></div>';
|
835 |
-
}
|
836 |
-
$software .= '</div>
|
837 |
-
</div></div><div class="snippet-clear"></div>';
|
838 |
-
|
839 |
-
return ( is_single() || is_page() ) ? $content
|
840 |
-
}
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
$video = '';
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
$
|
852 |
-
$
|
853 |
-
$
|
854 |
-
$
|
855 |
-
$
|
856 |
-
|
857 |
-
|
858 |
-
$
|
859 |
-
|
860 |
-
|
861 |
-
{
|
862 |
-
$video .= '<div class="snippet-image"><a href="'.esc_url( $
|
863 |
-
}
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
{
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
$video .= '<meta itemprop="
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
$video
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
$
|
910 |
-
$
|
911 |
-
$
|
912 |
-
$
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
$article .= '<
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
$article .= '<div class="snippet-data-img">
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
$
|
1012 |
-
$args_service
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
{
|
1035 |
-
$service .= '<div class="snippet-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
$service .=
|
1047 |
-
}
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
}
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
}
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
$service .= '<div class="snippet-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
$
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
}
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
{
|
1221 |
-
|
1222 |
-
|
1223 |
-
}
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
$
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
}
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
$
|
1264 |
-
|
1265 |
-
$
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
echo false ==
|
1272 |
-
die();
|
1273 |
-
}
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
$rating
|
1281 |
-
$rating .= '<
|
1282 |
-
$rating .= '
|
1283 |
-
$rating .= '<input type="radio" name="star-review" class="star star-
|
1284 |
-
$rating .= '<input type="
|
1285 |
-
$rating .= '<input type="
|
1286 |
-
$rating .= '
|
1287 |
-
|
1288 |
-
$
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
$
|
1318 |
-
$rating
|
1319 |
-
|
1320 |
-
$
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template Name: Plugin Functions.
|
4 |
+
*
|
5 |
+
* @package AIOSRS.
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Define the metabox and field configurations.
|
10 |
+
*
|
11 |
+
* @param array $meta_boxes
|
12 |
+
* @return array
|
13 |
+
*/
|
14 |
+
add_action( 'init', 'bsf_initialize_bsf_meta_boxes', 9999 );
|
15 |
+
// Register an action for submitting rating.
|
16 |
+
add_action( 'wp_ajax_nopriv_bsf_submit_rating', 'bsf_add_rating' );
|
17 |
+
add_action( 'wp_ajax_bsf_submit_rating', 'bsf_add_rating' );
|
18 |
+
// Register an action for updating rating.
|
19 |
+
add_action( 'wp_ajax_nopriv_bsf_update_rating', 'bsf_update_rating' );
|
20 |
+
add_action( 'wp_ajax_bsf_update_rating', 'bsf_update_rating' );
|
21 |
+
// Include the Ajax library on the front end.
|
22 |
+
add_action( 'wp_head', 'add_ajax_library' );
|
23 |
+
/**
|
24 |
+
* Initialize the metabox class.
|
25 |
+
*/
|
26 |
+
/* FUNCTION to check for posts having snippets */
|
27 |
+
add_action( 'wp', 'aiosrs_check_snippet_existence' );
|
28 |
+
/**
|
29 |
+
* Aiosrs_check_snippet_existence.
|
30 |
+
*/
|
31 |
+
function aiosrs_check_snippet_existence() {
|
32 |
+
global $post;
|
33 |
+
|
34 |
+
if ( ! isset( $post->ID ) ) {
|
35 |
+
return;
|
36 |
+
}
|
37 |
+
|
38 |
+
$type = get_post_meta( $post->ID, '_bsf_post_type', true );
|
39 |
+
if ( $type ) {
|
40 |
+
add_action( 'wp_enqueue_scripts', 'aiosrs_enque' );
|
41 |
+
}
|
42 |
+
|
43 |
+
}
|
44 |
+
/**
|
45 |
+
* Aiosrs_enque.
|
46 |
+
*/
|
47 |
+
function aiosrs_enque() {
|
48 |
+
wp_enqueue_style( 'rating_style', plugin_dir_url( __FILE__ ) . 'css/jquery.rating.css', null, '1.0' );
|
49 |
+
wp_enqueue_script( 'jquery_rating', plugin_dir_url( __FILE__ ) . 'js/jquery.rating.min.js', array( 'jquery' ), null, false ); //phpcs:ignore:WordPress.WP.EnqueuedResourceParameters.MissingVersion
|
50 |
+
wp_register_style( 'bsf_style', plugins_url( '/css/style.css', __FILE__ ), null, '1.0' );
|
51 |
+
wp_enqueue_style( 'bsf_style' );
|
52 |
+
}
|
53 |
+
/**
|
54 |
+
* Bsf_initialize_bsf_meta_boxes.
|
55 |
+
*/
|
56 |
+
function bsf_initialize_bsf_meta_boxes() {
|
57 |
+
if ( ! class_exists( 'Bsf_Meta_Box' ) ) {
|
58 |
+
require_once plugin_dir_path( __FILE__ ) . 'init.php';
|
59 |
+
}
|
60 |
+
}
|
61 |
+
/**
|
62 |
+
* Function to display the rich snippet output below the content.
|
63 |
+
*
|
64 |
+
* @param string $content Content.
|
65 |
+
*/
|
66 |
+
function display_rich_snippet( $content ) {
|
67 |
+
global $post;
|
68 |
+
|
69 |
+
$args_color = get_option( 'bsf_custom' );
|
70 |
+
$id = $post->ID;
|
71 |
+
$type = get_post_meta( $id, '_bsf_post_type', true );
|
72 |
+
|
73 |
+
if ( '1' == $type ) {
|
74 |
+
global $post;
|
75 |
+
|
76 |
+
$args_review = get_option( 'bsf_review' );
|
77 |
+
|
78 |
+
$review = '';
|
79 |
+
$review .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
|
80 |
+
|
81 |
+
if ( '' != $args_review['review_title'] ) {
|
82 |
+
$review .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_review['review_title'] ) ) . '</div>';
|
83 |
+
}
|
84 |
+
$review .= '<div class="snippet-markup" itemscope itemtype="https://schema.org/Review">';
|
85 |
+
$item = get_post_meta( $post->ID, '_bsf_item_name', true );
|
86 |
+
$item_review_type = get_post_meta( $post->ID, '_bsf_item_review_type', true );
|
87 |
+
$item_event_name = get_post_meta( $post->ID, '_bsf_item_event_name', true );
|
88 |
+
$item_event_start_date = get_post_meta( $post->ID, '_bsf_item_event_start_date', true );
|
89 |
+
$item_event_org = get_post_meta( $post->ID, '_bsf_item_event_organization', true );
|
90 |
+
$item_event_street = get_post_meta( $post->ID, '_bsf_item_event_street', true );
|
91 |
+
$item_event_local = get_post_meta( $post->ID, '_bsf_item_event_local', true );
|
92 |
+
$item_event_region = get_post_meta( $post->ID, '_bsf_item_event_region', true );
|
93 |
+
$item_event_postal_code = get_post_meta( $post->ID, '_bsf_item_event_postal_code', true );
|
94 |
+
$item_pro_name = get_post_meta( $post->ID, '_bsf_item_pro_name', true );
|
95 |
+
$item_pro_price = get_post_meta( $post->ID, '_bsf_item_pro_price', true );
|
96 |
+
$item_pro_cur = get_post_meta( $post->ID, '_bsf_item_pro_cur', true );
|
97 |
+
$item_pro_status = get_post_meta( $post->ID, '_bsf_item_pro_status', true );
|
98 |
+
$item_recp_name = get_post_meta( $post->ID, '_bsf_item_recipes_name', true );
|
99 |
+
$item_recp_photo = get_post_meta( $post->ID, '_bsf_item_recipes_photo', true );
|
100 |
+
$item_soft_name = get_post_meta( $post->ID, '_bsf_item_soft_name', true );
|
101 |
+
$item_os_name = get_post_meta( $post->ID, '_bsf_item_os_name', true );
|
102 |
+
$item_app_name = get_post_meta( $post->ID, '_bsf_item_app_name', true );
|
103 |
+
$item_video_title = get_post_meta( $post->ID, '_bsf_item_video_title', true );
|
104 |
+
$item_video_desc = get_post_meta( $post->ID, '_bsf_item_video_desc', true );
|
105 |
+
$item_video_thumb = get_post_meta( $post->ID, '_bsf_item_video_thumb', true );
|
106 |
+
$item_video_date = get_post_meta( $post->ID, '_bsf_item_video_date', true );
|
107 |
+
$rating = get_post_meta( $post->ID, '_bsf_rating', true );
|
108 |
+
$reviewer = get_post_meta( $post->ID, '_bsf_item_reviewer', true );
|
109 |
+
$post_date = get_the_date( 'Y-m-d' );
|
110 |
+
|
111 |
+
if ( 'item_recipe' == $item_review_type ) {
|
112 |
+
$review .= '<div class="snippet-image"><img width="180" src="' . esc_url( $item_recp_photo ) . '" alt="recipe image"/></div>';
|
113 |
+
$review .= '<div class="aio-info">';
|
114 |
+
}
|
115 |
+
if ( 'item_video' == $item_review_type ) {
|
116 |
+
$review .= '<div class="snippet-image"><img width="180" src="' . esc_url( $item_video_thumb ) . '" alt="Video Image"/></div>';
|
117 |
+
$review .= '<div class="aio-info">';
|
118 |
+
}
|
119 |
+
if ( '' != trim( $reviewer ) ) {
|
120 |
+
if ( '' != $args_review['item_reviewer'] ) {
|
121 |
+
$review .= '<span itemprop="author" itemscope itemtype="https://schema.org/Person">';
|
122 |
+
}
|
123 |
+
$review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $args_review['item_reviewer'] ) ) . '</div>';
|
124 |
+
$review .= " <div class='snippet-data'><span itemprop='name'>" . esc_attr( stripslashes( $reviewer ) ) . '</span></div></span>';
|
125 |
+
}
|
126 |
+
if ( isset( $args_review['review_date'] ) ) {
|
127 |
+
if ( '' != $args_review['review_date'] ) {
|
128 |
+
$review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $args_review['review_date'] ) ) . '</div>';
|
129 |
+
}
|
130 |
+
$review .= "<div class='snippet-data'> <time itemprop='datePublished' datetime='" . get_the_time( 'c' ) . "'>" . esc_attr( $post_date ) . '</time></div>';
|
131 |
+
}
|
132 |
+
if ( '' != trim( $item ) ) {
|
133 |
+
if ( '' != $args_review['item_name'] ) {
|
134 |
+
$review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $args_review['item_name'] ) ) . '</div>';
|
135 |
+
}
|
136 |
+
$review .= "<div class='snippet-data'> <span itemprop='name'>" . esc_attr( $item ) . '</span></div>';
|
137 |
+
}
|
138 |
+
if ( '' != trim( $rating ) ) {
|
139 |
+
if ( '' != $args_review['item_rating'] ) {
|
140 |
+
$review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $args_review['item_rating'] ) ) . '</div>';
|
141 |
+
}
|
142 |
+
$review .= "<div class='snippet-data'> <span itemprop='reviewRating' itemscope itemtype='https://schema.org/Rating'><span class='rating-value' itemprop='ratingValue'>" . esc_attr( $rating ) . "</span></span><span class='star-img'>";
|
143 |
+
$ceil_rating = ceil( $rating );
|
144 |
+
for ( $i = 1; $i <= $ceil_rating; $i++ ) {
|
145 |
+
$review .= '<img src="' . plugin_dir_url( __FILE__ ) . 'images/1star.png" alt="1star">';
|
146 |
+
}
|
147 |
+
for ( $j = 0; $j <= 5 - $ceil_rating; $j++ ) {
|
148 |
+
if ( $j ) {
|
149 |
+
$review .= '<img src="' . plugin_dir_url( __FILE__ ) . 'images/gray.png" alt="gray">';
|
150 |
+
}
|
151 |
+
}
|
152 |
+
$review .= '</span></div>';
|
153 |
+
}
|
154 |
+
if ( '' != trim( $item_review_type ) ) {
|
155 |
+
if ( 'item_event' == $item_review_type ) {
|
156 |
+
$item_event = get_option( 'bsf_event' );
|
157 |
+
$review .= '<span itemprop="itemReviewed" itemscope itemtype="https://schema.org/Event">';
|
158 |
+
if ( '' != trim( $item_event_name ) ) {
|
159 |
+
if ( '' != $item_event['event_title'] ) {
|
160 |
+
$review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $item_event['event_title'] ) ) . '</div>';
|
161 |
+
}
|
162 |
+
$review .= " <div class='snippet-data'><span itemprop='name'>" . esc_attr( stripslashes( $item_event_name ) ) . '</span></div>';
|
163 |
+
}
|
164 |
+
if ( '' != trim( $item_event_start_date ) ) {
|
165 |
+
if ( '' != $item_event['start_time'] ) {
|
166 |
+
$review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $item_event['start_time'] ) ) . '</div>';
|
167 |
+
}
|
168 |
+
$review .= " <div class='snippet-data'><span itemprop='startDate' datetime='" . esc_attr( $item_event_start_date ) . "T00:00-00:00'>" . esc_attr( $item_event_start_date ) . '</span></div>';
|
169 |
+
}
|
170 |
+
if ( '' != trim( $item_event_org ) ) {
|
171 |
+
if ( '' != $item_event['event_location'] ) {
|
172 |
+
$review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $item_event['event_location'] ) ) . '</div>';
|
173 |
+
}
|
174 |
+
$review .= " <div class='snippet-data'><span itemprop='location' itemscope itemtype='https://schema.org/Place'><span itemprop='name'>" . esc_attr( stripslashes( $item_event_org ) ) . '</span>,';
|
175 |
+
if ( '' != trim( $item_event_street ) ) {
|
176 |
+
$review .= '<span itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
|
177 |
+
<span itemprop="streetAddress">' . esc_attr( $item_event_street ) . '</span>,';
|
178 |
+
}
|
179 |
+
if ( '' != trim( $item_event_local ) ) {
|
180 |
+
$review .= '<span itemprop="addressLocality">' . esc_attr( $item_event_local ) . '</span>,';
|
181 |
+
}
|
182 |
+
if ( '' != trim( $item_event_region ) ) {
|
183 |
+
$review .= '<span itemprop="addressRegion">' . esc_attr( $item_event_region ) . '</span>';
|
184 |
+
}
|
185 |
+
if ( '' != trim( $item_event_postal_code ) ) {
|
186 |
+
$review .= '-<span itemprop="postalCode">' . esc_attr( $item_event_postal_code ) . '</span>';
|
187 |
+
}
|
188 |
+
$review .= '</span>';
|
189 |
+
$review .= '</span></div>';
|
190 |
+
}
|
191 |
+
$review .= '</span>';
|
192 |
+
}
|
193 |
+
if ( 'item_product' == $item_review_type ) {
|
194 |
+
$item_product = get_option( 'bsf_product' );
|
195 |
+
if ( 'out_of_stock' == trim( $item_pro_status ) ) {
|
196 |
+
$item_pro_status = 'OutOfStock';
|
197 |
+
$availability = 'Out of Stock';
|
198 |
+
} elseif ( 'in_stock' == trim( $item_pro_status ) ) {
|
199 |
+
$item_pro_status = 'InStock';
|
200 |
+
$availability = 'Available in Stock';
|
201 |
+
} elseif ( 'instore_only' == trim( $item_pro_status ) ) {
|
202 |
+
$item_pro_status = 'InStoreOnly';
|
203 |
+
$availability = 'Available in Store Only';
|
204 |
+
} elseif ( 'preorder' == trim( $item_pro_status ) ) {
|
205 |
+
$availability = 'Pre-Order Only';
|
206 |
+
}
|
207 |
+
$review .= '<span itemprop="itemReviewed" itemscope itemtype="https://schema.org/Product">';
|
208 |
+
if ( '' != trim( $item_pro_name ) ) {
|
209 |
+
if ( '' != $item_product['product_name'] ) {
|
210 |
+
$review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $item_product['product_name'] ) ) . '</div>';
|
211 |
+
}
|
212 |
+
$review .= " <div class='snippet-data'><span itemprop='name'>" . esc_attr( stripslashes( $item_pro_name ) ) . '</span></div>';
|
213 |
+
}
|
214 |
+
if ( '' != trim( $item_pro_price ) ) {
|
215 |
+
|
216 |
+
if ( '' != $item_product['product_price'] ) {
|
217 |
+
$review .= '<div class="offer_sec" itemprop="offers" itemscope itemtype="https://schema.org/Offer"><div class="snippet-label">' . esc_attr( stripslashes( $item_product['product_price'] ) ) . '</div>';
|
218 |
+
}
|
219 |
+
$review .= '<div class="snippet-data">
|
220 |
+
<span itemprop="priceCurrency">' . esc_attr( $item_pro_cur ) . '</span><span itemprop="price"> ' . esc_attr( $item_pro_price ) . '</span></div>';
|
221 |
+
|
222 |
+
if ( '' != trim( $item_pro_status ) ) {
|
223 |
+
if ( '' != $item_product['product_avail'] ) {
|
224 |
+
$review .= '<div class="snippet-label">' . esc_attr( stripslashes( $item_product['product_avail'] ) ) . '</div>';
|
225 |
+
}
|
226 |
+
$review .= ' <div class="snippet-data"> <span itemprop="availability" content="' . esc_attr( $item_pro_status ) . '">' . esc_attr( $availability ) . '</span></span></div>';
|
227 |
+
}
|
228 |
+
$review .= '</div>';
|
229 |
+
}
|
230 |
+
$review .= '</span>';
|
231 |
+
}
|
232 |
+
if ( 'item_recipe' == $item_review_type ) {
|
233 |
+
$item_recipe = get_option( 'bsf_recipe' );
|
234 |
+
$review .= '<span itemprop="itemReviewed" itemscope itemtype="https://schema.org/Recipe">';
|
235 |
+
if ( '' != trim( $item_recp_name ) ) {
|
236 |
+
if ( '' != $item_recipe['recipe_name'] ) {
|
237 |
+
$review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $item_recipe['recipe_name'] ) ) . '</div>';
|
238 |
+
}
|
239 |
+
$review .= " <div class='snippet-data'><span itemprop='name'>" . esc_attr( stripslashes( $item_recp_name ) ) . '</span></div>';
|
240 |
+
}
|
241 |
+
if ( '' != trim( $item_recp_photo ) ) {
|
242 |
+
$review .= '<meta itemprop="image" content="' . esc_attr( $item_recp_photo ) . '">';
|
243 |
+
}
|
244 |
+
$review .= '</span></div>';
|
245 |
+
}
|
246 |
+
if ( 'item_software' == $item_review_type ) {
|
247 |
+
$item_soft = get_option( 'bsf_software' );
|
248 |
+
$review .= '<span itemprop="itemReviewed" itemscope itemtype="https://schema.org/SoftwareApplication">';
|
249 |
+
if ( '' != trim( $item_soft_name ) ) {
|
250 |
+
if ( '' != $item_soft['software_name'] ) {
|
251 |
+
$review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $item_soft['software_name'] ) ) . '</div>';
|
252 |
+
}
|
253 |
+
$review .= " <div class='snippet-data'><span itemprop='name'>" . esc_attr( stripslashes( $item_soft_name ) ) . '</span></div>';
|
254 |
+
}
|
255 |
+
if ( '' != trim( $item_os_name ) ) {
|
256 |
+
if ( $item_soft['software_name'] ) {
|
257 |
+
$review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $item_soft['software_name'] ) ) . '</div>';
|
258 |
+
}
|
259 |
+
$review .= " <div class='snippet-data'><span itemprop='operatingSystem'>" . esc_attr( stripslashes( $item_os_name ) ) . '</span></div>';
|
260 |
+
}
|
261 |
+
if ( '' != trim( $item_app_name ) ) {
|
262 |
+
$review .= "<div class='snippet-label'>" . esc_attr( stripslashes( 'Software Category' ) ) . '</div>';
|
263 |
+
$review .= " <div class='snippet-data'><span itemprop='applicationCategory'>" . esc_attr( stripslashes( $item_app_name ) ) . '</span></div>';
|
264 |
+
}
|
265 |
+
$review .= '</span>';
|
266 |
+
}
|
267 |
+
if ( 'item_video' == $item_review_type ) {
|
268 |
+
$item_video = get_option( 'bsf_video' );
|
269 |
+
$review .= '<span itemprop="itemReviewed" itemscope itemtype="https://schema.org/VideoObject">';
|
270 |
+
if ( '' != trim( $item_video_title ) ) {
|
271 |
+
if ( '' != $item_video['video_title'] ) {
|
272 |
+
$review .= "<div class='snippet-label'>" . esc_attr( stripslashes( $item_video['video_title'] ) ) . '</div>';
|
273 |
+
}
|
274 |
+
$review .= " <div class='snippet-data'><span itemprop='name'>" . esc_attr( stripslashes( $item_video_title ) ) . "</span></div><div class='snippet-clear'></div>";
|
275 |
+
}
|
276 |
+
if ( '' != trim( $item_video_desc ) ) {
|
277 |
+
if ( '' != $item_video['video_desc'] ) {
|
278 |
+
$review .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $item_video['video_desc'] ) ) . '</div>';
|
279 |
+
}
|
280 |
+
$review .= '<div class="snippet-data-img"><span itemprop="description">' . esc_attr( htmlspecialchars_decode( $item_video_desc ) ) . '</span></div>';
|
281 |
+
}
|
282 |
+
if ( '' != trim( $item_video_date ) ) {
|
283 |
+
if ( '' != $item_video['video_date'] ) {
|
284 |
+
$review .= '<div class="snippet-label">' . esc_attr( stripslashes( $item_video['video_date'] ) ) . '</div>';
|
285 |
+
}
|
286 |
+
$review .= "<div class='snippet-data'><span itemprop='uploadDate'>" . esc_attr( stripslashes( $item_video_date ) ) . '</span></div>';
|
287 |
+
}
|
288 |
+
if ( '' != trim( $item_video_thumb ) ) {
|
289 |
+
$review .= '<meta itemprop="thumbnailUrl" content="' . esc_attr( $item_video_thumb ) . '">';
|
290 |
+
}
|
291 |
+
$review .= '</span></div>';
|
292 |
+
}
|
293 |
+
}
|
294 |
+
$review .= "</div>
|
295 |
+
</div><div style='clear:both;'></div>";
|
296 |
+
|
297 |
+
return ( is_single() || is_page() ) ? $content . $review : $content;
|
298 |
+
} elseif ( '2' == $type ) {
|
299 |
+
global $post;
|
300 |
+
$args_event = get_option( 'bsf_event' );
|
301 |
+
|
302 |
+
$event = '';
|
303 |
+
|
304 |
+
$event .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
|
305 |
+
|
306 |
+
if ( '' != $args_event['snippet_title'] ) {
|
307 |
+
$event .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_event['snippet_title'] ) ) . '</div>';
|
308 |
+
}
|
309 |
+
$event .= '<div itemscope itemtype="https://schema.org/Event">';
|
310 |
+
$event_title = get_post_meta( $post->ID, '_bsf_event_title', true );
|
311 |
+
$event_org = get_post_meta( $post->ID, '_bsf_event_organization', true );
|
312 |
+
$event_street = get_post_meta( $post->ID, '_bsf_event_street', true );
|
313 |
+
$event_local = get_post_meta( $post->ID, '_bsf_event_local', true );
|
314 |
+
$event_region = get_post_meta( $post->ID, '_bsf_event_region', true );
|
315 |
+
$event_postal_code = get_post_meta( $post->ID, '_bsf_event_postal_code', true );
|
316 |
+
$event_image = get_post_meta( $post->ID, '_bsf_event_image', true );
|
317 |
+
$event_start_date = get_post_meta( $post->ID, '_bsf_event_start_date', true );
|
318 |
+
$event_end_date = get_post_meta( $post->ID, '_bsf_event_end_date', true );
|
319 |
+
$event_description = get_post_meta( $post->ID, '_bsf_event_desc', true );
|
320 |
+
$event_ticket_url = get_post_meta( $post->ID, '_bsf_event_ticket_url', true );
|
321 |
+
$event_price = get_post_meta( $post->ID, '_bsf_event_price', true );
|
322 |
+
$event_cur = get_post_meta( $post->ID, '_bsf_event_cur', true );
|
323 |
+
|
324 |
+
if ( '' != trim( $event_image ) ) {
|
325 |
+
$event .= '<div class="snippet-image"><img width="180" src="' . esc_url( $event_image ) . '" itemprop="image" alt="event" /></div>';
|
326 |
+
} else {
|
327 |
+
$event .= '<script type="text/javascript">
|
328 |
+
jQuery(document).ready(function() {
|
329 |
+
jQuery(".snippet-label-img").addClass("snippet-clear");
|
330 |
+
});
|
331 |
+
</script>';
|
332 |
+
}
|
333 |
+
$event .= '<div class="aio-info">';
|
334 |
+
|
335 |
+
if ( '' != trim( $event_title ) ) {
|
336 |
+
if ( $args_event['event_title'] ) {
|
337 |
+
$event .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_event['event_title'] ) ) . '</div>';
|
338 |
+
}
|
339 |
+
$event .= ' <div class="snippet-data-img"><span itemprop="name">' . esc_attr( $event_title ) . '</span></div>
|
340 |
+
<meta itemprop="url" content="' . esc_attr( $event_ticket_url ) . '">
|
341 |
+
<div class="snippet-clear"></div>';
|
342 |
+
}
|
343 |
+
if ( '' != trim( $event_org ) ) {
|
344 |
+
if ( '' != $args_event['event_location'] ) {
|
345 |
+
$event .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_event['event_location'] ) ) . '</div>';
|
346 |
+
}
|
347 |
+
$event .= ' <div class="snippet-data-img">
|
348 |
+
<span itemprop="location" itemscope itemtype="https://schema.org/Place">
|
349 |
+
<span itemprop="name">' . esc_attr( $event_org ) . '</span>,';
|
350 |
+
}
|
351 |
+
if ( '' != trim( $event_street ) ) {
|
352 |
+
$event .= '<span itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
|
353 |
+
<span itemprop="streetAddress">' . esc_attr( $event_street ) . '</span>,';
|
354 |
+
}
|
355 |
+
if ( '' != trim( $event_local ) ) {
|
356 |
+
$event .= '<span itemprop="addressLocality">' . esc_attr( $event_local ) . '</span>,';
|
357 |
+
}
|
358 |
+
if ( '' != trim( $event_region ) ) {
|
359 |
+
$event .= '<span itemprop="addressRegion">' . esc_attr( $event_region ) . '</span>';
|
360 |
+
}
|
361 |
+
if ( '' != trim( $event_postal_code ) ) {
|
362 |
+
$event .= '-<span itemprop="postalCode">' . esc_attr( $event_postal_code ) . '</span>';
|
363 |
+
}
|
364 |
+
$event .= '</span>';
|
365 |
+
|
366 |
+
$event .= '</span>
|
367 |
+
</div><div class="snippet-clear"></div>';
|
368 |
+
|
369 |
+
if ( '' != trim( $event_start_date ) ) {
|
370 |
+
if ( '' != $args_event['start_time'] ) {
|
371 |
+
$event .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_event['start_time'] ) ) . '</div>';
|
372 |
+
}
|
373 |
+
|
374 |
+
$event .= ' <div class="snippet-data-img"> <span itemprop="startDate" datetime="' . esc_attr( $event_start_date ) . 'T00:00-00:00">' . esc_attr( $event_start_date ) . '</span></div><div class="snippet-clear"></div>';
|
375 |
+
}
|
376 |
+
if ( '' != trim( $event_end_date ) ) {
|
377 |
+
if ( '' != $args_event['end_time'] ) {
|
378 |
+
$event .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_event['end_time'] ) ) . '</div>';
|
379 |
+
}
|
380 |
+
$event .= ' <div class="snippet-data-img"> <span itemprop="endDate" datetime="' . esc_attr( $event_end_date ) . 'T00:00-00:00">' . esc_attr( $event_end_date ) . '</span></div><div class="snippet-clear"></div>';
|
381 |
+
}
|
382 |
+
if ( '' != trim( $event_description ) ) {
|
383 |
+
if ( '' != $args_event['event_desc'] ) {
|
384 |
+
$event .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_event['event_desc'] ) ) . '</div>';
|
385 |
+
}
|
386 |
+
$event .= ' <div class="snippet-data-img"> <span itemprop="description">' . esc_attr( htmlspecialchars_decode( $event_description ) ) . '</span></div><div class="snippet-clear"></div>';
|
387 |
+
}
|
388 |
+
|
389 |
+
if ( '' != trim( $event_price ) ) {
|
390 |
+
if ( '' != $args_event['events_price'] ) {
|
391 |
+
$event .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_event['events_price'] ) ) . '</div>';
|
392 |
+
}
|
393 |
+
$event .= '<div class="snippet-data-img"> <span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
|
394 |
+
<span itemprop="priceCurrency">' . esc_attr( $event_cur ) . '</span><span itemprop="price"> ' . esc_attr( $event_price ) . '</span><br><a itemprop="url" href="' . esc_url( $event_ticket_url ) . '">Buy Tickets</a></div><div class="snippet-clear"></div>';
|
395 |
+
}
|
396 |
+
|
397 |
+
$event .= '</div>
|
398 |
+
</div></div>
|
399 |
+
<meta itemprop="description" content="Event">
|
400 |
+
<div class="snippet-clear"></div>';
|
401 |
+
|
402 |
+
return ( is_single() || is_page() ) ? $content . $event : $content;
|
403 |
+
} elseif ( '4' == $type ) {
|
404 |
+
global $post;
|
405 |
+
$organization = '';
|
406 |
+
$organization .= '<div class="snippet-title">Organization Brief :</div>';
|
407 |
+
$organization .= '<div xmlns:v="https://rdf.data-vocabulary.org/#" typeof="v:Organization">';
|
408 |
+
$org_name = get_post_meta( $post->ID, '_bsf_organization_name', true );
|
409 |
+
$org_url = get_post_meta( $post->ID, '_bsf_organization_url', true );
|
410 |
+
$org_tel = get_post_meta( $post->ID, '_bsf_organization_tel', true );
|
411 |
+
$org_street = get_post_meta( $post->ID, '_bsf_organization_street', true );
|
412 |
+
$org_local = get_post_meta( $post->ID, '_bsf_organization_local', true );
|
413 |
+
$org_region = get_post_meta( $post->ID, '_bsf_organization_region', true );
|
414 |
+
$org_zip = get_post_meta( $post->ID, '_bsf_organization_zip', true );
|
415 |
+
$org_country = get_post_meta( $post->ID, '_bsf_organization_country', true );
|
416 |
+
$org_latitude = get_post_meta( $post->ID, '_bsf_organization_latitude', true );
|
417 |
+
$org_longitude = get_post_meta( $post->ID, '_bsf_organization_longitude', true );
|
418 |
+
if ( '' != trim( $org_name ) ) {
|
419 |
+
$organization .= 'Organization Name : <span property="v:name">' . esc_attr( $org_nam ) . '</span></div>';
|
420 |
+
}
|
421 |
+
if ( '' != trim( $org_url ) ) {
|
422 |
+
$organization .= 'Website : <a href="' . esc_url( $org_url ) . '" rel="v:url">' . esc_attr( $org_url ) . '</a></div>';
|
423 |
+
}
|
424 |
+
if ( '' != trim( $org_tel ) ) {
|
425 |
+
$organization .= 'Telephone No. : <span property="v:tel">' . esc_attr( $org_tel ) . '</span></div>';
|
426 |
+
}
|
427 |
+
if ( '' != trim( $org_street ) ) {
|
428 |
+
$organization .= 'Address :
|
429 |
+
<span rel="v:address">
|
430 |
+
<span typeof="v:Address">
|
431 |
+
<span property="v:street-address">' . esc_attr( $org_street ) . '</span>';
|
432 |
+
}
|
433 |
+
if ( '' != trim( $org_local ) ) {
|
434 |
+
$organization .= '<span property="v:locality">' . esc_attr( $org_local ) . '</span>';
|
435 |
+
}
|
436 |
+
if ( '' != trim( $org_region ) ) {
|
437 |
+
$organization .= '<span property="v:region">' . esc_attr( $org_region ) . '</span>';
|
438 |
+
}
|
439 |
+
if ( '' != trim( $org_zip ) ) {
|
440 |
+
$organization .= '<span property="v:postal-code">' . esc_attr( $org_zip ) . '</span>';
|
441 |
+
}
|
442 |
+
if ( '' != trim( $org_country ) ) {
|
443 |
+
$organization .= '<span property="v:country-name">' . esc_attr( $org_country ) . '</span>
|
444 |
+
</span>
|
445 |
+
</span>';
|
446 |
+
}
|
447 |
+
if ( '' != trim( $org_latitude ) ) {
|
448 |
+
$organization .= 'GEO Location :
|
449 |
+
<span rel="v:geo">
|
450 |
+
<span typeof="v:Geo">
|
451 |
+
<span property="v:latitude" content="' . esc_attr( $org_latitude ) . '">' . esc_attr( $org_latitude ) . '</span> - ';
|
452 |
+
}
|
453 |
+
if ( '' != trim( $org_longitude ) ) {
|
454 |
+
$organization .= '<span property="v:longitude" content="' . esc_attr( $org_longitude ) . '">' . esc_attr( $org_longitude ) . '</span>
|
455 |
+
</span>
|
456 |
+
</span>';
|
457 |
+
}
|
458 |
+
$organization .= '</div><div style="clear:both;"></div>';
|
459 |
+
|
460 |
+
return ( is_single() || is_page() ) ? $content . $organization : $content;
|
461 |
+
} elseif ( '5' == $type ) {
|
462 |
+
global $post;
|
463 |
+
|
464 |
+
$args_person = get_option( 'bsf_person' );
|
465 |
+
|
466 |
+
$people = '';
|
467 |
+
|
468 |
+
$people .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
|
469 |
+
|
470 |
+
if ( '' != $args_person['snippet_title'] ) {
|
471 |
+
$people .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_person['snippet_title'] ) ) . '</div>';
|
472 |
+
}
|
473 |
+
$people .= '<div itemscope itemtype="https://schema.org/Person"">';
|
474 |
+
$people_fn = get_post_meta( $post->ID, '_bsf_people_fn', true );
|
475 |
+
$people_nickname = get_post_meta( $post->ID, '_bsf_people_nickname', true );
|
476 |
+
$people_photo = get_post_meta( $post->ID, '_bsf_people_photo', true );
|
477 |
+
$people_job_title = get_post_meta( $post->ID, '_bsf_people_job_title', true );
|
478 |
+
$people_website = get_post_meta( $post->ID, '_bsf_people_website', true );
|
479 |
+
$people_company = get_post_meta( $post->ID, '_bsf_people_company', true );
|
480 |
+
$people_local = get_post_meta( $post->ID, '_bsf_people_local', true );
|
481 |
+
$people_region = get_post_meta( $post->ID, '_bsf_people_region', true );
|
482 |
+
|
483 |
+
$people_street = get_post_meta( $post->ID, '_bsf_people_street', true );
|
484 |
+
$people_postal = get_post_meta( $post->ID, '_bsf_people_postal', true );
|
485 |
+
|
486 |
+
if ( '' != trim( $people_photo ) ) {
|
487 |
+
$people .= '<div class="snippet-image"><img width="180" src="' . esc_url( $people_photo ) . '" itemprop="image" alt="Photo of' . esc_attr( $people_fn ) . '" /></div>';
|
488 |
+
} else {
|
489 |
+
$people .= '<script type="text/javascript">
|
490 |
+
jQuery(document).ready(function() {
|
491 |
+
jQuery(".snippet-label-img").addClass("snippet-clear");
|
492 |
+
});
|
493 |
+
</script>';
|
494 |
+
}
|
495 |
+
$people .= '<div class="aio-info">';
|
496 |
+
if ( '' != trim( $people_fn ) ) {
|
497 |
+
if ( '' != $args_person['person_name'] ) {
|
498 |
+
$people .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_person['person_name'] ) ) . '</div> ';
|
499 |
+
}
|
500 |
+
|
501 |
+
$people .= '<div class="snippet-data-img"><span itemprop="name">' . esc_attr( $people_fn ) . '</span></div><div class="snippet-clear"></div>';
|
502 |
+
}
|
503 |
+
if ( '' != trim( $people_nickname ) ) {
|
504 |
+
if ( '' != $args_person['person_nickname'] ) {
|
505 |
+
$people .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_person['person_nickname'] ) ) . '</div> ';
|
506 |
+
}
|
507 |
+
$people .= '<div class="snippet-data-img"> (<span itemprop="additionalName">' . esc_attr( $people_nickname ) . '</span>)</div><div class="snippet-clear"></div>';
|
508 |
+
}
|
509 |
+
if ( '' != trim( $people_website ) ) {
|
510 |
+
if ( '' != $args_person['person_website'] ) {
|
511 |
+
$people .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_person['person_website'] ) ) . '</div> ';
|
512 |
+
}
|
513 |
+
$people .= '<div class="snippet-data-img"> <a href="' . esc_url( $people_website ) . '" itemprop="url">' . esc_attr( $people_website ) . '</a></div><div class="snippet-clear"></div>';
|
514 |
+
}
|
515 |
+
if ( '' != trim( $people_job_title ) ) {
|
516 |
+
if ( '' != $args_person['person_job_title'] ) {
|
517 |
+
$people .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_person['person_job_title'] ) ) . '</div> ';
|
518 |
+
}
|
519 |
+
$people .= '<div class="snippet-data-img"> <span itemprop="jobTitle">' . esc_attr( $people_job_title ) . '</span></div><div class="snippet-clear"></div>';
|
520 |
+
}
|
521 |
+
if ( '' != trim( $people_company ) ) {
|
522 |
+
if ( '' != $args_person['person_company'] ) {
|
523 |
+
$people .= '<div itemprop="affiliation" itemscope itemtype="https://schema.org/Organization">';
|
524 |
+
}
|
525 |
+
$people .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_person['person_company'] ) ) . '</div> ';
|
526 |
+
$people .= '<div class="snippet-data-img"> <span itemprop="name">' . esc_attr( $people_company ) . '</span></div><div class="snippet-clear"></div>';
|
527 |
+
$people .= '</div>';
|
528 |
+
}
|
529 |
+
|
530 |
+
if ( '' != trim( $people_street ) ) {
|
531 |
+
if ( '' != $args_person['person_address'] ) {
|
532 |
+
$people .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_person['person_address'] ) ) . '</div> ';
|
533 |
+
}
|
534 |
+
$people .= '<div class="snippet-data-img">';
|
535 |
+
$people .= '<span itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">';
|
536 |
+
$people .= '<span itemprop="streetAddress">' . esc_attr( $people_street ) . '</span>,<br>';
|
537 |
+
if ( '' != trim( $people_local ) ) {
|
538 |
+
$people .= '<span itemprop="addressLocality">' . esc_attr( $people_local ) . '</span>, ';
|
539 |
+
}
|
540 |
+
if ( '' != trim( $people_region ) ) {
|
541 |
+
$people .= '<span itemprop="addressRegion">' . esc_attr( $people_region ) . '</span>, ';
|
542 |
+
}
|
543 |
+
if ( '' != trim( $people_postal ) ) {
|
544 |
+
$people .= '<span itemprop="postalCode">' . esc_attr( $people_postal ) . '</span>';
|
545 |
+
}
|
546 |
+
$people .= '</span>';
|
547 |
+
$people .= '</div>';
|
548 |
+
$people .= '<div class="snippet-clear"></div>';
|
549 |
+
}
|
550 |
+
$people .= '</div>
|
551 |
+
</div></div><div class="snippet-clear"></div>';
|
552 |
+
return ( is_single() || is_page() ) ? $content . $people : $content;
|
553 |
+
} elseif ( '6' == $type ) {
|
554 |
+
global $post;
|
555 |
+
$args_product = get_option( 'bsf_product' );
|
556 |
+
$product = '';
|
557 |
+
$product .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
|
558 |
+
if ( '' != $args_product['snippet_title'] ) {
|
559 |
+
$product .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_product['snippet_title'] ) );
|
560 |
+
}
|
561 |
+
$product .= bsf_do_rating();
|
562 |
+
|
563 |
+
$product .= '</div>';
|
564 |
+
$product .= '<div itemscope itemtype="https://schema.org/Product">';
|
565 |
+
$product_rating = get_post_meta( $post->ID, '_bsf_product_rating', true );
|
566 |
+
$product_brand = get_post_meta( $post->ID, '_bsf_product_brand', true );
|
567 |
+
$product_name = get_post_meta( $post->ID, '_bsf_product_name', true );
|
568 |
+
$product_image = get_post_meta( $post->ID, '_bsf_product_image', true );
|
569 |
+
$product_cat = get_post_meta( $post->ID, '_bsf_product_cat', true );
|
570 |
+
$product_price = get_post_meta( $post->ID, '_bsf_product_price', true );
|
571 |
+
$product_cur = get_post_meta( $post->ID, '_bsf_product_cur', true );
|
572 |
+
$product_status = get_post_meta( $post->ID, '_bsf_product_status', true );
|
573 |
+
if ( 'out_of_stock' == trim( $product_status ) ) {
|
574 |
+
$product_status = 'OutOfStock';
|
575 |
+
$availability = 'Out of Stock';
|
576 |
+
} elseif ( 'in_stock' == trim( $product_status ) ) {
|
577 |
+
$product_status = 'InStock';
|
578 |
+
$availability = 'Available in Stock';
|
579 |
+
} elseif ( 'instore_only' == trim( $product_status ) ) {
|
580 |
+
$product_status = 'InStoreOnly';
|
581 |
+
$availability = 'Available in Store Only';
|
582 |
+
} elseif ( 'preorder' == trim( $product_status ) ) {
|
583 |
+
$availability = 'Pre-Order Only';
|
584 |
+
}
|
585 |
+
if ( '' != trim( $product_image ) ) {
|
586 |
+
$product .= '<div class="snippet-image"><img width="180" src="' . esc_url( $product_image ) . '" itemprop="image" alt="product image" /></div>';
|
587 |
+
} else {
|
588 |
+
$product .= '<script type="text/javascript">
|
589 |
+
jQuery(document).ready(function() {
|
590 |
+
jQuery(".snippet-label-img").addClass("snippet-clear");
|
591 |
+
});
|
592 |
+
</script>';
|
593 |
+
}
|
594 |
+
$product .= '<div class="aio-info">';
|
595 |
+
if ( '' != trim( $product_rating ) ) {
|
596 |
+
if ( '' != $args_product['product_brand'] ) {
|
597 |
+
$product .= '<div class="snippet-label-img">' . $args_product['product_rating'] . '</div>';
|
598 |
+
}
|
599 |
+
$product .= '<div class="snippet-data-img"><span class="star-img">';
|
600 |
+
$ceil_product_rating = ceil( $product_rating );
|
601 |
+
for ( $i = 1; $i <= $ceil_product_rating; $i++ ) {
|
602 |
+
$product .= '<img src="' . plugin_dir_url( __FILE__ ) . 'images/1star.png" alt="1star">';
|
603 |
+
}
|
604 |
+
for ( $j = 0; $j <= 5 - $ceil_product_rating; $j++ ) {
|
605 |
+
if ( $j ) {
|
606 |
+
$product .= '<img src="' . plugin_dir_url( __FILE__ ) . 'images/gray.png" alt="gray">';
|
607 |
+
}
|
608 |
+
}
|
609 |
+
$product .= '</span></div><div class="snippet-clear"></div>';
|
610 |
+
}
|
611 |
+
|
612 |
+
$product .= '<div class="aggregate_sec" itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating">';
|
613 |
+
if ( '' != $args_product['product_agr'] ) {
|
614 |
+
$product .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_product['product_agr'] ) ) . '</div>';
|
615 |
+
}
|
616 |
+
$product .= '<div class="snippet-data-img">';
|
617 |
+
$product .= '<span itemprop="ratingValue">' . average_rating() . '</span>';
|
618 |
+
$product .= ' based on <span class="rating-count" itemprop="reviewCount">' . rating_count() . '</span> votes </span></div></div><div class="snippet-clear"></div>';
|
619 |
+
|
620 |
+
if ( '' != trim( $product_brand ) ) {
|
621 |
+
if ( '' != $args_product['product_brand'] ) {
|
622 |
+
$product .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_product['product_brand'] ) ) . '</div>';
|
623 |
+
}
|
624 |
+
$product .= ' <div class="snippet-data-img"> <span itemprop="brand">' . esc_attr( $product_brand ) . '</span></div><div class="snippet-clear"></div>';
|
625 |
+
}
|
626 |
+
if ( '' != trim( $product_name ) ) {
|
627 |
+
if ( '' != $args_product['product_name'] ) {
|
628 |
+
$product .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_product['product_name'] ) ) . '</div>';
|
629 |
+
}
|
630 |
+
$product .= ' <div class="snippet-data-img"> <span itemprop="name">' . esc_attr( $product_name ) . '</span></div><div class="snippet-clear"></div>';
|
631 |
+
}
|
632 |
+
|
633 |
+
if ( '' != trim( $product_price ) ) {
|
634 |
+
if ( '' != $args_product['product_price'] ) {
|
635 |
+
$product .= '<div class="offer_sec" itemprop="offers" itemscope itemtype="https://schema.org/Offer"><div class="snippet-label-img">' . esc_attr( stripslashes( $args_product['product_price'] ) ) . '</div>';
|
636 |
+
}
|
637 |
+
$product .= '<div class="snippet-data-img">
|
638 |
+
<span itemprop="priceCurrency">' . esc_attr( $product_cur ) . '</span><span itemprop="price"> ' . esc_attr( $product_price ) . '</span></div>';
|
639 |
+
|
640 |
+
if ( '' != trim( $product_status ) ) {
|
641 |
+
if ( '' != $args_product['product_avail'] ) {
|
642 |
+
$product .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_product['product_avail'] ) ) . '</div>';
|
643 |
+
}
|
644 |
+
$product .= ' <div class="snippet-data-img"> <span itemprop="availability" content="' . esc_attr( $product_status ) . '">' . esc_attr( $availability ) . '</span></span></div><div class="snippet-clear"></div>';
|
645 |
+
}
|
646 |
+
$product .= '</div><div class="snippet-clear"></div>';
|
647 |
+
}
|
648 |
+
$product .= '</div>
|
649 |
+
</div></div><div class="snippet-clear"></div>';
|
650 |
+
|
651 |
+
return ( is_single() || is_page() ) ? $content . $product : $content;
|
652 |
+
} elseif ( '7' == $type ) {
|
653 |
+
global $post;
|
654 |
+
$recipe = '';
|
655 |
+
|
656 |
+
$recipe .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
|
657 |
+
|
658 |
+
$args_recipe = get_option( 'bsf_recipe' );
|
659 |
+
|
660 |
+
if ( '' != $args_recipe['snippet_title'] ) {
|
661 |
+
$recipe .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_recipe['snippet_title'] ) );
|
662 |
+
$recipe .= bsf_do_rating();
|
663 |
+
}
|
664 |
+
$recipe .= '</div>';
|
665 |
+
$recipe .= '<div itemscope itemtype="https://schema.org/Recipe">';
|
666 |
+
$recipes_name = get_post_meta( $post->ID, '_bsf_recipes_name', true );
|
667 |
+
$authors_name = get_post_meta( $post->ID, '_bsf_authors_name', true );
|
668 |
+
$recipes_preptime = get_post_meta( $post->ID, '_bsf_recipes_preptime', true );
|
669 |
+
$recipes_cooktime = get_post_meta( $post->ID, '_bsf_recipes_cooktime', true );
|
670 |
+
$recipes_totaltime = get_post_meta( $post->ID, '_bsf_recipes_totaltime', true );
|
671 |
+
$recipes_photo = get_post_meta( $post->ID, '_bsf_recipes_photo', true );
|
672 |
+
$recipes_desc = get_post_meta( $post->ID, '_bsf_recipes_desc', true );
|
673 |
+
$recipes_nutrition = get_post_meta( $post->ID, '_bsf_recipes_nutrition', true );
|
674 |
+
$recipes_ingredient = get_post_meta( $post->ID, '_bsf_recipes_ingredient', true );
|
675 |
+
$count = rating_count();
|
676 |
+
$agregate = average_rating();
|
677 |
+
if ( '' != trim( $recipes_photo ) ) {
|
678 |
+
$recipe .= '<div class="snippet-image"><img width="180" itemprop="image" src="' . esc_url( $recipes_photo ) . '" alt="recipe image"/><meta itemprop="image" content="' . esc_url( $recipes_photo ) . '"></div>';
|
679 |
+
} else {
|
680 |
+
$recipe .= '<script type="text/javascript">
|
681 |
+
jQuery(document).ready(function() {
|
682 |
+
jQuery(".snippet-label-img").addClass("snippet-clear");
|
683 |
+
});
|
684 |
+
</script>';
|
685 |
+
}
|
686 |
+
$recipe .= '<div class="aio-info">';
|
687 |
+
if ( '' != trim( $recipes_name ) ) {
|
688 |
+
if ( '' != $args_recipe['recipe_name'] ) {
|
689 |
+
$recipe .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_recipe['recipe_name'] ) ) . '</div>';
|
690 |
+
}
|
691 |
+
|
692 |
+
$recipe .= '<div class="snippet-data-img"><span itemprop="name">' . esc_attr( $recipes_name ) . '</span></div>
|
693 |
+
<meta itemprop="description" content="' . esc_attr( htmlspecialchars_decode( $recipes_desc ) ) . '" >
|
694 |
+
<meta itemprop="recipeIngredient" content="' . esc_attr( $recipes_ingredient ) . '" >
|
695 |
+
<div itemprop="nutrition"
|
696 |
+
itemscope itemtype="https://schema.org/NutritionInformation">
|
697 |
+
<meta itemprop="calories" content="' . esc_attr( $recipes_nutrition ) . '" ></div>
|
698 |
+
<div class="snippet-clear"></div>';
|
699 |
+
}
|
700 |
+
if ( '' != trim( $authors_name ) ) {
|
701 |
+
if ( '' != $args_recipe['author_name'] ) {
|
702 |
+
$recipe .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_recipe['author_name'] ) ) . '</div>';
|
703 |
+
}
|
704 |
+
|
705 |
+
$recipe .= '<div class="snippet-data-img"><span itemprop="author">' . esc_attr( $authors_name ) . '</span></div><div class="snippet-clear"></div>';
|
706 |
+
}
|
707 |
+
$recipe .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_recipe['recipe_pub'] ) ) . ' </div><div class="snippet-data-img"><time datetime="' . get_the_time( 'c' ) . '" itemprop="datePublished">' . get_the_date( 'Y-m-d' ) . '</time></div><div class="snippet-clear"></div>';
|
708 |
+
if ( '' != trim( $recipes_preptime ) ) {
|
709 |
+
if ( '' != $args_recipe['recipe_prep'] ) {
|
710 |
+
$recipe .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_recipe['recipe_prep'] ) ) . '</div>';
|
711 |
+
}
|
712 |
+
$recipe .= '<div class="snippet-data-img"> <time datetime="PT' . esc_attr( $recipes_preptime ) . '" itemprop="prepTime">' . esc_attr( $recipes_preptime ) . '</time></div><div class="snippet-clear"></div>';
|
713 |
+
}
|
714 |
+
if ( '' != trim( $recipes_cooktime ) ) {
|
715 |
+
if ( '' != $args_recipe['recipe_cook'] ) {
|
716 |
+
$recipe .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_recipe['recipe_cook'] ) ) . '</div>';
|
717 |
+
}
|
718 |
+
$recipe .= '<div class="snippet-data-img"> <time datetime="PT' . esc_attr( $recipes_cooktime ) . '" itemprop="cookTime">' . esc_attr( $recipes_cooktime ) . '</time></div><div class="snippet-clear"></div> ';
|
719 |
+
}
|
720 |
+
if ( '' != trim( $recipes_totaltime ) ) {
|
721 |
+
if ( '' != $args_recipe['recipe_time'] ) {
|
722 |
+
$recipe .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_recipe['recipe_time'] ) ) . '</div>';
|
723 |
+
}
|
724 |
+
$recipe .= '<div class="snippet-data-img"> <time datetime="PT' . esc_attr( $recipes_totaltime ) . '" itemprop="totalTime">' . esc_attr( $recipes_totaltime ) . '</time></div><div class="snippet-clear"></div>';
|
725 |
+
}
|
726 |
+
if ( '' != $args_recipe['recipe_rating'] && $count > 0 ) {
|
727 |
+
$recipe .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_recipe['recipe_rating'] ) ) . '</div>';
|
728 |
+
$recipe .= ' <div class="snippet-data-img"> <span itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating"><span itemprop="ratingValue" class="rating-value">' . esc_attr( $agregate ) . '</span><span class="star-img">';
|
729 |
+
$ceil_agregate = ceil( $agregate );
|
730 |
+
for ( $i = 1; $i <= $ceil_agregate; $i++ ) {
|
731 |
+
$recipe .= '<img src="' . plugin_dir_url( __FILE__ ) . 'images/1star.png" alt="1star">';
|
732 |
+
}
|
733 |
+
for ( $j = 0; $j <= 5 - $ceil_agregate; $j++ ) {
|
734 |
+
if ( $j ) {
|
735 |
+
$recipe .= '<img src="' . plugin_dir_url( __FILE__ ) . 'images/gray.png" alt="gray">';
|
736 |
+
}
|
737 |
+
}
|
738 |
+
$recipe .= '</span> Based on <span itemprop="reviewCount"><strong>' . esc_attr( $count ) . '</strong> </span> Review(s)</span></div><div class="snippet-clear"></div>';
|
739 |
+
}
|
740 |
+
$recipe .= '</div>
|
741 |
+
</div></div><div class="snippet-clear"></div>';
|
742 |
+
|
743 |
+
return ( is_single() || is_page() ) ? $content . $recipe : $content;
|
744 |
+
} elseif ( '8' == $type ) {
|
745 |
+
global $post;
|
746 |
+
$args_soft = get_option( 'bsf_software' );
|
747 |
+
$software = '';
|
748 |
+
|
749 |
+
$software .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
|
750 |
+
if ( '' != $args_soft['snippet_title'] ) {
|
751 |
+
$software .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_soft['snippet_title'] ) );
|
752 |
+
}
|
753 |
+
|
754 |
+
$software .= bsf_do_rating();
|
755 |
+
$software .= '</div>';
|
756 |
+
|
757 |
+
$software .= '<div itemscope itemtype="https://schema.org/SoftwareApplication">';
|
758 |
+
$software_rating = get_post_meta( $post->ID, '_bsf_software_rating', true );
|
759 |
+
$software_name = get_post_meta( $post->ID, '_bsf_software_name', true );
|
760 |
+
$software_desc = get_post_meta( $post->ID, '_bsf_software_desc', true );
|
761 |
+
$software_landing = get_post_meta( $post->ID, '_bsf_software_landing', true );
|
762 |
+
$software_image = get_post_meta( $post->ID, '_bsf_software_image', true );
|
763 |
+
$software_price = get_post_meta( $post->ID, '_bsf_software_price', true );
|
764 |
+
$software_cur = get_post_meta( $post->ID, '_bsf_software_cur', true );
|
765 |
+
$software_os = get_post_meta( $post->ID, '_bsf_software_os', true );
|
766 |
+
$software_cat = get_post_meta( $post->ID, '_bsf_software_cat', true );
|
767 |
+
|
768 |
+
if ( '' != trim( $software_image ) ) {
|
769 |
+
$software .= '<div class="snippet-image"><img width="180" src="' . esc_url( $software_image ) . '" itemprop="screenshot" alt="software image" /></div>';
|
770 |
+
} else {
|
771 |
+
$software .= '<script type="text/javascript">
|
772 |
+
jQuery(document).ready(function() {
|
773 |
+
jQuery(".snippet-label-img").addClass("snippet-clear");
|
774 |
+
});
|
775 |
+
</script>';
|
776 |
+
}
|
777 |
+
$software .= '<div class="aio-info">';
|
778 |
+
|
779 |
+
if ( '' != trim( $software_rating ) ) {
|
780 |
+
$software .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_soft['software_rating'] ) ) . '</div>';
|
781 |
+
$software .= '<div class="snippet-data-img"><span class="star-img">';
|
782 |
+
$ceil_software_rating = ceil( $software_rating );
|
783 |
+
for ( $i = 1; $i <= $ceil_software_rating; $i++ ) {
|
784 |
+
$software .= '<img src="' . plugin_dir_url( __FILE__ ) . 'images/1star.png" alt="1star">';
|
785 |
+
}
|
786 |
+
for ( $j = 0; $j <= 5 - $ceil_software_rating; $j++ ) {
|
787 |
+
if ( $j ) {
|
788 |
+
$software .= '<img src="' . plugin_dir_url( __FILE__ ) . 'images/gray.png" alt="gray">';
|
789 |
+
}
|
790 |
+
}
|
791 |
+
$software .= '</span></div><div class="snippet-clear"></div>';
|
792 |
+
}
|
793 |
+
|
794 |
+
$software .= '<div class="aggregate_sec" itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating">';
|
795 |
+
$software .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_soft['software_agr'] ) ) . '</div>';
|
796 |
+
$software .= '<div class="snippet-data-img">';
|
797 |
+
$software .= '<span itemprop="ratingValue">' . average_rating() . '</span>';
|
798 |
+
$software .= ' based on <span class="rating-count" itemprop="reviewCount">' . rating_count() . '</span> votes </span></div></div><div class="snippet-clear"></div>';
|
799 |
+
|
800 |
+
if ( '' != trim( $software_name ) ) {
|
801 |
+
if ( '' != $args_soft['software_name'] ) {
|
802 |
+
$software .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_soft['software_name'] ) ) . '</div>';
|
803 |
+
}
|
804 |
+
$software .= ' <div class="snippet-data-img"> <span itemprop="name">' . esc_attr( $software_name ) . '</span></div><div class="snippet-clear"></div>';
|
805 |
+
}
|
806 |
+
if ( '' != trim( $software_os ) ) {
|
807 |
+
if ( '' != $args_soft['software_os'] ) {
|
808 |
+
$software .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_soft['software_os'] ) ) . '</div>';
|
809 |
+
}
|
810 |
+
$software .= ' <div class="snippet-data-img"> <span itemprop="operatingSystem">' . esc_attr( $software_os ) . '</span></div><div class="snippet-clear"></div>';
|
811 |
+
}
|
812 |
+
if ( '' != trim( $software_cat ) ) {
|
813 |
+
$software .= '<div class="snippet-label-img">Software Category</div>';
|
814 |
+
$software .= ' <div class="snippet-data-img"> <span itemprop="applicationCategory">' . esc_attr( $software_cat ) . '</span></div><div class="snippet-clear"></div>';
|
815 |
+
}
|
816 |
+
if ( '' != trim( $software_price ) ) {
|
817 |
+
if ( '' != $args_soft['software_price'] ) {
|
818 |
+
$software .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_soft['software_price'] ) ) . '</div>';
|
819 |
+
}
|
820 |
+
$software .= '<div class="snippet-data-img"> <span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
|
821 |
+
<span itemprop="priceCurrency">' . esc_attr( $software_cur ) . '</span> <span itemprop="price"> ' . esc_attr( $software_price ) . '</span></div><div class="snippet-clear"></div>';
|
822 |
+
|
823 |
+
}
|
824 |
+
if ( '' != trim( $software_desc ) ) {
|
825 |
+
if ( '' != $args_soft['software_desc'] ) {
|
826 |
+
$software .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_soft['software_desc'] ) ) . '</div>';
|
827 |
+
}
|
828 |
+
$software .= ' <div class="snippet-data-img"> <span itemprop="description">' . esc_attr( htmlspecialchars_decode( $software_desc ) ) . '</span></div><div class="snippet-clear"></div>';
|
829 |
+
}
|
830 |
+
if ( '' != trim( $software_landing ) ) {
|
831 |
+
if ( '' != $args_soft['software_website'] ) {
|
832 |
+
$software .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_soft['software_website'] ) ) . '</div>';
|
833 |
+
}
|
834 |
+
$software .= '<div class="snippet-data-img"> <a itemprop="featureList" href="' . esc_url( $software_landing ) . '">' . esc_attr( $software_landing ) . '</a></div><div class="snippet-clear"></div>';
|
835 |
+
}
|
836 |
+
$software .= '</div>
|
837 |
+
</div></div><div class="snippet-clear"></div>';
|
838 |
+
|
839 |
+
return ( is_single() || is_page() ) ? $content . $software : $content;
|
840 |
+
} elseif ( '9' == $type ) {
|
841 |
+
global $post;
|
842 |
+
$args_video = get_option( 'bsf_video' );
|
843 |
+
$video = '';
|
844 |
+
|
845 |
+
$video .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
|
846 |
+
|
847 |
+
if ( '' != $args_video['snippet_title'] ) {
|
848 |
+
$video .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_video['snippet_title'] ) ) . '</div>';
|
849 |
+
}
|
850 |
+
$video .= '<div itemprop="video" itemscope itemtype="https://schema.org/VideoObject">';
|
851 |
+
$video_title = get_post_meta( $post->ID, '_bsf_video_title', true );
|
852 |
+
$video_desc = get_post_meta( $post->ID, '_bsf_video_desc', true );
|
853 |
+
$video_thumb = get_post_meta( $post->ID, '_bsf_video_thumb', true );
|
854 |
+
$video_url = get_post_meta( $post->ID, '_bsf_video_url', true );
|
855 |
+
$video_emb_url = get_post_meta( $post->ID, '_bsf_video_emb_url', true );
|
856 |
+
|
857 |
+
$video_duration = get_post_meta( $post->ID, '_bsf_video_duration', true );
|
858 |
+
$video_date = get_post_meta( $post->ID, '_bsf_video_date', true );
|
859 |
+
if ( '' != trim( $video_url ) ) {
|
860 |
+
$video .= '<div class="snippet-image"><a href="' . esc_url( $video_url ) . '"><img width="180" src="' . esc_url( $video_thumb ) . '" alt="' . esc_attr( $video_title ) . '"></a></div>';
|
861 |
+
} elseif ( '' != trim( $video_emb_url ) ) {
|
862 |
+
$video .= '<div class="snippet-image"><a href="' . esc_url( $video_emb_url ) . '"><img width="180" src="' . esc_url( $video_thumb ) . '" " alt="' . esc_attr( $video_title ) . '"></a></div>';
|
863 |
+
} else {
|
864 |
+
$video .= '<script type="text/javascript">
|
865 |
+
jQuery(document).ready(function() {
|
866 |
+
jQuery(".snippet-label-img").addClass("snippet-clear");
|
867 |
+
});
|
868 |
+
</script>';
|
869 |
+
}
|
870 |
+
$video .= '<div class="aio-info" style="padding-top:10px">';
|
871 |
+
if ( '' != trim( $video_title ) ) {
|
872 |
+
if ( '' != $args_video['video_title'] ) {
|
873 |
+
$video .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_video['video_title'] ) ) . '</div>';
|
874 |
+
}
|
875 |
+
|
876 |
+
$video .= '<div class="snippet-data-img"><span itemprop="name">' . esc_attr( $video_title ) . '</span></div><div class="snippet-clear"></div>';
|
877 |
+
}
|
878 |
+
if ( '' != trim( $video_desc ) ) {
|
879 |
+
if ( '' != $args_video['video_desc'] ) {
|
880 |
+
$video .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_video['video_desc'] ) ) . '</div>';
|
881 |
+
}
|
882 |
+
$video .= '<div class="snippet-data-img"> <p itemprop="description">' . esc_attr( htmlspecialchars_decode( $video_desc ) ) . '</p></div><div class="snippet-clear"></div>';
|
883 |
+
}
|
884 |
+
if ( '' != trim( $video_thumb ) ) {
|
885 |
+
$video .= '<meta itemprop="thumbnailUrl" content="' . esc_attr( $video_thumb ) . '">';
|
886 |
+
}
|
887 |
+
if ( '' != trim( $video_url ) ) {
|
888 |
+
$video .= '<meta itemprop="contentUrl" content="' . esc_attr( $video_url ) . '">';
|
889 |
+
} elseif ( '' != trim( $video_emb_url ) ) {
|
890 |
+
$video .= '<meta itemprop="embedURL" content="' . esc_attr( $video_emb_url ) . '">';
|
891 |
+
}
|
892 |
+
if ( '' != trim( $video_duration ) ) {
|
893 |
+
$video .= '<meta itemprop="duration" content="' . esc_attr( $video_duration ) . '">';
|
894 |
+
}
|
895 |
+
if ( '' != trim( $video_date ) ) {
|
896 |
+
$video .= '<meta itemprop="uploadDate" content="' . esc_attr( $video_date ) . '">';
|
897 |
+
}
|
898 |
+
$video .= '</div>
|
899 |
+
</div></div><div class="snippet-clear"></div>';
|
900 |
+
|
901 |
+
return ( is_single() || is_page() ) ? $content . $video : $content;
|
902 |
+
} elseif ( '10' == $type ) {
|
903 |
+
global $post;
|
904 |
+
$article = '';
|
905 |
+
$args_article = get_option( 'bsf_article' );
|
906 |
+
$article_title = get_post_meta( $post->ID, '_bsf_article_title', true );
|
907 |
+
$article_name = get_post_meta( $post->ID, '_bsf_article_name', true );
|
908 |
+
$article_desc = get_post_meta( $post->ID, '_bsf_article_desc', true );
|
909 |
+
$article_image = get_post_meta( $post->ID, '_bsf_article_image', true );
|
910 |
+
$article_author = get_post_meta( $post->ID, '_bsf_article_author', true );
|
911 |
+
$article_publisher = get_post_meta( $post->ID, '_bsf_article_publisher', true );
|
912 |
+
$article_publisher_logo = get_post_meta( $post->ID, '_bsf_article_publisher_logo', true );
|
913 |
+
|
914 |
+
$article .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
|
915 |
+
if ( '' != $args_article['snippet_title'] ) {
|
916 |
+
$article .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_article['snippet_title'] ) );
|
917 |
+
$article .= '</div>';
|
918 |
+
}
|
919 |
+
$article .= '<div itemscope itemtype="https://schema.org/Article">';
|
920 |
+
if ( '' != trim( $article_image ) ) {
|
921 |
+
$article .= '<div class="snippet-image" itemprop="image" itemscope itemtype="https://schema.org/ImageObject">';
|
922 |
+
$article .= '<img width="180" src="' . esc_url( $article_image ) . '" alt="' . esc_attr( $article_name ) . '"/>';
|
923 |
+
$article .= '<meta itemprop="url" content="' . esc_attr( $article_image ) . '">';
|
924 |
+
$article .= '</div>';
|
925 |
+
} else {
|
926 |
+
$article .= '<script type="text/javascript">
|
927 |
+
jQuery(document).ready(function() {
|
928 |
+
jQuery(".snippet-label-img").addClass("snippet-clear");
|
929 |
+
});
|
930 |
+
</script>';
|
931 |
+
}
|
932 |
+
$article .= '<div class="aio-info">';
|
933 |
+
if ( '' != trim( $article_name ) ) {
|
934 |
+
if ( '' != $args_article['article_name'] ) {
|
935 |
+
$article .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_article['article_name'] ) ) . '</div>';
|
936 |
+
}
|
937 |
+
|
938 |
+
$article .= '<div class="snippet-data-img"><span itemprop="headline">' . esc_attr( $article_name ) . '</span></div><div class="snippet-clear"></div>';
|
939 |
+
}
|
940 |
+
if ( '' != trim( $article_desc ) ) {
|
941 |
+
if ( '' != $args_article['article_desc'] ) {
|
942 |
+
$article .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_article['article_desc'] ) ) . '</div>';
|
943 |
+
}
|
944 |
+
|
945 |
+
$article .= '<div class="snippet-data-img"><span itemprop="description">' . esc_attr( htmlspecialchars_decode( $article_desc ) ) . '</span></div><div class="snippet-clear"></div>';
|
946 |
+
}
|
947 |
+
if ( '' != trim( $article_author ) ) {
|
948 |
+
if ( '' != $args_article['article_author'] ) {
|
949 |
+
$article .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_article['article_author'] ) ) . '</div>';
|
950 |
+
}
|
951 |
+
|
952 |
+
$article .= '<div class="snippet-data-img" itemprop="author" itemscope itemtype="https://schema.org/Person">
|
953 |
+
<span itemprop="name">' . esc_attr( $article_author ) . '</span>
|
954 |
+
</div>
|
955 |
+
<div class="snippet-clear"></div>';
|
956 |
+
|
957 |
+
}
|
958 |
+
if ( '' != trim( $article_publisher ) ) {
|
959 |
+
if ( '' != $args_article['article_publisher'] ) {
|
960 |
+
|
961 |
+
$article .= '<div itemprop="publisher" itemscope itemtype="https://schema.org/Organization">';
|
962 |
+
}
|
963 |
+
|
964 |
+
$article .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_article['article_publisher'] ) ) . '</div>';
|
965 |
+
|
966 |
+
$article .= '<div class="snippet-data-img">
|
967 |
+
<span itemprop="name">' . esc_attr( $article_publisher ) . '</span>
|
968 |
+
</div>
|
969 |
+
|
970 |
+
|
971 |
+
<div class="snippet-clear"></div>';
|
972 |
+
if ( '' != trim( $article_publisher_logo ) ) {
|
973 |
+
if ( '' != $args_article['article_publisher_logo'] ) {
|
974 |
+
$article .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_article['article_publisher_logo'] ) ) . '</div>';
|
975 |
+
}
|
976 |
+
|
977 |
+
$article .= '<div class="snippet-data-img publisher-logo" itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">';
|
978 |
+
$article .= '<img width="180" src="' . esc_url( $article_publisher_logo ) . '" alt="' . esc_attr( $article_publisher ) . '" />';
|
979 |
+
$article .= '<meta itemprop="url" content="' . esc_attr( $article_publisher_logo ) . '">';
|
980 |
+
$article .= '</div>';
|
981 |
+
}
|
982 |
+
|
983 |
+
$article .= '</div>';
|
984 |
+
}
|
985 |
+
|
986 |
+
$article .= '<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="' . get_permalink() . '"/>';
|
987 |
+
$article .= '<meta itemprop="datePublished" content="' . get_the_time( 'c' ) . '"/>';
|
988 |
+
$article .= '<meta itemprop="dateModified" content="' . get_the_modified_time( 'c' ) . '"/>';
|
989 |
+
|
990 |
+
$article .= '</div>
|
991 |
+
</div></div><div class="snippet-clear"></div>';
|
992 |
+
|
993 |
+
return ( is_single() || is_page() ) ? $content . $article : $content;
|
994 |
+
} elseif ( '11' == $type ) {
|
995 |
+
global $post;
|
996 |
+
$service = '';
|
997 |
+
$args_service = get_option( 'bsf_service' );
|
998 |
+
$service_type = get_post_meta( $post->ID, '_bsf_service_type', true );
|
999 |
+
$service_area = get_post_meta( $post->ID, '_bsf_service_area', true );
|
1000 |
+
$service_desc = get_post_meta( $post->ID, '_bsf_service_desc', true );
|
1001 |
+
$service_image = get_post_meta( $post->ID, '_bsf_service_image', true );
|
1002 |
+
$service_provider_name = get_post_meta( $post->ID, '_bsf_service_provider', true );
|
1003 |
+
$service_street = get_post_meta( $post->ID, '_bsf_service_street', true );
|
1004 |
+
$service_local = get_post_meta( $post->ID, '_bsf_service_local', true );
|
1005 |
+
$service_region = get_post_meta( $post->ID, '_bsf_service_region', true );
|
1006 |
+
$service_postal_code = get_post_meta( $post->ID, '_bsf_service_postal_code', true );
|
1007 |
+
$service_provider_location_image = get_post_meta( $post->ID, '_bsf_provider_location_image', true );
|
1008 |
+
$service_telephone = get_post_meta( $post->ID, '_bsf_service_telephone', true );
|
1009 |
+
$service_price = get_post_meta( $post->ID, '_bsf_service_price', true );
|
1010 |
+
$service_cur = get_post_meta( $post->ID, '_bsf_service_cur', true );
|
1011 |
+
$service_channel = get_permalink( $post->ID );
|
1012 |
+
$service_url_link = '' != $args_service['service_url_link'] ? $args_service['service_url_link'] : 'Click Here For More Info';
|
1013 |
+
|
1014 |
+
$service .= '<div id="snippet-box" class="snippet-type-' . esc_attr( $type ) . '" style="background:' . esc_attr( $args_color['snippet_box_bg'] ) . '; color:' . esc_attr( $args_color['snippet_box_color'] ) . '; border:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">';
|
1015 |
+
if ( '' != $args_service['snippet_title'] ) {
|
1016 |
+
$service .= '<div class="snippet-title" style="background:' . esc_attr( $args_color['snippet_title_bg'] ) . '; color:' . esc_attr( $args_color['snippet_title_color'] ) . '; border-bottom:1px solid ' . esc_attr( $args_color['snippet_border'] ) . ';">' . esc_attr( stripslashes( $args_service['snippet_title'] ) );
|
1017 |
+
$service .= '</div>';
|
1018 |
+
}
|
1019 |
+
$service .= '<div itemscope itemtype="https://schema.org/Service">';
|
1020 |
+
if ( '' != trim( $service_image ) ) {
|
1021 |
+
$service .= '<div class="snippet-image">';
|
1022 |
+
$service .= '<img itemprop="image" width="180" src="' . esc_url( $service_image ) . '" alt="' . esc_attr( $service_type ) . '"/>';
|
1023 |
+
$service .= '</div>';
|
1024 |
+
} else {
|
1025 |
+
$service .= '<script type="text/javascript">
|
1026 |
+
jQuery(document).ready(function() {
|
1027 |
+
jQuery(".snippet-label-img").addClass("snippet-clear");
|
1028 |
+
});
|
1029 |
+
</script>';
|
1030 |
+
}
|
1031 |
+
$service .= '<div class="aio-info">';
|
1032 |
+
|
1033 |
+
if ( '' != trim( $service_type ) ) {
|
1034 |
+
if ( '' != $args_service['service_type'] ) {
|
1035 |
+
$service .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_service['service_type'] ) ) . '</div>';
|
1036 |
+
}
|
1037 |
+
|
1038 |
+
$service .= '<div class="snippet-data-img">
|
1039 |
+
<span itemprop="serviceType">' . esc_attr( $service_type ) . '</span>
|
1040 |
+
</div>
|
1041 |
+
<div class="snippet-clear"></div>';
|
1042 |
+
}
|
1043 |
+
|
1044 |
+
if ( '' != trim( $service_provider_name ) ) {
|
1045 |
+
if ( '' != $args_service['service_provider_name'] ) {
|
1046 |
+
$service .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_service['service_provider_name'] ) ) . '</div>';
|
1047 |
+
}
|
1048 |
+
|
1049 |
+
$service .= '<div class="snippet-data-img" itemprop="provider" itemscope itemtype="https://schema.org/LocalBusiness">
|
1050 |
+
<meta itemprop="image" content="' . esc_attr( $service_provider_location_image ) . '"/>
|
1051 |
+
<span itemprop="name">' . esc_attr( $service_provider_name ) . '</span>,';
|
1052 |
+
if ( '' != trim( $service_street ) ) {
|
1053 |
+
$service .= '<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
|
1054 |
+
<span itemprop="streetAddress">' . esc_attr( $service_street ) . '</span>,';
|
1055 |
+
}
|
1056 |
+
if ( '' != trim( $service_local ) ) {
|
1057 |
+
$service .= '<span itemprop="addressLocality">' . esc_attr( $service_local ) . '</span>,';
|
1058 |
+
}
|
1059 |
+
if ( '' != trim( $service_region ) ) {
|
1060 |
+
$service .= '<span itemprop="addressRegion">' . esc_attr( $service_region ) . '</span>-';
|
1061 |
+
}
|
1062 |
+
if ( '' != trim( $service_postal_code ) ) {
|
1063 |
+
$service .= '<span itemprop="postalCode">' . esc_attr( $service_postal_code ) . '</span>,<br/>';
|
1064 |
+
}
|
1065 |
+
if ( '' != trim( $service_telephone ) ) {
|
1066 |
+
$service .= '<span itemprop="telephone"> Telephone No.' . esc_attr( $service_telephone ) . '</span>';
|
1067 |
+
}
|
1068 |
+
$service .= '</div>';
|
1069 |
+
$service .= '</div>
|
1070 |
+
<div class="snippet-clear"></div>';
|
1071 |
+
}
|
1072 |
+
|
1073 |
+
if ( '' != trim( $service_area ) ) {
|
1074 |
+
if ( '' != $args_service['service_area'] ) {
|
1075 |
+
$service .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_service['service_area'] ) ) . '</div>';
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
$service .= '<div class="snippet-data-img" itemprop="areaServed" itemscope itemtype="https://schema.org/State">
|
1079 |
+
<span itemprop="name">' . esc_attr( $service_area ) . '</span>
|
1080 |
+
</div><div class="snippet-clear"></div>';
|
1081 |
+
}
|
1082 |
+
|
1083 |
+
if ( '' != trim( $service_desc ) ) {
|
1084 |
+
if ( '' != $args_service['service_desc'] ) {
|
1085 |
+
$service .= '<div class="snippet-label-img">' . esc_attr( stripslashes( $args_service['service_desc'] ) ) . '</div>';
|
1086 |
+
}
|
1087 |
+
|
1088 |
+
$service .= '<div class="snippet-data-img"><span itemprop="description">' . esc_attr( htmlspecialchars_decode( $service_desc ) ) . '</span></div><div class="snippet-clear"></div>';
|
1089 |
+
}
|
1090 |
+
|
1091 |
+
if ( '' != trim( $service_channel ) ) {
|
1092 |
+
if ( '' != $args_service['service_channel'] ) {
|
1093 |
+
|
1094 |
+
$service .= '<div class="snippet-data-img" itemprop="availableChannel" itemscope itemtype="https://schema.org/ServiceChannel">
|
1095 |
+
|
1096 |
+
<meta itemprop="URL" href="' . esc_url( $service_channel ) . '">
|
1097 |
+
</div><div class="snippet-clear"></div>';
|
1098 |
+
}
|
1099 |
+
}
|
1100 |
+
|
1101 |
+
$service .= '</div></div></div><div class="snippet-clear"></div>';
|
1102 |
+
|
1103 |
+
return ( is_single() || is_page() ) ? $content . $service : $content;
|
1104 |
+
} else {
|
1105 |
+
return $content;
|
1106 |
+
}
|
1107 |
+
}
|
1108 |
+
|
1109 |
+
|
1110 |
+
add_filter( 'the_content', 'display_rich_snippet', 90 );
|
1111 |
+
|
1112 |
+
|
1113 |
+
require_once plugin_dir_path( __FILE__ ) . 'meta-boxes.php';
|
1114 |
+
/**
|
1115 |
+
* Get_the_ip.
|
1116 |
+
*/
|
1117 |
+
function get_the_ip() {
|
1118 |
+
if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
|
1119 |
+
return $_SERVER['HTTP_X_FORWARDED_FOR'];
|
1120 |
+
} elseif ( isset( $_SERVER['HTTP_CLIENT_IP'] ) ) {
|
1121 |
+
return $_SERVER['HTTP_CLIENT_IP'];
|
1122 |
+
} else {
|
1123 |
+
return $_SERVER['REMOTE_ADDR'];
|
1124 |
+
}
|
1125 |
+
}
|
1126 |
+
/**
|
1127 |
+
* Average_rating.
|
1128 |
+
*/
|
1129 |
+
function average_rating() {
|
1130 |
+
global $post;
|
1131 |
+
|
1132 |
+
$data = get_post_meta( $post->ID, 'post-rating', false );
|
1133 |
+
$post_id = $post->ID;
|
1134 |
+
if ( ! empty( $data ) ) {
|
1135 |
+
$counter = 0;
|
1136 |
+
|
1137 |
+
$average_rating = 0;
|
1138 |
+
foreach ( $data as $d ) {
|
1139 |
+
$rating = $d['user_rating'];
|
1140 |
+
|
1141 |
+
$average_rating = $average_rating + $rating;
|
1142 |
+
|
1143 |
+
$counter++;
|
1144 |
+
|
1145 |
+
}
|
1146 |
+
// round the average to the nearast 1/2 point.
|
1147 |
+
return ( round( ( $average_rating / $counter ) * 2, 0 ) / 2 );
|
1148 |
+
|
1149 |
+
} else {
|
1150 |
+
// no ratings.
|
1151 |
+
return 'no rating';
|
1152 |
+
}
|
1153 |
+
}
|
1154 |
+
/**
|
1155 |
+
* Rating_count.
|
1156 |
+
*/
|
1157 |
+
function rating_count() {
|
1158 |
+
global $post;
|
1159 |
+
|
1160 |
+
$data = get_post_meta( $post->ID, 'post-rating', false );
|
1161 |
+
return count( $data );
|
1162 |
+
}
|
1163 |
+
/**
|
1164 |
+
* Bsf_do_rating.
|
1165 |
+
*/
|
1166 |
+
function bsf_do_rating() {
|
1167 |
+
global $post;
|
1168 |
+
$ip = get_the_ip();
|
1169 |
+
|
1170 |
+
$ip_array = array();
|
1171 |
+
|
1172 |
+
$data = get_post_meta( $post->ID, 'post-rating', false );
|
1173 |
+
if ( ! empty( $data ) ) {
|
1174 |
+
foreach ( $data as $d ) {
|
1175 |
+
array_push( $ip_array, $d['user_ip'] );
|
1176 |
+
}
|
1177 |
+
if ( ! in_array( $ip, $ip_array ) ) {
|
1178 |
+
return display_rating();
|
1179 |
+
} elseif ( in_array( $ip, $ip_array ) ) {
|
1180 |
+
$rating = get_previous_rating( $ip, $data );
|
1181 |
+
|
1182 |
+
$stars = bsf_display_rating( $rating );
|
1183 |
+
return $stars;
|
1184 |
+
}
|
1185 |
+
} else {
|
1186 |
+
return display_rating();
|
1187 |
+
}
|
1188 |
+
}
|
1189 |
+
/**
|
1190 |
+
* Get_previous_rating.
|
1191 |
+
*
|
1192 |
+
* @param string $needle Needle.
|
1193 |
+
* @param array $haystack Haystack.
|
1194 |
+
* @param bool $strict Strict.
|
1195 |
+
*/
|
1196 |
+
function get_previous_rating( $needle, $haystack, $strict = false ) {
|
1197 |
+
foreach ( $haystack as $item ) {
|
1198 |
+
if ( ( $strict ? $item === $needle : $item == $needle ) || ( is_array( $item ) && get_previous_rating( $needle, $item, $strict ) ) ) {
|
1199 |
+
return ! empty( $item['user_rating'] ) ? esc_attr( $item['user_rating'] ) : '';
|
1200 |
+
}
|
1201 |
+
}
|
1202 |
+
return false;
|
1203 |
+
}
|
1204 |
+
/**
|
1205 |
+
* Add_ajax_library.
|
1206 |
+
*/
|
1207 |
+
function add_ajax_library() {
|
1208 |
+
|
1209 |
+
$html = '<script type="text/javascript">';
|
1210 |
+
$html .= 'var ajaxurl = "' . esc_url( admin_url( 'admin-ajax.php' ) ) . '";';
|
1211 |
+
$html .= '</script>';
|
1212 |
+
|
1213 |
+
echo $html; //phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
1214 |
+
}
|
1215 |
+
/**
|
1216 |
+
* Bsf_add_rating.
|
1217 |
+
*/
|
1218 |
+
function bsf_add_rating() {
|
1219 |
+
|
1220 |
+
if ( ! isset( $_POST['bsf_rating_nonce'] ) || ! wp_verify_nonce( $_POST['bsf_rating_nonce'], 'bsf_rating' ) ) {
|
1221 |
+
|
1222 |
+
return;
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
if ( isset( $_POST['star-review'] ) ) {
|
1226 |
+
$stars = esc_attr( $_POST['star-review'] );
|
1227 |
+
} else {
|
1228 |
+
$stars = '0';
|
1229 |
+
}
|
1230 |
+
|
1231 |
+
$ip = esc_attr( $_POST['ip'] );
|
1232 |
+
|
1233 |
+
$postid = esc_attr( $_POST['post_id'] );
|
1234 |
+
|
1235 |
+
$user_rating = array(
|
1236 |
+
'post_id' => $postid,
|
1237 |
+
'user_ip' => $ip,
|
1238 |
+
'user_rating' => $stars,
|
1239 |
+
);
|
1240 |
+
|
1241 |
+
echo false == add_post_meta( $postid, 'post-rating', $user_rating ) ? esc_html_e( 'Error adding your rating', 'all-in-one-schemaorg-rich-snippets' ) : esc_html_e( 'Ratings added successfully !', 'all-in-one-schemaorg-rich-snippets' );
|
1242 |
+
die();
|
1243 |
+
}
|
1244 |
+
/**
|
1245 |
+
* Bsf_update_rating.
|
1246 |
+
*/
|
1247 |
+
function bsf_update_rating() {
|
1248 |
+
|
1249 |
+
if ( ! isset( $_POST['bsf_rating_nonce'] ) || ! wp_verify_nonce( $_POST['bsf_rating_nonce'], 'bsf_rating' ) ) {
|
1250 |
+
|
1251 |
+
return;
|
1252 |
+
}
|
1253 |
+
if ( isset( $_POST['star-review'] ) ) {
|
1254 |
+
$stars = esc_attr( $_POST['star-review'] );
|
1255 |
+
} else {
|
1256 |
+
$stars = '0';
|
1257 |
+
}
|
1258 |
+
|
1259 |
+
$ip = esc_attr( $_POST['ip'] );
|
1260 |
+
|
1261 |
+
$postid = esc_attr( $_POST['post_id'] );
|
1262 |
+
|
1263 |
+
$prev_data = get_post_meta( $postid, 'post-rating', true );
|
1264 |
+
|
1265 |
+
$user_rating = array(
|
1266 |
+
'post_id' => $postid,
|
1267 |
+
'user_ip' => $ip,
|
1268 |
+
'user_rating' => $stars,
|
1269 |
+
);
|
1270 |
+
|
1271 |
+
echo false == update_post_meta( $postid, 'post-rating', $user_rating, $prev_data ) ? esc_html_e( 'Error updating your rating', 'all-in-one-schemaorg-rich-snippets' ) : esc_html_e( 'Ratings updated successfully !', 'all-in-one-schemaorg-rich-snippets' );
|
1272 |
+
die();
|
1273 |
+
}
|
1274 |
+
/**
|
1275 |
+
* Display_rating.
|
1276 |
+
*/
|
1277 |
+
function display_rating() {
|
1278 |
+
|
1279 |
+
global $post;
|
1280 |
+
$rating = '<span class="ratings"><div class="star-blocks">';
|
1281 |
+
$rating .= '<form name="rating" method="post" action="' . get_permalink() . '" id="bsf-rating" onsubmit="return false;">';
|
1282 |
+
$rating .= wp_nonce_field( 'bsf_rating', 'bsf_rating_nonce', true, false );
|
1283 |
+
$rating .= '<input type="radio" name="star-review" class="star star-1" value="1"/>';
|
1284 |
+
$rating .= '<input type="radio" name="star-review" class="star star-2" value="2"/>';
|
1285 |
+
$rating .= '<input type="radio" name="star-review" class="star star-3" value="3"/>';
|
1286 |
+
$rating .= '<input type="radio" name="star-review" class="star star-4" value="4"/>';
|
1287 |
+
$rating .= '<input type="radio" name="star-review" class="star star-5" value="5"/>';
|
1288 |
+
$rating .= '<input type="hidden" name="ip" value="' . get_the_ip() . '" />';
|
1289 |
+
$rating .= '<input type="hidden" name="post_id" value="' . $post->ID . '" />';
|
1290 |
+
$rating .= '</form>';
|
1291 |
+
$rating .= '</div></span>';
|
1292 |
+
$script = '<script type="text/javascript">
|
1293 |
+
jQuery("#bsf-rating").click(function()
|
1294 |
+
{
|
1295 |
+
var data = jQuery("#bsf-rating").serialize();
|
1296 |
+
var form_data = "action=bsf_submit_rating&" + data;
|
1297 |
+
// alert(form_data);
|
1298 |
+
jQuery.post(ajaxurl, form_data,
|
1299 |
+
function (response) {
|
1300 |
+
alert(response);
|
1301 |
+
window.location.href = window.location.href;
|
1302 |
+
}
|
1303 |
+
);
|
1304 |
+
});
|
1305 |
+
</script>
|
1306 |
+
';
|
1307 |
+
$rating .= $script;
|
1308 |
+
return $rating;
|
1309 |
+
}
|
1310 |
+
/**
|
1311 |
+
* Bsf_display_rating.
|
1312 |
+
*
|
1313 |
+
* @param string $n N.
|
1314 |
+
*/
|
1315 |
+
function bsf_display_rating( $n ) {
|
1316 |
+
|
1317 |
+
global $post;
|
1318 |
+
$rating = '<span class="ratings"><div class="star-blocks">';
|
1319 |
+
$rating .= '<form name="rating" method="post" action="' . get_permalink() . '" id="bsf-rating" onsubmit="return false;">';
|
1320 |
+
$rating .= wp_nonce_field( 'bsf_rating', 'bsf_rating_nonce', true, false );
|
1321 |
+
$rating .= '<input type="radio" name="star-review" class="star star-1" value="1" ';
|
1322 |
+
1 == $n ? $rating .= ' checked="checked"/>' : $rating .= '/>';
|
1323 |
+
$rating .= '<input type="radio" name="star-review" class="star star-2" value="2" ';
|
1324 |
+
2 == $n ? $rating .= ' checked="checked"/>' : $rating .= '/>';
|
1325 |
+
$rating .= '<input type="radio" name="star-review" class="star star-3" value="3" ';
|
1326 |
+
3 == $n ? $rating .= ' checked="checked"/>' : $rating .= '/>';
|
1327 |
+
$rating .= '<input type="radio" name="star-review" class="star star-4" value="4" ';
|
1328 |
+
4 == $n ? $rating .= ' checked="checked"/>' : $rating .= '/>';
|
1329 |
+
$rating .= '<input type="radio" name="star-review" class="star star-5" value="5" ';
|
1330 |
+
5 == $n ? $rating .= ' checked="checked"/>' : $rating .= '/>';
|
1331 |
+
$rating .= '<input type="hidden" name="ip" value="' . get_the_ip() . '" />';
|
1332 |
+
$rating .= '<input type="hidden" name="post_id" value="' . $post->ID . '" />';
|
1333 |
+
$rating .= '</form>';
|
1334 |
+
$rating .= '</div></span>';
|
1335 |
+
$script = '<script type="text/javascript">
|
1336 |
+
jQuery("#bsf-rating").click(function()
|
1337 |
+
{
|
1338 |
+
var data = jQuery("#bsf-rating").serialize();
|
1339 |
+
var form_data = "action=bsf_update_rating&" + data;
|
1340 |
+
// alert(form_data);
|
1341 |
+
jQuery.post(ajaxurl, form_data,
|
1342 |
+
function (response) {
|
1343 |
+
alert(response);
|
1344 |
+
window.location.href = window.location.href;
|
1345 |
+
}
|
1346 |
+
);
|
1347 |
+
});
|
1348 |
+
</script>
|
1349 |
+
';
|
1350 |
+
$rating .= $script;
|
1351 |
+
return $rating;
|
1352 |
+
}
|
index.php
CHANGED
@@ -1,316 +1,378 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
Plugin Name: Schema - All In One Schema Rich Snippets
|
4 |
-
Plugin URI: https://www.brainstormforce.com
|
5 |
-
Author: Brainstorm Force
|
6 |
-
Author URI: https://www.brainstormforce.com
|
7 |
-
Description: Welcome to the Schema - All In One Schema Rich Snippets! You can now easily add schema markup on various pages and posts of your website. Implement schema types such as Review, Events, Recipes, Article, Products, Services etc.
|
8 |
-
Version: 1.6.
|
9 |
-
Text Domain: rich-snippets
|
10 |
-
License: GPL2
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
add_action( '
|
41 |
-
|
42 |
-
$
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
add_action( '
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
$
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
wp_enqueue_script( '
|
116 |
-
|
117 |
-
wp_register_script( 'bsf-scripts
|
118 |
-
wp_enqueue_script( 'bsf-scripts
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
}
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin Name: Schema - All In One Schema Rich Snippets
|
4 |
+
* Plugin URI: https://www.brainstormforce.com
|
5 |
+
* Author: Brainstorm Force
|
6 |
+
* Author URI: https://www.brainstormforce.com
|
7 |
+
* Description: Welcome to the Schema - All In One Schema Rich Snippets! You can now easily add schema markup on various * pages and posts of your website. Implement schema types such as Review, Events, Recipes, Article, Products, Services * *etc.
|
8 |
+
* Version: 1.6.1
|
9 |
+
* Text Domain: rich-snippets
|
10 |
+
* License: GPL2
|
11 |
+
*
|
12 |
+
* @package AIOSRS.
|
13 |
+
* */
|
14 |
+
|
15 |
+
/*
|
16 |
+
Copyright 2013 Schema - All In One Schema Rich Snippets (email : info@bsf.io)
|
17 |
+
This program is free software; you can redistribute it and/or modify
|
18 |
+
it under the terms of the GNU General Public License, version 2, as
|
19 |
+
published by the Free Software Foundation.
|
20 |
+
This program is distributed in the hope that it will be useful,
|
21 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23 |
+
GNU General Public License for more details.
|
24 |
+
You should have received a copy of the GNU General Public License
|
25 |
+
along with this program; if not, write to the Free Software
|
26 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
27 |
+
*/
|
28 |
+
if ( ! class_exists( 'RichSnippets' ) ) {
|
29 |
+
/**
|
30 |
+
* RichSnippets
|
31 |
+
*/
|
32 |
+
class RichSnippets {
|
33 |
+
/**
|
34 |
+
* Initiator
|
35 |
+
*/
|
36 |
+
public function __construct() {
|
37 |
+
// Constructor.
|
38 |
+
register_activation_hook( __FILE__, array( $this, 'register_bsf_settings' ) );
|
39 |
+
add_action( 'admin_init', array( $this, 'aiosrs_admin_redirect' ) );
|
40 |
+
add_action( 'admin_head', array( $this, 'star_icons' ) );
|
41 |
+
// Add Admin Menu.
|
42 |
+
add_action( 'admin_menu', array( $this, 'register_custom_menu_page' ) );
|
43 |
+
add_action( 'admin_init', array( $this, 'set_styles' ) );
|
44 |
+
|
45 |
+
add_action( 'admin_init', array( $this, 'bsf_color_scripts' ) );
|
46 |
+
|
47 |
+
add_filter( 'plugins_loaded', array( $this, 'rich_snippet_translation' ) );
|
48 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'post_enqueue' ) );
|
49 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'post_new_enqueue' ) );
|
50 |
+
$plugin = plugin_basename( __FILE__ );
|
51 |
+
add_filter( "plugin_action_links_$plugin", array( $this, 'bsf_settings_link' ) );
|
52 |
+
add_action( 'wp_ajax_bsf_submit_request', array( $this, 'submit_request' ) );
|
53 |
+
|
54 |
+
add_action( 'wp_ajax_bsf_submit_color', array( $this, 'submit_color' ) );
|
55 |
+
// Admin bar menu.
|
56 |
+
add_action( 'admin_bar_menu', array( $this, 'aiosrs_admin_bar' ), 100 );
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Admin bar menu.
|
61 |
+
*/
|
62 |
+
public function aiosrs_admin_bar() {
|
63 |
+
global $wp_admin_bar;
|
64 |
+
$actual_link = esc_url( "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]" );
|
65 |
+
if ( ! is_super_admin() || ! is_admin_bar_showing() ) {
|
66 |
+
return;
|
67 |
+
}
|
68 |
+
if ( ! is_admin() ) {
|
69 |
+
$wp_admin_bar->add_menu(
|
70 |
+
array(
|
71 |
+
'id' => 'aiosrs',
|
72 |
+
'title' => 'Test Rich Snippets',
|
73 |
+
'href' => 'https://search.google.com/structured-data/testing-tool#url=' . $actual_link,
|
74 |
+
'meta' => array( 'target' => '_blank' ),
|
75 |
+
)
|
76 |
+
);
|
77 |
+
}
|
78 |
+
}
|
79 |
+
/**
|
80 |
+
* Register_custom_menu_page.
|
81 |
+
*/
|
82 |
+
public function register_custom_menu_page() {
|
83 |
+
require_once plugin_dir_path( __FILE__ ) . 'admin/index.php';
|
84 |
+
$page = add_menu_page( 'All in One Rich Snippets Dashboard', 'Rich Snippets', 'administrator', 'rich_snippet_dashboard', 'rich_snippet_dashboard', 'div' );
|
85 |
+
// Call the function to print the stylesheets and javascripts in only this plugins admin area.
|
86 |
+
add_action( 'admin_print_styles-' . $page, 'bsf_admin_styles' );
|
87 |
+
add_action( 'admin_print_scripts-' . $page, array( $this, 'iris_enqueue_scripts' ) );
|
88 |
+
}
|
89 |
+
/**
|
90 |
+
* Add settings link on plugin page.
|
91 |
+
*
|
92 |
+
* @param string $links Links.
|
93 |
+
*/
|
94 |
+
public function bsf_settings_link( $links ) {
|
95 |
+
$settings_link = '<a href="admin.php?page=rich_snippet_dashboard">Settings</a>';
|
96 |
+
array_unshift( $links, $settings_link );
|
97 |
+
return $links;
|
98 |
+
}
|
99 |
+
/**
|
100 |
+
* Print the star rating style on post edit page.
|
101 |
+
*
|
102 |
+
* @param string $hook Hook.
|
103 |
+
*/
|
104 |
+
public function post_enqueue( $hook ) {
|
105 |
+
if ( 'post.php' != $hook ) {
|
106 |
+
return;
|
107 |
+
}
|
108 |
+
$current_admin_screen = get_current_screen();
|
109 |
+
$exclude_custom_post_type = apply_filters( 'bsf_exclude_custom_post_type', array() );
|
110 |
+
if ( in_array( $current_admin_screen->post_type, $exclude_custom_post_type ) ) {
|
111 |
+
return;
|
112 |
+
}
|
113 |
+
wp_enqueue_script( 'jquery' );
|
114 |
+
wp_enqueue_script( 'bsf_jquery_star' );
|
115 |
+
wp_enqueue_script( 'bsf_toggle' );
|
116 |
+
wp_enqueue_style( 'star_style' );
|
117 |
+
wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js', '', '0.9.1' );
|
118 |
+
wp_enqueue_script( 'bsf-scripts' );
|
119 |
+
wp_enqueue_media();
|
120 |
+
wp_register_script( 'bsf-scripts-media', BSF_META_BOX_URL . 'js/media.js', array( 'jquery' ), '1.0' );
|
121 |
+
wp_enqueue_script( 'bsf-scripts-media' );
|
122 |
+
wp_enqueue_script( 'jquery-ui-datepicker' );
|
123 |
+
if ( ! function_exists( 'vc_map' ) ) {
|
124 |
+
wp_enqueue_style( 'jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css', null, '1.0' );
|
125 |
+
}
|
126 |
+
}
|
127 |
+
/**
|
128 |
+
* Post_new_enqueue.
|
129 |
+
*
|
130 |
+
* @param string $hook Hook.
|
131 |
+
*/
|
132 |
+
public function post_new_enqueue( $hook ) {
|
133 |
+
if ( 'post-new.php' != $hook ) {
|
134 |
+
return;
|
135 |
+
}
|
136 |
+
$current_admin_screen = get_current_screen();
|
137 |
+
$exclude_custom_post_type = apply_filters( 'bsf_exclude_custom_post_type', array() );
|
138 |
+
if ( in_array( $current_admin_screen->post_type, $exclude_custom_post_type ) ) {
|
139 |
+
return;
|
140 |
+
}
|
141 |
+
wp_enqueue_script( 'jquery' );
|
142 |
+
wp_enqueue_script( 'bsf_jquery_star' );
|
143 |
+
wp_enqueue_script( 'bsf_toggle' );
|
144 |
+
wp_enqueue_style( 'star_style' );
|
145 |
+
wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js', '', '0.9.1' );
|
146 |
+
wp_enqueue_script( 'bsf-scripts' );
|
147 |
+
wp_enqueue_media();
|
148 |
+
wp_register_script( 'bsf-scripts-media', BSF_META_BOX_URL . 'js/media.js', array( 'jquery' ), '1.0' );
|
149 |
+
wp_enqueue_script( 'bsf-scripts-media' );
|
150 |
+
wp_enqueue_script( 'jquery-ui-datepicker' );
|
151 |
+
if ( ! function_exists( 'vc_map' ) ) {
|
152 |
+
wp_enqueue_style( 'jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css', null, 1.0 );
|
153 |
+
}
|
154 |
+
}
|
155 |
+
/**
|
156 |
+
* Initialize the metabox class.
|
157 |
+
*/
|
158 |
+
public function wp_initialize_bsf_meta_boxes() {
|
159 |
+
if ( ! class_exists( 'Bsf_Meta_Box' ) ) {
|
160 |
+
require_once plugin_dir_path( __FILE__ ) . 'init.php';
|
161 |
+
}
|
162 |
+
}
|
163 |
+
/**
|
164 |
+
* Set_styles.
|
165 |
+
*/
|
166 |
+
public function set_styles() {
|
167 |
+
wp_register_style( 'star_style', plugins_url( '/css/jquery.rating.css', __FILE__ ), null, '1.0' );
|
168 |
+
wp_register_style( 'meta_style', plugins_url( 'admin/css/style.css', __FILE__ ), null, '1.0' );
|
169 |
+
|
170 |
+
wp_register_style( 'admin_style', plugins_url( 'admin/css/admin.css', __FILE__ ), null, '1.0' );
|
171 |
+
wp_register_script( 'bsf_jquery_star', plugins_url( '/js/jquery.rating.min.js', __FILE__ ), null, '1.0' );
|
172 |
+
wp_register_script( 'bsf_toggle', plugins_url( '/js/toggle.js', __FILE__ ), null, '1.0' );
|
173 |
+
}
|
174 |
+
/**
|
175 |
+
* Define icon styles for the custom post type.
|
176 |
+
*/
|
177 |
+
public function star_icons() {
|
178 |
+
?>
|
179 |
+
<style>
|
180 |
+
#toplevel_page_rich_snippet_dashboard .wp-menu-image {
|
181 |
+
background: url(<?php echo esc_url( plugins_url( '/images/star.png', __FILE__ ) ); ?>) no-repeat !important;
|
182 |
+
}
|
183 |
+
#toplevel_page_rich_snippet_dashboard:hover .wp-menu-image, #toplevel_page_rich_snippet_dashboard.wp-has-current-submenu .wp-menu-image {
|
184 |
+
background: url(<?php echo esc_url( plugins_url( '/images/star.png', __FILE__ ) ); ?>) no-repeat 0 -32px !important;
|
185 |
+
}
|
186 |
+
#toplevel_page_rich_snippet_dashboard .current .wp-menu-image, #toplevel_page_rich_snippet_dashboard.wp-has-current-submenu .wp-menu-image {
|
187 |
+
background: url(<?php echo esc_url( plugins_url( '/images/star.png', __FILE__ ) ); ?>) no-repeat 0 -32px !important;
|
188 |
+
}
|
189 |
+
#star-icons-32.icon32 {background: url(<?php echo esc_url( plugins_url( '/images/gray-32.png', __FILE__ ) ); ?>) no-repeat;}
|
190 |
+
</style>
|
191 |
+
<?php }
|
192 |
+
/**
|
193 |
+
* Translation.
|
194 |
+
*/
|
195 |
+
public function rich_snippet_translation() {
|
196 |
+
// Load Translation File.
|
197 |
+
load_plugin_textdomain( 'rich-snippets', false, basename( dirname( __FILE__ ) ) . '/lang/' );
|
198 |
+
}
|
199 |
+
/**
|
200 |
+
* Register_bsf_settings.
|
201 |
+
*/
|
202 |
+
public function register_bsf_settings() {
|
203 |
+
require_once plugin_dir_path( __FILE__ ) . 'settings.php';
|
204 |
+
add_woo_commerce_option();
|
205 |
+
add_review_option();
|
206 |
+
add_event_option();
|
207 |
+
add_person_option();
|
208 |
+
add_product_option();
|
209 |
+
add_recipe_option();
|
210 |
+
add_software_option();
|
211 |
+
add_video_option();
|
212 |
+
add_article_option();
|
213 |
+
add_service_option();
|
214 |
+
add_color_option();
|
215 |
+
add_option( 'aisrs_do_activation_redirect', true );
|
216 |
+
|
217 |
+
}
|
218 |
+
/**
|
219 |
+
* Aiosrs_admin_redirect.
|
220 |
+
*/
|
221 |
+
public function aiosrs_admin_redirect() {
|
222 |
+
$main_url = esc_url( admin_url() );
|
223 |
+
if ( get_option( 'aisrs_do_activation_redirect', false ) ) {
|
224 |
+
delete_option( 'aisrs_do_activation_redirect' );
|
225 |
+
wp_safe_redirect( $main_url . '/admin.php?page=rich_snippet_dashboard#tab-5' );
|
226 |
+
}
|
227 |
+
}
|
228 |
+
/**
|
229 |
+
* Submit_request.
|
230 |
+
*/
|
231 |
+
public function submit_request() {
|
232 |
+
$to = 'Brainstorm Force <support@bsf.io>';
|
233 |
+
$from = '';
|
234 |
+
$site = '';
|
235 |
+
$sub = '';
|
236 |
+
$message = '';
|
237 |
+
$post_url = '';
|
238 |
+
$name = '';
|
239 |
+
if ( isset( $_POST['aiosrs_support_form_nonce'] ) && wp_verify_nonce( $_POST['aiosrs_support_form_nonce'], 'aiosrs_support_form' ) ) {
|
240 |
+
|
241 |
+
$from = sanitize_email( $_POST['email'] );
|
242 |
+
$site = esc_url( $_POST['site_url'] );
|
243 |
+
$sub = sanitize_text_field( $_POST['subject'] );
|
244 |
+
$message = esc_html( $_POST['message'] );
|
245 |
+
$name = sanitize_text_field( $_POST['name'] );
|
246 |
+
$post_url = esc_url( $_POST['post_url'] );
|
247 |
+
}
|
248 |
+
|
249 |
+
if ( 'question' == $sub ) {
|
250 |
+
$subject = '[AIOSRS] New question received from ' . $name;
|
251 |
+
} elseif ( 'bug' == $sub ) {
|
252 |
+
$subject = '[AIOSRS] New bug found by ' . $name;
|
253 |
+
} elseif ( 'help' == $sub ) {
|
254 |
+
$subject = '[AIOSRS] New help request received from ' . $name;
|
255 |
+
} elseif ( 'professional' == $sub ) {
|
256 |
+
$subject = '[AIOSRS] New service quote request received from ' . $name;
|
257 |
+
} elseif ( 'contribute' == $sub ) {
|
258 |
+
$subject = '[AIOSRS] New development contribution request by ' . $name;
|
259 |
+
} elseif ( 'other' == $sub ) {
|
260 |
+
$subject = '[AIOSRS] New contact request received from ' . $name;
|
261 |
+
}
|
262 |
+
|
263 |
+
$html = '
|
264 |
+
<html>
|
265 |
+
<head>
|
266 |
+
<title>All in One Schema.org Rich Snippets</title>
|
267 |
+
</head>
|
268 |
+
<body>
|
269 |
+
<table width="100%" cellpadding="10" cellspacing="10">
|
270 |
+
<tr>
|
271 |
+
<th colspan="2"> All in One Schema.org Rich Snippets Support</th>
|
272 |
+
</tr>
|
273 |
+
<tr>
|
274 |
+
<td width="22%"> Name : </td>
|
275 |
+
<td width="78%"> <strong>' . $name . ' </strong></td>
|
276 |
+
</tr>
|
277 |
+
<tr>
|
278 |
+
<td> Email : </td>
|
279 |
+
<td> <strong>' . $from . ' </strong></td>
|
280 |
+
</tr>
|
281 |
+
<tr>
|
282 |
+
<td> Website : </td>
|
283 |
+
<td> <strong>' . $site . ' </strong></td>
|
284 |
+
</tr>
|
285 |
+
<tr>
|
286 |
+
<td> Ref. Post URL : </td>
|
287 |
+
<td> <strong>' . $post_url . ' </strong></td>
|
288 |
+
</tr>
|
289 |
+
<tr>
|
290 |
+
<td colspan="2"> Message : </td>
|
291 |
+
</tr>
|
292 |
+
<tr>
|
293 |
+
<td colspan="2"> ' . $message . ' </td>
|
294 |
+
</tr>
|
295 |
+
</table>
|
296 |
+
</body>
|
297 |
+
</html>
|
298 |
+
';
|
299 |
+
$headers = 'MIME-Version: 1.0' . "\r\n";
|
300 |
+
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
|
301 |
+
$headers .= 'From:' . $name . '<' . $from . '>' . "\r\n";
|
302 |
+
echo mail( $to, $subject, $html, $headers ) ? esc_html_e( 'Thank you!', 'all-in-one-schemaorg-rich-snippets' ) : esc_html_e( 'Something went wrong!', 'all-in-one-schemaorg-rich-snippets' );
|
303 |
+
|
304 |
+
die();
|
305 |
+
}
|
306 |
+
/**
|
307 |
+
* Submit_color.
|
308 |
+
*/
|
309 |
+
public function submit_color() {
|
310 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
311 |
+
// return if current user is not allowed to manage options.
|
312 |
+
return;
|
313 |
+
} else {
|
314 |
+
if ( ! isset( $_POST['snippet_color_nonce_field'] ) || ! wp_verify_nonce( $_POST['snippet_color_nonce_field'], 'snippet_color_form_action' )
|
315 |
+
) {
|
316 |
+
print esc_attr( 'Sorry, your nonce did not verify.' );
|
317 |
+
exit;
|
318 |
+
} else {
|
319 |
+
$snippet_box_bg = esc_attr( $_POST['snippet_box_bg'] );
|
320 |
+
$snippet_title_bg = esc_attr( $_POST['snippet_title_bg'] );
|
321 |
+
$border_color = esc_attr( $_POST['snippet_border'] );
|
322 |
+
$title_color = esc_attr( $_POST['snippet_title_color'] );
|
323 |
+
$box_color = esc_attr( $_POST['snippet_box_color'] );
|
324 |
+
$color_opt = array(
|
325 |
+
'snippet_box_bg' => $snippet_box_bg,
|
326 |
+
'snippet_title_bg' => $snippet_title_bg,
|
327 |
+
'snippet_border' => $border_color,
|
328 |
+
'snippet_title_color' => $title_color,
|
329 |
+
'snippet_box_color' => $box_color,
|
330 |
+
);
|
331 |
+
echo update_option( 'bsf_custom', $color_opt ) ? esc_html_e( 'Settings saved !', 'all-in-one-schemaorg-rich-snippets' ) : esc_html_e( 'Error occured. Settings were not saved !', 'all-in-one-schemaorg-rich-snippets' );
|
332 |
+
|
333 |
+
die();
|
334 |
+
}
|
335 |
+
}
|
336 |
+
}
|
337 |
+
/**
|
338 |
+
* Iris_enqueue_scripts.
|
339 |
+
*/
|
340 |
+
public function iris_enqueue_scripts() {
|
341 |
+
wp_enqueue_script( 'wp-color-picker' );
|
342 |
+
// load the minified version of custom script.
|
343 |
+
wp_enqueue_script( 'cp_custom', plugins_url( 'js/cp-script.min.js', __FILE__ ), array( 'jquery', 'wp-color-picker' ), '1.1', true );
|
344 |
+
wp_enqueue_style( 'wp-color-picker' );
|
345 |
+
}
|
346 |
+
/**
|
347 |
+
* Bsf_color_scripts.
|
348 |
+
*/
|
349 |
+
public function bsf_color_scripts() {
|
350 |
+
global $wp_version;
|
351 |
+
$bsf_script_array = array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker', 'media-upload', 'thickbox' );
|
352 |
+
|
353 |
+
// styles required for cmb.
|
354 |
+
$bsf_style_array = array( 'thickbox' );
|
355 |
+
|
356 |
+
// if we're 3.5 or later, user wp-color-picker.
|
357 |
+
if ( 3.5 <= $wp_version ) {
|
358 |
+
|
359 |
+
$bsf_script_array[] = 'wp-color-picker';
|
360 |
+
$bsf_style_array[] = 'wp-color-picker';
|
361 |
+
|
362 |
+
} else {
|
363 |
+
|
364 |
+
// otherwise use the older 'farbtastic'.
|
365 |
+
$bsf_script_array[] = 'farbtastic';
|
366 |
+
$bsf_style_array[] = 'farbtastic';
|
367 |
+
|
368 |
+
}
|
369 |
+
}
|
370 |
+
}
|
371 |
+
}
|
372 |
+
require_once plugin_dir_path( __FILE__ ) . 'functions.php';
|
373 |
+
add_filter( 'bsf_meta_boxes', 'bsf_metaboxes' );
|
374 |
+
// Instantiating the Class.
|
375 |
+
if ( class_exists( 'RichSnippets' ) ) {
|
376 |
+
$richsnippets = new RichSnippets();
|
377 |
+
}
|
378 |
+
?>
|
init.php
CHANGED
@@ -1,561 +1,681 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
}
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
$
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
}
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
function
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
echo '<
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
echo '<span class="bsf_metabox_description ', $field['class'],'">', $field['desc'], '</span>';
|
222 |
-
break;
|
223 |
-
case '
|
224 |
-
echo '<
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
echo '<
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
$
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
echo '<
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
echo '
|
312 |
-
echo '<
|
313 |
-
|
314 |
-
|
315 |
-
echo '<
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
echo '<
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
echo '</
|
349 |
-
break;
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
}
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
})
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
}
|
521 |
-
|
522 |
-
/**
|
523 |
-
*
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
//
|
530 |
-
$
|
531 |
-
|
532 |
-
$
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
}
|
560 |
-
|
561 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Init.
|
4 |
+
*
|
5 |
+
* @package Init.
|
6 |
+
*/
|
7 |
+
|
8 |
+
$meta_boxes = array();
|
9 |
+
$meta_boxes = apply_filters( 'bsf_meta_boxes', $meta_boxes );
|
10 |
+
foreach ( $meta_boxes as $meta_box ) {
|
11 |
+
$my_box = new Bsf_Meta_Box( $meta_box );
|
12 |
+
}
|
13 |
+
/**
|
14 |
+
* Validate value of meta fields.
|
15 |
+
* Define ALL validation methods inside this class and use the names of these.
|
16 |
+
* methods in the definition of meta boxes (key 'validate_func' of each field).
|
17 |
+
*/
|
18 |
+
/**
|
19 |
+
* Bsf_Meta_Box_Validate
|
20 |
+
*/
|
21 |
+
class Bsf_Meta_Box_Validate {
|
22 |
+
/**
|
23 |
+
* Check_text.
|
24 |
+
*
|
25 |
+
* @param string $text Text.
|
26 |
+
*/
|
27 |
+
public function check_text( $text ) {
|
28 |
+
if ( 'hello' != $text ) {
|
29 |
+
return false;
|
30 |
+
}
|
31 |
+
return true;
|
32 |
+
}
|
33 |
+
}
|
34 |
+
/**
|
35 |
+
* Defines the url to which is used to load local resources.
|
36 |
+
* This may need to be filtered for local Window installations.
|
37 |
+
* If resources do not load, please check the wiki for details.
|
38 |
+
*/
|
39 |
+
if ( 'WIN' === strtoupper( substr( PHP_OS, 0, 3 ) ) ) {
|
40 |
+
// winblows.
|
41 |
+
define( 'BSF_META_BOX_URL', trailingslashit( str_replace( DIRECTORY_SEPARATOR, '/', str_replace( str_replace( '/', DIRECTORY_SEPARATOR, WP_CONTENT_DIR ), WP_CONTENT_URL, dirname( __FILE__ ) ) ) ) );
|
42 |
+
} else {
|
43 |
+
define( 'BSF_META_BOX_URL', apply_filters( 'bsf_meta_box_url', trailingslashit( str_replace( WP_CONTENT_DIR, WP_CONTENT_URL, dirname( __FILE__ ) ) ) ) );
|
44 |
+
}
|
45 |
+
/**
|
46 |
+
* Create meta boxes.
|
47 |
+
*/
|
48 |
+
class Bsf_Meta_Box {
|
49 |
+
//phpcs:ignore:Generic.Files.OneObjectStructurePerFile.MultipleFound
|
50 |
+
/**
|
51 |
+
* Meta Box.
|
52 |
+
*
|
53 |
+
* @var $_meta_box.
|
54 |
+
*/
|
55 |
+
protected $_meta_box; //phpcs:ignore:PSR2.Classes.PropertyDeclaration.Underscore
|
56 |
+
/**
|
57 |
+
* Initiator.
|
58 |
+
*
|
59 |
+
* @param string $meta_box Meta Box.
|
60 |
+
*/
|
61 |
+
public function __construct( $meta_box ) {
|
62 |
+
if ( ! is_admin() ) {
|
63 |
+
return;
|
64 |
+
}
|
65 |
+
$this->_meta_box = $meta_box;
|
66 |
+
$upload = false;
|
67 |
+
foreach ( $meta_box['fields'] as $field ) {
|
68 |
+
if ( 'file' == $field['type'] || 'file_list' == $field['type'] ) {
|
69 |
+
$upload = true;
|
70 |
+
break;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
global $pagenow;
|
74 |
+
if ( $upload && in_array( $pagenow, array( 'page.php', 'page-new.php', 'post.php', 'post-new.php' ), true ) ) {
|
75 |
+
add_action( 'admin_head', array( &$this, 'add_post_enctype' ) );
|
76 |
+
}
|
77 |
+
add_action( 'admin_menu', array( &$this, 'add' ) );
|
78 |
+
add_action( 'save_post', array( &$this, 'save' ) );
|
79 |
+
add_filter( 'bsf_show_on', array( &$this, 'add_for_id' ), 10, 2 );
|
80 |
+
add_filter( 'bsf_show_on', array( &$this, 'add_for_page_template' ), 10, 2 );
|
81 |
+
}
|
82 |
+
/**
|
83 |
+
* Add_post_enctype.
|
84 |
+
*/
|
85 |
+
public function add_post_enctype() {
|
86 |
+
echo '
|
87 |
+
<script type="text/javascript">
|
88 |
+
jQuery(document).ready(function(){
|
89 |
+
jQuery("#post").attr("enctype", "multipart/form-data");
|
90 |
+
jQuery("#post").attr("encoding", "multipart/form-data");
|
91 |
+
});
|
92 |
+
</script>';
|
93 |
+
}
|
94 |
+
/**
|
95 |
+
* Add metaboxes.
|
96 |
+
*/
|
97 |
+
public function add() {
|
98 |
+
$this->_meta_box['context'] = empty( $this->_meta_box['context'] ) ? 'normal' : $this->_meta_box['context'];
|
99 |
+
$this->_meta_box['priority'] = empty( $this->_meta_box['priority'] ) ? 'high' : $this->_meta_box['priority'];
|
100 |
+
$this->_meta_box['show_on'] = empty( $this->_meta_box['show_on'] ) ? array(
|
101 |
+
'key' => false,
|
102 |
+
'value' => false,
|
103 |
+
) : $this->_meta_box['show_on'];
|
104 |
+
foreach ( $this->_meta_box['pages'] as $page ) {
|
105 |
+
if ( apply_filters( 'bsf_show_on', true, $this->_meta_box ) ) {
|
106 |
+
add_meta_box( $this->_meta_box['id'], $this->_meta_box['title'], array( &$this, 'show' ), $page, $this->_meta_box['context'], $this->_meta_box['priority'] );
|
107 |
+
}
|
108 |
+
}
|
109 |
+
}
|
110 |
+
/**
|
111 |
+
* Show On Filters
|
112 |
+
* Use the 'bsf_show_on' filter to further refine the conditions under which a metabox is displayed.
|
113 |
+
* Below you can limit it by ID and page template.
|
114 |
+
*
|
115 |
+
* @param string $display Display.
|
116 |
+
* @param string $meta_box Meta Box.
|
117 |
+
*/
|
118 |
+
public function add_for_id( $display, $meta_box ) {
|
119 |
+
if ( 'id' !== $meta_box['show_on']['key'] ) {
|
120 |
+
return $display;
|
121 |
+
}
|
122 |
+
// If we're showing it based on ID, get the current ID.
|
123 |
+
if ( isset( $_GET['post'] ) ) { //phpcs:ignore:WordPress.Security.NonceVerification.Recommended
|
124 |
+
$post_id = sanitize_text_field( $_GET['post'] ); //phpcs:ignore:WordPress.Security.NonceVerification.Recommended
|
125 |
+
} elseif ( isset( $_POST['post_ID'] ) ) { //phpcs:ignore:WordPress.Security.NonceVerification.Missing
|
126 |
+
$post_id = sanitize_text_field( $_POST['post_ID'] ); //phpcs:ignore:WordPress.Security.NonceVerification.Missing
|
127 |
+
}
|
128 |
+
if ( ! isset( $post_id ) ) {
|
129 |
+
return false;
|
130 |
+
}
|
131 |
+
// If value isn't an array, turn it into one.
|
132 |
+
$meta_box['show_on']['value'] = ! is_array( $meta_box['show_on']['value'] ) ? array( $meta_box['show_on']['value'] ) : $meta_box['show_on']['value'];
|
133 |
+
// If current page id is in the included array, display the metabox.
|
134 |
+
if ( in_array( $post_id, $meta_box['show_on']['value'] ) ) {
|
135 |
+
return true;
|
136 |
+
} else {
|
137 |
+
return false;
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Add for Page Template.
|
143 |
+
*
|
144 |
+
* @param string $display Display.
|
145 |
+
* @param string $meta_box Meta Box.
|
146 |
+
*/
|
147 |
+
public function add_for_page_template( $display, $meta_box ) {
|
148 |
+
if ( 'page-template' !== $meta_box['show_on']['key'] ) {
|
149 |
+
return $display;
|
150 |
+
}
|
151 |
+
// Get the current ID.
|
152 |
+
if ( isset( $_GET['post'] ) ) { //phpcs:ignore:WordPress.Security.NonceVerification.Recommended
|
153 |
+
$post_id = esc_attr( $_GET['post'] ); //phpcs:ignore:WordPress.Security.NonceVerification.Recommended
|
154 |
+
} elseif ( isset( $_POST['post_ID'] ) ) { //phpcs:ignore:WordPress.Security.NonceVerification.Missing
|
155 |
+
$post_id = esc_attr( $_POST['post_ID'] ); //phpcs:ignore:WordPress.Security.NonceVerification.Missing
|
156 |
+
}
|
157 |
+
if ( ! ( isset( $post_id ) || is_page() ) ) {
|
158 |
+
return false;
|
159 |
+
}
|
160 |
+
// Get current template.
|
161 |
+
$current_template = get_post_meta( $post_id, '_wp_page_template', true );
|
162 |
+
// If value isn't an array, turn it into one.
|
163 |
+
$meta_box['show_on']['value'] = ! is_array( $meta_box['show_on']['value'] ) ? array( $meta_box['show_on']['value'] ) : $meta_box['show_on']['value'];
|
164 |
+
// See if there's a match.
|
165 |
+
if ( in_array( $current_template, $meta_box['show_on']['value'] ) ) {
|
166 |
+
return true;
|
167 |
+
} else {
|
168 |
+
return false;
|
169 |
+
}
|
170 |
+
}
|
171 |
+
/**
|
172 |
+
* Show fields.
|
173 |
+
*/
|
174 |
+
public function show() {
|
175 |
+
global $post;
|
176 |
+
// Use nonce for verification.
|
177 |
+
echo '<input type="hidden" name="wp_meta_box_nonce" value="', esc_attr( wp_create_nonce( basename( __FILE__ ) ) ), '" />';
|
178 |
+
echo '<table class="form-table bsf_metabox">';
|
179 |
+
foreach ( $this->_meta_box['fields'] as $field ) {
|
180 |
+
// Set up blank or default values for empty ones.
|
181 |
+
if ( ! isset( $field['name'] ) ) {
|
182 |
+
$field['name'] = '';
|
183 |
+
}
|
184 |
+
if ( ! isset( $field['desc'] ) ) {
|
185 |
+
$field['desc'] = '';
|
186 |
+
}
|
187 |
+
if ( ! isset( $field['std'] ) ) {
|
188 |
+
$field['std'] = '';
|
189 |
+
}
|
190 |
+
if ( 'file' == $field['type'] && ! isset( $field['allow'] ) ) {
|
191 |
+
$field['allow'] = array( 'url', 'attachment' );
|
192 |
+
}
|
193 |
+
if ( 'file' == $field['type'] && ! isset( $field['save_id'] ) ) {
|
194 |
+
$field['save_id'] = false;
|
195 |
+
}
|
196 |
+
if ( 'multicheck' == $field['type'] ) {
|
197 |
+
$field['multiple'] = true;
|
198 |
+
}
|
199 |
+
$meta = get_post_meta( $post->ID, esc_attr( $field['id'] ), 'multicheck' != $field['type'] /* If multicheck this can be multiple values */ );
|
200 |
+
echo '<tr class="', esc_attr( $field['class'] ),'">';
|
201 |
+
if ( 'title' == $field['type'] || ( 'select' == $field['type'] && '' == esc_html( $field['name'] ) ) ) {
|
202 |
+
echo '<td colspan="2">';
|
203 |
+
} else {
|
204 |
+
if ( true == $this->_meta_box['show_names'] ) {
|
205 |
+
echo '<th style="width:18%"><label class="', esc_attr( $field['class'] ),'" for="', esc_attr( $field['id'] ), '">', esc_html( $field['name'] ), '</label></th>';
|
206 |
+
}
|
207 |
+
echo '<td>';
|
208 |
+
}
|
209 |
+
|
210 |
+
switch ( $field['type'] ) {
|
211 |
+
case 'text':
|
212 |
+
echo '<input class="', esc_attr( $field['class'] ),'" type="text" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', '' !== $meta ? esc_attr( $meta ) : esc_attr( $field['std'] ), '" />','<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', wp_kses_post( $field['desc'] ) , '</p>';
|
213 |
+
break;
|
214 |
+
case 'text_small':
|
215 |
+
echo '<input class="bsf_text_small ', esc_attr( $field['class'] ),'" type="text" name="',esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', '' !== $meta ? esc_attr( $meta ) : esc_attr( $field['std'] ), '" /><span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', wp_kses_post( $field['desc'] ), '</span>';
|
216 |
+
break;
|
217 |
+
case 'text_medium':
|
218 |
+
echo '<input class="bsf_text_medium ', esc_attr( $field['class'] ),'" type="text" name="',esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', '' !== $meta ? esc_attr( $meta ) : esc_attr( $field['std'] ), '" /><span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
|
219 |
+
break;
|
220 |
+
case 'text_date':
|
221 |
+
echo '<input class="bsf_text_small bsf_datepicker ', esc_attr( $field['class'] ),'" type="text" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', '' !== $meta ? esc_attr( $meta ) : esc_attr( $field['std'] ), '" /><span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
|
222 |
+
break;
|
223 |
+
case 'text_date_timestamp':
|
224 |
+
echo '<input class="bsf_text_small bsf_datepicker ', esc_attr( $field['class'] ),'" type="text" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', '' !== $meta ? esc_attr( gmdate( 'm\/d\/Y', $meta ) ) : esc_attr( $field['std'] ), '" /><span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
|
225 |
+
break;
|
226 |
+
case 'text_datetime_timestamp':
|
227 |
+
echo '<input class="bsf_text_small bsf_datepicker ', esc_attr( $field['class'] ),'" type="text" name="', esc_attr( $field['id'] ), '[date]" id="', esc_attr( $field['id'] ), '_date" value="', '' !== $meta ? esc_attr( gmdate( 'm\/d\/Y', $meta ) ) : esc_attr( $field['std'] ), '" />';
|
228 |
+
echo '<input class="bsf_timepicker text_time ', esc_attr( $field['class'] ),'" type="text" name="', esc_attr( $field['id'] ), '[time]" id="', esc_attr( $field['id'] ), '_time" value="', '' !== $meta ? esc_attr( gmdate( 'h:i A', $meta ) ) : esc_attr( $field['std'] ), '" /><span class="bsf_metabox_description ', esc_attr( $field['class'] ),'" >', esc_attr( $field['desc'] ), '</span>';
|
229 |
+
break;
|
230 |
+
case 'text_time':
|
231 |
+
echo '<input class="bsf_timepicker text_time ', esc_attr( $field['class'] ),'" type="text" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', '' !== $meta ? esc_attr( $meta ) : esc_attr( $field['std'] ), '" /><span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
|
232 |
+
break;
|
233 |
+
case 'text_money':
|
234 |
+
echo '$ <input class="bsf_text_money ', esc_attr( $field['class'] ),'" type="text" name="',esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', '' !== $meta ? esc_attr( $meta ) : esc_attr( $field['std'] ), '" /><span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
|
235 |
+
break;
|
236 |
+
case 'colorpicker':
|
237 |
+
$meta = '' !== $meta ? esc_attr( $meta ) : esc_attr( $field['std'] );
|
238 |
+
$hex_color = '(([a-fA-F0-9]){3}){1,2}$';
|
239 |
+
if ( preg_match( '/^' . $hex_color . '/i', $meta ) ) { // Value is just 123abc, so prepend #.
|
240 |
+
$meta = '#' . $meta;
|
241 |
+
} elseif ( ! preg_match( '/^#' . $hex_color . '/i', $meta ) ) { // Value doesn't match #123abc, so sanitize to just #.
|
242 |
+
$meta = '#';
|
243 |
+
}
|
244 |
+
echo '<input class="bsf_colorpicker bsf_text_small ', esc_attr( $field['class'] ),'" type="text" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', esc_attr( $meta ), '" /><span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
|
245 |
+
break;
|
246 |
+
case 'textarea':
|
247 |
+
echo '<textarea class="', esc_attr( $field['class'] ),'" name="', esc_attr( $field['id'] ), '" id="',esc_attr( $field['id'] ), '" cols="60" rows="10">', '' !== $meta ? esc_attr( htmlspecialchars_decode( $meta ) ) : esc_attr( $field['std'] ), '</textarea>','<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
|
248 |
+
break;
|
249 |
+
case 'textarea_small':
|
250 |
+
echo '<textarea class="', esc_attr( $field['class'] ),'" name="', esc_attr( $field['id'] ), '" id="',esc_attr( $field['id'] ), '" cols="60" rows="4">', '' !== $meta ? esc_attr( htmlspecialchars_decode( $meta ) ) : esc_attr( $field['std'] ), '</textarea>','<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
|
251 |
+
break;
|
252 |
+
case 'textarea_code':
|
253 |
+
echo '<textarea class="', esc_attr( $field['class'] ),'" name="', esc_attr( $field['id'] ), '" id="',esc_attr( $field['id'] ), '" cols="60" rows="10" class="bsf_textarea_code">', '' !== $meta ? esc_attr( htmlspecialchars_decode( $meta ) ) : esc_attr( $field['std'] ), '</textarea>','<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
|
254 |
+
break;
|
255 |
+
case 'select':
|
256 |
+
if ( empty( $meta ) && ! empty( $field['std'] ) ) {
|
257 |
+
$meta = esc_attr( $field['std'] );
|
258 |
+
}
|
259 |
+
echo '<select class="', esc_attr( $field['class'] ),'" name="', esc_attr( $field['id'] ), '" id="',esc_attr( $field['id'] ), '">';
|
260 |
+
foreach ( $field['options'] as $option ) {
|
261 |
+
echo '<option class="', esc_attr( $field['class'] ),'" value="', esc_attr( $option['value'] ), '"', $meta == $option['value'] ? ' selected="selected"' : '', '>', esc_attr( $option['name'] ) , '</option>';
|
262 |
+
}
|
263 |
+
echo '</select>';
|
264 |
+
echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
|
265 |
+
break;
|
266 |
+
case 'radio_inline':
|
267 |
+
if ( empty( $meta ) && ! empty( $field['std'] ) ) {
|
268 |
+
$meta = esc_attr( $field['std'] );
|
269 |
+
}
|
270 |
+
echo '<div class="bsf_radio_inline ', esc_attr( $field['class'] ),'">';
|
271 |
+
$i = 1;
|
272 |
+
foreach ( $field['options'] as $option ) {
|
273 |
+
echo '<div class="bsf_radio_inline_option ', esc_attr( $field['class'] ),'"><input class="', esc_attr( $field['class'] ),'" type="radio" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), esc_attr( $i ), '" value="', esc_attr( $option['value'] ), '"', $meta == $option['value'] ? ' checked="checked"' : '', ' /><label class="', esc_attr( $field['class'] ),'" for="', esc_attr( $field['id'] ), esc_attr( $i ), '">', esc_attr( $option['name'] ) , '</label></div>';
|
274 |
+
$i++;
|
275 |
+
}
|
276 |
+
echo '</div>';
|
277 |
+
echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
|
278 |
+
break;
|
279 |
+
case 'radio':
|
280 |
+
if ( empty( $meta ) && ! empty( $field['std'] ) ) {
|
281 |
+
$meta = esc_attr( $field['std'] );
|
282 |
+
}
|
283 |
+
echo '<div class="', esc_attr( $field['class'] ),'"><ul>';
|
284 |
+
$i = 1;
|
285 |
+
foreach ( $field['options'] as $option ) {
|
286 |
+
if ( esc_attr( $field['class'] ) == 'star review' || esc_attr( $field['class'] ) == 'star product' || esc_attr( $field['class'] ) == 'star software' || esc_attr( $field['class'] ) == 'star service' ) {
|
287 |
+
$class = 'star';
|
288 |
+
} else {
|
289 |
+
$class = esc_attr( $field['class'] );
|
290 |
+
}
|
291 |
+
echo '<li class="', esc_attr( $field['class'] ),'">
|
292 |
+
<input class="', $class,'" type="radio" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), esc_attr( $i ),'" value="', esc_attr( $option['value'] ), '"', $meta == $option['value'] ? ' checked="checked"' : '', ' /><label class="', esc_attr( $field['class'] ),'" for="', esc_attr( $field['id'] ), esc_attr( $i ), '">', esc_attr( $option['name'] ) . '</label> </li>';
|
293 |
+
$i++;
|
294 |
+
}
|
295 |
+
echo '</ul></div>';
|
296 |
+
echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
|
297 |
+
break;
|
298 |
+
case 'checkbox':
|
299 |
+
echo '<input type="checkbox" class="', esc_attr( $field['class'] ),'" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '"', $meta ? ' checked="checked"' : '', ' />';
|
300 |
+
echo '<span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
|
301 |
+
break;
|
302 |
+
case 'multicheck':
|
303 |
+
echo '<ul class="', esc_attr( $field['class'] ),'">';
|
304 |
+
$i = 1;
|
305 |
+
foreach ( $field['options'] as $value => $name ) {
|
306 |
+
// Append `[]` to the name to get multiple values.
|
307 |
+
// Use in_array() to check whether the current option should be checked.
|
308 |
+
echo '<li class="', esc_attr( $field['class'] ),'"><input type="checkbox" class="', esc_attr( $field['class'] ),'" name="', esc_attr( $field['id'] ), '[]" id="', esc_attr( $field['id'] ), esc_attr( $i ), '" value="', $value, '"', in_array( $value, $meta ) ? ' checked="checked"' : '', ' /><label class="', esc_attr( $field['class'] ),'" for="', esc_attr( $field['id'] ), esc_attr( $i ), '">', esc_html( $name ), '</label></li>';
|
309 |
+
$i++;
|
310 |
+
}
|
311 |
+
echo '</ul>';
|
312 |
+
echo '<span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
|
313 |
+
break;
|
314 |
+
case 'title':
|
315 |
+
echo '<h5 class="bsf_metabox_title ', esc_attr( $field['class'] ),'">', esc_html( $field['name'] ), '</h5>';
|
316 |
+
echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
|
317 |
+
break;
|
318 |
+
case 'wysiwyg':
|
319 |
+
wp_editor( $meta ? esc_attr( $meta ) : esc_attr( $field['std'] ), esc_attr( $field['id'] ), isset( $field['options'] ) ? $field['options'] : array() );
|
320 |
+
echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
|
321 |
+
break;
|
322 |
+
case 'taxonomy_select':
|
323 |
+
echo '<select class="', esc_attr( $field['class'] ),'" name="', esc_attr( $field['id'] ), '" id="',esc_attr( $field['id'] ), '">';
|
324 |
+
$names = wp_get_object_terms( $post->ID, $field['taxonomy'] );
|
325 |
+
$terms = get_terms( $field['taxonomy'], 'hide_empty=0' );
|
326 |
+
foreach ( $terms as $term ) {
|
327 |
+
if ( ! is_wp_error( $names ) && ! empty( $names ) && ! strcmp( $term->slug, $names[0]->slug ) ) {
|
328 |
+
echo '<option value="' . esc_attr( $term->slug ) . '" selected>' . esc_attr( $term->name ) . '</option>';
|
329 |
+
} else {
|
330 |
+
echo '<option value="' . $term->slug . ' ' , $meta == $term->slug ? esc_attr( $meta ) : ' ' ,' ">' . esc_attr( $term->name ) . '</option>';
|
331 |
+
}
|
332 |
+
}
|
333 |
+
echo '</select>';
|
334 |
+
echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
|
335 |
+
break;
|
336 |
+
case 'taxonomy_radio':
|
337 |
+
$names = wp_get_object_terms( $post->ID, $field['taxonomy'] );
|
338 |
+
$terms = get_terms( $field['taxonomy'], 'hide_empty=0' );
|
339 |
+
echo '<ul class="', esc_attr( $field['class'] ),'">';
|
340 |
+
foreach ( $terms as $term ) {
|
341 |
+
if ( ! is_wp_error( $names ) && ! empty( $names ) && ! strcmp( $term->slug, $names[0]->slug ) ) {
|
342 |
+
echo '<li class="', esc_attr( $field['class'] ),'"><input class="', esc_attr( $field['class'] ),'" type="radio" name="', esc_attr( $field['id'] ), '" value="' . esc_attr( $term->slug ) . '" checked>' . esc_attr( $term->name ) . '</li>';
|
343 |
+
} else {
|
344 |
+
echo '<li class="', esc_attr( $field['class'] ),'"><input class="', esc_attr( $field['class'] ),'" type="radio" name="', esc_attr( $field['id'] ), '" value="' . $term->slug . ' ' , $meta == $term->slug ? esc_attr( $meta ) : ' ' ,' ">' . esc_attr( $term->name ) . '</li>';
|
345 |
+
}
|
346 |
+
}
|
347 |
+
echo '</ul>';
|
348 |
+
echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
|
349 |
+
break;
|
350 |
+
case 'taxonomy_multicheck':
|
351 |
+
echo '<ul>';
|
352 |
+
$names = wp_get_object_terms( $post->ID, $field['taxonomy'] );
|
353 |
+
$terms = get_terms( $field['taxonomy'], 'hide_empty=0' );
|
354 |
+
foreach ( $terms as $term ) {
|
355 |
+
echo '<li><input class="', esc_attr( $field['class'] ),'" type="checkbox" name="', esc_attr( $field['id'] ), '[]" id="', esc_attr( $field['id'] ), '" value="', esc_attr( $term->name ) , '"';
|
356 |
+
foreach ( $names as $name ) {
|
357 |
+
if ( $term->slug == $name->slug ) {
|
358 |
+
echo ' checked="checked" ';
|
359 |
+
};
|
360 |
+
}
|
361 |
+
echo ' /><label>', esc_attr( $term->name ) , '</label></li>';
|
362 |
+
}
|
363 |
+
echo '</ul>';
|
364 |
+
echo '<span class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</span>';
|
365 |
+
break;
|
366 |
+
case 'file_list':
|
367 |
+
echo '<input class="bsf_upload_file ', esc_attr( $field['class'] ),'" type="text" size="36" name="', esc_attr( $field['id'] ), '" value="" />';
|
368 |
+
echo '<input class="bsf_upload_button button ', esc_attr( $field['class'] ),'" type="button" value="Upload File" />';
|
369 |
+
echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
|
370 |
+
$args = array(
|
371 |
+
'post_type' => 'attachment',
|
372 |
+
'numberposts' => null,
|
373 |
+
'post_status' => null,
|
374 |
+
'post_parent' => $post->ID,
|
375 |
+
);
|
376 |
+
$attachments = get_posts( $args );
|
377 |
+
if ( $attachments ) {
|
378 |
+
echo '<ul class="attach_list">';
|
379 |
+
foreach ( $attachments as $attachment ) {
|
380 |
+
echo '<li>' . wp_get_attachment_link( $attachment->ID, 'thumbnail', 0, 0, 'Download' );
|
381 |
+
echo '<span>';
|
382 |
+
echo apply_filters( 'the_title', ' ' . $attachment->post_title ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
383 |
+
echo '</span></li>';
|
384 |
+
}
|
385 |
+
echo '</ul>';
|
386 |
+
}
|
387 |
+
break;
|
388 |
+
case 'file':
|
389 |
+
$input_type_url = 'hidden';
|
390 |
+
if ( 'url' == $field['allow'] || ( is_array( $field['allow'] ) && in_array( 'url', $field['allow'] ) ) ) {
|
391 |
+
$input_type_url = 'text';
|
392 |
+
}
|
393 |
+
echo '<input class="bsf_upload_file ', esc_attr( $field['class'] ),' ' . esc_attr( $field['id'] ) . '" type="' . esc_attr( $input_type_url ) . '" size="45" id="', esc_attr( $field['id'] ), '" name="', esc_attr( $field['id'] ), '" value="', esc_attr( $meta ), '" />';
|
394 |
+
echo '<input class="bsf_upload_button button ', esc_attr( $field['class'] ),'" id="', esc_attr( $field['id'] ), '_id" type="button" value="Upload File" />';
|
395 |
+
echo '<input class="bsf_upload_file_id ', esc_attr( $field['class'] ),'" type="hidden" id="',esc_attr( $field['id'] ), '" name="', esc_attr( $field['id'] ), '_id" value="', esc_attr( get_post_meta( $post->ID, $field['id'] . '_id', true ) ), '" />';
|
396 |
+
echo '<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', wp_kses_post( $field['desc'] ), '</p>';
|
397 |
+
echo '<div id="', esc_attr( $field['id'] ), '_status" class="bsf_media_status ', esc_attr( $field['class'] ),'">';
|
398 |
+
if ( '' != $meta ) {
|
399 |
+
$check_image = preg_match( '/(^.*\.jpg|jpeg|png|gif|ico*)/i', $meta );
|
400 |
+
if ( $check_image ) {
|
401 |
+
echo '<div class="img_status">';
|
402 |
+
echo '<img src="', esc_attr( $meta ), '" alt="" />';
|
403 |
+
echo '<a href="#" class="bsf_remove_file_button ', esc_attr( $field['class'] ),'" rel="', esc_attr( $field['id'] ), '">Remove Image</a>';
|
404 |
+
echo '</div>';
|
405 |
+
} else {
|
406 |
+
$parts = explode( '/', $meta );
|
407 |
+
$parts_count = count( $parts );
|
408 |
+
for ( $i = 0; $i < $parts_count; ++$i ) {
|
409 |
+
$title = $parts[ $i ];
|
410 |
+
}
|
411 |
+
echo 'File: <strong>', esc_attr( $title ), '</strong> (<a href="', esc_attr( $meta ), '" target="_blank" rel="external">Download</a> / <a href="#" class="bsf_remove_file_button" rel="', esc_attr( $field['id'] ), '">Remove</a>)';
|
412 |
+
}
|
413 |
+
}
|
414 |
+
echo '</div>';
|
415 |
+
break;
|
416 |
+
case 'oembed':
|
417 |
+
echo '<input class="bsf_oembed ', esc_attr( $field['class'] ),'" type="text" name="', esc_attr( $field['id'] ), '" id="', esc_attr( $field['id'] ), '" value="', '' !== $meta ? esc_attr( $meta ) : esc_attr( $field['std'] ), '" />','<p class="bsf_metabox_description ', esc_attr( $field['class'] ),'">', esc_attr( $field['desc'] ), '</p>';
|
418 |
+
echo '<p class="bsf-spinner spinner ', esc_attr( $field['class'] ),'"></p>';
|
419 |
+
echo '<div id="', esc_attr( $field['id'] ), '_status" class="bsf_media_status ui-helper-clearfix embed_wrap ', esc_attr( $field['class'] ),'">';
|
420 |
+
if ( '' != $meta ) {
|
421 |
+
$check_embed = $GLOBALS['wp_embed']->run_shortcode( '[embed]' . esc_url( $meta ) . '[/embed]' );
|
422 |
+
if ( $check_embed ) {
|
423 |
+
echo '<div class="embed_status ', esc_attr( $field['class'] ),'">';
|
424 |
+
echo esc_html( $check_embed );
|
425 |
+
echo '<a href="#" class="bsf_remove_file_button ', esc_attr( $field['class'] ),'" rel="', esc_attr( $field['id'] ), '">Remove Embed</a>';
|
426 |
+
echo '</div>';
|
427 |
+
} else {
|
428 |
+
echo 'URL is not a valid oEmbed URL.';
|
429 |
+
}
|
430 |
+
}
|
431 |
+
echo '</div>';
|
432 |
+
break;
|
433 |
+
default:
|
434 |
+
do_action( 'bsf_render_' . $field['type'], $field, $meta );
|
435 |
+
}
|
436 |
+
echo '</td>','</tr>';
|
437 |
+
}
|
438 |
+
echo '<td></td>','<td class="bsf-table-data"><div class="bsf-tooltip"><span class="dashicons dashicons-info"></span><span class="bsf-tooltiptext">Don't want Schema data to be visible on your site's frontend? <a href="https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_medium=editpage" target="_blank">Use Schema Pro</span></a></div></td>';
|
439 |
+
echo '</table>';
|
440 |
+
}
|
441 |
+
/**
|
442 |
+
* Save data from metabox.
|
443 |
+
*
|
444 |
+
* @param string $post_id Post ID.
|
445 |
+
*/
|
446 |
+
public function save( $post_id ) {
|
447 |
+
// verify nonce.
|
448 |
+
if ( ! isset( $_POST['wp_meta_box_nonce'] ) || ! wp_verify_nonce( esc_attr( $_POST['wp_meta_box_nonce'] ), basename( __FILE__ ) ) ) {
|
449 |
+
return $post_id;
|
450 |
+
}
|
451 |
+
// check autosave.
|
452 |
+
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
|
453 |
+
return $post_id;
|
454 |
+
}
|
455 |
+
// check permissions.
|
456 |
+
if ( 'page' == esc_attr( $_POST['post_type'] ) ) {
|
457 |
+
if ( ! current_user_can( 'edit_page', $post_id ) ) {
|
458 |
+
return $post_id;
|
459 |
+
}
|
460 |
+
} elseif ( ! current_user_can( 'edit_post', $post_id ) ) {
|
461 |
+
return $post_id;
|
462 |
+
}
|
463 |
+
foreach ( $this->_meta_box['fields'] as $field ) {
|
464 |
+
$name = esc_attr( $field['id'] );
|
465 |
+
if ( ! isset( $field['multiple'] ) ) {
|
466 |
+
$field['multiple'] = ( 'multicheck' == $field['type'] ) ? true : false;
|
467 |
+
}
|
468 |
+
$old = get_post_meta( $post_id, $name, ! $field['multiple'] /* If multicheck this can be multiple values */ );
|
469 |
+
$new = isset( $_POST[ esc_attr( $field['id'] ) ] ) ? esc_attr( $_POST[ esc_attr( $field['id'] ) ] ) : null;
|
470 |
+
if ( in_array( $field['type'], array( 'taxonomy_select', 'taxonomy_radio', 'taxonomy_multicheck' ) ) ) {
|
471 |
+
$new = wp_set_object_terms( $post_id, $new, $field['taxonomy'] );
|
472 |
+
}
|
473 |
+
if ( ( 'textarea' == $field['type'] ) || ( 'textarea_small' == $field['type'] ) ) {
|
474 |
+
$new = htmlspecialchars( $new ); //phpcs:ignore:PHPCompatibility.ParameterValues.NewHTMLEntitiesEncodingDefault.NotSet
|
475 |
+
}
|
476 |
+
if ( ( 'textarea_code' == $field['type'] ) ) {
|
477 |
+
$new = htmlspecialchars_decode( $new );
|
478 |
+
}
|
479 |
+
if ( 'text_date_timestamp' == $field['type'] ) {
|
480 |
+
$new = strtotime( $new );
|
481 |
+
}
|
482 |
+
if ( 'text_datetime_timestamp' == $field['type'] ) {
|
483 |
+
$string = $new['date'] . ' ' . $new['time'];
|
484 |
+
$new = strtotime( $string );
|
485 |
+
}
|
486 |
+
$new = apply_filters( 'bsf_validate_' . $field['type'], $new, $post_id, $field );
|
487 |
+
// validate meta value.
|
488 |
+
if ( isset( $field['validate_func'] ) ) {
|
489 |
+
$ok = call_user_func( array( 'Bsf_Meta_Box_Validate', $field['validate_func'] ), $new );
|
490 |
+
if ( false === $ok ) { // pass away when meta value is invalid.
|
491 |
+
continue;
|
492 |
+
}
|
493 |
+
} elseif ( $field['multiple'] ) {
|
494 |
+
delete_post_meta( $post_id, $name );
|
495 |
+
if ( ! empty( $new ) ) {
|
496 |
+
foreach ( $new as $add_new ) {
|
497 |
+
add_post_meta( $post_id, $name, $add_new, false );
|
498 |
+
}
|
499 |
+
}
|
500 |
+
} elseif ( '' !== $new && $new != $old ) {
|
501 |
+
update_post_meta( $post_id, $name, $new );
|
502 |
+
} elseif ( '' == $new ) {
|
503 |
+
delete_post_meta( $post_id, $name );
|
504 |
+
}
|
505 |
+
if ( 'file' == $field['type'] ) {
|
506 |
+
$name = esc_attr( $field['id'] ) . '_id';
|
507 |
+
$old = get_post_meta( $post_id, $name, ! $field['multiple'] /* If multicheck this can be multiple values */ );
|
508 |
+
if ( isset( $field['save_id'] ) && $field['save_id'] ) {
|
509 |
+
$new = isset( $_POST[ $name ] ) ? esc_attr( $_POST[ $name ] ) : null;
|
510 |
+
} else {
|
511 |
+
$new = '';
|
512 |
+
}
|
513 |
+
if ( $new && $new != $old ) {
|
514 |
+
update_post_meta( $post_id, $name, $new );
|
515 |
+
} elseif ( '' == $new && $old ) {
|
516 |
+
delete_post_meta( $post_id, $name, $old );
|
517 |
+
}
|
518 |
+
}
|
519 |
+
}
|
520 |
+
}
|
521 |
+
}
|
522 |
+
/**
|
523 |
+
* Adding scripts and styles
|
524 |
+
*
|
525 |
+
* @param string $hook Hook.
|
526 |
+
*/
|
527 |
+
function bsf_scripts( $hook ) {
|
528 |
+
global $wp_version;
|
529 |
+
// only enqueue our scripts/styles on the proper pages.
|
530 |
+
if ( 'post.php' == $hook || 'post-new.php' == $hook || 'page-new.php' == $hook || 'page.php' == $hook ) {
|
531 |
+
// scripts required for cmb.
|
532 |
+
$bsf_script_array = array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker', 'media-upload', 'thickbox' );
|
533 |
+
// styles required for cmb.
|
534 |
+
$bsf_style_array = array( 'thickbox' );
|
535 |
+
// if we're 3.5 or later, user wp-color-picker.
|
536 |
+
if ( 3.5 <= $wp_version ) {
|
537 |
+
$bsf_script_array[] = 'wp-color-picker';
|
538 |
+
$bsf_style_array[] = 'wp-color-picker';
|
539 |
+
} else {
|
540 |
+
// otherwise use the older 'farbtastic'.
|
541 |
+
$bsf_script_array[] = 'farbtastic';
|
542 |
+
$bsf_style_array[] = 'farbtastic';
|
543 |
+
}
|
544 |
+
wp_register_script( 'bsf-timepicker', BSF_META_BOX_URL . 'js/jquery.timePicker.min.js', false ); //phpcs:ignore:WordPress.WP.EnqueuedResourceParameters.MissingVersion
|
545 |
+
wp_register_script( 'bsf-scripts', BSF_META_BOX_URL . 'js/cmb.js', $bsf_script_array, '0.9.1', false );
|
546 |
+
wp_localize_script(
|
547 |
+
'bsf-scripts',
|
548 |
+
'bsf_ajax_data',
|
549 |
+
array(
|
550 |
+
'ajax_nonce' => wp_create_nonce( 'ajax_nonce' ),
|
551 |
+
'post_id' => get_the_ID(),
|
552 |
+
)
|
553 |
+
);
|
554 |
+
wp_enqueue_script( 'bsf-timepicker' );
|
555 |
+
wp_enqueue_script( 'bsf-scripts' );
|
556 |
+
wp_register_style( 'bsf-styles', BSF_META_BOX_URL . 'admin/css/style.css', $bsf_style_array ); //phpcs:ignore:WordPress.WP.EnqueuedResourceParameters.MissingVersion
|
557 |
+
wp_enqueue_style( 'bsf-styles' );
|
558 |
+
}
|
559 |
+
}
|
560 |
+
add_action( 'admin_enqueue_scripts', 'bsf_scripts', 10 );
|
561 |
+
/**
|
562 |
+
* Bsf_editor_footer_scripts.
|
563 |
+
*/
|
564 |
+
function bsf_editor_footer_scripts() { ?>
|
565 |
+
<?php
|
566 |
+
if ( isset( $_GET['bsf_force_send'] ) && isset( $_GET['bsf_file_upload_nonce'] ) && wp_verify_nonce( $_GET['bsf_file_upload_nonce'], 'ajax_nonce' ) && 'true' == esc_attr( $_GET['bsf_force_send'] ) ) {
|
567 |
+
$label = esc_attr( $_GET['bsf_send_label'] );
|
568 |
+
if ( empty( $label ) ) {
|
569 |
+
$label = 'Select File';
|
570 |
+
}
|
571 |
+
?>
|
572 |
+
<script type="text/javascript">
|
573 |
+
jQuery(function($) {
|
574 |
+
$('td.savesend input').val('<?php echo esc_attr( $label ); ?>');
|
575 |
+
});
|
576 |
+
</script>
|
577 |
+
<?php
|
578 |
+
}
|
579 |
+
}
|
580 |
+
add_action( 'admin_print_footer_scripts', 'bsf_editor_footer_scripts', 99 );
|
581 |
+
// Force 'Insert into Post' button from Media Library.
|
582 |
+
add_filter( 'get_media_item_args', 'bsf_force_send' );
|
583 |
+
/**
|
584 |
+
* Bsf_force_send.
|
585 |
+
*
|
586 |
+
* @param array $args Arguments.
|
587 |
+
*/
|
588 |
+
function bsf_force_send( $args ) {
|
589 |
+
|
590 |
+
if ( ! isset( $_GET['bsf_file_upload_nonce'] ) || ! wp_verify_nonce( $_GET['bsf_file_upload_nonce'], 'ajax_nonce' ) ) {
|
591 |
+
return;
|
592 |
+
}
|
593 |
+
// if the Gallery tab is opened from a custom meta box field, add Insert Into Post button.
|
594 |
+
if ( isset( $_GET['bsf_force_send'] ) && 'true' == esc_attr( $_GET['bsf_force_send'] ) ) {
|
595 |
+
$args['send'] = true;
|
596 |
+
}
|
597 |
+
// if the From Computer tab is opened AT ALL, add Insert Into Post button after an image is uploaded.
|
598 |
+
if ( isset( $_POST['attachment_id'] ) && '' != esc_attr( $_POST['attachment_id'] ) ) {
|
599 |
+
$args['send'] = true;
|
600 |
+
// TO DO: Are there any conditions in which we don't want the Insert Into Post.
|
601 |
+
// button added? For example, if a post type supports thumbnails, does not support.
|
602 |
+
// the editor, and does not have any cmb file inputs? If so, here's the first.
|
603 |
+
// bits of code needed to check all that.
|
604 |
+
// $attachment_ancestors = get_post_ancestors( $_POST["attachment_id"] );.
|
605 |
+
// $attachment_parent_post_type = get_post_type( $attachment_ancestors[0] );.
|
606 |
+
// $post_type_object = get_post_type_object( $attachment_parent_post_type );.
|
607 |
+
}
|
608 |
+
// change the label of the button on the From Computer tab.
|
609 |
+
if ( isset( $_POST['attachment_id'] ) && '' != esc_attr( $_POST['attachment_id'] ) ) {
|
610 |
+
echo '
|
611 |
+
<script type="text/javascript">
|
612 |
+
function cmbGetParameterByNameInline(name) {
|
613 |
+
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
|
614 |
+
var regexS = "[\\?&]" + name + "=([^&#]*)";
|
615 |
+
var regex = new RegExp(regexS);
|
616 |
+
var results = regex.exec(window.location.href);
|
617 |
+
if(results == null)
|
618 |
+
return "";
|
619 |
+
else
|
620 |
+
return decodeURIComponent(results[1].replace(/\+/g, " "));
|
621 |
+
}
|
622 |
+
jQuery(function($) {
|
623 |
+
if (cmbGetParameterByNameInline("bsf_force_send")=="true") {
|
624 |
+
var bsf_send_label = cmbGetParameterByNameInline("bsf_send_label");
|
625 |
+
$("td.savesend input").val(bsf_send_label);
|
626 |
+
}
|
627 |
+
});
|
628 |
+
</script>
|
629 |
+
';
|
630 |
+
}
|
631 |
+
return $args;
|
632 |
+
}
|
633 |
+
add_action( 'wp_ajax_bsf_oembed_handler', 'bsf_oembed_ajax_results' );
|
634 |
+
/**
|
635 |
+
* Handles our oEmbed ajax request.
|
636 |
+
*/
|
637 |
+
function bsf_oembed_ajax_results() {
|
638 |
+
// verify our nonce.
|
639 |
+
if ( ! ( isset( $_REQUEST['bsf_ajax_nonce'], $_REQUEST['oembed_url'] ) && wp_verify_nonce( $_REQUEST['bsf_ajax_nonce'], 'ajax_nonce' ) ) ) {
|
640 |
+
die();
|
641 |
+
}
|
642 |
+
// sanitize our search string.
|
643 |
+
$oembed_string = sanitize_text_field( $_REQUEST['oembed_url'] );
|
644 |
+
if ( empty( $oembed_string ) ) {
|
645 |
+
$return = '<p class="ui-state-error-text">' . __( 'Please Try Again', 'all-in-one-schemaorg-rich-snippets' ) . '</p>';
|
646 |
+
$found = 'not found';
|
647 |
+
} else {
|
648 |
+
global $wp_embed;
|
649 |
+
$oembed_url = esc_url( $oembed_string );
|
650 |
+
// Post ID is needed to check for embeds.
|
651 |
+
if ( isset( $_REQUEST['post_id'] ) ) {
|
652 |
+
$GLOBALS['post'] = get_post( esc_attr( $_REQUEST['post_id'] ) ); //phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited
|
653 |
+
}
|
654 |
+
// ping WordPress for an embed.
|
655 |
+
$check_embed = $wp_embed->run_shortcode( '[embed]' . $oembed_url . '[/embed]' );
|
656 |
+
// fallback that WordPress creates when no oEmbed was found.
|
657 |
+
$fallback = $wp_embed->maybe_make_link( $oembed_url );
|
658 |
+
if ( $check_embed && $check_embed != $fallback ) {
|
659 |
+
// Embed data.
|
660 |
+
$return = '<div class="embed_status">' . $check_embed . '<a href="#" class="bsf_remove_file_button" rel="' . esc_attr( $_REQUEST['field_id'] ) . '">' . __( 'Remove Embed', 'all-in-one-schemaorg-rich-snippets' ) . '</a></div>';
|
661 |
+
// set our response id.
|
662 |
+
$found = 'found';
|
663 |
+
} else {
|
664 |
+
// error info when no oEmbeds were found.
|
665 |
+
/* translators: %s: $fallback */
|
666 |
+
$return = '<p class="ui-state-error-text">' . sprintf( __( 'No oEmbed Results Found for %s. View more info at', 'all-in-one-schemaorg-rich-snippets' ), $fallback ) . ' <a href="http://codex.wordpress.org/Embeds" target="_blank">codex.wordpress.org/Embeds</a>.</p>';
|
667 |
+
// set our response id.
|
668 |
+
$found = 'not found';
|
669 |
+
}
|
670 |
+
}
|
671 |
+
// send back our encoded data.
|
672 |
+
echo wp_json_encode(
|
673 |
+
array(
|
674 |
+
'result' => $return,
|
675 |
+
'id' => $found,
|
676 |
+
)
|
677 |
+
);
|
678 |
+
die();
|
679 |
+
}
|
680 |
+
// End. That's it, folks! //.
|
681 |
+
?>
|
js/cmb.js
CHANGED
@@ -67,11 +67,12 @@
|
|
67 |
formfield = $(this).attr('name');
|
68 |
$('#' + formfield + '_id').val("");
|
69 |
});
|
|
|
70 |
$('.bsf_upload_button').live('click', function () {
|
71 |
var buttonLabel;
|
72 |
formfield = $(this).prev('input').attr('name');
|
73 |
buttonLabel = 'Use as ' + $('label[for=' + formfield + ']').text();
|
74 |
-
tb_show('', 'media-upload.php?post_id=' + $('#post_ID').val() + '&type=file&bsf_force_send=true&bsf_send_label=' + buttonLabel + '&TB_iframe=true');
|
75 |
return false;
|
76 |
});
|
77 |
$('.bsf_remove_file_button').live('click', function () {
|
@@ -125,6 +126,6 @@
|
|
125 |
CMBMeta.TimePicker();
|
126 |
CMBMeta.DatePicker();
|
127 |
CMBMeta.ColorPicker();
|
128 |
-
//
|
129 |
});
|
130 |
}(jQuery));
|
67 |
formfield = $(this).attr('name');
|
68 |
$('#' + formfield + '_id').val("");
|
69 |
});
|
70 |
+
|
71 |
$('.bsf_upload_button').live('click', function () {
|
72 |
var buttonLabel;
|
73 |
formfield = $(this).prev('input').attr('name');
|
74 |
buttonLabel = 'Use as ' + $('label[for=' + formfield + ']').text();
|
75 |
+
tb_show('', 'media-upload.php?post_id=' + $('#post_ID').val() + '&type=file&bsf_force_send=true&bsf_send_label=' + buttonLabel + '&TB_iframe=true&bsf_file_upload_nonce=' + bsf_ajax_data.ajax_nonce );
|
76 |
return false;
|
77 |
});
|
78 |
$('.bsf_remove_file_button').live('click', function () {
|
126 |
CMBMeta.TimePicker();
|
127 |
CMBMeta.DatePicker();
|
128 |
CMBMeta.ColorPicker();
|
129 |
+
// CMBMeta.FileUpload();
|
130 |
});
|
131 |
}(jQuery));
|
languages/all-in-one-schemaorg-rich-snippets.pot
ADDED
@@ -0,0 +1,1455 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2020 Brainstorm Force
|
2 |
+
# This file is distributed under the GPL2.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Schema - All In One Schema Rich Snippets 1.6.0\n"
|
6 |
+
"Report-Msgid-Bugs-To: "
|
7 |
+
"https://wordpress.org/support/plugin/all-in-one-schemaorg-rich-snippets\n"
|
8 |
+
"POT-Creation-Date: 2020-02-27 06:43:26+00:00\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"PO-Revision-Date: 2020-MO-DA HO:MI+ZONE\n"
|
13 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
+
"Language: en\n"
|
16 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
17 |
+
"X-Poedit-Country: United States\n"
|
18 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
19 |
+
"X-Poedit-KeywordsList: "
|
20 |
+
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
|
21 |
+
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
|
22 |
+
"X-Poedit-Basepath: ../\n"
|
23 |
+
"X-Poedit-SearchPath-0: .\n"
|
24 |
+
"X-Poedit-Bookmarks: \n"
|
25 |
+
"X-Textdomain-Support: yes\n"
|
26 |
+
"X-Generator: grunt-wp-i18n 1.0.3\n"
|
27 |
+
|
28 |
+
#: admin/index.php:88
|
29 |
+
msgid "All in One Schema.org Rich Snippets - Dashboard"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: admin/index.php:93
|
33 |
+
msgid "Configuration"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: admin/index.php:94
|
37 |
+
msgid "Customization"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: admin/index.php:96
|
41 |
+
msgid "FAQs"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: admin/index.php:97
|
45 |
+
msgid "Getting Started"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: admin/index.php:104
|
49 |
+
msgid ""
|
50 |
+
"Choose the schema markup and update the strings you want to display on the "
|
51 |
+
"front-end."
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: admin/index.php:110 meta-boxes.php:56
|
55 |
+
msgid "Item Review"
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
#: admin/index.php:113
|
59 |
+
msgid ""
|
60 |
+
"Strings to be displayed on frontend for <strong>Item Review Rich Snippets "
|
61 |
+
"—</strong>"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: admin/index.php:120 admin/index.php:162 admin/index.php:212
|
65 |
+
#: admin/index.php:262 admin/index.php:312 admin/index.php:370
|
66 |
+
#: admin/index.php:422 admin/index.php:464 admin/index.php:514
|
67 |
+
msgid "Rich Snippet Title :"
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#: admin/index.php:124
|
71 |
+
msgid "Reviewer :"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: admin/index.php:128
|
75 |
+
msgid "Review Date :"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: admin/index.php:132
|
79 |
+
msgid "Item Name :"
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: admin/index.php:136
|
83 |
+
msgid "Item Ratings :"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: admin/index.php:142 admin/index.php:192 admin/index.php:242
|
87 |
+
#: admin/index.php:292 admin/index.php:350 admin/index.php:400
|
88 |
+
#: admin/index.php:444 admin/index.php:494 admin/index.php:552
|
89 |
+
#: admin/index.php:878
|
90 |
+
msgid "Update "
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: admin/index.php:142 admin/index.php:192 admin/index.php:242
|
94 |
+
#: admin/index.php:292 admin/index.php:350 admin/index.php:400
|
95 |
+
#: admin/index.php:444 admin/index.php:494 admin/index.php:552
|
96 |
+
#: admin/index.php:842
|
97 |
+
msgid "Reset "
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
#: admin/index.php:152
|
101 |
+
msgid "Events"
|
102 |
+
msgstr ""
|
103 |
+
|
104 |
+
#: admin/index.php:155
|
105 |
+
msgid ""
|
106 |
+
"Strings to be displayed on frontend for <strong>Events Rich Snippets "
|
107 |
+
"—</strong>"
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: admin/index.php:166
|
111 |
+
msgid "Event Title :"
|
112 |
+
msgstr ""
|
113 |
+
|
114 |
+
#: admin/index.php:170
|
115 |
+
msgid "Event Location :"
|
116 |
+
msgstr ""
|
117 |
+
|
118 |
+
#: admin/index.php:174
|
119 |
+
msgid "Start Time :"
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
+
#: admin/index.php:178
|
123 |
+
msgid "End Time :"
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
#: admin/index.php:182 admin/index.php:340 admin/index.php:430
|
127 |
+
#: admin/index.php:476 admin/index.php:526
|
128 |
+
msgid "Description :"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: admin/index.php:186
|
132 |
+
msgid "Ticket Promotion :"
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: admin/index.php:202 meta-boxes.php:64
|
136 |
+
msgid "Person"
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: admin/index.php:205
|
140 |
+
msgid ""
|
141 |
+
"Strings to be displayed on frontend for <strong>Person's Rich Snippets "
|
142 |
+
"—</strong>"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: admin/index.php:216
|
146 |
+
msgid "Person's Name :"
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: admin/index.php:220
|
150 |
+
msgid "Nick Name :"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: admin/index.php:224
|
154 |
+
msgid "Job Title :"
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
#: admin/index.php:228
|
158 |
+
msgid "Home page :"
|
159 |
+
msgstr ""
|
160 |
+
|
161 |
+
#: admin/index.php:232
|
162 |
+
msgid "Company Name :"
|
163 |
+
msgstr ""
|
164 |
+
|
165 |
+
#: admin/index.php:236
|
166 |
+
msgid "Address :"
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
#: admin/index.php:252 meta-boxes.php:68 meta-boxes.php:132
|
170 |
+
msgid "Product"
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#: admin/index.php:255
|
174 |
+
msgid ""
|
175 |
+
"Strings to be displayed on frontend for <strong>Product Rich Snippets "
|
176 |
+
"—</strong>"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: admin/index.php:266 admin/index.php:374
|
180 |
+
msgid "Author Rating :"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: admin/index.php:270
|
184 |
+
msgid "Brand Name :"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: admin/index.php:274
|
188 |
+
msgid "Product Name :"
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#: admin/index.php:278 admin/index.php:378
|
192 |
+
msgid "User Rating :"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: admin/index.php:282
|
196 |
+
msgid "Price :"
|
197 |
+
msgstr ""
|
198 |
+
|
199 |
+
#: admin/index.php:286
|
200 |
+
msgid "Product Availability :"
|
201 |
+
msgstr ""
|
202 |
+
|
203 |
+
#: admin/index.php:302 meta-boxes.php:72 meta-boxes.php:136
|
204 |
+
msgid "Recipe"
|
205 |
+
msgstr ""
|
206 |
+
|
207 |
+
#: admin/index.php:305
|
208 |
+
msgid ""
|
209 |
+
"Strings to be displayed on frontend for <strong>Recipe Rich Snippets "
|
210 |
+
"—</strong>"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: admin/index.php:316
|
214 |
+
msgid "Recipe Name :"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: admin/index.php:320
|
218 |
+
msgid "Author Name :"
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: admin/index.php:324
|
222 |
+
msgid "Published On : "
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: admin/index.php:328
|
226 |
+
msgid "Preparation Time:"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: admin/index.php:332
|
230 |
+
msgid "Cook Time :"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: admin/index.php:336
|
234 |
+
msgid "Total Time :"
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: admin/index.php:344
|
238 |
+
msgid "Average Rating:"
|
239 |
+
msgstr ""
|
240 |
+
|
241 |
+
#: admin/index.php:360 meta-boxes.php:76 meta-boxes.php:140
|
242 |
+
msgid "Software Application"
|
243 |
+
msgstr ""
|
244 |
+
|
245 |
+
#: admin/index.php:363
|
246 |
+
msgid ""
|
247 |
+
"Strings to be displayed on frontend for <strong>Software Application Rich "
|
248 |
+
"Snippets —</strong>"
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: admin/index.php:382
|
252 |
+
msgid "Software Price :"
|
253 |
+
msgstr ""
|
254 |
+
|
255 |
+
#: admin/index.php:386
|
256 |
+
msgid "Software Name:"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: admin/index.php:390
|
260 |
+
msgid "Operating System :"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: admin/index.php:394
|
264 |
+
msgid "Landing Page:"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: admin/index.php:412 meta-boxes.php:80 meta-boxes.php:144 meta-boxes.php:883
|
268 |
+
msgid "Video"
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: admin/index.php:415
|
272 |
+
msgid ""
|
273 |
+
"Strings to be displayed on frontend for <strong>Video Rich Snippets "
|
274 |
+
"—</strong>"
|
275 |
+
msgstr ""
|
276 |
+
|
277 |
+
#: admin/index.php:426
|
278 |
+
msgid "Video Title :"
|
279 |
+
msgstr ""
|
280 |
+
|
281 |
+
#: admin/index.php:434
|
282 |
+
msgid "Video Duration :"
|
283 |
+
msgstr ""
|
284 |
+
|
285 |
+
#: admin/index.php:438
|
286 |
+
msgid "Video Upload Date :"
|
287 |
+
msgstr ""
|
288 |
+
|
289 |
+
#: admin/index.php:454 meta-boxes.php:84
|
290 |
+
msgid "Article"
|
291 |
+
msgstr ""
|
292 |
+
|
293 |
+
#: admin/index.php:457
|
294 |
+
msgid ""
|
295 |
+
"Strings to be displayed on frontend for <strong>Article Rich Snippets "
|
296 |
+
"—</strong>"
|
297 |
+
msgstr ""
|
298 |
+
|
299 |
+
#: admin/index.php:468
|
300 |
+
msgid "Article Name :"
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: admin/index.php:472
|
304 |
+
msgid "Author :"
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: admin/index.php:480
|
308 |
+
msgid "Image :"
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: admin/index.php:484
|
312 |
+
msgid "Publisher :"
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: admin/index.php:488
|
316 |
+
msgid "Publisher Logo :"
|
317 |
+
msgstr ""
|
318 |
+
|
319 |
+
#: admin/index.php:504 meta-boxes.php:88
|
320 |
+
msgid "Service"
|
321 |
+
msgstr ""
|
322 |
+
|
323 |
+
#: admin/index.php:507
|
324 |
+
msgid ""
|
325 |
+
"Strings to be displayed on frontend for <strong>Service Rich Snippets "
|
326 |
+
"—</strong>"
|
327 |
+
msgstr ""
|
328 |
+
|
329 |
+
#: admin/index.php:518
|
330 |
+
msgid "Service Type :"
|
331 |
+
msgstr ""
|
332 |
+
|
333 |
+
#: admin/index.php:522
|
334 |
+
msgid "Area :"
|
335 |
+
msgstr ""
|
336 |
+
|
337 |
+
#: admin/index.php:530
|
338 |
+
msgid "Provider Name :"
|
339 |
+
msgstr ""
|
340 |
+
|
341 |
+
#: admin/index.php:534
|
342 |
+
msgid "Provider Location :"
|
343 |
+
msgstr ""
|
344 |
+
|
345 |
+
#: admin/index.php:538
|
346 |
+
msgid "URL :"
|
347 |
+
msgstr ""
|
348 |
+
|
349 |
+
#: admin/index.php:542
|
350 |
+
msgid "URL Text :"
|
351 |
+
msgstr ""
|
352 |
+
|
353 |
+
#: admin/index.php:546
|
354 |
+
msgid "Service Rating :"
|
355 |
+
msgstr ""
|
356 |
+
|
357 |
+
#: admin/index.php:564
|
358 |
+
msgid ""
|
359 |
+
"Need some more schema types with automation to implement schema markup? Get "
|
360 |
+
"the latest and premium schema markup plugin to automate the process of "
|
361 |
+
"adding schema markup on your entire website. <br><a "
|
362 |
+
"href='https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_"
|
363 |
+
"medium=configure' target='_blank'> Know more about Schema Pro.</a>"
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: admin/index.php:576
|
367 |
+
msgid "Welcome to All In One Schema Rich Snippets"
|
368 |
+
msgstr ""
|
369 |
+
|
370 |
+
#: admin/index.php:607
|
371 |
+
msgid "How it works"
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: admin/index.php:610
|
375 |
+
msgid "Configure The Settings"
|
376 |
+
msgstr ""
|
377 |
+
|
378 |
+
#: admin/index.php:611
|
379 |
+
msgid ""
|
380 |
+
"Go to the “Rich Snippets” option in your WordPress dashboard. Under the "
|
381 |
+
"Configuration tab, select your desired schema type and update the strings "
|
382 |
+
"you want to display on the front-end. You can use the Customization tab to "
|
383 |
+
"manage how your rich snippet content box will look."
|
384 |
+
msgstr ""
|
385 |
+
|
386 |
+
#: admin/index.php:612
|
387 |
+
msgid "Add Markup To Pages"
|
388 |
+
msgstr ""
|
389 |
+
|
390 |
+
#: admin/index.php:612
|
391 |
+
msgid ""
|
392 |
+
"Edit the posts or pages where you wish to add rich snippets and scroll down "
|
393 |
+
"to the “Configure Rich Snippet” meta box to add schema markup."
|
394 |
+
msgstr ""
|
395 |
+
|
396 |
+
#: admin/index.php:613
|
397 |
+
msgid "Test Your Rich Snippets"
|
398 |
+
msgstr ""
|
399 |
+
|
400 |
+
#: admin/index.php:613
|
401 |
+
msgid ""
|
402 |
+
"Google Structured Data Testing is a widely used online tool to test "
|
403 |
+
"structured data. Open the <a "
|
404 |
+
"href='https://search.google.com/structured-data/testing-tool/u/0/' "
|
405 |
+
"target='_blank'>Google Structured Testing Tool</a> and fetch your website "
|
406 |
+
"URL to test the schema markup you’ve just implemented on your webpages."
|
407 |
+
msgstr ""
|
408 |
+
|
409 |
+
#: admin/index.php:618
|
410 |
+
msgid "Want to Automate Your Schema Markup?"
|
411 |
+
msgstr ""
|
412 |
+
|
413 |
+
#: admin/index.php:620
|
414 |
+
msgid "Consider Schema Pro"
|
415 |
+
msgstr ""
|
416 |
+
|
417 |
+
#: admin/index.php:621
|
418 |
+
msgid ""
|
419 |
+
"Schema Pro is an advanced schema markup plugin that automates the process "
|
420 |
+
"of adding schema markup on multiple pages with just a few clicks. Schema "
|
421 |
+
"Pro uses JSON-LD markup, which is the latest technology recommended by "
|
422 |
+
"Google. With it, you can kick those front-end content boxes to the curb "
|
423 |
+
"and<b> get rich snippets without displaying any new human-readable "
|
424 |
+
"content</b> on your site."
|
425 |
+
msgstr ""
|
426 |
+
|
427 |
+
#: admin/index.php:694
|
428 |
+
msgid "With Schema Pro, you can…"
|
429 |
+
msgstr ""
|
430 |
+
|
431 |
+
#: admin/index.php:704
|
432 |
+
msgid "Testimonials"
|
433 |
+
msgstr ""
|
434 |
+
|
435 |
+
#: admin/index.php:755
|
436 |
+
msgid "Where can I test my schema markup implementation?"
|
437 |
+
msgstr ""
|
438 |
+
|
439 |
+
#: admin/index.php:757
|
440 |
+
msgid ""
|
441 |
+
"You can use the standard Google Structured Data Testing Tool to test your "
|
442 |
+
"schema markup implementation. You can also take a look at the preview of "
|
443 |
+
"how your search result might look."
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: admin/index.php:762
|
447 |
+
msgid "Do I have to fill in all the details?"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: admin/index.php:764
|
451 |
+
msgid ""
|
452 |
+
"No. But, every schema type has some fields that HAVE to be filled as stated "
|
453 |
+
"by Google. Therefore, it is recommended to fill these required fields in "
|
454 |
+
"the schema markup you are implementing."
|
455 |
+
msgstr ""
|
456 |
+
|
457 |
+
#: admin/index.php:769
|
458 |
+
msgid "Why does the plugin create extra content in the frontend? Can I hide it?"
|
459 |
+
msgstr ""
|
460 |
+
|
461 |
+
#: admin/index.php:778
|
462 |
+
msgid ""
|
463 |
+
"Does the plugin work with other plugins like WordPress SEO, WooCommerce, "
|
464 |
+
"etc?"
|
465 |
+
msgstr ""
|
466 |
+
|
467 |
+
#: admin/index.php:785
|
468 |
+
msgid "How long will it take to show up rich snippets for my search results?"
|
469 |
+
msgstr ""
|
470 |
+
|
471 |
+
#: admin/index.php:794
|
472 |
+
msgid "I don't see the feature I want. How can I get it?"
|
473 |
+
msgstr ""
|
474 |
+
|
475 |
+
#: admin/index.php:796
|
476 |
+
msgid ""
|
477 |
+
"<a href='https://wpschema.com/contact/' target='_blank'>Get in touch</a> "
|
478 |
+
"with us to ask if this feature is in our development roadmap. If it is not "
|
479 |
+
"in our roadmap, and if you still think this feature would make the plugin "
|
480 |
+
"better, we have a couple of options for you:"
|
481 |
+
msgstr ""
|
482 |
+
|
483 |
+
#: admin/index.php:798
|
484 |
+
msgid ""
|
485 |
+
"Code the new feature if you are a developer and submit your code. If we "
|
486 |
+
"include this feature in our releases, credits will be given to you."
|
487 |
+
msgstr ""
|
488 |
+
|
489 |
+
#: admin/index.php:799
|
490 |
+
msgid ""
|
491 |
+
"Offer a sponsorship to get this feature done for all plugin users OR "
|
492 |
+
"request a professional customisation service."
|
493 |
+
msgstr ""
|
494 |
+
|
495 |
+
#: admin/index.php:814
|
496 |
+
msgid "<span>Customize the look and feel of rich snippet box</span>"
|
497 |
+
msgstr ""
|
498 |
+
|
499 |
+
#: admin/index.php:821
|
500 |
+
msgid "Box Background "
|
501 |
+
msgstr ""
|
502 |
+
|
503 |
+
#: admin/index.php:825
|
504 |
+
msgid "Title Background"
|
505 |
+
msgstr ""
|
506 |
+
|
507 |
+
#: admin/index.php:829
|
508 |
+
msgid "Border Color"
|
509 |
+
msgstr ""
|
510 |
+
|
511 |
+
#: admin/index.php:833
|
512 |
+
msgid "Title Color"
|
513 |
+
msgstr ""
|
514 |
+
|
515 |
+
#: admin/index.php:837
|
516 |
+
msgid "Snippet Text Color"
|
517 |
+
msgstr ""
|
518 |
+
|
519 |
+
#: admin/index.php:849
|
520 |
+
msgid ""
|
521 |
+
"Don't want to add a content box on the front-end? Get the latest and "
|
522 |
+
"premium schema markup plugin that adds Google recommended JSON-LD "
|
523 |
+
"structured data format without the content box. <a "
|
524 |
+
"href='https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_"
|
525 |
+
"medium=customize' target='_blank'> Know more about Schema Pro.</a>"
|
526 |
+
msgstr ""
|
527 |
+
|
528 |
+
#: admin/index.php:863
|
529 |
+
msgid "WooCommerce Configuration"
|
530 |
+
msgstr ""
|
531 |
+
|
532 |
+
#: admin/index.php:868
|
533 |
+
msgid ""
|
534 |
+
"WooCommerce comes with Schema.org code by default and using our plugin on "
|
535 |
+
"WooCommerce product pages does will add duplicate schema so it is not "
|
536 |
+
"recommended. If you could still like to enable our plugin on WooCommerce "
|
537 |
+
"products, please enable this option."
|
538 |
+
msgstr ""
|
539 |
+
|
540 |
+
#: admin/index.php:1073
|
541 |
+
msgid "Success! Your changes were successfully saved!"
|
542 |
+
msgstr ""
|
543 |
+
|
544 |
+
#: admin/index.php:1075
|
545 |
+
msgid "Sorry, Your changes are not saved!"
|
546 |
+
msgstr ""
|
547 |
+
|
548 |
+
#: admin/index.php:1197
|
549 |
+
msgid "Get in touch with the Plugin Developers"
|
550 |
+
msgstr ""
|
551 |
+
|
552 |
+
#: admin/index.php:1201
|
553 |
+
msgid ""
|
554 |
+
"Just fill out the form below and your message will be emailed to the Plugin "
|
555 |
+
"Developers."
|
556 |
+
msgstr ""
|
557 |
+
|
558 |
+
#: admin/index.php:1203
|
559 |
+
msgid "Your Name:"
|
560 |
+
msgstr ""
|
561 |
+
|
562 |
+
#: admin/index.php:1205
|
563 |
+
msgid "Your Email:"
|
564 |
+
msgstr ""
|
565 |
+
|
566 |
+
#: admin/index.php:1207
|
567 |
+
msgid "Reference URL:"
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: admin/index.php:1209
|
571 |
+
msgid "Subject:"
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: admin/index.php:1220
|
575 |
+
msgid "Your Query in Brief:"
|
576 |
+
msgstr ""
|
577 |
+
|
578 |
+
#: functions.php:1241
|
579 |
+
msgid "Error adding your rating"
|
580 |
+
msgstr ""
|
581 |
+
|
582 |
+
#: functions.php:1241
|
583 |
+
msgid "Ratings added successfully !"
|
584 |
+
msgstr ""
|
585 |
+
|
586 |
+
#: functions.php:1271
|
587 |
+
msgid "Error updating your rating"
|
588 |
+
msgstr ""
|
589 |
+
|
590 |
+
#: functions.php:1271
|
591 |
+
msgid "Ratings updated successfully !"
|
592 |
+
msgstr ""
|
593 |
+
|
594 |
+
#: index.php:302
|
595 |
+
msgid "Thank you!"
|
596 |
+
msgstr ""
|
597 |
+
|
598 |
+
#: index.php:302
|
599 |
+
msgid "Something went wrong!"
|
600 |
+
msgstr ""
|
601 |
+
|
602 |
+
#: index.php:331
|
603 |
+
msgid "Settings saved !"
|
604 |
+
msgstr ""
|
605 |
+
|
606 |
+
#: index.php:331
|
607 |
+
msgid "Error occured. Settings were not saved !"
|
608 |
+
msgstr ""
|
609 |
+
|
610 |
+
#: init.php:645
|
611 |
+
msgid "Please Try Again"
|
612 |
+
msgstr ""
|
613 |
+
|
614 |
+
#: init.php:660
|
615 |
+
msgid "Remove Embed"
|
616 |
+
msgstr ""
|
617 |
+
|
618 |
+
#: init.php:666
|
619 |
+
#. translators: %s: $fallback
|
620 |
+
msgid "No oEmbed Results Found for %s. View more info at"
|
621 |
+
msgstr ""
|
622 |
+
|
623 |
+
#: meta-boxes.php:38
|
624 |
+
msgid "Configure Rich Snippet"
|
625 |
+
msgstr ""
|
626 |
+
|
627 |
+
#: meta-boxes.php:52
|
628 |
+
msgid "Select what this post is about"
|
629 |
+
msgstr ""
|
630 |
+
|
631 |
+
#: meta-boxes.php:60 meta-boxes.php:128 settings.php:28
|
632 |
+
msgid "Event"
|
633 |
+
msgstr ""
|
634 |
+
|
635 |
+
#: meta-boxes.php:96
|
636 |
+
msgid "Rich Snippets - Item Review"
|
637 |
+
msgstr ""
|
638 |
+
|
639 |
+
#: meta-boxes.php:97 meta-boxes.php:343 meta-boxes.php:435 meta-boxes.php:443
|
640 |
+
#: meta-boxes.php:521 meta-boxes.php:600 meta-boxes.php:700 meta-boxes.php:771
|
641 |
+
#: meta-boxes.php:856 meta-boxes.php:915 meta-boxes.php:966
|
642 |
+
msgid "Please provide the following information."
|
643 |
+
msgstr ""
|
644 |
+
|
645 |
+
#: meta-boxes.php:103
|
646 |
+
msgid "Reviewer’s Name "
|
647 |
+
msgstr ""
|
648 |
+
|
649 |
+
#: meta-boxes.php:104
|
650 |
+
msgid "Enter the name of Item Reviewer or The Post Author."
|
651 |
+
msgstr ""
|
652 |
+
|
653 |
+
#: meta-boxes.php:110
|
654 |
+
msgid "Item to be reviewed"
|
655 |
+
msgstr ""
|
656 |
+
|
657 |
+
#: meta-boxes.php:111
|
658 |
+
msgid "Enter the name of the item, you are writing review about."
|
659 |
+
msgstr ""
|
660 |
+
|
661 |
+
#: meta-boxes.php:117
|
662 |
+
msgid "Item Review Type"
|
663 |
+
msgstr ""
|
664 |
+
|
665 |
+
#: meta-boxes.php:118
|
666 |
+
msgid "Select the item to be reviewed."
|
667 |
+
msgstr ""
|
668 |
+
|
669 |
+
#: meta-boxes.php:124
|
670 |
+
msgid "Select Item type"
|
671 |
+
msgstr ""
|
672 |
+
|
673 |
+
#: meta-boxes.php:150
|
674 |
+
msgid "Event Name"
|
675 |
+
msgstr ""
|
676 |
+
|
677 |
+
#: meta-boxes.php:151
|
678 |
+
msgid "Enter the Event name."
|
679 |
+
msgstr ""
|
680 |
+
|
681 |
+
#: meta-boxes.php:157
|
682 |
+
msgid "Event Start Date "
|
683 |
+
msgstr ""
|
684 |
+
|
685 |
+
#: meta-boxes.php:158 meta-boxes.php:399
|
686 |
+
msgid "Provide the Event Start Date."
|
687 |
+
msgstr ""
|
688 |
+
|
689 |
+
#: meta-boxes.php:164
|
690 |
+
msgid "Event Location "
|
691 |
+
msgstr ""
|
692 |
+
|
693 |
+
#: meta-boxes.php:165 meta-boxes.php:357
|
694 |
+
msgid "Location Name Here"
|
695 |
+
msgstr ""
|
696 |
+
|
697 |
+
#: meta-boxes.php:172 meta-boxes.php:364 meta-boxes.php:1008
|
698 |
+
msgid "Street Address"
|
699 |
+
msgstr ""
|
700 |
+
|
701 |
+
#: meta-boxes.php:179 meta-boxes.php:371 meta-boxes.php:1015
|
702 |
+
msgid "Locality"
|
703 |
+
msgstr ""
|
704 |
+
|
705 |
+
#: meta-boxes.php:186 meta-boxes.php:378 meta-boxes.php:584 meta-boxes.php:1022
|
706 |
+
msgid "Region"
|
707 |
+
msgstr ""
|
708 |
+
|
709 |
+
#: meta-boxes.php:193 meta-boxes.php:385 meta-boxes.php:492 meta-boxes.php:591
|
710 |
+
#: meta-boxes.php:1029
|
711 |
+
msgid "Postal Code"
|
712 |
+
msgstr ""
|
713 |
+
|
714 |
+
#: meta-boxes.php:199 meta-boxes.php:642 settings.php:62
|
715 |
+
msgid "Product Name"
|
716 |
+
msgstr ""
|
717 |
+
|
718 |
+
#: meta-boxes.php:200
|
719 |
+
msgid "Enter the Product name."
|
720 |
+
msgstr ""
|
721 |
+
|
722 |
+
#: meta-boxes.php:206 meta-boxes.php:656
|
723 |
+
msgid "Product Price"
|
724 |
+
msgstr ""
|
725 |
+
|
726 |
+
#: meta-boxes.php:207 meta-boxes.php:657
|
727 |
+
msgid "Enter the product Price."
|
728 |
+
msgstr ""
|
729 |
+
|
730 |
+
#: meta-boxes.php:213 meta-boxes.php:419 meta-boxes.php:663
|
731 |
+
msgid "Currency "
|
732 |
+
msgstr ""
|
733 |
+
|
734 |
+
#: meta-boxes.php:214 meta-boxes.php:420 meta-boxes.php:664 meta-boxes.php:814
|
735 |
+
msgid ""
|
736 |
+
"Enter the Currency Code(e.g USD, INR, AUD, EUR, GBP). <a "
|
737 |
+
"href=\"http://www.science.co.il/International/Currency-Codes.asp\" "
|
738 |
+
"target=\"_blank\"> Know you currency code</a>"
|
739 |
+
msgstr ""
|
740 |
+
|
741 |
+
#: meta-boxes.php:220 meta-boxes.php:670
|
742 |
+
msgid "Availability"
|
743 |
+
msgstr ""
|
744 |
+
|
745 |
+
#: meta-boxes.php:221 meta-boxes.php:671
|
746 |
+
msgid "Select the products availability."
|
747 |
+
msgstr ""
|
748 |
+
|
749 |
+
#: meta-boxes.php:227 meta-boxes.php:677
|
750 |
+
msgid "__ Please Select __"
|
751 |
+
msgstr ""
|
752 |
+
|
753 |
+
#: meta-boxes.php:231 meta-boxes.php:681
|
754 |
+
msgid "Out of Stock"
|
755 |
+
msgstr ""
|
756 |
+
|
757 |
+
#: meta-boxes.php:235 meta-boxes.php:685
|
758 |
+
msgid "In Stock"
|
759 |
+
msgstr ""
|
760 |
+
|
761 |
+
#: meta-boxes.php:239 meta-boxes.php:689
|
762 |
+
msgid "In Store Only"
|
763 |
+
msgstr ""
|
764 |
+
|
765 |
+
#: meta-boxes.php:243 meta-boxes.php:693
|
766 |
+
msgid "Pre-Order"
|
767 |
+
msgstr ""
|
768 |
+
|
769 |
+
#: meta-boxes.php:249 meta-boxes.php:706
|
770 |
+
msgid "Recipe Name "
|
771 |
+
msgstr ""
|
772 |
+
|
773 |
+
#: meta-boxes.php:250 meta-boxes.php:707
|
774 |
+
msgid "Enter the recipe name."
|
775 |
+
msgstr ""
|
776 |
+
|
777 |
+
#: meta-boxes.php:256 meta-boxes.php:762
|
778 |
+
msgid "Recipe Photo"
|
779 |
+
msgstr ""
|
780 |
+
|
781 |
+
#: meta-boxes.php:257 meta-boxes.php:763
|
782 |
+
msgid "Upload or Select recipe photo. Medium size is recommended (300px X 300px)"
|
783 |
+
msgstr ""
|
784 |
+
|
785 |
+
#: meta-boxes.php:263 settings.php:99
|
786 |
+
msgid "Software Name"
|
787 |
+
msgstr ""
|
788 |
+
|
789 |
+
#: meta-boxes.php:264
|
790 |
+
msgid "Enter the Software name."
|
791 |
+
msgstr ""
|
792 |
+
|
793 |
+
#: meta-boxes.php:270
|
794 |
+
msgid "Software Operating System"
|
795 |
+
msgstr ""
|
796 |
+
|
797 |
+
#: meta-boxes.php:271
|
798 |
+
msgid "Enter the Operating System name."
|
799 |
+
msgstr ""
|
800 |
+
|
801 |
+
#: meta-boxes.php:277
|
802 |
+
msgid "Software Application Category"
|
803 |
+
msgstr ""
|
804 |
+
|
805 |
+
#: meta-boxes.php:278
|
806 |
+
msgid "Enter the Application Category name."
|
807 |
+
msgstr ""
|
808 |
+
|
809 |
+
#: meta-boxes.php:284 meta-boxes.php:862
|
810 |
+
msgid "Video Title"
|
811 |
+
msgstr ""
|
812 |
+
|
813 |
+
#: meta-boxes.php:285 meta-boxes.php:863
|
814 |
+
msgid "Enter the title for this video"
|
815 |
+
msgstr ""
|
816 |
+
|
817 |
+
#: meta-boxes.php:291 meta-boxes.php:869
|
818 |
+
msgid "Video Description"
|
819 |
+
msgstr ""
|
820 |
+
|
821 |
+
#: meta-boxes.php:292 meta-boxes.php:870
|
822 |
+
msgid "Enter the brief description for this video"
|
823 |
+
msgstr ""
|
824 |
+
|
825 |
+
#: meta-boxes.php:298 meta-boxes.php:876
|
826 |
+
msgid "Video Thumbnail"
|
827 |
+
msgstr ""
|
828 |
+
|
829 |
+
#: meta-boxes.php:299 meta-boxes.php:877
|
830 |
+
msgid ""
|
831 |
+
"Upload or select video thumbnail from gallery. Medium size is recommended "
|
832 |
+
"(300px X 300px)"
|
833 |
+
msgstr ""
|
834 |
+
|
835 |
+
#: meta-boxes.php:305 meta-boxes.php:906 settings.php:115
|
836 |
+
msgid "Upload Date"
|
837 |
+
msgstr ""
|
838 |
+
|
839 |
+
#: meta-boxes.php:306 meta-boxes.php:907
|
840 |
+
msgid "Provide the date when the video is uploaded"
|
841 |
+
msgstr ""
|
842 |
+
|
843 |
+
#: meta-boxes.php:312 meta-boxes.php:606
|
844 |
+
msgid "Your Rating"
|
845 |
+
msgstr ""
|
846 |
+
|
847 |
+
#: meta-boxes.php:313
|
848 |
+
msgid " Rate this item (1-5)"
|
849 |
+
msgstr ""
|
850 |
+
|
851 |
+
#: meta-boxes.php:342
|
852 |
+
msgid "Rich Snippets - Events"
|
853 |
+
msgstr ""
|
854 |
+
|
855 |
+
#: meta-boxes.php:349
|
856 |
+
msgid "Event Title "
|
857 |
+
msgstr ""
|
858 |
+
|
859 |
+
#: meta-boxes.php:350
|
860 |
+
msgid "What would be the name of the event?"
|
861 |
+
msgstr ""
|
862 |
+
|
863 |
+
#: meta-boxes.php:356
|
864 |
+
msgid "Location "
|
865 |
+
msgstr ""
|
866 |
+
|
867 |
+
#: meta-boxes.php:391
|
868 |
+
msgid "Description "
|
869 |
+
msgstr ""
|
870 |
+
|
871 |
+
#: meta-boxes.php:392
|
872 |
+
msgid "Describe the event in short."
|
873 |
+
msgstr ""
|
874 |
+
|
875 |
+
#: meta-boxes.php:398
|
876 |
+
msgid "Start Date "
|
877 |
+
msgstr ""
|
878 |
+
|
879 |
+
#: meta-boxes.php:405
|
880 |
+
msgid "End Date "
|
881 |
+
msgstr ""
|
882 |
+
|
883 |
+
#: meta-boxes.php:406
|
884 |
+
msgid "Provide the Event End Date."
|
885 |
+
msgstr ""
|
886 |
+
|
887 |
+
#: meta-boxes.php:412 settings.php:33
|
888 |
+
msgid "Offer Price"
|
889 |
+
msgstr ""
|
890 |
+
|
891 |
+
#: meta-boxes.php:413
|
892 |
+
msgid "Enter the ticket Price."
|
893 |
+
msgstr ""
|
894 |
+
|
895 |
+
#: meta-boxes.php:426
|
896 |
+
msgid "Url "
|
897 |
+
msgstr ""
|
898 |
+
|
899 |
+
#: meta-boxes.php:427
|
900 |
+
msgid "Url of buy ticket page"
|
901 |
+
msgstr ""
|
902 |
+
|
903 |
+
#: meta-boxes.php:434
|
904 |
+
msgid "Rich Snippets - Music"
|
905 |
+
msgstr ""
|
906 |
+
|
907 |
+
#: meta-boxes.php:442
|
908 |
+
msgid "Rich Snippets - Organization"
|
909 |
+
msgstr ""
|
910 |
+
|
911 |
+
#: meta-boxes.php:449
|
912 |
+
msgid "Organization Name "
|
913 |
+
msgstr ""
|
914 |
+
|
915 |
+
#: meta-boxes.php:450
|
916 |
+
msgid "Enter the Company or Organization Name."
|
917 |
+
msgstr ""
|
918 |
+
|
919 |
+
#: meta-boxes.php:456
|
920 |
+
msgid "Website URL "
|
921 |
+
msgstr ""
|
922 |
+
|
923 |
+
#: meta-boxes.php:457
|
924 |
+
msgid "Enter the Organization homepage url."
|
925 |
+
msgstr ""
|
926 |
+
|
927 |
+
#: meta-boxes.php:463
|
928 |
+
msgid "Contact No. "
|
929 |
+
msgstr ""
|
930 |
+
|
931 |
+
#: meta-boxes.php:464
|
932 |
+
msgid "Enter the Telephone No."
|
933 |
+
msgstr ""
|
934 |
+
|
935 |
+
#: meta-boxes.php:470
|
936 |
+
msgid "Address "
|
937 |
+
msgstr ""
|
938 |
+
|
939 |
+
#: meta-boxes.php:471
|
940 |
+
msgid "Street Name."
|
941 |
+
msgstr ""
|
942 |
+
|
943 |
+
#: meta-boxes.php:478
|
944 |
+
msgid "Locality."
|
945 |
+
msgstr ""
|
946 |
+
|
947 |
+
#: meta-boxes.php:485
|
948 |
+
msgid "Region."
|
949 |
+
msgstr ""
|
950 |
+
|
951 |
+
#: meta-boxes.php:499
|
952 |
+
msgid "Country Name"
|
953 |
+
msgstr ""
|
954 |
+
|
955 |
+
#: meta-boxes.php:505
|
956 |
+
msgid "GEO Location"
|
957 |
+
msgstr ""
|
958 |
+
|
959 |
+
#: meta-boxes.php:506
|
960 |
+
msgid ""
|
961 |
+
"Latitude. <a "
|
962 |
+
"href=\"http://universimmedia.pagesperso-orange.fr/geo/loc.htm\" "
|
963 |
+
"target=\"_blank\">Find Here.</a>"
|
964 |
+
msgstr ""
|
965 |
+
|
966 |
+
#: meta-boxes.php:513
|
967 |
+
msgid "Longitude."
|
968 |
+
msgstr ""
|
969 |
+
|
970 |
+
#: meta-boxes.php:520
|
971 |
+
msgid "Rich Snippets - Person"
|
972 |
+
msgstr ""
|
973 |
+
|
974 |
+
#: meta-boxes.php:527
|
975 |
+
msgid "Person‘s Name"
|
976 |
+
msgstr ""
|
977 |
+
|
978 |
+
#: meta-boxes.php:528
|
979 |
+
msgid "Enter the relative person‘s name."
|
980 |
+
msgstr ""
|
981 |
+
|
982 |
+
#: meta-boxes.php:534 settings.php:45
|
983 |
+
msgid "Nickname"
|
984 |
+
msgstr ""
|
985 |
+
|
986 |
+
#: meta-boxes.php:535
|
987 |
+
msgid "Enter the nickname (if any)."
|
988 |
+
msgstr ""
|
989 |
+
|
990 |
+
#: meta-boxes.php:541
|
991 |
+
msgid "Photograph"
|
992 |
+
msgstr ""
|
993 |
+
|
994 |
+
#: meta-boxes.php:542
|
995 |
+
msgid ""
|
996 |
+
"Upload the photo or select from media library. Medium size is recommended "
|
997 |
+
"(300px X 300px)"
|
998 |
+
msgstr ""
|
999 |
+
|
1000 |
+
#: meta-boxes.php:548
|
1001 |
+
msgid "Job Title "
|
1002 |
+
msgstr ""
|
1003 |
+
|
1004 |
+
#: meta-boxes.php:549
|
1005 |
+
msgid "Enter job title."
|
1006 |
+
msgstr ""
|
1007 |
+
|
1008 |
+
#: meta-boxes.php:555
|
1009 |
+
msgid "Homepage URL"
|
1010 |
+
msgstr ""
|
1011 |
+
|
1012 |
+
#: meta-boxes.php:556
|
1013 |
+
msgid "Enter homepage URL(if any)."
|
1014 |
+
msgstr ""
|
1015 |
+
|
1016 |
+
#: meta-boxes.php:562
|
1017 |
+
msgid "Company / Organization"
|
1018 |
+
msgstr ""
|
1019 |
+
|
1020 |
+
#: meta-boxes.php:563
|
1021 |
+
msgid "Enter Company or Organization name in affiliation."
|
1022 |
+
msgstr ""
|
1023 |
+
|
1024 |
+
#: meta-boxes.php:569 settings.php:49
|
1025 |
+
msgid "Address"
|
1026 |
+
msgstr ""
|
1027 |
+
|
1028 |
+
#: meta-boxes.php:570
|
1029 |
+
msgid "Enter Street"
|
1030 |
+
msgstr ""
|
1031 |
+
|
1032 |
+
#: meta-boxes.php:577
|
1033 |
+
msgid "Enter Locality"
|
1034 |
+
msgstr ""
|
1035 |
+
|
1036 |
+
#: meta-boxes.php:599
|
1037 |
+
msgid "Rich Snippets - Products"
|
1038 |
+
msgstr ""
|
1039 |
+
|
1040 |
+
#: meta-boxes.php:607
|
1041 |
+
msgid "Rate this product or aggregate rating."
|
1042 |
+
msgstr ""
|
1043 |
+
|
1044 |
+
#: meta-boxes.php:635 settings.php:61
|
1045 |
+
msgid "Brand Name"
|
1046 |
+
msgstr ""
|
1047 |
+
|
1048 |
+
#: meta-boxes.php:636
|
1049 |
+
msgid "Enter the products brand name"
|
1050 |
+
msgstr ""
|
1051 |
+
|
1052 |
+
#: meta-boxes.php:643
|
1053 |
+
msgid "Enter the product name."
|
1054 |
+
msgstr ""
|
1055 |
+
|
1056 |
+
#: meta-boxes.php:649
|
1057 |
+
msgid "Product Image"
|
1058 |
+
msgstr ""
|
1059 |
+
|
1060 |
+
#: meta-boxes.php:650
|
1061 |
+
msgid ""
|
1062 |
+
"Upload the product image or select from library. Medium size is recommended "
|
1063 |
+
"(300px X 300px)"
|
1064 |
+
msgstr ""
|
1065 |
+
|
1066 |
+
#: meta-boxes.php:699
|
1067 |
+
msgid "Rich Snippets - Recipes"
|
1068 |
+
msgstr ""
|
1069 |
+
|
1070 |
+
#: meta-boxes.php:713
|
1071 |
+
msgid "Author Name "
|
1072 |
+
msgstr ""
|
1073 |
+
|
1074 |
+
#: meta-boxes.php:714
|
1075 |
+
msgid "Enter the Author name."
|
1076 |
+
msgstr ""
|
1077 |
+
|
1078 |
+
#: meta-boxes.php:720
|
1079 |
+
msgid "Time Required "
|
1080 |
+
msgstr ""
|
1081 |
+
|
1082 |
+
#: meta-boxes.php:721
|
1083 |
+
msgid "Preperation time (Format: 1H30M. H - Hours, M - Minutes )"
|
1084 |
+
msgstr ""
|
1085 |
+
|
1086 |
+
#: meta-boxes.php:728
|
1087 |
+
msgid "Cook Time. (Format: 1H30M. H - Hours, M - Minutes )"
|
1088 |
+
msgstr ""
|
1089 |
+
|
1090 |
+
#: meta-boxes.php:735
|
1091 |
+
msgid "Total Time (Format: 1H30M. H - Hours, M - Minutes )"
|
1092 |
+
msgstr ""
|
1093 |
+
|
1094 |
+
#: meta-boxes.php:741 settings.php:30 settings.php:82 settings.php:113
|
1095 |
+
#: settings.php:127 settings.php:143
|
1096 |
+
msgid "Description"
|
1097 |
+
msgstr ""
|
1098 |
+
|
1099 |
+
#: meta-boxes.php:742
|
1100 |
+
msgid "Describe the recipe in short."
|
1101 |
+
msgstr ""
|
1102 |
+
|
1103 |
+
#: meta-boxes.php:748 meta-boxes.php:749 settings.php:83
|
1104 |
+
msgid "Nutrition"
|
1105 |
+
msgstr ""
|
1106 |
+
|
1107 |
+
#: meta-boxes.php:755 settings.php:84
|
1108 |
+
msgid "Ingredients"
|
1109 |
+
msgstr ""
|
1110 |
+
|
1111 |
+
#: meta-boxes.php:756
|
1112 |
+
msgid "Enter the ingredients used"
|
1113 |
+
msgstr ""
|
1114 |
+
|
1115 |
+
#: meta-boxes.php:770
|
1116 |
+
msgid "Rich Snippets - Software Application"
|
1117 |
+
msgstr ""
|
1118 |
+
|
1119 |
+
#: meta-boxes.php:777
|
1120 |
+
msgid "Software Rating"
|
1121 |
+
msgstr ""
|
1122 |
+
|
1123 |
+
#: meta-boxes.php:778
|
1124 |
+
msgid "Rate this software."
|
1125 |
+
msgstr ""
|
1126 |
+
|
1127 |
+
#: meta-boxes.php:806 settings.php:64 settings.php:98
|
1128 |
+
msgid "Price"
|
1129 |
+
msgstr ""
|
1130 |
+
|
1131 |
+
#: meta-boxes.php:807
|
1132 |
+
msgid "Enter the Price of Software"
|
1133 |
+
msgstr ""
|
1134 |
+
|
1135 |
+
#: meta-boxes.php:813
|
1136 |
+
msgid "Currency"
|
1137 |
+
msgstr ""
|
1138 |
+
|
1139 |
+
#: meta-boxes.php:820
|
1140 |
+
msgid "Software Name "
|
1141 |
+
msgstr ""
|
1142 |
+
|
1143 |
+
#: meta-boxes.php:821
|
1144 |
+
msgid "Enter the Software Name."
|
1145 |
+
msgstr ""
|
1146 |
+
|
1147 |
+
#: meta-boxes.php:827 settings.php:100
|
1148 |
+
msgid "Operating System"
|
1149 |
+
msgstr ""
|
1150 |
+
|
1151 |
+
#: meta-boxes.php:828
|
1152 |
+
msgid "Enter the software Operating System."
|
1153 |
+
msgstr ""
|
1154 |
+
|
1155 |
+
#: meta-boxes.php:834
|
1156 |
+
msgid "Application Category"
|
1157 |
+
msgstr ""
|
1158 |
+
|
1159 |
+
#: meta-boxes.php:835
|
1160 |
+
msgid "Like Game, Multimedia"
|
1161 |
+
msgstr ""
|
1162 |
+
|
1163 |
+
#: meta-boxes.php:841
|
1164 |
+
msgid "Software Image"
|
1165 |
+
msgstr ""
|
1166 |
+
|
1167 |
+
#: meta-boxes.php:842
|
1168 |
+
msgid ""
|
1169 |
+
"Upload or select image of software. Medium size is recommended (300px X "
|
1170 |
+
"300px)"
|
1171 |
+
msgstr ""
|
1172 |
+
|
1173 |
+
#: meta-boxes.php:848 settings.php:101
|
1174 |
+
msgid "Landing Page"
|
1175 |
+
msgstr ""
|
1176 |
+
|
1177 |
+
#: meta-boxes.php:849
|
1178 |
+
msgid "Enter the landing page url for software"
|
1179 |
+
msgstr ""
|
1180 |
+
|
1181 |
+
#: meta-boxes.php:855
|
1182 |
+
msgid "Rich Snippets - Videos"
|
1183 |
+
msgstr ""
|
1184 |
+
|
1185 |
+
#: meta-boxes.php:884
|
1186 |
+
msgid ""
|
1187 |
+
"Upload Video or enter the video file url<br>Example: <br> "
|
1188 |
+
"http://www.example.com/video123.flv<br>A URL pointing to the actual video "
|
1189 |
+
"media file. This file should be in .mpg, .mpeg, .mp4, .m4v, .mov, .wmv, "
|
1190 |
+
".avi, .flv, or other video file format"
|
1191 |
+
msgstr ""
|
1192 |
+
|
1193 |
+
#: meta-boxes.php:891
|
1194 |
+
msgid "Embed Video"
|
1195 |
+
msgstr ""
|
1196 |
+
|
1197 |
+
#: meta-boxes.php:892
|
1198 |
+
msgid ""
|
1199 |
+
"A URL pointing to a player for the specific video. Usually this is the "
|
1200 |
+
"information in the src element of an <embed>tag. <br>Example: "
|
1201 |
+
"<br>Youtube: https://www.youtube.com/embed/CibazcCevOk <br>Dailymotion: "
|
1202 |
+
"http://www.dailymotion.com/swf/x1o2g<br><div class=\"bsf_vd_note\"><h3>Add "
|
1203 |
+
"only one url either in \"Video\" or \"Embed Video\" field. Dont use "
|
1204 |
+
"both.</h3></div>"
|
1205 |
+
msgstr ""
|
1206 |
+
|
1207 |
+
#: meta-boxes.php:899
|
1208 |
+
msgid "Video Duration"
|
1209 |
+
msgstr ""
|
1210 |
+
|
1211 |
+
#: meta-boxes.php:900
|
1212 |
+
msgid "Enter the duration for this video"
|
1213 |
+
msgstr ""
|
1214 |
+
|
1215 |
+
#: meta-boxes.php:914
|
1216 |
+
msgid "Rich Snippets - Article"
|
1217 |
+
msgstr ""
|
1218 |
+
|
1219 |
+
#: meta-boxes.php:921
|
1220 |
+
msgid "Article Image"
|
1221 |
+
msgstr ""
|
1222 |
+
|
1223 |
+
#: meta-boxes.php:922 meta-boxes.php:957 meta-boxes.php:973
|
1224 |
+
msgid ""
|
1225 |
+
"Upload or select image from gallery. Medium size is recommended (300px X "
|
1226 |
+
"300px)"
|
1227 |
+
msgstr ""
|
1228 |
+
|
1229 |
+
#: meta-boxes.php:928 settings.php:125
|
1230 |
+
msgid "Article Name"
|
1231 |
+
msgstr ""
|
1232 |
+
|
1233 |
+
#: meta-boxes.php:929
|
1234 |
+
msgid "Enter the name for this article"
|
1235 |
+
msgstr ""
|
1236 |
+
|
1237 |
+
#: meta-boxes.php:935 meta-boxes.php:993
|
1238 |
+
msgid "Short Description"
|
1239 |
+
msgstr ""
|
1240 |
+
|
1241 |
+
#: meta-boxes.php:936
|
1242 |
+
msgid "Enter the brief description about this article (About 30 Words)"
|
1243 |
+
msgstr ""
|
1244 |
+
|
1245 |
+
#: meta-boxes.php:942 settings.php:126
|
1246 |
+
msgid "Author"
|
1247 |
+
msgstr ""
|
1248 |
+
|
1249 |
+
#: meta-boxes.php:943
|
1250 |
+
msgid "Enter the author name for this article"
|
1251 |
+
msgstr ""
|
1252 |
+
|
1253 |
+
#: meta-boxes.php:949
|
1254 |
+
msgid "Publisher - Orgnization"
|
1255 |
+
msgstr ""
|
1256 |
+
|
1257 |
+
#: meta-boxes.php:950
|
1258 |
+
msgid "Enter the publisher name for this article"
|
1259 |
+
msgstr ""
|
1260 |
+
|
1261 |
+
#: meta-boxes.php:956 settings.php:130
|
1262 |
+
msgid "Publisher Logo"
|
1263 |
+
msgstr ""
|
1264 |
+
|
1265 |
+
#: meta-boxes.php:965
|
1266 |
+
msgid "Rich Snippets - Service"
|
1267 |
+
msgstr ""
|
1268 |
+
|
1269 |
+
#: meta-boxes.php:972 settings.php:128
|
1270 |
+
msgid "Image"
|
1271 |
+
msgstr ""
|
1272 |
+
|
1273 |
+
#: meta-boxes.php:979 settings.php:141
|
1274 |
+
msgid "Service Type"
|
1275 |
+
msgstr ""
|
1276 |
+
|
1277 |
+
#: meta-boxes.php:980
|
1278 |
+
msgid "Enter the service type"
|
1279 |
+
msgstr ""
|
1280 |
+
|
1281 |
+
#: meta-boxes.php:986
|
1282 |
+
msgid "Service Served Area"
|
1283 |
+
msgstr ""
|
1284 |
+
|
1285 |
+
#: meta-boxes.php:987
|
1286 |
+
msgid "Enter the area where service is available"
|
1287 |
+
msgstr ""
|
1288 |
+
|
1289 |
+
#: meta-boxes.php:994
|
1290 |
+
msgid "Enter the description about service (About 30 Words)"
|
1291 |
+
msgstr ""
|
1292 |
+
|
1293 |
+
#: meta-boxes.php:1000 settings.php:147
|
1294 |
+
msgid "Provider Name"
|
1295 |
+
msgstr ""
|
1296 |
+
|
1297 |
+
#: meta-boxes.php:1001
|
1298 |
+
msgid "Enter the service provider name"
|
1299 |
+
msgstr ""
|
1300 |
+
|
1301 |
+
#: meta-boxes.php:1007 settings.php:29 settings.php:148
|
1302 |
+
msgid "Location"
|
1303 |
+
msgstr ""
|
1304 |
+
|
1305 |
+
#: meta-boxes.php:1035
|
1306 |
+
msgid "Provider Location Image"
|
1307 |
+
msgstr ""
|
1308 |
+
|
1309 |
+
#: meta-boxes.php:1036
|
1310 |
+
msgid ""
|
1311 |
+
"Upload the provider location image or select from library. Medium size is "
|
1312 |
+
"recommended (300px X 300px)"
|
1313 |
+
msgstr ""
|
1314 |
+
|
1315 |
+
#: meta-boxes.php:1042
|
1316 |
+
msgid "Telephone"
|
1317 |
+
msgstr ""
|
1318 |
+
|
1319 |
+
#: meta-boxes.php:1043
|
1320 |
+
msgid "Telephone number"
|
1321 |
+
msgstr ""
|
1322 |
+
|
1323 |
+
#: settings.php:13 settings.php:27 settings.php:43 settings.php:59
|
1324 |
+
#: settings.php:75 settings.php:95 settings.php:111 settings.php:124
|
1325 |
+
#: settings.php:140
|
1326 |
+
msgid "Summary"
|
1327 |
+
msgstr ""
|
1328 |
+
|
1329 |
+
#: settings.php:14
|
1330 |
+
msgid "Reviewer"
|
1331 |
+
msgstr ""
|
1332 |
+
|
1333 |
+
#: settings.php:15
|
1334 |
+
msgid "Review Date"
|
1335 |
+
msgstr ""
|
1336 |
+
|
1337 |
+
#: settings.php:16
|
1338 |
+
msgid "Reviewed Item"
|
1339 |
+
msgstr ""
|
1340 |
+
|
1341 |
+
#: settings.php:17 settings.php:60 settings.php:96
|
1342 |
+
msgid "Author Rating"
|
1343 |
+
msgstr ""
|
1344 |
+
|
1345 |
+
#: settings.php:31
|
1346 |
+
msgid "Starting on"
|
1347 |
+
msgstr ""
|
1348 |
+
|
1349 |
+
#: settings.php:32
|
1350 |
+
msgid "Ending on"
|
1351 |
+
msgstr ""
|
1352 |
+
|
1353 |
+
#: settings.php:44
|
1354 |
+
msgid "Name"
|
1355 |
+
msgstr ""
|
1356 |
+
|
1357 |
+
#: settings.php:46
|
1358 |
+
msgid "Job Title"
|
1359 |
+
msgstr ""
|
1360 |
+
|
1361 |
+
#: settings.php:47
|
1362 |
+
msgid "Website"
|
1363 |
+
msgstr ""
|
1364 |
+
|
1365 |
+
#: settings.php:48
|
1366 |
+
msgid "Company"
|
1367 |
+
msgstr ""
|
1368 |
+
|
1369 |
+
#: settings.php:63 settings.php:97
|
1370 |
+
msgid "Aggregate Rating"
|
1371 |
+
msgstr ""
|
1372 |
+
|
1373 |
+
#: settings.php:65
|
1374 |
+
msgid "Product Availability"
|
1375 |
+
msgstr ""
|
1376 |
+
|
1377 |
+
#: settings.php:76
|
1378 |
+
msgid "Recipe Name"
|
1379 |
+
msgstr ""
|
1380 |
+
|
1381 |
+
#: settings.php:77
|
1382 |
+
msgid "Author Name"
|
1383 |
+
msgstr ""
|
1384 |
+
|
1385 |
+
#: settings.php:78
|
1386 |
+
msgid "Published On"
|
1387 |
+
msgstr ""
|
1388 |
+
|
1389 |
+
#: settings.php:79
|
1390 |
+
msgid "Preparation Time"
|
1391 |
+
msgstr ""
|
1392 |
+
|
1393 |
+
#: settings.php:80
|
1394 |
+
msgid "Cook Time"
|
1395 |
+
msgstr ""
|
1396 |
+
|
1397 |
+
#: settings.php:81
|
1398 |
+
msgid "Total Time"
|
1399 |
+
msgstr ""
|
1400 |
+
|
1401 |
+
#: settings.php:85
|
1402 |
+
msgid "Average Rating"
|
1403 |
+
msgstr ""
|
1404 |
+
|
1405 |
+
#: settings.php:112
|
1406 |
+
msgid "Title"
|
1407 |
+
msgstr ""
|
1408 |
+
|
1409 |
+
#: settings.php:114
|
1410 |
+
msgid "Duration"
|
1411 |
+
msgstr ""
|
1412 |
+
|
1413 |
+
#: settings.php:129
|
1414 |
+
msgid "Publisher Name"
|
1415 |
+
msgstr ""
|
1416 |
+
|
1417 |
+
#: settings.php:142
|
1418 |
+
msgid "Area"
|
1419 |
+
msgstr ""
|
1420 |
+
|
1421 |
+
#: settings.php:144
|
1422 |
+
msgid "URL"
|
1423 |
+
msgstr ""
|
1424 |
+
|
1425 |
+
#: settings.php:145
|
1426 |
+
msgid "Click Here For More Info"
|
1427 |
+
msgstr ""
|
1428 |
+
|
1429 |
+
#: settings.php:146
|
1430 |
+
msgid "User Rating"
|
1431 |
+
msgstr ""
|
1432 |
+
|
1433 |
+
#: settings.php:149
|
1434 |
+
msgid "Provider telephone number"
|
1435 |
+
msgstr ""
|
1436 |
+
|
1437 |
+
#. Plugin Name of the plugin/theme
|
1438 |
+
msgid "Schema - All In One Schema Rich Snippets"
|
1439 |
+
msgstr ""
|
1440 |
+
|
1441 |
+
#. Author URI of the plugin/theme
|
1442 |
+
msgid "https://www.brainstormforce.com"
|
1443 |
+
msgstr ""
|
1444 |
+
|
1445 |
+
#. Description of the plugin/theme
|
1446 |
+
msgid ""
|
1447 |
+
"Welcome to the Schema - All In One Schema Rich Snippets! You can now easily "
|
1448 |
+
"add schema markup on various * pages and posts of your website. Implement "
|
1449 |
+
"schema types such as Review, Events, Recipes, Article, Products, Services * "
|
1450 |
+
"*etc."
|
1451 |
+
msgstr ""
|
1452 |
+
|
1453 |
+
#. Author of the plugin/theme
|
1454 |
+
msgid "Brainstorm Force"
|
1455 |
+
msgstr ""
|
meta-boxes.php
CHANGED
@@ -1,935 +1,1053 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
else {
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
array(
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
array(
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
'
|
97 |
-
'
|
98 |
-
|
99 |
-
|
100 |
-
'
|
101 |
-
|
102 |
-
|
103 |
-
'
|
104 |
-
'
|
105 |
-
|
106 |
-
|
107 |
-
'
|
108 |
-
|
109 |
-
|
110 |
-
'
|
111 |
-
'
|
112 |
-
|
113 |
-
|
114 |
-
'
|
115 |
-
|
116 |
-
|
117 |
-
'
|
118 |
-
'
|
119 |
-
|
120 |
-
|
121 |
-
'
|
122 |
-
'
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
'
|
151 |
-
'
|
152 |
-
'
|
153 |
-
'
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
'
|
158 |
-
'
|
159 |
-
'
|
160 |
-
'
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
'
|
165 |
-
'
|
166 |
-
'
|
167 |
-
'
|
168 |
-
'
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
'
|
179 |
-
'
|
180 |
-
'
|
181 |
-
'
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
'
|
186 |
-
'
|
187 |
-
'
|
188 |
-
'
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
'
|
193 |
-
'
|
194 |
-
'
|
195 |
-
'
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
'
|
200 |
-
'
|
201 |
-
'
|
202 |
-
'
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
'
|
207 |
-
'
|
208 |
-
'
|
209 |
-
'
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
'
|
214 |
-
'
|
215 |
-
'
|
216 |
-
'
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
'
|
221 |
-
'
|
222 |
-
'
|
223 |
-
'
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
'
|
257 |
-
'
|
258 |
-
'
|
259 |
-
'
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
'
|
264 |
-
'
|
265 |
-
'
|
266 |
-
'
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
'
|
271 |
-
'
|
272 |
-
'
|
273 |
-
'
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
'
|
278 |
-
'
|
279 |
-
'
|
280 |
-
'
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
'
|
285 |
-
'
|
286 |
-
'
|
287 |
-
'
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
'
|
292 |
-
'
|
293 |
-
'
|
294 |
-
'
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
'
|
299 |
-
'
|
300 |
-
'
|
301 |
-
'
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
'
|
306 |
-
'
|
307 |
-
'
|
308 |
-
'
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
'
|
313 |
-
'
|
314 |
-
'
|
315 |
-
'
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
'
|
343 |
-
'
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
'
|
350 |
-
'
|
351 |
-
'
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
'
|
357 |
-
'
|
358 |
-
'
|
359 |
-
'
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
'
|
364 |
-
'
|
365 |
-
'
|
366 |
-
'
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
'
|
371 |
-
'
|
372 |
-
'
|
373 |
-
'
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
'
|
378 |
-
'
|
379 |
-
'
|
380 |
-
'
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
'
|
385 |
-
'
|
386 |
-
'
|
387 |
-
'
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
'
|
392 |
-
'
|
393 |
-
'
|
394 |
-
'
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
'
|
399 |
-
'
|
400 |
-
'
|
401 |
-
'
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
'
|
406 |
-
'
|
407 |
-
'
|
408 |
-
'
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
'
|
413 |
-
'
|
414 |
-
'
|
415 |
-
'
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
'
|
420 |
-
'
|
421 |
-
'
|
422 |
-
'
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
'
|
427 |
-
'
|
428 |
-
'
|
429 |
-
'
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
'
|
435 |
-
'
|
436 |
-
'
|
437 |
-
'
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
'
|
443 |
-
'
|
444 |
-
'
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
'
|
450 |
-
'
|
451 |
-
'
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
'
|
457 |
-
'
|
458 |
-
'
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
'
|
464 |
-
'
|
465 |
-
'
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
'
|
471 |
-
'
|
472 |
-
'
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
'
|
478 |
-
'
|
479 |
-
'
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
'
|
485 |
-
'
|
486 |
-
'
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
'
|
492 |
-
'
|
493 |
-
'
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
'
|
499 |
-
'
|
500 |
-
'
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
'
|
506 |
-
'
|
507 |
-
'
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
array(
|
512 |
-
'name'
|
513 |
-
'desc'
|
514 |
-
'id'
|
515 |
-
'class' => '
|
516 |
-
'type'
|
517 |
-
),
|
518 |
-
|
519 |
-
|
520 |
-
'
|
521 |
-
'
|
522 |
-
'
|
523 |
-
'
|
524 |
-
'
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
'
|
535 |
-
'
|
536 |
-
'
|
537 |
-
'
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
'
|
542 |
-
'
|
543 |
-
'
|
544 |
-
'
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
'
|
549 |
-
'
|
550 |
-
'
|
551 |
-
'
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
'
|
556 |
-
'
|
557 |
-
'
|
558 |
-
'
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
'
|
563 |
-
'
|
564 |
-
'
|
565 |
-
'
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
'
|
570 |
-
'
|
571 |
-
'
|
572 |
-
'
|
573 |
-
'
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
array(
|
583 |
-
'name'
|
584 |
-
'desc'
|
585 |
-
'id'
|
586 |
-
'class' => '
|
587 |
-
'type'
|
588 |
-
),
|
589 |
-
array(
|
590 |
-
'name'
|
591 |
-
'desc'
|
592 |
-
'id'
|
593 |
-
'class' => '
|
594 |
-
'type'
|
595 |
-
),
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
'
|
600 |
-
'
|
601 |
-
'
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
'
|
607 |
-
'
|
608 |
-
'
|
609 |
-
|
610 |
-
|
611 |
-
'
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
'
|
636 |
-
'
|
637 |
-
|
638 |
-
|
639 |
-
'
|
640 |
-
|
641 |
-
|
642 |
-
'
|
643 |
-
'
|
644 |
-
|
645 |
-
|
646 |
-
'
|
647 |
-
|
648 |
-
|
649 |
-
'
|
650 |
-
'
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
'
|
657 |
-
'
|
658 |
-
'
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
'
|
664 |
-
'
|
665 |
-
'
|
666 |
-
'
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
'
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
'
|
700 |
-
'
|
701 |
-
|
702 |
-
|
703 |
-
'
|
704 |
-
|
705 |
-
|
706 |
-
'
|
707 |
-
'
|
708 |
-
|
709 |
-
|
710 |
-
'
|
711 |
-
|
712 |
-
|
713 |
-
'
|
714 |
-
'
|
715 |
-
|
716 |
-
|
717 |
-
'
|
718 |
-
|
719 |
-
|
720 |
-
'
|
721 |
-
'
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
'
|
728 |
-
'
|
729 |
-
'
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
'
|
735 |
-
'
|
736 |
-
'
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
'
|
742 |
-
'
|
743 |
-
'
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
'
|
749 |
-
'
|
750 |
-
'
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
'
|
756 |
-
'
|
757 |
-
'
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
'
|
763 |
-
'
|
764 |
-
'
|
765 |
-
'
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
'
|
771 |
-
'
|
772 |
-
'
|
773 |
-
'
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
'
|
778 |
-
'
|
779 |
-
'
|
780 |
-
'
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
'
|
807 |
-
'
|
808 |
-
'
|
809 |
-
'
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
'
|
814 |
-
'
|
815 |
-
'
|
816 |
-
'
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
'
|
821 |
-
'
|
822 |
-
'
|
823 |
-
'
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
'
|
828 |
-
'
|
829 |
-
'
|
830 |
-
'
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
'
|
837 |
-
'
|
838 |
-
'
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
'
|
844 |
-
'
|
845 |
-
'
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
'
|
851 |
-
'
|
852 |
-
'
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
'
|
858 |
-
'
|
859 |
-
'
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
'
|
865 |
-
'
|
866 |
-
'
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
'
|
872 |
-
'
|
873 |
-
'
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
'
|
879 |
-
'
|
880 |
-
'
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
'
|
886 |
-
'
|
887 |
-
'
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
'
|
893 |
-
'
|
894 |
-
'
|
895 |
-
'
|
896 |
-
|
897 |
-
|
898 |
-
array(
|
899 |
-
'name'
|
900 |
-
'desc'
|
901 |
-
'id'
|
902 |
-
'class' => '
|
903 |
-
'type'
|
904 |
-
),
|
905 |
-
array(
|
906 |
-
'name'
|
907 |
-
'desc'
|
908 |
-
'id'
|
909 |
-
'class' => '
|
910 |
-
'type'
|
911 |
-
),
|
912 |
-
|
913 |
-
|
914 |
-
'
|
915 |
-
'
|
916 |
-
'
|
917 |
-
'
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
'
|
922 |
-
'
|
923 |
-
'
|
924 |
-
'
|
925 |
-
'
|
926 |
-
|
927 |
-
|
928 |
-
),
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Meta Boxes.
|
4 |
+
*
|
5 |
+
* @package AIOSRS.
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Metabox for review.
|
10 |
+
*
|
11 |
+
* @param array $meta_boxes Meta Boxes.
|
12 |
+
*/
|
13 |
+
function bsf_metaboxes( array $meta_boxes ) {
|
14 |
+
// Start with an underscore to hide fields from custom fields list.
|
15 |
+
$prefix = '_bsf_';
|
16 |
+
$post_types = get_post_types( '', 'names' );
|
17 |
+
|
18 |
+
if ( ! get_option( 'bsf_woocom_init_setting' ) ) {
|
19 |
+
$woo_settings = true;
|
20 |
+
} else {
|
21 |
+
$woo_settings = get_option( 'bsf_woocom_setting' );
|
22 |
+
}
|
23 |
+
|
24 |
+
if ( empty( $woo_settings ) ) {
|
25 |
+
|
26 |
+
$woocommerce_post_type = array( 'product', 'product_variation', 'shop_order', 'shop_order_refund', 'shop_coupon', 'shop_webhook' );
|
27 |
+
$required_post_type = array_diff( $post_types, $woocommerce_post_type );
|
28 |
+
|
29 |
+
} else {
|
30 |
+
|
31 |
+
$exclude_custom_post_type = apply_filters( 'bsf_exclude_custom_post_type', array() );
|
32 |
+
$required_post_type = array_diff( $post_types, $exclude_custom_post_type );
|
33 |
+
|
34 |
+
}
|
35 |
+
|
36 |
+
$meta_boxes[] = array(
|
37 |
+
'id' => 'review_metabox',
|
38 |
+
'title' => __( 'Configure Rich Snippet', 'all-in-one-schemaorg-rich-snippets' ),
|
39 |
+
'pages' => $required_post_type,
|
40 |
+
'context' => 'normal',
|
41 |
+
'priority' => 'high',
|
42 |
+
'show_names' => true, // Show field names on the left.
|
43 |
+
'fields' => array(
|
44 |
+
array(
|
45 |
+
'name' => '',
|
46 |
+
'desc' => '',
|
47 |
+
'id' => $prefix . 'post_type',
|
48 |
+
'class' => 'snippet-type',
|
49 |
+
'type' => 'select',
|
50 |
+
'options' => array(
|
51 |
+
array(
|
52 |
+
'name' => __( 'Select what this post is about', 'all-in-one-schemaorg-rich-snippets' ),
|
53 |
+
'value' => '0',
|
54 |
+
),
|
55 |
+
array(
|
56 |
+
'name' => __( 'Item Review', 'all-in-one-schemaorg-rich-snippets' ),
|
57 |
+
'value' => '1',
|
58 |
+
),
|
59 |
+
array(
|
60 |
+
'name' => __( 'Event', 'all-in-one-schemaorg-rich-snippets' ),
|
61 |
+
'value' => '2',
|
62 |
+
),
|
63 |
+
array(
|
64 |
+
'name' => __( 'Person', 'all-in-one-schemaorg-rich-snippets' ),
|
65 |
+
'value' => '5',
|
66 |
+
),
|
67 |
+
array(
|
68 |
+
'name' => __( 'Product', 'all-in-one-schemaorg-rich-snippets' ),
|
69 |
+
'value' => '6',
|
70 |
+
),
|
71 |
+
array(
|
72 |
+
'name' => __( 'Recipe', 'all-in-one-schemaorg-rich-snippets' ),
|
73 |
+
'value' => '7',
|
74 |
+
),
|
75 |
+
array(
|
76 |
+
'name' => __( 'Software Application', 'all-in-one-schemaorg-rich-snippets' ),
|
77 |
+
'value' => '8',
|
78 |
+
),
|
79 |
+
array(
|
80 |
+
'name' => __( 'Video', 'all-in-one-schemaorg-rich-snippets' ),
|
81 |
+
'value' => '9',
|
82 |
+
),
|
83 |
+
array(
|
84 |
+
'name' => __( 'Article', 'all-in-one-schemaorg-rich-snippets' ),
|
85 |
+
'value' => '10',
|
86 |
+
),
|
87 |
+
array(
|
88 |
+
'name' => __( 'Service', 'all-in-one-schemaorg-rich-snippets' ),
|
89 |
+
'value' => '11',
|
90 |
+
),
|
91 |
+
|
92 |
+
),
|
93 |
+
),
|
94 |
+
// Meta Settings for Item Review.
|
95 |
+
array(
|
96 |
+
'name' => __( 'Rich Snippets - Item Review', 'all-in-one-schemaorg-rich-snippets' ),
|
97 |
+
'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
|
98 |
+
'id' => $prefix . 'review_title',
|
99 |
+
'class' => 'review',
|
100 |
+
'type' => 'title',
|
101 |
+
),
|
102 |
+
array(
|
103 |
+
'name' => __( 'Reviewer’s Name ', 'all-in-one-schemaorg-rich-snippets' ),
|
104 |
+
'desc' => __( 'Enter the name of Item Reviewer or The Post Author.', 'all-in-one-schemaorg-rich-snippets' ),
|
105 |
+
'id' => $prefix . 'item_reviewer',
|
106 |
+
'class' => 'review',
|
107 |
+
'type' => 'text_medium',
|
108 |
+
),
|
109 |
+
array(
|
110 |
+
'name' => __( 'Item to be reviewed', 'all-in-one-schemaorg-rich-snippets' ),
|
111 |
+
'desc' => __( 'Enter the name of the item, you are writing review about.', 'all-in-one-schemaorg-rich-snippets' ),
|
112 |
+
'id' => $prefix . 'item_name',
|
113 |
+
'class' => 'review',
|
114 |
+
'type' => 'text',
|
115 |
+
),
|
116 |
+
array(
|
117 |
+
'name' => __( 'Item Review Type', 'all-in-one-schemaorg-rich-snippets' ),
|
118 |
+
'desc' => __( 'Select the item to be reviewed.', 'all-in-one-schemaorg-rich-snippets' ),
|
119 |
+
'id' => $prefix . 'item_review_type',
|
120 |
+
'class' => 'item_type review',
|
121 |
+
'type' => 'select',
|
122 |
+
'options' => array(
|
123 |
+
array(
|
124 |
+
'name' => __( 'Select Item type', 'all-in-one-schemaorg-rich-snippets' ),
|
125 |
+
'value' => 'none',
|
126 |
+
),
|
127 |
+
array(
|
128 |
+
'name' => __( 'Event', 'all-in-one-schemaorg-rich-snippets' ),
|
129 |
+
'value' => 'item_event',
|
130 |
+
),
|
131 |
+
array(
|
132 |
+
'name' => __( 'Product', 'all-in-one-schemaorg-rich-snippets' ),
|
133 |
+
'value' => 'item_product',
|
134 |
+
),
|
135 |
+
array(
|
136 |
+
'name' => __( 'Recipe', 'all-in-one-schemaorg-rich-snippets' ),
|
137 |
+
'value' => 'item_recipe',
|
138 |
+
),
|
139 |
+
array(
|
140 |
+
'name' => __( 'Software Application', 'all-in-one-schemaorg-rich-snippets' ),
|
141 |
+
'value' => 'item_software',
|
142 |
+
),
|
143 |
+
array(
|
144 |
+
'name' => __( 'Video', 'all-in-one-schemaorg-rich-snippets' ),
|
145 |
+
'value' => 'item_video',
|
146 |
+
),
|
147 |
+
),
|
148 |
+
),
|
149 |
+
array(
|
150 |
+
'name' => __( 'Event Name', 'all-in-one-schemaorg-rich-snippets' ),
|
151 |
+
'desc' => __( 'Enter the Event name.', 'all-in-one-schemaorg-rich-snippets' ),
|
152 |
+
'id' => $prefix . 'item_event_name',
|
153 |
+
'class' => 'event_item_type',
|
154 |
+
'type' => 'text',
|
155 |
+
),
|
156 |
+
array(
|
157 |
+
'name' => __( 'Event Start Date ', 'all-in-one-schemaorg-rich-snippets' ),
|
158 |
+
'desc' => __( 'Provide the Event Start Date.', 'all-in-one-schemaorg-rich-snippets' ),
|
159 |
+
'id' => $prefix . 'item_event_start_date',
|
160 |
+
'class' => 'event_item_type',
|
161 |
+
'type' => 'text_date',
|
162 |
+
),
|
163 |
+
array(
|
164 |
+
'name' => __( 'Event Location ', 'all-in-one-schemaorg-rich-snippets' ),
|
165 |
+
'desc' => __( 'Location Name Here', 'all-in-one-schemaorg-rich-snippets' ),
|
166 |
+
'id' => $prefix . 'item_event_organization',
|
167 |
+
'class' => 'event_item_type',
|
168 |
+
'type' => 'text_medium',
|
169 |
+
),
|
170 |
+
array(
|
171 |
+
'name' => '',
|
172 |
+
'desc' => __( 'Street Address', 'all-in-one-schemaorg-rich-snippets' ),
|
173 |
+
'id' => $prefix . 'item_event_street',
|
174 |
+
'class' => 'event_item_type',
|
175 |
+
'type' => 'text_medium',
|
176 |
+
),
|
177 |
+
array(
|
178 |
+
'name' => '',
|
179 |
+
'desc' => __( 'Locality', 'all-in-one-schemaorg-rich-snippets' ),
|
180 |
+
'id' => $prefix . 'item_event_local',
|
181 |
+
'class' => 'event_item_type',
|
182 |
+
'type' => 'text_medium',
|
183 |
+
),
|
184 |
+
array(
|
185 |
+
'name' => '',
|
186 |
+
'desc' => __( 'Region', 'all-in-one-schemaorg-rich-snippets' ),
|
187 |
+
'id' => $prefix . 'item_event_region',
|
188 |
+
'class' => 'event_item_type',
|
189 |
+
'type' => 'text_medium',
|
190 |
+
),
|
191 |
+
array(
|
192 |
+
'name' => '',
|
193 |
+
'desc' => __( 'Postal Code', 'all-in-one-schemaorg-rich-snippets' ),
|
194 |
+
'id' => $prefix . 'item_event_postal_code',
|
195 |
+
'class' => 'event_item_type',
|
196 |
+
'type' => 'text_medium',
|
197 |
+
),
|
198 |
+
array(
|
199 |
+
'name' => __( 'Product Name', 'all-in-one-schemaorg-rich-snippets' ),
|
200 |
+
'desc' => __( 'Enter the Product name.', 'all-in-one-schemaorg-rich-snippets' ),
|
201 |
+
'id' => $prefix . 'item_pro_name',
|
202 |
+
'class' => 'product_item_type',
|
203 |
+
'type' => 'text',
|
204 |
+
),
|
205 |
+
array(
|
206 |
+
'name' => __( 'Product Price', 'all-in-one-schemaorg-rich-snippets' ),
|
207 |
+
'desc' => __( 'Enter the product Price.', 'all-in-one-schemaorg-rich-snippets' ),
|
208 |
+
'id' => $prefix . 'item_pro_price',
|
209 |
+
'class' => 'product_item_type',
|
210 |
+
'type' => 'text_small',
|
211 |
+
),
|
212 |
+
array(
|
213 |
+
'name' => __( 'Currency ', 'all-in-one-schemaorg-rich-snippets' ),
|
214 |
+
'desc' => __( 'Enter the Currency Code(e.g USD, INR, AUD, EUR, GBP). <a href="http://www.science.co.il/International/Currency-Codes.asp" target="_blank"> Know you currency code</a>', 'all-in-one-schemaorg-rich-snippets' ),
|
215 |
+
'id' => $prefix . 'item_pro_cur',
|
216 |
+
'class' => 'product_item_type',
|
217 |
+
'type' => 'text_small',
|
218 |
+
),
|
219 |
+
array(
|
220 |
+
'name' => __( 'Availability', 'all-in-one-schemaorg-rich-snippets' ),
|
221 |
+
'desc' => __( 'Select the products availability.', 'all-in-one-schemaorg-rich-snippets' ),
|
222 |
+
'id' => $prefix . 'item_pro_status',
|
223 |
+
'class' => 'product_item_type',
|
224 |
+
'type' => 'select',
|
225 |
+
'options' => array(
|
226 |
+
array(
|
227 |
+
'name' => __( '__ Please Select __', 'all-in-one-schemaorg-rich-snippets' ),
|
228 |
+
'value' => '',
|
229 |
+
),
|
230 |
+
array(
|
231 |
+
'name' => __( 'Out of Stock', 'all-in-one-schemaorg-rich-snippets' ),
|
232 |
+
'value' => 'out_of_stock',
|
233 |
+
),
|
234 |
+
array(
|
235 |
+
'name' => __( 'In Stock', 'all-in-one-schemaorg-rich-snippets' ),
|
236 |
+
'value' => 'in_stock',
|
237 |
+
),
|
238 |
+
array(
|
239 |
+
'name' => __( 'In Store Only', 'all-in-one-schemaorg-rich-snippets' ),
|
240 |
+
'value' => 'instore_only',
|
241 |
+
),
|
242 |
+
array(
|
243 |
+
'name' => __( 'Pre-Order', 'all-in-one-schemaorg-rich-snippets' ),
|
244 |
+
'value' => 'preorder',
|
245 |
+
),
|
246 |
+
),
|
247 |
+
),
|
248 |
+
array(
|
249 |
+
'name' => __( 'Recipe Name ', 'all-in-one-schemaorg-rich-snippets' ),
|
250 |
+
'desc' => __( 'Enter the recipe name.', 'all-in-one-schemaorg-rich-snippets' ),
|
251 |
+
'id' => $prefix . 'item_recipes_name',
|
252 |
+
'class' => 'recipes_item_type',
|
253 |
+
'type' => 'text_medium',
|
254 |
+
),
|
255 |
+
array(
|
256 |
+
'name' => __( 'Recipe Photo', 'all-in-one-schemaorg-rich-snippets' ),
|
257 |
+
'desc' => __( 'Upload or Select recipe photo. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
|
258 |
+
'id' => $prefix . 'item_recipes_photo',
|
259 |
+
'class' => 'recipes_item_type',
|
260 |
+
'type' => 'file',
|
261 |
+
),
|
262 |
+
array(
|
263 |
+
'name' => __( 'Software Name', 'all-in-one-schemaorg-rich-snippets' ),
|
264 |
+
'desc' => __( 'Enter the Software name.', 'all-in-one-schemaorg-rich-snippets' ),
|
265 |
+
'id' => $prefix . 'item_soft_name',
|
266 |
+
'class' => 'soft_item_type',
|
267 |
+
'type' => 'text',
|
268 |
+
),
|
269 |
+
array(
|
270 |
+
'name' => __( 'Software Operating System', 'all-in-one-schemaorg-rich-snippets' ),
|
271 |
+
'desc' => __( 'Enter the Operating System name.', 'all-in-one-schemaorg-rich-snippets' ),
|
272 |
+
'id' => $prefix . 'item_os_name',
|
273 |
+
'class' => 'soft_item_type',
|
274 |
+
'type' => 'text',
|
275 |
+
),
|
276 |
+
array(
|
277 |
+
'name' => __( 'Software Application Category', 'all-in-one-schemaorg-rich-snippets' ),
|
278 |
+
'desc' => __( 'Enter the Application Category name.', 'all-in-one-schemaorg-rich-snippets' ),
|
279 |
+
'id' => $prefix . 'item_app_name',
|
280 |
+
'class' => 'soft_item_type',
|
281 |
+
'type' => 'text',
|
282 |
+
),
|
283 |
+
array(
|
284 |
+
'name' => __( 'Video Title', 'all-in-one-schemaorg-rich-snippets' ),
|
285 |
+
'desc' => __( 'Enter the title for this video', 'all-in-one-schemaorg-rich-snippets' ),
|
286 |
+
'id' => $prefix . 'item_video_title',
|
287 |
+
'class' => 'video_item_type',
|
288 |
+
'type' => 'text',
|
289 |
+
),
|
290 |
+
array(
|
291 |
+
'name' => __( 'Video Description', 'all-in-one-schemaorg-rich-snippets' ),
|
292 |
+
'desc' => __( 'Enter the brief description for this video', 'all-in-one-schemaorg-rich-snippets' ),
|
293 |
+
'id' => $prefix . 'item_video_desc',
|
294 |
+
'class' => 'video_item_type',
|
295 |
+
'type' => 'textarea_small',
|
296 |
+
),
|
297 |
+
array(
|
298 |
+
'name' => __( 'Video Thumbnail', 'all-in-one-schemaorg-rich-snippets' ),
|
299 |
+
'desc' => __( 'Upload or select video thumbnail from gallery. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
|
300 |
+
'id' => $prefix . 'item_video_thumb',
|
301 |
+
'class' => 'video_item_type',
|
302 |
+
'type' => 'file',
|
303 |
+
),
|
304 |
+
array(
|
305 |
+
'name' => __( 'Upload Date', 'all-in-one-schemaorg-rich-snippets' ),
|
306 |
+
'desc' => __( 'Provide the date when the video is uploaded', 'all-in-one-schemaorg-rich-snippets' ),
|
307 |
+
'id' => $prefix . 'item_video_date',
|
308 |
+
'class' => 'video_item_type',
|
309 |
+
'type' => 'text_date',
|
310 |
+
),
|
311 |
+
array(
|
312 |
+
'name' => __( 'Your Rating', 'all-in-one-schemaorg-rich-snippets' ),
|
313 |
+
'desc' => __( ' Rate this item (1-5)', 'all-in-one-schemaorg-rich-snippets' ),
|
314 |
+
'id' => $prefix . 'rating',
|
315 |
+
'class' => 'star review',
|
316 |
+
'type' => 'radio',
|
317 |
+
'options' => array(
|
318 |
+
array(
|
319 |
+
'name' => '',
|
320 |
+
'value' => '1',
|
321 |
+
),
|
322 |
+
array(
|
323 |
+
'name' => '',
|
324 |
+
'value' => '2',
|
325 |
+
),
|
326 |
+
array(
|
327 |
+
'name' => '',
|
328 |
+
'value' => '3',
|
329 |
+
),
|
330 |
+
array(
|
331 |
+
'name' => '',
|
332 |
+
'value' => '4',
|
333 |
+
),
|
334 |
+
array(
|
335 |
+
'name' => '',
|
336 |
+
'value' => '5',
|
337 |
+
),
|
338 |
+
),
|
339 |
+
),
|
340 |
+
// Meta Settings for Events.
|
341 |
+
array(
|
342 |
+
'name' => __( 'Rich Snippets - Events', 'all-in-one-schemaorg-rich-snippets' ),
|
343 |
+
'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
|
344 |
+
'id' => $prefix . 'events',
|
345 |
+
'class' => 'events',
|
346 |
+
'type' => 'title',
|
347 |
+
),
|
348 |
+
array(
|
349 |
+
'name' => __( 'Event Title ', 'all-in-one-schemaorg-rich-snippets' ),
|
350 |
+
'desc' => __( 'What would be the name of the event?', 'all-in-one-schemaorg-rich-snippets' ),
|
351 |
+
'id' => $prefix . 'event_title',
|
352 |
+
'class' => 'events',
|
353 |
+
'type' => 'text',
|
354 |
+
),
|
355 |
+
array(
|
356 |
+
'name' => __( 'Location ', 'all-in-one-schemaorg-rich-snippets' ),
|
357 |
+
'desc' => __( 'Location Name Here', 'all-in-one-schemaorg-rich-snippets' ),
|
358 |
+
'id' => $prefix . 'event_organization',
|
359 |
+
'class' => 'events',
|
360 |
+
'type' => 'text_medium',
|
361 |
+
),
|
362 |
+
array(
|
363 |
+
'name' => '',
|
364 |
+
'desc' => __( 'Street Address', 'all-in-one-schemaorg-rich-snippets' ),
|
365 |
+
'id' => $prefix . 'event_street',
|
366 |
+
'class' => 'events',
|
367 |
+
'type' => 'text_medium',
|
368 |
+
),
|
369 |
+
array(
|
370 |
+
'name' => '',
|
371 |
+
'desc' => __( 'Locality', 'all-in-one-schemaorg-rich-snippets' ),
|
372 |
+
'id' => $prefix . 'event_local',
|
373 |
+
'class' => 'events',
|
374 |
+
'type' => 'text_medium',
|
375 |
+
),
|
376 |
+
array(
|
377 |
+
'name' => '',
|
378 |
+
'desc' => __( 'Region', 'all-in-one-schemaorg-rich-snippets' ),
|
379 |
+
'id' => $prefix . 'event_region',
|
380 |
+
'class' => 'events',
|
381 |
+
'type' => 'text_medium',
|
382 |
+
),
|
383 |
+
array(
|
384 |
+
'name' => '',
|
385 |
+
'desc' => __( 'Postal Code', 'all-in-one-schemaorg-rich-snippets' ),
|
386 |
+
'id' => $prefix . 'event_postal_code',
|
387 |
+
'class' => 'events',
|
388 |
+
'type' => 'text_medium',
|
389 |
+
),
|
390 |
+
array(
|
391 |
+
'name' => __( 'Description ', 'all-in-one-schemaorg-rich-snippets' ),
|
392 |
+
'desc' => __( 'Describe the event in short.', 'all-in-one-schemaorg-rich-snippets' ),
|
393 |
+
'id' => $prefix . 'event_desc',
|
394 |
+
'class' => 'events',
|
395 |
+
'type' => 'textarea_small',
|
396 |
+
),
|
397 |
+
array(
|
398 |
+
'name' => __( 'Start Date ', 'all-in-one-schemaorg-rich-snippets' ),
|
399 |
+
'desc' => __( 'Provide the Event Start Date.', 'all-in-one-schemaorg-rich-snippets' ),
|
400 |
+
'id' => $prefix . 'event_start_date',
|
401 |
+
'class' => 'events',
|
402 |
+
'type' => 'text_date',
|
403 |
+
),
|
404 |
+
array(
|
405 |
+
'name' => __( 'End Date ', 'all-in-one-schemaorg-rich-snippets' ),
|
406 |
+
'desc' => __( 'Provide the Event End Date.', 'all-in-one-schemaorg-rich-snippets' ),
|
407 |
+
'id' => $prefix . 'event_end_date',
|
408 |
+
'class' => 'events',
|
409 |
+
'type' => 'text_date',
|
410 |
+
),
|
411 |
+
array(
|
412 |
+
'name' => __( 'Offer Price', 'all-in-one-schemaorg-rich-snippets' ),
|
413 |
+
'desc' => __( 'Enter the ticket Price.', 'all-in-one-schemaorg-rich-snippets' ),
|
414 |
+
'id' => $prefix . 'event_price',
|
415 |
+
'class' => 'events',
|
416 |
+
'type' => 'text_small',
|
417 |
+
),
|
418 |
+
array(
|
419 |
+
'name' => __( 'Currency ', 'all-in-one-schemaorg-rich-snippets' ),
|
420 |
+
'desc' => __( 'Enter the Currency Code(e.g USD, INR, AUD, EUR, GBP). <a href="http://www.science.co.il/International/Currency-Codes.asp" target="_blank"> Know you currency code</a>', 'all-in-one-schemaorg-rich-snippets' ),
|
421 |
+
'id' => $prefix . 'event_cur',
|
422 |
+
'class' => 'events',
|
423 |
+
'type' => 'text_small',
|
424 |
+
),
|
425 |
+
array(
|
426 |
+
'name' => __( 'Url ', 'all-in-one-schemaorg-rich-snippets' ),
|
427 |
+
'desc' => __( 'Url of buy ticket page', 'all-in-one-schemaorg-rich-snippets' ),
|
428 |
+
'id' => $prefix . 'event_ticket_url',
|
429 |
+
'class' => 'events',
|
430 |
+
'type' => 'text',
|
431 |
+
),
|
432 |
+
// Meta Settings for Music.
|
433 |
+
array(
|
434 |
+
'name' => __( 'Rich Snippets - Music', 'all-in-one-schemaorg-rich-snippets' ),
|
435 |
+
'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
|
436 |
+
'id' => $prefix . 'music',
|
437 |
+
'class' => 'music',
|
438 |
+
'type' => 'title',
|
439 |
+
),
|
440 |
+
// Meta Settings for Organization.
|
441 |
+
array(
|
442 |
+
'name' => __( 'Rich Snippets - Organization', 'all-in-one-schemaorg-rich-snippets' ),
|
443 |
+
'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
|
444 |
+
'id' => $prefix . 'organization',
|
445 |
+
'class' => 'organization',
|
446 |
+
'type' => 'title',
|
447 |
+
),
|
448 |
+
array(
|
449 |
+
'name' => __( 'Organization Name ', 'all-in-one-schemaorg-rich-snippets' ),
|
450 |
+
'desc' => __( 'Enter the Company or Organization Name.', 'all-in-one-schemaorg-rich-snippets' ),
|
451 |
+
'id' => $prefix . 'organization_name',
|
452 |
+
'class' => 'organization',
|
453 |
+
'type' => 'text',
|
454 |
+
),
|
455 |
+
array(
|
456 |
+
'name' => __( 'Website URL ', 'all-in-one-schemaorg-rich-snippets' ),
|
457 |
+
'desc' => __( 'Enter the Organization homepage url.', 'all-in-one-schemaorg-rich-snippets' ),
|
458 |
+
'id' => $prefix . 'organization_url',
|
459 |
+
'class' => 'organization',
|
460 |
+
'type' => 'text_medium',
|
461 |
+
),
|
462 |
+
array(
|
463 |
+
'name' => __( 'Contact No. ', 'all-in-one-schemaorg-rich-snippets' ),
|
464 |
+
'desc' => __( 'Enter the Telephone No.', 'all-in-one-schemaorg-rich-snippets' ),
|
465 |
+
'id' => $prefix . 'organization_tel',
|
466 |
+
'class' => 'organization',
|
467 |
+
'type' => 'text_medium',
|
468 |
+
),
|
469 |
+
array(
|
470 |
+
'name' => __( 'Address ', 'all-in-one-schemaorg-rich-snippets' ),
|
471 |
+
'desc' => __( 'Street Name.', 'all-in-one-schemaorg-rich-snippets' ),
|
472 |
+
'id' => $prefix . 'organization_street',
|
473 |
+
'class' => 'organization',
|
474 |
+
'type' => 'text_medium',
|
475 |
+
),
|
476 |
+
array(
|
477 |
+
'name' => '',
|
478 |
+
'desc' => __( 'Locality.', 'all-in-one-schemaorg-rich-snippets' ),
|
479 |
+
'id' => $prefix . 'organization_local',
|
480 |
+
'class' => 'organization',
|
481 |
+
'type' => 'text_medium',
|
482 |
+
),
|
483 |
+
array(
|
484 |
+
'name' => '',
|
485 |
+
'desc' => __( 'Region.', 'all-in-one-schemaorg-rich-snippets' ),
|
486 |
+
'id' => $prefix . 'organization_region',
|
487 |
+
'class' => 'organization',
|
488 |
+
'type' => 'text_medium',
|
489 |
+
),
|
490 |
+
array(
|
491 |
+
'name' => '',
|
492 |
+
'desc' => __( 'Postal Code', 'all-in-one-schemaorg-rich-snippets' ),
|
493 |
+
'id' => $prefix . 'organization_zip',
|
494 |
+
'class' => 'organization',
|
495 |
+
'type' => 'text_medium',
|
496 |
+
),
|
497 |
+
array(
|
498 |
+
'name' => '',
|
499 |
+
'desc' => __( 'Country Name', 'all-in-one-schemaorg-rich-snippets' ),
|
500 |
+
'id' => $prefix . 'organization_country',
|
501 |
+
'class' => 'organization',
|
502 |
+
'type' => 'text_medium',
|
503 |
+
),
|
504 |
+
array(
|
505 |
+
'name' => __( 'GEO Location', 'all-in-one-schemaorg-rich-snippets' ),
|
506 |
+
'desc' => __( 'Latitude. <a href="http://universimmedia.pagesperso-orange.fr/geo/loc.htm" target="_blank">Find Here.</a>', 'all-in-one-schemaorg-rich-snippets' ),
|
507 |
+
'id' => $prefix . 'organization_latitide',
|
508 |
+
'class' => 'organization',
|
509 |
+
'type' => 'text_medium',
|
510 |
+
),
|
511 |
+
array(
|
512 |
+
'name' => '',
|
513 |
+
'desc' => __( 'Longitude.', 'all-in-one-schemaorg-rich-snippets' ),
|
514 |
+
'id' => $prefix . 'organization_longitude',
|
515 |
+
'class' => 'organization',
|
516 |
+
'type' => 'text_medium',
|
517 |
+
),
|
518 |
+
// Meta Settings for People.
|
519 |
+
array(
|
520 |
+
'name' => __( 'Rich Snippets - Person', 'all-in-one-schemaorg-rich-snippets' ),
|
521 |
+
'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
|
522 |
+
'id' => $prefix . 'people',
|
523 |
+
'class' => 'people',
|
524 |
+
'type' => 'title',
|
525 |
+
),
|
526 |
+
array(
|
527 |
+
'name' => __( 'Person‘s Name', 'all-in-one-schemaorg-rich-snippets' ),
|
528 |
+
'desc' => __( 'Enter the relative person‘s name.', 'all-in-one-schemaorg-rich-snippets' ),
|
529 |
+
'id' => $prefix . 'people_fn',
|
530 |
+
'class' => 'people',
|
531 |
+
'type' => 'text_medium',
|
532 |
+
),
|
533 |
+
array(
|
534 |
+
'name' => __( 'Nickname', 'all-in-one-schemaorg-rich-snippets' ),
|
535 |
+
'desc' => __( 'Enter the nickname (if any).', 'all-in-one-schemaorg-rich-snippets' ),
|
536 |
+
'id' => $prefix . 'people_nickname',
|
537 |
+
'class' => 'people',
|
538 |
+
'type' => 'text_medium',
|
539 |
+
),
|
540 |
+
array(
|
541 |
+
'name' => __( 'Photograph', 'all-in-one-schemaorg-rich-snippets' ),
|
542 |
+
'desc' => __( 'Upload the photo or select from media library. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
|
543 |
+
'id' => $prefix . 'people_photo',
|
544 |
+
'class' => 'people',
|
545 |
+
'type' => 'file',
|
546 |
+
),
|
547 |
+
array(
|
548 |
+
'name' => __( 'Job Title ', 'all-in-one-schemaorg-rich-snippets' ),
|
549 |
+
'desc' => __( 'Enter job title.', 'all-in-one-schemaorg-rich-snippets' ),
|
550 |
+
'id' => $prefix . 'people_job_title',
|
551 |
+
'class' => 'people',
|
552 |
+
'type' => 'text_medium',
|
553 |
+
),
|
554 |
+
array(
|
555 |
+
'name' => __( 'Homepage URL', 'all-in-one-schemaorg-rich-snippets' ),
|
556 |
+
'desc' => __( 'Enter homepage URL(if any).', 'all-in-one-schemaorg-rich-snippets' ),
|
557 |
+
'id' => $prefix . 'people_website',
|
558 |
+
'class' => 'people',
|
559 |
+
'type' => 'text_medium',
|
560 |
+
),
|
561 |
+
array(
|
562 |
+
'name' => __( 'Company / Organization', 'all-in-one-schemaorg-rich-snippets' ),
|
563 |
+
'desc' => __( 'Enter Company or Organization name in affiliation.', 'all-in-one-schemaorg-rich-snippets' ),
|
564 |
+
'id' => $prefix . 'people_company',
|
565 |
+
'class' => 'people',
|
566 |
+
'type' => 'text_medium',
|
567 |
+
),
|
568 |
+
array(
|
569 |
+
'name' => __( 'Address', 'all-in-one-schemaorg-rich-snippets' ),
|
570 |
+
'desc' => __( 'Enter Street', 'all-in-one-schemaorg-rich-snippets' ),
|
571 |
+
'id' => $prefix . 'people_street',
|
572 |
+
'class' => 'people',
|
573 |
+
'type' => 'text_medium',
|
574 |
+
),
|
575 |
+
array(
|
576 |
+
'name' => '',
|
577 |
+
'desc' => __( 'Enter Locality', 'all-in-one-schemaorg-rich-snippets' ),
|
578 |
+
'id' => $prefix . 'people_local',
|
579 |
+
'class' => 'people',
|
580 |
+
'type' => 'text_medium',
|
581 |
+
),
|
582 |
+
array(
|
583 |
+
'name' => '',
|
584 |
+
'desc' => __( 'Region', 'all-in-one-schemaorg-rich-snippets' ),
|
585 |
+
'id' => $prefix . 'people_region',
|
586 |
+
'class' => 'people',
|
587 |
+
'type' => 'text_medium',
|
588 |
+
),
|
589 |
+
array(
|
590 |
+
'name' => '',
|
591 |
+
'desc' => __( 'Postal Code', 'all-in-one-schemaorg-rich-snippets' ),
|
592 |
+
'id' => $prefix . 'people_postal',
|
593 |
+
'class' => 'people',
|
594 |
+
'type' => 'text_medium',
|
595 |
+
),
|
596 |
+
|
597 |
+
// Meta Settings for Products.
|
598 |
+
array(
|
599 |
+
'name' => __( 'Rich Snippets - Products', 'all-in-one-schemaorg-rich-snippets' ),
|
600 |
+
'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
|
601 |
+
'id' => $prefix . 'product',
|
602 |
+
'class' => 'product',
|
603 |
+
'type' => 'title',
|
604 |
+
),
|
605 |
+
array(
|
606 |
+
'name' => __( 'Your Rating', 'all-in-one-schemaorg-rich-snippets' ),
|
607 |
+
'desc' => __( 'Rate this product or aggregate rating.', 'all-in-one-schemaorg-rich-snippets' ),
|
608 |
+
'id' => $prefix . 'product_rating',
|
609 |
+
'class' => 'star product',
|
610 |
+
'type' => 'radio',
|
611 |
+
'options' => array(
|
612 |
+
array(
|
613 |
+
'name' => '',
|
614 |
+
'value' => '1',
|
615 |
+
),
|
616 |
+
array(
|
617 |
+
'name' => '',
|
618 |
+
'value' => '2',
|
619 |
+
),
|
620 |
+
array(
|
621 |
+
'name' => '',
|
622 |
+
'value' => '3',
|
623 |
+
),
|
624 |
+
array(
|
625 |
+
'name' => '',
|
626 |
+
'value' => '4',
|
627 |
+
),
|
628 |
+
array(
|
629 |
+
'name' => '',
|
630 |
+
'value' => '5',
|
631 |
+
),
|
632 |
+
),
|
633 |
+
),
|
634 |
+
array(
|
635 |
+
'name' => __( 'Brand Name', 'all-in-one-schemaorg-rich-snippets' ),
|
636 |
+
'desc' => __( 'Enter the products brand name', 'all-in-one-schemaorg-rich-snippets' ),
|
637 |
+
'id' => $prefix . 'product_brand',
|
638 |
+
'class' => 'product',
|
639 |
+
'type' => 'text_medium',
|
640 |
+
),
|
641 |
+
array(
|
642 |
+
'name' => __( 'Product Name', 'all-in-one-schemaorg-rich-snippets' ),
|
643 |
+
'desc' => __( 'Enter the product name.', 'all-in-one-schemaorg-rich-snippets' ),
|
644 |
+
'id' => $prefix . 'product_name',
|
645 |
+
'class' => 'product',
|
646 |
+
'type' => 'text_medium',
|
647 |
+
),
|
648 |
+
array(
|
649 |
+
'name' => __( 'Product Image', 'all-in-one-schemaorg-rich-snippets' ),
|
650 |
+
'desc' => __( 'Upload the product image or select from library. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
|
651 |
+
'id' => $prefix . 'product_image',
|
652 |
+
'class' => 'product',
|
653 |
+
'type' => 'file',
|
654 |
+
),
|
655 |
+
array(
|
656 |
+
'name' => __( 'Product Price', 'all-in-one-schemaorg-rich-snippets' ),
|
657 |
+
'desc' => __( 'Enter the product Price.', 'all-in-one-schemaorg-rich-snippets' ),
|
658 |
+
'id' => $prefix . 'product_price',
|
659 |
+
'class' => 'product',
|
660 |
+
'type' => 'text_small',
|
661 |
+
),
|
662 |
+
array(
|
663 |
+
'name' => __( 'Currency ', 'all-in-one-schemaorg-rich-snippets' ),
|
664 |
+
'desc' => __( 'Enter the Currency Code(e.g USD, INR, AUD, EUR, GBP). <a href="http://www.science.co.il/International/Currency-Codes.asp" target="_blank"> Know you currency code</a>', 'all-in-one-schemaorg-rich-snippets' ),
|
665 |
+
'id' => $prefix . 'product_cur',
|
666 |
+
'class' => 'product',
|
667 |
+
'type' => 'text_small',
|
668 |
+
),
|
669 |
+
array(
|
670 |
+
'name' => __( 'Availability', 'all-in-one-schemaorg-rich-snippets' ),
|
671 |
+
'desc' => __( 'Select the products availability.', 'all-in-one-schemaorg-rich-snippets' ),
|
672 |
+
'id' => $prefix . 'product_status',
|
673 |
+
'class' => 'product',
|
674 |
+
'type' => 'select',
|
675 |
+
'options' => array(
|
676 |
+
array(
|
677 |
+
'name' => __( '__ Please Select __', 'all-in-one-schemaorg-rich-snippets' ),
|
678 |
+
'value' => '',
|
679 |
+
),
|
680 |
+
array(
|
681 |
+
'name' => __( 'Out of Stock', 'all-in-one-schemaorg-rich-snippets' ),
|
682 |
+
'value' => 'out_of_stock',
|
683 |
+
),
|
684 |
+
array(
|
685 |
+
'name' => __( 'In Stock', 'all-in-one-schemaorg-rich-snippets' ),
|
686 |
+
'value' => 'in_stock',
|
687 |
+
),
|
688 |
+
array(
|
689 |
+
'name' => __( 'In Store Only', 'all-in-one-schemaorg-rich-snippets' ),
|
690 |
+
'value' => 'instore_only',
|
691 |
+
),
|
692 |
+
array(
|
693 |
+
'name' => __( 'Pre-Order', 'all-in-one-schemaorg-rich-snippets' ),
|
694 |
+
'value' => 'preorder',
|
695 |
+
),
|
696 |
+
),
|
697 |
+
), // Meta Settings for Recipes.
|
698 |
+
array(
|
699 |
+
'name' => __( 'Rich Snippets - Recipes', 'all-in-one-schemaorg-rich-snippets' ),
|
700 |
+
'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
|
701 |
+
'id' => $prefix . 'recipes',
|
702 |
+
'class' => 'recipes',
|
703 |
+
'type' => 'title',
|
704 |
+
),
|
705 |
+
array(
|
706 |
+
'name' => __( 'Recipe Name ', 'all-in-one-schemaorg-rich-snippets' ),
|
707 |
+
'desc' => __( 'Enter the recipe name.', 'all-in-one-schemaorg-rich-snippets' ),
|
708 |
+
'id' => $prefix . 'recipes_name',
|
709 |
+
'class' => 'recipes',
|
710 |
+
'type' => 'text_medium',
|
711 |
+
),
|
712 |
+
array(
|
713 |
+
'name' => __( 'Author Name ', 'all-in-one-schemaorg-rich-snippets' ),
|
714 |
+
'desc' => __( 'Enter the Author name.', 'all-in-one-schemaorg-rich-snippets' ),
|
715 |
+
'id' => $prefix . 'authors_name',
|
716 |
+
'class' => 'recipes',
|
717 |
+
'type' => 'text_medium',
|
718 |
+
),
|
719 |
+
array(
|
720 |
+
'name' => __( 'Time Required ', 'all-in-one-schemaorg-rich-snippets' ),
|
721 |
+
'desc' => __( 'Preperation time (Format: 1H30M. H - Hours, M - Minutes )', 'all-in-one-schemaorg-rich-snippets' ),
|
722 |
+
'id' => $prefix . 'recipes_preptime',
|
723 |
+
'class' => 'recipes',
|
724 |
+
'type' => 'text_small',
|
725 |
+
),
|
726 |
+
array(
|
727 |
+
'name' => '',
|
728 |
+
'desc' => __( 'Cook Time. (Format: 1H30M. H - Hours, M - Minutes )', 'all-in-one-schemaorg-rich-snippets' ),
|
729 |
+
'id' => $prefix . 'recipes_cooktime',
|
730 |
+
'class' => 'recipes',
|
731 |
+
'type' => 'text_small',
|
732 |
+
),
|
733 |
+
array(
|
734 |
+
'name' => '',
|
735 |
+
'desc' => __( 'Total Time (Format: 1H30M. H - Hours, M - Minutes )', 'all-in-one-schemaorg-rich-snippets' ),
|
736 |
+
'id' => $prefix . 'recipes_totaltime',
|
737 |
+
'class' => 'recipes',
|
738 |
+
'type' => 'text_small',
|
739 |
+
),
|
740 |
+
array(
|
741 |
+
'name' => __( 'Description', 'all-in-one-schemaorg-rich-snippets' ),
|
742 |
+
'desc' => __( 'Describe the recipe in short.', 'all-in-one-schemaorg-rich-snippets' ),
|
743 |
+
'id' => $prefix . 'recipes_desc',
|
744 |
+
'class' => 'recipes',
|
745 |
+
'type' => 'textarea_small',
|
746 |
+
),
|
747 |
+
array(
|
748 |
+
'name' => __( 'Nutrition', 'all-in-one-schemaorg-rich-snippets' ),
|
749 |
+
'desc' => __( 'Nutrition', 'all-in-one-schemaorg-rich-snippets' ),
|
750 |
+
'id' => $prefix . 'recipes_nutrition',
|
751 |
+
'class' => 'recipes',
|
752 |
+
'type' => 'text_medium',
|
753 |
+
),
|
754 |
+
array(
|
755 |
+
'name' => __( 'Ingredients', 'all-in-one-schemaorg-rich-snippets' ),
|
756 |
+
'desc' => __( 'Enter the ingredients used', 'all-in-one-schemaorg-rich-snippets' ),
|
757 |
+
'id' => $prefix . 'recipes_ingredient',
|
758 |
+
'class' => 'recipes',
|
759 |
+
'type' => 'text_medium',
|
760 |
+
),
|
761 |
+
array(
|
762 |
+
'name' => __( 'Recipe Photo', 'all-in-one-schemaorg-rich-snippets' ),
|
763 |
+
'desc' => __( 'Upload or Select recipe photo. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
|
764 |
+
'id' => $prefix . 'recipes_photo',
|
765 |
+
'class' => 'recipes',
|
766 |
+
'type' => 'file',
|
767 |
+
),
|
768 |
+
// Meta Settings for Software Application.
|
769 |
+
array(
|
770 |
+
'name' => __( 'Rich Snippets - Software Application', 'all-in-one-schemaorg-rich-snippets' ),
|
771 |
+
'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
|
772 |
+
'id' => $prefix . 'software',
|
773 |
+
'class' => 'software',
|
774 |
+
'type' => 'title',
|
775 |
+
),
|
776 |
+
array(
|
777 |
+
'name' => __( 'Software Rating', 'all-in-one-schemaorg-rich-snippets' ),
|
778 |
+
'desc' => __( 'Rate this software.', 'all-in-one-schemaorg-rich-snippets' ),
|
779 |
+
'id' => $prefix . 'software_rating',
|
780 |
+
'class' => 'star software',
|
781 |
+
'type' => 'radio',
|
782 |
+
'options' => array(
|
783 |
+
array(
|
784 |
+
'name' => '',
|
785 |
+
'value' => '1',
|
786 |
+
),
|
787 |
+
array(
|
788 |
+
'name' => '',
|
789 |
+
'value' => '2',
|
790 |
+
),
|
791 |
+
array(
|
792 |
+
'name' => '',
|
793 |
+
'value' => '3',
|
794 |
+
),
|
795 |
+
array(
|
796 |
+
'name' => '',
|
797 |
+
'value' => '4',
|
798 |
+
),
|
799 |
+
array(
|
800 |
+
'name' => '',
|
801 |
+
'value' => '5',
|
802 |
+
),
|
803 |
+
),
|
804 |
+
),
|
805 |
+
array(
|
806 |
+
'name' => __( 'Price', 'all-in-one-schemaorg-rich-snippets' ),
|
807 |
+
'desc' => __( 'Enter the Price of Software', 'all-in-one-schemaorg-rich-snippets' ),
|
808 |
+
'id' => $prefix . 'software_price',
|
809 |
+
'class' => 'software',
|
810 |
+
'type' => 'text_small',
|
811 |
+
),
|
812 |
+
array(
|
813 |
+
'name' => __( 'Currency', 'all-in-one-schemaorg-rich-snippets' ),
|
814 |
+
'desc' => __( 'Enter the Currency Code(e.g USD, INR, AUD, EUR, GBP). <a href="http://www.science.co.il/International/Currency-Codes.asp" target="_blank"> Know you currency code</a>', 'all-in-one-schemaorg-rich-snippets' ),
|
815 |
+
'id' => $prefix . 'software_cur',
|
816 |
+
'class' => 'software',
|
817 |
+
'type' => 'text_small',
|
818 |
+
),
|
819 |
+
array(
|
820 |
+
'name' => __( 'Software Name ', 'all-in-one-schemaorg-rich-snippets' ),
|
821 |
+
'desc' => __( 'Enter the Software Name.', 'all-in-one-schemaorg-rich-snippets' ),
|
822 |
+
'id' => $prefix . 'software_name',
|
823 |
+
'class' => 'software',
|
824 |
+
'type' => 'text_medium',
|
825 |
+
),
|
826 |
+
array(
|
827 |
+
'name' => __( 'Operating System', 'all-in-one-schemaorg-rich-snippets' ),
|
828 |
+
'desc' => __( 'Enter the software Operating System.', 'all-in-one-schemaorg-rich-snippets' ),
|
829 |
+
'id' => $prefix . 'software_os',
|
830 |
+
'class' => 'software',
|
831 |
+
'type' => 'text_medium',
|
832 |
+
),
|
833 |
+
array(
|
834 |
+
'name' => __( 'Application Category', 'all-in-one-schemaorg-rich-snippets' ),
|
835 |
+
'desc' => __( 'Like Game, Multimedia', 'all-in-one-schemaorg-rich-snippets' ),
|
836 |
+
'id' => $prefix . 'software_cat',
|
837 |
+
'class' => 'software',
|
838 |
+
'type' => 'text_medium',
|
839 |
+
),
|
840 |
+
array(
|
841 |
+
'name' => __( 'Software Image', 'all-in-one-schemaorg-rich-snippets' ),
|
842 |
+
'desc' => __( 'Upload or select image of software. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
|
843 |
+
'id' => $prefix . 'software_image',
|
844 |
+
'class' => 'software',
|
845 |
+
'type' => 'file',
|
846 |
+
),
|
847 |
+
array(
|
848 |
+
'name' => __( 'Landing Page', 'all-in-one-schemaorg-rich-snippets' ),
|
849 |
+
'desc' => __( 'Enter the landing page url for software', 'all-in-one-schemaorg-rich-snippets' ),
|
850 |
+
'id' => $prefix . 'software_landing',
|
851 |
+
'class' => 'software',
|
852 |
+
'type' => 'text',
|
853 |
+
), // Meta Settings for Video.
|
854 |
+
array(
|
855 |
+
'name' => __( 'Rich Snippets - Videos', 'all-in-one-schemaorg-rich-snippets' ),
|
856 |
+
'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
|
857 |
+
'id' => $prefix . 'video',
|
858 |
+
'class' => 'video',
|
859 |
+
'type' => 'title',
|
860 |
+
),
|
861 |
+
array(
|
862 |
+
'name' => __( 'Video Title', 'all-in-one-schemaorg-rich-snippets' ),
|
863 |
+
'desc' => __( 'Enter the title for this video', 'all-in-one-schemaorg-rich-snippets' ),
|
864 |
+
'id' => $prefix . 'video_title',
|
865 |
+
'class' => 'video',
|
866 |
+
'type' => 'text',
|
867 |
+
),
|
868 |
+
array(
|
869 |
+
'name' => __( 'Video Description', 'all-in-one-schemaorg-rich-snippets' ),
|
870 |
+
'desc' => __( 'Enter the brief description for this video', 'all-in-one-schemaorg-rich-snippets' ),
|
871 |
+
'id' => $prefix . 'video_desc',
|
872 |
+
'class' => 'video',
|
873 |
+
'type' => 'textarea_small',
|
874 |
+
),
|
875 |
+
array(
|
876 |
+
'name' => __( 'Video Thumbnail', 'all-in-one-schemaorg-rich-snippets' ),
|
877 |
+
'desc' => __( 'Upload or select video thumbnail from gallery. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
|
878 |
+
'id' => $prefix . 'video_thumb',
|
879 |
+
'class' => 'video',
|
880 |
+
'type' => 'file',
|
881 |
+
),
|
882 |
+
array(
|
883 |
+
'name' => __( 'Video', 'all-in-one-schemaorg-rich-snippets' ),
|
884 |
+
'desc' => __( 'Upload Video or enter the video file url<br>Example: <br> http://www.example.com/video123.flv<br>A URL pointing to the actual video media file. This file should be in .mpg, .mpeg, .mp4, .m4v, .mov, .wmv, .avi, .flv, or other video file format', 'all-in-one-schemaorg-rich-snippets' ),
|
885 |
+
'id' => $prefix . 'video_url',
|
886 |
+
'class' => 'video',
|
887 |
+
'type' => 'file',
|
888 |
+
),
|
889 |
+
|
890 |
+
array(
|
891 |
+
'name' => __( 'Embed Video', 'all-in-one-schemaorg-rich-snippets' ),
|
892 |
+
'desc' => __( 'A URL pointing to a player for the specific video. Usually this is the information in the src element of an <embed>tag. <br>Example: <br>Youtube: https://www.youtube.com/embed/CibazcCevOk <br>Dailymotion: http://www.dailymotion.com/swf/x1o2g<br><div class="bsf_vd_note"><h3>Add only one url either in "Video" or "Embed Video" field. Dont use both.</h3></div>', 'all-in-one-schemaorg-rich-snippets' ),
|
893 |
+
'id' => $prefix . 'video_emb_url',
|
894 |
+
'class' => 'video',
|
895 |
+
'type' => 'text',
|
896 |
+
),
|
897 |
+
|
898 |
+
array(
|
899 |
+
'name' => __( 'Video Duration', 'all-in-one-schemaorg-rich-snippets' ),
|
900 |
+
'desc' => __( 'Enter the duration for this video', 'all-in-one-schemaorg-rich-snippets' ),
|
901 |
+
'id' => $prefix . 'video_duration',
|
902 |
+
'class' => 'video',
|
903 |
+
'type' => 'text_small',
|
904 |
+
),
|
905 |
+
array(
|
906 |
+
'name' => __( 'Upload Date', 'all-in-one-schemaorg-rich-snippets' ),
|
907 |
+
'desc' => __( 'Provide the date when the video is uploaded', 'all-in-one-schemaorg-rich-snippets' ),
|
908 |
+
'id' => $prefix . 'video_date',
|
909 |
+
'class' => 'video',
|
910 |
+
'type' => 'text_date',
|
911 |
+
),
|
912 |
+
// Meta Settings for Article.
|
913 |
+
array(
|
914 |
+
'name' => __( 'Rich Snippets - Article', 'all-in-one-schemaorg-rich-snippets' ),
|
915 |
+
'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
|
916 |
+
'id' => $prefix . 'article',
|
917 |
+
'class' => 'article',
|
918 |
+
'type' => 'title',
|
919 |
+
),
|
920 |
+
array(
|
921 |
+
'name' => __( 'Article Image', 'all-in-one-schemaorg-rich-snippets' ),
|
922 |
+
'desc' => __( 'Upload or select image from gallery. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
|
923 |
+
'id' => $prefix . 'article_image',
|
924 |
+
'class' => 'article',
|
925 |
+
'type' => 'file',
|
926 |
+
),
|
927 |
+
array(
|
928 |
+
'name' => __( 'Article Name', 'all-in-one-schemaorg-rich-snippets' ),
|
929 |
+
'desc' => __( 'Enter the name for this article', 'all-in-one-schemaorg-rich-snippets' ),
|
930 |
+
'id' => $prefix . 'article_name',
|
931 |
+
'class' => 'article',
|
932 |
+
'type' => 'text',
|
933 |
+
),
|
934 |
+
array(
|
935 |
+
'name' => __( 'Short Description', 'all-in-one-schemaorg-rich-snippets' ),
|
936 |
+
'desc' => __( 'Enter the brief description about this article (About 30 Words)', 'all-in-one-schemaorg-rich-snippets' ),
|
937 |
+
'id' => $prefix . 'article_desc',
|
938 |
+
'class' => 'article',
|
939 |
+
'type' => 'textarea_small',
|
940 |
+
),
|
941 |
+
array(
|
942 |
+
'name' => __( 'Author', 'all-in-one-schemaorg-rich-snippets' ),
|
943 |
+
'desc' => __( 'Enter the author name for this article', 'all-in-one-schemaorg-rich-snippets' ),
|
944 |
+
'id' => $prefix . 'article_author',
|
945 |
+
'class' => 'article',
|
946 |
+
'type' => 'text',
|
947 |
+
),
|
948 |
+
array(
|
949 |
+
'name' => __( 'Publisher - Orgnization', 'all-in-one-schemaorg-rich-snippets' ),
|
950 |
+
'desc' => __( 'Enter the publisher name for this article', 'all-in-one-schemaorg-rich-snippets' ),
|
951 |
+
'id' => $prefix . 'article_publisher',
|
952 |
+
'class' => 'article',
|
953 |
+
'type' => 'text',
|
954 |
+
),
|
955 |
+
array(
|
956 |
+
'name' => __( 'Publisher Logo', 'all-in-one-schemaorg-rich-snippets' ),
|
957 |
+
'desc' => __( 'Upload or select image from gallery. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
|
958 |
+
'id' => $prefix . 'article_publisher_logo',
|
959 |
+
'class' => 'article',
|
960 |
+
'type' => 'file',
|
961 |
+
),
|
962 |
+
|
963 |
+
// Meta Settings for Service.
|
964 |
+
array(
|
965 |
+
'name' => __( 'Rich Snippets - Service', 'all-in-one-schemaorg-rich-snippets' ),
|
966 |
+
'desc' => __( 'Please provide the following information.', 'all-in-one-schemaorg-rich-snippets' ),
|
967 |
+
'id' => $prefix . 'service',
|
968 |
+
'class' => 'service',
|
969 |
+
'type' => 'title',
|
970 |
+
),
|
971 |
+
array(
|
972 |
+
'name' => __( 'Image', 'all-in-one-schemaorg-rich-snippets' ),
|
973 |
+
'desc' => __( 'Upload or select image from gallery. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
|
974 |
+
'id' => $prefix . 'service_image',
|
975 |
+
'class' => 'service',
|
976 |
+
'type' => 'file',
|
977 |
+
),
|
978 |
+
array(
|
979 |
+
'name' => __( 'Service Type', 'all-in-one-schemaorg-rich-snippets' ),
|
980 |
+
'desc' => __( 'Enter the service type', 'all-in-one-schemaorg-rich-snippets' ),
|
981 |
+
'id' => $prefix . 'service_type',
|
982 |
+
'class' => 'service',
|
983 |
+
'type' => 'text',
|
984 |
+
),
|
985 |
+
array(
|
986 |
+
'name' => __( 'Service Served Area', 'all-in-one-schemaorg-rich-snippets' ),
|
987 |
+
'desc' => __( 'Enter the area where service is available', 'all-in-one-schemaorg-rich-snippets' ),
|
988 |
+
'id' => $prefix . 'service_area',
|
989 |
+
'class' => 'service',
|
990 |
+
'type' => 'text',
|
991 |
+
),
|
992 |
+
array(
|
993 |
+
'name' => __( 'Short Description', 'all-in-one-schemaorg-rich-snippets' ),
|
994 |
+
'desc' => __( 'Enter the description about service (About 30 Words)', 'all-in-one-schemaorg-rich-snippets' ),
|
995 |
+
'id' => $prefix . 'service_desc',
|
996 |
+
'class' => 'service',
|
997 |
+
'type' => 'textarea_small',
|
998 |
+
),
|
999 |
+
array(
|
1000 |
+
'name' => __( 'Provider Name', 'all-in-one-schemaorg-rich-snippets' ),
|
1001 |
+
'desc' => __( 'Enter the service provider name', 'all-in-one-schemaorg-rich-snippets' ),
|
1002 |
+
'id' => $prefix . 'service_provider',
|
1003 |
+
'class' => 'service',
|
1004 |
+
'type' => 'text',
|
1005 |
+
),
|
1006 |
+
array(
|
1007 |
+
'name' => __( 'Location', 'all-in-one-schemaorg-rich-snippets' ),
|
1008 |
+
'desc' => __( 'Street Address', 'all-in-one-schemaorg-rich-snippets' ),
|
1009 |
+
'id' => $prefix . 'service_street',
|
1010 |
+
'class' => 'service',
|
1011 |
+
'type' => 'text_medium',
|
1012 |
+
),
|
1013 |
+
array(
|
1014 |
+
'name' => '',
|
1015 |
+
'desc' => __( 'Locality', 'all-in-one-schemaorg-rich-snippets' ),
|
1016 |
+
'id' => $prefix . 'service_local',
|
1017 |
+
'class' => 'service',
|
1018 |
+
'type' => 'text_medium',
|
1019 |
+
),
|
1020 |
+
array(
|
1021 |
+
'name' => '',
|
1022 |
+
'desc' => __( 'Region', 'all-in-one-schemaorg-rich-snippets' ),
|
1023 |
+
'id' => $prefix . 'service_region',
|
1024 |
+
'class' => 'service',
|
1025 |
+
'type' => 'text_medium',
|
1026 |
+
),
|
1027 |
+
array(
|
1028 |
+
'name' => '',
|
1029 |
+
'desc' => __( 'Postal Code', 'all-in-one-schemaorg-rich-snippets' ),
|
1030 |
+
'id' => $prefix . 'service_postal_code',
|
1031 |
+
'class' => 'service',
|
1032 |
+
'type' => 'text_medium',
|
1033 |
+
),
|
1034 |
+
array(
|
1035 |
+
'name' => __( 'Provider Location Image', 'all-in-one-schemaorg-rich-snippets' ),
|
1036 |
+
'desc' => __( 'Upload the provider location image or select from library. Medium size is recommended (300px X 300px)', 'all-in-one-schemaorg-rich-snippets' ),
|
1037 |
+
'id' => $prefix . 'provider_location_image',
|
1038 |
+
'class' => 'service',
|
1039 |
+
'type' => 'file',
|
1040 |
+
),
|
1041 |
+
array(
|
1042 |
+
'name' => __( 'Telephone', 'all-in-one-schemaorg-rich-snippets' ),
|
1043 |
+
'desc' => __( 'Telephone number', 'all-in-one-schemaorg-rich-snippets' ),
|
1044 |
+
'id' => $prefix . 'service_telephone',
|
1045 |
+
'class' => 'service',
|
1046 |
+
'type' => 'text_medium',
|
1047 |
+
),
|
1048 |
+
),
|
1049 |
+
);
|
1050 |
+
// Add other metaboxes as needed.
|
1051 |
+
return $meta_boxes;
|
1052 |
+
}
|
1053 |
+
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: brainstormforce
|
|
3 |
Donate link: https://www.paypal.me/BrainstormForce
|
4 |
Tags: schema markup, structured data, rich snippets, schema.org, Microdata, schema
|
5 |
Requires at least: 3.7
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 1.6.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
Boost CTR. Improve SEO & Rankings. Supports most of the content type. Works perfectly with Google, Bing, Yahoo & Facebook.
|
@@ -80,6 +80,13 @@ Review, Event, People, Product, Recipe, Software Application, Video, Articles et
|
|
80 |
|
81 |
== Changelog ==
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
= 1.6.0 =
|
84 |
- New: Added ItemReviewed types in Review schema.
|
85 |
- Fix: error "Thing is not a known valid target type for the item reviewed the property" in the review schema.
|
3 |
Donate link: https://www.paypal.me/BrainstormForce
|
4 |
Tags: schema markup, structured data, rich snippets, schema.org, Microdata, schema
|
5 |
Requires at least: 3.7
|
6 |
+
Tested up to: 5.4
|
7 |
+
Stable tag: 1.6.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
Boost CTR. Improve SEO & Rankings. Supports most of the content type. Works perfectly with Google, Bing, Yahoo & Facebook.
|
80 |
|
81 |
== Changelog ==
|
82 |
|
83 |
+
= 1.6.1 =
|
84 |
+
- Improvement - Compatibility with the latest WordPress PHP_CodeSniffer rules.
|
85 |
+
- Improvement - Updated the Schema URL to the https instead of HTTP.
|
86 |
+
- Fix - Tabs conflict with the Astra theme.
|
87 |
+
- Fix - Image field is required error showing in the Recipe schema.
|
88 |
+
- Fix - Remove the support for Rating in the service schema as per the new Google update.
|
89 |
+
|
90 |
= 1.6.0 =
|
91 |
- New: Added ItemReviewed types in Review schema.
|
92 |
- Fix: error "Thing is not a known valid target type for the item reviewed the property" in the review schema.
|
settings.php
CHANGED
@@ -1,168 +1,184 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
'
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
'
|
65 |
-
'
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
'
|
84 |
-
'
|
85 |
-
'
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
'
|
99 |
-
'
|
100 |
-
'
|
101 |
-
'
|
102 |
-
|
103 |
-
);
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
'
|
112 |
-
'
|
113 |
-
'
|
114 |
-
'
|
115 |
-
'
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
function
|
123 |
-
|
124 |
-
|
125 |
-
'
|
126 |
-
'
|
127 |
-
'
|
128 |
-
'
|
129 |
-
'
|
130 |
-
'
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
'
|
144 |
-
'
|
145 |
-
'
|
146 |
-
'
|
147 |
-
'
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Settings.
|
4 |
+
*
|
5 |
+
* @package AIOSRS.
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Function to add review option for settings.
|
10 |
+
*/
|
11 |
+
function add_review_option() {
|
12 |
+
$review_opt = array(
|
13 |
+
'review_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
|
14 |
+
'item_reviewer' => __( 'Reviewer', 'all-in-one-schemaorg-rich-snippets' ),
|
15 |
+
'review_date' => __( 'Review Date', 'all-in-one-schemaorg-rich-snippets' ),
|
16 |
+
'item_name' => __( 'Reviewed Item', 'all-in-one-schemaorg-rich-snippets' ),
|
17 |
+
'item_rating' => __( 'Author Rating', 'all-in-one-schemaorg-rich-snippets' ),
|
18 |
+
);
|
19 |
+
add_option( 'bsf_review', $review_opt );
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Function to add event option for settings.
|
24 |
+
*/
|
25 |
+
function add_event_option() {
|
26 |
+
$event_opt = array(
|
27 |
+
'snippet_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
|
28 |
+
'event_title' => __( 'Event', 'all-in-one-schemaorg-rich-snippets' ),
|
29 |
+
'event_location' => __( 'Location', 'all-in-one-schemaorg-rich-snippets' ),
|
30 |
+
'event_desc' => __( 'Description', 'all-in-one-schemaorg-rich-snippets' ),
|
31 |
+
'start_time' => __( 'Starting on', 'all-in-one-schemaorg-rich-snippets' ),
|
32 |
+
'end_time' => __( 'Ending on', 'all-in-one-schemaorg-rich-snippets' ),
|
33 |
+
'events_price' => __( 'Offer Price', 'all-in-one-schemaorg-rich-snippets' ),
|
34 |
+
);
|
35 |
+
add_option( 'bsf_event', $event_opt );
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Function to add person option for settings.
|
40 |
+
*/
|
41 |
+
function add_person_option() {
|
42 |
+
$person_opt = array(
|
43 |
+
'snippet_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
|
44 |
+
'person_name' => __( 'Name', 'all-in-one-schemaorg-rich-snippets' ),
|
45 |
+
'person_nickname' => __( 'Nickname', 'all-in-one-schemaorg-rich-snippets' ),
|
46 |
+
'person_job_title' => __( 'Job Title', 'all-in-one-schemaorg-rich-snippets' ),
|
47 |
+
'person_website' => __( 'Website', 'all-in-one-schemaorg-rich-snippets' ),
|
48 |
+
'person_company' => __( 'Company', 'all-in-one-schemaorg-rich-snippets' ),
|
49 |
+
'person_address' => __( 'Address', 'all-in-one-schemaorg-rich-snippets' ),
|
50 |
+
);
|
51 |
+
add_option( 'bsf_person', $person_opt );
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Function to add product option for settings.
|
56 |
+
*/
|
57 |
+
function add_product_option() {
|
58 |
+
$product_opt = array(
|
59 |
+
'snippet_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
|
60 |
+
'product_rating' => __( 'Author Rating', 'all-in-one-schemaorg-rich-snippets' ),
|
61 |
+
'product_brand' => __( 'Brand Name', 'all-in-one-schemaorg-rich-snippets' ),
|
62 |
+
'product_name' => __( 'Product Name', 'all-in-one-schemaorg-rich-snippets' ),
|
63 |
+
'product_agr' => __( 'Aggregate Rating', 'all-in-one-schemaorg-rich-snippets' ),
|
64 |
+
'product_price' => __( 'Price', 'all-in-one-schemaorg-rich-snippets' ),
|
65 |
+
'product_avail' => __( 'Product Availability', 'all-in-one-schemaorg-rich-snippets' ),
|
66 |
+
);
|
67 |
+
add_option( 'bsf_product', $product_opt );
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Function to add recipe option for settings.
|
72 |
+
*/
|
73 |
+
function add_recipe_option() {
|
74 |
+
$recipe_opt = array(
|
75 |
+
'snippet_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
|
76 |
+
'recipe_name' => __( 'Recipe Name', 'all-in-one-schemaorg-rich-snippets' ),
|
77 |
+
'author_name' => __( 'Author Name', 'all-in-one-schemaorg-rich-snippets' ),
|
78 |
+
'recipe_pub' => __( 'Published On', 'all-in-one-schemaorg-rich-snippets' ),
|
79 |
+
'recipe_prep' => __( 'Preparation Time', 'all-in-one-schemaorg-rich-snippets' ),
|
80 |
+
'recipe_cook' => __( 'Cook Time', 'all-in-one-schemaorg-rich-snippets' ),
|
81 |
+
'recipe_time' => __( 'Total Time', 'all-in-one-schemaorg-rich-snippets' ),
|
82 |
+
'recipe_desc' => __( 'Description', 'all-in-one-schemaorg-rich-snippets' ),
|
83 |
+
'recipe_nutrition' => __( 'Nutrition', 'all-in-one-schemaorg-rich-snippets' ),
|
84 |
+
'recipe_ingredient' => __( 'Ingredients', 'all-in-one-schemaorg-rich-snippets' ),
|
85 |
+
'recipe_rating' => __( 'Average Rating', 'all-in-one-schemaorg-rich-snippets' ),
|
86 |
+
);
|
87 |
+
add_option( 'bsf_recipe', $recipe_opt );
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Function to add software option for settings.
|
92 |
+
*/
|
93 |
+
function add_software_option() {
|
94 |
+
$software_opt = array(
|
95 |
+
'snippet_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
|
96 |
+
'software_rating' => __( 'Author Rating', 'all-in-one-schemaorg-rich-snippets' ),
|
97 |
+
'software_agr' => __( 'Aggregate Rating', 'all-in-one-schemaorg-rich-snippets' ),
|
98 |
+
'software_price' => __( 'Price', 'all-in-one-schemaorg-rich-snippets' ),
|
99 |
+
'software_name' => __( 'Software Name', 'all-in-one-schemaorg-rich-snippets' ),
|
100 |
+
'software_os' => __( 'Operating System', 'all-in-one-schemaorg-rich-snippets' ),
|
101 |
+
'software_website' => __( 'Landing Page', 'all-in-one-schemaorg-rich-snippets' ),
|
102 |
+
);
|
103 |
+
add_option( 'bsf_software', $software_opt );
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Function to add video option for settings.
|
108 |
+
*/
|
109 |
+
function add_video_option() {
|
110 |
+
$video_opt = array(
|
111 |
+
'snippet_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
|
112 |
+
'video_title' => __( 'Title', 'all-in-one-schemaorg-rich-snippets' ),
|
113 |
+
'video_desc' => __( 'Description', 'all-in-one-schemaorg-rich-snippets' ),
|
114 |
+
'video_time' => __( 'Duration', 'all-in-one-schemaorg-rich-snippets' ),
|
115 |
+
'video_date' => __( 'Upload Date', 'all-in-one-schemaorg-rich-snippets' ),
|
116 |
+
);
|
117 |
+
add_option( 'bsf_video', $video_opt );
|
118 |
+
}
|
119 |
+
/**
|
120 |
+
* Function to add article option for settings.
|
121 |
+
*/
|
122 |
+
function add_article_option() {
|
123 |
+
$article_opt = array(
|
124 |
+
'snippet_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
|
125 |
+
'article_name' => __( 'Article Name', 'all-in-one-schemaorg-rich-snippets' ),
|
126 |
+
'article_author' => __( 'Author', 'all-in-one-schemaorg-rich-snippets' ),
|
127 |
+
'article_desc' => __( 'Description', 'all-in-one-schemaorg-rich-snippets' ),
|
128 |
+
'article_image' => __( 'Image', 'all-in-one-schemaorg-rich-snippets' ),
|
129 |
+
'article_publisher' => __( 'Publisher Name', 'all-in-one-schemaorg-rich-snippets' ),
|
130 |
+
'article_publisher_logo' => __( 'Publisher Logo', 'all-in-one-schemaorg-rich-snippets' ),
|
131 |
+
|
132 |
+
);
|
133 |
+
add_option( 'bsf_article', $article_opt );
|
134 |
+
}
|
135 |
+
/**
|
136 |
+
* Function to add article option for settings.
|
137 |
+
*/
|
138 |
+
function add_service_option() {
|
139 |
+
$service_opt = array(
|
140 |
+
'snippet_title' => __( 'Summary', 'all-in-one-schemaorg-rich-snippets' ),
|
141 |
+
'service_type' => __( 'Service Type', 'all-in-one-schemaorg-rich-snippets' ),
|
142 |
+
'service_area' => __( 'Area', 'all-in-one-schemaorg-rich-snippets' ),
|
143 |
+
'service_desc' => __( 'Description', 'all-in-one-schemaorg-rich-snippets' ),
|
144 |
+
'service_channel' => __( 'URL', 'all-in-one-schemaorg-rich-snippets' ),
|
145 |
+
'service_url_link' => __( 'Click Here For More Info', 'all-in-one-schemaorg-rich-snippets' ),
|
146 |
+
'service_rating' => __( 'User Rating', 'all-in-one-schemaorg-rich-snippets' ),
|
147 |
+
'service_provider_name' => __( 'Provider Name', 'all-in-one-schemaorg-rich-snippets' ),
|
148 |
+
'provider_location' => __( 'Location', 'all-in-one-schemaorg-rich-snippets' ),
|
149 |
+
'service_telephone' => __( 'Provider telephone number', 'all-in-one-schemaorg-rich-snippets' ),
|
150 |
+
);
|
151 |
+
add_option( 'bsf_service', $service_opt );
|
152 |
+
}
|
153 |
+
/**
|
154 |
+
* Function for customization
|
155 |
+
*/
|
156 |
+
function add_color_option() {
|
157 |
+
$color_opt = array(
|
158 |
+
'snippet_box_bg' => '#F5F5F5',
|
159 |
+
'snippet_title_bg' => '#E4E4E4',
|
160 |
+
'snippet_border' => '#ACACAC',
|
161 |
+
'snippet_title_color' => '#333333',
|
162 |
+
'snippet_box_color' => '#333333',
|
163 |
+
);
|
164 |
+
add_option( 'bsf_custom', $color_opt );
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Function for customization
|
169 |
+
*/
|
170 |
+
function add_woo_commerce_option() {
|
171 |
+
if ( ! get_option( 'bsf_woocom_init_setting' ) ) {
|
172 |
+
|
173 |
+
$woo_opt = false;
|
174 |
+
|
175 |
+
if ( get_option( 'bsf_custom' ) ) {
|
176 |
+
$woo_opt = true;
|
177 |
+
}
|
178 |
+
|
179 |
+
add_option( 'bsf_woocom_setting', $woo_opt );
|
180 |
+
add_option( 'bsf_woocom_init_setting', 'done' );
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
|