Version Description
- [Bugfix] Share counts were messing with the sharing icons in some cases
Download this release
Release Info
Developer | Heateor |
Plugin | WordPress Social Sharing Plugin – Sassy Social Share |
Version | 1.7.1 |
Comparing to | |
See all releases |
Code changes from version 1.7 to 1.7.1
- admin/partials/sassy-social-share-options-page.php +1 -0
- images/ajax_loader.gif +0 -0
- includes/class-sassy-social-share-shortcodes.php +1 -1
- includes/class-sassy-social-share-widgets.php +2 -2
- languages/sassy-social-share.pot +9 -5
- public/class-sassy-social-share-public.php +13 -9
- public/js/sassy-social-share-public.js +37 -55
- readme.txt +9 -3
- sassy-social-share.php +3 -3
admin/partials/sassy-social-share-options-page.php
CHANGED
@@ -1822,6 +1822,7 @@ defined('ABSPATH') or die("Cheating........Uh!!");
|
|
1822 |
<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>
|
1823 |
<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>
|
1824 |
<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>
|
|
|
1825 |
</div>
|
1826 |
</div>
|
1827 |
|
1822 |
<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>
|
1823 |
<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>
|
1824 |
<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>
|
1825 |
+
<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>
|
1826 |
</div>
|
1827 |
</div>
|
1828 |
|
images/ajax_loader.gif
ADDED
Binary file
|
includes/class-sassy-social-share-shortcodes.php
CHANGED
@@ -113,7 +113,7 @@ class Sassy_Social_Share_Shortcodes {
|
|
113 |
function() {
|
114 |
// sharing counts
|
115 |
heateorSssCallAjax(function() {
|
116 |
-
heateorSssGetSharingCounts(
|
117 |
});
|
118 |
}
|
119 |
);</script>';
|
113 |
function() {
|
114 |
// sharing counts
|
115 |
heateorSssCallAjax(function() {
|
116 |
+
heateorSssGetSharingCounts();
|
117 |
});
|
118 |
}
|
119 |
);</script>';
|
includes/class-sassy-social-share-widgets.php
CHANGED
@@ -116,7 +116,7 @@ class Sassy_Social_Share_Standard_Widget extends WP_Widget {
|
|
116 |
function() {
|
117 |
// sharing counts
|
118 |
heateorSssCallAjax(function() {
|
119 |
-
heateorSssGetSharingCounts(
|
120 |
});
|
121 |
}
|
122 |
);</script>';
|
@@ -298,7 +298,7 @@ class Sassy_Social_Share_Floating_Widget extends WP_Widget {
|
|
298 |
function() {
|
299 |
// sharing counts
|
300 |
heateorSssCallAjax(function() {
|
301 |
-
heateorSssGetSharingCounts(
|
302 |
});
|
303 |
}
|
304 |
);</script>';
|
116 |
function() {
|
117 |
// sharing counts
|
118 |
heateorSssCallAjax(function() {
|
119 |
+
heateorSssGetSharingCounts();
|
120 |
});
|
121 |
}
|
122 |
);</script>';
|
298 |
function() {
|
299 |
// sharing counts
|
300 |
heateorSssCallAjax(function() {
|
301 |
+
heateorSssGetSharingCounts();
|
302 |
});
|
303 |
}
|
304 |
);</script>';
|
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: 2016-01-
|
6 |
-
"PO-Revision-Date: 2016-01-
|
7 |
"Last-Translator: The Champ <lordofthechamps@gmail.com>\n"
|
8 |
"Language-Team: Heateor <hello@heateor.com>\n"
|
9 |
"Language: \n"
|
@@ -792,7 +792,11 @@ msgstr ""
|
|
792 |
msgid "How to hide arrow after floating sharing bar?"
|
793 |
msgstr ""
|
794 |
|
795 |
-
#: ../admin/partials/sassy-social-share-options-page.php:
|
|
|
|
|
|
|
|
|
796 |
msgid "Save Changes"
|
797 |
msgstr ""
|
798 |
|
@@ -934,11 +938,11 @@ msgstr ""
|
|
934 |
msgid "Top Offset"
|
935 |
msgstr ""
|
936 |
|
937 |
-
#: ../public/class-sassy-social-share-public.php:
|
938 |
msgid "Invalid request"
|
939 |
msgstr ""
|
940 |
|
941 |
-
#: ../public/class-sassy-social-share-public.php:
|
942 |
msgid "Providers not selected"
|
943 |
msgstr ""
|
944 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Sassy Social Share\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2016-01-30 08:07+0530\n"
|
6 |
+
"PO-Revision-Date: 2016-01-30 08:07+0530\n"
|
7 |
"Last-Translator: The Champ <lordofthechamps@gmail.com>\n"
|
8 |
"Language-Team: Heateor <hello@heateor.com>\n"
|
9 |
"Language: \n"
|
792 |
msgid "How to hide arrow after floating sharing bar?"
|
793 |
msgstr ""
|
794 |
|
795 |
+
#: ../admin/partials/sassy-social-share-options-page.php:1825
|
796 |
+
msgid "Why Is Share Count Not Getting Updated?"
|
797 |
+
msgstr ""
|
798 |
+
|
799 |
+
#: ../admin/partials/sassy-social-share-options-page.php:1835
|
800 |
msgid "Save Changes"
|
801 |
msgstr ""
|
802 |
|
938 |
msgid "Top Offset"
|
939 |
msgstr ""
|
940 |
|
941 |
+
#: ../public/class-sassy-social-share-public.php:645
|
942 |
msgid "Invalid request"
|
943 |
msgstr ""
|
944 |
|
945 |
+
#: ../public/class-sassy-social-share-public.php:651
|
946 |
msgid "Providers not selected"
|
947 |
msgstr ""
|
948 |
|
public/class-sassy-social-share-public.php
CHANGED
@@ -112,7 +112,7 @@ class Sassy_Social_Share_Public {
|
|
112 |
echo ! isset( $this->options['vertical_counter_position'] ) || in_array( $this->options['vertical_counter_position'], array( 'inner_top', 'inner_bottom' ) ) ? 'var heateorSssReduceVerticalSvgHeight = true;' : '';
|
113 |
}
|
114 |
?>
|
115 |
-
var heateorSssUrlCountFetched =
|
116 |
function heateorSssPopup(e){window.open(e,"popUpWindow","height=400,width=600,left=400,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes")}
|
117 |
</script>
|
118 |
<?php
|
@@ -319,7 +319,8 @@ class Sassy_Social_Share_Public {
|
|
319 |
$share_count = array();
|
320 |
foreach ( $this->options[$sharing_type.'_re_providers'] as $provider ) {
|
321 |
$share_count[$provider] = $share_counts == ' ' ? '' : ( isset( $share_counts[$provider] ) ? $share_counts[$provider] : '' );
|
322 |
-
$
|
|
|
323 |
$li_items .= str_replace(
|
324 |
array(
|
325 |
'%padding%',
|
@@ -352,9 +353,9 @@ class Sassy_Social_Share_Public {
|
|
352 |
$language,
|
353 |
$this->options['buffer_username'] != '' ? $this->options['buffer_username'] : '',
|
354 |
$style,
|
355 |
-
$inner_style . ( $share_count[$provider] ? $inner_style_conditional : '' ),
|
356 |
$li_class,
|
357 |
-
str_replace( '%network%', $provider,
|
358 |
ucfirst( str_replace( '_', ' ', $provider ) )
|
359 |
),
|
360 |
$sharing_networks[$provider]
|
@@ -380,7 +381,7 @@ class Sassy_Social_Share_Public {
|
|
380 |
} else {
|
381 |
$add_style = ';margin-bottom:9px !important;';
|
382 |
}
|
383 |
-
$add_style .= ( $total_share_count ? 'visibility:visible;' : '' ) . '"';
|
384 |
$style = str_replace( ';"', $add_style, $style );
|
385 |
$total_shares_html .= '<i ' . $style . ' title="Total Shares" alt="Total Shares" class="heateorSssSharing heateorSssTCBackground">' . ( $total_share_count ? '<div class="heateorSssTotalShareCount" style="font-size: ' . ( $icon_height * 62/100 ) . 'px">' . $this->round_off_counts( $total_share_count ) . '</div><div class="heateorSssTotalShareText" style="font-size: ' . ( $icon_height * 38/100 ) . 'px">Shares</div>' : '' ) . '</i></li>';
|
386 |
}
|
@@ -997,7 +998,8 @@ class Sassy_Social_Share_Public {
|
|
997 |
|
998 |
public function update_db_check() {
|
999 |
|
1000 |
-
|
|
|
1001 |
if ( $this->options['horizontal_sharing_replace_color'] != '#fff' ) {
|
1002 |
heateor_sss_update_svg_css( $this->options['horizontal_sharing_replace_color'], 'sassy-social-share-default-svg-horizontal' );
|
1003 |
}
|
@@ -1011,9 +1013,11 @@ class Sassy_Social_Share_Public {
|
|
1011 |
heateor_sss_update_svg_css( $this->options['vertical_font_color_hover'], 'sassy-social-share-hover-svg-vertical' );
|
1012 |
}
|
1013 |
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
|
|
|
|
1017 |
|
1018 |
// update plugin version in database
|
1019 |
update_option( 'heateor_sss_version', $this->version );
|
112 |
echo ! isset( $this->options['vertical_counter_position'] ) || in_array( $this->options['vertical_counter_position'], array( 'inner_top', 'inner_bottom' ) ) ? 'var heateorSssReduceVerticalSvgHeight = true;' : '';
|
113 |
}
|
114 |
?>
|
115 |
+
var heateorSssUrlCountFetched = [];
|
116 |
function heateorSssPopup(e){window.open(e,"popUpWindow","height=400,width=600,left=400,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes")}
|
117 |
</script>
|
118 |
<?php
|
319 |
$share_count = array();
|
320 |
foreach ( $this->options[$sharing_type.'_re_providers'] as $provider ) {
|
321 |
$share_count[$provider] = $share_counts == ' ' ? '' : ( isset( $share_counts[$provider] ) ? $share_counts[$provider] : '' );
|
322 |
+
$isset_starting_share_count = isset( $sharing_meta[$provider . '_' . $sharing_type . '_count'] ) && $sharing_meta[$provider . '_' . $sharing_type . '_count'] != '' ? true : false;
|
323 |
+
$total_share_count += intval( $share_count[$provider] ) + ($isset_starting_share_count ? $sharing_meta[$provider . '_' . $sharing_type . '_count'] : 0) ;
|
324 |
$li_items .= str_replace(
|
325 |
array(
|
326 |
'%padding%',
|
353 |
$language,
|
354 |
$this->options['buffer_username'] != '' ? $this->options['buffer_username'] : '',
|
355 |
$style,
|
356 |
+
$inner_style . ( $share_count[$provider] || ($isset_starting_share_count && $share_counts != ' ') ? $inner_style_conditional : '' ),
|
357 |
$li_class,
|
358 |
+
str_replace( '%network%', $provider, $isset_starting_share_count ? str_replace( '> ', ' sss_st_count="' . $sharing_meta[$provider . '_' . $sharing_type . '_count'] . '"' . ( $share_counts == ' ' ? '> ' : ' style="visibility:visible;' . ( $inner_style_conditional ? 'display:block;' : '' ) . '">' . $this->round_off_counts( $share_count[$provider] + $sharing_meta[$provider . '_' . $sharing_type . '_count'] ) ) , $counter_placeholder_value ) : str_replace( '> ', $share_count[$provider] ? ' style="visibility:visible;' . ( $inner_style_conditional ? 'display:block;' : '' ) . '">' . $this->round_off_counts( $share_count[$provider] ) : '> ', $counter_placeholder_value ) ),
|
359 |
ucfirst( str_replace( '_', ' ', $provider ) )
|
360 |
),
|
361 |
$sharing_networks[$provider]
|
381 |
} else {
|
382 |
$add_style = ';margin-bottom:9px !important;';
|
383 |
}
|
384 |
+
$add_style .= ( $total_share_count && $share_counts != ' ' ? 'visibility:visible;' : '' ) . '"';
|
385 |
$style = str_replace( ';"', $add_style, $style );
|
386 |
$total_shares_html .= '<i ' . $style . ' title="Total Shares" alt="Total Shares" class="heateorSssSharing heateorSssTCBackground">' . ( $total_share_count ? '<div class="heateorSssTotalShareCount" style="font-size: ' . ( $icon_height * 62/100 ) . 'px">' . $this->round_off_counts( $total_share_count ) . '</div><div class="heateorSssTotalShareText" style="font-size: ' . ( $icon_height * 38/100 ) . 'px">Shares</div>' : '' ) . '</i></li>';
|
387 |
}
|
998 |
|
999 |
public function update_db_check() {
|
1000 |
|
1001 |
+
$current_version = get_option( 'heateor_sss_version' );
|
1002 |
+
if ( $current_version != $this->version ) {
|
1003 |
if ( $this->options['horizontal_sharing_replace_color'] != '#fff' ) {
|
1004 |
heateor_sss_update_svg_css( $this->options['horizontal_sharing_replace_color'], 'sassy-social-share-default-svg-horizontal' );
|
1005 |
}
|
1013 |
heateor_sss_update_svg_css( $this->options['vertical_font_color_hover'], 'sassy-social-share-hover-svg-vertical' );
|
1014 |
}
|
1015 |
|
1016 |
+
if ( version_compare( '1.7', $current_version ) > 0 ) {
|
1017 |
+
$this->options['share_count_cache_refresh_count'] = '10';
|
1018 |
+
$this->options['share_count_cache_refresh_unit'] = 'minutes';
|
1019 |
+
update_option( 'heateor_sss', $this->options );
|
1020 |
+
}
|
1021 |
|
1022 |
// update plugin version in database
|
1023 |
update_option( 'heateor_sss_version', $this->version );
|
public/js/sassy-social-share-public.js
CHANGED
@@ -515,7 +515,7 @@ if(heateorSssHorizontalSharingCountEnable || heateorSssVerticalSharingCountEnabl
|
|
515 |
function(){
|
516 |
// sharing counts
|
517 |
heateorSssCallAjax(function(){
|
518 |
-
heateorSssGetSharingCounts(
|
519 |
});
|
520 |
}
|
521 |
);
|
@@ -537,13 +537,13 @@ function heateorSssFilterSharing(val) {
|
|
537 |
/**
|
538 |
* Get sharing counts
|
539 |
*/
|
540 |
-
function heateorSssGetSharingCounts(
|
541 |
var targetUrls = [];
|
542 |
jQuery('.heateor_sss_sharing_container').each(function(){
|
543 |
var currentTargetUrl = jQuery(this).attr('heateor-sss-data-href');
|
544 |
-
if(currentTargetUrl != null &&
|
545 |
targetUrls.push(currentTargetUrl);
|
546 |
-
heateorSssUrlCountFetched
|
547 |
}
|
548 |
});
|
549 |
if(targetUrls.length == 0){
|
@@ -560,49 +560,40 @@ function heateorSssGetSharingCounts(horizontalCounts, verticalCounts){
|
|
560 |
success: function(data, textStatus, XMLHttpRequest){
|
561 |
if(data.status == 1){
|
562 |
for(var i in data.message){
|
563 |
-
var
|
564 |
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
|
|
|
|
574 |
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
583 |
}
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
}
|
590 |
-
totalCount += parseInt(sharingCount);
|
591 |
-
if(sharingCount < 1){ continue; }
|
592 |
-
var countAndWidth = heateorSssCalculateCountWidth(sharingCount) . split(',');
|
593 |
-
jQuery(targetElement).html(countAndWidth[0]).css({'visibility': 'visible', 'display': 'block'});
|
594 |
-
if ( ( typeof heateorSssReduceHorizontalSvgWidth != 'undefined' && jQuery(sharingContainer).hasClass('heateor_sss_horizontal_sharing') ) || ( typeof heateorSssReduceVerticalSvgWidth != 'undefined' && jQuery(sharingContainer).hasClass('heateor_sss_vertical_sharing') ) ) {
|
595 |
-
jQuery(targetElement).parents('li').find('.heateorSssSharingSvg').css('float', 'left');
|
596 |
-
}
|
597 |
-
if ( ( typeof heateorSssReduceHorizontalSvgHeight != 'undefined' && jQuery(sharingContainer).hasClass('heateor_sss_horizontal_sharing') ) || ( typeof heateorSssReduceVerticalSvgHeight != 'undefined' && jQuery(sharingContainer).hasClass('heateor_sss_vertical_sharing') ) ) {
|
598 |
-
jQuery(targetElement).parents('li').find('.heateorSssSharingSvg').css('marginTop', '0');
|
599 |
-
}
|
600 |
-
}
|
601 |
-
var totalCountNWidth = heateorSssCalculateCountWidth(totalCount) . split(',');
|
602 |
-
var totalCountContainer = jQuery(sharingContainer).find('.heateorSssTCBackground');
|
603 |
-
jQuery(totalCountContainer).each(function(){
|
604 |
-
var containerHeight = jQuery(this).css('height');
|
605 |
-
jQuery(this).html('<div class="heateorSssTotalShareCount" style="font-size: '+ (parseInt(containerHeight) * 62/100) +'px">' + totalCountNWidth[0] + '</div><div class="heateorSssTotalShareText" style="font-size: '+ (parseInt(containerHeight) * 38/100) +'px">Shares</div>').css('visibility', 'visible');
|
606 |
});
|
607 |
}
|
608 |
}
|
@@ -611,25 +602,16 @@ function heateorSssGetSharingCounts(horizontalCounts, verticalCounts){
|
|
611 |
}
|
612 |
|
613 |
function heateorSssCalculateCountWidth(sharingCount){
|
614 |
-
|
615 |
-
if(sharingCount > 9 && sharingCount < 100){
|
616 |
-
width = '12px';
|
617 |
-
}else if(sharingCount > 99 && sharingCount < 1000){
|
618 |
-
width = '20px';
|
619 |
-
}else if(sharingCount > 999 && sharingCount < 10000){
|
620 |
sharingCount = Math.round(sharingCount/1000) + 'K';
|
621 |
-
width = '20px';
|
622 |
}else if(sharingCount > 9999 && sharingCount < 100000){
|
623 |
sharingCount = Math.round(sharingCount/1000) + 'K';
|
624 |
-
width = '30px';
|
625 |
}else if(sharingCount > 99999 && sharingCount < 1000000){
|
626 |
sharingCount = Math.round(sharingCount/1000) + 'K';
|
627 |
-
width = '42px';
|
628 |
}else if(sharingCount > 999999){
|
629 |
sharingCount = Math.round(sharingCount/1000000) + 'M';
|
630 |
-
width = '30px';
|
631 |
}
|
632 |
-
return sharingCount
|
633 |
}
|
634 |
|
635 |
function heateorSssCapitaliseFirstLetter(e) {
|
515 |
function(){
|
516 |
// sharing counts
|
517 |
heateorSssCallAjax(function(){
|
518 |
+
heateorSssGetSharingCounts();
|
519 |
});
|
520 |
}
|
521 |
);
|
537 |
/**
|
538 |
* Get sharing counts
|
539 |
*/
|
540 |
+
function heateorSssGetSharingCounts(){
|
541 |
var targetUrls = [];
|
542 |
jQuery('.heateor_sss_sharing_container').each(function(){
|
543 |
var currentTargetUrl = jQuery(this).attr('heateor-sss-data-href');
|
544 |
+
if(currentTargetUrl != null && jQuery.inArray(currentTargetUrl, heateorSssUrlCountFetched) == -1){
|
545 |
targetUrls.push(currentTargetUrl);
|
546 |
+
heateorSssUrlCountFetched.push(currentTargetUrl);
|
547 |
}
|
548 |
});
|
549 |
if(targetUrls.length == 0){
|
560 |
success: function(data, textStatus, XMLHttpRequest){
|
561 |
if(data.status == 1){
|
562 |
for(var i in data.message){
|
563 |
+
var sharingContainers = jQuery("div[heateor-sss-data-href='"+i+"']");
|
564 |
|
565 |
+
jQuery(sharingContainers).each(function(){
|
566 |
+
var totalCount = 0;
|
567 |
+
for(var j in data.message[i]){
|
568 |
+
if(j == 'google_plus'){
|
569 |
+
var sharingCount = data.message[i][j].match( /"(.*?)"/ )[1];
|
570 |
+
sharingCount = parseInt(sharingCount) || 0;
|
571 |
+
}else if(j == 'vkontakte'){
|
572 |
+
var sharingCount = parseInt(data.message[i][j].replace('VK.Share.count(0, ', '').replace(');', ''));
|
573 |
+
}else{
|
574 |
+
var sharingCount = data.message[i][j];
|
575 |
+
}
|
576 |
|
577 |
+
var targetElement = jQuery(this).find('.heateor_sss_'+j+'_count');
|
578 |
+
|
579 |
+
if(jQuery(targetElement).attr('sss_st_count')){
|
580 |
+
sharingCount = parseInt(sharingCount) + parseInt(jQuery(targetElement).attr('sss_st_count'));
|
581 |
+
}
|
582 |
+
totalCount += parseInt(sharingCount);
|
583 |
+
if(sharingCount < 1){ continue; }
|
584 |
+
jQuery(targetElement).html(heateorSssCalculateCountWidth(sharingCount)).css({'visibility': 'visible', 'display': 'block'});
|
585 |
+
if ( ( typeof heateorSssReduceHorizontalSvgWidth != 'undefined' && jQuery(this).hasClass('heateor_sss_horizontal_sharing') ) || ( typeof heateorSssReduceVerticalSvgWidth != 'undefined' && jQuery(this).hasClass('heateor_sss_vertical_sharing') ) ) {
|
586 |
+
jQuery(targetElement).parents('li').find('.heateorSssSharingSvg').css('float', 'left');
|
587 |
+
}
|
588 |
+
if ( ( typeof heateorSssReduceHorizontalSvgHeight != 'undefined' && jQuery(this).hasClass('heateor_sss_horizontal_sharing') ) || ( typeof heateorSssReduceVerticalSvgHeight != 'undefined' && jQuery(this).hasClass('heateor_sss_vertical_sharing') ) ) {
|
589 |
+
jQuery(targetElement).parents('li').find('.heateorSssSharingSvg').css('marginTop', '0');
|
590 |
+
}
|
591 |
}
|
592 |
+
var totalCountContainer = jQuery(this).find('.heateorSssTCBackground');
|
593 |
+
jQuery(totalCountContainer).each(function(){
|
594 |
+
var containerHeight = jQuery(this).css('height');
|
595 |
+
jQuery(this).html('<div class="heateorSssTotalShareCount" style="font-size: '+ (parseInt(containerHeight) * 62/100) +'px">' + heateorSssCalculateCountWidth(totalCount) + '</div><div class="heateorSssTotalShareText" style="font-size: '+ (parseInt(containerHeight) * 38/100) +'px">Shares</div>').css('visibility', 'visible');
|
596 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
597 |
});
|
598 |
}
|
599 |
}
|
602 |
}
|
603 |
|
604 |
function heateorSssCalculateCountWidth(sharingCount){
|
605 |
+
if(sharingCount > 999 && sharingCount < 10000){
|
|
|
|
|
|
|
|
|
|
|
606 |
sharingCount = Math.round(sharingCount/1000) + 'K';
|
|
|
607 |
}else if(sharingCount > 9999 && sharingCount < 100000){
|
608 |
sharingCount = Math.round(sharingCount/1000) + 'K';
|
|
|
609 |
}else if(sharingCount > 99999 && sharingCount < 1000000){
|
610 |
sharingCount = Math.round(sharingCount/1000) + 'K';
|
|
|
611 |
}else if(sharingCount > 999999){
|
612 |
sharingCount = Math.round(sharingCount/1000000) + 'M';
|
|
|
613 |
}
|
614 |
+
return sharingCount;
|
615 |
}
|
616 |
|
617 |
function heateorSssCapitaliseFirstLetter(e) {
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Heateor
|
|
3 |
Donate link: https://www.heateor.com/donate/?action=Sassy+Social+Share
|
4 |
Tags: social share, social sharing, social plugin, social media plugin, social media share, social media share, share facebook, facebook social share, wordpress social share, share buttons, social share buttons, social buttons, share wordpress, wordpress plugin share, share social plugin, facebook like, twitter tweet, google plus one, google +1, google plus share, googleplus share, googleplus one, social bookmark, bookmark, bookmarking, social bookmarking, social bookmarks, responsive share buttons, responsive sharing, mobile share buttons, mobile sharing
|
5 |
Requires at least: 2.5.0
|
6 |
-
Tested up to: 4.4.
|
7 |
-
Stable tag: 1.7
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Slickest, Simplest and Optimized Share buttons. Facebook, Twitter, Google+, Pinterest, WhatsApp and over 100 more.
|
@@ -115,6 +115,9 @@ Yes, we can help you with it. Just drop an email at support[at]heateor[dot]com
|
|
115 |
4. **Universal Sharing Popup**: Universal Sharing popup having all the supported sharing and bookmarking services
|
116 |
|
117 |
== Changelog ==
|
|
|
|
|
|
|
118 |
= 1.7 =
|
119 |
* [Bugfix] Website title was appearing in homepage content in a few cases
|
120 |
* [Bugfix] Fixed a PHP notice filling error log when enabled WordPress debugging
|
@@ -185,4 +188,7 @@ Yes, we can help you with it. Just drop an email at support[at]heateor[dot]com
|
|
185 |
* [Improvement] Twitter logo background color updated to match Twitter's brand guidelines
|
186 |
* [New] Added option to clear Bit.ly shorturl cache
|
187 |
* [New] Added option to clear share counts cache
|
188 |
-
* [New] Added option to specify time duration to refresh share count cache
|
|
|
|
|
|
3 |
Donate link: https://www.heateor.com/donate/?action=Sassy+Social+Share
|
4 |
Tags: social share, social sharing, social plugin, social media plugin, social media share, social media share, share facebook, facebook social share, wordpress social share, share buttons, social share buttons, social buttons, share wordpress, wordpress plugin share, share social plugin, facebook like, twitter tweet, google plus one, google +1, google plus share, googleplus share, googleplus one, social bookmark, bookmark, bookmarking, social bookmarking, social bookmarks, responsive share buttons, responsive sharing, mobile share buttons, mobile sharing
|
5 |
Requires at least: 2.5.0
|
6 |
+
Tested up to: 4.4.2
|
7 |
+
Stable tag: 1.7.1
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Slickest, Simplest and Optimized Share buttons. Facebook, Twitter, Google+, Pinterest, WhatsApp and over 100 more.
|
115 |
4. **Universal Sharing Popup**: Universal Sharing popup having all the supported sharing and bookmarking services
|
116 |
|
117 |
== Changelog ==
|
118 |
+
= 1.7.1 =
|
119 |
+
* [Bugfix] Share counts were messing with the sharing icons in some cases
|
120 |
+
|
121 |
= 1.7 =
|
122 |
* [Bugfix] Website title was appearing in homepage content in a few cases
|
123 |
* [Bugfix] Fixed a PHP notice filling error log when enabled WordPress debugging
|
188 |
* [Improvement] Twitter logo background color updated to match Twitter's brand guidelines
|
189 |
* [New] Added option to clear Bit.ly shorturl cache
|
190 |
* [New] Added option to clear share counts cache
|
191 |
+
* [New] Added option to specify time duration to refresh share count cache
|
192 |
+
|
193 |
+
= 1.7.1 =
|
194 |
+
* [Bugfix] Share counts were messing with the sharing icons in some cases
|
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: 1.7
|
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', '1.7' );
|
25 |
|
26 |
// plugin core class object
|
27 |
$heateor_sss = null;
|
@@ -111,7 +111,7 @@ function heateor_sss_default_options() {
|
|
111 |
'bottom_sharing_alignment' => 'left',
|
112 |
'footer_script' => '1',
|
113 |
'delete_options' => '1',
|
114 |
-
'share_count_cache_refresh_count' => '
|
115 |
'share_count_cache_refresh_unit' => 'minutes',
|
116 |
'bitly_username' => '',
|
117 |
'bitly_key' => '',
|
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: 1.7.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', '1.7.1' );
|
25 |
|
26 |
// plugin core class object
|
27 |
$heateor_sss = null;
|
111 |
'bottom_sharing_alignment' => 'left',
|
112 |
'footer_script' => '1',
|
113 |
'delete_options' => '1',
|
114 |
+
'share_count_cache_refresh_count' => '10',
|
115 |
'share_count_cache_refresh_unit' => 'minutes',
|
116 |
'bitly_username' => '',
|
117 |
'bitly_key' => '',
|