Version Description
- Please upgrade immediately. Releasing New features, few bugfixes and improvements.
=
Download this release
Release Info
Developer | hiddenpearls |
Plugin | Simple Social Media Share Buttons – Social Sharing for Everyone |
Version | 2.0.13 |
Comparing to | |
See all releases |
Code changes from version 2.0.12 to 2.0.13
- assets/css/front.css +129 -118
- assets/js/admin.js +1 -1
- classes/ssb-widget.php +25 -1
- inc/ssb-widget-fields.php +3 -2
- inc/upgrade-routine.php +1 -1
- inc/utils.php +49 -6
- readme.txt +10 -2
- simple-social-buttons.php +138 -87
assets/css/front.css
CHANGED
@@ -84,66 +84,7 @@ div.ssb-button-pinterest { width: 100px; }
|
|
84 |
color: #000;
|
85 |
text-align: center;
|
86 |
}
|
87 |
-
|
88 |
-
border-radius: 2px;
|
89 |
-
width: auto;
|
90 |
-
padding: 0 4px 0 0;
|
91 |
-
text-align: center;
|
92 |
-
text-decoration: none;
|
93 |
-
font:bold 11px/20px "Helvetica Neue", Helvetica, sans-serif;
|
94 |
-
font-weight: bold;
|
95 |
-
color: #fff;
|
96 |
-
background: #878787;
|
97 |
-
background-size: 14px 14px;
|
98 |
-
display: inline-block;
|
99 |
-
-webkit-font-smoothing: antialiased;
|
100 |
-
height: 20px;
|
101 |
-
text-indent: 20px;
|
102 |
-
}
|
103 |
-
.simplesocial-simple-icons .ssb_email-icon:hover{
|
104 |
-
background: #717070;
|
105 |
-
}
|
106 |
-
.simplesocial-simple-icons .ssb_email-icon .icon{
|
107 |
-
text-indent: 0;
|
108 |
-
position: absolute;
|
109 |
-
top: 3px;
|
110 |
-
left: 3px;
|
111 |
-
}
|
112 |
-
.simplesocial-simple-icons .ssb_email-icon .icon svg{
|
113 |
-
width: 14px;
|
114 |
-
fill: #fff;
|
115 |
-
height: 14px;
|
116 |
-
}
|
117 |
-
.simplesocial-simple-icons .ssb_print-icon{
|
118 |
-
border-radius: 2px;
|
119 |
-
width: auto;
|
120 |
-
padding: 0 4px 0 0;
|
121 |
-
text-align: center;
|
122 |
-
text-decoration: none;
|
123 |
-
font:bold 11px/20px "Helvetica Neue", Helvetica, sans-serif;
|
124 |
-
font-weight: bold;
|
125 |
-
color: #fff;
|
126 |
-
background: #353535;
|
127 |
-
background-size: 14px 14px;
|
128 |
-
display: inline-block;
|
129 |
-
-webkit-font-smoothing: antialiased;
|
130 |
-
height: 20px;
|
131 |
-
text-indent: 20px;
|
132 |
-
}
|
133 |
-
.simplesocial-simple-icons .ssb_print-icon:hover{
|
134 |
-
background: #1b1a1a;
|
135 |
-
}
|
136 |
-
.simplesocial-simple-icons .ssb_print-icon .icon{
|
137 |
-
text-indent: 0;
|
138 |
-
position: absolute;
|
139 |
-
top: 3px;
|
140 |
-
left: 3px;
|
141 |
-
}
|
142 |
-
.simplesocial-simple-icons .ssb_print-icon .icon svg{
|
143 |
-
width: 14px;
|
144 |
-
fill: #fff;
|
145 |
-
height: 14px;
|
146 |
-
}
|
147 |
|
148 |
.simplesocialbuttons_inline .ssb_total_counter,.simplesocialbuttons-flyin .simplesocialbuttons .ssb_total_counter,.simplesocialbuttons-popup .simplesocialbuttons .ssb_total_counter,.ssb_social_media_wrapper .simplesocialbuttons .ssb_total_counter{
|
149 |
display: inline-block;
|
@@ -193,7 +134,7 @@ transition: all 0.3s ease-in-out;
|
|
193 |
/*=======================================
|
194 |
= Simple Style =
|
195 |
=======================================*/
|
196 |
-
.simplesocial-simple-icons button {
|
197 |
position: relative;
|
198 |
padding: 2px;
|
199 |
font-size: 11px;
|
@@ -204,6 +145,11 @@ transition: all 0.3s ease-in-out;
|
|
204 |
color: #fff;
|
205 |
padding-left: 20px;
|
206 |
height: 20px;
|
|
|
|
|
|
|
|
|
|
|
207 |
}
|
208 |
.simplesocial-simple-icons.simplesocialbuttons-float-right-center button{
|
209 |
float: right;
|
@@ -431,7 +377,7 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
431 |
line-height: 20px !important;
|
432 |
margin: 5px;
|
433 |
}
|
434 |
-
.simplesocial-simple-icons .ssb_fbshare-icon{
|
435 |
background: #4267b2;
|
436 |
border: 1px solid #4267b2;
|
437 |
color: #fff;
|
@@ -444,11 +390,11 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
444 |
line-height: 18px;
|
445 |
height: 20px;
|
446 |
}
|
447 |
-
.simplesocial-simple-icons .ssb_fbshare-icon:hover {
|
448 |
background: #365899;
|
449 |
border: 1px solid #365899;
|
450 |
}
|
451 |
-
.simplesocial-simple-icons .ssb_fbshare-icon .icon{
|
452 |
width: 16px;
|
453 |
height: 16px;
|
454 |
display: inline-block;
|
@@ -457,15 +403,15 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
457 |
top: -1px;
|
458 |
left: 2px;
|
459 |
}
|
460 |
-
.simplesocial-simple-icons .ssb_fbshare-icon .simplesocialtxt{
|
461 |
padding: 0 3px 0 3px;
|
462 |
font-weight: bold;
|
463 |
}
|
464 |
-
.simplesocial-simple-icons .ssb_fbshare-icon .ssb_counter{
|
465 |
padding-right: 4px;
|
466 |
display: inline-block;
|
467 |
}
|
468 |
-
.simplesocial-simple-icons .ssb_tweet-icon{
|
469 |
position: relative;
|
470 |
height: 20px;
|
471 |
-webkit-box-sizing: border-box;
|
@@ -478,10 +424,10 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
478 |
cursor: pointer;
|
479 |
font: normal normal normal 11px/18px 'Helvetica Neue',Arial,sans-serif;
|
480 |
}
|
481 |
-
.simplesocial-simple-icons .ssb_tweet-icon:hover{
|
482 |
background: #0c7abf;
|
483 |
}
|
484 |
-
.simplesocial-simple-icons .ssb_tweet-icon .icon{
|
485 |
position: relative;
|
486 |
top: 2px;
|
487 |
display: inline-block;
|
@@ -491,17 +437,18 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
491 |
background: transparent 0 0 no-repeat;
|
492 |
vertical-align: top;
|
493 |
}
|
494 |
-
.simplesocial-simple-icons .ssb_tweet-icon .simplesocialtxt {
|
495 |
margin-left: 1px;
|
496 |
white-space: nowrap;
|
497 |
vertical-align: top;
|
|
|
498 |
}
|
499 |
-
.simplesocial-simple-icons .ssb_gplus-icon{
|
500 |
padding: 0;
|
501 |
background: none;
|
502 |
border:0;
|
503 |
}
|
504 |
-
.simplesocial-simple-icons .ssb_gplus-icon .icon{
|
505 |
border: 1px solid #d5d5d5;
|
506 |
border: 1px solid rgba(0,0,0,.17);
|
507 |
border-radius: 2px;
|
@@ -532,7 +479,7 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
532 |
padding: 0;
|
533 |
display: inline-block;
|
534 |
}
|
535 |
-
.simplesocial-simple-icons .ssb_gplus-icon:active .icon{
|
536 |
background-color: #e5e5e5;
|
537 |
border: 1px solid #aaa;
|
538 |
border: 1px solid rgba(0,0,0,.25);
|
@@ -540,13 +487,13 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
540 |
box-shadow: inset 0 1px 0 #ddd;
|
541 |
color: #262626;
|
542 |
}
|
543 |
-
.simplesocial-simple-icons .ssb_gplus-icon:hover .icon{
|
544 |
border: 1px solid #aaa;
|
545 |
border: 1px solid rgba(0,0,0,.25);
|
546 |
-webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.1);
|
547 |
box-shadow: 0 1px 0 rgba(0,0,0,0.1);
|
548 |
}
|
549 |
-
.simplesocial-simple-icons .ssb_gplus-icon .ssb_counter{
|
550 |
position: relative;
|
551 |
background: #fff;
|
552 |
border: 1px solid #ccc;
|
@@ -563,7 +510,7 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
563 |
white-space: nowrap;
|
564 |
vertical-align: middle;
|
565 |
}
|
566 |
-
.simplesocial-simple-icons .ssb_gplus-icon .ssb_counter:after, .simplesocial-simple-icons .ssb_gplus-icon .ssb_counter:before{
|
567 |
right: 100%;
|
568 |
top: 50%;
|
569 |
border: solid transparent;
|
@@ -573,31 +520,31 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
573 |
position: absolute;
|
574 |
pointer-events: none;
|
575 |
}
|
576 |
-
.simplesocial-simple-icons .ssb_gplus-icon .ssb_counter:after{
|
577 |
border-color: rgba(255,255,255,0);
|
578 |
border-right-color: #fff;
|
579 |
border-width: 4px;
|
580 |
margin-top: -4px;
|
581 |
}
|
582 |
-
.simplesocial-simple-icons .ssb_gplus-icon .ssb_counter:before{
|
583 |
border-color: rgba(192,192,192,0);
|
584 |
border-right-color: #ccc;
|
585 |
border-width: 5px;
|
586 |
margin-top: -5px;
|
587 |
}
|
588 |
-
.simplesocial-simple-icons .ssb_gplus-icon svg{
|
589 |
fill: #db4437;
|
590 |
}
|
591 |
-
.simplesocial-simple-icons .ssb_gplus-icon .simplesocialtxt{
|
592 |
display: none;
|
593 |
}
|
594 |
-
.simplesocial-simple-icons .ssb_linkedin-icon{
|
595 |
background: none;
|
596 |
border:0;
|
597 |
padding: 0;
|
598 |
height: 20px;
|
599 |
}
|
600 |
-
.simplesocial-simple-icons .ssb_linkedin-icon .icon{
|
601 |
background-position: 0px -593px;
|
602 |
background-repeat: no-repeat;
|
603 |
background-color: #0077b5;
|
@@ -624,10 +571,10 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
624 |
text-align: center;
|
625 |
line-height: 17px;
|
626 |
}
|
627 |
-
.simplesocial-simple-icons .ssb_linkedin-icon .icon svg{
|
628 |
vertical-align: middle;
|
629 |
}
|
630 |
-
.simplesocial-simple-icons .ssb_linkedin-icon .simplesocialtxt{
|
631 |
color: #fff;
|
632 |
cursor: pointer;
|
633 |
display: block;
|
@@ -657,7 +604,7 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
657 |
font: bold 11px Arial, Helvetica, sans-serif;
|
658 |
line-height: 20px;
|
659 |
}
|
660 |
-
.simplesocial-simple-icons .ssb_linkedin-icon:hover .simplesocialtxt{
|
661 |
color: #fff;
|
662 |
border: 1px solid #000;
|
663 |
border-top-color: #066094;
|
@@ -667,7 +614,7 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
667 |
background-color: #066094;
|
668 |
background-image: -webkit-linear-gradient(top, #066094 0%, #066094 100%);
|
669 |
}
|
670 |
-
.simplesocial-simple-icons .ssb_linkedin-icon .ssb_counter{
|
671 |
display: inline-block;
|
672 |
font-size: 11px;
|
673 |
color: #4e4e4e;
|
@@ -681,7 +628,7 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
681 |
border-radius: 5px;
|
682 |
position: relative;
|
683 |
}
|
684 |
-
.simplesocial-simple-icons .ssb_linkedin-icon .ssb_counter:after, .simplesocial-simple-icons .ssb_linkedin-icon .ssb_counter:before {
|
685 |
right: 100%;
|
686 |
top: 50%;
|
687 |
border: solid transparent;
|
@@ -692,24 +639,24 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
692 |
pointer-events: none;
|
693 |
}
|
694 |
|
695 |
-
.simplesocial-simple-icons .ssb_linkedin-icon .ssb_counter:after {
|
696 |
border-color: rgba(255, 255, 255, 0);
|
697 |
border-right-color: #fff;
|
698 |
border-width: 3px;
|
699 |
margin-top: -3px;
|
700 |
}
|
701 |
-
.simplesocial-simple-icons .ssb_linkedin-icon .ssb_counter:before {
|
702 |
border-color: rgba(202, 204, 206, 0);
|
703 |
border-right-color: #caccce;
|
704 |
border-width: 4px;
|
705 |
margin-top: -4px;
|
706 |
}
|
707 |
-
.simplesocial-simple-icons .ssb_pinterest-icon{
|
708 |
padding: 0;
|
709 |
background: none;
|
710 |
position: relative;
|
711 |
}
|
712 |
-
.simplesocial-simple-icons .ssb_pinterest-icon .simplesocialtxt{
|
713 |
border-radius: 2px;
|
714 |
text-indent: 20px;
|
715 |
width: auto;
|
@@ -724,22 +671,22 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
724 |
display: inline-block;
|
725 |
-webkit-font-smoothing: antialiased;
|
726 |
}
|
727 |
-
.simplesocial-simple-icons .ssb_pinterest-icon:hover .simplesocialtxt{
|
728 |
background-color: #aa0719;
|
729 |
-webkit-box-shadow: none;
|
730 |
box-shadow: none;
|
731 |
color: #fff;
|
732 |
}
|
733 |
-
.simplesocial-simple-icons .ssb_pinterest-icon .icon{
|
734 |
position: absolute;
|
735 |
top: 3px;
|
736 |
left: 3px;
|
737 |
}
|
738 |
-
.simplesocial-simple-icons .ssb_pinterest-icon .icon svg{
|
739 |
width: 14px;
|
740 |
height: 14px;
|
741 |
}
|
742 |
-
.simplesocial-simple-icons .ssb_pinterest-icon .ssb_counter{
|
743 |
height: 20px;
|
744 |
width: 40px;
|
745 |
font-weight: bold;
|
@@ -755,7 +702,7 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
755 |
position: relative;
|
756 |
margin-left: 6px;
|
757 |
}
|
758 |
-
.simplesocial-simple-icons .ssb_pinterest-icon .ssb_counter:before{
|
759 |
top: 3px;
|
760 |
left: -4px;
|
761 |
border-right: 7px solid #efefef;
|
@@ -764,7 +711,7 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
764 |
position: absolute;
|
765 |
content: '';
|
766 |
}
|
767 |
-
.simplesocial-simple-icons .ssb_viber-icon{
|
768 |
border-radius: 2px;
|
769 |
width: auto;
|
770 |
padding: 0 4px 0 0;
|
@@ -780,20 +727,20 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
780 |
height: 20px;
|
781 |
text-indent: 20px;
|
782 |
}
|
783 |
-
.simplesocial-simple-icons .ssb_viber-icon:hover{
|
784 |
background: #524a8c;
|
785 |
}
|
786 |
-
.simplesocial-simple-icons .ssb_viber-icon .icon{
|
787 |
text-indent: 0;
|
788 |
position: absolute;
|
789 |
top: 3px;
|
790 |
left: 3px;
|
791 |
}
|
792 |
-
.simplesocial-simple-icons .ssb_viber-icon .icon svg{
|
793 |
width: 14px;
|
794 |
fill: #fff;
|
795 |
}
|
796 |
-
.simplesocial-simple-icons .ssb_whatsapp-icon{
|
797 |
border-radius: 2px;
|
798 |
width: auto;
|
799 |
padding: 0 4px 0 0;
|
@@ -809,21 +756,21 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
809 |
height: 20px;
|
810 |
text-indent: 20px;
|
811 |
}
|
812 |
-
.simplesocial-simple-icons .ssb_whatsapp-icon:hover{
|
813 |
background: #2b8e1e;
|
814 |
}
|
815 |
-
.simplesocial-simple-icons .ssb_whatsapp-icon .icon{
|
816 |
text-indent: 0;
|
817 |
position: absolute;
|
818 |
top: 3px;
|
819 |
left: 3px;
|
820 |
}
|
821 |
-
.simplesocial-simple-icons .ssb_whatsapp-icon .icon svg{
|
822 |
width: 14px;
|
823 |
fill: #fff;
|
824 |
height: 14px;
|
825 |
}
|
826 |
-
.simplesocial-simple-icons .ssb_reddit-icon{
|
827 |
border-radius: 2px;
|
828 |
width: auto;
|
829 |
padding: 0 4px 0 0;
|
@@ -839,21 +786,21 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
839 |
height: 20px;
|
840 |
text-indent: 20px;
|
841 |
}
|
842 |
-
.simplesocial-simple-icons .ssb_reddit-icon:hover{
|
843 |
background: #d33c04;
|
844 |
}
|
845 |
-
.simplesocial-simple-icons .ssb_reddit-icon .icon{
|
846 |
text-indent: 0;
|
847 |
position: absolute;
|
848 |
top: 3px;
|
849 |
left: 3px;
|
850 |
}
|
851 |
-
.simplesocial-simple-icons .ssb_reddit-icon .icon svg{
|
852 |
width: 14px;
|
853 |
fill: #fff;
|
854 |
height: 14px;
|
855 |
}
|
856 |
-
.simplesocial-simple-icons .ssb_msng-icon{
|
857 |
border-radius: 2px;
|
858 |
width: auto;
|
859 |
padding: 0 4px 0 0;
|
@@ -869,16 +816,76 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-icons.simplesocialbu
|
|
869 |
height: 20px;
|
870 |
text-indent: 20px;
|
871 |
}
|
872 |
-
.simplesocial-simple-icons .ssb_msng-icon:hover{
|
873 |
background: #307bf9;
|
874 |
}
|
875 |
-
.simplesocial-simple-icons .ssb_msng-icon .icon{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
876 |
text-indent: 0;
|
877 |
position: absolute;
|
878 |
top: 3px;
|
879 |
left: 3px;
|
880 |
}
|
881 |
-
.simplesocial-simple-icons .
|
882 |
width: 14px;
|
883 |
fill: #fff;
|
884 |
height: 14px;
|
@@ -1563,15 +1570,15 @@ div[class*="simplesocialbuttons-float"].simplesocialbuttons.simplesocial-simple-
|
|
1563 |
background: #717070;
|
1564 |
color: #fff;
|
1565 |
}
|
1566 |
-
|
1567 |
-
width: 34px;
|
1568 |
-
height: 34px;
|
1569 |
-
line-height: 34px;
|
1570 |
-
}
|
1571 |
.simplesocialbuttons.simplesocial-round-icon button.simplesocial-msng-share{
|
1572 |
color: #468bff;
|
1573 |
border-color: #468bff;
|
1574 |
}
|
|
|
|
|
|
|
|
|
1575 |
.simplesocialbuttons.simplesocial-round-icon button.simplesocial-email-share{
|
1576 |
color: #717070;
|
1577 |
border-color: #717070;
|
@@ -1580,7 +1587,11 @@ div[class*="simplesocialbuttons-float"].simplesocialbuttons.simplesocial-simple-
|
|
1580 |
background: #717070;
|
1581 |
color: #fff;
|
1582 |
}
|
1583 |
-
|
|
|
|
|
|
|
|
|
1584 |
/*===== End of Style 6 ======*/
|
1585 |
|
1586 |
.simplesocialbuttons-inline-bottom-in button{
|
84 |
color: #000;
|
85 |
text-align: center;
|
86 |
}
|
87 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
.simplesocialbuttons_inline .ssb_total_counter,.simplesocialbuttons-flyin .simplesocialbuttons .ssb_total_counter,.simplesocialbuttons-popup .simplesocialbuttons .ssb_total_counter,.ssb_social_media_wrapper .simplesocialbuttons .ssb_total_counter{
|
90 |
display: inline-block;
|
134 |
/*=======================================
|
135 |
= Simple Style =
|
136 |
=======================================*/
|
137 |
+
.simplesocial-simple-icons button[class*="ssb_"] {
|
138 |
position: relative;
|
139 |
padding: 2px;
|
140 |
font-size: 11px;
|
145 |
color: #fff;
|
146 |
padding-left: 20px;
|
147 |
height: 20px;
|
148 |
+
border: 0;
|
149 |
+
}
|
150 |
+
.simplesocial-simple-icons button[class*="ssb_"] .icon{
|
151 |
+
height: 12px;
|
152 |
+
line-height: 12px;
|
153 |
}
|
154 |
.simplesocial-simple-icons.simplesocialbuttons-float-right-center button{
|
155 |
float: right;
|
377 |
line-height: 20px !important;
|
378 |
margin: 5px;
|
379 |
}
|
380 |
+
.simplesocial-simple-icons button.ssb_fbshare-icon{
|
381 |
background: #4267b2;
|
382 |
border: 1px solid #4267b2;
|
383 |
color: #fff;
|
390 |
line-height: 18px;
|
391 |
height: 20px;
|
392 |
}
|
393 |
+
.simplesocial-simple-icons button.ssb_fbshare-icon:hover {
|
394 |
background: #365899;
|
395 |
border: 1px solid #365899;
|
396 |
}
|
397 |
+
.simplesocial-simple-icons button.ssb_fbshare-icon .icon{
|
398 |
width: 16px;
|
399 |
height: 16px;
|
400 |
display: inline-block;
|
403 |
top: -1px;
|
404 |
left: 2px;
|
405 |
}
|
406 |
+
.simplesocial-simple-icons button.ssb_fbshare-icon .simplesocialtxt{
|
407 |
padding: 0 3px 0 3px;
|
408 |
font-weight: bold;
|
409 |
}
|
410 |
+
.simplesocial-simple-icons button.ssb_fbshare-icon .ssb_counter{
|
411 |
padding-right: 4px;
|
412 |
display: inline-block;
|
413 |
}
|
414 |
+
.simplesocial-simple-icons button.ssb_tweet-icon{
|
415 |
position: relative;
|
416 |
height: 20px;
|
417 |
-webkit-box-sizing: border-box;
|
424 |
cursor: pointer;
|
425 |
font: normal normal normal 11px/18px 'Helvetica Neue',Arial,sans-serif;
|
426 |
}
|
427 |
+
.simplesocial-simple-icons button.ssb_tweet-icon:hover{
|
428 |
background: #0c7abf;
|
429 |
}
|
430 |
+
.simplesocial-simple-icons button.ssb_tweet-icon .icon{
|
431 |
position: relative;
|
432 |
top: 2px;
|
433 |
display: inline-block;
|
437 |
background: transparent 0 0 no-repeat;
|
438 |
vertical-align: top;
|
439 |
}
|
440 |
+
.simplesocial-simple-icons button.ssb_tweet-icon .simplesocialtxt {
|
441 |
margin-left: 1px;
|
442 |
white-space: nowrap;
|
443 |
vertical-align: top;
|
444 |
+
font-style: normal;
|
445 |
}
|
446 |
+
.simplesocial-simple-icons button.ssb_gplus-icon{
|
447 |
padding: 0;
|
448 |
background: none;
|
449 |
border:0;
|
450 |
}
|
451 |
+
.simplesocial-simple-icons button.ssb_gplus-icon .icon{
|
452 |
border: 1px solid #d5d5d5;
|
453 |
border: 1px solid rgba(0,0,0,.17);
|
454 |
border-radius: 2px;
|
479 |
padding: 0;
|
480 |
display: inline-block;
|
481 |
}
|
482 |
+
.simplesocial-simple-icons button.ssb_gplus-icon:active .icon{
|
483 |
background-color: #e5e5e5;
|
484 |
border: 1px solid #aaa;
|
485 |
border: 1px solid rgba(0,0,0,.25);
|
487 |
box-shadow: inset 0 1px 0 #ddd;
|
488 |
color: #262626;
|
489 |
}
|
490 |
+
.simplesocial-simple-icons button.ssb_gplus-icon:hover .icon{
|
491 |
border: 1px solid #aaa;
|
492 |
border: 1px solid rgba(0,0,0,.25);
|
493 |
-webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.1);
|
494 |
box-shadow: 0 1px 0 rgba(0,0,0,0.1);
|
495 |
}
|
496 |
+
.simplesocial-simple-icons button.ssb_gplus-icon .ssb_counter{
|
497 |
position: relative;
|
498 |
background: #fff;
|
499 |
border: 1px solid #ccc;
|
510 |
white-space: nowrap;
|
511 |
vertical-align: middle;
|
512 |
}
|
513 |
+
.simplesocial-simple-icons button.ssb_gplus-icon .ssb_counter:after, .simplesocial-simple-icons button.ssb_gplus-icon .ssb_counter:before{
|
514 |
right: 100%;
|
515 |
top: 50%;
|
516 |
border: solid transparent;
|
520 |
position: absolute;
|
521 |
pointer-events: none;
|
522 |
}
|
523 |
+
.simplesocial-simple-icons button.ssb_gplus-icon .ssb_counter:after{
|
524 |
border-color: rgba(255,255,255,0);
|
525 |
border-right-color: #fff;
|
526 |
border-width: 4px;
|
527 |
margin-top: -4px;
|
528 |
}
|
529 |
+
.simplesocial-simple-icons button.ssb_gplus-icon .ssb_counter:before{
|
530 |
border-color: rgba(192,192,192,0);
|
531 |
border-right-color: #ccc;
|
532 |
border-width: 5px;
|
533 |
margin-top: -5px;
|
534 |
}
|
535 |
+
.simplesocial-simple-icons button.ssb_gplus-icon svg{
|
536 |
fill: #db4437;
|
537 |
}
|
538 |
+
.simplesocial-simple-icons button.ssb_gplus-icon .simplesocialtxt{
|
539 |
display: none;
|
540 |
}
|
541 |
+
.simplesocial-simple-icons button.ssb_linkedin-icon{
|
542 |
background: none;
|
543 |
border:0;
|
544 |
padding: 0;
|
545 |
height: 20px;
|
546 |
}
|
547 |
+
.simplesocial-simple-icons button.ssb_linkedin-icon .icon{
|
548 |
background-position: 0px -593px;
|
549 |
background-repeat: no-repeat;
|
550 |
background-color: #0077b5;
|
571 |
text-align: center;
|
572 |
line-height: 17px;
|
573 |
}
|
574 |
+
.simplesocial-simple-icons button.ssb_linkedin-icon .icon svg{
|
575 |
vertical-align: middle;
|
576 |
}
|
577 |
+
.simplesocial-simple-icons button.ssb_linkedin-icon .simplesocialtxt{
|
578 |
color: #fff;
|
579 |
cursor: pointer;
|
580 |
display: block;
|
604 |
font: bold 11px Arial, Helvetica, sans-serif;
|
605 |
line-height: 20px;
|
606 |
}
|
607 |
+
.simplesocial-simple-icons button.ssb_linkedin-icon:hover .simplesocialtxt{
|
608 |
color: #fff;
|
609 |
border: 1px solid #000;
|
610 |
border-top-color: #066094;
|
614 |
background-color: #066094;
|
615 |
background-image: -webkit-linear-gradient(top, #066094 0%, #066094 100%);
|
616 |
}
|
617 |
+
.simplesocial-simple-icons button.ssb_linkedin-icon .ssb_counter{
|
618 |
display: inline-block;
|
619 |
font-size: 11px;
|
620 |
color: #4e4e4e;
|
628 |
border-radius: 5px;
|
629 |
position: relative;
|
630 |
}
|
631 |
+
.simplesocial-simple-icons button.ssb_linkedin-icon .ssb_counter:after, .simplesocial-simple-icons button.ssb_linkedin-icon .ssb_counter:before {
|
632 |
right: 100%;
|
633 |
top: 50%;
|
634 |
border: solid transparent;
|
639 |
pointer-events: none;
|
640 |
}
|
641 |
|
642 |
+
.simplesocial-simple-icons button.ssb_linkedin-icon .ssb_counter:after {
|
643 |
border-color: rgba(255, 255, 255, 0);
|
644 |
border-right-color: #fff;
|
645 |
border-width: 3px;
|
646 |
margin-top: -3px;
|
647 |
}
|
648 |
+
.simplesocial-simple-icons button.ssb_linkedin-icon .ssb_counter:before {
|
649 |
border-color: rgba(202, 204, 206, 0);
|
650 |
border-right-color: #caccce;
|
651 |
border-width: 4px;
|
652 |
margin-top: -4px;
|
653 |
}
|
654 |
+
.simplesocial-simple-icons button.ssb_pinterest-icon{
|
655 |
padding: 0;
|
656 |
background: none;
|
657 |
position: relative;
|
658 |
}
|
659 |
+
.simplesocial-simple-icons button.ssb_pinterest-icon .simplesocialtxt{
|
660 |
border-radius: 2px;
|
661 |
text-indent: 20px;
|
662 |
width: auto;
|
671 |
display: inline-block;
|
672 |
-webkit-font-smoothing: antialiased;
|
673 |
}
|
674 |
+
.simplesocial-simple-icons button.ssb_pinterest-icon:hover .simplesocialtxt{
|
675 |
background-color: #aa0719;
|
676 |
-webkit-box-shadow: none;
|
677 |
box-shadow: none;
|
678 |
color: #fff;
|
679 |
}
|
680 |
+
.simplesocial-simple-icons button.ssb_pinterest-icon .icon{
|
681 |
position: absolute;
|
682 |
top: 3px;
|
683 |
left: 3px;
|
684 |
}
|
685 |
+
.simplesocial-simple-icons button.ssb_pinterest-icon .icon svg{
|
686 |
width: 14px;
|
687 |
height: 14px;
|
688 |
}
|
689 |
+
.simplesocial-simple-icons button.ssb_pinterest-icon .ssb_counter{
|
690 |
height: 20px;
|
691 |
width: 40px;
|
692 |
font-weight: bold;
|
702 |
position: relative;
|
703 |
margin-left: 6px;
|
704 |
}
|
705 |
+
.simplesocial-simple-icons button.ssb_pinterest-icon .ssb_counter:before{
|
706 |
top: 3px;
|
707 |
left: -4px;
|
708 |
border-right: 7px solid #efefef;
|
711 |
position: absolute;
|
712 |
content: '';
|
713 |
}
|
714 |
+
.simplesocial-simple-icons button.ssb_viber-icon{
|
715 |
border-radius: 2px;
|
716 |
width: auto;
|
717 |
padding: 0 4px 0 0;
|
727 |
height: 20px;
|
728 |
text-indent: 20px;
|
729 |
}
|
730 |
+
.simplesocial-simple-icons button.ssb_viber-icon:hover{
|
731 |
background: #524a8c;
|
732 |
}
|
733 |
+
.simplesocial-simple-icons button.ssb_viber-icon .icon{
|
734 |
text-indent: 0;
|
735 |
position: absolute;
|
736 |
top: 3px;
|
737 |
left: 3px;
|
738 |
}
|
739 |
+
.simplesocial-simple-icons button.ssb_viber-icon .icon svg{
|
740 |
width: 14px;
|
741 |
fill: #fff;
|
742 |
}
|
743 |
+
.simplesocial-simple-icons button.ssb_whatsapp-icon{
|
744 |
border-radius: 2px;
|
745 |
width: auto;
|
746 |
padding: 0 4px 0 0;
|
756 |
height: 20px;
|
757 |
text-indent: 20px;
|
758 |
}
|
759 |
+
.simplesocial-simple-icons button.ssb_whatsapp-icon:hover{
|
760 |
background: #2b8e1e;
|
761 |
}
|
762 |
+
.simplesocial-simple-icons button.ssb_whatsapp-icon .icon{
|
763 |
text-indent: 0;
|
764 |
position: absolute;
|
765 |
top: 3px;
|
766 |
left: 3px;
|
767 |
}
|
768 |
+
.simplesocial-simple-icons button.ssb_whatsapp-icon .icon svg{
|
769 |
width: 14px;
|
770 |
fill: #fff;
|
771 |
height: 14px;
|
772 |
}
|
773 |
+
.simplesocial-simple-icons button.ssb_reddit-icon{
|
774 |
border-radius: 2px;
|
775 |
width: auto;
|
776 |
padding: 0 4px 0 0;
|
786 |
height: 20px;
|
787 |
text-indent: 20px;
|
788 |
}
|
789 |
+
.simplesocial-simple-icons button.ssb_reddit-icon:hover{
|
790 |
background: #d33c04;
|
791 |
}
|
792 |
+
.simplesocial-simple-icons button.ssb_reddit-icon .icon{
|
793 |
text-indent: 0;
|
794 |
position: absolute;
|
795 |
top: 3px;
|
796 |
left: 3px;
|
797 |
}
|
798 |
+
.simplesocial-simple-icons button.ssb_reddit-icon .icon svg{
|
799 |
width: 14px;
|
800 |
fill: #fff;
|
801 |
height: 14px;
|
802 |
}
|
803 |
+
.simplesocial-simple-icons button.ssb_msng-icon{
|
804 |
border-radius: 2px;
|
805 |
width: auto;
|
806 |
padding: 0 4px 0 0;
|
816 |
height: 20px;
|
817 |
text-indent: 20px;
|
818 |
}
|
819 |
+
.simplesocial-simple-icons button.ssb_msng-icon:hover{
|
820 |
background: #307bf9;
|
821 |
}
|
822 |
+
.simplesocial-simple-icons button.ssb_msng-icon .icon{
|
823 |
+
text-indent: 0;
|
824 |
+
position: absolute;
|
825 |
+
top: 3px;
|
826 |
+
left: 3px;
|
827 |
+
}
|
828 |
+
.simplesocial-simple-icons button.ssb_msng-icon .icon svg{
|
829 |
+
width: 14px;
|
830 |
+
fill: #fff;
|
831 |
+
height: 14px;
|
832 |
+
}
|
833 |
+
.simplesocial-simple-icons button.ssb_email-icon{
|
834 |
+
border-radius: 2px;
|
835 |
+
width: auto;
|
836 |
+
padding: 0 4px 0 0;
|
837 |
+
text-align: center;
|
838 |
+
text-decoration: none;
|
839 |
+
font:bold 11px/20px "Helvetica Neue", Helvetica, sans-serif;
|
840 |
+
font-weight: bold;
|
841 |
+
color: #fff;
|
842 |
+
background: #878787;
|
843 |
+
background-size: 14px 14px;
|
844 |
+
display: inline-block;
|
845 |
+
-webkit-font-smoothing: antialiased;
|
846 |
+
height: 20px;
|
847 |
+
text-indent: 20px;
|
848 |
+
}
|
849 |
+
.simplesocial-simple-icons button.ssb_email-icon:hover{
|
850 |
+
background: #717070;
|
851 |
+
}
|
852 |
+
.simplesocial-simple-icons button.ssb_email-icon .icon{
|
853 |
+
text-indent: 0;
|
854 |
+
position: absolute;
|
855 |
+
top: 3px;
|
856 |
+
left: 3px;
|
857 |
+
}
|
858 |
+
.simplesocial-simple-icons button.ssb_email-icon .icon svg{
|
859 |
+
width: 14px;
|
860 |
+
fill: #fff;
|
861 |
+
height: 14px;
|
862 |
+
}
|
863 |
+
.simplesocial-simple-icons button.ssb_print-icon{
|
864 |
+
border-radius: 2px;
|
865 |
+
width: auto;
|
866 |
+
padding: 0 4px 0 0;
|
867 |
+
text-align: center;
|
868 |
+
text-decoration: none;
|
869 |
+
font:bold 11px/20px "Helvetica Neue", Helvetica, sans-serif;
|
870 |
+
font-weight: bold;
|
871 |
+
color: #fff;
|
872 |
+
background: #353535;
|
873 |
+
background-size: 14px 14px;
|
874 |
+
display: inline-block;
|
875 |
+
-webkit-font-smoothing: antialiased;
|
876 |
+
height: 20px;
|
877 |
+
text-indent: 20px;
|
878 |
+
}
|
879 |
+
.simplesocial-simple-icons button.ssb_print-icon:hover{
|
880 |
+
background: #1b1a1a;
|
881 |
+
}
|
882 |
+
.simplesocial-simple-icons button.ssb_print-icon .icon{
|
883 |
text-indent: 0;
|
884 |
position: absolute;
|
885 |
top: 3px;
|
886 |
left: 3px;
|
887 |
}
|
888 |
+
.simplesocial-simple-icons button.ssb_print-icon .icon svg{
|
889 |
width: 14px;
|
890 |
fill: #fff;
|
891 |
height: 14px;
|
1570 |
background: #717070;
|
1571 |
color: #fff;
|
1572 |
}
|
1573 |
+
|
|
|
|
|
|
|
|
|
1574 |
.simplesocialbuttons.simplesocial-round-icon button.simplesocial-msng-share{
|
1575 |
color: #468bff;
|
1576 |
border-color: #468bff;
|
1577 |
}
|
1578 |
+
.simplesocialbuttons.simplesocial-round-icon button.simplesocial-msng-share:hover{
|
1579 |
+
color:#fff;
|
1580 |
+
background: #468bff;
|
1581 |
+
}
|
1582 |
.simplesocialbuttons.simplesocial-round-icon button.simplesocial-email-share{
|
1583 |
color: #717070;
|
1584 |
border-color: #717070;
|
1587 |
background: #717070;
|
1588 |
color: #fff;
|
1589 |
}
|
1590 |
+
.simplesocialbuttons.simplesocial-round-icon button:after{
|
1591 |
+
width: 34px;
|
1592 |
+
height: 34px;
|
1593 |
+
line-height: 34px;
|
1594 |
+
}
|
1595 |
/*===== End of Style 6 ======*/
|
1596 |
|
1597 |
.simplesocialbuttons-inline-bottom-in button{
|
assets/js/admin.js
CHANGED
@@ -287,7 +287,7 @@
|
|
287 |
|
288 |
});
|
289 |
|
290 |
-
|
291 |
|
292 |
|
293 |
});
|
287 |
|
288 |
});
|
289 |
|
290 |
+
//end widget js;
|
291 |
|
292 |
|
293 |
});
|
classes/ssb-widget.php
CHANGED
@@ -257,6 +257,9 @@ class Ssb_Follower_Widget extends WP_Widget {
|
|
257 |
function get_facebook_likes_count( $facebook_id, $access_token, $show_counter ) {
|
258 |
|
259 |
if ( $show_counter ) {
|
|
|
|
|
|
|
260 |
|
261 |
if ( false === get_transient( 'ssb_follow_facebook_counter' ) ) {
|
262 |
$json_feed_url = "https://graph.facebook.com/$facebook_id/?fields=likes,fan_count&access_token=$access_token";
|
@@ -304,6 +307,9 @@ class Ssb_Follower_Widget extends WP_Widget {
|
|
304 |
|
305 |
if ( $show_count ) {
|
306 |
|
|
|
|
|
|
|
307 |
// cache version does not exist or expired
|
308 |
if ( false == get_transient( 'ssb_follow_twitter_counter' ) ) {
|
309 |
|
@@ -379,15 +385,24 @@ class Ssb_Follower_Widget extends WP_Widget {
|
|
379 |
*/
|
380 |
function get_google_plus_follower( $google_id, $show_counter ) {
|
381 |
|
|
|
382 |
if ( $show_counter ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
383 |
|
384 |
-
if ( false === get_transient( 'ssb_follow_google_counter' )
|
385 |
$json_feed_url = 'https://www.googleapis.com/plus/v1/people/' . $google_id . '?fields=circledByCount%2CplusOneCount&key=' . $this->api_key;
|
386 |
$args = array( 'httpversion' => '1.1' );
|
387 |
$json_feed = wp_remote_get( $json_feed_url, $args );
|
388 |
if ( is_wp_error( $json_feed ) || 200 !== wp_remote_retrieve_response_code( $json_feed ) ) {
|
389 |
return 0;
|
390 |
}
|
|
|
391 |
$result = json_decode( wp_remote_retrieve_body( $json_feed ) );
|
392 |
|
393 |
$counter = isset( $result->circledByCount ) ? $result->circledByCount : 0;
|
@@ -419,6 +434,9 @@ class Ssb_Follower_Widget extends WP_Widget {
|
|
419 |
|
420 |
if ( $show_counter ) {
|
421 |
|
|
|
|
|
|
|
422 |
if ( false === get_transient( 'ssb_follow_youtube_counter' ) ) {
|
423 |
|
424 |
// Check if username of channel id.
|
@@ -462,6 +480,9 @@ class Ssb_Follower_Widget extends WP_Widget {
|
|
462 |
function get_pinterest_followers( $access_token, $show_counter ) {
|
463 |
|
464 |
if ( $show_counter ) {
|
|
|
|
|
|
|
465 |
|
466 |
if ( false === get_transient( 'ssb_follow_pinterest_counter' ) ) {
|
467 |
$json_feed_url = 'https://api.pinterest.com/v1/me/followers/?access_token=' . $access_token;
|
@@ -500,6 +521,9 @@ class Ssb_Follower_Widget extends WP_Widget {
|
|
500 |
function get_instagram_id_followers( $instagram_id, $show_counter ){
|
501 |
|
502 |
if ( $show_counter ) {
|
|
|
|
|
|
|
503 |
|
504 |
if ( false === get_transient( 'ssb_follow_instagram_counter' ) ) {
|
505 |
$json_feed_url = "https://www.instagram.com/$instagram_id/?__a=1";
|
257 |
function get_facebook_likes_count( $facebook_id, $access_token, $show_counter ) {
|
258 |
|
259 |
if ( $show_counter ) {
|
260 |
+
if( '' == $facebook_id ){
|
261 |
+
return 0;
|
262 |
+
}
|
263 |
|
264 |
if ( false === get_transient( 'ssb_follow_facebook_counter' ) ) {
|
265 |
$json_feed_url = "https://graph.facebook.com/$facebook_id/?fields=likes,fan_count&access_token=$access_token";
|
307 |
|
308 |
if ( $show_count ) {
|
309 |
|
310 |
+
if( '' == $twitter_handle ){
|
311 |
+
return 0;
|
312 |
+
}
|
313 |
// cache version does not exist or expired
|
314 |
if ( false == get_transient( 'ssb_follow_twitter_counter' ) ) {
|
315 |
|
385 |
*/
|
386 |
function get_google_plus_follower( $google_id, $show_counter ) {
|
387 |
|
388 |
+
|
389 |
if ( $show_counter ) {
|
390 |
+
if( '' == $google_id ){
|
391 |
+
return 0;
|
392 |
+
}
|
393 |
+
|
394 |
+
if( '' == $google_id ){
|
395 |
+
return 0;
|
396 |
+
}
|
397 |
|
398 |
+
if ( false === get_transient( 'ssb_follow_google_counter' ) ) {
|
399 |
$json_feed_url = 'https://www.googleapis.com/plus/v1/people/' . $google_id . '?fields=circledByCount%2CplusOneCount&key=' . $this->api_key;
|
400 |
$args = array( 'httpversion' => '1.1' );
|
401 |
$json_feed = wp_remote_get( $json_feed_url, $args );
|
402 |
if ( is_wp_error( $json_feed ) || 200 !== wp_remote_retrieve_response_code( $json_feed ) ) {
|
403 |
return 0;
|
404 |
}
|
405 |
+
|
406 |
$result = json_decode( wp_remote_retrieve_body( $json_feed ) );
|
407 |
|
408 |
$counter = isset( $result->circledByCount ) ? $result->circledByCount : 0;
|
434 |
|
435 |
if ( $show_counter ) {
|
436 |
|
437 |
+
if( '' == $channel_id ){
|
438 |
+
return 0;
|
439 |
+
}
|
440 |
if ( false === get_transient( 'ssb_follow_youtube_counter' ) ) {
|
441 |
|
442 |
// Check if username of channel id.
|
480 |
function get_pinterest_followers( $access_token, $show_counter ) {
|
481 |
|
482 |
if ( $show_counter ) {
|
483 |
+
if( '' == $access_token ){
|
484 |
+
return 0;
|
485 |
+
}
|
486 |
|
487 |
if ( false === get_transient( 'ssb_follow_pinterest_counter' ) ) {
|
488 |
$json_feed_url = 'https://api.pinterest.com/v1/me/followers/?access_token=' . $access_token;
|
521 |
function get_instagram_id_followers( $instagram_id, $show_counter ){
|
522 |
|
523 |
if ( $show_counter ) {
|
524 |
+
if( '' == $instagram_id ){
|
525 |
+
return 0;
|
526 |
+
}
|
527 |
|
528 |
if ( false === get_transient( 'ssb_follow_instagram_counter' ) ) {
|
529 |
$json_feed_url = "https://www.instagram.com/$instagram_id/?__a=1";
|
inc/ssb-widget-fields.php
CHANGED
@@ -97,9 +97,10 @@
|
|
97 |
</p>
|
98 |
<p class="google_text" style="display: block ">
|
99 |
<label for="<?php echo esc_attr( $this->get_field_id( 'google' ) ); ?>"><?php esc_attr_e( 'Google+ User ID:', 'simple-social-buttons' ); ?></label>
|
|
|
100 |
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'google' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'google' ) ); ?>" type="text" value="<?php echo esc_attr( $google ); ?>" placeholder="+username">
|
101 |
-
<input type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'google_show_counter' ) ) ?>" id="<?php echo esc_attr( $this->get_field_id( 'google_show_counter' ) ) ?>" value="1" <?php checked( $google_show_counter, 1 ) ?> class="google_count_check" ><label for="<?php echo esc_attr( $this->get_field_id( 'google_show_counter' ) ) ?>"
|
102 |
-
</p>
|
103 |
<hr/>
|
104 |
|
105 |
</div>
|
97 |
</p>
|
98 |
<p class="google_text" style="display: block ">
|
99 |
<label for="<?php echo esc_attr( $this->get_field_id( 'google' ) ); ?>"><?php esc_attr_e( 'Google+ User ID:', 'simple-social-buttons' ); ?></label>
|
100 |
+
<p>
|
101 |
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'google' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'google' ) ); ?>" type="text" value="<?php echo esc_attr( $google ); ?>" placeholder="+username">
|
102 |
+
<input type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'google_show_counter' ) ) ?>" id="<?php echo esc_attr( $this->get_field_id( 'google_show_counter' ) ) ?>" value="1" <?php checked( $google_show_counter, 1 ) ?> class="google_count_check" ><label for="<?php echo esc_attr( $this->get_field_id( 'google_show_counter' ) ) ?>"> Display Google Plus follower counter</label>
|
103 |
+
</p>
|
104 |
<hr/>
|
105 |
|
106 |
</div>
|
inc/upgrade-routine.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php
|
2 |
add_action( 'init', 'ssb_upgrade_routine_2' );
|
3 |
|
4 |
/**
|
1 |
+
<?php
|
2 |
add_action( 'init', 'ssb_upgrade_routine_2' );
|
3 |
|
4 |
/**
|
inc/utils.php
CHANGED
@@ -140,22 +140,54 @@ function ssb_fetch_shares_via_curl_multi( $data, $options = array() ) {
|
|
140 |
* @return Array Simple array with counts.
|
141 |
* @since 2.0
|
142 |
*/
|
143 |
-
function ssb_fetch_fresh_counts( $stats, $post_id ) {
|
144 |
|
145 |
$stats_result = array();
|
146 |
$total = 0;
|
147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
foreach ( $stats as $social_name => $counts ) {
|
149 |
if ( 'totalshare' == $social_name || 'fblike' == $social_name || 'viber' == $social_name || 'whatsapp' == $social_name ) { continue; }
|
150 |
$stats_counts = call_user_func( 'ssb_format_' . $social_name . '_response', $counts );
|
151 |
$new_counts = $stats_counts + $networks[ $social_name];
|
152 |
$stats_result[ $social_name ] = $new_counts;
|
153 |
-
|
|
|
|
|
|
|
|
|
|
|
154 |
|
155 |
$total += $new_counts;
|
156 |
}
|
|
|
157 |
$stats_result['total'] = $total;
|
158 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
return $stats_result;
|
160 |
}
|
161 |
/**
|
@@ -174,7 +206,13 @@ function ssb_fetch_shares_via_curl_multi( $data, $options = array() ) {
|
|
174 |
$stats_counts = call_user_func( 'ssb_format_' . $social_name . '_response', $counts );
|
175 |
$networks[ $social_name] = $stats_counts;
|
176 |
}
|
177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
}
|
179 |
|
180 |
/**
|
@@ -189,7 +227,12 @@ function ssb_fetch_shares_via_curl_multi( $data, $options = array() ) {
|
|
189 |
$network_name[] = 'total';
|
190 |
$result = array();
|
191 |
foreach ( $network_name as $social_name ) {
|
192 |
-
|
|
|
|
|
|
|
|
|
|
|
193 |
}
|
194 |
return $result;
|
195 |
}
|
140 |
* @return Array Simple array with counts.
|
141 |
* @since 2.0
|
142 |
*/
|
143 |
+
function ssb_fetch_fresh_counts( $stats, $post_id ,$alt_share_link) {
|
144 |
|
145 |
$stats_result = array();
|
146 |
$total = 0;
|
147 |
+
|
148 |
+
// special case if post id not exist for example short code run on widget out side the loop in archive page
|
149 |
+
if( 0 !== $post_id ){
|
150 |
+
$networks = get_post_meta( $post_id, 'ssb_old_counts', true );
|
151 |
+
}else{
|
152 |
+
$networks = get_option( 'ssb_not_exist_post_old_counts' );
|
153 |
+
}
|
154 |
+
|
155 |
+
if( ! $networks ){
|
156 |
+
$_result = ssb_fetch_shares_via_curl_multi( array_filter( $alt_share_link ) );
|
157 |
+
ssb_fetch_http_or_https_counts( $_result, $post_id );
|
158 |
+
// special case if post id not exist for example short code run on widget out side the loop in archive page
|
159 |
+
if( 0 !== $post_id ){
|
160 |
+
$networks = get_post_meta( $post_id, 'ssb_old_counts', true );
|
161 |
+
}else{
|
162 |
+
$networks = get_option( 'ssb_not_exist_post_old_counts' );
|
163 |
+
|
164 |
+
}
|
165 |
+
|
166 |
+
}
|
167 |
+
|
168 |
foreach ( $stats as $social_name => $counts ) {
|
169 |
if ( 'totalshare' == $social_name || 'fblike' == $social_name || 'viber' == $social_name || 'whatsapp' == $social_name ) { continue; }
|
170 |
$stats_counts = call_user_func( 'ssb_format_' . $social_name . '_response', $counts );
|
171 |
$new_counts = $stats_counts + $networks[ $social_name];
|
172 |
$stats_result[ $social_name ] = $new_counts;
|
173 |
+
// special case if post id not exist for example short code run on widget out side the loop in archive page
|
174 |
+
if( 0 !== $post_id ){
|
175 |
+
update_post_meta( $post_id, 'ssb_' . $social_name . '_counts', $new_counts );
|
176 |
+
}else{
|
177 |
+
update_option( 'ssb_not_exist_post_'. $social_name .'_counts', $new_counts );
|
178 |
+
}
|
179 |
|
180 |
$total += $new_counts;
|
181 |
}
|
182 |
+
|
183 |
$stats_result['total'] = $total;
|
184 |
+
// special case if post id not exist for example short code run on widget out side the loop in archive page
|
185 |
+
if( 0 !== $post_id ){
|
186 |
+
update_post_meta( $post_id, 'ssb_total_counts', $total );
|
187 |
+
}else{
|
188 |
+
update_option( 'ssb_not_exist_post_total_counts', $total );
|
189 |
+
}
|
190 |
+
|
191 |
return $stats_result;
|
192 |
}
|
193 |
/**
|
206 |
$stats_counts = call_user_func( 'ssb_format_' . $social_name . '_response', $counts );
|
207 |
$networks[ $social_name] = $stats_counts;
|
208 |
}
|
209 |
+
// special case if post id not exist for example short code run on widget out side the loop in archive page
|
210 |
+
if( 0 !== $post_id ){
|
211 |
+
update_post_meta( $post_id, 'ssb_old_counts', $networks );
|
212 |
+
}else{
|
213 |
+
update_option( 'ssb_not_exist_post_old_counts', $networks );
|
214 |
+
}
|
215 |
+
|
216 |
}
|
217 |
|
218 |
/**
|
227 |
$network_name[] = 'total';
|
228 |
$result = array();
|
229 |
foreach ( $network_name as $social_name ) {
|
230 |
+
// special case if post id not exist for example short code run on widget out side the loop in archive page
|
231 |
+
if( 0 !== $post_id ){
|
232 |
+
$result[ $social_name ] = get_post_meta( $post_id, 'ssb_' . $social_name . '_counts', true );
|
233 |
+
}else{
|
234 |
+
$result[ $social_name ] = get_option( 'ssb_not_exist_post_'. $social_name .'_counts' );
|
235 |
+
}
|
236 |
}
|
237 |
return $result;
|
238 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wpbrigade.com/
|
|
4 |
Tags: Social share, Social buttons, Whatsapp, Viber, LinkedIn, facebook, google, twitter, pinterest, plus one
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -146,12 +146,20 @@ theme = theme1 or theme2 or theme3 or theme4 or Flat or Circle or Official
|
|
146 |
|
147 |
== Upgrade Notice ==
|
148 |
|
149 |
-
= 2.0.
|
150 |
* Please upgrade immediately. Releasing New features, few bugfixes and improvements.
|
151 |
|
152 |
|
153 |
== Changelog ==
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
= 2.0.12 - 2018-03-12 =
|
156 |
* New Feature: Add WhatsApp in Widget.
|
157 |
* New Feature: Fetch old stats after SSL.
|
4 |
Tags: Social share, Social buttons, Whatsapp, Viber, LinkedIn, facebook, google, twitter, pinterest, plus one
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 2.0.13
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
146 |
|
147 |
== Upgrade Notice ==
|
148 |
|
149 |
+
= 2.0.13 =
|
150 |
* Please upgrade immediately. Releasing New features, few bugfixes and improvements.
|
151 |
|
152 |
|
153 |
== Changelog ==
|
154 |
|
155 |
+
= 2.0.13 - 2018-03-20 =
|
156 |
+
* Bug Fix: Twitter share issue.
|
157 |
+
* Bug Fix: Google+ Widget error.
|
158 |
+
* Bug Fix: Illegal offset fix.
|
159 |
+
* Bug Fix: Shortcode issue on homepage.
|
160 |
+
* Improvement: Open Fb messenger native app on mobile.
|
161 |
+
* Improvement: Old counts.
|
162 |
+
|
163 |
= 2.0.12 - 2018-03-12 =
|
164 |
* New Feature: Add WhatsApp in Widget.
|
165 |
* New Feature: Fetch old stats after SSL.
|
simple-social-buttons.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Simple Social Buttons
|
4 |
* Plugin URI: http://www.WPBrigade.com/wordpress/plugins/simple-social-buttons/
|
5 |
* Description: Simple Social Buttons adds an advanced set of social media sharing buttons to your WordPress sites, such as: Google +1, Facebook, WhatsApp, Viber, Twitter, Reddit, LinkedIn and Pinterest. This makes it the most <code>Flexible Social Sharing Plugin ever for Everyone.</code>
|
6 |
-
* Version: 2.0.
|
7 |
* Author: WPBrigade
|
8 |
* Author URI: http://www.WPBrigade.com/
|
9 |
* Text Domain: simple-social-buttons
|
@@ -30,7 +30,7 @@
|
|
30 |
|
31 |
class SimpleSocialButtonsPR {
|
32 |
public $pluginName = 'Simple Social Buttons';
|
33 |
-
public $pluginVersion = '2.0.
|
34 |
public $pluginPrefix = 'ssb_pr_';
|
35 |
public $hideCustomMetaKey = '_ssb_hide';
|
36 |
private $fb_app_id = '891268654262273';
|
@@ -156,31 +156,35 @@ class SimpleSocialButtonsPR {
|
|
156 |
}
|
157 |
}
|
158 |
|
|
|
159 |
$_share_links = array();
|
160 |
foreach ( $order as $social_name => $priority ) {
|
161 |
-
if ( 'totalshare' == $social_name || 'viber' == $social_name || 'fblike' == $social_name || 'whatsapp' == $social_name ) {
|
162 |
continue; }
|
163 |
-
|
164 |
-
|
|
|
|
|
|
|
165 |
|
166 |
-
|
167 |
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
$share_counts = ssb_fetch_fresh_counts( $result, $post_id );
|
179 |
|
180 |
update_post_meta( $post_id, 'ssb_cache_timestamp', floor( ( ( date( 'U' ) / 60 ) / 60 ) ) );
|
181 |
-
|
182 |
wp_die();
|
183 |
-
|
184 |
|
185 |
function ssb_output_cache_trigger( $info ) {
|
186 |
|
@@ -189,7 +193,10 @@ class SimpleSocialButtonsPR {
|
|
189 |
if ( ( ssb_is_cache_fresh( $info['postID'], true ) ) && empty( $_GET['ssb_cache'] ) ) {
|
190 |
return $info;
|
191 |
}
|
192 |
-
|
|
|
|
|
|
|
193 |
// Return if we're on a WooCommerce account page.
|
194 |
if ( function_exists( 'is_account_page' ) && is_account_page() ) {
|
195 |
return $info;
|
@@ -202,6 +209,7 @@ class SimpleSocialButtonsPR {
|
|
202 |
ob_start();
|
203 |
|
204 |
?>
|
|
|
205 |
var ssb_admin_ajax = '<?php echo admin_url( 'admin-ajax.php' ); ?>';
|
206 |
var is_ssb_used = jQuery('.simplesocialbuttons');
|
207 |
var postID = <?php echo $info['postID']; ?> ;
|
@@ -226,7 +234,7 @@ class SimpleSocialButtonsPR {
|
|
226 |
|
227 |
});
|
228 |
}
|
229 |
-
|
230 |
<?php
|
231 |
$info['footer_output'] .= ob_get_clean();
|
232 |
|
@@ -505,9 +513,9 @@ class SimpleSocialButtonsPR {
|
|
505 |
$ssb_buttonscode = '';
|
506 |
// get post permalink and title
|
507 |
$permalink = get_permalink();
|
508 |
-
$title = get_the_title();
|
509 |
|
510 |
-
|
511 |
$arrButtons = array();
|
512 |
foreach ( $this->arrKnownButtons as $button_name ) {
|
513 |
if ( ! empty( $order[ $button_name ] ) && (int) $order[ $button_name ] != 0 ) {
|
@@ -517,7 +525,7 @@ class SimpleSocialButtonsPR {
|
|
517 |
// echo '<pre>'; print_r( $arrButtons ); echo '</pre>';
|
518 |
@asort( $arrButtons );
|
519 |
|
520 |
-
|
521 |
if ( $show_total ) {
|
522 |
$arrButtons['totalshare'] = '100'; }
|
523 |
$post_id = get_the_id();
|
@@ -530,22 +538,19 @@ class SimpleSocialButtonsPR {
|
|
530 |
}
|
531 |
}
|
532 |
|
533 |
-
//
|
534 |
-
//
|
535 |
if ( ( isset( $this->settings['cache'] ) && $this->settings['cache'] == 'off') || ( true == $http_solve ) ) {
|
536 |
|
537 |
$_share_links = array();
|
538 |
-
$_alt_share_links = array();
|
539 |
foreach ( $arrButtons as $social_name => $priority ) {
|
540 |
if ( 'totalshare' == $social_name || 'viber' == $social_name || 'fblike' == $social_name || 'whatsapp' == $social_name || 'print' == $social_name || 'email' == $social_name || 'messenger' == $social_name) {
|
541 |
continue; }
|
542 |
$_share_links[ $social_name ] = call_user_func( 'ssb_' . $social_name . '_generate_link', $permalink );
|
543 |
-
$url=$this->http_or_https_resolve_url( $permalink );
|
544 |
-
//get alt hurl to cover http or https issue
|
545 |
-
$_alt_share_links[ $social_name ] = call_user_func( 'ssb_' . $social_name . '_generate_link', $url );
|
546 |
}
|
547 |
-
//
|
548 |
-
$
|
|
|
549 |
//normal fetch
|
550 |
$result = ssb_fetch_shares_via_curl_multi( array_filter( $_share_links ) );
|
551 |
|
@@ -562,9 +567,7 @@ class SimpleSocialButtonsPR {
|
|
562 |
|
563 |
|
564 |
//fetch http / https result and save in network_old_share_count meta tags
|
565 |
-
|
566 |
-
$share_counts = ssb_fetch_fresh_counts( $result, $post_id );
|
567 |
-
|
568 |
// update_post_meta( $post_id,'ssb_cache_timestamp',floor( ( ( date( 'U' ) / 60) / 60 ) ) );
|
569 |
} else {
|
570 |
$share_counts = ssb_fetch_cached_counts( array_flip( $arrButtons ), $post_id );
|
@@ -596,8 +599,7 @@ class SimpleSocialButtonsPR {
|
|
596 |
$arrButtonsCode[] = $_html;
|
597 |
|
598 |
break;
|
599 |
-
|
600 |
-
case 'fbshare':
|
601 |
$fbshare_share = $share_counts['fbshare'] ? $share_counts['fbshare'] : 0;
|
602 |
|
603 |
if ( $this->selected_theme == 'simple-icons' ) {
|
@@ -710,8 +712,7 @@ class SimpleSocialButtonsPR {
|
|
710 |
$total_share = $share_counts['total'] ? $share_counts['total'] : 0;
|
711 |
$arrButtonsCode[] = "<span class='ssb_total_counter'>" . $total_share . '<span>Shares</span></span>';
|
712 |
break;
|
713 |
-
|
714 |
-
case 'reddit':
|
715 |
$reddit_score = $share_counts['reddit'] ? $share_counts['reddit'] : 0;
|
716 |
|
717 |
if ( $this->selected_theme == 'simple-icons' ) {
|
@@ -748,8 +749,7 @@ class SimpleSocialButtonsPR {
|
|
748 |
$arrButtonsCode[] = '<button onclick="javascript:window.open(this.dataset.href, \'_blank\' );return false;" class="simplesocial-whatsapp-share" data-href="https://api.whatsapp.com/send?text=' . $permalink . '"><span class="simplesocialtxt">WhatsApp</span></button>';
|
749 |
}
|
750 |
break;
|
751 |
-
|
752 |
-
case 'viber':
|
753 |
if ( $this->selected_theme == 'simple-icons' ) {
|
754 |
$arrButtonsCode[] = '<button onclick="javascript:window.open(this.dataset.href, \'_self\' );return false;" class="simplesocial-viber-share ssb_viber-icon" data-href="viber://forward?text=' . $permalink . '">
|
755 |
<span class="icon"> <svg aria-labelledby="simpleicons-viber-icon" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title id="simpleicons-viber-icon">Viber icon</title><path d="M20.812 2.343c-.596-.549-3.006-2.3-8.376-2.325 0 0-6.331-.38-9.415 2.451C1.302 4.189.698 6.698.634 9.82.569 12.934.487 18.774 6.12 20.36h.005l-.005 2.416s-.034.979.609 1.178c.779.24 1.236-.504 1.98-1.303.409-.439.972-1.088 1.397-1.582 3.851.322 6.813-.416 7.149-.525.777-.254 5.176-.816 5.893-6.658.738-6.021-.357-9.83-2.338-11.547v.004zm.652 11.112c-.615 4.876-4.184 5.187-4.83 5.396-.285.092-2.895.738-6.164.525 0 0-2.445 2.941-3.195 3.705-.121.121-.271.166-.361.145-.135-.029-.164-.18-.164-.404l.015-4.006c-.015 0 0 0 0 0-4.771-1.336-4.485-6.301-4.425-8.91.044-2.596.538-4.726 1.994-6.167 2.611-2.371 7.997-2.012 7.997-2.012 4.543.016 6.721 1.385 7.223 1.846 1.674 1.432 2.529 4.865 1.904 9.893l.006-.011zM7.741 4.983c.242 0 .459.109.629.311.004.002.58.695.83 1.034.235.32.551.83.711 1.115.285.51.104 1.032-.172 1.248l-.566.45c-.285.229-.25.653-.25.653s.84 3.157 3.959 3.953c0 0 .426.039.654-.246l.451-.569c.213-.285.734-.465 1.244-.181.285.15.795.466 1.116.704.339.24 1.032.826 1.036.826.33.271.404.689.18 1.109v.016c-.23.405-.541.78-.934 1.141h-.008c-.314.27-.629.42-.944.449-.03 0-.075.016-.136 0-.135 0-.27-.029-.404-.061v-.014c-.48-.135-1.275-.48-2.596-1.216-.855-.479-1.574-.96-2.189-1.455-.315-.255-.645-.54-.976-.87l-.076-.028-.03-.03-.029-.029c-.331-.33-.615-.66-.871-.98-.48-.609-.96-1.327-1.439-2.189-.735-1.32-1.08-2.115-1.215-2.596H5.7c-.045-.134-.075-.269-.06-.404-.015-.061 0-.105 0-.141.03-.299.189-.614.458-.944h.005c.355-.39.738-.704 1.146-.933.164-.091.329-.135.479-.135h.016l-.003.012zm4.095-.683h.116l.076.002h.02l.089.005h.511l.135.015h.074l.15.016h.03l.104.015h.016l.074.015c.046 0 .076.016.105.016h.091l.075.029.06.016.06.015.03.015h.045l.046.016h.029l.074.016.045.014.046.016.06.016.03.014c.03 0 .06.016.091.016l.044.015.046.016.119.044.061.031.135.06.045.015.045.016.09.045.061.015.029.015.076.031.029.014.061.031.045.014.045.03.059.03.046.029.03.016.061.03.044.03.075.045.045.016.074.044.016.015.045.031.09.074.046.03.044.03.031.014.045.031.074.074.061.045.045.03.016.015.029.016.074.061.046.044.03.03.045.029.045.031.029.015.12.12.06.061.135.135.031.029c.016.016.045.045.061.075l.029.03.166.194.045.06c.014.016.014.031.029.031l.09.135.045.045.09.12.076.12.045.09.059.105.045.09.016.029.029.061.076.15.074.149.031.075c.059.135.104.27.164.42.074.195.135.404.18.63.045.165.076.315.105.48l.029.27.045.3c.016.121.031.256.031.375.014.121.014.24.014.359v.256c0 .016-.006.029-.014.045-.016.03-.031.045-.061.075-.021.015-.049.046-.08.046-.029.014-.059.014-.09.014h-.045c-.029 0-.059-.014-.09-.029-.029-.016-.061-.03-.074-.061-.016-.029-.045-.061-.061-.09s-.031-.06-.031-.09v-.359c-.014-.209-.029-.425-.059-.639-.016-.146-.045-.284-.061-.42 0-.074-.016-.146-.029-.209l-.029-.15-.038-.141-.016-.09-.045-.15c-.029-.12-.074-.24-.119-.36-.029-.091-.061-.165-.105-.239l-.029-.076-.135-.27-.031-.045c-.061-.135-.135-.27-.225-.391l-.045-.074h-.201l-.064-.091c-.055-.089-.114-.165-.18-.239l-.125-.15-.015-.016-.046-.057-.035-.045-.075-.074-.015-.03-.07-.06-.045-.046-.083-.075-.04-.037-.046-.045-.015-.016c-.016-.015-.045-.045-.075-.06l-.076-.062-.03-.015-.061-.046-.074-.06-.045-.036-.03-.016-.06-.053c0-.016-.016-.016-.031-.016l-.029-.029-.015-.016v-.013l-.03-.014-.061-.037-.044-.031-.075-.045-.06-.045-.029-.016-.032-.013h-.09l-.019-.016-.065-.035-.009-.014-.03-.016-.045-.021h-.012l-.045-.016-.025-.015-.045-.015-.01-.011-.03-.016-.053-.029-.03-.015-.09-.03-.074-.029-.137-.016-.044-.029c-.015-.01-.03-.016-.046-.016l-.029-.015c-.029-.011-.045-.016-.075-.03l-.03-.016h-.029l-.061-.029-.029-.016-.045-.015h-.092c-.008 0-.019-.005-.03-.007h-.09l-.045-.016h-.015l-.045-.016h-.041c-.025-.014-.045-.014-.07-.014l-.01-.016-.06-.015c-.03-.016-.056-.016-.084-.016l-.045-.015-.05-.016-.045-.014-.061-.016h-.061l-.179-.022h-.09l-.116-.015h-.076l-.068-.008h-.03l-.054-.016h-.285l-.01-.015h-.061c-.03 0-.064-.015-.09-.03-.03-.016-.061-.029-.081-.06l-.03-.046c-.029-.029-.029-.06-.045-.09-.014-.028-.014-.059-.014-.089s0-.06.015-.09c.016-.029.029-.06.061-.075.015-.03.044-.044.074-.06.029-.016.061-.03.09-.03h.061l.015.066zm.554 1.574l.037.003.061.006c.008 0 .018 0 .029.003.022 0 .045.004.075.006l.06.008.024.016.045.015.048.015.045.016h.03l.042.015.07.015.056.016.026.014h.073l.119.028.046.015.045.015.045.016s.015 0 .015.015l.046.015.044.016.045.016c.015 0 .03.014.046.014.007 0 .014.016.025.016l.064.03h.029l.09.03.05.029.046.03.108.045.06.015.031.031c.045.014.09.044.135.059l.048.03.048.03.049.029c.045.03.082.046.121.076l.029.014.041.031.022.015.075.045.037.03.065.043.029.015.03.015.046.03.06.046c.015.014.022.014.034.029.01.015.016.015.025.03l.033.03.036.029.03.03.046.046.029.03.016.016.09.089.016.016c0 .015.015.03.029.03l.016.013.045.046.029.045.03.03.045.06.046.046.09.119.014.029.061.076.016.029.015.031.015.029.016.03c.016.015.016.03.029.06l.043.076.016.015.029.061.031.044c.014.015.014.029.029.045l.03.045.03.061.029.059.016.046c.015.044.045.075.06.12 0 .015.015.029.015.045l.045.119.061.195c0 .016.015.045.015.061l.046.135.044.18.046.24c.014.074.014.135.029.211.016.119.03.238.03.359l.015.21v.165c0 .016 0 .029-.015.045l-.044.043c-.029.023-.045.045-.074.061-.03.015-.061.029-.09.04-.031.016-.075.016-.105.016-.029 0-.061-.016-.09-.03-.016 0-.03-.016-.045-.021-.031-.014-.061-.039-.075-.065-.03-.03-.046-.06-.046-.091l-.014-.044v-.313c0-.133-.016-.256-.031-.385-.015-.135-.044-.285-.074-.42-.029-.09-.045-.18-.075-.26l-.03-.091-.029-.075-.016-.03-.045-.12-.045-.09-.075-.149-.069-.12v-.019l-.029-.047-.03-.038-.045-.075-.046-.061-.089-.119c-.046-.061-.09-.12-.142-.178-.014-.015-.029-.029-.029-.045l-.03-.029-.017-.016-.03-.014-.03-.027v-.146l-.119-.113-.075-.068v-.014l-.03-.031-.038-.029-.015-.016c0-.015-.016-.015-.029-.015l-.046-.016-.015-.015-.061-.045-.014-.016-.016-.015c-.012-.015-.023-.015-.03-.015l-.06-.045-.016-.016-.06-.029-.011-.016-.045-.029-.03-.016-.03-.029-.029-.031h-.016c-.029-.029-.06-.044-.105-.06l-.044-.03-.03-.014-.016-.016-.045-.03-.044-.015-.06-.03-.046-.015-.015-.016-.056-.014v-.012l-.091-.03-.06-.03-.03-.015h-.06c-.03-.015-.045-.015-.075-.03H13.2l-.045-.016h-.044l-.046-.014-.029-.016h-.061l-.061-.015-.029-.016h-.165l-.069-.015H12.3l-.046-.016c-.029-.014-.06-.029-.09-.06-.014-.03-.045-.06-.06-.089-.015-.031-.03-.061-.03-.091v-.09c.006-.046.016-.075.03-.105.008-.015.015-.03.03-.045.018-.03.045-.06.075-.075.015-.015.03-.015.044-.029.031-.016.061-.016.091-.016h.06l-.014.055zm.454 1.629c.015 0 .03 0 .044.004.016 0 .031 0 .046.002l.052.005c.104.009.213.024.318.046l.104.023.026.008.114.029.059.02.046.016c.045.014.091.045.135.06l.016.015.06.03.09.046.029.014c.016.016.031.016.046.03.015.016.045.03.06.045.061.03.105.075.15.105l.105.09.09.091.061.074.029.029.03.031.044.06.091.135.075.135.06.12.046.105c.044.104.06.195.09.299.029.091.045.196.06.285l.015.15.016.136V9.8c0 .045-.016.075-.03.105-.015.029-.046.074-.075.09-.03.029-.061.045-.105.061-.029.014-.06.014-.09.014-.029 0-.06 0-.09-.014l-.104-.046c-.03-.03-.06-.045-.091-.091-.015-.029-.029-.06-.045-.104v-.166l-.015-.105-.015-.119-.016-.105-.016-.06c0-.015-.014-.045-.014-.06-.03-.121-.09-.24-.15-.36l-.061-.06-.047-.06-.045-.045-.015-.03-.075-.06-.061-.061-.059-.045c-.016-.015-.03-.015-.061-.029l-.09-.061-.061-.03-.029-.015h-.016l-.076-.031-.09-.03-.09-.015h-.075l-.044-.015-.035-.007h-.045l-.06-.016h-.255l-.015-.075h-.039c-.03-.004-.055-.015-.08-.029-.035-.021-.064-.045-.09-.08-.018-.029-.034-.061-.045-.09-.008-.029-.012-.06-.012-.09 0-.037 0-.075.015-.113.015-.039.03-.07.06-.1l.061-.045c.029-.016.061-.03.09-.03l.062-.075h.032z"/></svg> </span>
|
@@ -760,33 +760,32 @@ class SimpleSocialButtonsPR {
|
|
760 |
$arrButtonsCode[] = '<button onclick="javascript:window.open(this.dataset.href, \'_self\' );return false;" class="simplesocial-viber-share" data-href="viber://forward?text=' . $permalink . '"><span class="simplesocialtxt">Viber</span></button>';
|
761 |
}
|
762 |
break;
|
763 |
-
|
764 |
-
case 'fblike':
|
765 |
$_html = '<div class="fb-like ssb-fb-like" data-href="' . $permalink . '" data-layout="button_count" data-action="like" data-size="small" data-show-faces="false" data-share="false"></div>';
|
766 |
|
767 |
$arrButtonsCode[] = $_html;
|
768 |
|
769 |
break;
|
770 |
-
|
771 |
-
case 'messenger':
|
772 |
|
773 |
$link = urlencode( $permalink );
|
|
|
774 |
|
775 |
if ( $this->selected_theme == 'simple-icons' ) {
|
776 |
-
$arrButtonsCode[] = '<button onclick="javascript:window.open(this.dataset.href, \'_blank\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\' );return false;" class="simplesocial-viber-share ssb_msng-icon" data-href=
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
} else {
|
783 |
|
784 |
-
$arrButtonsCode[] = '<button class="simplesocial-msng-share" onclick="javascript:window.open( this.dataset.href, \'_blank\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\' );return false;" data-href="
|
785 |
}
|
786 |
break;
|
787 |
-
|
788 |
if ( $this->selected_theme == 'simple-icons' ) {
|
789 |
-
$arrButtonsCode[] = ' <button onclick="javascript:window.location.href = this.dataset.href;return false;" class="ssb_email-icon simplesocial-email-share" data-href="mailto:?subject='. $title .'&body='. $permalink .'"
|
790 |
<span class="icon"> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="16px" height="11.9px" viewBox="-1214.1 1563.9 16 11.9" enable-background="new -1214.1 1563.9 16 11.9" xml:space="preserve">
|
791 |
<path d="M-1214.1,1565.2v1l8,4l8-4v-1c0-0.7-0.6-1.3-1.3-1.3h-13.4C-1213.5,1563.9-1214.1,1564.4-1214.1,1565.2z M-1214.1,1567.4v7.1c0,0.7,0.6,1.3,1.3,1.3h13.4c0.7,0,1.3-0.6,1.3-1.3v-7.1l-8,4L-1214.1,1567.4z"/> </svg> </span>
|
792 |
<span class="simplesocialtxt">Email</span>
|
@@ -796,9 +795,9 @@ class SimpleSocialButtonsPR {
|
|
796 |
$arrButtonsCode[] = '<button onclick="javascript:window.location.href = this.dataset.href;return false;" class="simplesocial-email-share" data-href="mailto:?subject='. $title .'&body='. $permalink .'"><span class="simplesocialtxt">Email</span></button>';
|
797 |
}
|
798 |
break;
|
799 |
-
|
800 |
if ( $this->selected_theme == 'simple-icons' ) {
|
801 |
-
$arrButtonsCode[] = ' <button onclick="javascript:window.print();return false;" class=" ssb_print-icon simplesocial-email-share"
|
802 |
<span class="icon"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="16px" height="13.7px" viewBox="-1296.9 1876.4 16 13.7" enable-background="new -1296.9 1876.4 16 13.7" xml:space="preserve"><g>
|
803 |
<path fill="#FFFFFF" d="M-1288.9,1879.7c2.3,0,4.6,0,6.9,0c0.4,0,0.7,0.1,0.9,0.5c0.1,0.2,0.1,0.4,0.1,0.6c0,1.7,0,3.4,0,5.1 c0,0.7-0.4,1.1-1.1,1c-0.6,0-1.2,0-1.8,0c-0.1,0-0.2,0-0.2,0.2c0,0.7,0,1.4,0,2c0,0.6-0.4,1-1,1c-0.1,0-0.3,0-0.4,0 c-2.5,0-4.9,0-7.4,0c-0.3,0-0.5,0-0.8-0.1c-0.3-0.2-0.5-0.5-0.5-0.9c0-0.7,0-1.4,0-2c0-0.2-0.1-0.2-0.2-0.2c-0.6,0-1.2,0-1.7,0 c-0.7,0-1-0.4-1-1c0-1.7,0-3.4,0-5.1c0-0.4,0.2-0.8,0.6-0.9c0.2-0.1,0.3-0.1,0.5-0.1C-1293.5,1879.7-1291.2,1879.7-1288.9,1879.7z M-1288.9,1884.9C-1288.9,1884.9-1288.9,1884.9-1288.9,1884.9c-1.4,0-2.8,0-4.2,0c-0.1,0-0.2,0-0.2,0.2c0,0.3,0,0.7,0,1 c0,1,0,2,0,3c0,0.3,0.1,0.4,0.4,0.4c2.5,0,5.1,0,7.6,0c0.1,0,0.3,0,0.4,0c0.2,0,0.3-0.2,0.3-0.3c0-1.3,0-2.7,0-4 c0-0.2,0-0.2-0.2-0.2C-1286.1,1884.9-1287.5,1884.9-1288.9,1884.9z M-1284.2,1882.4c0.4,0,0.7-0.3,0.7-0.7c0-0.4-0.3-0.7-0.8-0.7 c-0.4,0-0.7,0.3-0.7,0.7C-1284.9,1882.1-1284.6,1882.4-1284.2,1882.4z"/>
|
804 |
<path fill="#FFFFFF" d="M-1283.9,1879c-0.2,0-0.4,0-0.5,0c-3.1,0-6.2,0-9.3,0c-0.1,0-0.2,0-0.2-0.2c0-0.5,0-1,0-1.5 c0-0.5,0.4-1,0.9-1c0.1,0,0.2,0,0.3,0c2.6,0,5.2,0,7.8,0c0.6,0,1,0.4,1,1c0,0.5,0,0.9,0,1.4 C-1283.9,1878.9-1283.9,1879-1283.9,1879z"/>
|
@@ -1033,7 +1032,7 @@ class SimpleSocialButtonsPR {
|
|
1033 |
}
|
1034 |
}
|
1035 |
} else {
|
1036 |
-
|
1037 |
}
|
1038 |
if ( null !== $selected_theme['order'] ) {
|
1039 |
$selected_theme['order'] = array_flip( array_merge( array( 0 ), explode( ',', $selected_theme['order'] ) ) );
|
@@ -1091,7 +1090,15 @@ class SimpleSocialButtonsPR {
|
|
1091 |
|
1092 |
// get post permalink and title
|
1093 |
$permalink = get_permalink();
|
1094 |
-
$title = get_the_title();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1095 |
|
1096 |
// Sorting the buttons
|
1097 |
$arrButtons = array();
|
@@ -1120,23 +1127,32 @@ class SimpleSocialButtonsPR {
|
|
1120 |
if ( $show_total ) {
|
1121 |
$arrButtons['totalshare'] = '100';
|
1122 |
}
|
1123 |
-
$post_id = get_the_id();
|
1124 |
|
1125 |
-
|
1126 |
-
//
|
1127 |
-
if
|
|
|
|
|
|
|
|
|
|
|
|
|
1128 |
|
1129 |
$_share_links = array();
|
|
|
1130 |
foreach ( $arrButtons as $social_name => $priority ) {
|
1131 |
-
if ( 'totalshare' == $social_name || 'viber' == $social_name ) {
|
1132 |
continue;
|
1133 |
}
|
1134 |
-
$_share_links[ $social_name ] = call_user_func( 'ssb_' . $social_name . '_generate_link',
|
|
|
|
|
|
|
1135 |
}
|
1136 |
|
1137 |
$result = ssb_fetch_shares_via_curl_multi( array_filter( $_share_links ) );
|
1138 |
|
1139 |
-
$share_counts = ssb_fetch_fresh_counts( $result, $post_id );
|
1140 |
// update_post_meta( $post_id,'ssb_cache_timestamp',floor( ( ( date( 'U' ) / 60) / 60 ) ) );
|
1141 |
} else {
|
1142 |
$share_counts = ssb_fetch_cached_counts( array_flip( $arrButtons ), $post_id );
|
@@ -1216,7 +1232,7 @@ class SimpleSocialButtonsPR {
|
|
1216 |
|
1217 |
} else {
|
1218 |
|
1219 |
-
$_html
|
1220 |
|
1221 |
if ( $show_count ) {
|
1222 |
$_html .= '<span class="ssb_counter ssb_twitter_counter">' . $twitter_share . '</span>';
|
@@ -1343,17 +1359,18 @@ class SimpleSocialButtonsPR {
|
|
1343 |
|
1344 |
case 'messenger':
|
1345 |
$link = urlencode( $permalink );
|
|
|
1346 |
|
1347 |
if ( $this->selected_theme == 'simple-icons' ) {
|
1348 |
-
$arrButtonsCode[] = '<button onclick="javascript:window.open(this.dataset.href, \'_blank\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\' );return false;" class="
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
} else {
|
1355 |
|
1356 |
-
$arrButtonsCode[] = '<button class="simplesocial-msng-share" onclick="javascript:window.open( this.dataset.href, \'_blank\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\' );return false;" data-href="
|
1357 |
}
|
1358 |
|
1359 |
break;
|
@@ -1411,36 +1428,36 @@ class SimpleSocialButtonsPR {
|
|
1411 |
|
1412 |
if ( class_exists( 'Jetpack' ) ) { // Check jetpack active.
|
1413 |
return;
|
1414 |
-
} else if( defined( 'WPSEO_VERSION' ) ) { // Check
|
1415 |
return;
|
1416 |
}
|
1417 |
-
|
1418 |
-
|
1419 |
if ($this->og_get_title()) {
|
1420 |
-
|
1421 |
}
|
1422 |
|
1423 |
if ( $this->og_get_description() ) {
|
1424 |
-
|
1425 |
}
|
1426 |
-
|
1427 |
if ( $this->og_get_blog() ) {
|
1428 |
-
|
1429 |
}
|
1430 |
-
|
1431 |
-
|
1432 |
|
1433 |
-
|
1434 |
if ( $this->og_get_description() ) {
|
1435 |
-
|
1436 |
}
|
1437 |
|
1438 |
if ( $this->og_get_title() ) {
|
1439 |
-
|
1440 |
}
|
1441 |
-
|
1442 |
|
1443 |
-
|
|
|
1444 |
|
1445 |
|
1446 |
function og_get_title() {
|
@@ -1594,6 +1611,40 @@ class SimpleSocialButtonsPR {
|
|
1594 |
}
|
1595 |
}
|
1596 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1597 |
} // end class
|
1598 |
|
1599 |
|
3 |
* Plugin Name: Simple Social Buttons
|
4 |
* Plugin URI: http://www.WPBrigade.com/wordpress/plugins/simple-social-buttons/
|
5 |
* Description: Simple Social Buttons adds an advanced set of social media sharing buttons to your WordPress sites, such as: Google +1, Facebook, WhatsApp, Viber, Twitter, Reddit, LinkedIn and Pinterest. This makes it the most <code>Flexible Social Sharing Plugin ever for Everyone.</code>
|
6 |
+
* Version: 2.0.13
|
7 |
* Author: WPBrigade
|
8 |
* Author URI: http://www.WPBrigade.com/
|
9 |
* Text Domain: simple-social-buttons
|
30 |
|
31 |
class SimpleSocialButtonsPR {
|
32 |
public $pluginName = 'Simple Social Buttons';
|
33 |
+
public $pluginVersion = '2.0.13';
|
34 |
public $pluginPrefix = 'ssb_pr_';
|
35 |
public $hideCustomMetaKey = '_ssb_hide';
|
36 |
private $fb_app_id = '891268654262273';
|
156 |
}
|
157 |
}
|
158 |
|
159 |
+
|
160 |
$_share_links = array();
|
161 |
foreach ( $order as $social_name => $priority ) {
|
162 |
+
if ( 'totalshare' == $social_name || 'viber' == $social_name || 'fblike' == $social_name || 'whatsapp' == $social_name || 'print' == $social_name || 'email' == $social_name || 'messenger' == $social_name ) {
|
163 |
continue; }
|
164 |
+
$_share_links[ $social_name ] = call_user_func( 'ssb_' . $social_name . '_generate_link', get_permalink( $post_id ) );
|
165 |
+
$url = $this->http_or_https_resolve_url( get_permalink( $post_id ) );
|
166 |
+
}
|
167 |
+
// http url convert to https or vice versa
|
168 |
+
$_alt_share_links = $this->http_or_https_link_generate( get_permalink( $post_id ) );
|
169 |
|
170 |
+
$result = ssb_fetch_shares_via_curl_multi( array_filter( $_share_links ) );
|
171 |
|
172 |
+
// $result = ssb_fetch_shares_via_curl_multi(
|
173 |
+
// array(
|
174 |
+
// 'linkedin' => ssb_linkedin_generate_link( 'https://wpbrigade.com/first-wordcamp-talk/' ),
|
175 |
+
// 'fbshare' => ssb_fbshare_generate_link( 'http://www.blc.lu/' ),
|
176 |
+
// 'googleplus' => ssb_googleplus_generate_link( 'https://wpbrigade.com/first-wordcamp-talk/' ),
|
177 |
+
// 'twitter' => ssb_twitter_generate_link( 'https://wptavern.com/jetpack-5-3-adds-php-7-1-compatibility-better-control-for-wordads-placement' ),
|
178 |
+
// 'pinterest' => ssb_pinterest_generate_link( 'http://websitehostingcost.com/tag/dedicated/' ),
|
179 |
+
// 'reddit' => ssb_reddit_generate_link( 'http://stackoverflow.com/q/811074/1288' )
|
180 |
+
// )
|
181 |
+
// );
|
182 |
+
$share_counts = ssb_fetch_fresh_counts( $result, $post_id, $_alt_share_links );
|
183 |
|
184 |
update_post_meta( $post_id, 'ssb_cache_timestamp', floor( ( ( date( 'U' ) / 60 ) / 60 ) ) );
|
185 |
+
echo json_encode( $share_counts );
|
186 |
wp_die();
|
187 |
+
}
|
188 |
|
189 |
function ssb_output_cache_trigger( $info ) {
|
190 |
|
193 |
if ( ( ssb_is_cache_fresh( $info['postID'], true ) ) && empty( $_GET['ssb_cache'] ) ) {
|
194 |
return $info;
|
195 |
}
|
196 |
+
// if is home or front page return info
|
197 |
+
if( is_home() || is_front_page() ){
|
198 |
+
return $info;
|
199 |
+
}
|
200 |
// Return if we're on a WooCommerce account page.
|
201 |
if ( function_exists( 'is_account_page' ) && is_account_page() ) {
|
202 |
return $info;
|
209 |
ob_start();
|
210 |
|
211 |
?>
|
212 |
+
jQuery( document ).ready(function(){
|
213 |
var ssb_admin_ajax = '<?php echo admin_url( 'admin-ajax.php' ); ?>';
|
214 |
var is_ssb_used = jQuery('.simplesocialbuttons');
|
215 |
var postID = <?php echo $info['postID']; ?> ;
|
234 |
|
235 |
});
|
236 |
}
|
237 |
+
});
|
238 |
<?php
|
239 |
$info['footer_output'] .= ob_get_clean();
|
240 |
|
513 |
$ssb_buttonscode = '';
|
514 |
// get post permalink and title
|
515 |
$permalink = get_permalink();
|
516 |
+
$title = urlencode( get_the_title() );
|
517 |
|
518 |
+
// Sorting the buttons
|
519 |
$arrButtons = array();
|
520 |
foreach ( $this->arrKnownButtons as $button_name ) {
|
521 |
if ( ! empty( $order[ $button_name ] ) && (int) $order[ $button_name ] != 0 ) {
|
525 |
// echo '<pre>'; print_r( $arrButtons ); echo '</pre>';
|
526 |
@asort( $arrButtons );
|
527 |
|
528 |
+
// add total share index in array.
|
529 |
if ( $show_total ) {
|
530 |
$arrButtons['totalshare'] = '100'; }
|
531 |
$post_id = get_the_id();
|
538 |
}
|
539 |
}
|
540 |
|
541 |
+
// Reset the cache timestamp if needed
|
542 |
+
// if false fetch the new share counts.
|
543 |
if ( ( isset( $this->settings['cache'] ) && $this->settings['cache'] == 'off') || ( true == $http_solve ) ) {
|
544 |
|
545 |
$_share_links = array();
|
|
|
546 |
foreach ( $arrButtons as $social_name => $priority ) {
|
547 |
if ( 'totalshare' == $social_name || 'viber' == $social_name || 'fblike' == $social_name || 'whatsapp' == $social_name || 'print' == $social_name || 'email' == $social_name || 'messenger' == $social_name) {
|
548 |
continue; }
|
549 |
$_share_links[ $social_name ] = call_user_func( 'ssb_' . $social_name . '_generate_link', $permalink );
|
|
|
|
|
|
|
550 |
}
|
551 |
+
// http url convert to https or vice versa
|
552 |
+
$_alt_share_links = $this->http_or_https_link_generate( $permalink );
|
553 |
+
|
554 |
//normal fetch
|
555 |
$result = ssb_fetch_shares_via_curl_multi( array_filter( $_share_links ) );
|
556 |
|
567 |
|
568 |
|
569 |
//fetch http / https result and save in network_old_share_count meta tags
|
570 |
+
$share_counts = ssb_fetch_fresh_counts( $result, $post_id , $_alt_share_links);
|
|
|
|
|
571 |
// update_post_meta( $post_id,'ssb_cache_timestamp',floor( ( ( date( 'U' ) / 60) / 60 ) ) );
|
572 |
} else {
|
573 |
$share_counts = ssb_fetch_cached_counts( array_flip( $arrButtons ), $post_id );
|
599 |
$arrButtonsCode[] = $_html;
|
600 |
|
601 |
break;
|
602 |
+
case 'fbshare':
|
|
|
603 |
$fbshare_share = $share_counts['fbshare'] ? $share_counts['fbshare'] : 0;
|
604 |
|
605 |
if ( $this->selected_theme == 'simple-icons' ) {
|
712 |
$total_share = $share_counts['total'] ? $share_counts['total'] : 0;
|
713 |
$arrButtonsCode[] = "<span class='ssb_total_counter'>" . $total_share . '<span>Shares</span></span>';
|
714 |
break;
|
715 |
+
case 'reddit':
|
|
|
716 |
$reddit_score = $share_counts['reddit'] ? $share_counts['reddit'] : 0;
|
717 |
|
718 |
if ( $this->selected_theme == 'simple-icons' ) {
|
749 |
$arrButtonsCode[] = '<button onclick="javascript:window.open(this.dataset.href, \'_blank\' );return false;" class="simplesocial-whatsapp-share" data-href="https://api.whatsapp.com/send?text=' . $permalink . '"><span class="simplesocialtxt">WhatsApp</span></button>';
|
750 |
}
|
751 |
break;
|
752 |
+
case 'viber':
|
|
|
753 |
if ( $this->selected_theme == 'simple-icons' ) {
|
754 |
$arrButtonsCode[] = '<button onclick="javascript:window.open(this.dataset.href, \'_self\' );return false;" class="simplesocial-viber-share ssb_viber-icon" data-href="viber://forward?text=' . $permalink . '">
|
755 |
<span class="icon"> <svg aria-labelledby="simpleicons-viber-icon" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title id="simpleicons-viber-icon">Viber icon</title><path d="M20.812 2.343c-.596-.549-3.006-2.3-8.376-2.325 0 0-6.331-.38-9.415 2.451C1.302 4.189.698 6.698.634 9.82.569 12.934.487 18.774 6.12 20.36h.005l-.005 2.416s-.034.979.609 1.178c.779.24 1.236-.504 1.98-1.303.409-.439.972-1.088 1.397-1.582 3.851.322 6.813-.416 7.149-.525.777-.254 5.176-.816 5.893-6.658.738-6.021-.357-9.83-2.338-11.547v.004zm.652 11.112c-.615 4.876-4.184 5.187-4.83 5.396-.285.092-2.895.738-6.164.525 0 0-2.445 2.941-3.195 3.705-.121.121-.271.166-.361.145-.135-.029-.164-.18-.164-.404l.015-4.006c-.015 0 0 0 0 0-4.771-1.336-4.485-6.301-4.425-8.91.044-2.596.538-4.726 1.994-6.167 2.611-2.371 7.997-2.012 7.997-2.012 4.543.016 6.721 1.385 7.223 1.846 1.674 1.432 2.529 4.865 1.904 9.893l.006-.011zM7.741 4.983c.242 0 .459.109.629.311.004.002.58.695.83 1.034.235.32.551.83.711 1.115.285.51.104 1.032-.172 1.248l-.566.45c-.285.229-.25.653-.25.653s.84 3.157 3.959 3.953c0 0 .426.039.654-.246l.451-.569c.213-.285.734-.465 1.244-.181.285.15.795.466 1.116.704.339.24 1.032.826 1.036.826.33.271.404.689.18 1.109v.016c-.23.405-.541.78-.934 1.141h-.008c-.314.27-.629.42-.944.449-.03 0-.075.016-.136 0-.135 0-.27-.029-.404-.061v-.014c-.48-.135-1.275-.48-2.596-1.216-.855-.479-1.574-.96-2.189-1.455-.315-.255-.645-.54-.976-.87l-.076-.028-.03-.03-.029-.029c-.331-.33-.615-.66-.871-.98-.48-.609-.96-1.327-1.439-2.189-.735-1.32-1.08-2.115-1.215-2.596H5.7c-.045-.134-.075-.269-.06-.404-.015-.061 0-.105 0-.141.03-.299.189-.614.458-.944h.005c.355-.39.738-.704 1.146-.933.164-.091.329-.135.479-.135h.016l-.003.012zm4.095-.683h.116l.076.002h.02l.089.005h.511l.135.015h.074l.15.016h.03l.104.015h.016l.074.015c.046 0 .076.016.105.016h.091l.075.029.06.016.06.015.03.015h.045l.046.016h.029l.074.016.045.014.046.016.06.016.03.014c.03 0 .06.016.091.016l.044.015.046.016.119.044.061.031.135.06.045.015.045.016.09.045.061.015.029.015.076.031.029.014.061.031.045.014.045.03.059.03.046.029.03.016.061.03.044.03.075.045.045.016.074.044.016.015.045.031.09.074.046.03.044.03.031.014.045.031.074.074.061.045.045.03.016.015.029.016.074.061.046.044.03.03.045.029.045.031.029.015.12.12.06.061.135.135.031.029c.016.016.045.045.061.075l.029.03.166.194.045.06c.014.016.014.031.029.031l.09.135.045.045.09.12.076.12.045.09.059.105.045.09.016.029.029.061.076.15.074.149.031.075c.059.135.104.27.164.42.074.195.135.404.18.63.045.165.076.315.105.48l.029.27.045.3c.016.121.031.256.031.375.014.121.014.24.014.359v.256c0 .016-.006.029-.014.045-.016.03-.031.045-.061.075-.021.015-.049.046-.08.046-.029.014-.059.014-.09.014h-.045c-.029 0-.059-.014-.09-.029-.029-.016-.061-.03-.074-.061-.016-.029-.045-.061-.061-.09s-.031-.06-.031-.09v-.359c-.014-.209-.029-.425-.059-.639-.016-.146-.045-.284-.061-.42 0-.074-.016-.146-.029-.209l-.029-.15-.038-.141-.016-.09-.045-.15c-.029-.12-.074-.24-.119-.36-.029-.091-.061-.165-.105-.239l-.029-.076-.135-.27-.031-.045c-.061-.135-.135-.27-.225-.391l-.045-.074h-.201l-.064-.091c-.055-.089-.114-.165-.18-.239l-.125-.15-.015-.016-.046-.057-.035-.045-.075-.074-.015-.03-.07-.06-.045-.046-.083-.075-.04-.037-.046-.045-.015-.016c-.016-.015-.045-.045-.075-.06l-.076-.062-.03-.015-.061-.046-.074-.06-.045-.036-.03-.016-.06-.053c0-.016-.016-.016-.031-.016l-.029-.029-.015-.016v-.013l-.03-.014-.061-.037-.044-.031-.075-.045-.06-.045-.029-.016-.032-.013h-.09l-.019-.016-.065-.035-.009-.014-.03-.016-.045-.021h-.012l-.045-.016-.025-.015-.045-.015-.01-.011-.03-.016-.053-.029-.03-.015-.09-.03-.074-.029-.137-.016-.044-.029c-.015-.01-.03-.016-.046-.016l-.029-.015c-.029-.011-.045-.016-.075-.03l-.03-.016h-.029l-.061-.029-.029-.016-.045-.015h-.092c-.008 0-.019-.005-.03-.007h-.09l-.045-.016h-.015l-.045-.016h-.041c-.025-.014-.045-.014-.07-.014l-.01-.016-.06-.015c-.03-.016-.056-.016-.084-.016l-.045-.015-.05-.016-.045-.014-.061-.016h-.061l-.179-.022h-.09l-.116-.015h-.076l-.068-.008h-.03l-.054-.016h-.285l-.01-.015h-.061c-.03 0-.064-.015-.09-.03-.03-.016-.061-.029-.081-.06l-.03-.046c-.029-.029-.029-.06-.045-.09-.014-.028-.014-.059-.014-.089s0-.06.015-.09c.016-.029.029-.06.061-.075.015-.03.044-.044.074-.06.029-.016.061-.03.09-.03h.061l.015.066zm.554 1.574l.037.003.061.006c.008 0 .018 0 .029.003.022 0 .045.004.075.006l.06.008.024.016.045.015.048.015.045.016h.03l.042.015.07.015.056.016.026.014h.073l.119.028.046.015.045.015.045.016s.015 0 .015.015l.046.015.044.016.045.016c.015 0 .03.014.046.014.007 0 .014.016.025.016l.064.03h.029l.09.03.05.029.046.03.108.045.06.015.031.031c.045.014.09.044.135.059l.048.03.048.03.049.029c.045.03.082.046.121.076l.029.014.041.031.022.015.075.045.037.03.065.043.029.015.03.015.046.03.06.046c.015.014.022.014.034.029.01.015.016.015.025.03l.033.03.036.029.03.03.046.046.029.03.016.016.09.089.016.016c0 .015.015.03.029.03l.016.013.045.046.029.045.03.03.045.06.046.046.09.119.014.029.061.076.016.029.015.031.015.029.016.03c.016.015.016.03.029.06l.043.076.016.015.029.061.031.044c.014.015.014.029.029.045l.03.045.03.061.029.059.016.046c.015.044.045.075.06.12 0 .015.015.029.015.045l.045.119.061.195c0 .016.015.045.015.061l.046.135.044.18.046.24c.014.074.014.135.029.211.016.119.03.238.03.359l.015.21v.165c0 .016 0 .029-.015.045l-.044.043c-.029.023-.045.045-.074.061-.03.015-.061.029-.09.04-.031.016-.075.016-.105.016-.029 0-.061-.016-.09-.03-.016 0-.03-.016-.045-.021-.031-.014-.061-.039-.075-.065-.03-.03-.046-.06-.046-.091l-.014-.044v-.313c0-.133-.016-.256-.031-.385-.015-.135-.044-.285-.074-.42-.029-.09-.045-.18-.075-.26l-.03-.091-.029-.075-.016-.03-.045-.12-.045-.09-.075-.149-.069-.12v-.019l-.029-.047-.03-.038-.045-.075-.046-.061-.089-.119c-.046-.061-.09-.12-.142-.178-.014-.015-.029-.029-.029-.045l-.03-.029-.017-.016-.03-.014-.03-.027v-.146l-.119-.113-.075-.068v-.014l-.03-.031-.038-.029-.015-.016c0-.015-.016-.015-.029-.015l-.046-.016-.015-.015-.061-.045-.014-.016-.016-.015c-.012-.015-.023-.015-.03-.015l-.06-.045-.016-.016-.06-.029-.011-.016-.045-.029-.03-.016-.03-.029-.029-.031h-.016c-.029-.029-.06-.044-.105-.06l-.044-.03-.03-.014-.016-.016-.045-.03-.044-.015-.06-.03-.046-.015-.015-.016-.056-.014v-.012l-.091-.03-.06-.03-.03-.015h-.06c-.03-.015-.045-.015-.075-.03H13.2l-.045-.016h-.044l-.046-.014-.029-.016h-.061l-.061-.015-.029-.016h-.165l-.069-.015H12.3l-.046-.016c-.029-.014-.06-.029-.09-.06-.014-.03-.045-.06-.06-.089-.015-.031-.03-.061-.03-.091v-.09c.006-.046.016-.075.03-.105.008-.015.015-.03.03-.045.018-.03.045-.06.075-.075.015-.015.03-.015.044-.029.031-.016.061-.016.091-.016h.06l-.014.055zm.454 1.629c.015 0 .03 0 .044.004.016 0 .031 0 .046.002l.052.005c.104.009.213.024.318.046l.104.023.026.008.114.029.059.02.046.016c.045.014.091.045.135.06l.016.015.06.03.09.046.029.014c.016.016.031.016.046.03.015.016.045.03.06.045.061.03.105.075.15.105l.105.09.09.091.061.074.029.029.03.031.044.06.091.135.075.135.06.12.046.105c.044.104.06.195.09.299.029.091.045.196.06.285l.015.15.016.136V9.8c0 .045-.016.075-.03.105-.015.029-.046.074-.075.09-.03.029-.061.045-.105.061-.029.014-.06.014-.09.014-.029 0-.06 0-.09-.014l-.104-.046c-.03-.03-.06-.045-.091-.091-.015-.029-.029-.06-.045-.104v-.166l-.015-.105-.015-.119-.016-.105-.016-.06c0-.015-.014-.045-.014-.06-.03-.121-.09-.24-.15-.36l-.061-.06-.047-.06-.045-.045-.015-.03-.075-.06-.061-.061-.059-.045c-.016-.015-.03-.015-.061-.029l-.09-.061-.061-.03-.029-.015h-.016l-.076-.031-.09-.03-.09-.015h-.075l-.044-.015-.035-.007h-.045l-.06-.016h-.255l-.015-.075h-.039c-.03-.004-.055-.015-.08-.029-.035-.021-.064-.045-.09-.08-.018-.029-.034-.061-.045-.09-.008-.029-.012-.06-.012-.09 0-.037 0-.075.015-.113.015-.039.03-.07.06-.1l.061-.045c.029-.016.061-.03.09-.03l.062-.075h.032z"/></svg> </span>
|
760 |
$arrButtonsCode[] = '<button onclick="javascript:window.open(this.dataset.href, \'_self\' );return false;" class="simplesocial-viber-share" data-href="viber://forward?text=' . $permalink . '"><span class="simplesocialtxt">Viber</span></button>';
|
761 |
}
|
762 |
break;
|
763 |
+
case 'fblike':
|
|
|
764 |
$_html = '<div class="fb-like ssb-fb-like" data-href="' . $permalink . '" data-layout="button_count" data-action="like" data-size="small" data-show-faces="false" data-share="false"></div>';
|
765 |
|
766 |
$arrButtonsCode[] = $_html;
|
767 |
|
768 |
break;
|
769 |
+
case 'messenger':
|
|
|
770 |
|
771 |
$link = urlencode( $permalink );
|
772 |
+
$messenger_share_url = $this->is_mobile() ? "fb-messenger://share/?link=$link?app_id=$this->fb_app_id" : "http://www.facebook.com/dialog/send?app_id=$this->fb_app_id&redirect_uri=$link&link=$link&display=popup";
|
773 |
|
774 |
if ( $this->selected_theme == 'simple-icons' ) {
|
775 |
+
$arrButtonsCode[] = '<button onclick="javascript:window.open(this.dataset.href, \'_blank\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\' );return false;" class="simplesocial-viber-share ssb_msng-icon" data-href='. $messenger_share_url .'>
|
776 |
+
<span class="icon"> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="18px" height="19px" viewBox="-889.5 1161 18 19" enable-background="new -889.5 1161 18 19" xml:space="preserve">
|
777 |
+
<path opacity="0.99" fill="#FFFFFF" enable-background="new " d="M-880.5,1161c-5,0-9,3.8-9,8.5c0,2.4,1,4.5,2.7,6v4.5l3.8-2.3 c0.8,0.2,1.6,0.3,2.5,0.3c5,0,9-3.8,9-8.5S-875.5,1161-880.5,1161z M-879.6,1172.2l-2.4-2.4l-4.3,2.4l4.7-5.2l2.4,2.4l4.2-2.4 L-879.6,1172.2z"/>
|
778 |
+
</svg> </span>
|
779 |
+
<span class="simplesocialtxt">Messenger</span>
|
780 |
+
</button>';
|
781 |
} else {
|
782 |
|
783 |
+
$arrButtonsCode[] = '<button class="simplesocial-msng-share" onclick="javascript:window.open( this.dataset.href, \'_blank\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\' );return false;" data-href="'. $messenger_share_url .'" ><span class="simplesocialtxt">Messenger</span></button> ';
|
784 |
}
|
785 |
break;
|
786 |
+
case 'email':
|
787 |
if ( $this->selected_theme == 'simple-icons' ) {
|
788 |
+
$arrButtonsCode[] = ' <button onclick="javascript:window.location.href = this.dataset.href;return false;" class="ssb_email-icon simplesocial-email-share" data-href="mailto:?subject='. $title .'&body='. $permalink .'">
|
789 |
<span class="icon"> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="16px" height="11.9px" viewBox="-1214.1 1563.9 16 11.9" enable-background="new -1214.1 1563.9 16 11.9" xml:space="preserve">
|
790 |
<path d="M-1214.1,1565.2v1l8,4l8-4v-1c0-0.7-0.6-1.3-1.3-1.3h-13.4C-1213.5,1563.9-1214.1,1564.4-1214.1,1565.2z M-1214.1,1567.4v7.1c0,0.7,0.6,1.3,1.3,1.3h13.4c0.7,0,1.3-0.6,1.3-1.3v-7.1l-8,4L-1214.1,1567.4z"/> </svg> </span>
|
791 |
<span class="simplesocialtxt">Email</span>
|
795 |
$arrButtonsCode[] = '<button onclick="javascript:window.location.href = this.dataset.href;return false;" class="simplesocial-email-share" data-href="mailto:?subject='. $title .'&body='. $permalink .'"><span class="simplesocialtxt">Email</span></button>';
|
796 |
}
|
797 |
break;
|
798 |
+
case 'print':
|
799 |
if ( $this->selected_theme == 'simple-icons' ) {
|
800 |
+
$arrButtonsCode[] = ' <button onclick="javascript:window.print();return false;" class=" ssb_print-icon simplesocial-email-share" >
|
801 |
<span class="icon"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="16px" height="13.7px" viewBox="-1296.9 1876.4 16 13.7" enable-background="new -1296.9 1876.4 16 13.7" xml:space="preserve"><g>
|
802 |
<path fill="#FFFFFF" d="M-1288.9,1879.7c2.3,0,4.6,0,6.9,0c0.4,0,0.7,0.1,0.9,0.5c0.1,0.2,0.1,0.4,0.1,0.6c0,1.7,0,3.4,0,5.1 c0,0.7-0.4,1.1-1.1,1c-0.6,0-1.2,0-1.8,0c-0.1,0-0.2,0-0.2,0.2c0,0.7,0,1.4,0,2c0,0.6-0.4,1-1,1c-0.1,0-0.3,0-0.4,0 c-2.5,0-4.9,0-7.4,0c-0.3,0-0.5,0-0.8-0.1c-0.3-0.2-0.5-0.5-0.5-0.9c0-0.7,0-1.4,0-2c0-0.2-0.1-0.2-0.2-0.2c-0.6,0-1.2,0-1.7,0 c-0.7,0-1-0.4-1-1c0-1.7,0-3.4,0-5.1c0-0.4,0.2-0.8,0.6-0.9c0.2-0.1,0.3-0.1,0.5-0.1C-1293.5,1879.7-1291.2,1879.7-1288.9,1879.7z M-1288.9,1884.9C-1288.9,1884.9-1288.9,1884.9-1288.9,1884.9c-1.4,0-2.8,0-4.2,0c-0.1,0-0.2,0-0.2,0.2c0,0.3,0,0.7,0,1 c0,1,0,2,0,3c0,0.3,0.1,0.4,0.4,0.4c2.5,0,5.1,0,7.6,0c0.1,0,0.3,0,0.4,0c0.2,0,0.3-0.2,0.3-0.3c0-1.3,0-2.7,0-4 c0-0.2,0-0.2-0.2-0.2C-1286.1,1884.9-1287.5,1884.9-1288.9,1884.9z M-1284.2,1882.4c0.4,0,0.7-0.3,0.7-0.7c0-0.4-0.3-0.7-0.8-0.7 c-0.4,0-0.7,0.3-0.7,0.7C-1284.9,1882.1-1284.6,1882.4-1284.2,1882.4z"/>
|
803 |
<path fill="#FFFFFF" d="M-1283.9,1879c-0.2,0-0.4,0-0.5,0c-3.1,0-6.2,0-9.3,0c-0.1,0-0.2,0-0.2-0.2c0-0.5,0-1,0-1.5 c0-0.5,0.4-1,0.9-1c0.1,0,0.2,0,0.3,0c2.6,0,5.2,0,7.8,0c0.6,0,1,0.4,1,1c0,0.5,0,0.9,0,1.4 C-1283.9,1878.9-1283.9,1879-1283.9,1879z"/>
|
1032 |
}
|
1033 |
}
|
1034 |
} else {
|
1035 |
+
$theme = $this->selected_theme;
|
1036 |
}
|
1037 |
if ( null !== $selected_theme['order'] ) {
|
1038 |
$selected_theme['order'] = array_flip( array_merge( array( 0 ), explode( ',', $selected_theme['order'] ) ) );
|
1090 |
|
1091 |
// get post permalink and title
|
1092 |
$permalink = get_permalink();
|
1093 |
+
$title = urlencode( get_the_title() );
|
1094 |
+
$post_id = get_the_id();
|
1095 |
+
|
1096 |
+
if( false == $permalink ) {
|
1097 |
+
$permalink = get_site_url();
|
1098 |
+
$title = get_bloginfo( 'name' );
|
1099 |
+
$post_id = 0;
|
1100 |
+
}
|
1101 |
+
|
1102 |
|
1103 |
// Sorting the buttons
|
1104 |
$arrButtons = array();
|
1127 |
if ( $show_total ) {
|
1128 |
$arrButtons['totalshare'] = '100';
|
1129 |
}
|
|
|
1130 |
|
1131 |
+
$non_exist_post_record = false;
|
1132 |
+
// special case if post id not exist for example short code run on widget out side the loop in archive page and old counts not exsist
|
1133 |
+
if( 0 == $post_id ) {
|
1134 |
+
$non_exist_post_record = get_option( 'ssb_not_exist_post_old_counts' );
|
1135 |
+
}
|
1136 |
+
|
1137 |
+
// Reset the cache timestamp if needed
|
1138 |
+
// if false fetch the new share counts.
|
1139 |
+
if ( ( isset( $this->settings['cache'] ) && $this->settings['cache'] == 'off' ) || ( ! $non_exist_post_record) ) {
|
1140 |
|
1141 |
$_share_links = array();
|
1142 |
+
$_alt_share_links = array();
|
1143 |
foreach ( $arrButtons as $social_name => $priority ) {
|
1144 |
+
if ( 'totalshare' == $social_name || 'viber' == $social_name || 'fblike' == $social_name || 'whatsapp' == $social_name || 'print' == $social_name || 'email' == $social_name || 'messenger' == $social_name) {
|
1145 |
continue;
|
1146 |
}
|
1147 |
+
$_share_links[ $social_name ] = call_user_func( 'ssb_' . $social_name . '_generate_link', $permalink );
|
1148 |
+
$url = $this->http_or_https_resolve_url( $permalink );
|
1149 |
+
//get alt hurl to cover http or https issue
|
1150 |
+
$_alt_share_links[ $social_name ] = call_user_func( 'ssb_' . $social_name . '_generate_link', $url );
|
1151 |
}
|
1152 |
|
1153 |
$result = ssb_fetch_shares_via_curl_multi( array_filter( $_share_links ) );
|
1154 |
|
1155 |
+
$share_counts = ssb_fetch_fresh_counts( $result, $post_id, $_alt_share_links );
|
1156 |
// update_post_meta( $post_id,'ssb_cache_timestamp',floor( ( ( date( 'U' ) / 60) / 60 ) ) );
|
1157 |
} else {
|
1158 |
$share_counts = ssb_fetch_cached_counts( array_flip( $arrButtons ), $post_id );
|
1232 |
|
1233 |
} else {
|
1234 |
|
1235 |
+
$_html = '<button class="simplesocial-twt-share" data-href="https://twitter.com/share?text=' . $title . '&url=' . $permalink . '' . $via . '" rel="nofollow" onclick="javascript:window.open(this.dataset.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\');return false;"><span class="simplesocialtxt">Twitter</span> ';
|
1236 |
|
1237 |
if ( $show_count ) {
|
1238 |
$_html .= '<span class="ssb_counter ssb_twitter_counter">' . $twitter_share . '</span>';
|
1359 |
|
1360 |
case 'messenger':
|
1361 |
$link = urlencode( $permalink );
|
1362 |
+
$messenger_share_url = $this->is_mobile() ? "fb-messenger://share/?link=$link?app_id=$this->fb_app_id" : "http://www.facebook.com/dialog/send?app_id=$this->fb_app_id&redirect_uri=$link&link=$link&display=popup";
|
1363 |
|
1364 |
if ( $this->selected_theme == 'simple-icons' ) {
|
1365 |
+
$arrButtonsCode[] = '<button onclick="javascript:window.open(this.dataset.href, \'_blank\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\' );return false;" class="simplesocial-viber-share ssb_msng-icon" data-href='. $messenger_share_url .'>
|
1366 |
+
<span class="icon"> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="18px" height="19px" viewBox="-889.5 1161 18 19" enable-background="new -889.5 1161 18 19" xml:space="preserve">
|
1367 |
+
<path opacity="0.99" fill="#FFFFFF" enable-background="new " d="M-880.5,1161c-5,0-9,3.8-9,8.5c0,2.4,1,4.5,2.7,6v4.5l3.8-2.3 c0.8,0.2,1.6,0.3,2.5,0.3c5,0,9-3.8,9-8.5S-875.5,1161-880.5,1161z M-879.6,1172.2l-2.4-2.4l-4.3,2.4l4.7-5.2l2.4,2.4l4.2-2.4 L-879.6,1172.2z"/>
|
1368 |
+
</svg> </span>
|
1369 |
+
<span class="simplesocialtxt">Messenger</span>
|
1370 |
+
</button>';
|
1371 |
} else {
|
1372 |
|
1373 |
+
$arrButtonsCode[] = '<button class="simplesocial-msng-share" onclick="javascript:window.open( this.dataset.href, \'_blank\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\' );return false;" data-href="'. $messenger_share_url .'" ><span class="simplesocialtxt">Messenger</span></button> ';
|
1374 |
}
|
1375 |
|
1376 |
break;
|
1428 |
|
1429 |
if ( class_exists( 'Jetpack' ) ) { // Check jetpack active.
|
1430 |
return;
|
1431 |
+
} else if( defined( 'WPSEO_VERSION' ) ) { // Check Yoast active.
|
1432 |
return;
|
1433 |
}
|
1434 |
+
$og_tag = '';
|
1435 |
+
$og_tag .= PHP_EOL . '<!-- Open Graph Meta Tags generated by Simple Social Buttons ' . $this->pluginVersion . ' -->' . PHP_EOL;
|
1436 |
if ($this->og_get_title()) {
|
1437 |
+
$og_tag .= '<meta property="og:title" content="'. get_the_title() ." - ". get_bloginfo( 'name' ) .'" />' . PHP_EOL;
|
1438 |
}
|
1439 |
|
1440 |
if ( $this->og_get_description() ) {
|
1441 |
+
$og_tag .= '<meta property="og:description" content="'. $this->og_get_description() .'" />' . PHP_EOL;
|
1442 |
}
|
1443 |
+
$og_tag .= '<meta property="og:url" content="'. get_permalink() .'" />' . PHP_EOL;
|
1444 |
if ( $this->og_get_blog() ) {
|
1445 |
+
$og_tag .= '<meta property="og:site_name" content="'. $this->og_get_blog() .'" />' . PHP_EOL;
|
1446 |
}
|
1447 |
+
$og_tag .= $this->get_og_image();
|
|
|
1448 |
|
1449 |
+
$og_tag .= '<meta name="twitter:card" content="summary_large_image" />' . PHP_EOL;
|
1450 |
if ( $this->og_get_description() ) {
|
1451 |
+
$og_tag .= '<meta name="twitter:description" content="'. $this->get_excerpt_by_id( get_the_id() ) .'" />' . PHP_EOL;
|
1452 |
}
|
1453 |
|
1454 |
if ( $this->og_get_title() ) {
|
1455 |
+
$og_tag .= '<meta name="twitter:title" content="'. get_the_title() ." - ". get_bloginfo( 'name' ) .'" />' . PHP_EOL;
|
1456 |
}
|
1457 |
+
$og_tag .= $this->generate_twitter_image();
|
1458 |
|
1459 |
+
echo apply_filters( 'ssb_og_tag', $og_tag );
|
1460 |
+
}
|
1461 |
|
1462 |
|
1463 |
function og_get_title() {
|
1611 |
}
|
1612 |
}
|
1613 |
}
|
1614 |
+
|
1615 |
+
/**
|
1616 |
+
* Detect if mobile.
|
1617 |
+
*
|
1618 |
+
* @since 2.0.13
|
1619 |
+
*/
|
1620 |
+
public function is_mobile(){
|
1621 |
+
|
1622 |
+
$useragent = $_SERVER['HTTP_USER_AGENT'];
|
1623 |
+
if(preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i',substr($useragent,0,4))){
|
1624 |
+
return true;
|
1625 |
+
} else {
|
1626 |
+
return false;
|
1627 |
+
}
|
1628 |
+
}
|
1629 |
+
|
1630 |
+
/**
|
1631 |
+
* convert url http to https or vice versa
|
1632 |
+
* @param $permalink
|
1633 |
+
* @since 2.0.14
|
1634 |
+
* @return mixed
|
1635 |
+
*/
|
1636 |
+
function http_or_https_link_generate( $permalink ){
|
1637 |
+
|
1638 |
+
foreach ( $this->arrKnownButtons as $social_name ) {
|
1639 |
+
if ( 'totalshare' == $social_name || 'viber' == $social_name || 'fblike' == $social_name || 'whatsapp' == $social_name || 'print' == $social_name || 'email' == $social_name || 'messenger' == $social_name) {
|
1640 |
+
continue; }
|
1641 |
+
$url = $this->http_or_https_resolve_url( $permalink );
|
1642 |
+
//get alt hurl to cover http or https issue
|
1643 |
+
$_alt_share_links[ $social_name ] = call_user_func( 'ssb_' . $social_name . '_generate_link', $url );
|
1644 |
+
}
|
1645 |
+
return $_alt_share_links;
|
1646 |
+
}
|
1647 |
+
|
1648 |
} // end class
|
1649 |
|
1650 |
|