Social Media Share Buttons | MashShare - Version 3.8.3

Version Description

  • Fix: Undefined warning on php 8.1
Download this release

Release Info

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

Code changes from version 3.8.2 to 3.8.3

Files changed (3) hide show
  1. includes/sharedcount.class.php +11 -13
  2. mashshare.php +2 -2
  3. readme.txt +7 -1
includes/sharedcount.class.php CHANGED
@@ -37,7 +37,7 @@ class mashsbSharedcount {
37
  /**
38
  * Collect shares for facebook and twitter (Twitter not supported any longer)
39
  * @global array $mashsb_options
40
- * @return type
41
  */
42
  public function getFBTWCounts() {
43
  global $mashsb_options;
@@ -54,19 +54,19 @@ class mashsbSharedcount {
54
  $counts = array('shares' => array(), 'total' => 0);
55
  switch ( $fb_mode ) {
56
  case $fb_mode === 'likes':
57
- $counts['shares']['fb'] = $sharecounts['Facebook']['like_count'];
58
- $counts['shares']['fb_https'] = $sharecounts['https']['Facebook']['like_count'];
59
 
60
  break;
61
  case $fb_mode === 'total':
62
- $counts['shares']['fb'] = $sharecounts['Facebook']['total_count'];
63
- $counts['shares']['fb_https'] = $sharecounts['https']['Facebook']['total_count'];
64
  break;
65
  default:
66
- $counts['shares']['fb'] = $sharecounts['Facebook']['share_count'];
67
- $counts['shares']['fb_https'] = $sharecounts['https']['Facebook']['share_count'];
68
  }
69
- $counts['shares']['tw'] = $sharecounts['Twitter'];
70
 
71
 
72
 
@@ -98,15 +98,15 @@ class mashsbSharedcount {
98
  $counts = array('shares' => array(), 'total' => 0);
99
  switch ( $fb_mode ) {
100
  case $fb_mode === 'likes':
101
- $counts['shares']['fb'] = $sharecounts['Facebook']['like_count'];
102
- $counts['shares']['fb_https'] = $sharecounts['https']['Facebook']['like_count'];
103
  break;
104
  case $fb_mode === 'total':
105
  $counts['shares']['fb'] = isset($sharecounts['Facebook']['total_count']) ? $sharecounts['Facebook']['total_count'] : 0;
106
  $counts['shares']['fb_https'] = isset($sharecounts['https']['Facebook']['total_count']) ? $sharecounts['https']['Facebook']['total_count'] : 0;
107
  break;
108
  default:
109
- $counts['shares']['fb'] = $sharecounts['Facebook']['share_count'];
110
  $counts['shares']['fb_https'] = isset($sharecounts['https']['Facebook']['share_count']) ? $sharecounts['https']['Facebook']['share_count'] : '';
111
  }
112
  isset( $sharecounts['Twitter'] ) ? $counts['shares']['tw'] = $sharecounts['Twitter'] : $counts['shares']['tw'] = 0;
@@ -116,8 +116,6 @@ class mashsbSharedcount {
116
  isset( $sharecounts['Pinterest'] ) ? $counts['shares']['pin'] = $sharecounts['Pinterest'] : $counts['shares']['pin'] = 0;
117
  isset( $sharecounts['https']['Pinterest'] ) ? $counts['shares']['pin_https'] = $sharecounts['https']['Pinterest'] : $counts['shares']['pin_https'] = 0;
118
 
119
-
120
-
121
  $total = 0;
122
  foreach ( $counts['shares'] as $totalcount ) {
123
  $total += ( int ) $totalcount;
37
  /**
38
  * Collect shares for facebook and twitter (Twitter not supported any longer)
39
  * @global array $mashsb_options
40
+ * @return array
41
  */
42
  public function getFBTWCounts() {
43
  global $mashsb_options;
54
  $counts = array('shares' => array(), 'total' => 0);
55
  switch ( $fb_mode ) {
56
  case $fb_mode === 'likes':
57
+ $counts['shares']['fb'] = isset($sharecounts['Facebook']['like_count']) ? $sharecounts['Facebook']['like_count'] : 0;
58
+ $counts['shares']['fb_https'] = isset($sharecounts['https']['Facebook']['like_count']) ? $sharecounts['https']['Facebook']['like_count'] : 0;
59
 
60
  break;
61
  case $fb_mode === 'total':
62
+ $counts['shares']['fb'] = isset($sharecounts['Facebook']['total_count']) ? $sharecounts['Facebook']['total_count'] : 0;
63
+ $counts['shares']['fb_https'] = isset($sharecounts['https']['Facebook']['total_count']) ? $sharecounts['https']['Facebook']['total_count'] : 0;
64
  break;
65
  default:
66
+ $counts['shares']['fb'] = isset($sharecounts['Facebook']['share_count']) ? $sharecounts['Facebook']['share_count'] : 0;
67
+ $counts['shares']['fb_https'] = isset($sharecounts['https']['Facebook']['share_count']) ? $sharecounts['https']['Facebook']['share_count'] : 0;
68
  }
69
+ $counts['shares']['tw'] = isset($sharecounts['Twitter']) ? $sharecounts['Twitter'] : 0;
70
 
71
 
72
 
98
  $counts = array('shares' => array(), 'total' => 0);
99
  switch ( $fb_mode ) {
100
  case $fb_mode === 'likes':
101
+ $counts['shares']['fb'] = isset($sharecounts['Facebook']['like_count']) ? $sharecounts['Facebook']['like_count'] : 0;
102
+ $counts['shares']['fb_https'] = isset($sharecounts['https']['Facebook']['like_count']) ? $sharecounts['https']['Facebook']['like_count'] : 0;
103
  break;
104
  case $fb_mode === 'total':
105
  $counts['shares']['fb'] = isset($sharecounts['Facebook']['total_count']) ? $sharecounts['Facebook']['total_count'] : 0;
106
  $counts['shares']['fb_https'] = isset($sharecounts['https']['Facebook']['total_count']) ? $sharecounts['https']['Facebook']['total_count'] : 0;
107
  break;
108
  default:
109
+ $counts['shares']['fb'] = isset($sharecounts['Facebook']['share_count']) ? $sharecounts['Facebook']['share_count'] : 0;
110
  $counts['shares']['fb_https'] = isset($sharecounts['https']['Facebook']['share_count']) ? $sharecounts['https']['Facebook']['share_count'] : '';
111
  }
112
  isset( $sharecounts['Twitter'] ) ? $counts['shares']['tw'] = $sharecounts['Twitter'] : $counts['shares']['tw'] = 0;
116
  isset( $sharecounts['Pinterest'] ) ? $counts['shares']['pin'] = $sharecounts['Pinterest'] : $counts['shares']['pin'] = 0;
117
  isset( $sharecounts['https']['Pinterest'] ) ? $counts['shares']['pin_https'] = $sharecounts['https']['Pinterest'] : $counts['shares']['pin_https'] = 0;
118
 
 
 
119
  $total = 0;
120
  foreach ( $counts['shares'] as $totalcount ) {
121
  $total += ( int ) $totalcount;
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.8.2
10
  * Text Domain: mashsb
11
  * Domain Path: /languages
12
 
@@ -35,7 +35,7 @@ if( !defined( 'ABSPATH' ) )
35
 
36
  // Plugin version
37
  if( !defined( 'MASHSB_VERSION' ) ) {
38
- define( 'MASHSB_VERSION', '3.8.2' );
39
  }
40
 
41
  // 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.8.3
10
  * Text Domain: mashsb
11
  * Domain Path: /languages
12
 
35
 
36
  // Plugin version
37
  if( !defined( 'MASHSB_VERSION' ) ) {
38
+ define( 'MASHSB_VERSION', '3.8.3' );
39
  }
40
 
41
  // 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, social share buttons
10
  Requires at least: 3.6+
11
  Tested up to: 6.0
12
- Stable tag: 3.8.2
13
  Requires PHP: 5.6
14
 
15
  Social Media Share Buttons for Twitter, Facebook, and other social networks. Highly customizable Social Media ecosystem
@@ -249,6 +249,9 @@ Read here more about this: http://docs.mashshare.net/article/10-facebook-is-show
249
 
250
  == Changelog ==
251
 
 
 
 
252
  = 3.8.2 =
253
  * New: Compatible up to WordPress 6.0.1
254
  * Fix: Do sanitization on input values. Fix a low severity Authenticated Stored Cross-Site Scripting (XSS) vulnerability
@@ -325,6 +328,9 @@ https://www.mashshare.net/changelog/
325
 
326
  == Upgrade Notice ==
327
 
 
 
 
328
  = 3.8.2 =
329
  * New: Compatible up to WordPress 6.0.1
330
  * Fix: Do sanitization on input values. Fix a low severity Authenticated Stored Cross-Site Scripting (XSS) vulnerability
9
  Tags: Share buttons, Social Sharing, social media, Facebook, Twitter, Subscribe, social share buttons
10
  Requires at least: 3.6+
11
  Tested up to: 6.0
12
+ Stable tag: 3.8.3
13
  Requires PHP: 5.6
14
 
15
  Social Media Share Buttons for Twitter, Facebook, and other social networks. Highly customizable Social Media ecosystem
249
 
250
  == Changelog ==
251
 
252
+ = 3.8.3 =
253
+ * Fix: Undefined warning on php 8.1
254
+
255
  = 3.8.2 =
256
  * New: Compatible up to WordPress 6.0.1
257
  * Fix: Do sanitization on input values. Fix a low severity Authenticated Stored Cross-Site Scripting (XSS) vulnerability
328
 
329
  == Upgrade Notice ==
330
 
331
+ = 3.8.3 =
332
+ * Fix: Undefined warning on php 8.1
333
+
334
  = 3.8.2 =
335
  * New: Compatible up to WordPress 6.0.1
336
  * Fix: Do sanitization on input values. Fix a low severity Authenticated Stored Cross-Site Scripting (XSS) vulnerability