Version Description
[8 April 2022] = * [Bugfix] Social Login Buttons were not responding with Social Login Buttons add-on active * [Improvement] Code quality improvement
Download this release
Release Info
Developer | the_champ |
Plugin | WordPress Social Share, Social Login and Social Comments Plugin – Super Socializer |
Version | 7.13.32 |
Comparing to | |
See all releases |
Code changes from version 7.13.31 to 7.13.32
- inc/social_sharing.php +5 -5
- readme.txt +9 -1
- super_socializer.php +68 -61
inc/social_sharing.php
CHANGED
@@ -618,7 +618,7 @@ function the_champ_render_sharing($content){
|
|
618 |
if($theChampCounterOptions['horizontal_target_url'] == 'default'){
|
619 |
$counterPostUrl = get_permalink($post->ID);
|
620 |
if((isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING']) || $counterPostUrl == ''){
|
621 |
-
$counterPostUrl =
|
622 |
}
|
623 |
}elseif($theChampCounterOptions['horizontal_target_url'] == 'home'){
|
624 |
$counterPostUrl = esc_url(home_url());
|
@@ -687,10 +687,10 @@ function the_champ_render_sharing($content){
|
|
687 |
if($theChampCounterOptions['vertical_target_url'] == 'default'){
|
688 |
$counterPostUrl = get_permalink($post->ID);
|
689 |
if(!is_singular()){
|
690 |
-
$counterPostUrl =
|
691 |
$postId = 0;
|
692 |
}elseif((isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING']) || $counterPostUrl == ''){
|
693 |
-
$counterPostUrl =
|
694 |
}
|
695 |
}elseif($theChampCounterOptions['vertical_target_url'] == 'home'){
|
696 |
$counterPostUrl = esc_url(home_url());
|
@@ -964,7 +964,7 @@ function the_champ_sharing_count(){
|
|
964 |
if(heateor_ss_validate_url($v) === false){
|
965 |
unset($targetUrls[$k]);
|
966 |
}else{
|
967 |
-
$targetUrls[$k] =
|
968 |
}
|
969 |
}
|
970 |
}else{
|
@@ -1203,7 +1203,7 @@ function the_champ_save_facebook_shares(){
|
|
1203 |
if(isset($_GET['share_counts']) && is_array($_GET['share_counts']) && count($_GET['share_counts']) > 0){
|
1204 |
$targetUrls = $_GET['share_counts'];
|
1205 |
foreach($targetUrls as $k => $v){
|
1206 |
-
$targetUrls[$k] =
|
1207 |
}
|
1208 |
}else{
|
1209 |
the_champ_ajax_response(array('status' => 0, 'message' => __('Invalid request')));
|
618 |
if($theChampCounterOptions['horizontal_target_url'] == 'default'){
|
619 |
$counterPostUrl = get_permalink($post->ID);
|
620 |
if((isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING']) || $counterPostUrl == ''){
|
621 |
+
$counterPostUrl = sanitize_url(the_champ_get_http().$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
|
622 |
}
|
623 |
}elseif($theChampCounterOptions['horizontal_target_url'] == 'home'){
|
624 |
$counterPostUrl = esc_url(home_url());
|
687 |
if($theChampCounterOptions['vertical_target_url'] == 'default'){
|
688 |
$counterPostUrl = get_permalink($post->ID);
|
689 |
if(!is_singular()){
|
690 |
+
$counterPostUrl = sanitize_url(the_champ_get_http().$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
|
691 |
$postId = 0;
|
692 |
}elseif((isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING']) || $counterPostUrl == ''){
|
693 |
+
$counterPostUrl = sanitize_url(the_champ_get_http().$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
|
694 |
}
|
695 |
}elseif($theChampCounterOptions['vertical_target_url'] == 'home'){
|
696 |
$counterPostUrl = esc_url(home_url());
|
964 |
if(heateor_ss_validate_url($v) === false){
|
965 |
unset($targetUrls[$k]);
|
966 |
}else{
|
967 |
+
$targetUrls[$k] = sanitize_url($v);
|
968 |
}
|
969 |
}
|
970 |
}else{
|
1203 |
if(isset($_GET['share_counts']) && is_array($_GET['share_counts']) && count($_GET['share_counts']) > 0){
|
1204 |
$targetUrls = $_GET['share_counts'];
|
1205 |
foreach($targetUrls as $k => $v){
|
1206 |
+
$targetUrls[sanitize_url($k)] = intval($v);
|
1207 |
}
|
1208 |
}else{
|
1209 |
the_champ_ajax_response(array('status' => 0, 'message' => __('Invalid request')));
|
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, dropbox login, foursquare login, disqus login, reddit login, amazon login, stackoverflow login, stack overflow login, discord login, mail.ru login, mailru login, mail ru login, gettr share, parler share
|
5 |
Requires at least: 2.5.0
|
6 |
Tested up to: 5.9.3
|
7 |
-
Stable tag: 7.13.
|
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
|
@@ -213,6 +213,10 @@ Yes, we can help you with it. Just drop an email at support[ at ]heateor[ dot ]c
|
|
213 |
8. **Social Commenting**: Disqus Commenting selected
|
214 |
|
215 |
== Changelog ==
|
|
|
|
|
|
|
|
|
216 |
= 7.13.31 [7 April 2022] =
|
217 |
* [Bugfix] Copy Link share icon was not working
|
218 |
* [Bugfix] Instagram share icon was not redirecting to the Instagram page saved in the options
|
@@ -2415,4 +2419,8 @@ Yes, we can help you with it. Just drop an email at support[ at ]heateor[ dot ]c
|
|
2415 |
* [New] Added Youtube icon in the list of existing social share networks
|
2416 |
* [Improvement] Google login now prompts users to select which google account to choose to login
|
2417 |
* [Improvement] Google login was not working in some cases because of the space between the two scopes being used in the authorization URL
|
|
|
|
|
|
|
|
|
2418 |
* [Improvement] Code quality improvement
|
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, dropbox login, foursquare login, disqus login, reddit login, amazon login, stackoverflow login, stack overflow login, discord login, mail.ru login, mailru login, mail ru login, gettr share, parler share
|
5 |
Requires at least: 2.5.0
|
6 |
Tested up to: 5.9.3
|
7 |
+
Stable tag: 7.13.32
|
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
|
213 |
8. **Social Commenting**: Disqus Commenting selected
|
214 |
|
215 |
== Changelog ==
|
216 |
+
= 7.13.32 [8 April 2022] =
|
217 |
+
* [Bugfix] Social Login Buttons were not responding with <a target="_blank" href="https://www.heateor.com/social-login-buttons/">Social Login Buttons</a> add-on active
|
218 |
+
* [Improvement] Code quality improvement
|
219 |
+
|
220 |
= 7.13.31 [7 April 2022] =
|
221 |
* [Bugfix] Copy Link share icon was not working
|
222 |
* [Bugfix] Instagram share icon was not redirecting to the Instagram page saved in the options
|
2419 |
* [New] Added Youtube icon in the list of existing social share networks
|
2420 |
* [Improvement] Google login now prompts users to select which google account to choose to login
|
2421 |
* [Improvement] Google login was not working in some cases because of the space between the two scopes being used in the authorization URL
|
2422 |
+
* [Improvement] Code quality improvement
|
2423 |
+
|
2424 |
+
= 7.13.32 [8 April 2022] =
|
2425 |
+
* [Bugfix] Social Login Buttons were not responding with <a target="_blank" href="https://www.heateor.com/social-login-buttons/">Social Login Buttons</a> add-on active
|
2426 |
* [Improvement] Code quality improvement
|
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.
|
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.
|
15 |
|
16 |
// attributes to allow in the HTML of the social share and social media follow icons
|
17 |
$heateorSsDefaultAttribs = array(
|
@@ -38,6 +38,9 @@ $heateorSsAllowedTags = array(
|
|
38 |
'data-action' => array(),
|
39 |
'data-show-faces' => array(),
|
40 |
'data-share' => array(),
|
|
|
|
|
|
|
41 |
) ),
|
42 |
'span' => array_merge( $heateorSsDefaultAttribs, array(
|
43 |
'onClick' => array(),
|
@@ -90,7 +93,11 @@ $heateorSsAllowedTags = array(
|
|
90 |
'b' => $heateorSsDefaultAttribs,
|
91 |
'ul' => $heateorSsDefaultAttribs,
|
92 |
'ol' => $heateorSsDefaultAttribs,
|
93 |
-
'li'
|
|
|
|
|
|
|
|
|
94 |
'br' => $heateorSsDefaultAttribs,
|
95 |
'hr' => $heateorSsDefaultAttribs,
|
96 |
'strong' => $heateorSsDefaultAttribs,
|
@@ -299,7 +306,7 @@ function the_champ_connect(){
|
|
299 |
}
|
300 |
}
|
301 |
|
302 |
-
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(
|
303 |
$postData = array(
|
304 |
'client_id' => $theChampLoginOptions['insta_id'],
|
305 |
'client_secret' => $theChampLoginOptions['insta_app_secret'],
|
@@ -329,7 +336,7 @@ function the_champ_connect(){
|
|
329 |
|
330 |
if(is_object($profileData) && isset($profileData->id)){
|
331 |
$profileData = the_champ_sanitize_profile_data($profileData, 'instagram');
|
332 |
-
$instagramLoginState =
|
333 |
$instagramRedirectUrl = get_user_meta($instagramLoginState, 'super_socializer_redirect_to', true);
|
334 |
$response = the_champ_user_auth($profileData, 'instagram', $instagramRedirectUrl);
|
335 |
if($response == 'show form'){
|
@@ -402,11 +409,11 @@ function the_champ_connect(){
|
|
402 |
wp_redirect('https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id='.$theChampLoginOptions['li_key'].'&redirect_uri='.urlencode(home_url().'/?SuperSocializerAuth=Linkedin').'&state='. $linkedinAuthState .'&scope='.$linkedinScope);
|
403 |
die;
|
404 |
}
|
405 |
-
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(
|
406 |
$url = 'https://www.linkedin.com/oauth/v2/accessToken';
|
407 |
$data_access_token = array(
|
408 |
'grant_type' => 'authorization_code',
|
409 |
-
'code' =>
|
410 |
'redirect_uri' => home_url().'/?SuperSocializerAuth=Linkedin',
|
411 |
'client_id' => $theChampLoginOptions['li_key'],
|
412 |
'client_secret' => $theChampLoginOptions['li_secret']
|
@@ -458,7 +465,7 @@ function the_champ_connect(){
|
|
458 |
);
|
459 |
|
460 |
$profileData = the_champ_sanitize_profile_data($user, 'linkedin');
|
461 |
-
$linkedinAuthState =
|
462 |
if(get_user_meta($linkedinAuthState, 'heateor_ss_linkedin_mc_sub', true)){
|
463 |
$profileData['mc_subscribe'] = 1;
|
464 |
delete_user_meta($linkedinAuthState, 'heateor_ss_linkedin_mc_sub');
|
@@ -565,10 +572,10 @@ function the_champ_connect(){
|
|
565 |
die;
|
566 |
}
|
567 |
}
|
568 |
-
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(
|
569 |
$postData = array(
|
570 |
'grant_type' => 'authorization_code',
|
571 |
-
'code' =>
|
572 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Mailru"
|
573 |
);
|
574 |
$serviceUrl = 'https://oauth.mail.ru/token';
|
@@ -602,7 +609,7 @@ function the_champ_connect(){
|
|
602 |
|
603 |
if(is_object($profileData) && isset($profileData->id)){
|
604 |
$profileData = the_champ_sanitize_profile_data($profileData, 'mailru');
|
605 |
-
$mailruLoginState =
|
606 |
$mailruRedirectUrl = get_user_meta($mailruLoginState, 'super_socializer_redirect_to', true);
|
607 |
$response = the_champ_user_auth($profileData, 'mailru', $mailruRedirectUrl);
|
608 |
if($response == 'show form'){
|
@@ -639,10 +646,10 @@ function the_champ_connect(){
|
|
639 |
}
|
640 |
}
|
641 |
|
642 |
-
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(
|
643 |
$postData = array(
|
644 |
'grant_type' => 'authorization_code',
|
645 |
-
'code' =>
|
646 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Yahoo",
|
647 |
'client_id' => $theChampLoginOptions['yahoo_channel_id'],
|
648 |
'client_secret' => $theChampLoginOptions['yahoo_channel_secret']
|
@@ -669,7 +676,7 @@ function the_champ_connect(){
|
|
669 |
|
670 |
if(is_object($profileData) && isset($profileData->sub)){
|
671 |
$profileData = the_champ_sanitize_profile_data($profileData, 'yahoo');
|
672 |
-
$yahooLoginState =
|
673 |
$yahooRedirectUrl = get_user_meta($yahooLoginState, 'super_socializer_redirect_to', true);
|
674 |
$response = the_champ_user_auth($profileData, 'yahoo', $yahooRedirectUrl);
|
675 |
if($response == 'show form'){
|
@@ -709,7 +716,7 @@ function the_champ_connect(){
|
|
709 |
if(isset($_GET['code']) && isset($_GET['state']) && remove_query_arg(array('code', 'scope', 'state'), esc_url_raw(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])) == home_url().'/SuperSocializerAuth/Discord'){
|
710 |
$postData = array(
|
711 |
'grant_type' => 'authorization_code',
|
712 |
-
'code' =>
|
713 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Discord",
|
714 |
'client_id' => $theChampLoginOptions['discord_channel_id'],
|
715 |
'client_secret' => $theChampLoginOptions['discord_channel_secret'],
|
@@ -736,7 +743,7 @@ function the_champ_connect(){
|
|
736 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
737 |
if(is_object($profileData) && isset($profileData->id) && isset($profileData->verified) && $profileData->verified == 1){
|
738 |
$profileData = the_champ_sanitize_profile_data($profileData, 'discord');
|
739 |
-
$discordLoginState =
|
740 |
$discordRedirectUrl = get_user_meta($discordLoginState, 'super_socializer_redirect_to', true);
|
741 |
$response = the_champ_user_auth($profileData, 'discord', $discordRedirectUrl);
|
742 |
if($response == 'show form'){
|
@@ -772,10 +779,10 @@ function the_champ_connect(){
|
|
772 |
die;
|
773 |
}
|
774 |
}
|
775 |
-
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(
|
776 |
$postData = array(
|
777 |
'grant_type' => 'authorization_code',
|
778 |
-
'code' =>
|
779 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Wordpress",
|
780 |
'client_id' => $theChampLoginOptions['wordpress_client_id'],
|
781 |
'client_secret' => $theChampLoginOptions['wordpress_client_secret']
|
@@ -802,7 +809,7 @@ function the_champ_connect(){
|
|
802 |
|
803 |
if(is_object($profileData) && isset($profileData->ID)){
|
804 |
$profileData = the_champ_sanitize_profile_data($profileData, 'wordpress');
|
805 |
-
$wordpressLoginState =
|
806 |
$wordpressRedirectUrl = get_user_meta($wordpressLoginState, 'super_socializer_redirect_to', true);
|
807 |
$response = the_champ_user_auth($profileData, 'wordpress', $wordpressRedirectUrl);
|
808 |
if($response == 'show form'){
|
@@ -837,10 +844,10 @@ function the_champ_connect(){
|
|
837 |
die;
|
838 |
}
|
839 |
}
|
840 |
-
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(
|
841 |
$postData = array(
|
842 |
'grant_type' => 'authorization_code',
|
843 |
-
'code' =>
|
844 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Live",
|
845 |
'client_id' => $theChampLoginOptions['live_channel_id'],
|
846 |
'client_secret' => $theChampLoginOptions['live_channel_secret']
|
@@ -865,7 +872,7 @@ function the_champ_connect(){
|
|
865 |
|
866 |
if(is_object($profileData) && isset($profileData->id)){
|
867 |
$profileData = the_champ_sanitize_profile_data($profileData, 'microsoft');
|
868 |
-
$liveLoginState =
|
869 |
$liveRedirectUrl = get_user_meta($liveLoginState, 'super_socializer_redirect_to', true);
|
870 |
$response = the_champ_user_auth($profileData, 'microsoft', $liveRedirectUrl);
|
871 |
if($response == 'show form'){
|
@@ -903,10 +910,10 @@ function the_champ_connect(){
|
|
903 |
}
|
904 |
}
|
905 |
|
906 |
-
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(
|
907 |
$postData = array(
|
908 |
'grant_type' => 'authorization_code',
|
909 |
-
'code' =>
|
910 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Twitch",
|
911 |
'client_id' => $theChampLoginOptions['twitch_client_id'],
|
912 |
'client_secret' => $theChampLoginOptions['twitch_client_secret']
|
@@ -933,7 +940,7 @@ function the_champ_connect(){
|
|
933 |
|
934 |
if(is_object($profileData) && isset($profileData->data) && is_array($profileData->data) && isset($profileData->data[0]) && isset($profileData->data[0]->id)){
|
935 |
$profileData = the_champ_sanitize_profile_data($profileData->data[0], 'twitch');
|
936 |
-
$twitchLoginState =
|
937 |
$twitchRedirectUrl = get_user_meta($twitchLoginState, 'super_socializer_redirect_to', true);
|
938 |
$response = the_champ_user_auth($profileData, 'twitch', $twitchRedirectUrl);
|
939 |
if($response == 'show form'){
|
@@ -967,14 +974,14 @@ function the_champ_connect(){
|
|
967 |
die;
|
968 |
}
|
969 |
}
|
970 |
-
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(
|
971 |
'code',
|
972 |
'state',
|
973 |
'scope'
|
974 |
), esc_url_raw(the_champ_get_http() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"])) == home_url() . '/SuperSocializerAuth/Reddit'){
|
975 |
$postData = array(
|
976 |
'grant_type' => 'authorization_code',
|
977 |
-
'code' =>
|
978 |
'redirect_uri' => home_url() . "/SuperSocializerAuth/Reddit",
|
979 |
'client_id' => $theChampLoginOptions['reddit_client_id'],
|
980 |
'client_secret' => $theChampLoginOptions['reddit_client_secret']
|
@@ -1002,7 +1009,7 @@ function the_champ_connect(){
|
|
1002 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1003 |
if(is_object($profileData) && isset($profileData->id) && isset($profileData->verified) && $profileData->verified == 1){
|
1004 |
$profileData = the_champ_sanitize_profile_data($profileData, 'reddit');
|
1005 |
-
$redditLoginState =
|
1006 |
$redditRedirectUrl = get_user_meta($redditLoginState, 'super_socializer_redirect_to', true);
|
1007 |
$response = the_champ_user_auth($profileData, 'reddit', $redditRedirectUrl);
|
1008 |
if($response == 'show form'){
|
@@ -1035,14 +1042,14 @@ function the_champ_connect(){
|
|
1035 |
die;
|
1036 |
}
|
1037 |
}
|
1038 |
-
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(
|
1039 |
'code',
|
1040 |
'scope',
|
1041 |
'state'
|
1042 |
), esc_url_raw(the_champ_get_http() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"])) == home_url() . '/SuperSocializerAuth/Disqus'){
|
1043 |
$postData = array(
|
1044 |
'grant_type' => 'authorization_code',
|
1045 |
-
'code' =>
|
1046 |
'redirect_uri' => home_url() . "/SuperSocializerAuth/Disqus",
|
1047 |
'client_id' => $theChampLoginOptions['disqus_public_key'],
|
1048 |
'client_secret' => $theChampLoginOptions['disqus_secret_key']
|
@@ -1070,7 +1077,7 @@ function the_champ_connect(){
|
|
1070 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1071 |
if(is_object($profileData) && isset($profileData->response->id)){
|
1072 |
$profileData = the_champ_sanitize_profile_data($profileData, 'disqus');
|
1073 |
-
$disqusLoginState =
|
1074 |
$disqusRedirectUrl = get_user_meta($disqusLoginState, 'super_socializer_redirect_to', true);
|
1075 |
$response = the_champ_user_auth($profileData, 'disqus', $disqusRedirectUrl);
|
1076 |
if($response == 'show form'){
|
@@ -1104,14 +1111,14 @@ function the_champ_connect(){
|
|
1104 |
die;
|
1105 |
}
|
1106 |
}
|
1107 |
-
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(
|
1108 |
'code',
|
1109 |
'scope',
|
1110 |
'state'
|
1111 |
), esc_url_raw(the_champ_get_http() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"])) == home_url() . '/SuperSocializerAuth/Dropbox'){
|
1112 |
$postData = array(
|
1113 |
'grant_type' => 'authorization_code',
|
1114 |
-
'code' =>
|
1115 |
'redirect_uri' => home_url() . "/SuperSocializerAuth/Dropbox"
|
1116 |
);
|
1117 |
$response = wp_remote_post("https://api.dropbox.com/1/oauth2/token", array(
|
@@ -1140,7 +1147,7 @@ function the_champ_connect(){
|
|
1140 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1141 |
if(is_object($profileData) && isset($profileData->account_id)){
|
1142 |
$profileData = the_champ_sanitize_profile_data($profileData, 'dropbox');
|
1143 |
-
$dropboxLoginState =
|
1144 |
$dropboxRedirectUrl = get_user_meta($dropboxLoginState, 'super_socializer_redirect_to', true);
|
1145 |
$response = the_champ_user_auth($profileData, 'dropbox', $dropboxRedirectUrl);
|
1146 |
if($response == 'show form'){
|
@@ -1174,12 +1181,12 @@ function the_champ_connect(){
|
|
1174 |
die;
|
1175 |
}
|
1176 |
}
|
1177 |
-
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(
|
1178 |
'code', 'state'
|
1179 |
), esc_url_raw(the_champ_get_http() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"])) == home_url() . '/SuperSocializerAuth/Foursquare'){
|
1180 |
$postData = array(
|
1181 |
'grant_type' => 'authorization_code',
|
1182 |
-
'code' =>
|
1183 |
'redirect_uri' => home_url() . "/SuperSocializerAuth/Foursquare",
|
1184 |
'client_id' => $theChampLoginOptions['foursquare_client_id'],
|
1185 |
'client_secret' => $theChampLoginOptions['foursquare_client_secret']
|
@@ -1208,7 +1215,7 @@ function the_champ_connect(){
|
|
1208 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1209 |
if(is_object($profileData) && isset($profileData->response->user->id)){
|
1210 |
$profileData = the_champ_sanitize_profile_data($profileData, 'foursquare');
|
1211 |
-
$foursquareLoginState =
|
1212 |
$foursquareRedirectUrl = get_user_meta($foursquareLoginState, 'super_socializer_redirect_to', true);
|
1213 |
$response = the_champ_user_auth($profileData, 'foursquare', $foursquareRedirectUrl);
|
1214 |
if($response == 'show form'){
|
@@ -1244,10 +1251,10 @@ function the_champ_connect(){
|
|
1244 |
}
|
1245 |
}
|
1246 |
|
1247 |
-
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(
|
1248 |
$postData = array(
|
1249 |
'grant_type' => 'authorization_code',
|
1250 |
-
'code' =>
|
1251 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Dribbble",
|
1252 |
'client_id' => $theChampLoginOptions['dribbble_client_id'],
|
1253 |
'client_secret' => $theChampLoginOptions['dribbble_client_secret']
|
@@ -1273,7 +1280,7 @@ function the_champ_connect(){
|
|
1273 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1274 |
if(is_object($profileData) && isset($profileData->id)){
|
1275 |
$profileData = the_champ_sanitize_profile_data($profileData, 'dribbble');
|
1276 |
-
$dribbbleLoginState =
|
1277 |
$dribbbleRedirectUrl = get_user_meta($dribbbleLoginState, 'super_socializer_redirect_to', true);
|
1278 |
$response = the_champ_user_auth($profileData, 'dribbble', $dribbbleRedirectUrl);
|
1279 |
if($response == 'show form'){
|
@@ -1308,10 +1315,10 @@ function the_champ_connect(){
|
|
1308 |
die;
|
1309 |
}
|
1310 |
}
|
1311 |
-
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(
|
1312 |
$postData = array(
|
1313 |
'grant_type' => 'authorization_code',
|
1314 |
-
'code' =>
|
1315 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Spotify",
|
1316 |
'client_id' => $theChampLoginOptions['spotify_client_id'],
|
1317 |
'client_secret' => $theChampLoginOptions['spotify_client_secret']
|
@@ -1336,7 +1343,7 @@ function the_champ_connect(){
|
|
1336 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1337 |
if(is_object($profileData) && isset($profileData->id)){
|
1338 |
$profileData = the_champ_sanitize_profile_data($profileData, 'spotify');
|
1339 |
-
$spotifyLoginState =
|
1340 |
$spotifyRedirectUrl = get_user_meta($spotifyLoginState, 'super_socializer_redirect_to', true);
|
1341 |
$response = the_champ_user_auth($profileData, 'spotify', $spotifyRedirectUrl);
|
1342 |
if($response == 'show form'){
|
@@ -1372,10 +1379,10 @@ function the_champ_connect(){
|
|
1372 |
die;
|
1373 |
}
|
1374 |
}
|
1375 |
-
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(
|
1376 |
$postData = array(
|
1377 |
'grant_type' => 'authorization_code',
|
1378 |
-
'code' =>
|
1379 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Kakao",
|
1380 |
'client_id' => $theChampLoginOptions['kakao_client_id'],
|
1381 |
'client_secret' => $theChampLoginOptions['kakao_client_secret']
|
@@ -1400,7 +1407,7 @@ function the_champ_connect(){
|
|
1400 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1401 |
if(is_object($profileData) && isset($profileData->id)){
|
1402 |
$profileData = the_champ_sanitize_profile_data($profileData, 'kakao');
|
1403 |
-
$kakaoLoginState =
|
1404 |
$kakaoRedirectUrl = get_user_meta($kakaoLoginState, 'super_socializer_redirect_to', true);
|
1405 |
$response = the_champ_user_auth($profileData, 'kakao', $kakaoRedirectUrl);
|
1406 |
if($response == 'show form'){
|
@@ -1436,10 +1443,10 @@ function the_champ_connect(){
|
|
1436 |
die;
|
1437 |
}
|
1438 |
}
|
1439 |
-
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(
|
1440 |
$postData = array(
|
1441 |
'state' => 'state',
|
1442 |
-
'code' =>
|
1443 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Github",
|
1444 |
'client_id' => $theChampLoginOptions['github_client_id'],
|
1445 |
'client_secret' => $theChampLoginOptions['github_client_secret']
|
@@ -1480,7 +1487,7 @@ function the_champ_connect(){
|
|
1480 |
}
|
1481 |
}
|
1482 |
$profileData = the_champ_sanitize_profile_data($profileData, 'github');
|
1483 |
-
$githubLoginState =
|
1484 |
$githubRedirectUrl = get_user_meta($githubLoginState, 'super_socializer_redirect_to', true);
|
1485 |
$response = the_champ_user_auth($profileData, 'github', $githubRedirectUrl);
|
1486 |
if($response == 'show form'){
|
@@ -1514,9 +1521,9 @@ function the_champ_connect(){
|
|
1514 |
update_user_meta($facebookLoginState, 'super_socializer_redirect_to', isset($_GET['super_socializer_redirect_to']) ? esc_url(trim($_GET['super_socializer_redirect_to'])) : home_url());
|
1515 |
wp_redirect("https://www.facebook.com/v10.0/dialog/oauth?scope=email&client_id=" . $theChampLoginOptions['fb_key'] . "&state=" . $facebookLoginState . "&redirect_uri=" . home_url() . "/?SuperSocializerAuth=Facebook");
|
1516 |
die;
|
1517 |
-
}elseif(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(
|
1518 |
$postData = array(
|
1519 |
-
'code' =>
|
1520 |
'redirect_uri' => home_url() . "/?SuperSocializerAuth=Facebook",
|
1521 |
'client_id' => $theChampLoginOptions['fb_key'],
|
1522 |
'client_secret' => $theChampLoginOptions['fb_secret']
|
@@ -1542,7 +1549,7 @@ function the_champ_connect(){
|
|
1542 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1543 |
if(is_object($profileData) && isset($profileData->id)){
|
1544 |
$profileData = the_champ_sanitize_profile_data($profileData, 'facebook');
|
1545 |
-
$facebookLoginState =
|
1546 |
$facebook_redirect_url = get_user_meta($facebookLoginState, 'super_socializer_redirect_to', true);
|
1547 |
delete_user_meta($facebookLoginState, 'super_socializer_redirect_to');
|
1548 |
$response = the_champ_user_auth($profileData, 'faceboook', $facebook_redirect_url);
|
@@ -1581,10 +1588,10 @@ function the_champ_connect(){
|
|
1581 |
die;
|
1582 |
}
|
1583 |
}
|
1584 |
-
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(
|
1585 |
$postData = array(
|
1586 |
'grant_type' => 'authorization_code',
|
1587 |
-
'code' =>
|
1588 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Amazon",
|
1589 |
'client_id' => $theChampLoginOptions['amazon_client_id'],
|
1590 |
'client_secret' => $theChampLoginOptions['amazon_client_secret']
|
@@ -1608,7 +1615,7 @@ function the_champ_connect(){
|
|
1608 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1609 |
if(is_object($profileData) && isset($profileData->user_id)){
|
1610 |
$profileData = the_champ_sanitize_profile_data($profileData, 'amazon');
|
1611 |
-
$amazonLoginState =
|
1612 |
$amazonRedirectUrl = get_user_meta($amazonLoginState, 'super_socializer_redirect_to', true);
|
1613 |
$response = the_champ_user_auth($profileData, 'amazon', $amazonRedirectUrl);
|
1614 |
if($response == 'show form'){
|
@@ -1646,7 +1653,7 @@ function the_champ_connect(){
|
|
1646 |
if(isset($_GET['code']) && isset($_GET['state']) && remove_query_arg(array('code','scope','state'), esc_url_raw(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])) == home_url().'/SuperSocializerAuth/Stackoverflow'){
|
1647 |
$postData = array(
|
1648 |
'grant_type' => 'authorization_code',
|
1649 |
-
'code' =>
|
1650 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Stackoverflow",
|
1651 |
'client_id' => $theChampLoginOptions['stackoverflow_client_id'],
|
1652 |
'client_secret' => $theChampLoginOptions['stackoverflow_client_secret']
|
@@ -1676,7 +1683,7 @@ function the_champ_connect(){
|
|
1676 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1677 |
if(is_object($profileData) && isset($profileData->items[0]->account_id)){
|
1678 |
$profileData = the_champ_sanitize_profile_data($profileData->items[0], 'stackoverflow');
|
1679 |
-
$stackoverflowLoginState =
|
1680 |
$stackoverflowRedirectUrl = get_user_meta($stackoverflowLoginState, 'super_socializer_redirect_to', true);
|
1681 |
$response = the_champ_user_auth($profileData, 'stackoverflow', $stackoverflowRedirectUrl);
|
1682 |
if($response == 'show form'){
|
@@ -1710,10 +1717,10 @@ function the_champ_connect(){
|
|
1710 |
}
|
1711 |
}
|
1712 |
if(isset($_GET['code']) && isset($_GET['state'])){
|
1713 |
-
if(get_user_meta(
|
1714 |
$postData = array(
|
1715 |
'grant_type' => 'authorization_code',
|
1716 |
-
'code' =>
|
1717 |
'redirect_uri' => home_url(),
|
1718 |
'client_id' => $theChampLoginOptions['google_key'],
|
1719 |
'client_secret' => $theChampLoginOptions['google_secret']
|
@@ -1744,7 +1751,7 @@ function the_champ_connect(){
|
|
1744 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1745 |
if(is_object($profileData) && isset($profileData->sub)){
|
1746 |
$profileData = the_champ_sanitize_profile_data($profileData, 'google');
|
1747 |
-
$googleLoginState =
|
1748 |
$googleRedirectUrl = get_user_meta($googleLoginState, 'super_socializer_redirect_to', true);
|
1749 |
$response = the_champ_user_auth($profileData, 'google', $googleRedirectUrl);
|
1750 |
if($response == 'show form'){
|
@@ -2108,7 +2115,7 @@ function the_champ_frontend_scripts(){
|
|
2108 |
// Facebook scripts
|
2109 |
if(the_champ_facebook_plugin_enabled()){
|
2110 |
?>
|
2111 |
-
<script> var theChampFBKey = '<?php echo esc_js($fbKey) ?>', theChampFBLang = '<?php echo (isset($theChampFacebookOptions["comment_lang"]) && $theChampFacebookOptions["comment_lang"] != '') ? esc_js($theChampFacebookOptions["comment_lang"]) : esc_js(get_locale()) ?>', theChampFbLikeMycred = <?php echo defined('HEATEOR_SOCIAL_SHARE_MYCRED_INTEGRATION_VERSION') && the_champ_facebook_like_rec_enabled() ? 1 : 0 ?>, theChampSsga = <?php echo defined('HEATEOR_SHARING_GOOGLE_ANALYTICS_VERSION') ? 1 : 0 ?>, theChampCommentNotification = <?php echo (defined('HEATEOR_FB_COM_NOT_VERSION') && version_compare('1.1.4', HEATEOR_FB_COM_NOT_VERSION) > 0) || function_exists('heateor_ss_check_querystring') || function_exists('the_champ_check_querystring') ? 1 : 0; ?>, theChampHeateorFcmRecentComments = <?php echo defined('HEATEOR_FB_COM_MOD_VERSION') && HEATEOR_FB_COM_MOD_VERSION == '1.1.4' ? 1 : 0 ?>, theChampFbIosLogin = <?php echo !is_user_logged_in() && isset($_GET['code']) &&
|
2112 |
<?php
|
2113 |
add_action('wp_footer', 'the_champ_fb_root_div');
|
2114 |
if(!$combinedScript){
|
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.32
|
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.32');
|
15 |
|
16 |
// attributes to allow in the HTML of the social share and social media follow icons
|
17 |
$heateorSsDefaultAttribs = array(
|
38 |
'data-action' => array(),
|
39 |
'data-show-faces' => array(),
|
40 |
'data-share' => array(),
|
41 |
+
'onClick' => array(),
|
42 |
+
'onclick' => array(),
|
43 |
+
'alt' => array(),
|
44 |
) ),
|
45 |
'span' => array_merge( $heateorSsDefaultAttribs, array(
|
46 |
'onClick' => array(),
|
93 |
'b' => $heateorSsDefaultAttribs,
|
94 |
'ul' => $heateorSsDefaultAttribs,
|
95 |
'ol' => $heateorSsDefaultAttribs,
|
96 |
+
'li' => array_merge( $heateorSsDefaultAttribs, array(
|
97 |
+
'alt' => array(),
|
98 |
+
'onclick' => array(),
|
99 |
+
'onClick' => array(),
|
100 |
+
) ),
|
101 |
'br' => $heateorSsDefaultAttribs,
|
102 |
'hr' => $heateorSsDefaultAttribs,
|
103 |
'strong' => $heateorSsDefaultAttribs,
|
306 |
}
|
307 |
}
|
308 |
|
309 |
+
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) !== false && remove_query_arg(array('code', 'state'), esc_url_raw(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])) == home_url().'/SuperSocializerAuth/Instagram'){
|
310 |
$postData = array(
|
311 |
'client_id' => $theChampLoginOptions['insta_id'],
|
312 |
'client_secret' => $theChampLoginOptions['insta_app_secret'],
|
336 |
|
337 |
if(is_object($profileData) && isset($profileData->id)){
|
338 |
$profileData = the_champ_sanitize_profile_data($profileData, 'instagram');
|
339 |
+
$instagramLoginState = sanitize_text_field($_GET['state']);
|
340 |
$instagramRedirectUrl = get_user_meta($instagramLoginState, 'super_socializer_redirect_to', true);
|
341 |
$response = the_champ_user_auth($profileData, 'instagram', $instagramRedirectUrl);
|
342 |
if($response == 'show form'){
|
409 |
wp_redirect('https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id='.$theChampLoginOptions['li_key'].'&redirect_uri='.urlencode(home_url().'/?SuperSocializerAuth=Linkedin').'&state='. $linkedinAuthState .'&scope='.$linkedinScope);
|
410 |
die;
|
411 |
}
|
412 |
+
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) !== false){
|
413 |
$url = 'https://www.linkedin.com/oauth/v2/accessToken';
|
414 |
$data_access_token = array(
|
415 |
'grant_type' => 'authorization_code',
|
416 |
+
'code' => sanitize_text_field($_GET['code']),
|
417 |
'redirect_uri' => home_url().'/?SuperSocializerAuth=Linkedin',
|
418 |
'client_id' => $theChampLoginOptions['li_key'],
|
419 |
'client_secret' => $theChampLoginOptions['li_secret']
|
465 |
);
|
466 |
|
467 |
$profileData = the_champ_sanitize_profile_data($user, 'linkedin');
|
468 |
+
$linkedinAuthState = sanitize_text_field($_GET['state']);
|
469 |
if(get_user_meta($linkedinAuthState, 'heateor_ss_linkedin_mc_sub', true)){
|
470 |
$profileData['mc_subscribe'] = 1;
|
471 |
delete_user_meta($linkedinAuthState, 'heateor_ss_linkedin_mc_sub');
|
572 |
die;
|
573 |
}
|
574 |
}
|
575 |
+
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) && remove_query_arg(array('code', 'state'), esc_url_raw(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])) == home_url().'/SuperSocializerAuth/Mailru'){
|
576 |
$postData = array(
|
577 |
'grant_type' => 'authorization_code',
|
578 |
+
'code' => sanitize_text_field($_GET['code']),
|
579 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Mailru"
|
580 |
);
|
581 |
$serviceUrl = 'https://oauth.mail.ru/token';
|
609 |
|
610 |
if(is_object($profileData) && isset($profileData->id)){
|
611 |
$profileData = the_champ_sanitize_profile_data($profileData, 'mailru');
|
612 |
+
$mailruLoginState = sanitize_text_field($_GET['state']);
|
613 |
$mailruRedirectUrl = get_user_meta($mailruLoginState, 'super_socializer_redirect_to', true);
|
614 |
$response = the_champ_user_auth($profileData, 'mailru', $mailruRedirectUrl);
|
615 |
if($response == 'show form'){
|
646 |
}
|
647 |
}
|
648 |
|
649 |
+
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) !== false && remove_query_arg(array('code', 'state'), esc_url_raw(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])) == home_url().'/SuperSocializerAuth/Yahoo'){
|
650 |
$postData = array(
|
651 |
'grant_type' => 'authorization_code',
|
652 |
+
'code' => sanitize_text_field($_GET['code']),
|
653 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Yahoo",
|
654 |
'client_id' => $theChampLoginOptions['yahoo_channel_id'],
|
655 |
'client_secret' => $theChampLoginOptions['yahoo_channel_secret']
|
676 |
|
677 |
if(is_object($profileData) && isset($profileData->sub)){
|
678 |
$profileData = the_champ_sanitize_profile_data($profileData, 'yahoo');
|
679 |
+
$yahooLoginState = sanitize_text_field($_GET['state']);
|
680 |
$yahooRedirectUrl = get_user_meta($yahooLoginState, 'super_socializer_redirect_to', true);
|
681 |
$response = the_champ_user_auth($profileData, 'yahoo', $yahooRedirectUrl);
|
682 |
if($response == 'show form'){
|
716 |
if(isset($_GET['code']) && isset($_GET['state']) && remove_query_arg(array('code', 'scope', 'state'), esc_url_raw(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])) == home_url().'/SuperSocializerAuth/Discord'){
|
717 |
$postData = array(
|
718 |
'grant_type' => 'authorization_code',
|
719 |
+
'code' => sanitize_text_field($_GET['code']),
|
720 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Discord",
|
721 |
'client_id' => $theChampLoginOptions['discord_channel_id'],
|
722 |
'client_secret' => $theChampLoginOptions['discord_channel_secret'],
|
743 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
744 |
if(is_object($profileData) && isset($profileData->id) && isset($profileData->verified) && $profileData->verified == 1){
|
745 |
$profileData = the_champ_sanitize_profile_data($profileData, 'discord');
|
746 |
+
$discordLoginState = sanitize_text_field($_GET['state']);
|
747 |
$discordRedirectUrl = get_user_meta($discordLoginState, 'super_socializer_redirect_to', true);
|
748 |
$response = the_champ_user_auth($profileData, 'discord', $discordRedirectUrl);
|
749 |
if($response == 'show form'){
|
779 |
die;
|
780 |
}
|
781 |
}
|
782 |
+
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) !== false && remove_query_arg(array('code','state'), esc_url_raw(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])) == home_url().'/SuperSocializerAuth/Wordpress'){
|
783 |
$postData = array(
|
784 |
'grant_type' => 'authorization_code',
|
785 |
+
'code' => sanitize_text_field($_GET['code']),
|
786 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Wordpress",
|
787 |
'client_id' => $theChampLoginOptions['wordpress_client_id'],
|
788 |
'client_secret' => $theChampLoginOptions['wordpress_client_secret']
|
809 |
|
810 |
if(is_object($profileData) && isset($profileData->ID)){
|
811 |
$profileData = the_champ_sanitize_profile_data($profileData, 'wordpress');
|
812 |
+
$wordpressLoginState = sanitize_text_field($_GET['state']);
|
813 |
$wordpressRedirectUrl = get_user_meta($wordpressLoginState, 'super_socializer_redirect_to', true);
|
814 |
$response = the_champ_user_auth($profileData, 'wordpress', $wordpressRedirectUrl);
|
815 |
if($response == 'show form'){
|
844 |
die;
|
845 |
}
|
846 |
}
|
847 |
+
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) !== false && remove_query_arg(array('code', 'state'), esc_url_raw(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])) == home_url().'/SuperSocializerAuth/Live'){
|
848 |
$postData = array(
|
849 |
'grant_type' => 'authorization_code',
|
850 |
+
'code' => sanitize_text_field($_GET['code']),
|
851 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Live",
|
852 |
'client_id' => $theChampLoginOptions['live_channel_id'],
|
853 |
'client_secret' => $theChampLoginOptions['live_channel_secret']
|
872 |
|
873 |
if(is_object($profileData) && isset($profileData->id)){
|
874 |
$profileData = the_champ_sanitize_profile_data($profileData, 'microsoft');
|
875 |
+
$liveLoginState = sanitize_text_field($_GET['state']);
|
876 |
$liveRedirectUrl = get_user_meta($liveLoginState, 'super_socializer_redirect_to', true);
|
877 |
$response = the_champ_user_auth($profileData, 'microsoft', $liveRedirectUrl);
|
878 |
if($response == 'show form'){
|
910 |
}
|
911 |
}
|
912 |
|
913 |
+
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) !== false && remove_query_arg(array('code', 'scope', 'state'), esc_url_raw(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])) == home_url().'/SuperSocializerAuth/Twitch'){
|
914 |
$postData = array(
|
915 |
'grant_type' => 'authorization_code',
|
916 |
+
'code' => sanitize_text_field($_GET['code']),
|
917 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Twitch",
|
918 |
'client_id' => $theChampLoginOptions['twitch_client_id'],
|
919 |
'client_secret' => $theChampLoginOptions['twitch_client_secret']
|
940 |
|
941 |
if(is_object($profileData) && isset($profileData->data) && is_array($profileData->data) && isset($profileData->data[0]) && isset($profileData->data[0]->id)){
|
942 |
$profileData = the_champ_sanitize_profile_data($profileData->data[0], 'twitch');
|
943 |
+
$twitchLoginState = sanitize_text_field($_GET['state']);
|
944 |
$twitchRedirectUrl = get_user_meta($twitchLoginState, 'super_socializer_redirect_to', true);
|
945 |
$response = the_champ_user_auth($profileData, 'twitch', $twitchRedirectUrl);
|
946 |
if($response == 'show form'){
|
974 |
die;
|
975 |
}
|
976 |
}
|
977 |
+
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) !== false && remove_query_arg(array(
|
978 |
'code',
|
979 |
'state',
|
980 |
'scope'
|
981 |
), esc_url_raw(the_champ_get_http() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"])) == home_url() . '/SuperSocializerAuth/Reddit'){
|
982 |
$postData = array(
|
983 |
'grant_type' => 'authorization_code',
|
984 |
+
'code' => sanitize_text_field($_GET['code']),
|
985 |
'redirect_uri' => home_url() . "/SuperSocializerAuth/Reddit",
|
986 |
'client_id' => $theChampLoginOptions['reddit_client_id'],
|
987 |
'client_secret' => $theChampLoginOptions['reddit_client_secret']
|
1009 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1010 |
if(is_object($profileData) && isset($profileData->id) && isset($profileData->verified) && $profileData->verified == 1){
|
1011 |
$profileData = the_champ_sanitize_profile_data($profileData, 'reddit');
|
1012 |
+
$redditLoginState = sanitize_text_field($_GET['state']);
|
1013 |
$redditRedirectUrl = get_user_meta($redditLoginState, 'super_socializer_redirect_to', true);
|
1014 |
$response = the_champ_user_auth($profileData, 'reddit', $redditRedirectUrl);
|
1015 |
if($response == 'show form'){
|
1042 |
die;
|
1043 |
}
|
1044 |
}
|
1045 |
+
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) !== false && remove_query_arg(array(
|
1046 |
'code',
|
1047 |
'scope',
|
1048 |
'state'
|
1049 |
), esc_url_raw(the_champ_get_http() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"])) == home_url() . '/SuperSocializerAuth/Disqus'){
|
1050 |
$postData = array(
|
1051 |
'grant_type' => 'authorization_code',
|
1052 |
+
'code' => sanitize_text_field($_GET['code']),
|
1053 |
'redirect_uri' => home_url() . "/SuperSocializerAuth/Disqus",
|
1054 |
'client_id' => $theChampLoginOptions['disqus_public_key'],
|
1055 |
'client_secret' => $theChampLoginOptions['disqus_secret_key']
|
1077 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1078 |
if(is_object($profileData) && isset($profileData->response->id)){
|
1079 |
$profileData = the_champ_sanitize_profile_data($profileData, 'disqus');
|
1080 |
+
$disqusLoginState = sanitize_text_field($_GET['state']);
|
1081 |
$disqusRedirectUrl = get_user_meta($disqusLoginState, 'super_socializer_redirect_to', true);
|
1082 |
$response = the_champ_user_auth($profileData, 'disqus', $disqusRedirectUrl);
|
1083 |
if($response == 'show form'){
|
1111 |
die;
|
1112 |
}
|
1113 |
}
|
1114 |
+
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) !== false && remove_query_arg(array(
|
1115 |
'code',
|
1116 |
'scope',
|
1117 |
'state'
|
1118 |
), esc_url_raw(the_champ_get_http() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"])) == home_url() . '/SuperSocializerAuth/Dropbox'){
|
1119 |
$postData = array(
|
1120 |
'grant_type' => 'authorization_code',
|
1121 |
+
'code' => sanitize_text_field($_GET['code']),
|
1122 |
'redirect_uri' => home_url() . "/SuperSocializerAuth/Dropbox"
|
1123 |
);
|
1124 |
$response = wp_remote_post("https://api.dropbox.com/1/oauth2/token", array(
|
1147 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1148 |
if(is_object($profileData) && isset($profileData->account_id)){
|
1149 |
$profileData = the_champ_sanitize_profile_data($profileData, 'dropbox');
|
1150 |
+
$dropboxLoginState = sanitize_text_field($_GET['state']);
|
1151 |
$dropboxRedirectUrl = get_user_meta($dropboxLoginState, 'super_socializer_redirect_to', true);
|
1152 |
$response = the_champ_user_auth($profileData, 'dropbox', $dropboxRedirectUrl);
|
1153 |
if($response == 'show form'){
|
1181 |
die;
|
1182 |
}
|
1183 |
}
|
1184 |
+
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) && remove_query_arg(array(
|
1185 |
'code', 'state'
|
1186 |
), esc_url_raw(the_champ_get_http() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"])) == home_url() . '/SuperSocializerAuth/Foursquare'){
|
1187 |
$postData = array(
|
1188 |
'grant_type' => 'authorization_code',
|
1189 |
+
'code' => sanitize_text_field($_GET['code']),
|
1190 |
'redirect_uri' => home_url() . "/SuperSocializerAuth/Foursquare",
|
1191 |
'client_id' => $theChampLoginOptions['foursquare_client_id'],
|
1192 |
'client_secret' => $theChampLoginOptions['foursquare_client_secret']
|
1215 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1216 |
if(is_object($profileData) && isset($profileData->response->user->id)){
|
1217 |
$profileData = the_champ_sanitize_profile_data($profileData, 'foursquare');
|
1218 |
+
$foursquareLoginState = sanitize_text_field($_GET['state']);
|
1219 |
$foursquareRedirectUrl = get_user_meta($foursquareLoginState, 'super_socializer_redirect_to', true);
|
1220 |
$response = the_champ_user_auth($profileData, 'foursquare', $foursquareRedirectUrl);
|
1221 |
if($response == 'show form'){
|
1251 |
}
|
1252 |
}
|
1253 |
|
1254 |
+
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) && remove_query_arg(array('code','scope', 'state'), esc_url_raw(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])) == home_url().'/SuperSocializerAuth/Dribbble'){
|
1255 |
$postData = array(
|
1256 |
'grant_type' => 'authorization_code',
|
1257 |
+
'code' => sanitize_text_field($_GET['code']),
|
1258 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Dribbble",
|
1259 |
'client_id' => $theChampLoginOptions['dribbble_client_id'],
|
1260 |
'client_secret' => $theChampLoginOptions['dribbble_client_secret']
|
1280 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1281 |
if(is_object($profileData) && isset($profileData->id)){
|
1282 |
$profileData = the_champ_sanitize_profile_data($profileData, 'dribbble');
|
1283 |
+
$dribbbleLoginState = sanitize_text_field($_GET['state']);
|
1284 |
$dribbbleRedirectUrl = get_user_meta($dribbbleLoginState, 'super_socializer_redirect_to', true);
|
1285 |
$response = the_champ_user_auth($profileData, 'dribbble', $dribbbleRedirectUrl);
|
1286 |
if($response == 'show form'){
|
1315 |
die;
|
1316 |
}
|
1317 |
}
|
1318 |
+
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) && remove_query_arg(array('code', 'state'), esc_url_raw(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])) == home_url().'/SuperSocializerAuth/Spotify'){
|
1319 |
$postData = array(
|
1320 |
'grant_type' => 'authorization_code',
|
1321 |
+
'code' => sanitize_text_field($_GET['code']),
|
1322 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Spotify",
|
1323 |
'client_id' => $theChampLoginOptions['spotify_client_id'],
|
1324 |
'client_secret' => $theChampLoginOptions['spotify_client_secret']
|
1343 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1344 |
if(is_object($profileData) && isset($profileData->id)){
|
1345 |
$profileData = the_champ_sanitize_profile_data($profileData, 'spotify');
|
1346 |
+
$spotifyLoginState = sanitize_text_field($_GET['state']);
|
1347 |
$spotifyRedirectUrl = get_user_meta($spotifyLoginState, 'super_socializer_redirect_to', true);
|
1348 |
$response = the_champ_user_auth($profileData, 'spotify', $spotifyRedirectUrl);
|
1349 |
if($response == 'show form'){
|
1379 |
die;
|
1380 |
}
|
1381 |
}
|
1382 |
+
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) && remove_query_arg(array('code','state'), esc_url_raw(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])) == home_url().'/SuperSocializerAuth/Kakao'){
|
1383 |
$postData = array(
|
1384 |
'grant_type' => 'authorization_code',
|
1385 |
+
'code' => sanitize_text_field($_GET['code']),
|
1386 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Kakao",
|
1387 |
'client_id' => $theChampLoginOptions['kakao_client_id'],
|
1388 |
'client_secret' => $theChampLoginOptions['kakao_client_secret']
|
1407 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1408 |
if(is_object($profileData) && isset($profileData->id)){
|
1409 |
$profileData = the_champ_sanitize_profile_data($profileData, 'kakao');
|
1410 |
+
$kakaoLoginState = sanitize_text_field($_GET['state']);
|
1411 |
$kakaoRedirectUrl = get_user_meta($kakaoLoginState, 'super_socializer_redirect_to', true);
|
1412 |
$response = the_champ_user_auth($profileData, 'kakao', $kakaoRedirectUrl);
|
1413 |
if($response == 'show form'){
|
1443 |
die;
|
1444 |
}
|
1445 |
}
|
1446 |
+
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) && remove_query_arg(array('code','state'), esc_url_raw(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])) == home_url().'/SuperSocializerAuth/Github'){
|
1447 |
$postData = array(
|
1448 |
'state' => 'state',
|
1449 |
+
'code' => sanitize_text_field($_GET['code']),
|
1450 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Github",
|
1451 |
'client_id' => $theChampLoginOptions['github_client_id'],
|
1452 |
'client_secret' => $theChampLoginOptions['github_client_secret']
|
1487 |
}
|
1488 |
}
|
1489 |
$profileData = the_champ_sanitize_profile_data($profileData, 'github');
|
1490 |
+
$githubLoginState = sanitize_text_field($_GET['state']);
|
1491 |
$githubRedirectUrl = get_user_meta($githubLoginState, 'super_socializer_redirect_to', true);
|
1492 |
$response = the_champ_user_auth($profileData, 'github', $githubRedirectUrl);
|
1493 |
if($response == 'show form'){
|
1521 |
update_user_meta($facebookLoginState, 'super_socializer_redirect_to', isset($_GET['super_socializer_redirect_to']) ? esc_url(trim($_GET['super_socializer_redirect_to'])) : home_url());
|
1522 |
wp_redirect("https://www.facebook.com/v10.0/dialog/oauth?scope=email&client_id=" . $theChampLoginOptions['fb_key'] . "&state=" . $facebookLoginState . "&redirect_uri=" . home_url() . "/?SuperSocializerAuth=Facebook");
|
1523 |
die;
|
1524 |
+
}elseif(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) !== false){
|
1525 |
$postData = array(
|
1526 |
+
'code' => sanitize_text_field($_GET['code']),
|
1527 |
'redirect_uri' => home_url() . "/?SuperSocializerAuth=Facebook",
|
1528 |
'client_id' => $theChampLoginOptions['fb_key'],
|
1529 |
'client_secret' => $theChampLoginOptions['fb_secret']
|
1549 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1550 |
if(is_object($profileData) && isset($profileData->id)){
|
1551 |
$profileData = the_champ_sanitize_profile_data($profileData, 'facebook');
|
1552 |
+
$facebookLoginState = sanitize_text_field($_GET['state']);
|
1553 |
$facebook_redirect_url = get_user_meta($facebookLoginState, 'super_socializer_redirect_to', true);
|
1554 |
delete_user_meta($facebookLoginState, 'super_socializer_redirect_to');
|
1555 |
$response = the_champ_user_auth($profileData, 'faceboook', $facebook_redirect_url);
|
1588 |
die;
|
1589 |
}
|
1590 |
}
|
1591 |
+
if(isset($_GET['code']) && isset($_GET['state']) && get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) && remove_query_arg(array('code','scope', 'state'), esc_url_raw(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])) == home_url().'/SuperSocializerAuth/Amazon'){
|
1592 |
$postData = array(
|
1593 |
'grant_type' => 'authorization_code',
|
1594 |
+
'code' => sanitize_text_field($_GET['code']),
|
1595 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Amazon",
|
1596 |
'client_id' => $theChampLoginOptions['amazon_client_id'],
|
1597 |
'client_secret' => $theChampLoginOptions['amazon_client_secret']
|
1615 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1616 |
if(is_object($profileData) && isset($profileData->user_id)){
|
1617 |
$profileData = the_champ_sanitize_profile_data($profileData, 'amazon');
|
1618 |
+
$amazonLoginState = sanitize_text_field($_GET['state']);
|
1619 |
$amazonRedirectUrl = get_user_meta($amazonLoginState, 'super_socializer_redirect_to', true);
|
1620 |
$response = the_champ_user_auth($profileData, 'amazon', $amazonRedirectUrl);
|
1621 |
if($response == 'show form'){
|
1653 |
if(isset($_GET['code']) && isset($_GET['state']) && remove_query_arg(array('code','scope','state'), esc_url_raw(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])) == home_url().'/SuperSocializerAuth/Stackoverflow'){
|
1654 |
$postData = array(
|
1655 |
'grant_type' => 'authorization_code',
|
1656 |
+
'code' => sanitize_text_field($_GET['code']),
|
1657 |
'redirect_uri' => home_url()."/SuperSocializerAuth/Stackoverflow",
|
1658 |
'client_id' => $theChampLoginOptions['stackoverflow_client_id'],
|
1659 |
'client_secret' => $theChampLoginOptions['stackoverflow_client_secret']
|
1683 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1684 |
if(is_object($profileData) && isset($profileData->items[0]->account_id)){
|
1685 |
$profileData = the_champ_sanitize_profile_data($profileData->items[0], 'stackoverflow');
|
1686 |
+
$stackoverflowLoginState = sanitize_text_field($_GET['state']);
|
1687 |
$stackoverflowRedirectUrl = get_user_meta($stackoverflowLoginState, 'super_socializer_redirect_to', true);
|
1688 |
$response = the_champ_user_auth($profileData, 'stackoverflow', $stackoverflowRedirectUrl);
|
1689 |
if($response == 'show form'){
|
1717 |
}
|
1718 |
}
|
1719 |
if(isset($_GET['code']) && isset($_GET['state'])){
|
1720 |
+
if(get_user_meta(sanitize_text_field($_GET['state']), 'super_socializer_redirect_to', true) !== false){
|
1721 |
$postData = array(
|
1722 |
'grant_type' => 'authorization_code',
|
1723 |
+
'code' => sanitize_text_field($_GET['code']),
|
1724 |
'redirect_uri' => home_url(),
|
1725 |
'client_id' => $theChampLoginOptions['google_key'],
|
1726 |
'client_secret' => $theChampLoginOptions['google_secret']
|
1751 |
$profileData = json_decode(wp_remote_retrieve_body($response));
|
1752 |
if(is_object($profileData) && isset($profileData->sub)){
|
1753 |
$profileData = the_champ_sanitize_profile_data($profileData, 'google');
|
1754 |
+
$googleLoginState = sanitize_text_field($_GET['state']);
|
1755 |
$googleRedirectUrl = get_user_meta($googleLoginState, 'super_socializer_redirect_to', true);
|
1756 |
$response = the_champ_user_auth($profileData, 'google', $googleRedirectUrl);
|
1757 |
if($response == 'show form'){
|
2115 |
// Facebook scripts
|
2116 |
if(the_champ_facebook_plugin_enabled()){
|
2117 |
?>
|
2118 |
+
<script> var theChampFBKey = '<?php echo esc_js($fbKey) ?>', theChampFBLang = '<?php echo (isset($theChampFacebookOptions["comment_lang"]) && $theChampFacebookOptions["comment_lang"] != '') ? esc_js($theChampFacebookOptions["comment_lang"]) : esc_js(get_locale()) ?>', theChampFbLikeMycred = <?php echo defined('HEATEOR_SOCIAL_SHARE_MYCRED_INTEGRATION_VERSION') && the_champ_facebook_like_rec_enabled() ? 1 : 0 ?>, theChampSsga = <?php echo defined('HEATEOR_SHARING_GOOGLE_ANALYTICS_VERSION') ? 1 : 0 ?>, theChampCommentNotification = <?php echo (defined('HEATEOR_FB_COM_NOT_VERSION') && version_compare('1.1.4', HEATEOR_FB_COM_NOT_VERSION) > 0) || function_exists('heateor_ss_check_querystring') || function_exists('the_champ_check_querystring') ? 1 : 0; ?>, theChampHeateorFcmRecentComments = <?php echo defined('HEATEOR_FB_COM_MOD_VERSION') && HEATEOR_FB_COM_MOD_VERSION == '1.1.4' ? 1 : 0 ?>, theChampFbIosLogin = <?php echo !is_user_logged_in() && isset($_GET['code']) && sanitize_text_field($_GET['code']) != '' ? 1 : 0; ?>; </script>
|
2119 |
<?php
|
2120 |
add_action('wp_footer', 'the_champ_fb_root_div');
|
2121 |
if(!$combinedScript){
|