Social Media Share Buttons | MashShare - Version 3.2.8

Version Description

  • Fix: Custom field mashsb_jsonshares facebook is empty when old "refresh while loading" share count method is used
  • New: Add more unit tests to make sure that future updates do not break share count generation
Download this release

Release Info

Developer ReneHermi
Plugin Icon 128x128 Social Media Share Buttons | MashShare
Version 3.2.8
Comparing to
See all releases

Code changes from version 3.2.6 to 3.2.8

includes/admin/welcome.php CHANGED
@@ -250,9 +250,11 @@ s </div>
250
<div class="changelog">
251
<div class="feature-section">
252
<div class="feature-section-content">
253
- <h2><?php _e( 'Use Facebook Connect to Skyrocket Share Count', 'mashsb' ); ?></h2>
254
- <p><?php _e( 'MashShare is the first Social Media plugin that uses the brandnew Facebook Connect Integration to bypass the regular facebook API limit which has been introduced recently. <p>It allows you up to 200 API calls per hour to the facebook server. This is more than enough for even huge traffic sites as MashShare is caching all share counts internally. <p>We are convinced that other social media plugins are going to copy our solution soon... and we will be proud of it;) <p> Your site becomes immediately better than the rest because you are the one whose website is running with full social sharing power. Other sites share count still stucks and are delayed and they do not know it;)', 'mashsb' ); ?></p>
255
- <img src="<?php echo MASHSB_PLUGIN_URL . 'assets/images/screenshots/oauth.png'; ?>"/>
256
<p></p>
257
<h2><?php _e( 'A New Beautiful Sharing Widget', 'mashsb' ); ?></h2>
258
<p><?php _e( 'We have heard your wishes so the new widget contains the long requested post thumbnail and a beautiful css which gives your side bar sharing super power.', 'mashsb' ); ?></p>
250
<div class="changelog">
251
<div class="feature-section">
252
<div class="feature-section-content">
253
+ <!--
254
+ <h2><?php //_e( 'Use Facebook Connect to Skyrocket Share Count', 'mashsb' ); ?></h2>
255
+ <p><?php //_e( 'MashShare is the first Social Media plugin that uses the brandnew Facebook Connect Integration to bypass the regular facebook API limit which has been introduced recently. <p>It allows you up to 200 API calls per hour to the facebook server. This is more than enough for even huge traffic sites as MashShare is caching all share counts internally. <p>We are convinced that other social media plugins are going to copy our solution soon... and we will be proud of it;) <p> Your site becomes immediately better than the rest because you are the one whose website is running with full social sharing power. Other sites share count still stucks and are delayed and they do not know it;)', 'mashsb' ); ?></p>
256
+ <img src="<?php //echo MASHSB_PLUGIN_URL . 'assets/images/screenshots/oauth.png'; ?>"/>
257
+ //-->
258
<p></p>
259
<h2><?php _e( 'A New Beautiful Sharing Widget', 'mashsb' ); ?></h2>
260
<p><?php _e( 'We have heard your wishes so the new widget contains the long requested post thumbnail and a beautiful css which gives your side bar sharing super power.', 'mashsb' ); ?></p>
includes/mashengine.php CHANGED
@@ -25,8 +25,8 @@ class mashengine {
25
$this->data = new stdClass;
26
$this->data->total = 0;
27
$data = $this->getSharesALL();
28
- //return $data;
29
- return $this->data;
30
//wp_die(var_dump($this->data->total));
31
}
32
@@ -124,6 +124,7 @@ class mashengine {
124
125
$RollingCurlX = new RollingCurlX( 10 ); // max 10 simultaneous downloads
126
$RollingCurlX->setOptions( $options );
127
switch ( $fb_mode ) {
128
case $fb_mode === 'likes':
129
@@ -136,8 +137,8 @@ class mashengine {
136
137
break;
138
case $fb_mode === 'total':
139
-
140
if( isset( $mashsb_options['cumulate_http_https'] ) ) {
141
$RollingCurlX->addRequest( "http://graph.facebook.com/?id=" . $this->https_scheme_url, $post_data, array($this, 'getCount'), array('facebook_total'), $headers );
142
$RollingCurlX->addRequest( "http://graph.facebook.com/?id=" . $this->http_scheme_url, $post_data, array($this, 'getCount'), array('facebook_total'), $headers );
143
}else{
@@ -183,6 +184,7 @@ class mashengine {
183
184
function getCount( $data, $url, $request_info, $service, $time ) {
185
$count = 0;
186
if( $data ) {
187
switch ( $service[0] ) {
188
// not used any longer. Keep it here for compatibility reasons and return share count
@@ -195,6 +197,7 @@ class mashengine {
195
$count = isset( $data['share']['share_count'] ) || array_key_exists( 'share_count', $data ) ? $data['share']['share_count'] : 0;
196
break;
197
case "facebook_total":
198
$data = json_decode( $data, true );
199
$share_count = isset( $data['share']['share_count'] ) || array_key_exists( 'share_count', $data ) ? $data['share']['share_count'] : 0;
200
$comment_count = isset( $data['share']['comment_count'] ) || array_key_exists( 'comment_count', $data ) ? $data['share']['comment_count'] : 0;
@@ -251,6 +254,7 @@ class mashengine {
251
* */
252
$this->data->total += $count;
253
$this->data->{$service[0]} = $count;
254
MASHSB()->logger->info( 'MashEngine - URL: ' . $url . ' ' . $service[0] . ': ' . $count );
255
mashdebug()->info( 'MashEngine - URL: ' . $url . ' ' . $service[0] . ': ' . $count );
256
//echo 'MashEngine - URL: ' . $url . ' ' . $service[0] . ': ' . $count;
25
$this->data = new stdClass;
26
$this->data->total = 0;
27
$data = $this->getSharesALL();
28
+ return $data;
29
+ //return $this->data;
30
//wp_die(var_dump($this->data->total));
31
}
32
124
125
$RollingCurlX = new RollingCurlX( 10 ); // max 10 simultaneous downloads
126
$RollingCurlX->setOptions( $options );
127
+
128
switch ( $fb_mode ) {
129
case $fb_mode === 'likes':
130
137
138
break;
139
case $fb_mode === 'total':
140
if( isset( $mashsb_options['cumulate_http_https'] ) ) {
141
+ //wp_die("http://graph.facebook.com/?id=" . $this->https_scheme_url, $post_data, array($this, 'getCount'), array('facebook_total'), $headers );
142
$RollingCurlX->addRequest( "http://graph.facebook.com/?id=" . $this->https_scheme_url, $post_data, array($this, 'getCount'), array('facebook_total'), $headers );
143
$RollingCurlX->addRequest( "http://graph.facebook.com/?id=" . $this->http_scheme_url, $post_data, array($this, 'getCount'), array('facebook_total'), $headers );
144
}else{
184
185
function getCount( $data, $url, $request_info, $service, $time ) {
186
$count = 0;
187
+
188
if( $data ) {
189
switch ( $service[0] ) {
190
// not used any longer. Keep it here for compatibility reasons and return share count
197
$count = isset( $data['share']['share_count'] ) || array_key_exists( 'share_count', $data ) ? $data['share']['share_count'] : 0;
198
break;
199
case "facebook_total":
200
+ //wp_die($fb_mode . 1);
201
$data = json_decode( $data, true );
202
$share_count = isset( $data['share']['share_count'] ) || array_key_exists( 'share_count', $data ) ? $data['share']['share_count'] : 0;
203
$comment_count = isset( $data['share']['comment_count'] ) || array_key_exists( 'comment_count', $data ) ? $data['share']['comment_count'] : 0;
254
* */
255
$this->data->total += $count;
256
$this->data->{$service[0]} = $count;
257
+
258
MASHSB()->logger->info( 'MashEngine - URL: ' . $url . ' ' . $service[0] . ': ' . $count );
259
mashdebug()->info( 'MashEngine - URL: ' . $url . ' ' . $service[0] . ': ' . $count );
260
//echo 'MashEngine - URL: ' . $url . ' ' . $service[0] . ': ' . $count;
mashshare.php CHANGED
@@ -6,7 +6,7 @@
6
* Description: Mashshare is a Share functionality inspired by the the great website Mashable for Facebook and Twitter. More networks available.
7
* Author: René Hermenau
8
* Author URI: https://www.mashshare.net
9
- * Version: 3.2.6
10
* Text Domain: mashsb
11
* Domain Path: /languages
12
* Credits: Thanks go to Pippin Williamson and the edd team. When we started with Mashshare we decided to use the EDD code base and
@@ -37,7 +37,7 @@ if( !defined( 'ABSPATH' ) )
37
38
// Plugin version
39
if( !defined( 'MASHSB_VERSION' ) ) {
40
- define( 'MASHSB_VERSION', '3.2.6' );
41
}
42
43
// Debug mode
6
* Description: Mashshare is a Share functionality inspired by the the great website Mashable for Facebook and Twitter. More networks available.
7
* Author: René Hermenau
8
* Author URI: https://www.mashshare.net
9
+ * Version: 3.2.8
10
* Text Domain: mashsb
11
* Domain Path: /languages
12
* Credits: Thanks go to Pippin Williamson and the edd team. When we started with Mashshare we decided to use the EDD code base and
37
38
// Plugin version
39
if( !defined( 'MASHSB_VERSION' ) ) {
40
+ define( 'MASHSB_VERSION', '3.2.8' );
41
}
42
43
// Debug mode
readme.txt CHANGED
@@ -9,7 +9,7 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
Tags: Share buttons, Social Sharing, social media, Facebook, Twitter, Subscribe, Traffic posts, pages, widget, social share buttons, analytics, email
10
Requires at least: 3.6+
11
Tested up to: 4.7
12
- Stable tag: 3.2.6
13
14
Social Media Share Buttons for Twitter, Facebook and other social networks. Highly customizable Social Media ecosystem
15
@@ -319,6 +319,13 @@ Read here more FAQ: [https://www.mashshare.net/faq/](https://www.mashshare.net/f
319
320
== Changelog ==
321
322
= 3.2.6 =
323
* Fix: Google and Facebook share count not calculated correctly
324
* Fix: pinit.js converts pinterest button into a pinterest native icon. Needs MashShare Networks 2.3.9 or later!
9
Tags: Share buttons, Social Sharing, social media, Facebook, Twitter, Subscribe, Traffic posts, pages, widget, social share buttons, analytics, email
10
Requires at least: 3.6+
11
Tested up to: 4.7
12
+ Stable tag: 3.2.8
13
14
Social Media Share Buttons for Twitter, Facebook and other social networks. Highly customizable Social Media ecosystem
15
319
320
== Changelog ==
321
322
+ = 3.2.8 =
323
+ * Fix: Custom field mashsb_jsonshares facebook is empty when old "refresh while loading" share count method is used
324
+ * New: Add more unit tests to make sure that future updates do not break share count generation
325
+
326
+ = 3.2.7 =
327
+ * Tweak: Remove FB access token generator
328
+
329
= 3.2.6 =
330
* Fix: Google and Facebook share count not calculated correctly
331
* Fix: pinit.js converts pinterest button into a pinterest native icon. Needs MashShare Networks 2.3.9 or later!