WordPress Social Share, Social Login and Social Comments Plugin – Super Socializer - Version 7.13.10

Version Description

[16 December 2020] = [Bugfix] Facebook login was not saving user's email [Improvement] Perforance improvement for Facebook login

Download this release

Release Info

Developer the_champ
Plugin Icon 128x128 WordPress Social Share, Social Login and Social Comments Plugin – Super Socializer
Version 7.13.10
Comparing to
See all releases

Code changes from version 7.13.9 to 7.13.10

Files changed (2) hide show
  1. readme.txt +10 -2
  2. super_socializer.php +40 -43
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.heateor.com/donate?action=Super+Socializer
4
  Tags: social login, social share, line login, social commenting, social comments, social plugin, profile data, social analytics, online identity, social profile storage, single sign-on, social media follow, facebook login, twitter login, linkedin login, google login, vkontakte login, Windows Live Login, Microsoft Login, Wordpress login, Yahoo login, Spotify login, Dribbble login, Kakao login, Github login, Twitch login, Instagram login
5
  Requires at least: 2.5.0
6
  Tested up to: 5.6
7
- Stable tag: 7.13.9
8
  License: GPLv2 or later
9
 
10
  The unique Social Plugin to let you integrate Social Login, Social Share, Social Comments and Social Media follow at your website
@@ -212,6 +212,10 @@ Yes, we can help you with it. Just drop an email at support[ at ]heateor[ dot ]c
212
  8. **Social Commenting**: Disqus Commenting selected
213
 
214
  == Changelog ==
 
 
 
 
215
  = 7.13.9 [15 December 2020] =
216
  [Bugfix] Social Avatar saved from Facebook was appearing broken after the changes introduced by Facebook in the October. Users need to login at least once via their Facebook account after this plugin-update to fix the broken social avatar
217
 
@@ -2188,4 +2192,8 @@ Yes, we can help you with it. Just drop an email at support[ at ]heateor[ dot ]c
2188
  [Bugfix] Number of total shares were not being displayed in the sticky floating bar at the bottom of the mobile devices when logo color of the floating share icons was not customized from the Theme Selection section
2189
 
2190
  = 7.13.9 [15 December 2020] =
2191
- [Bugfix] Social Avatar saved from Facebook was appearing broken after the changes introduced by Facebook in the October. Users need to login at least once via their Facebook account after this plugin-update to fix the broken social avatar
 
 
 
 
4
  Tags: social login, social share, line login, social commenting, social comments, social plugin, profile data, social analytics, online identity, social profile storage, single sign-on, social media follow, facebook login, twitter login, linkedin login, google login, vkontakte login, Windows Live Login, Microsoft Login, Wordpress login, Yahoo login, Spotify login, Dribbble login, Kakao login, Github login, Twitch login, Instagram login
5
  Requires at least: 2.5.0
6
  Tested up to: 5.6
7
+ Stable tag: 7.13.10
8
  License: GPLv2 or later
9
 
10
  The unique Social Plugin to let you integrate Social Login, Social Share, Social Comments and Social Media follow at your website
212
  8. **Social Commenting**: Disqus Commenting selected
213
 
214
  == Changelog ==
215
+ = 7.13.10 [16 December 2020] =
216
+ [Bugfix] Facebook login was not saving user's email
217
+ [Improvement] Perforance improvement for Facebook login
218
+
219
  = 7.13.9 [15 December 2020] =
220
  [Bugfix] Social Avatar saved from Facebook was appearing broken after the changes introduced by Facebook in the October. Users need to login at least once via their Facebook account after this plugin-update to fix the broken social avatar
221
 
2192
  [Bugfix] Number of total shares were not being displayed in the sticky floating bar at the bottom of the mobile devices when logo color of the floating share icons was not customized from the Theme Selection section
2193
 
2194
  = 7.13.9 [15 December 2020] =
2195
+ [Bugfix] Social Avatar saved from Facebook was appearing broken after the changes introduced by Facebook in the October. Users need to login at least once via their Facebook account after this plugin-update to fix the broken social avatar
2196
+
2197
+ = 7.13.10 [16 December 2020] =
2198
+ [Bugfix] Facebook login was not saving user's email
2199
+ [Improvement] Perforance improvement for Facebook login
super_socializer.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Super Socializer
4
  Plugin URI: https://super-socializer-wordpress.heateor.com
5
  Description: A complete 360 degree solution to provide all the social features like Social Login, Social Commenting, Social Sharing, Social Media follow and more
6
- Version: 7.13.9
7
  Author: Team Heateor
8
  Author URI: https://www.heateor.com
9
  Text Domain: super-socializer
@@ -11,7 +11,7 @@ Domain Path: /languages
11
  License: GPL2+
12
  */
13
  defined('ABSPATH') or die("Cheating........Uh!!");
14
- define('THE_CHAMP_SS_VERSION', '7.13.9');
15
 
16
  require 'helper.php';
17
 
@@ -1033,22 +1033,18 @@ function the_champ_connect(){
1033
  // Facebook
1034
  if((isset($_GET['SuperSocializerAuth']) && sanitize_text_field($_GET['SuperSocializerAuth']) == 'Facebook')){
1035
  if(isset($theChampLoginOptions['providers']) && in_array('facebook', $theChampLoginOptions['providers']) && isset($theChampLoginOptions['fb_key']) && $theChampLoginOptions['fb_key'] != '' && isset($theChampLoginOptions['fb_secret']) && $theChampLoginOptions['fb_secret'] != ''){
 
 
 
 
 
1036
  if(!isset($_GET['code'])){
1037
- if(function_exists('session_start')){
1038
- if(session_status() == PHP_SESSION_NONE){
1039
- session_start();
1040
- }
1041
- }
1042
  // save referrer url in state
1043
  $_SESSION['super_socializer_facebook_redirect'] = isset($_GET['super_socializer_redirect_to']) ? esc_url(trim($_GET['super_socializer_redirect_to'])) : home_url();
1044
- wp_redirect("https://www.facebook.com/v9.0/dialog/oauth?client_id=" . $theChampLoginOptions['fb_key'] . "&state=state&redirect_uri=" . home_url() . "/?SuperSocializerAuth=Facebook");
 
1045
  die;
1046
- }else{
1047
- if(function_exists('session_start')){
1048
- if(session_status() == PHP_SESSION_NONE){
1049
- session_start();
1050
- }
1051
- }
1052
  $post_data = array(
1053
  'code' => esc_attr(trim($_GET['code'])),
1054
  'redirect_uri' => home_url() . "/?SuperSocializerAuth=Facebook",
@@ -1068,33 +1064,35 @@ function the_champ_connect(){
1068
  ));
1069
  if(!is_wp_error($response) && isset($response['response']['code']) && 200 === $response['response']['code']){
1070
  $body = json_decode(wp_remote_retrieve_body($response));
1071
- $response = wp_remote_get("https://graph.facebook.com/me?fields=id,name,about,link,email,first_name,last_name,picture.width(60).height(60).as(picture_small),picture.width(320).height(320).as(picture_large)&access_token=" . $body->access_token, array(
1072
- 'timeout' => 15
1073
- ));
1074
- if(!is_wp_error($response) && isset($response['response']['code']) && 200 === $response['response']['code']){
1075
- $profileData = json_decode(wp_remote_retrieve_body($response));
1076
- if(is_object($profileData) && isset($profileData->id)){
1077
- $profileData = the_champ_sanitize_profile_data($profileData, 'facebook');
1078
- $facebook_redirect_url = isset($_SESSION['super_socializer_facebook_redirect']) && $_SESSION['super_socializer_facebook_redirect'] ? esc_url(trim($_SESSION['super_socializer_facebook_redirect'])) : home_url();
1079
- unset($_SESSION['super_socializer_facebook_redirect']);
1080
- $response = the_champ_user_auth($profileData, 'faceboook', $facebook_redirect_url);
1081
- if($response == 'show form'){
1082
- return;
1083
- }
1084
- if(is_array($response) && isset($response['message']) && $response['message'] == 'register' && (!isset($response['url']) || $response['url'] == '')){
1085
- $redirect_to = the_champ_get_login_redirection_url($facebook_redirect_url, true);
1086
- }elseif(isset($response['message']) && $response['message'] == 'linked'){
1087
- $redirect_to = $facebook_redirect_url . (strpos($facebook_redirect_url, '?') !== false ? '&' : '?') . 'linked=1';
1088
- }elseif(isset($response['message']) && $response['message'] == 'not linked'){
1089
- $redirect_to = $facebook_redirect_url . (strpos($facebook_redirect_url, '?') !== false ? '&' : '?') . 'linked=0';
1090
- }elseif(isset($response['url']) && $response['url'] != ''){
1091
- $redirect_to = $response['url'];
1092
- }else{
1093
- $redirect_to = the_champ_get_login_redirection_url($facebook_redirect_url);
1094
- }
1095
- the_champ_close_login_popup($redirect_to);
1096
- }
1097
- }
 
 
1098
  }
1099
  }
1100
  }
@@ -2112,8 +2110,7 @@ function the_champ_save_default_options(){
2112
  'twitter_username' => '',
2113
  'buffer_username' => '',
2114
  'fb_key' => '',
2115
- 'fb_secret' => '',
2116
- 'amp_enable' => '1'
2117
  ));
2118
 
2119
  // counter options
3
  Plugin Name: Super Socializer
4
  Plugin URI: https://super-socializer-wordpress.heateor.com
5
  Description: A complete 360 degree solution to provide all the social features like Social Login, Social Commenting, Social Sharing, Social Media follow and more
6
+ Version: 7.13.10
7
  Author: Team Heateor
8
  Author URI: https://www.heateor.com
9
  Text Domain: super-socializer
11
  License: GPL2+
12
  */
13
  defined('ABSPATH') or die("Cheating........Uh!!");
14
+ define('THE_CHAMP_SS_VERSION', '7.13.10');
15
 
16
  require 'helper.php';
17
 
1033
  // Facebook
1034
  if((isset($_GET['SuperSocializerAuth']) && sanitize_text_field($_GET['SuperSocializerAuth']) == 'Facebook')){
1035
  if(isset($theChampLoginOptions['providers']) && in_array('facebook', $theChampLoginOptions['providers']) && isset($theChampLoginOptions['fb_key']) && $theChampLoginOptions['fb_key'] != '' && isset($theChampLoginOptions['fb_secret']) && $theChampLoginOptions['fb_secret'] != ''){
1036
+ if(function_exists('session_start')){
1037
+ if(session_status() == PHP_SESSION_NONE){
1038
+ session_start();
1039
+ }
1040
+ }
1041
  if(!isset($_GET['code'])){
 
 
 
 
 
1042
  // save referrer url in state
1043
  $_SESSION['super_socializer_facebook_redirect'] = isset($_GET['super_socializer_redirect_to']) ? esc_url(trim($_GET['super_socializer_redirect_to'])) : home_url();
1044
+ $_SESSION['super_socializer_facebook_state'] = mt_rand();
1045
+ wp_redirect("https://www.facebook.com/v9.0/dialog/oauth?scope=email&client_id=" . $theChampLoginOptions['fb_key'] . "&state=" . $_SESSION['super_socializer_facebook_state'] . "&redirect_uri=" . home_url() . "/?SuperSocializerAuth=Facebook");
1046
  die;
1047
+ }elseif(isset($_GET['code']) && isset($_GET['state']) && esc_attr(trim($_GET['state'])) == $_SESSION['super_socializer_facebook_state']){
 
 
 
 
 
1048
  $post_data = array(
1049
  'code' => esc_attr(trim($_GET['code'])),
1050
  'redirect_uri' => home_url() . "/?SuperSocializerAuth=Facebook",
1064
  ));
1065
  if(!is_wp_error($response) && isset($response['response']['code']) && 200 === $response['response']['code']){
1066
  $body = json_decode(wp_remote_retrieve_body($response));
1067
+ if(!empty($body->access_token)){
1068
+ $response = wp_remote_get("https://graph.facebook.com/me?fields=id,name,about,link,email,first_name,last_name,picture.width(60).height(60).as(picture_small),picture.width(320).height(320).as(picture_large)&access_token=" . $body->access_token, array(
1069
+ 'timeout' => 15
1070
+ ));
1071
+ if(!is_wp_error($response) && isset($response['response']['code']) && 200 === $response['response']['code']){
1072
+ $profileData = json_decode(wp_remote_retrieve_body($response));
1073
+ if(is_object($profileData) && isset($profileData->id)){
1074
+ $profileData = the_champ_sanitize_profile_data($profileData, 'facebook');
1075
+ $facebook_redirect_url = isset($_SESSION['super_socializer_facebook_redirect']) && $_SESSION['super_socializer_facebook_redirect'] ? esc_url(trim($_SESSION['super_socializer_facebook_redirect'])) : home_url();
1076
+ unset($_SESSION['super_socializer_facebook_redirect']);
1077
+ $response = the_champ_user_auth($profileData, 'faceboook', $facebook_redirect_url);
1078
+ if($response == 'show form'){
1079
+ return;
1080
+ }
1081
+ if(is_array($response) && isset($response['message']) && $response['message'] == 'register' && (!isset($response['url']) || $response['url'] == '')){
1082
+ $redirect_to = the_champ_get_login_redirection_url($facebook_redirect_url, true);
1083
+ }elseif(isset($response['message']) && $response['message'] == 'linked'){
1084
+ $redirect_to = $facebook_redirect_url . (strpos($facebook_redirect_url, '?') !== false ? '&' : '?') . 'linked=1';
1085
+ }elseif(isset($response['message']) && $response['message'] == 'not linked'){
1086
+ $redirect_to = $facebook_redirect_url . (strpos($facebook_redirect_url, '?') !== false ? '&' : '?') . 'linked=0';
1087
+ }elseif(isset($response['url']) && $response['url'] != ''){
1088
+ $redirect_to = $response['url'];
1089
+ }else{
1090
+ $redirect_to = the_champ_get_login_redirection_url($facebook_redirect_url);
1091
+ }
1092
+ the_champ_close_login_popup($redirect_to);
1093
+ }
1094
+ }
1095
+ }
1096
  }
1097
  }
1098
  }
2110
  'twitter_username' => '',
2111
  'buffer_username' => '',
2112
  'fb_key' => '',
2113
+ 'fb_secret' => ''
 
2114
  ));
2115
 
2116
  // counter options