Simple Social Media Share Buttons – Social Sharing for Everyone - Version 2.0.3

Version Description

  • Relaunched with a whole set of NEW FEATURES and Improvement. Please upgrade immediately and provide your feedback. highly recommended. Aplogies in advance, if anything breaks!

=

Download this release

Release Info

Developer hiddenpearls
Plugin Icon 128x128 Simple Social Media Share Buttons – Social Sharing for Everyone
Version 2.0.3
Comparing to
See all releases

Code changes from version 2.0.2 to 2.0.3

assets/css/front.css CHANGED
@@ -31,6 +31,8 @@ div.ssb-button-pinterest { width: 100px; }
31
  box-sizing: border-box;
32
  font-weight: normal;
33
  text-transform: capitalize !important;
 
 
34
  }
35
  .simplesocialbuttons button:focus, .simplesocialbuttons button:hover{
36
  outline: none;
@@ -59,7 +61,7 @@ div.ssb-button-pinterest { width: 100px; }
59
  .simplesocialbuttons button.simplesocial-pinterest-share:after{
60
  content: "\e902";
61
  }
62
- .share-counter{
63
  display: inline-block;
64
  font-weight: bold;
65
  font-size: 30px;
@@ -68,7 +70,7 @@ div.ssb-button-pinterest { width: 100px; }
68
  color: #000;
69
  text-align: center;
70
  }
71
- .simplesocialbuttons_inline .share-counter,.simplesocialbuttons-flyin .simplesocialbuttons .share-counter,.simplesocialbuttons-popup .simplesocialbuttons .share-counter,.ssb_social_media_wrapper .simplesocialbuttons .share-counter{
72
  display: inline-block;
73
  top: -4px;
74
  vertical-align: middle;
@@ -78,7 +80,7 @@ div.ssb-button-pinterest { width: 100px; }
78
  -webkit-transition: all 0.3s ease-in-out;
79
  transition: all 0.3s ease-in-out;
80
  }
81
- .share-counter span{
82
  font-size: 10px;
83
  display: block;
84
  }
@@ -114,6 +116,7 @@ transition: all 0.3s ease-in-out;
114
  font-family: 'ssb-icon';
115
  font-family: 'ssb-icon';
116
  }
 
117
  /*=======================================
118
  = Gredient Button =
119
  =======================================*/
@@ -641,64 +644,135 @@ transition: all 0.3s ease-in-out;
641
 
642
  /*===== End of Style 6 ======*/
643
 
644
- .simplesocialbuttons-inline-bottom-in{
645
  -webkit-transform: translateY(40px);
646
  transform: translateY(40px);
647
  opacity: 0;
648
  }
649
- .simplesocialbuttons-inline-bottom-in.simplesocialbuttons-inline-in{
650
  -webkit-transform: translateY(0px);
651
  transform: translateY(0px);
652
  opacity: 1;
653
  }
654
- .simplesocialbuttons-inline-left-in{
655
  -webkit-transform: translateX(-40px);
656
  transform: translateX(-40px);
657
  opacity: 0;
658
  }
659
- .simplesocialbuttons-inline-left-in.simplesocialbuttons-inline-in{
660
  -webkit-transform: translateX(0%);
661
  transform: translateX(0%);
662
  opacity: 1;
663
  }
664
- .simplesocialbuttons-inline-right-in{
665
  -webkit-transform: translateX(40px);
666
  transform: translateX(40px);
667
  opacity: 0;
668
  }
669
- .simplesocialbuttons-inline-right-in.simplesocialbuttons-inline-in{
670
  -webkit-transform: translateX(0%);
671
  transform: translateX(0%);
672
  opacity: 1;
673
  }
674
- .simplesocialbuttons-inline-top-in{
675
- -webkit-transform: translateY(-40px);
676
- transform: translateY(-40px);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
677
  opacity: 0;
678
  }
679
- .simplesocialbuttons-inline-top-in.simplesocialbuttons-inline-in{
680
- -webkit-transform: translateY(0%);
681
- transform: translateY(0%);
682
  opacity: 1;
683
  }
684
- .simplesocialbuttons-inline-fade-in{
685
- opacity: 0;
686
  }
687
- .simplesocialbuttons-inline-fade-in.simplesocialbuttons-inline-in{
688
- opacity: 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
689
  }
690
 
691
 
692
 
693
-
694
- .simplesocialbuttons.simplesocial-simple-round button.simplesocial-fb-share:before,
695
- .simplesocialbuttons.simplesocial-simple-round button.simplesocial-twt-share:before,
696
- .simplesocialbuttons.simplesocial-simple-round button.simplesocial-gplus-share:before,
697
- .simplesocialbuttons.simplesocial-simple-round button.simplesocial-whatsapp-share:before,
698
- .simplesocialbuttons.simplesocial-simple-round button.simplesocial-viber-share:before,
699
- .simplesocialbuttons.simplesocial-simple-round button.simplesocial-reddit-share:before,
700
- .simplesocialbuttons.simplesocial-simple-round button.simplesocial-linkedin-share:before,
701
- .simplesocialbuttons.simplesocial-simple-round button.simplesocial-pinterest-share:before{
702
  background: rgba(0,0,0, .2);
703
  width: 36px;
704
  }
@@ -1198,7 +1272,7 @@ div[class*="simplesocialbuttons-float"] button .ssb_counter,div[class*="simpleso
1198
  font-size: 8px;
1199
  line-height: 14px;
1200
  }
1201
- .share-counter{
1202
  margin: 0 5px;
1203
  }
1204
 
@@ -1224,7 +1298,7 @@ div[class*="simplesocialbuttons-float"] button span.simplesocialtxt{
1224
  div[class*="simplesocialbuttons-float"] button .ssb_counter{
1225
  position: absolute;
1226
  color: #000;
1227
- line-height: 1.2;
1228
  }
1229
  div[class*="simplesocialbuttons-float"].simplesocialbuttons button{
1230
  padding-left: 36px;
@@ -1262,7 +1336,7 @@ div[class*="simplesocialbuttons-float"].simplesocialbuttons-nospace button{
1262
  margin: 0;
1263
  }
1264
  div[class*="simplesocialbuttons-float"].simplesocialbuttons-slide-left-in button,
1265
- div[class*="simplesocialbuttons-float"].simplesocialbuttons-slide-left-in .share-counter{
1266
  -webkit-transform: translateX(-100%);
1267
  transform: translateX(-100%);
1268
  -webkit-animation-name: ssb_slide_left_in; /* Safari 4.0 - 8.0 */
@@ -1284,7 +1358,7 @@ div[class*="simplesocialbuttons-float"].simplesocialbuttons-slide-left-in .share
1284
  to {transform: translateX(0%)}
1285
  }
1286
  div[class*="simplesocialbuttons-float"].simplesocialbuttons-slide-right-in button,
1287
- div[class*="simplesocialbuttons-float"].simplesocialbuttons-slide-right-in .share-counter{
1288
  -webkit-transform: translateX(100%);
1289
  transform: translateX(100%);
1290
  -webkit-animation-name: ssb_slide_right_in; /* Safari 4.0 - 8.0 */
@@ -1383,40 +1457,46 @@ div[class*="simplesocialbuttons-float"].simplesocialbuttons-slide-fade-in{
1383
  to {opacity: 1;}
1384
  }
1385
  div[class*="simplesocialbuttons-float"] button:nth-child(2){
1386
- animation-delay: 0.1s;
1387
  }
1388
  div[class*="simplesocialbuttons-float"] button:nth-child(3){
1389
- animation-delay: 0.2s;
1390
  }
1391
  div[class*="simplesocialbuttons-float"] button:nth-child(4){
1392
- animation-delay: 0.3s;
1393
  }
1394
  div[class*="simplesocialbuttons-float"] button:nth-child(5){
1395
- animation-delay: 0.4s;
1396
  }
1397
  div[class*="simplesocialbuttons-float"] button:nth-child(6){
1398
- animation-delay: 0.5s;
1399
  }
1400
  div[class*="simplesocialbuttons-float"] button:nth-child(7){
1401
- animation-delay: 0.6s;
1402
  }
1403
  div[class*="simplesocialbuttons-float"] button:nth-child(8){
1404
- animation-delay: 0.7s;
1405
  }
1406
  div[class*="simplesocialbuttons-float"] button:nth-child(9){
1407
- animation-delay: 0.8s;
1408
  }
1409
  div[class*="simplesocialbuttons-float"] button:nth-child(10){
1410
- animation-delay: 0.9s;
1411
  }
1412
  div[class*="simplesocialbuttons-float"] button:nth-child(11){
1413
- animation-delay: 1s;
1414
  }
1415
  div[class*="simplesocialbuttons-float"] button:nth-child(12){
1416
- animation-delay: 1.1s;
1417
  }
1418
  div[class*="simplesocialbuttons-float"] button:nth-child(13){
1419
- animation-delay: 1.2s;
 
 
 
 
 
 
1420
  }
1421
  div[class*="simplesocialbuttons-float"]{
1422
  position: fixed;
@@ -1458,5 +1538,67 @@ div.simplesocialbuttons.simplesocialbuttons-float-right-center{
1458
  transform: translateY(-50%);
1459
  margin: 0;
1460
  }
1461
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1462
  /*===== End of Code for floating share buttons ======*/
 
 
 
 
 
 
 
 
 
31
  box-sizing: border-box;
32
  font-weight: normal;
33
  text-transform: capitalize !important;
34
+ white-space: nowrap;
35
+ text-shadow: none !important;
36
  }
37
  .simplesocialbuttons button:focus, .simplesocialbuttons button:hover{
38
  outline: none;
61
  .simplesocialbuttons button.simplesocial-pinterest-share:after{
62
  content: "\e902";
63
  }
64
+ .ssb_total_counter{
65
  display: inline-block;
66
  font-weight: bold;
67
  font-size: 30px;
70
  color: #000;
71
  text-align: center;
72
  }
73
+ .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{
74
  display: inline-block;
75
  top: -4px;
76
  vertical-align: middle;
80
  -webkit-transition: all 0.3s ease-in-out;
81
  transition: all 0.3s ease-in-out;
82
  }
83
+ .ssb_total_counter span{
84
  font-size: 10px;
85
  display: block;
86
  }
116
  font-family: 'ssb-icon';
117
  font-family: 'ssb-icon';
118
  }
119
+
120
  /*=======================================
121
  = Gredient Button =
122
  =======================================*/
644
 
645
  /*===== End of Style 6 ======*/
646
 
647
+ .simplesocialbuttons-inline-bottom-in button{
648
  -webkit-transform: translateY(40px);
649
  transform: translateY(40px);
650
  opacity: 0;
651
  }
652
+ .simplesocialbuttons-inline-bottom-in.simplesocialbuttons-inline-in button{
653
  -webkit-transform: translateY(0px);
654
  transform: translateY(0px);
655
  opacity: 1;
656
  }
657
+ .simplesocialbuttons-inline-left-in button{
658
  -webkit-transform: translateX(-40px);
659
  transform: translateX(-40px);
660
  opacity: 0;
661
  }
662
+ .simplesocialbuttons-inline-left-in.simplesocialbuttons-inline-in button{
663
  -webkit-transform: translateX(0%);
664
  transform: translateX(0%);
665
  opacity: 1;
666
  }
667
+ .simplesocialbuttons-inline-right-in button{
668
  -webkit-transform: translateX(40px);
669
  transform: translateX(40px);
670
  opacity: 0;
671
  }
672
+ .simplesocialbuttons-inline-right-in.simplesocialbuttons-inline-in button{
673
  -webkit-transform: translateX(0%);
674
  transform: translateX(0%);
675
  opacity: 1;
676
  }
677
+ .simplesocialbuttons-inline-top-in button, .simplesocialbuttons-inline-top-in .ssb_total_counter{
678
+ opacity: 0;
679
+ }
680
+ .simplesocialbuttons-inline-top-in.simplesocialbuttons-inline-in button, .simplesocialbuttons-inline-top-in.simplesocialbuttons-inline-in .ssb_total_counter{
681
+
682
+ animation-name: ssb_slidetop;
683
+ -webkit-animation-name: ssb_slidetop;
684
+ -moz-animation-name: ssb_slidetop;
685
+ animation-duration: .3s;
686
+ -webkit-animation-duration: .3s;
687
+ -moz-animation-duration: .3s;
688
+ animation-timing-function: ease;
689
+ -webkit-animation-timing-function: ease;
690
+ -moz-animation-timing-function: ease;
691
+ -webkit-animation-fill-mode: forwards;
692
+ -moz-animation-fill-mode: forwards;
693
+ animation-fill-mode: forwards;
694
+ }
695
+ @keyframes ssb_slidetop {
696
+ 0% {
697
+ -webkit-transform: translateY(-40px);
698
+ transform: translateY(-40px);
699
+ opacity: 0;
700
+ }
701
+ 100% {
702
+ -webkit-transform: translateY(0);
703
+ transform: translateY(0);
704
+ opacity: 1;
705
+ }
706
+ }
707
+ @-webkit-keyframes ssb_slidetop {
708
+ 0% {
709
+ -webkit-transform: translateY(-40px);
710
+ opacity: 0;
711
+ }
712
+ 100% {
713
+ -webkit-transform: translateY(0);
714
+ opacity: 1;
715
+ }
716
+ }
717
+ .simplesocialbuttons-inline-fade-in button{
718
  opacity: 0;
719
  }
720
+ .simplesocialbuttons-inline-fade-in.simplesocialbuttons-inline-in button{
 
 
721
  opacity: 1;
722
  }
723
+ .simplesocialbuttons_inline button:nth-child(2),.simplesocialbuttons_inline .ssb_total_counter:nth-child(2){
724
+ animation-delay: 0.2s;
725
  }
726
+ .simplesocialbuttons_inline button:nth-child(3),.simplesocialbuttons_inline .ssb_total_counter:nth-child(3){
727
+ animation-delay: 0.4s;
728
+ }
729
+ .simplesocialbuttons_inline button:nth-child(4),.simplesocialbuttons_inline .ssb_total_counter:nth-child(4){
730
+ animation-delay: 0.6s;
731
+ }
732
+ .simplesocialbuttons_inline button:nth-child(5),.simplesocialbuttons_inline .ssb_total_counter:nth-child(5){
733
+ animation-delay: 0.8s;
734
+ }
735
+ .simplesocialbuttons_inline button:nth-child(6),.simplesocialbuttons_inline .ssb_total_counter:nth-child(6){
736
+ animation-delay: 1s;
737
+ }
738
+ .simplesocialbuttons_inline button:nth-child(7),.simplesocialbuttons_inline .ssb_total_counter:nth-child(7){
739
+ animation-delay: 1.2s;
740
+ }
741
+ .simplesocialbuttons_inline button:nth-child(8),.simplesocialbuttons_inline .ssb_total_counter:nth-child(8){
742
+ animation-delay: 1.4s;
743
+ }
744
+ .simplesocialbuttons_inline button:nth-child(9),.simplesocialbuttons_inline .ssb_total_counter:nth-child(9){
745
+ animation-delay: 1.6s;
746
+ }
747
+ .simplesocialbuttons_inline button:nth-child(10),.simplesocialbuttons_inline .ssb_total_counter:nth-child(10){
748
+ animation-delay: 1.8s;
749
+ }
750
+ .simplesocialbuttons_inline button:nth-child(11),.simplesocialbuttons_inline .ssb_total_counter:nth-child(11){
751
+ animation-delay: 2s;
752
+ }
753
+ .simplesocialbuttons_inline button:nth-child(12),.simplesocialbuttons_inline .ssb_total_counter:nth-child(12){
754
+ animation-delay: 2.2s;
755
+ }
756
+ .simplesocialbuttons_inline button:nth-child(13),.simplesocialbuttons_inline .ssb_total_counter:nth-child(13){
757
+ animation-delay: 2.4s;
758
+ }
759
+ .simplesocialbuttons_inline button:nth-child(14),.simplesocialbuttons_inline .ssb_total_counter:nth-child(14){
760
+ animation-delay: 2.6s;
761
+ }
762
+ .simplesocialbuttons_inline button:nth-child(15),.simplesocialbuttons_inline .ssb_total_counter:nth-child(15){
763
+ animation-delay: 2.8s;
764
  }
765
 
766
 
767
 
768
+ .simplesocialbuttons.simplesocial-simple-round button.simplesocial-fb-share:not(:hover):before,
769
+ .simplesocialbuttons.simplesocial-simple-round button.simplesocial-twt-share:not(:hover):before,
770
+ .simplesocialbuttons.simplesocial-simple-round button.simplesocial-gplus-share:not(:hover):before,
771
+ .simplesocialbuttons.simplesocial-simple-round button.simplesocial-whatsapp-share:not(:hover):before,
772
+ .simplesocialbuttons.simplesocial-simple-round button.simplesocial-viber-share:not(:hover):before,
773
+ .simplesocialbuttons.simplesocial-simple-round button.simplesocial-reddit-share:not(:hover):before,
774
+ .simplesocialbuttons.simplesocial-simple-round button.simplesocial-linkedin-share:not(:hover):before,
775
+ .simplesocialbuttons.simplesocial-simple-round button.simplesocial-pinterest-share:not(:hover):before{
 
776
  background: rgba(0,0,0, .2);
777
  width: 36px;
778
  }
1272
  font-size: 8px;
1273
  line-height: 14px;
1274
  }
1275
+ .ssb_total_counter{
1276
  margin: 0 5px;
1277
  }
1278
 
1298
  div[class*="simplesocialbuttons-float"] button .ssb_counter{
1299
  position: absolute;
1300
  color: #000;
1301
+ line-height: 15px;
1302
  }
1303
  div[class*="simplesocialbuttons-float"].simplesocialbuttons button{
1304
  padding-left: 36px;
1336
  margin: 0;
1337
  }
1338
  div[class*="simplesocialbuttons-float"].simplesocialbuttons-slide-left-in button,
1339
+ div[class*="simplesocialbuttons-float"].simplesocialbuttons-slide-left-in .ssb_total_counter{
1340
  -webkit-transform: translateX(-100%);
1341
  transform: translateX(-100%);
1342
  -webkit-animation-name: ssb_slide_left_in; /* Safari 4.0 - 8.0 */
1358
  to {transform: translateX(0%)}
1359
  }
1360
  div[class*="simplesocialbuttons-float"].simplesocialbuttons-slide-right-in button,
1361
+ div[class*="simplesocialbuttons-float"].simplesocialbuttons-slide-right-in .ssb_total_counter{
1362
  -webkit-transform: translateX(100%);
1363
  transform: translateX(100%);
1364
  -webkit-animation-name: ssb_slide_right_in; /* Safari 4.0 - 8.0 */
1457
  to {opacity: 1;}
1458
  }
1459
  div[class*="simplesocialbuttons-float"] button:nth-child(2){
1460
+ animation-delay: 0.2s;
1461
  }
1462
  div[class*="simplesocialbuttons-float"] button:nth-child(3){
1463
+ animation-delay: 0.4s;
1464
  }
1465
  div[class*="simplesocialbuttons-float"] button:nth-child(4){
1466
+ animation-delay: 0.6s;
1467
  }
1468
  div[class*="simplesocialbuttons-float"] button:nth-child(5){
1469
+ animation-delay: 0.8s;
1470
  }
1471
  div[class*="simplesocialbuttons-float"] button:nth-child(6){
1472
+ animation-delay: 1s;
1473
  }
1474
  div[class*="simplesocialbuttons-float"] button:nth-child(7){
1475
+ animation-delay: 1.2s;
1476
  }
1477
  div[class*="simplesocialbuttons-float"] button:nth-child(8){
1478
+ animation-delay: 1.4s;
1479
  }
1480
  div[class*="simplesocialbuttons-float"] button:nth-child(9){
1481
+ animation-delay: 1.6s;
1482
  }
1483
  div[class*="simplesocialbuttons-float"] button:nth-child(10){
1484
+ animation-delay: 1.8s;
1485
  }
1486
  div[class*="simplesocialbuttons-float"] button:nth-child(11){
1487
+ animation-delay: 2s;
1488
  }
1489
  div[class*="simplesocialbuttons-float"] button:nth-child(12){
1490
+ animation-delay: 2.2s;
1491
  }
1492
  div[class*="simplesocialbuttons-float"] button:nth-child(13){
1493
+ animation-delay: 2.4s;
1494
+ }
1495
+ div[class*="simplesocialbuttons-float"] button:nth-child(14){
1496
+ animation-delay: 2.6s;
1497
+ }
1498
+ div[class*="simplesocialbuttons-float"] button:nth-child(15){
1499
+ animation-delay: 2.8s;
1500
  }
1501
  div[class*="simplesocialbuttons-float"]{
1502
  position: fixed;
1538
  transform: translateY(-50%);
1539
  margin: 0;
1540
  }
1541
+ div.simplesocialbuttons-float-left-post{
1542
+ position: fixed;
1543
+ top: 50%;
1544
+ -webkit-transform: translateY(-50%);
1545
+ transform: translateY(-50%);
1546
+ margin-left: -52px;
1547
+ -webkit-transition:all 0.3s ease-in-out;
1548
+ transition:all 0.3s ease-in-out;
1549
+ }
1550
+ .simplesocialbuttons-float-left-post.float-in{
1551
+ opacity: 1;
1552
+ }
1553
+ div.simplesocialbuttons-float-right-post{
1554
+ position: fixed;
1555
+ top: 70px;
1556
+ opacity: 0;
1557
+ margin-right: -70px;
1558
+ -webkit-transition:all 0.3s ease-in-out;
1559
+ transition:all 0.3s ease-in-out;
1560
+ }
1561
+ .simplesocialbuttons-float-right-post.float-in{
1562
+ opacity: 1;
1563
+ }
1564
+ .simplesocialbuttons.simplesocial-simple-round.simplesocialbuttons-float-left-post.ssb_counter-activate .ssb_counter{
1565
+ width: 15px;
1566
+ height: 15px;
1567
+ color: #fff;
1568
+ top: -10px;
1569
+ border: 1px solid #fff;
1570
+ border-radius: 0;
1571
+ font-size: 8px;
1572
+ line-height: 14px;
1573
+ right: -10px;
1574
+ color: #000;
1575
+ }
1576
+ .simplesocialbuttons.simplesocial-simple-round.simplesocialbuttons-float-right-post.ssb_counter-activate .ssb_counter{
1577
+ width: 15px;
1578
+ height: 15px;
1579
+ color: #fff;
1580
+ top: -10px;
1581
+ border: 1px solid #fff;
1582
+ border-radius: 0;
1583
+ font-size: 8px;
1584
+ line-height: 14px;
1585
+ right: -10px;
1586
+ color: #000;
1587
+ }
1588
+ div[class*="simplesocialbuttons-float-left-post"] button .ssb_counter{
1589
+ top: -8px;
1590
+ right: -8px;
1591
+ }
1592
+ .float-lefted-sidebar{
1593
+ left: 0;
1594
+ }
1595
  /*===== End of Code for floating share buttons ======*/
1596
+ .simplesocialbuttons-float-left-post.float-touched-sidebar{
1597
+ left: 52px !important;
1598
+ }
1599
+ .simplesocialbuttons-float-right-post.float-touched-sidebar{
1600
+ right: 52px !important;
1601
+ }
1602
+ div[class*="simplesocialbuttons-float"].simplesocial-simple-round button[class*="-share"]:not(:hover):before{
1603
+ width: 0;
1604
+ }
assets/js/front.js CHANGED
@@ -1,3 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  // IIFE - Immediately Invoked Function Expression
2
  (function($, window, document) {
3
 
@@ -12,9 +41,75 @@
12
  });
13
 
14
  $(window).load(function(){
15
- $('.simplesocialbuttons_inline').addClass('simplesocialbuttons-inline-in');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  var sidebarwidth = $('div[class*="simplesocialbuttons-float"]>a:first-child').outerWidth(true);
17
  $('div[class*="simplesocialbuttons-float"]').css('width', sidebarwidth + 'px');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
  }(window.jQuery, window, document));
1
+ (function($) {
2
+
3
+ /**
4
+ * Copyright 2012, Digital Fusion
5
+ * Licensed under the MIT license.
6
+ * http://teamdf.com/jquery-plugins/license/
7
+ *
8
+ * @author Sam Sehnert
9
+ * @desc A small plugin that checks whether elements are within
10
+ * the user visible viewport of a web browser.
11
+ * only accounts for vertical position, not horizontal.
12
+ */
13
+
14
+ $.fn.visible = function(partial) {
15
+
16
+ var $t = $(this),
17
+ $w = $(window),
18
+ viewTop = $w.scrollTop(),
19
+ viewBottom = viewTop + $w.height(),
20
+ _top = $t.offset().top,
21
+ _bottom = _top + $t.height(),
22
+ compareTop = partial === true ? _bottom : _top,
23
+ compareBottom = partial === true ? _top : _bottom;
24
+
25
+ return ((compareBottom <= viewBottom) && (compareTop >= viewTop));
26
+
27
+ };
28
+
29
+ })(jQuery);
30
  // IIFE - Immediately Invoked Function Expression
31
  (function($, window, document) {
32
 
41
  });
42
 
43
  $(window).load(function(){
44
+ var allMods = $(".simplesocialbuttons_inline");
45
+
46
+ // Already visible modules
47
+ allMods.each(function(i, el) {
48
+ var el = $(el);
49
+ if (el.visible(true)) {
50
+ el.addClass('simplesocialbuttons-inline-in');
51
+ }
52
+ });
53
+
54
+ $(window).scroll(function(event) {
55
+
56
+ allMods.each(function(i, el) {
57
+ var el = $(el);
58
+ if (el.visible(true)) {
59
+ el.addClass('simplesocialbuttons-inline-in');
60
+ }
61
+ });
62
+
63
+ });
64
+ // $('.simplesocialbuttons_inline').addClass('simplesocialbuttons-inline-in');
65
  var sidebarwidth = $('div[class*="simplesocialbuttons-float"]>a:first-child').outerWidth(true);
66
  $('div[class*="simplesocialbuttons-float"]').css('width', sidebarwidth + 'px');
67
+ // var sidebaroffset = $(window).width() - 1100;
68
+ // if($('.simplesocialbuttons-float-left-post').length>0){
69
+ // $('.simplesocialbuttons-float-left-post').css('left', sidebaroffset/2+'px');
70
+ // $('.simplesocialbuttons-float-left-post').removeClass('float-touched-sidebar');
71
+ // }
72
+ // if($('.simplesocialbuttons-float-right-post').length>0){
73
+ // $('.simplesocialbuttons-float-right-post').css('right', sidebaroffset/2+'px');
74
+ // $('.simplesocialbuttons-float-left-post').removeClass('float-touched-sidebar');
75
+ // $('.simplesocialbuttons-float-right-post').removeClass('float-touched-sidebar');
76
+ // }
77
+ // if(sidebaroffset/2 <= 50){
78
+ // $('.simplesocialbuttons-float-left-post').addClass('float-touched-sidebar');
79
+ // $('.simplesocialbuttons-float-right-post').addClass('float-touched-sidebar');
80
+ // }
81
  });
82
+ // $(window).on('resize',function(){
83
+ // var sidebaroffset = $(window).width() - 1100;
84
+ // if($('.simplesocialbuttons-float-left-post').length>0){
85
+ // $('.simplesocialbuttons-float-left-post').css('left', sidebaroffset/2+'px');
86
+ // $('.simplesocialbuttons-float-left-post').removeClass('float-touched-sidebar');
87
+ // }
88
+ // if($('.simplesocialbuttons-float-right-post').length>0){
89
+ // $('.simplesocialbuttons-float-right-post').css('right', sidebaroffset/2+'px');
90
+ // $('.simplesocialbuttons-float-left-post').removeClass('float-touched-sidebar');
91
+ // }
92
+ // if(sidebaroffset/2 <= 50){
93
+ // $('.simplesocialbuttons-float-left-post').addClass('float-touched-sidebar');
94
+ // }
95
+ // });
96
+
97
+
98
+ // $(window).on('scroll', function(){
99
+ // if($('.simplesocialbuttons-float-left-post').length>0){
100
+ // if($(window).scrollTop() >= 500){
101
+ // $('.simplesocialbuttons-float-left-post').addClass('float-in')
102
+ // }else{
103
+ // $('.simplesocialbuttons-float-left-post').removeClass('float-in')
104
+ // }
105
+ // }
106
+ // if($('.simplesocialbuttons-float-right-post').length>0){
107
+ // if($(window).scrollTop() >= 500){
108
+ // $('.simplesocialbuttons-float-right-post').addClass('float-in')
109
+ // }else{
110
+ // $('.simplesocialbuttons-float-right-post').removeClass('float-in')
111
+ // }
112
+ // }
113
+ // })
114
 
115
  }(window.jQuery, window, document));
classes/ssb-admin.php CHANGED
@@ -187,6 +187,7 @@ if ( ! class_exists( 'SimpleSocialButtonsPR_Admin' ) ) :
187
  'blog_language' => get_bloginfo( 'language' ),
188
  'wordpress_version' => get_bloginfo( 'version' ),
189
  'plugin_version' => SSB_VERSION,
 
190
  'plugin_name' => 'Simple Social Buttons',
191
  );
192
 
187
  'blog_language' => get_bloginfo( 'language' ),
188
  'wordpress_version' => get_bloginfo( 'version' ),
189
  'plugin_version' => SSB_VERSION,
190
+ 'php_version' => PHP_VERSION,
191
  'plugin_name' => 'Simple Social Buttons',
192
  );
193
 
classes/ssb-settings.php CHANGED
@@ -81,13 +81,14 @@ class Ssb_Settings {
81
 
82
  $setting_section = apply_filters( 'ssb_settings_panel', $sections );
83
 
84
- usort( $setting_section, function( $a, $b ) {
85
- return $a['priority'] - $b['priority'];
86
- });
87
-
88
  return $setting_section;
89
  }
90
 
 
 
 
91
 
92
  public function get_current_post_types() {
93
 
81
 
82
  $setting_section = apply_filters( 'ssb_settings_panel', $sections );
83
 
84
+ usort( $setting_section, array( $this, 'sort_array' ) );
85
+
 
 
86
  return $setting_section;
87
  }
88
 
89
+ public function sort_array( $a, $b ){
90
+ return $a['priority'] - $b['priority'];
91
+ }
92
 
93
  public function get_current_post_types() {
94
 
inc/ssb-deactivate-form.php CHANGED
@@ -231,8 +231,8 @@
231
  }
232
  })
233
  .done(function() {
234
- $(".wp-ssb-spinner").hide();
235
- $(".wp-ssb-popup-allow-deactivate").removeAttr("disabled");
236
  window.location.href = $("tr[data-slug='"+ pluginSlug +"'] .deactivate a").attr('href');
237
  });
238
 
231
  }
232
  })
233
  .done(function() {
234
+ // $(".wp-ssb-spinner").hide();
235
+ // $(".wp-ssb-popup-allow-deactivate").removeAttr("disabled");
236
  window.location.href = $("tr[data-slug='"+ pluginSlug +"'] .deactivate a").attr('href');
237
  });
238
 
inc/utils.php CHANGED
@@ -100,15 +100,14 @@ function ssb_fetch_shares_via_curl_multi( $data, $options = array() ) {
100
  // $options = $swp_user_options;
101
  $fresh_cache = false;
102
 
103
-
104
  if( isset( $_POST['ssb_cache'] ) && 'rebuild' === $_POST['ssb_cache'] ) {
105
  return false;
106
  }
107
  // Always be TRUE if we're not on a single.php otherwise we could end up
108
  // Rebuilding multiple page caches which will cost a lot of time.
109
- if ( ! is_singular() && ! $ajax ) {
110
- return true;
111
- }
112
 
113
  $post_age = floor( date( 'U' ) - get_post_time( 'U' , false , $post_id ) );
114
 
100
  // $options = $swp_user_options;
101
  $fresh_cache = false;
102
 
 
103
  if( isset( $_POST['ssb_cache'] ) && 'rebuild' === $_POST['ssb_cache'] ) {
104
  return false;
105
  }
106
  // Always be TRUE if we're not on a single.php otherwise we could end up
107
  // Rebuilding multiple page caches which will cost a lot of time.
108
+ // if ( ! is_singular() && ! $ajax ) {
109
+ // return true;
110
+ // }
111
 
112
  $post_age = floor( date( 'U' ) - get_post_time( 'U' , false , $post_id ) );
113
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: hiddenpearls, WPBrigade
3
  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.8
7
- Stable tag: 2.0.2
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -134,12 +134,16 @@ Yes, you can use `<?php get_ssb(); ?>` in your template file (see installation s
134
 
135
  == Upgrade Notice ==
136
 
137
- = 2.0.2 =
138
  * Relaunched with a whole set of NEW FEATURES and Improvement. Please upgrade immediately and provide your feedback. highly recommended. Aplogies in advance, if anything breaks!
139
 
140
 
141
  == Changelog ==
142
 
 
 
 
 
143
  = 2.0.2 - 2017-11-02 =
144
  * Bug Fix: Migration issue with old users.
145
 
3
  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.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
134
 
135
  == Upgrade Notice ==
136
 
137
+ = 2.0.3 =
138
  * Relaunched with a whole set of NEW FEATURES and Improvement. Please upgrade immediately and provide your feedback. highly recommended. Aplogies in advance, if anything breaks!
139
 
140
 
141
  == Changelog ==
142
 
143
+ = 2.0.3 - 2017-11-13 =
144
+ * Bug Fix: Social media Counter
145
+ * Enhancement: Compatible with 4.9
146
+
147
  = 2.0.2 - 2017-11-02 =
148
  * Bug Fix: Migration issue with old users.
149
 
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.2
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.2';
34
  public $pluginPrefix = 'ssb_pr_';
35
  public $hideCustomMetaKey = '_ssb_hide';
36
 
@@ -147,8 +147,8 @@ class SimpleSocialButtonsPR {
147
  $post_id = $_POST['postID'];
148
  foreach ( $this->arrKnownButtons as $button_name ) {
149
 
150
- if ( isset( $this->settings[ $button_name ] ) && $this->settings[ $button_name ] > 0 ) {
151
- $order[ $button_name ] = $this->settings[ $button_name ];
152
  }
153
  }
154
 
@@ -160,10 +160,11 @@ class SimpleSocialButtonsPR {
160
  }
161
 
162
  $result = ssb_fetch_shares_via_curl_multi( array_filter( $_share_links ) );
 
163
  // $result = ssb_fetch_shares_via_curl_multi(
164
  // array(
165
  // 'linkedin' => ssb_linkedin_generate_link( 'https://wpbrigade.com/first-wordcamp-talk/' ),
166
- // 'fbshare' => ssb_fbshare_generate_link( 'https://propakistani.pk/2017/09/06/lahore-get-600-million-disneyland-like-amusement-park/' ),
167
  // 'googleplus' => ssb_googleplus_generate_link( 'https://wpbrigade.com/first-wordcamp-talk/' ),
168
  // 'twitter' => ssb_twitter_generate_link( 'https://wptavern.com/jetpack-5-3-adds-php-7-1-compatibility-better-control-for-wordads-placement' ),
169
  // 'pinterest' => ssb_pinterest_generate_link( 'http://websitehostingcost.com/tag/dedicated/' ),
@@ -171,6 +172,7 @@ class SimpleSocialButtonsPR {
171
  // )
172
  // );
173
  $share_counts = ssb_fetch_fresh_counts( $result , $post_id );
 
174
  update_post_meta( $post_id, 'ssb_cache_timestamp',floor( ( ( date( 'U' ) / 60) / 60 ) ) );
175
  echo json_encode( $share_counts );
176
  wp_die();
@@ -179,7 +181,8 @@ class SimpleSocialButtonsPR {
179
  function ssb_output_cache_trigger( $info ) {
180
 
181
  // Return early if we're not on a single page or we have fresh cache.
182
- if ( ( ! is_singular() || ssb_is_cache_fresh( $info['postID'], true )) && empty( $_GET['ssb_cache'] ) ) {
 
183
  return $info;
184
  }
185
 
@@ -187,7 +190,7 @@ class SimpleSocialButtonsPR {
187
  if ( function_exists( 'is_account_page' ) && is_account_page() ) {
188
  return $info;
189
  }
190
-
191
  // Return if caching is off.
192
  // if ( 'on' != $this->settings['cache'] ) {
193
  // return $info;
@@ -207,12 +210,14 @@ class SimpleSocialButtonsPR {
207
  };
208
  jQuery.post(ssb_admin_ajax, data, function(data, textStatus, xhr) {
209
  var array = JSON.parse(data);
210
- console.log(array);
211
 
212
  jQuery.each( array, function( index, value ){
213
- console.log(index);
214
- console.log(value);
215
- jQuery('.ssb_'+ index +'_counter').html(value);
 
 
 
216
  });
217
 
218
 
@@ -247,7 +252,6 @@ class SimpleSocialButtonsPR {
247
 
248
  function front_enqueue_scripts() {
249
 
250
- wp_enqueue_style( 'font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css' );
251
  wp_enqueue_script( 'jquery' );
252
  wp_enqueue_script( 'ssb-front-js', plugins_url( 'assets/js/front.js', __FILE__ ), array( 'jquery' ), SSB_VERSION );
253
  wp_enqueue_style( 'ssb-front-css', plugins_url( 'assets/css/front.css', __FILE__ ), false, SSB_VERSION );
@@ -395,6 +399,26 @@ class SimpleSocialButtonsPR {
395
  return $this->insert_buttons( $content );
396
  }
397
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
398
 
399
  /**
400
  * Add Inline Buttons.
@@ -419,7 +443,8 @@ class SimpleSocialButtonsPR {
419
  $show_total = false;
420
  }
421
 
422
- $extra_class = 'simplesocialbuttons_inline simplesocialbuttons-align-' . $this->_get_settings( 'inline', 'icon_alignment', 'left' );
 
423
 
424
  // if ( $this->inline['share_counts'] ) {
425
  if ( $this->_get_settings( 'inline', 'share_counts' ) ) {
@@ -576,7 +601,7 @@ class SimpleSocialButtonsPR {
576
  break;
577
  case 'totalshare':
578
  $total_share = $share_counts['total'] ? $share_counts['total'] : 0;
579
- $arrButtonsCode[] = "<span class='share-counter'>" . $total_share . '<span>Shares</span></span>';
580
  break;
581
 
582
  case 'reddit':
@@ -654,7 +679,8 @@ class SimpleSocialButtonsPR {
654
  $show_count = true;
655
  }
656
  if ( in_array( $this->get_post_type(), $this->sidebar_option['posts'] ) ) {
657
- $class = 'simplesocialbuttons-float-' . $this->sidebar_option['orientation'] . '-center';
 
658
  if ( $this->sidebar_option['hide_mobile'] ) {
659
  $class .= ' simplesocialbuttons-mobile-hidden'; }
660
  $class .= ' simplesocialbuttons-slide-' . $this->_get_settings( 'sidebar', 'animation', 'no-animation' );
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.3
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.3';
34
  public $pluginPrefix = 'ssb_pr_';
35
  public $hideCustomMetaKey = '_ssb_hide';
36
 
147
  $post_id = $_POST['postID'];
148
  foreach ( $this->arrKnownButtons as $button_name ) {
149
 
150
+ if ( isset( $this->selected_networks[ $button_name ] ) && $this->selected_networks[ $button_name ] > 0 ) {
151
+ $order[ $button_name ] = $this->selected_networks[ $button_name ];
152
  }
153
  }
154
 
160
  }
161
 
162
  $result = ssb_fetch_shares_via_curl_multi( array_filter( $_share_links ) );
163
+
164
  // $result = ssb_fetch_shares_via_curl_multi(
165
  // array(
166
  // 'linkedin' => ssb_linkedin_generate_link( 'https://wpbrigade.com/first-wordcamp-talk/' ),
167
+ // 'fbshare' => ssb_fbshare_generate_link( 'http://www.blc.lu/' ),
168
  // 'googleplus' => ssb_googleplus_generate_link( 'https://wpbrigade.com/first-wordcamp-talk/' ),
169
  // 'twitter' => ssb_twitter_generate_link( 'https://wptavern.com/jetpack-5-3-adds-php-7-1-compatibility-better-control-for-wordads-placement' ),
170
  // 'pinterest' => ssb_pinterest_generate_link( 'http://websitehostingcost.com/tag/dedicated/' ),
172
  // )
173
  // );
174
  $share_counts = ssb_fetch_fresh_counts( $result , $post_id );
175
+
176
  update_post_meta( $post_id, 'ssb_cache_timestamp',floor( ( ( date( 'U' ) / 60) / 60 ) ) );
177
  echo json_encode( $share_counts );
178
  wp_die();
181
  function ssb_output_cache_trigger( $info ) {
182
 
183
  // Return early if we're not on a single page or we have fresh cache.
184
+ // if ( ( ! is_singular() || ssb_is_cache_fresh( $info['postID'], true )) && empty( $_GET['ssb_cache'] ) ) {
185
+ if ( ( ssb_is_cache_fresh( $info['postID'], true )) && empty( $_GET['ssb_cache'] ) ) {
186
  return $info;
187
  }
188
 
190
  if ( function_exists( 'is_account_page' ) && is_account_page() ) {
191
  return $info;
192
  }
193
+
194
  // Return if caching is off.
195
  // if ( 'on' != $this->settings['cache'] ) {
196
  // return $info;
210
  };
211
  jQuery.post(ssb_admin_ajax, data, function(data, textStatus, xhr) {
212
  var array = JSON.parse(data);
 
213
 
214
  jQuery.each( array, function( index, value ){
215
+
216
+ if( index == 'total' ){
217
+ jQuery('.ssb_'+ index +'_counter').html(value + '<span>Shares</span>');
218
+ }else{
219
+ jQuery('.ssb_'+ index +'_counter').html(value);
220
+ }
221
  });
222
 
223
 
252
 
253
  function front_enqueue_scripts() {
254
 
 
255
  wp_enqueue_script( 'jquery' );
256
  wp_enqueue_script( 'ssb-front-js', plugins_url( 'assets/js/front.js', __FILE__ ), array( 'jquery' ), SSB_VERSION );
257
  wp_enqueue_style( 'ssb-front-css', plugins_url( 'assets/css/front.css', __FILE__ ), false, SSB_VERSION );
399
  return $this->insert_buttons( $content );
400
  }
401
 
402
+ /**
403
+ * Return class
404
+ *
405
+ * @since 2.0.4
406
+ */
407
+ function add_post_class( $post_id = null ) {
408
+ $post = get_post( $post_id );
409
+
410
+ $classes = '';
411
+
412
+ if ( ! $post ) {
413
+ return $classes;
414
+ }
415
+
416
+ $classes .= 'post-' . $post->ID . ' ';
417
+ $classes .= $post->post_type . ' ';
418
+
419
+ return $classes;
420
+ }
421
+
422
 
423
  /**
424
  * Add Inline Buttons.
443
  $show_total = false;
444
  }
445
 
446
+ $extra_class = 'simplesocialbuttons_inline simplesocialbuttons-align-' . $this->_get_settings( 'inline', 'icon_alignment', 'left' ) . ' '. $this->add_post_class();
447
+
448
 
449
  // if ( $this->inline['share_counts'] ) {
450
  if ( $this->_get_settings( 'inline', 'share_counts' ) ) {
601
  break;
602
  case 'totalshare':
603
  $total_share = $share_counts['total'] ? $share_counts['total'] : 0;
604
+ $arrButtonsCode[] = "<span class='ssb_total_counter'>" . $total_share . '<span>Shares</span></span>';
605
  break;
606
 
607
  case 'reddit':
679
  $show_count = true;
680
  }
681
  if ( in_array( $this->get_post_type(), $this->sidebar_option['posts'] ) ) {
682
+ $class = 'simplesocialbuttons-float-' . $this->sidebar_option['orientation'] . '-center' . ' '. $this->add_post_class();
683
+ // $class = 'simplesocialbuttons-float-left-post';
684
  if ( $this->sidebar_option['hide_mobile'] ) {
685
  $class .= ' simplesocialbuttons-mobile-hidden'; }
686
  $class .= ' simplesocialbuttons-slide-' . $this->_get_settings( 'sidebar', 'animation', 'no-animation' );