WordPress Social Sharing Plugin – Sassy Social Share - Version 3.1

Version Description

  • [Bugfix] Share counts were being cached even when "Refresh Share Count cache every" option (in "Miscellaneous" section) was kept blank
Download this release

Release Info

Developer Heateor
Plugin Icon 128x128 WordPress Social Sharing Plugin – Sassy Social Share
Version 3.1
Comparing to
See all releases

Code changes from version 3.0 to 3.1

admin/partials/sassy-social-share-about.php CHANGED
@@ -62,7 +62,7 @@
62
  <div class="stuffbox">
63
  <h3><label><?php _e( 'Testimonial', 'sassy-social-share' );?></label></h3>
64
  <div class="inside">
65
- <p><?php _e( 'You can send us testimonial at <a href="mailto:hello@heateor.com">hello@heateor.com</a>', 'sassy-social-share' ); ?></p>
66
  </div>
67
  </div>
68
 
62
  <div class="stuffbox">
63
  <h3><label><?php _e( 'Testimonial', 'sassy-social-share' );?></label></h3>
64
  <div class="inside">
65
+ <p><?php _e( 'You can send us testimonial at <a href="mailto:testimonials@heateor.com">testimonials@heateor.com</a>', 'sassy-social-share' ); ?></p>
66
  </div>
67
  </div>
68
 
admin/partials/sassy-social-share-options-page.php CHANGED
@@ -1663,7 +1663,7 @@ defined( 'ABSPATH' ) or die("Cheating........Uh!!");
1663
  <tr class="heateor_sss_help_content" id="heateor_sss_share_count_cache_help_cont">
1664
  <td colspan="2">
1665
  <div>
1666
- <?php _e( 'Frequent cache refreshing results in slower loading of pages with share counts enabled', 'sassy-social-share' ) ?>
1667
  </div>
1668
  </td>
1669
  </tr>
@@ -1982,11 +1982,10 @@ defined( 'ABSPATH' ) or die("Cheating........Uh!!");
1982
  <h3><label><?php _e( 'FAQ', 'sassy-social-share' ) ?></label></h3>
1983
  <div class="inside faq">
1984
  <p><?php _e( '<strong>Note:</strong> Plugin will not work on local server. You should have an online website for the plugin to function properly.', 'sassy-social-share' ); ?></p>
1985
- <p><a href="javascript:void(0)" target="_blank"><?php _e( 'Share icons broke after saving logo color', 'sassy-social-share' ) ?></a></p>
1986
- <p><?php _e( 'It happens when plugin is not able to update the CSS files. To fix the icons, you need to re-install the plugin. Just do not forget to keep "Delete all the options on plugin deletion" option disabled in "Miscellaneous" section to preserve the plugin configuration, before deleting the plugin.', 'sassy-social-share' ); ?></p>
1987
  <p><a href="https://www.heateor.com/recover-social-share-counts/" target="_blank"><?php _e('How to restore Social Share counts lost after moving my website to SSL/Https?', 'sassy-social-share' ) ?></a></p>
1988
  <p><a href="http://support.heateor.com/how-to-integrate-google-analytics-with-sharing" target="_blank"><?php _e( 'How to integrate Google Analytics with sharing?', 'sassy-social-share' ) ?></a></p>
1989
- <p><a href="http://support.heateor.com/share-icons-white-updating-plugin/" target="_blank"><?php _e( 'Share Icons became White After Updating the Plugin', 'sassy-social-share' ) ?></a></p>
1990
  <p><a style="text-decoration:none" href="https://www.heateor.com/facebook-comments-moderation" target="_blank"><?php _e( 'How to show recent Facebook Comments from all over the website in a widget?', 'sassy-social-share' ) ?></a></p>
1991
  <p><a style="text-decoration:none" href="http://support.heateor.com/recover-facebook-comments-wordpress-moving-to-https-ssl/" target="_blank"><?php _e( 'How to recover the Facebook Comments lost after moving my website to SSL/Https?', 'sassy-social-share' ) ?></a></p>
1992
  <p><a href="http://support.heateor.com/place-title-social-share-icons-row/" target="_blank"><?php _e( 'How to Place Title and Social Share Icons in the Same Row?', 'sassy-social-share' ) ?></a></p>
@@ -1999,7 +1998,7 @@ defined( 'ABSPATH' ) or die("Cheating........Uh!!");
1999
  <p><a href="http://support.heateor.com/how-to-customize-the-look-of-individual-share-counts" target="_blank"><?php _e( 'How to customize the look of individual share counts?', 'sassy-social-share' ) ?></a></p>
2000
  <p><a href="http://support.heateor.com/how-to-show-whatsapp-icon-only-on-mobile-devices" target="_blank"><?php _e( 'How to show Whatsapp icon only on mobile devices?', 'sassy-social-share' ) ?></a></p>
2001
  <p><a href="http://support.heateor.com/how-to-hide-arrow-after-floating-sharing-bar" target="_blank"><?php _e( 'How to hide arrow after floating sharing bar?', 'sassy-social-share' ) ?></a></p>
2002
- <p><a href="http://support.heateor.com/why-are-share-counts-not-updating" target="_blank"><?php _e( 'Why is share count not getting updated?', 'sassy-social-share' ) ?></a></p>
2003
  <p><a href="http://support.heateor.com/why-is-there-so-much-space-between-like-buttons" target="_blank"><?php _e( 'Why is there so much space between like buttons?', 'sassy-social-share' ) ?></a></p>
2004
  <p><a href="http://support.heateor.com/why-is-floating-share-like-button-not-appearing-at-homepage" target="_blank"><?php _e( 'Why are floating sharing/like buttons not appearing at homepage?', 'sassy-social-share' ) ?></a></p>
2005
  </div>
1663
  <tr class="heateor_sss_help_content" id="heateor_sss_share_count_cache_help_cont">
1664
  <td colspan="2">
1665
  <div>
1666
+ <?php echo sprintf( __( 'Frequent cache refreshing results in slower loading of pages with share counts enabled. Leave empty to disable cache. More info <a href="%s" target="_blank">here</a>', 'sassy-social-share' ), 'http://support.heateor.com/why-is-share-count-not-getting-updated' ); ?>
1667
  </div>
1668
  </td>
1669
  </tr>
1982
  <h3><label><?php _e( 'FAQ', 'sassy-social-share' ) ?></label></h3>
1983
  <div class="inside faq">
1984
  <p><?php _e( '<strong>Note:</strong> Plugin will not work on local server. You should have an online website for the plugin to function properly.', 'sassy-social-share' ); ?></p>
1985
+
 
1986
  <p><a href="https://www.heateor.com/recover-social-share-counts/" target="_blank"><?php _e('How to restore Social Share counts lost after moving my website to SSL/Https?', 'sassy-social-share' ) ?></a></p>
1987
  <p><a href="http://support.heateor.com/how-to-integrate-google-analytics-with-sharing" target="_blank"><?php _e( 'How to integrate Google Analytics with sharing?', 'sassy-social-share' ) ?></a></p>
1988
+ <p><a href="http://support.heateor.com/color-share-icons-not-being-updated" target="_blank"><?php _e( 'Why the color of share icons is not being updated?', 'sassy-social-share' ) ?></a></p>
1989
  <p><a style="text-decoration:none" href="https://www.heateor.com/facebook-comments-moderation" target="_blank"><?php _e( 'How to show recent Facebook Comments from all over the website in a widget?', 'sassy-social-share' ) ?></a></p>
1990
  <p><a style="text-decoration:none" href="http://support.heateor.com/recover-facebook-comments-wordpress-moving-to-https-ssl/" target="_blank"><?php _e( 'How to recover the Facebook Comments lost after moving my website to SSL/Https?', 'sassy-social-share' ) ?></a></p>
1991
  <p><a href="http://support.heateor.com/place-title-social-share-icons-row/" target="_blank"><?php _e( 'How to Place Title and Social Share Icons in the Same Row?', 'sassy-social-share' ) ?></a></p>
1998
  <p><a href="http://support.heateor.com/how-to-customize-the-look-of-individual-share-counts" target="_blank"><?php _e( 'How to customize the look of individual share counts?', 'sassy-social-share' ) ?></a></p>
1999
  <p><a href="http://support.heateor.com/how-to-show-whatsapp-icon-only-on-mobile-devices" target="_blank"><?php _e( 'How to show Whatsapp icon only on mobile devices?', 'sassy-social-share' ) ?></a></p>
2000
  <p><a href="http://support.heateor.com/how-to-hide-arrow-after-floating-sharing-bar" target="_blank"><?php _e( 'How to hide arrow after floating sharing bar?', 'sassy-social-share' ) ?></a></p>
2001
+ <p><a href="http://support.heateor.com/why-is-share-count-not-getting-updated" target="_blank"><?php _e( 'Why is share count not getting updated?', 'sassy-social-share' ) ?></a></p>
2002
  <p><a href="http://support.heateor.com/why-is-there-so-much-space-between-like-buttons" target="_blank"><?php _e( 'Why is there so much space between like buttons?', 'sassy-social-share' ) ?></a></p>
2003
  <p><a href="http://support.heateor.com/why-is-floating-share-like-button-not-appearing-at-homepage" target="_blank"><?php _e( 'Why are floating sharing/like buttons not appearing at homepage?', 'sassy-social-share' ) ?></a></p>
2004
  </div>
languages/sassy-social-share.pot CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Sassy Social Share\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2017-06-20 16:25+0530\n"
6
- "PO-Revision-Date: 2017-06-20 16:25+0530\n"
7
  "Last-Translator: The Champ <lordofthechamps@gmail.com>\n"
8
  "Language-Team: Heateor <hello@heateor.com>\n"
9
  "Language: en_IN\n"
@@ -742,9 +742,11 @@ msgid "Refresh Share Count cache every"
742
  msgstr ""
743
 
744
  #: ../admin/partials/sassy-social-share-options-page.php:1666
 
745
  msgid ""
746
  "Frequent cache refreshing results in slower loading of pages with share "
747
- "counts enabled"
 
748
  msgstr ""
749
 
750
  #: ../admin/partials/sassy-social-share-options-page.php:1674
@@ -897,111 +899,98 @@ msgid ""
897
  "an online website for the plugin to function properly."
898
  msgstr ""
899
 
900
- #: ../admin/partials/sassy-social-share-options-page.php:1985
901
- msgid "Share icons broke after saving logo color"
902
- msgstr ""
903
-
904
  #: ../admin/partials/sassy-social-share-options-page.php:1986
905
  msgid ""
906
- "It happens when plugin is not able to update the CSS files. To fix the "
907
- "icons, you need to re-install the plugin. Just do not forget to keep "
908
- "\"Delete all the options on plugin deletion\" option disabled in "
909
- "\"Miscellaneous\" section to preserve the plugin configuration, before "
910
- "deleting the plugin."
911
  msgstr ""
912
 
913
  #: ../admin/partials/sassy-social-share-options-page.php:1987
914
- msgid ""
915
- "How to restore Social Share counts lost after moving my website to SSL/Https?"
916
  msgstr ""
917
 
918
  #: ../admin/partials/sassy-social-share-options-page.php:1988
919
- msgid "How to integrate Google Analytics with sharing?"
920
  msgstr ""
921
 
922
  #: ../admin/partials/sassy-social-share-options-page.php:1989
923
- msgid "Share Icons became White After Updating the Plugin"
924
- msgstr ""
925
-
926
- #: ../admin/partials/sassy-social-share-options-page.php:1990
927
  msgid ""
928
  "How to show recent Facebook Comments from all over the website in a widget?"
929
  msgstr ""
930
 
931
- #: ../admin/partials/sassy-social-share-options-page.php:1991
932
  msgid ""
933
  "How to recover the Facebook Comments lost after moving my website to SSL/"
934
  "Https?"
935
  msgstr ""
936
 
937
- #: ../admin/partials/sassy-social-share-options-page.php:1992
938
  msgid "How to Place Title and Social Share Icons in the Same Row?"
939
  msgstr ""
940
 
941
- #: ../admin/partials/sassy-social-share-options-page.php:1993
942
  msgid ""
943
  "Why is sharer not showing the correct image, title and other meta tags "
944
  "content?"
945
  msgstr ""
946
 
947
- #: ../admin/partials/sassy-social-share-options-page.php:1994
948
  msgid ""
949
  "How can I show share counts of my website rather than of individual pages/"
950
  "posts?"
951
  msgstr ""
952
 
953
- #: ../admin/partials/sassy-social-share-options-page.php:1995
954
  msgid "How can I disable sharing on particular page/post?"
955
  msgstr ""
956
 
957
- #: ../admin/partials/sassy-social-share-options-page.php:1996
958
  msgid "How can I specify minimum sharing count for sharing networks?"
959
  msgstr ""
960
 
961
- #: ../admin/partials/sassy-social-share-options-page.php:1997
962
  msgid "How to share specific page?"
963
  msgstr ""
964
 
965
- #: ../admin/partials/sassy-social-share-options-page.php:1998
966
  msgid "How to customize the look of total share counts?"
967
  msgstr ""
968
 
969
- #: ../admin/partials/sassy-social-share-options-page.php:1999
970
  msgid "How to customize the look of individual share counts?"
971
  msgstr ""
972
 
973
- #: ../admin/partials/sassy-social-share-options-page.php:2000
974
  msgid "How to show Whatsapp icon only on mobile devices?"
975
  msgstr ""
976
 
977
- #: ../admin/partials/sassy-social-share-options-page.php:2001
978
  msgid "How to hide arrow after floating sharing bar?"
979
  msgstr ""
980
 
981
- #: ../admin/partials/sassy-social-share-options-page.php:2002
982
  msgid "Why is share count not getting updated?"
983
  msgstr ""
984
 
985
- #: ../admin/partials/sassy-social-share-options-page.php:2003
986
  msgid "Why is there so much space between like buttons?"
987
  msgstr ""
988
 
989
- #: ../admin/partials/sassy-social-share-options-page.php:2004
990
  msgid "Why are floating sharing/like buttons not appearing at homepage?"
991
  msgstr ""
992
 
993
- #: ../admin/partials/sassy-social-share-options-page.php:2014
994
  msgid "Save Changes"
995
  msgstr ""
996
 
997
- #: ../admin/partials/sassy-social-share-options-page.php:2020
998
  msgid ""
999
  "If you can send (to hello@heateor.com) how our plugin is helping your "
1000
  "business, we can share it on Instagram. You can also send any relevant "
1001
  "hashtags and people to mention in the Instagram post."
1002
  msgstr ""
1003
 
1004
- #: ../admin/partials/sassy-social-share-options-page.php:2021
1005
  msgid ""
1006
  "<b>Example</b> - Blah-Blah Online Coaching teaches various programming "
1007
  "language courses through their website. They have emerged as one of the most "
@@ -1010,7 +999,7 @@ msgid ""
1010
  "time."
1011
  msgstr ""
1012
 
1013
- #: ../admin/partials/sassy-social-share-options-page.php:2022
1014
  msgid ""
1015
  "@blahblahonlinecoaching proudly use #SassySocialShare to share content of "
1016
  "their website. Be sure to visit their website at \n"
@@ -1087,8 +1076,8 @@ msgstr ""
1087
 
1088
  #: ../admin/partials/sassy-social-share-about.php:65
1089
  msgid ""
1090
- "You can send us testimonial at <a href=\"mailto:hello@heateor.com"
1091
- "\">hello@heateor.com</a>"
1092
  msgstr ""
1093
 
1094
  #: ../admin/partials/sassy-social-share-about.php:70
@@ -1210,7 +1199,7 @@ msgid "Archives"
1210
  msgstr ""
1211
 
1212
  #: ../public/class-sassy-social-share-public.php:1458
1213
- #: ../public/class-sassy-social-share-public.php:1670
1214
  msgid "Invalid request"
1215
  msgstr ""
1216
 
2
  msgstr ""
3
  "Project-Id-Version: Sassy Social Share\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2017-06-24 14:17+0530\n"
6
+ "PO-Revision-Date: 2017-06-24 14:17+0530\n"
7
  "Last-Translator: The Champ <lordofthechamps@gmail.com>\n"
8
  "Language-Team: Heateor <hello@heateor.com>\n"
9
  "Language: en_IN\n"
742
  msgstr ""
743
 
744
  #: ../admin/partials/sassy-social-share-options-page.php:1666
745
+ #, php-format
746
  msgid ""
747
  "Frequent cache refreshing results in slower loading of pages with share "
748
+ "counts enabled. Leave empty to disable cache. More info <a href=\"%s\" "
749
+ "target=\"_blank\">here</a>"
750
  msgstr ""
751
 
752
  #: ../admin/partials/sassy-social-share-options-page.php:1674
899
  "an online website for the plugin to function properly."
900
  msgstr ""
901
 
 
 
 
 
902
  #: ../admin/partials/sassy-social-share-options-page.php:1986
903
  msgid ""
904
+ "How to restore Social Share counts lost after moving my website to SSL/Https?"
 
 
 
 
905
  msgstr ""
906
 
907
  #: ../admin/partials/sassy-social-share-options-page.php:1987
908
+ msgid "How to integrate Google Analytics with sharing?"
 
909
  msgstr ""
910
 
911
  #: ../admin/partials/sassy-social-share-options-page.php:1988
912
+ msgid "Why the color of share icons is not being updated?"
913
  msgstr ""
914
 
915
  #: ../admin/partials/sassy-social-share-options-page.php:1989
 
 
 
 
916
  msgid ""
917
  "How to show recent Facebook Comments from all over the website in a widget?"
918
  msgstr ""
919
 
920
+ #: ../admin/partials/sassy-social-share-options-page.php:1990
921
  msgid ""
922
  "How to recover the Facebook Comments lost after moving my website to SSL/"
923
  "Https?"
924
  msgstr ""
925
 
926
+ #: ../admin/partials/sassy-social-share-options-page.php:1991
927
  msgid "How to Place Title and Social Share Icons in the Same Row?"
928
  msgstr ""
929
 
930
+ #: ../admin/partials/sassy-social-share-options-page.php:1992
931
  msgid ""
932
  "Why is sharer not showing the correct image, title and other meta tags "
933
  "content?"
934
  msgstr ""
935
 
936
+ #: ../admin/partials/sassy-social-share-options-page.php:1993
937
  msgid ""
938
  "How can I show share counts of my website rather than of individual pages/"
939
  "posts?"
940
  msgstr ""
941
 
942
+ #: ../admin/partials/sassy-social-share-options-page.php:1994
943
  msgid "How can I disable sharing on particular page/post?"
944
  msgstr ""
945
 
946
+ #: ../admin/partials/sassy-social-share-options-page.php:1995
947
  msgid "How can I specify minimum sharing count for sharing networks?"
948
  msgstr ""
949
 
950
+ #: ../admin/partials/sassy-social-share-options-page.php:1996
951
  msgid "How to share specific page?"
952
  msgstr ""
953
 
954
+ #: ../admin/partials/sassy-social-share-options-page.php:1997
955
  msgid "How to customize the look of total share counts?"
956
  msgstr ""
957
 
958
+ #: ../admin/partials/sassy-social-share-options-page.php:1998
959
  msgid "How to customize the look of individual share counts?"
960
  msgstr ""
961
 
962
+ #: ../admin/partials/sassy-social-share-options-page.php:1999
963
  msgid "How to show Whatsapp icon only on mobile devices?"
964
  msgstr ""
965
 
966
+ #: ../admin/partials/sassy-social-share-options-page.php:2000
967
  msgid "How to hide arrow after floating sharing bar?"
968
  msgstr ""
969
 
970
+ #: ../admin/partials/sassy-social-share-options-page.php:2001
971
  msgid "Why is share count not getting updated?"
972
  msgstr ""
973
 
974
+ #: ../admin/partials/sassy-social-share-options-page.php:2002
975
  msgid "Why is there so much space between like buttons?"
976
  msgstr ""
977
 
978
+ #: ../admin/partials/sassy-social-share-options-page.php:2003
979
  msgid "Why are floating sharing/like buttons not appearing at homepage?"
980
  msgstr ""
981
 
982
+ #: ../admin/partials/sassy-social-share-options-page.php:2013
983
  msgid "Save Changes"
984
  msgstr ""
985
 
986
+ #: ../admin/partials/sassy-social-share-options-page.php:2019
987
  msgid ""
988
  "If you can send (to hello@heateor.com) how our plugin is helping your "
989
  "business, we can share it on Instagram. You can also send any relevant "
990
  "hashtags and people to mention in the Instagram post."
991
  msgstr ""
992
 
993
+ #: ../admin/partials/sassy-social-share-options-page.php:2020
994
  msgid ""
995
  "<b>Example</b> - Blah-Blah Online Coaching teaches various programming "
996
  "language courses through their website. They have emerged as one of the most "
999
  "time."
1000
  msgstr ""
1001
 
1002
+ #: ../admin/partials/sassy-social-share-options-page.php:2021
1003
  msgid ""
1004
  "@blahblahonlinecoaching proudly use #SassySocialShare to share content of "
1005
  "their website. Be sure to visit their website at \n"
1076
 
1077
  #: ../admin/partials/sassy-social-share-about.php:65
1078
  msgid ""
1079
+ "You can send us testimonial at <a href=\"mailto:testimonials@heateor.com"
1080
+ "\">testimonials@heateor.com</a>"
1081
  msgstr ""
1082
 
1083
  #: ../admin/partials/sassy-social-share-about.php:70
1199
  msgstr ""
1200
 
1201
  #: ../public/class-sassy-social-share-public.php:1458
1202
+ #: ../public/class-sassy-social-share-public.php:1674
1203
  msgid "Invalid request"
1204
  msgstr ""
1205
 
public/class-sassy-social-share-public.php CHANGED
@@ -1485,28 +1485,30 @@ class Sassy_Social_Share_Public {
1485
  }
1486
 
1487
  $multiplier = 60;
1488
- switch ( $this->options['share_count_cache_refresh_unit'] ) {
1489
- case 'seconds':
1490
- $multiplier = 1;
1491
- break;
1492
-
1493
- case 'minutes':
1494
- $multiplier = 60;
1495
- break;
1496
-
1497
- case 'hours':
1498
- $multiplier = 3600;
1499
- break;
 
1500
 
1501
- case 'days':
1502
- $multiplier = 3600*24;
1503
- break;
1504
 
1505
- default:
1506
- $multiplier = 60;
1507
- break;
 
 
1508
  }
1509
- $transient_expiration_time = $multiplier * $this->options['share_count_cache_refresh_count'];
1510
 
1511
  $target_urls_array = array();
1512
  $target_urls_array[] = $target_urls;
@@ -1643,7 +1645,9 @@ class Sassy_Social_Share_Public {
1643
  }
1644
  }
1645
  $response_data[$target_urls_array[0][$i]] = $final_share_count_transient;
1646
- set_transient( 'heateor_sss_share_count_' . $this->get_share_count_transient_id( $target_urls_array[0][$i] ), $final_share_count_transient, $transient_expiration_time );
 
 
1647
  }
1648
  do_action( 'heateor_sss_share_count_ajax_hook', $response_data );
1649
 
@@ -1671,35 +1675,39 @@ class Sassy_Social_Share_Public {
1671
  }
1672
 
1673
  $multiplier = 60;
1674
- switch ( $this->options['share_count_cache_refresh_unit'] ) {
1675
- case 'seconds':
1676
- $multiplier = 1;
1677
- break;
1678
-
1679
- case 'minutes':
1680
- $multiplier = 60;
1681
- break;
1682
-
1683
- case 'hours':
1684
- $multiplier = 3600;
1685
- break;
 
1686
 
1687
- case 'days':
1688
- $multiplier = 3600*24;
1689
- break;
1690
 
1691
- default:
1692
- $multiplier = 60;
1693
- break;
 
 
1694
  }
1695
- $transient_expiration_time = $multiplier * $this->options['share_count_cache_refresh_count'];
1696
-
1697
  foreach ( $target_urls as $key => $value ) {
1698
  $transient_id = $this->get_share_count_transient_id( $key );
1699
  $share_count_transient = get_transient( 'heateor_sss_share_count_' . $transient_id );
1700
  if ( $share_count_transient !== false ) {
1701
  $share_count_transient['facebook'] = $value;
1702
- set_transient( 'heateor_sss_share_count_' . $transient_id, $share_count_transient, $transient_expiration_time );
 
 
1703
  }
1704
  }
1705
  die;
1485
  }
1486
 
1487
  $multiplier = 60;
1488
+ if ( $this->options['share_count_cache_refresh_count'] != '' ) {
1489
+ switch ( $this->options['share_count_cache_refresh_unit'] ) {
1490
+ case 'seconds':
1491
+ $multiplier = 1;
1492
+ break;
1493
+
1494
+ case 'minutes':
1495
+ $multiplier = 60;
1496
+ break;
1497
+
1498
+ case 'hours':
1499
+ $multiplier = 3600;
1500
+ break;
1501
 
1502
+ case 'days':
1503
+ $multiplier = 3600*24;
1504
+ break;
1505
 
1506
+ default:
1507
+ $multiplier = 60;
1508
+ break;
1509
+ }
1510
+ $transient_expiration_time = $multiplier * $this->options['share_count_cache_refresh_count'];
1511
  }
 
1512
 
1513
  $target_urls_array = array();
1514
  $target_urls_array[] = $target_urls;
1645
  }
1646
  }
1647
  $response_data[$target_urls_array[0][$i]] = $final_share_count_transient;
1648
+ if ( $this->options['share_count_cache_refresh_count'] != '' ) {
1649
+ set_transient( 'heateor_sss_share_count_' . $this->get_share_count_transient_id( $target_urls_array[0][$i] ), $final_share_count_transient, $transient_expiration_time );
1650
+ }
1651
  }
1652
  do_action( 'heateor_sss_share_count_ajax_hook', $response_data );
1653
 
1675
  }
1676
 
1677
  $multiplier = 60;
1678
+ if ( $this->options['share_count_cache_refresh_count'] != '' ) {
1679
+ switch ( $this->options['share_count_cache_refresh_unit'] ) {
1680
+ case 'seconds':
1681
+ $multiplier = 1;
1682
+ break;
1683
+
1684
+ case 'minutes':
1685
+ $multiplier = 60;
1686
+ break;
1687
+
1688
+ case 'hours':
1689
+ $multiplier = 3600;
1690
+ break;
1691
 
1692
+ case 'days':
1693
+ $multiplier = 3600*24;
1694
+ break;
1695
 
1696
+ default:
1697
+ $multiplier = 60;
1698
+ break;
1699
+ }
1700
+ $transient_expiration_time = $multiplier * $this->options['share_count_cache_refresh_count'];
1701
  }
1702
+
 
1703
  foreach ( $target_urls as $key => $value ) {
1704
  $transient_id = $this->get_share_count_transient_id( $key );
1705
  $share_count_transient = get_transient( 'heateor_sss_share_count_' . $transient_id );
1706
  if ( $share_count_transient !== false ) {
1707
  $share_count_transient['facebook'] = $value;
1708
+ if ( $this->options['share_count_cache_refresh_count'] != '' ) {
1709
+ set_transient( 'heateor_sss_share_count_' . $transient_id, $share_count_transient, $transient_expiration_time );
1710
+ }
1711
  }
1712
  }
1713
  die;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.heateor.com/donate/?action=Sassy+Social+Share
4
  Tags: social share, social sharing, social media share, share facebook, facebook social share, wordpress social share, share buttons, social share buttons, facebook like, twitter tweet, google +1, google plus share
5
  Requires at least: 2.5.0
6
  Tested up to: 4.8
7
- Stable tag: 3.0
8
  License: GPLv2 or later
9
 
10
  Slickest, Simplest and Optimized Share buttons. Facebook, Twitter, Google+, Pinterest, WhatsApp and over 100 more.
@@ -112,6 +112,9 @@ Yes, we can help you with it. Just drop an email at support[at]heateor[dot]com
112
  4. **Universal Sharing Popup**: Universal Sharing popup having all the supported sharing and bookmarking services
113
 
114
  == Changelog ==
 
 
 
115
  = 3.0 =
116
  * [New] Included Copy Link, Diaspora, Douban, Draugiem, Facebook Messenger, Google Classroom, Kik, Papaly, Polyvore, Refind, Skype, SMS, Trello, Viber and Telegram in sharing networks
117
  * [New] Added "Comment" icon in sharing networks to send users to comment form at the webpage
@@ -408,4 +411,7 @@ Yes, we can help you with it. Just drop an email at support[at]heateor[dot]com
408
  * [Improvement] Improved social share icons
409
  * [Bugfix] Twitter share count was not working in some cases
410
  * [Bugfix] Total share count was not appearing correct in a few cases
411
- * [Bugfix] Share icons were not appearing at the webpages built using <a href="https://wordpress.org/plugins/elementor/">Elementor</a> plugin
 
 
 
4
  Tags: social share, social sharing, social media share, share facebook, facebook social share, wordpress social share, share buttons, social share buttons, facebook like, twitter tweet, google +1, google plus share
5
  Requires at least: 2.5.0
6
  Tested up to: 4.8
7
+ Stable tag: 3.1
8
  License: GPLv2 or later
9
 
10
  Slickest, Simplest and Optimized Share buttons. Facebook, Twitter, Google+, Pinterest, WhatsApp and over 100 more.
112
  4. **Universal Sharing Popup**: Universal Sharing popup having all the supported sharing and bookmarking services
113
 
114
  == Changelog ==
115
+ = 3.1 =
116
+ * [Bugfix] Share counts were being cached even when "Refresh Share Count cache every" option (in "Miscellaneous" section) was kept blank
117
+
118
  = 3.0 =
119
  * [New] Included Copy Link, Diaspora, Douban, Draugiem, Facebook Messenger, Google Classroom, Kik, Papaly, Polyvore, Refind, Skype, SMS, Trello, Viber and Telegram in sharing networks
120
  * [New] Added "Comment" icon in sharing networks to send users to comment form at the webpage
411
  * [Improvement] Improved social share icons
412
  * [Bugfix] Twitter share count was not working in some cases
413
  * [Bugfix] Total share count was not appearing correct in a few cases
414
+ * [Bugfix] Share icons were not appearing at the webpages built using <a href="https://wordpress.org/plugins/elementor/">Elementor</a> plugin
415
+
416
+ = 3.1 =
417
+ * [Bugfix] Share counts were being cached even when "Refresh Share Count cache every" option (in "Miscellaneous" section) was kept blank
sassy-social-share.php CHANGED
@@ -7,7 +7,7 @@
7
  * Plugin Name: Sassy Social Share
8
  * Plugin URI: https://www.heateor.com
9
  * Description: Slickest, Simplest and Optimized Share buttons. Facebook, Twitter, Google+, Pinterest, WhatsApp and over 100 more.
10
- * Version: 3.0
11
  * Author: Team Heateor
12
  * Author URI: https://www.heateor.com
13
  * Text Domain: sassy-social-share
@@ -21,7 +21,7 @@ if ( ! defined( 'WPINC' ) ) {
21
  die;
22
  }
23
 
24
- define( 'HEATEOR_SSS_VERSION', '3.0' );
25
  define( 'HEATEOR_SSS_PLUGIN_DIR', plugin_dir_path(__FILE__) );
26
 
27
  // plugin core class object
7
  * Plugin Name: Sassy Social Share
8
  * Plugin URI: https://www.heateor.com
9
  * Description: Slickest, Simplest and Optimized Share buttons. Facebook, Twitter, Google+, Pinterest, WhatsApp and over 100 more.
10
+ * Version: 3.1
11
  * Author: Team Heateor
12
  * Author URI: https://www.heateor.com
13
  * Text Domain: sassy-social-share
21
  die;
22
  }
23
 
24
+ define( 'HEATEOR_SSS_VERSION', '3.1' );
25
  define( 'HEATEOR_SSS_PLUGIN_DIR', plugin_dir_path(__FILE__) );
26
 
27
  // plugin core class object