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

Version Description

[24 July 2020] = [Bugfix] Updated Facebook SDK to latest version 7.0 [Bugfix] Post-login redirection at same page was not working for Line, Microsoft, Google and Instagram login [Improvement] Improved Google Login functionality

Download this release

Release Info

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

Code changes from version 7.12.45 to 7.12.46

inc/shortcode.php CHANGED
@@ -264,7 +264,7 @@ function the_champ_fb_commenting_shortcode($params){
264
  $html .= ' data-numposts="' . $num_posts . '"';
265
  $html .= ' data-width="' . ($width == '' ? '100%' : $width) . '"';
266
  $html .= ' ></div></div><script type="text/javascript" src="//connect.facebook.net/' . $language . '/sdk.js
267
- "></script><script>FB.init({xfbml:1,version: "v3.2"});</script>';
268
  if(defined('HEATEOR_FB_COM_NOT_VERSION') && version_compare('1.1.5', HEATEOR_FB_COM_NOT_VERSION) < 0){
269
  $html .= '<script type="text/javascript">jQuery(window).load(function(){"undefined"!=typeof theChampFacebookCommentsNotifierOptinText&&(null!=heateorFcnGetCookie("heateorFcnOptin")&&jQuery("input.heateor_ss_fb_comments_notifier_optin").prop("checked",!0),jQuery("input.heateor_ss_fb_comments_notifier_optin").click(function(){if(jQuery(this).is(":checked")){if(heateorFcnOptin=1,null==heateorFcnGetCookie("heateorFcnOptin")){var e=new Date;e.setTime(e.getTime()+31536e6),document.cookie="heateorFcnOptin=1; expires="+e.toUTCString()+"; path=/"}}else heateorFcnOptin=0,document.cookie="heateorFcnOptin=; expires=Fri, 02 Jan 1970 00:00:00 UTC; path=/"}));});</script>';
270
  }
264
  $html .= ' data-numposts="' . $num_posts . '"';
265
  $html .= ' data-width="' . ($width == '' ? '100%' : $width) . '"';
266
  $html .= ' ></div></div><script type="text/javascript" src="//connect.facebook.net/' . $language . '/sdk.js
267
+ "></script><script>FB.init({xfbml:1,version: "v7.0"});</script>';
268
  if(defined('HEATEOR_FB_COM_NOT_VERSION') && version_compare('1.1.5', HEATEOR_FB_COM_NOT_VERSION) < 0){
269
  $html .= '<script type="text/javascript">jQuery(window).load(function(){"undefined"!=typeof theChampFacebookCommentsNotifierOptinText&&(null!=heateorFcnGetCookie("heateorFcnOptin")&&jQuery("input.heateor_ss_fb_comments_notifier_optin").prop("checked",!0),jQuery("input.heateor_ss_fb_comments_notifier_optin").click(function(){if(jQuery(this).is(":checked")){if(heateorFcnOptin=1,null==heateorFcnGetCookie("heateorFcnOptin")){var e=new Date;e.setTime(e.getTime()+31536e6),document.cookie="heateorFcnOptin=1; expires="+e.toUTCString()+"; path=/"}}else heateorFcnOptin=0,document.cookie="heateorFcnOptin=; expires=Fri, 02 Jan 1970 00:00:00 UTC; path=/"}));});</script>';
270
  }
js/front/combined.js CHANGED
@@ -5,7 +5,7 @@ function theChampGetCookie(e){for(var t=e+"=",a=document.cookie.split(";"),h=0;h
5
  // common.js
6
  function theChampLoginPopup(e){if("undefined"!=typeof theChampSameTabLogin&&theChampSameTabLogin==1){location.href=e}else{window.open(e,"_blank","height=520,width=770,left=315,top=80,resizable,scrollbars,toolbar=0,personalbar=0,menubar=no,location=no,directories=no,status")}}function theChampLoadingIcon(){jQuery(".the_champ_login_container").html('<img id="the_champ_loading_image" src="'+theChampLoadingImgPath+'" />')}function theChampInitiateLogin(e){var t=jQuery(e).parents("div.the_champ_login_container").find(".heateor_ss_social_login_optin");if(0==t.length||jQuery(t).is(":checked")){var a=e.getAttribute("alt");"Login with Facebook"==a?theChampLoginPopup(theChampFacebookAuthUrl):"Login with Line"==a?theChampLoginPopup(theChampLineAuthUrl):"Login with Microsoft"==a?theChampLoginPopup(theChampLiveAuthUrl):"Login with Steam"==a?theChampLoginPopup(theChampSteamAuthUrl):"Login with Twitter"==a?theChampLoginPopup(theChampTwitterAuthUrl):("Login with Linkedin"==a&&theChampLoginPopup(theChampLinkedinAuthUrl),"Login with Google"==a?theChampLoginPopup(theChampGoogleAuthUrl):"Login with Vkontakte"==a?theChampLoginPopup(theChampVkontakteAuthUrl):"Login with Instagram"==a&&theChampLoginPopup(theChampInstagramAuthUrl))}else t.length>0&&jQuery(t).parent().css("color","red")}function theChampDisplayLoginIcon(e,t){if("undefined"!=typeof jQuery)for(var a=0;a<t.length;a++)jQuery("."+t[a]).css("display","block");else for(a=0;a<t.length;a++)for(var h=theChampGetElementsByClass(e,t[a]),i=0;i<h.length;i++)h[i].style.display="block"}function theChampValidateEmail(e){return/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function the_champ_save_email(e){var t=document.getElementById("the_champ_email").value.trim(),a=document.getElementById("the_champ_confirm_email").value.trim();return"save"!=e.id||theChampValidateEmail(t)?t!=a?(document.getElementById("the_champ_error").innerHTML="Email addresses do not match",void jQuery("#TB_ajaxContent").css("height","auto")):void theChampCallAjax(function(){theChampSaveEmail(e.id,t)}):(document.getElementById("the_champ_error").innerHTML=theChampEmailPopupErrorMsg,void jQuery("#TB_ajaxContent").css("height","auto"))}function theChampSaveEmail(e,t){document.getElementById("the_champ_error").innerHTML='<img src="'+theChampLoadingImgPath+'" />',jQuery.ajax({type:"POST",dataType:"json",url:theChampAjaxUrl,data:{action:"the_champ_save_email",elemId:e,email:t,id:theChampEmailPopupUniqueId},success:function(e){window.history.pushState({html:"html",pageTitle:"page title"},"","?done=1"),1==e.status&&e.message.response&&"success"==e.message.response?location.href=e.message.url:1==e.status&&"success"==e.message?location.href=theChampRegRedirectionUrl:1==e.status&&"cancelled"==e.message?tb_remove():1==e.status&&"verify"==e.message?document.getElementById("TB_ajaxContent").innerHTML="<strong>"+theChampEmailPopupVerifyMessage+"</strong>":0==e.status&&(document.getElementById("the_champ_error").innerHTML=e.message,jQuery("#TB_ajaxContent").css("height","auto"))},error:function(e,t,a){location.href=decodeURIComponent(theChampRedirectionUrl)}})}function theChampCapitaliseFirstLetter2(e){return e.charAt(0).toUpperCase()+e.slice(1)}if(void 0===theChampLinkingRedirection)var theChampLinkingRedirection="";theChampVerified&&theChampLoadEvent(function(){tb_show(theChampPopupTitle,theChampAjaxUrl)}),theChampEmailPopup&&theChampLoadEvent(function(){tb_show(theChampEmailPopupTitle,theChampEmailAjaxUrl)});var theChampCommentFormLogin=!1;theChampLoadEvent(function(){null!=theChampGetCookie("heateorSsSLOptin")&&jQuery("input.heateor_ss_social_login_optin").prop("checked",!0)}),jQuery("input.heateor_ss_social_login_optin").click(function(){if(jQuery(this).is(":checked")){if(null==theChampGetCookie("heateorSsSLOptin")){var e=new Date;e.setTime(e.getTime()+31536e6),document.cookie="heateorSsSLOptin=1; expires="+e.toUTCString()+"; path=/"}}else document.cookie="heateorSsSLOptin=; expires=Fri, 02 Jan 1970 00:00:00 UTC; path=/"});
7
  // sdk.js
8
- function theChampInitiateFB(){FB.init({appId:theChampFBKey,channelUrl:"//"+theChampSiteUrl+"/channel.html",status:!0,cookie:!0,xfbml:!0,version:"v3.2"})}window.fbAsyncInit=function(){theChampInitiateFB(),theChampFbIosLogin&&theChampAuthUserFB(),"function"==typeof theChampDisplayLoginIcon&&theChampDisplayLoginIcon(document,["theChampFacebookButton","theChampFacebookLogin"]),("undefined"!=typeof theChampCommentNotification&&1==theChampCommentNotification||"undefined"!=typeof theChampHeateorFcmRecentComments&&1==theChampHeateorFcmRecentComments)&&FB.Event.subscribe("comment.create",function(e){void 0!==e.commentID&&e.commentID&&("undefined"!=typeof theChampCommentNotification&&1==theChampCommentNotification&&jQuery.ajax({type:"POST",dataType:"json",url:theChampSiteUrl+"/index.php",data:{action:"the_champ_moderate_fb_comments",data:e},success:function(e,t,n){}}),"undefined"!=typeof theChampHeateorFcmRecentComments&&1==theChampHeateorFcmRecentComments&&jQuery.ajax({type:"POST",dataType:"json",url:theChampSiteUrl+"/index.php",data:{action:"heateor_fcm_save_fb_comment",data:e},success:function(e,t,n){}}))}),"undefined"!=typeof theChampFbLikeMycred&&theChampFbLikeMycred&&(FB.Event.subscribe("edge.create",function(e){heateorSsmiMycredPoints("Facebook_like_recommend","",e||"")}),FB.Event.subscribe("edge.remove",function(e){heateorSsmiMycredPoints("Facebook_like_recommend","",e||"","Minus point(s) for undoing Facebook like-recommend")})),"undefined"!=typeof theChampSsga&&theChampSsga&&(FB.Event.subscribe("edge.create",function(e){heateorSsgaSocialPluginsTracking("Facebook","Like",e||"")}),FB.Event.subscribe("edge.remove",function(e){heateorSsgaSocialPluginsTracking("Facebook","Unlike",e||"")}))},function(e){var t,n="facebook-jssdk",o=e.getElementsByTagName("script")[0];e.getElementById(n)||((t=e.createElement("script")).id=n,t.async=!0,t.src="//connect.facebook.net/"+theChampFBLang+"/sdk.js",o.parentNode.insertBefore(t,o))}(document);
9
  // commenting.js
10
  function theChampRenderFBCommenting(){var e=typeof theChampCommentingId!='undefined'?document.getElementById(theChampCommentingId):'';if(e){var t=[],n=[],a=[];t.wordpress='<div style="clear:both"></div>'+e.innerHTML,theChampFBCommentingContent=("undefined"!=typeof theChampFacebookCommentsNotifierOptinText?'<div class="heateor_ss_fb_comments_notifier_optin_container"><label><input type="checkbox" class="heateor_ss_fb_comments_notifier_optin" value="1" />'+theChampFacebookCommentsNotifierOptinText+"</label></div>":"")+("undefined"!=typeof theChampFacebookCommentsOptinText?'<div class="heateor_ss_fb_comments_optin_container"><label><input type="checkbox" class="heateor_ss_fb_comments_optin" value="1" />'+theChampFacebookCommentsOptinText+"</label></div>":"")+'<div class="fb-comments" data-href="'+theChampFBCommentUrl+'"',""!=theChampFBCommentColor&&(theChampFBCommentingContent+=' data-colorscheme="'+theChampFBCommentColor+'"'),""!=theChampFBCommentNumPosts&&(theChampFBCommentingContent+=' data-numposts="'+theChampFBCommentNumPosts+'"'),theChampFBCommentingContent+=' data-width="'+theChampFBCommentWidth+'"',""!=theChampFBCommentOrderby&&(theChampFBCommentingContent+=' data-order-by="'+theChampFBCommentOrderby+'"'),theChampFBCommentingContent+=" ></div>",t.fb=theChampFBCommentingContent,n.fb="theChampInitiateFB();",t.googleplus="<div class='g-comments' data-href='"+theChampGpCommentsUrl+"' "+(theChampGpCommentsWidth?"data-width='"+theChampGpCommentsWidth+"'":"")+" data-first_party_property='BLOGGER' data-view_type='FILTERED_POSTMOD' ></div>",n.googleplus=" ",a.googleplus="//apis.google.com/js/plusone.js",t.disqus='<div class="embed-container clearfix" id="disqus_thread">'+(""!=theChampDisqusShortname?theChampDisqusShortname:'<div style="font-size: 14px;clear: both;">Specify a Disqus shortname in Super Socializer &gt; Social Commenting section in admin panel</div>')+"</div>",n.disqus="var disqus_shortname = '"+theChampDisqusShortname+"';(function(d) {var dsq = d.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(dsq); })(document);";var o='<div class="theChampCommentingTabs"><h3 id="theChampReplyTitle" style="margin-bottom:15px" class="comment-reply-title">'+theChampScLabel+"</h3><ul>";theChampScEnabledTabs=theChampScEnabledTabs.split(",");for(var i=0;i<theChampScEnabledTabs.length;i++){o+='<li id="theChampTabs-'+i+'-li" onclick="',o+="this.setAttribute('class', 'theChampSelectedTab');document.getElementById('theChampTabs-"+i+"').style.display='block';","fb"==theChampScEnabledTabs[i]&&(o+="theChampInitiateFB();");for(var m=0;m<theChampScEnabledTabs.length;m++)m!=i&&(o+="document.getElementById('theChampTabs-"+m+"-li').setAttribute('class', '');document.getElementById('theChampTabs-"+m+"').style.display='none';");o+='">',o+=theChampScTabLabels[theChampScEnabledTabs[i]],o+="</li>"}for(o+="</ul>",i=0;i<theChampScEnabledTabs.length;i++)o+='<div id="theChampTabs-'+i+'" ><div style="clear: both"></div>'+t[theChampScEnabledTabs[i]]+"</div>";o+="</div>",e.innerHTML=o;var h=document.getElementById("reply-title");for(h&&h.remove(),i=0;i<theChampScEnabledTabs.length;i++)if(n[theChampScEnabledTabs[i]]){var s=document.createElement("script");a[theChampScEnabledTabs[i]]&&s.setAttribute("src",a[theChampScEnabledTabs[i]]),s.innerHTML=n[theChampScEnabledTabs[i]],document.getElementById("theChampTabs-"+i).appendChild(s)}for(document.getElementById("theChampTabs-0-li").setAttribute("class","theChampSelectedTab"),i=1;i<theChampScEnabledTabs.length;i++)document.getElementById("theChampTabs-"+i).style.display="none";null!=theChampGetCookie("heateorSsSLOptin")&&jQuery("input.heateor_ss_social_login_optin").length>0&&jQuery("input.heateor_ss_social_login_optin").prop("checked",!0),jQuery("input.heateor_ss_social_login_optin").click(function(){if(jQuery(this).is(":checked")){if(null==theChampGetCookie("heateorSsSLOptin")){var e=new Date;e.setTime(e.getTime()+31536e6),document.cookie="heateorSsSLOptin=1; expires="+e.toUTCString()+"; path=/"}}else document.cookie="heateorSsSLOptin=; expires=Fri, 02 Jan 1970 00:00:00 UTC; path=/"}),"undefined"!=typeof theChampFacebookCommentsOptinText&&(null!=heateorFcmGetCookie("heateorFcmOptin")&&jQuery("input.heateor_ss_fb_comments_optin").prop("checked",!0),jQuery("input.heateor_ss_fb_comments_optin").click(function(){if(jQuery(this).is(":checked")){if(heateorFcmOptin=1,null==heateorFcmGetCookie("heateorFcmOptin")){var e=new Date;e.setTime(e.getTime()+31536e6),document.cookie="heateorFcmOptin=1; expires="+e.toUTCString()+"; path=/"}}else heateorFcmOptin=0,document.cookie="heateorFcmOptin=; expires=Fri, 02 Jan 1970 00:00:00 UTC; path=/"})),"undefined"!=typeof theChampFacebookCommentsNotifierOptinText&&(null!=heateorFcnGetCookie("heateorFcnOptin")&&jQuery("input.heateor_ss_fb_comments_notifier_optin").prop("checked",!0),jQuery("input.heateor_ss_fb_comments_notifier_optin").click(function(){if(jQuery(this).is(":checked")){if(heateorFcnOptin=1,null==heateorFcnGetCookie("heateorFcnOptin")){var e=new Date;e.setTime(e.getTime()+31536e6),document.cookie="heateorFcnOptin=1; expires="+e.toUTCString()+"; path=/"}}else heateorFcnOptin=0,document.cookie="heateorFcnOptin=; expires=Fri, 02 Jan 1970 00:00:00 UTC; path=/"}))}}theChampLoadEvent(function(){theChampRenderFBCommenting()});
11
  // sharing.js
5
  // common.js
6
  function theChampLoginPopup(e){if("undefined"!=typeof theChampSameTabLogin&&theChampSameTabLogin==1){location.href=e}else{window.open(e,"_blank","height=520,width=770,left=315,top=80,resizable,scrollbars,toolbar=0,personalbar=0,menubar=no,location=no,directories=no,status")}}function theChampLoadingIcon(){jQuery(".the_champ_login_container").html('<img id="the_champ_loading_image" src="'+theChampLoadingImgPath+'" />')}function theChampInitiateLogin(e){var t=jQuery(e).parents("div.the_champ_login_container").find(".heateor_ss_social_login_optin");if(0==t.length||jQuery(t).is(":checked")){var a=e.getAttribute("alt");"Login with Facebook"==a?theChampLoginPopup(theChampFacebookAuthUrl):"Login with Line"==a?theChampLoginPopup(theChampLineAuthUrl):"Login with Microsoft"==a?theChampLoginPopup(theChampLiveAuthUrl):"Login with Steam"==a?theChampLoginPopup(theChampSteamAuthUrl):"Login with Twitter"==a?theChampLoginPopup(theChampTwitterAuthUrl):("Login with Linkedin"==a&&theChampLoginPopup(theChampLinkedinAuthUrl),"Login with Google"==a?theChampLoginPopup(theChampGoogleAuthUrl):"Login with Vkontakte"==a?theChampLoginPopup(theChampVkontakteAuthUrl):"Login with Instagram"==a&&theChampLoginPopup(theChampInstagramAuthUrl))}else t.length>0&&jQuery(t).parent().css("color","red")}function theChampDisplayLoginIcon(e,t){if("undefined"!=typeof jQuery)for(var a=0;a<t.length;a++)jQuery("."+t[a]).css("display","block");else for(a=0;a<t.length;a++)for(var h=theChampGetElementsByClass(e,t[a]),i=0;i<h.length;i++)h[i].style.display="block"}function theChampValidateEmail(e){return/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function the_champ_save_email(e){var t=document.getElementById("the_champ_email").value.trim(),a=document.getElementById("the_champ_confirm_email").value.trim();return"save"!=e.id||theChampValidateEmail(t)?t!=a?(document.getElementById("the_champ_error").innerHTML="Email addresses do not match",void jQuery("#TB_ajaxContent").css("height","auto")):void theChampCallAjax(function(){theChampSaveEmail(e.id,t)}):(document.getElementById("the_champ_error").innerHTML=theChampEmailPopupErrorMsg,void jQuery("#TB_ajaxContent").css("height","auto"))}function theChampSaveEmail(e,t){document.getElementById("the_champ_error").innerHTML='<img src="'+theChampLoadingImgPath+'" />',jQuery.ajax({type:"POST",dataType:"json",url:theChampAjaxUrl,data:{action:"the_champ_save_email",elemId:e,email:t,id:theChampEmailPopupUniqueId},success:function(e){window.history.pushState({html:"html",pageTitle:"page title"},"","?done=1"),1==e.status&&e.message.response&&"success"==e.message.response?location.href=e.message.url:1==e.status&&"success"==e.message?location.href=theChampRegRedirectionUrl:1==e.status&&"cancelled"==e.message?tb_remove():1==e.status&&"verify"==e.message?document.getElementById("TB_ajaxContent").innerHTML="<strong>"+theChampEmailPopupVerifyMessage+"</strong>":0==e.status&&(document.getElementById("the_champ_error").innerHTML=e.message,jQuery("#TB_ajaxContent").css("height","auto"))},error:function(e,t,a){location.href=decodeURIComponent(theChampRedirectionUrl)}})}function theChampCapitaliseFirstLetter2(e){return e.charAt(0).toUpperCase()+e.slice(1)}if(void 0===theChampLinkingRedirection)var theChampLinkingRedirection="";theChampVerified&&theChampLoadEvent(function(){tb_show(theChampPopupTitle,theChampAjaxUrl)}),theChampEmailPopup&&theChampLoadEvent(function(){tb_show(theChampEmailPopupTitle,theChampEmailAjaxUrl)});var theChampCommentFormLogin=!1;theChampLoadEvent(function(){null!=theChampGetCookie("heateorSsSLOptin")&&jQuery("input.heateor_ss_social_login_optin").prop("checked",!0)}),jQuery("input.heateor_ss_social_login_optin").click(function(){if(jQuery(this).is(":checked")){if(null==theChampGetCookie("heateorSsSLOptin")){var e=new Date;e.setTime(e.getTime()+31536e6),document.cookie="heateorSsSLOptin=1; expires="+e.toUTCString()+"; path=/"}}else document.cookie="heateorSsSLOptin=; expires=Fri, 02 Jan 1970 00:00:00 UTC; path=/"});
7
  // sdk.js
8
+ function theChampInitiateFB(){FB.init({appId:theChampFBKey,channelUrl:"//"+theChampSiteUrl+"/channel.html",status:!0,cookie:!0,xfbml:!0,version:"v7.0"})}window.fbAsyncInit=function(){theChampInitiateFB(),theChampFbIosLogin&&theChampAuthUserFB(),"function"==typeof theChampDisplayLoginIcon&&theChampDisplayLoginIcon(document,["theChampFacebookButton","theChampFacebookLogin"]),("undefined"!=typeof theChampCommentNotification&&1==theChampCommentNotification||"undefined"!=typeof theChampHeateorFcmRecentComments&&1==theChampHeateorFcmRecentComments)&&FB.Event.subscribe("comment.create",function(e){void 0!==e.commentID&&e.commentID&&("undefined"!=typeof theChampCommentNotification&&1==theChampCommentNotification&&jQuery.ajax({type:"POST",dataType:"json",url:theChampSiteUrl+"/index.php",data:{action:"the_champ_moderate_fb_comments",data:e},success:function(e,t,n){}}),"undefined"!=typeof theChampHeateorFcmRecentComments&&1==theChampHeateorFcmRecentComments&&jQuery.ajax({type:"POST",dataType:"json",url:theChampSiteUrl+"/index.php",data:{action:"heateor_fcm_save_fb_comment",data:e},success:function(e,t,n){}}))}),"undefined"!=typeof theChampFbLikeMycred&&theChampFbLikeMycred&&(FB.Event.subscribe("edge.create",function(e){heateorSsmiMycredPoints("Facebook_like_recommend","",e||"")}),FB.Event.subscribe("edge.remove",function(e){heateorSsmiMycredPoints("Facebook_like_recommend","",e||"","Minus point(s) for undoing Facebook like-recommend")})),"undefined"!=typeof theChampSsga&&theChampSsga&&(FB.Event.subscribe("edge.create",function(e){heateorSsgaSocialPluginsTracking("Facebook","Like",e||"")}),FB.Event.subscribe("edge.remove",function(e){heateorSsgaSocialPluginsTracking("Facebook","Unlike",e||"")}))},function(e){var t,n="facebook-jssdk",o=e.getElementsByTagName("script")[0];e.getElementById(n)||((t=e.createElement("script")).id=n,t.async=!0,t.src="//connect.facebook.net/"+theChampFBLang+"/sdk.js",o.parentNode.insertBefore(t,o))}(document);
9
  // commenting.js
10
  function theChampRenderFBCommenting(){var e=typeof theChampCommentingId!='undefined'?document.getElementById(theChampCommentingId):'';if(e){var t=[],n=[],a=[];t.wordpress='<div style="clear:both"></div>'+e.innerHTML,theChampFBCommentingContent=("undefined"!=typeof theChampFacebookCommentsNotifierOptinText?'<div class="heateor_ss_fb_comments_notifier_optin_container"><label><input type="checkbox" class="heateor_ss_fb_comments_notifier_optin" value="1" />'+theChampFacebookCommentsNotifierOptinText+"</label></div>":"")+("undefined"!=typeof theChampFacebookCommentsOptinText?'<div class="heateor_ss_fb_comments_optin_container"><label><input type="checkbox" class="heateor_ss_fb_comments_optin" value="1" />'+theChampFacebookCommentsOptinText+"</label></div>":"")+'<div class="fb-comments" data-href="'+theChampFBCommentUrl+'"',""!=theChampFBCommentColor&&(theChampFBCommentingContent+=' data-colorscheme="'+theChampFBCommentColor+'"'),""!=theChampFBCommentNumPosts&&(theChampFBCommentingContent+=' data-numposts="'+theChampFBCommentNumPosts+'"'),theChampFBCommentingContent+=' data-width="'+theChampFBCommentWidth+'"',""!=theChampFBCommentOrderby&&(theChampFBCommentingContent+=' data-order-by="'+theChampFBCommentOrderby+'"'),theChampFBCommentingContent+=" ></div>",t.fb=theChampFBCommentingContent,n.fb="theChampInitiateFB();",t.googleplus="<div class='g-comments' data-href='"+theChampGpCommentsUrl+"' "+(theChampGpCommentsWidth?"data-width='"+theChampGpCommentsWidth+"'":"")+" data-first_party_property='BLOGGER' data-view_type='FILTERED_POSTMOD' ></div>",n.googleplus=" ",a.googleplus="//apis.google.com/js/plusone.js",t.disqus='<div class="embed-container clearfix" id="disqus_thread">'+(""!=theChampDisqusShortname?theChampDisqusShortname:'<div style="font-size: 14px;clear: both;">Specify a Disqus shortname in Super Socializer &gt; Social Commenting section in admin panel</div>')+"</div>",n.disqus="var disqus_shortname = '"+theChampDisqusShortname+"';(function(d) {var dsq = d.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(dsq); })(document);";var o='<div class="theChampCommentingTabs"><h3 id="theChampReplyTitle" style="margin-bottom:15px" class="comment-reply-title">'+theChampScLabel+"</h3><ul>";theChampScEnabledTabs=theChampScEnabledTabs.split(",");for(var i=0;i<theChampScEnabledTabs.length;i++){o+='<li id="theChampTabs-'+i+'-li" onclick="',o+="this.setAttribute('class', 'theChampSelectedTab');document.getElementById('theChampTabs-"+i+"').style.display='block';","fb"==theChampScEnabledTabs[i]&&(o+="theChampInitiateFB();");for(var m=0;m<theChampScEnabledTabs.length;m++)m!=i&&(o+="document.getElementById('theChampTabs-"+m+"-li').setAttribute('class', '');document.getElementById('theChampTabs-"+m+"').style.display='none';");o+='">',o+=theChampScTabLabels[theChampScEnabledTabs[i]],o+="</li>"}for(o+="</ul>",i=0;i<theChampScEnabledTabs.length;i++)o+='<div id="theChampTabs-'+i+'" ><div style="clear: both"></div>'+t[theChampScEnabledTabs[i]]+"</div>";o+="</div>",e.innerHTML=o;var h=document.getElementById("reply-title");for(h&&h.remove(),i=0;i<theChampScEnabledTabs.length;i++)if(n[theChampScEnabledTabs[i]]){var s=document.createElement("script");a[theChampScEnabledTabs[i]]&&s.setAttribute("src",a[theChampScEnabledTabs[i]]),s.innerHTML=n[theChampScEnabledTabs[i]],document.getElementById("theChampTabs-"+i).appendChild(s)}for(document.getElementById("theChampTabs-0-li").setAttribute("class","theChampSelectedTab"),i=1;i<theChampScEnabledTabs.length;i++)document.getElementById("theChampTabs-"+i).style.display="none";null!=theChampGetCookie("heateorSsSLOptin")&&jQuery("input.heateor_ss_social_login_optin").length>0&&jQuery("input.heateor_ss_social_login_optin").prop("checked",!0),jQuery("input.heateor_ss_social_login_optin").click(function(){if(jQuery(this).is(":checked")){if(null==theChampGetCookie("heateorSsSLOptin")){var e=new Date;e.setTime(e.getTime()+31536e6),document.cookie="heateorSsSLOptin=1; expires="+e.toUTCString()+"; path=/"}}else document.cookie="heateorSsSLOptin=; expires=Fri, 02 Jan 1970 00:00:00 UTC; path=/"}),"undefined"!=typeof theChampFacebookCommentsOptinText&&(null!=heateorFcmGetCookie("heateorFcmOptin")&&jQuery("input.heateor_ss_fb_comments_optin").prop("checked",!0),jQuery("input.heateor_ss_fb_comments_optin").click(function(){if(jQuery(this).is(":checked")){if(heateorFcmOptin=1,null==heateorFcmGetCookie("heateorFcmOptin")){var e=new Date;e.setTime(e.getTime()+31536e6),document.cookie="heateorFcmOptin=1; expires="+e.toUTCString()+"; path=/"}}else heateorFcmOptin=0,document.cookie="heateorFcmOptin=; expires=Fri, 02 Jan 1970 00:00:00 UTC; path=/"})),"undefined"!=typeof theChampFacebookCommentsNotifierOptinText&&(null!=heateorFcnGetCookie("heateorFcnOptin")&&jQuery("input.heateor_ss_fb_comments_notifier_optin").prop("checked",!0),jQuery("input.heateor_ss_fb_comments_notifier_optin").click(function(){if(jQuery(this).is(":checked")){if(heateorFcnOptin=1,null==heateorFcnGetCookie("heateorFcnOptin")){var e=new Date;e.setTime(e.getTime()+31536e6),document.cookie="heateorFcnOptin=1; expires="+e.toUTCString()+"; path=/"}}else heateorFcnOptin=0,document.cookie="heateorFcnOptin=; expires=Fri, 02 Jan 1970 00:00:00 UTC; path=/"}))}}theChampLoadEvent(function(){theChampRenderFBCommenting()});
11
  // sharing.js
js/front/facebook/sdk.js CHANGED
@@ -1 +1 @@
1
- function theChampInitiateFB(){FB.init({appId:theChampFBKey,channelUrl:"//"+theChampSiteUrl+"/channel.html",status:!0,cookie:!0,xfbml:!0,version:"v3.2"})}window.fbAsyncInit=function(){theChampInitiateFB(),theChampFbIosLogin&&theChampAuthUserFB(),"function"==typeof theChampDisplayLoginIcon&&theChampDisplayLoginIcon(document,["theChampFacebookButton","theChampFacebookLogin"]),("undefined"!=typeof theChampCommentNotification&&1==theChampCommentNotification||"undefined"!=typeof theChampHeateorFcmRecentComments&&1==theChampHeateorFcmRecentComments)&&FB.Event.subscribe("comment.create",function(e){void 0!==e.commentID&&e.commentID&&("undefined"!=typeof theChampCommentNotification&&1==theChampCommentNotification&&jQuery.ajax({type:"POST",dataType:"json",url:theChampSiteUrl+"/index.php",data:{action:"the_champ_moderate_fb_comments",data:e},success:function(e,t,n){}}),"undefined"!=typeof theChampHeateorFcmRecentComments&&1==theChampHeateorFcmRecentComments&&jQuery.ajax({type:"POST",dataType:"json",url:theChampSiteUrl+"/index.php",data:{action:"heateor_fcm_save_fb_comment",data:e},success:function(e,t,n){}}))}),"undefined"!=typeof theChampFbLikeMycred&&theChampFbLikeMycred&&(FB.Event.subscribe("edge.create",function(e){heateorSsmiMycredPoints("Facebook_like_recommend","",e||"")}),FB.Event.subscribe("edge.remove",function(e){heateorSsmiMycredPoints("Facebook_like_recommend","",e||"","Minus point(s) for undoing Facebook like-recommend")})),"undefined"!=typeof theChampSsga&&theChampSsga&&(FB.Event.subscribe("edge.create",function(e){heateorSsgaSocialPluginsTracking("Facebook","Like",e||"")}),FB.Event.subscribe("edge.remove",function(e){heateorSsgaSocialPluginsTracking("Facebook","Unlike",e||"")}))},function(e){var t,n="facebook-jssdk",o=e.getElementsByTagName("script")[0];e.getElementById(n)||((t=e.createElement("script")).id=n,t.async=!0,t.src="//connect.facebook.net/"+theChampFBLang+"/sdk.js",o.parentNode.insertBefore(t,o))}(document);
1
+ function theChampInitiateFB(){FB.init({appId:theChampFBKey,channelUrl:"//"+theChampSiteUrl+"/channel.html",status:!0,cookie:!0,xfbml:!0,version:"v7.0"})}window.fbAsyncInit=function(){theChampInitiateFB(),theChampFbIosLogin&&theChampAuthUserFB(),"function"==typeof theChampDisplayLoginIcon&&theChampDisplayLoginIcon(document,["theChampFacebookButton","theChampFacebookLogin"]),("undefined"!=typeof theChampCommentNotification&&1==theChampCommentNotification||"undefined"!=typeof theChampHeateorFcmRecentComments&&1==theChampHeateorFcmRecentComments)&&FB.Event.subscribe("comment.create",function(e){void 0!==e.commentID&&e.commentID&&("undefined"!=typeof theChampCommentNotification&&1==theChampCommentNotification&&jQuery.ajax({type:"POST",dataType:"json",url:theChampSiteUrl+"/index.php",data:{action:"the_champ_moderate_fb_comments",data:e},success:function(e,t,n){}}),"undefined"!=typeof theChampHeateorFcmRecentComments&&1==theChampHeateorFcmRecentComments&&jQuery.ajax({type:"POST",dataType:"json",url:theChampSiteUrl+"/index.php",data:{action:"heateor_fcm_save_fb_comment",data:e},success:function(e,t,n){}}))}),"undefined"!=typeof theChampFbLikeMycred&&theChampFbLikeMycred&&(FB.Event.subscribe("edge.create",function(e){heateorSsmiMycredPoints("Facebook_like_recommend","",e||"")}),FB.Event.subscribe("edge.remove",function(e){heateorSsmiMycredPoints("Facebook_like_recommend","",e||"","Minus point(s) for undoing Facebook like-recommend")})),"undefined"!=typeof theChampSsga&&theChampSsga&&(FB.Event.subscribe("edge.create",function(e){heateorSsgaSocialPluginsTracking("Facebook","Like",e||"")}),FB.Event.subscribe("edge.remove",function(e){heateorSsgaSocialPluginsTracking("Facebook","Unlike",e||"")}))},function(e){var t,n="facebook-jssdk",o=e.getElementsByTagName("script")[0];e.getElementById(n)||((t=e.createElement("script")).id=n,t.async=!0,t.src="//connect.facebook.net/"+theChampFBLang+"/sdk.js",o.parentNode.insertBefore(t,o))}(document);
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, Windows Live Login, Microsoft Login
5
  Requires at least: 2.5.0
6
  Tested up to: 5.4.2
7
- Stable tag: 7.12.45
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
@@ -211,6 +211,11 @@ Yes, we can help you with it. Just drop an email at support[ at ]heateor[ dot ]c
211
  8. **Social Commenting**: Disqus Commenting selected
212
 
213
  == Changelog ==
 
 
 
 
 
214
  = 7.12.45 [10 July 2020] =
215
  [Bugfix] Instagram login stopped working because of the outdated Instagram API
216
  [Bugfix] Bit.ly url shortener was not working because of the outdated Bit.ly API
@@ -2065,4 +2070,9 @@ Yes, we can help you with it. Just drop an email at support[ at ]heateor[ dot ]c
2065
  = 7.12.45 [10 July 2020] =
2066
  [Bugfix] Instagram login stopped working because of the outdated Instagram API
2067
  [Bugfix] Bit.ly url shortener was not working because of the outdated Bit.ly API
2068
- [Bugfix] Social Login shortcode was causing Javascript error for logged in users
 
 
 
 
 
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, Windows Live Login, Microsoft Login
5
  Requires at least: 2.5.0
6
  Tested up to: 5.4.2
7
+ Stable tag: 7.12.46
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
211
  8. **Social Commenting**: Disqus Commenting selected
212
 
213
  == Changelog ==
214
+ = 7.12.46 [24 July 2020] =
215
+ [Bugfix] Updated Facebook SDK to latest version 7.0
216
+ [Bugfix] Post-login redirection at same page was not working for Line, Microsoft, Google and Instagram login
217
+ [Improvement] Improved Google Login functionality
218
+
219
  = 7.12.45 [10 July 2020] =
220
  [Bugfix] Instagram login stopped working because of the outdated Instagram API
221
  [Bugfix] Bit.ly url shortener was not working because of the outdated Bit.ly API
2070
  = 7.12.45 [10 July 2020] =
2071
  [Bugfix] Instagram login stopped working because of the outdated Instagram API
2072
  [Bugfix] Bit.ly url shortener was not working because of the outdated Bit.ly API
2073
+ [Bugfix] Social Login shortcode was causing Javascript error for logged in users
2074
+
2075
+ = 7.12.46 [24 July 2020] =
2076
+ [Bugfix] Updated Facebook SDK to latest version 7.0
2077
+ [Bugfix] Post-login redirection at same page was not working for Line, Microsoft, Google and Instagram login
2078
+ [Improvement] Improved Google Login functionality
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.12.45
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.12.45');
15
 
16
  require 'helper.php';
17
 
@@ -152,12 +152,14 @@ function the_champ_connect(){
152
  // Instagram
153
  if((isset($_GET['SuperSocializerAuth']) && sanitize_text_field($_GET['SuperSocializerAuth']) == 'Instagram')){
154
  if(isset($theChampLoginOptions['providers']) && in_array('instagram', $theChampLoginOptions['providers']) && isset($theChampLoginOptions['insta_id']) && $theChampLoginOptions['insta_id'] != '' && isset($theChampLoginOptions['insta_app_secret']) && $theChampLoginOptions['insta_app_secret'] != ''){
155
- wp_redirect("https://api.instagram.com/oauth/authorize?client_id=".$theChampLoginOptions['insta_id']."&scope=user_profile,user_media&response_type=code&language=en-us&redirect_uri=".urlencode(home_url()."/SuperSocializerAuth/Instagram"));
156
- }
157
-
158
- if(!isset($_GET['code'])){
 
159
  // save referrer url in state
160
  $_SESSION['super_socializer_instagram_redirect'] = isset($_GET['super_socializer_redirect_to']) ? esc_url(trim($_GET['super_socializer_redirect_to'])) : home_url();
 
161
  }
162
  }
163
 
@@ -167,7 +169,6 @@ function the_champ_connect(){
167
  session_start();
168
  }
169
  }
170
-
171
  $postData = array(
172
  'client_id' => $theChampLoginOptions['insta_id'],
173
  'client_secret' => $theChampLoginOptions['insta_app_secret'],
@@ -200,7 +201,7 @@ function the_champ_connect(){
200
  $profileData = the_champ_sanitize_profile_data($profileData, 'instagram');
201
  $instagramRedirectUrl = isset($_SESSION['super_socializer_instagram_redirect']) && $_SESSION['super_socializer_instagram_redirect'] ? esc_url(trim($_SESSION['super_socializer_instagram_redirect'])) : home_url();
202
  unset($_SESSION['super_socializer_instagram_redirect']);
203
- $response = the_champ_user_auth($profileData, 'instagram', $yahooRedirectUrl);
204
  if($response == 'show form'){
205
  return;
206
  }
@@ -359,19 +360,18 @@ function the_champ_connect(){
359
  'redirect_uri' => home_url().'/SuperSocializerAuth/Line'
360
  ));
361
 
 
 
 
 
 
 
 
 
362
  $link = $heateorSsLine->getLink(7);
363
  wp_redirect($link);
364
  die;
365
  }
366
- if(function_exists('session_start')){
367
- if(session_status() == PHP_SESSION_NONE){
368
- session_start();
369
- }
370
- }
371
- if(!isset($_GET['code'])){
372
- // save referrer url in state
373
- $_SESSION['super_socializer_line_redirect'] = isset($_GET['super_socializer_line_redirect_to']) ? esc_url(trim($_GET['super_socializer_line_redirect_to'])) : home_url();
374
- }
375
  }
376
  if(isset($_GET['code']) && isset($_GET['state']) && remove_query_arg(array('code', 'state'), html_entity_decode(esc_url(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]))) == home_url().'/SuperSocializerAuth/Line'){
377
  if(function_exists('session_start')){
@@ -417,14 +417,16 @@ function the_champ_connect(){
417
  // windows live
418
  if((isset($_GET['SuperSocializerAuth']) && sanitize_text_field($_GET['SuperSocializerAuth']) == 'Live')){
419
  if(isset($theChampLoginOptions['providers']) && in_array('microsoft', $theChampLoginOptions['providers']) && isset($theChampLoginOptions['live_channel_id']) && $theChampLoginOptions['live_channel_id'] != '' && isset($theChampLoginOptions['live_channel_secret']) && $theChampLoginOptions['live_channel_secret'] != ''){
 
 
 
 
 
 
 
420
  wp_redirect("https://login.live.com/oauth20_authorize.srf?client_id=".$theChampLoginOptions['live_channel_id']."&scope=wl.emails,wl.basic&response_type=code&redirect_uri=".home_url()."/SuperSocializerAuth/Live");
421
  die;
422
  }
423
-
424
- if(!isset($_GET['code'])){
425
- // save referrer url in state
426
- $_SESSION['super_socializer_live_redirect'] = isset($_GET['super_socializer_live_redirect_to']) ? esc_url(trim($_GET['super_socializer_live_redirect_to'])) : home_url();
427
- }
428
  }
429
  if(isset($_GET['code']) && remove_query_arg(array('code'), html_entity_decode(esc_url(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]))) == home_url().'/SuperSocializerAuth/Live'){
430
  if(function_exists('session_start')){
@@ -432,7 +434,7 @@ function the_champ_connect(){
432
  session_start();
433
  }
434
  }
435
-
436
  $postData = array(
437
  'grant_type' => 'authorization_code',
438
  'code' => esc_attr(trim($_GET['code'])),
@@ -500,7 +502,7 @@ function the_champ_connect(){
500
  $facebook = new Facebook\Facebook(array(
501
  'app_id' => $theChampLoginOptions['fb_key'],
502
  'app_secret' => $theChampLoginOptions['fb_secret'],
503
- 'default_graph_version' => 'v3.2',
504
  ));
505
 
506
  $helper = $facebook->getRedirectLoginHelper();
@@ -599,7 +601,15 @@ function the_champ_connect(){
599
  $googleClient->setScopes(array('https://www.googleapis.com/auth/userinfo.email', 'https://www.googleapis.com/auth/userinfo.profile'));
600
  //Send Client Request
601
  $objOAuthService = new Google_Service_Oauth2($googleClient);
602
- $gpAuthUrl = $googleClient->createAuthUrl() . '&state=' . (isset($_GET['super_socializer_redirect_to']) ? esc_url(trim($_GET['super_socializer_redirect_to'])) : '');
 
 
 
 
 
 
 
 
603
  if(!isset($_GET['code']) && !isset($_GET['state'])){
604
  wp_redirect($gpAuthUrl);
605
  die;
@@ -610,33 +620,40 @@ function the_champ_connect(){
610
  if(isset($_GET['code']) && isset($_GET['state'])){
611
  $line_redirect_url = remove_query_arg(array('code', 'state'), html_entity_decode(esc_url(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])));
612
  if($line_redirect_url != home_url().'/SuperSocializerAuth/Line'){
613
- //Authenticate code from Google OAuth Flow
614
- if(is_object($googleClient)){
615
- $googleClient->authenticate($_GET['code']);
616
- $accessTokenStr = $googleClient->getAccessToken();
617
- if($accessTokenStr){
618
- $userData = $objOAuthService->userinfo->get();
619
- if(is_object($userData) && isset($userData -> id)){
620
- $profileData = the_champ_sanitize_profile_data($userData, 'google');
621
- if(isset($_GET['heateorMSEnabled'])){
622
- $profileData['mc_subscribe'] = 1;
623
- }
624
- $googleRedirectUrl = isset($_GET['state']) ? esc_url(trim($_GET['state'])) : home_url();
625
- $response = the_champ_user_auth($profileData, 'google', $googleRedirectUrl);
626
- if(is_array($response) && isset($response['message']) && $response['message'] == 'register' && (!isset($response['url']) || $response['url'] == '')){
627
- $redirectTo = the_champ_get_login_redirection_url($googleRedirectUrl, true);
628
- }elseif(isset($response['message']) && $response['message'] == 'linked'){
629
- $redirectTo = $googleRedirectUrl . (strpos($googleRedirectUrl, '?') !== false ? '&' : '?') . 'linked=1';
630
- }elseif(isset($response['message']) && $response['message'] == 'not linked'){
631
- $redirectTo = $googleRedirectUrl . (strpos($googleRedirectUrl, '?') !== false ? '&' : '?') . 'linked=0';
632
- }elseif(isset($response['url']) && $response['url'] != ''){
633
- $redirectTo = $response['url'];
634
- }else{
635
- $redirectTo = the_champ_get_login_redirection_url($googleRedirectUrl);
636
- }
637
- the_champ_close_login_popup($redirectTo);
638
- }
639
- }
 
 
 
 
 
 
 
640
  }
641
  }
642
  }
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.12.46
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.12.46');
15
 
16
  require 'helper.php';
17
 
152
  // Instagram
153
  if((isset($_GET['SuperSocializerAuth']) && sanitize_text_field($_GET['SuperSocializerAuth']) == 'Instagram')){
154
  if(isset($theChampLoginOptions['providers']) && in_array('instagram', $theChampLoginOptions['providers']) && isset($theChampLoginOptions['insta_id']) && $theChampLoginOptions['insta_id'] != '' && isset($theChampLoginOptions['insta_app_secret']) && $theChampLoginOptions['insta_app_secret'] != ''){
155
+ if(function_exists('session_start')){
156
+ if(session_status() == PHP_SESSION_NONE){
157
+ session_start();
158
+ }
159
+ }
160
  // save referrer url in state
161
  $_SESSION['super_socializer_instagram_redirect'] = isset($_GET['super_socializer_redirect_to']) ? esc_url(trim($_GET['super_socializer_redirect_to'])) : home_url();
162
+ wp_redirect("https://api.instagram.com/oauth/authorize?client_id=".$theChampLoginOptions['insta_id']."&scope=user_profile,user_media&response_type=code&language=en-us&redirect_uri=".urlencode(home_url()."/SuperSocializerAuth/Instagram"));
163
  }
164
  }
165
 
169
  session_start();
170
  }
171
  }
 
172
  $postData = array(
173
  'client_id' => $theChampLoginOptions['insta_id'],
174
  'client_secret' => $theChampLoginOptions['insta_app_secret'],
201
  $profileData = the_champ_sanitize_profile_data($profileData, 'instagram');
202
  $instagramRedirectUrl = isset($_SESSION['super_socializer_instagram_redirect']) && $_SESSION['super_socializer_instagram_redirect'] ? esc_url(trim($_SESSION['super_socializer_instagram_redirect'])) : home_url();
203
  unset($_SESSION['super_socializer_instagram_redirect']);
204
+ $response = the_champ_user_auth($profileData, 'instagram', $instagramRedirectUrl);
205
  if($response == 'show form'){
206
  return;
207
  }
360
  'redirect_uri' => home_url().'/SuperSocializerAuth/Line'
361
  ));
362
 
363
+ if(function_exists('session_start')){
364
+ if(session_status() == PHP_SESSION_NONE){
365
+ session_start();
366
+ }
367
+ }
368
+ // save referrer url in state
369
+ $_SESSION['super_socializer_line_redirect'] = isset($_GET['super_socializer_redirect_to']) ? esc_url(trim($_GET['super_socializer_redirect_to'])) : home_url();
370
+
371
  $link = $heateorSsLine->getLink(7);
372
  wp_redirect($link);
373
  die;
374
  }
 
 
 
 
 
 
 
 
 
375
  }
376
  if(isset($_GET['code']) && isset($_GET['state']) && remove_query_arg(array('code', 'state'), html_entity_decode(esc_url(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]))) == home_url().'/SuperSocializerAuth/Line'){
377
  if(function_exists('session_start')){
417
  // windows live
418
  if((isset($_GET['SuperSocializerAuth']) && sanitize_text_field($_GET['SuperSocializerAuth']) == 'Live')){
419
  if(isset($theChampLoginOptions['providers']) && in_array('microsoft', $theChampLoginOptions['providers']) && isset($theChampLoginOptions['live_channel_id']) && $theChampLoginOptions['live_channel_id'] != '' && isset($theChampLoginOptions['live_channel_secret']) && $theChampLoginOptions['live_channel_secret'] != ''){
420
+ if(function_exists('session_start')){
421
+ if(session_status() == PHP_SESSION_NONE){
422
+ session_start();
423
+ }
424
+ }
425
+ // save referrer url in state
426
+ $_SESSION['super_socializer_live_redirect'] = isset($_GET['super_socializer_redirect_to']) ? esc_url(trim($_GET['super_socializer_redirect_to'])) : home_url();
427
  wp_redirect("https://login.live.com/oauth20_authorize.srf?client_id=".$theChampLoginOptions['live_channel_id']."&scope=wl.emails,wl.basic&response_type=code&redirect_uri=".home_url()."/SuperSocializerAuth/Live");
428
  die;
429
  }
 
 
 
 
 
430
  }
431
  if(isset($_GET['code']) && remove_query_arg(array('code'), html_entity_decode(esc_url(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]))) == home_url().'/SuperSocializerAuth/Live'){
432
  if(function_exists('session_start')){
434
  session_start();
435
  }
436
  }
437
+
438
  $postData = array(
439
  'grant_type' => 'authorization_code',
440
  'code' => esc_attr(trim($_GET['code'])),
502
  $facebook = new Facebook\Facebook(array(
503
  'app_id' => $theChampLoginOptions['fb_key'],
504
  'app_secret' => $theChampLoginOptions['fb_secret'],
505
+ 'default_graph_version' => 'v7.0',
506
  ));
507
 
508
  $helper = $facebook->getRedirectLoginHelper();
601
  $googleClient->setScopes(array('https://www.googleapis.com/auth/userinfo.email', 'https://www.googleapis.com/auth/userinfo.profile'));
602
  //Send Client Request
603
  $objOAuthService = new Google_Service_Oauth2($googleClient);
604
+ if(function_exists('session_start')){
605
+ if(session_status() == PHP_SESSION_NONE){
606
+ session_start();
607
+ }
608
+ }
609
+ if(!isset($_GET['code']) && !isset($_GET['state'])){
610
+ $_SESSION['super_socializer_google_redirect'] = isset($_GET['super_socializer_redirect_to']) ? esc_url(trim($_GET['super_socializer_redirect_to'])) : esc_url(home_url());
611
+ }
612
+ $gpAuthUrl = $googleClient->createAuthUrl() . '&state=super_socializer_google';
613
  if(!isset($_GET['code']) && !isset($_GET['state'])){
614
  wp_redirect($gpAuthUrl);
615
  die;
620
  if(isset($_GET['code']) && isset($_GET['state'])){
621
  $line_redirect_url = remove_query_arg(array('code', 'state'), html_entity_decode(esc_url(the_champ_get_http().$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])));
622
  if($line_redirect_url != home_url().'/SuperSocializerAuth/Line'){
623
+ if(function_exists('session_start')){
624
+ if(session_status() == PHP_SESSION_NONE){
625
+ session_start();
626
+ }
627
+ }
628
+ if('super_socializer_google' == $_GET['state']){
629
+ //Authenticate code from Google OAuth Flow
630
+ if(is_object($googleClient)){
631
+ $googleClient->authenticate($_GET['code']);
632
+ $accessTokenStr = $googleClient->getAccessToken();
633
+ if($accessTokenStr){
634
+ $userData = $objOAuthService->userinfo->get();
635
+ if(is_object($userData) && isset($userData->id)){
636
+ $profileData = the_champ_sanitize_profile_data($userData, 'google');
637
+ if(isset($_GET['heateorMSEnabled'])){
638
+ $profileData['mc_subscribe'] = 1;
639
+ }
640
+ $googleRedirectUrl = isset($_SESSION['super_socializer_google_redirect']) ? esc_url(trim($_SESSION['super_socializer_google_redirect'])) : esc_url(home_url());
641
+ $response = the_champ_user_auth($profileData, 'google', $googleRedirectUrl);
642
+ if(is_array($response) && isset($response['message']) && $response['message'] == 'register' && (!isset($response['url']) || $response['url'] == '')){
643
+ $redirectTo = the_champ_get_login_redirection_url($googleRedirectUrl, true);
644
+ }elseif(isset($response['message']) && $response['message'] == 'linked'){
645
+ $redirectTo = $googleRedirectUrl . (strpos($googleRedirectUrl, '?') !== false ? '&' : '?') . 'linked=1';
646
+ }elseif(isset($response['message']) && $response['message'] == 'not linked'){
647
+ $redirectTo = $googleRedirectUrl . (strpos($googleRedirectUrl, '?') !== false ? '&' : '?') . 'linked=0';
648
+ }elseif(isset($response['url']) && $response['url'] != ''){
649
+ $redirectTo = $response['url'];
650
+ }else{
651
+ $redirectTo = the_champ_get_login_redirection_url($googleRedirectUrl);
652
+ }
653
+ the_champ_close_login_popup($redirectTo);
654
+ }
655
+ }
656
+ }
657
  }
658
  }
659
  }