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

Version Description

  • [Security] Social Login is more secure (props to Calvin Hughes)
  • [Improvement] Social avatar functionality was not working when "get_avatar_url" function was being used to show avatar
Download this release

Release Info

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

Code changes from version 7.9.7 to 7.10

inc/social_login.php CHANGED
@@ -323,6 +323,43 @@ function the_champ_social_avatar($avatar, $avuser, $size, $default, $alt = ''){
323
  add_filter('get_avatar', 'the_champ_social_avatar', 100000, 5);
324
  add_filter('bp_core_fetch_avatar', 'the_champ_buddypress_avatar', 10, 2);
325
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  /**
327
  * Enable social avatar in Buddypress
328
  */
@@ -685,9 +722,15 @@ function the_champ_link_account($socialId, $provider, $userId){
685
  }
686
 
687
  /**
688
- * User authentication ajax after Social login.
689
  */
690
  function the_champ_user_auth_ajax(){
 
 
 
 
 
 
691
  if(isset($_POST['error'])){
692
  the_champ_log_error(sanitize_text_field($_POST['error']));
693
  }
323
  add_filter('get_avatar', 'the_champ_social_avatar', 100000, 5);
324
  add_filter('bp_core_fetch_avatar', 'the_champ_buddypress_avatar', 10, 2);
325
 
326
+ /**
327
+ * Replace default avatar url with the url of social avatar
328
+ */
329
+ function heateor_ss_social_avatar_url($url, $idOrEmail, $args){
330
+ global $theChampLoginOptions;
331
+ if(isset($theChampLoginOptions['enable']) && isset($theChampLoginOptions['avatar'])){
332
+ if(isset($theChampLoginOptions['avatar_quality']) && $theChampLoginOptions['avatar_quality'] == 'better'){
333
+ $avatarType = 'thechamp_large_avatar';
334
+ }else{
335
+ $avatarType = 'thechamp_avatar';
336
+ }
337
+ $userId = 0;
338
+ if(is_numeric($idOrEmail)){
339
+ $user = get_userdata($idOrEmail);
340
+ if($idOrEmail > 0){
341
+ $userId = $idOrEmail;
342
+ }
343
+ }elseif(is_object($idOrEmail)){
344
+ if(property_exists($idOrEmail, 'user_id') AND is_numeric($idOrEmail->user_id)){
345
+ $userId = $idOrEmail->user_id;
346
+ }
347
+ }elseif(is_email($idOrEmail)){
348
+ $user = get_user_by('email', $idOrEmail);
349
+ $userId = isset($user->ID) ? $user->ID : 0;
350
+ }
351
+
352
+ if($avatarType == 'thechamp_large_avatar' && get_user_meta($userId, $avatarType, true) == ''){
353
+ $avatarType = 'thechamp_avatar';
354
+ }
355
+ if(!empty($userId) && ($userAvatar = get_user_meta($userId, $avatarType, true)) !== false && strlen(trim($userAvatar)) > 0){
356
+ return $userAvatar;
357
+ }
358
+ }
359
+ return $url;
360
+ }
361
+ add_filter('get_avatar_url', 'heateor_ss_social_avatar_url', 10, 3);
362
+
363
  /**
364
  * Enable social avatar in Buddypress
365
  */
722
  }
723
 
724
  /**
725
+ * User authentication ajax after Social login
726
  */
727
  function the_champ_user_auth_ajax(){
728
+ if(!isset($_POST['security'])){
729
+ the_champ_ajax_response(array('status' => 0, 'message' => 'Invalid request'));
730
+ }
731
+ if(!check_ajax_referer('the-champ-sl-ajax-token', 'security')){
732
+ the_champ_ajax_response(array('status' => 0, 'message' => 'Invalid request'));
733
+ }
734
  if(isset($_POST['error'])){
735
  the_champ_log_error(sanitize_text_field($_POST['error']));
736
  }
js/front/combined.js CHANGED
@@ -6,7 +6,7 @@ function heateorSsBrowserMsg(){var a=document.createElement("div");a.innerHTML='
6
  function heateorSsLJLoginPopup(){var a=document.createElement("div");a.innerHTML='<button id="heateor_ss_lj_popup_close" class="close-button separated"><img src="'+theChampCloseIconPath+'" /></button><div id="the_champ_sharing_more_content"><div class="all-services" style="padding:20px 10px 0px 10px;height:auto;"><fieldset id="ss_openid"><legend>LiveJournal Login</legend><form action="'+theChampLJAuthUrl+'" method="post" onsubmit="this.login.disabled=true;"><input type="hidden" name="openid_action" value="SuperSocializerLogin"><div style="clear:both">'+theChampLJLoginUsernameString+'</div><div style="clear:both"><input type="text" name="openid_url" required class="openid_login"><input type="submit" name="login" value="Login"></div></form></fieldset></div></div></div>',a.setAttribute("id","the_champ_sharing_more_providers"),a.setAttribute("style","height:auto;");var b=document.createElement("div");b.setAttribute("id","heateor_ss_lj_popup_bg"),jQuery("body").append(a).append(b),document.getElementById("heateor_ss_lj_popup_bg").onclick=document.getElementById("heateor_ss_lj_popup_close").onclick=function(){a.parentNode.removeChild(a),b.parentNode.removeChild(b)}}
7
  if(typeof theChampLinkingRedirection=="undefined"){var theChampLinkingRedirection='';}
8
  // common.js
9
- function theChampLoadingIcon(){jQuery(".the_champ_login_container").html('<img id="the_champ_loading_image" src="'+theChampLoadingImgPath+'" />')}function theChampAjaxUserAuth(e,t){theChampLoadingIcon(),jQuery.ajax({type:"POST",dataType:"json",url:theChampAjaxUrl,data:{action:"the_champ_user_auth",profileData:e,provider:t,redirectionUrl:theChampTwitterRedirect?theChampTwitterRedirect:""},success:function(e){var t=theChampSiteUrl;if(1==e.status)t="register"==e.message?e.url&&""!=e.url?e.url:theChampRegRedirectionUrl+(theChampCommentFormLogin?"/#commentform":""):"linked"==e.message?theChampLinkingRedirection+"?linked=1":e.url&&""!=e.url?e.url:theChampRedirectionUrl+(theChampCommentFormLogin?"/#commentform":"");else if(null!==e.message.match(/ask/)){var a=e.message.split("|");t=theChampSiteUrl+"?SuperSocializerEmail=1&par="+a[1]}else 0==e.status&&"registration disabled"==e.message?t="undefined"!=typeof theChampDisableRegRedirect?theChampDisableRegRedirect:decodeURIComponent(theChampTwitterRedirect):"unverified"==e.message?t=theChampSiteUrl+"?SuperSocializerUnverified=1":"not linked"==e.message?t=theChampLinkingRedirection+"?linked=0":"provider exists"==e.message&&(t=theChampLinkingRedirection+"?linked=2");location.href=t},error:function(){location.href=decodeURIComponent(theChampRedirectionUrl)}})}
10
  function theChampInitiateLogin(a){var b=a.getAttribute("alt");if("Login with Facebook"==b)navigator.userAgent.match("CriOS")?location.href="https://www.facebook.com/dialog/oauth?client_id="+theChampFBKey+"&redirect_uri="+theChampRedirectionUrl+"&scope="+theChampFacebookScope:theChampAuthUserFB();else if("Login with Twitch"==b)theChampPopup(theChampTwitchAuthUrl);else if("Login with LiveJournal"==b)heateorSsLJLoginPopup();else if("Login with Steam"==b)theChampPopup(theChampSteamAuthUrl);else if("Login with Twitter"==b)theChampPopup(theChampTwitterAuthUrl);else if("Login with Xing"==b)theChampPopup(theChampXingAuthUrl);else{if("Login with Linkedin"==b)return IN.User.authorize(),!1;"Login with Google"==b?theChampInitializeGPLogin():"Login with Vkontakte"==b?theChampInitializeVKLogin():"Login with Instagram"==b&&theChampInitializeInstaLogin()}}
11
  function theChampDisplayLoginIcon(e,t){if("undefined"!=typeof jQuery)for(var a=0;a<t.length;a++)jQuery("."+t[a]).css("display","block");else for(var a=0;a<t.length;a++)for(var i=theChampGetElementsByClass(e,t[a]),h=0;h<i.length;h++)i[h].style.display="block"}function theChampValidateEmail(e){var t=/^(([^<>()[\]\\.,;:\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,}))$/;return t.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(){location.href=decodeURIComponent(theChampRedirectionUrl)}})}function theChampCapitaliseFirstLetter2(e){return e.charAt(0).toUpperCase()+e.slice(1)}theChampVerified&&theChampLoadEvent(function(){tb_show(theChampPopupTitle,theChampAjaxUrl)}),theChampEmailPopup&&theChampLoadEvent(function(){tb_show(theChampEmailPopupTitle,theChampEmailAjaxUrl)});var theChampCommentFormLogin=!1;
12
  // Google.js
6
  function heateorSsLJLoginPopup(){var a=document.createElement("div");a.innerHTML='<button id="heateor_ss_lj_popup_close" class="close-button separated"><img src="'+theChampCloseIconPath+'" /></button><div id="the_champ_sharing_more_content"><div class="all-services" style="padding:20px 10px 0px 10px;height:auto;"><fieldset id="ss_openid"><legend>LiveJournal Login</legend><form action="'+theChampLJAuthUrl+'" method="post" onsubmit="this.login.disabled=true;"><input type="hidden" name="openid_action" value="SuperSocializerLogin"><div style="clear:both">'+theChampLJLoginUsernameString+'</div><div style="clear:both"><input type="text" name="openid_url" required class="openid_login"><input type="submit" name="login" value="Login"></div></form></fieldset></div></div></div>',a.setAttribute("id","the_champ_sharing_more_providers"),a.setAttribute("style","height:auto;");var b=document.createElement("div");b.setAttribute("id","heateor_ss_lj_popup_bg"),jQuery("body").append(a).append(b),document.getElementById("heateor_ss_lj_popup_bg").onclick=document.getElementById("heateor_ss_lj_popup_close").onclick=function(){a.parentNode.removeChild(a),b.parentNode.removeChild(b)}}
7
  if(typeof theChampLinkingRedirection=="undefined"){var theChampLinkingRedirection='';}
8
  // common.js
9
+ function theChampLoadingIcon(){jQuery(".the_champ_login_container").html('<img id="the_champ_loading_image" src="'+theChampLoadingImgPath+'" />')}function theChampAjaxUserAuth(e,t){theChampLoadingIcon(),jQuery.ajax({type:"POST",dataType:"json",url:theChampAjaxUrl,data:{action:"the_champ_user_auth",security:the_champ_sl_ajax_token.security,profileData:e,provider:t,redirectionUrl:theChampTwitterRedirect?theChampTwitterRedirect:""},success:function(e){var t=theChampSiteUrl;if(1==e.status)t="register"==e.message?e.url&&""!=e.url?e.url:theChampRegRedirectionUrl+(theChampCommentFormLogin?"/#commentform":""):"linked"==e.message?theChampLinkingRedirection+"?linked=1":e.url&&""!=e.url?e.url:theChampRedirectionUrl+(theChampCommentFormLogin?"/#commentform":"");else if(null!==e.message.match(/ask/)){var a=e.message.split("|");t=theChampSiteUrl+"?SuperSocializerEmail=1&par="+a[1]}else 0==e.status&&"registration disabled"==e.message?t="undefined"!=typeof theChampDisableRegRedirect?theChampDisableRegRedirect:decodeURIComponent(theChampTwitterRedirect):"unverified"==e.message?t=theChampSiteUrl+"?SuperSocializerUnverified=1":"not linked"==e.message?t=theChampLinkingRedirection+"?linked=0":"provider exists"==e.message&&(t=theChampLinkingRedirection+"?linked=2");location.href=t},error:function(){location.href=decodeURIComponent(theChampRedirectionUrl)}})}
10
  function theChampInitiateLogin(a){var b=a.getAttribute("alt");if("Login with Facebook"==b)navigator.userAgent.match("CriOS")?location.href="https://www.facebook.com/dialog/oauth?client_id="+theChampFBKey+"&redirect_uri="+theChampRedirectionUrl+"&scope="+theChampFacebookScope:theChampAuthUserFB();else if("Login with Twitch"==b)theChampPopup(theChampTwitchAuthUrl);else if("Login with LiveJournal"==b)heateorSsLJLoginPopup();else if("Login with Steam"==b)theChampPopup(theChampSteamAuthUrl);else if("Login with Twitter"==b)theChampPopup(theChampTwitterAuthUrl);else if("Login with Xing"==b)theChampPopup(theChampXingAuthUrl);else{if("Login with Linkedin"==b)return IN.User.authorize(),!1;"Login with Google"==b?theChampInitializeGPLogin():"Login with Vkontakte"==b?theChampInitializeVKLogin():"Login with Instagram"==b&&theChampInitializeInstaLogin()}}
11
  function theChampDisplayLoginIcon(e,t){if("undefined"!=typeof jQuery)for(var a=0;a<t.length;a++)jQuery("."+t[a]).css("display","block");else for(var a=0;a<t.length;a++)for(var i=theChampGetElementsByClass(e,t[a]),h=0;h<i.length;h++)i[h].style.display="block"}function theChampValidateEmail(e){var t=/^(([^<>()[\]\\.,;:\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,}))$/;return t.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(){location.href=decodeURIComponent(theChampRedirectionUrl)}})}function theChampCapitaliseFirstLetter2(e){return e.charAt(0).toUpperCase()+e.slice(1)}theChampVerified&&theChampLoadEvent(function(){tb_show(theChampPopupTitle,theChampAjaxUrl)}),theChampEmailPopup&&theChampLoadEvent(function(){tb_show(theChampEmailPopupTitle,theChampEmailAjaxUrl)});var theChampCommentFormLogin=!1;
12
  // Google.js
js/front/social_login/common.js CHANGED
@@ -1 +1 @@
1
- function theChampLoadingIcon(){jQuery(".the_champ_login_container").html('<img id="the_champ_loading_image" src="'+theChampLoadingImgPath+'" />')}function theChampAjaxUserAuth(a,b){theChampLoadingIcon(),jQuery.ajax({type:"POST",dataType:"json",url:theChampAjaxUrl,data:{action:"the_champ_user_auth",profileData:a,provider:b,redirectionUrl:theChampTwitterRedirect||""},success:function(a){var b=theChampSiteUrl;if(1==a.status)b="register"==a.message?a.url&&""!=a.url?a.url:theChampRegRedirectionUrl+(theChampCommentFormLogin?"/#commentform":""):"linked"==a.message?theChampLinkingRedirection+"?linked=1":a.url&&""!=a.url?a.url:theChampRedirectionUrl+(theChampCommentFormLogin?"/#commentform":"");else if(null!==a.message.match(/ask/)){var c=a.message.split("|");b=theChampSiteUrl+"?SuperSocializerEmail=1&par="+c[1]}else 0==a.status&&"registration disabled"==a.message?b="undefined"!=typeof theChampDisableRegRedirect?theChampDisableRegRedirect:decodeURIComponent(theChampTwitterRedirect):"unverified"==a.message?b=theChampSiteUrl+"?SuperSocializerUnverified=1":"not linked"==a.message?b=theChampLinkingRedirection+"?linked=0":"provider exists"==a.message&&(b=theChampLinkingRedirection+"?linked=2");location.href=b},error:function(a,b,c){location.href=decodeURIComponent(theChampRedirectionUrl)}})}function theChampInitiateLogin(a){var b=a.getAttribute("alt");if("Login with Facebook"==b)navigator.userAgent.match("CriOS")?location.href="https://www.facebook.com/dialog/oauth?client_id="+theChampFBKey+"&redirect_uri="+theChampRedirectionUrl+"&scope="+theChampFacebookScope:theChampAuthUserFB();else if("Login with Twitch"==b)theChampPopup(theChampTwitchAuthUrl);else if("Login with LiveJournal"==b)heateorSsLJLoginPopup();else if("Login with Steam"==b)theChampPopup(theChampSteamAuthUrl);else if("Login with Twitter"==b)theChampPopup(theChampTwitterAuthUrl);else if("Login with Xing"==b)theChampPopup(theChampXingAuthUrl);else{if("Login with Linkedin"==b)return IN.User.authorize(),!1;"Login with Google"==b?theChampInitializeGPLogin():"Login with Vkontakte"==b?theChampInitializeVKLogin():"Login with Instagram"==b&&theChampInitializeInstaLogin()}}function theChampDisplayLoginIcon(a,b){if("undefined"!=typeof jQuery)for(var c=0;c<b.length;c++)jQuery("."+b[c]).css("display","block");else for(var c=0;c<b.length;c++)for(var d=theChampGetElementsByClass(a,b[c]),e=0;e<d.length;e++)d[e].style.display="block"}function theChampValidateEmail(a){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(a)}function the_champ_save_email(a){var b=document.getElementById("the_champ_email").value.trim(),c=document.getElementById("the_champ_confirm_email").value.trim();return"save"!=a.id||theChampValidateEmail(b)?b!=c?(document.getElementById("the_champ_error").innerHTML="Email addresses do not match",void jQuery("#TB_ajaxContent").css("height","auto")):void theChampCallAjax(function(){theChampSaveEmail(a.id,b)}):(document.getElementById("the_champ_error").innerHTML=theChampEmailPopupErrorMsg,void jQuery("#TB_ajaxContent").css("height","auto"))}function theChampSaveEmail(a,b){document.getElementById("the_champ_error").innerHTML='<img src="'+theChampLoadingImgPath+'" />',jQuery.ajax({type:"POST",dataType:"json",url:theChampAjaxUrl,data:{action:"the_champ_save_email",elemId:a,email:b,id:theChampEmailPopupUniqueId},success:function(a){window.history.pushState({html:"html",pageTitle:"page title"},"","?done=1"),1==a.status&&a.message.response&&"success"==a.message.response?location.href=a.message.url:1==a.status&&"success"==a.message?location.href=theChampRegRedirectionUrl:1==a.status&&"cancelled"==a.message?tb_remove():1==a.status&&"verify"==a.message?document.getElementById("TB_ajaxContent").innerHTML="<strong>"+theChampEmailPopupVerifyMessage+"</strong>":0==a.status&&(document.getElementById("the_champ_error").innerHTML=a.message,jQuery("#TB_ajaxContent").css("height","auto"))},error:function(a,b,c){location.href=decodeURIComponent(theChampRedirectionUrl)}})}function theChampCapitaliseFirstLetter2(a){return a.charAt(0).toUpperCase()+a.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;
1
+ function theChampLoadingIcon(){jQuery(".the_champ_login_container").html('<img id="the_champ_loading_image" src="'+theChampLoadingImgPath+'" />')}function theChampAjaxUserAuth(a,b){theChampLoadingIcon(),jQuery.ajax({type:"POST",dataType:"json",url:theChampAjaxUrl,data:{action:"the_champ_user_auth",security:the_champ_sl_ajax_token.security,profileData:a,provider:b,redirectionUrl:theChampTwitterRedirect||""},success:function(a){var b=theChampSiteUrl;if(1==a.status)b="register"==a.message?a.url&&""!=a.url?a.url:theChampRegRedirectionUrl+(theChampCommentFormLogin?"/#commentform":""):"linked"==a.message?theChampLinkingRedirection+"?linked=1":a.url&&""!=a.url?a.url:theChampRedirectionUrl+(theChampCommentFormLogin?"/#commentform":"");else if(null!==a.message.match(/ask/)){var c=a.message.split("|");b=theChampSiteUrl+"?SuperSocializerEmail=1&par="+c[1]}else 0==a.status&&"registration disabled"==a.message?b="undefined"!=typeof theChampDisableRegRedirect?theChampDisableRegRedirect:decodeURIComponent(theChampTwitterRedirect):"unverified"==a.message?b=theChampSiteUrl+"?SuperSocializerUnverified=1":"not linked"==a.message?b=theChampLinkingRedirection+"?linked=0":"provider exists"==a.message&&(b=theChampLinkingRedirection+"?linked=2");location.href=b},error:function(a,b,c){location.href=decodeURIComponent(theChampRedirectionUrl)}})}function theChampInitiateLogin(a){var b=a.getAttribute("alt");if("Login with Facebook"==b)navigator.userAgent.match("CriOS")?location.href="https://www.facebook.com/dialog/oauth?client_id="+theChampFBKey+"&redirect_uri="+theChampRedirectionUrl+"&scope="+theChampFacebookScope:theChampAuthUserFB();else if("Login with Twitch"==b)theChampPopup(theChampTwitchAuthUrl);else if("Login with LiveJournal"==b)heateorSsLJLoginPopup();else if("Login with Steam"==b)theChampPopup(theChampSteamAuthUrl);else if("Login with Twitter"==b)theChampPopup(theChampTwitterAuthUrl);else if("Login with Xing"==b)theChampPopup(theChampXingAuthUrl);else{if("Login with Linkedin"==b)return IN.User.authorize(),!1;"Login with Google"==b?theChampInitializeGPLogin():"Login with Vkontakte"==b?theChampInitializeVKLogin():"Login with Instagram"==b&&theChampInitializeInstaLogin()}}function theChampDisplayLoginIcon(a,b){if("undefined"!=typeof jQuery)for(var c=0;c<b.length;c++)jQuery("."+b[c]).css("display","block");else for(var c=0;c<b.length;c++)for(var d=theChampGetElementsByClass(a,b[c]),e=0;e<d.length;e++)d[e].style.display="block"}function theChampValidateEmail(a){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(a)}function the_champ_save_email(a){var b=document.getElementById("the_champ_email").value.trim(),c=document.getElementById("the_champ_confirm_email").value.trim();return"save"!=a.id||theChampValidateEmail(b)?b!=c?(document.getElementById("the_champ_error").innerHTML="Email addresses do not match",void jQuery("#TB_ajaxContent").css("height","auto")):void theChampCallAjax(function(){theChampSaveEmail(a.id,b)}):(document.getElementById("the_champ_error").innerHTML=theChampEmailPopupErrorMsg,void jQuery("#TB_ajaxContent").css("height","auto"))}function theChampSaveEmail(a,b){document.getElementById("the_champ_error").innerHTML='<img src="'+theChampLoadingImgPath+'" />',jQuery.ajax({type:"POST",dataType:"json",url:theChampAjaxUrl,data:{action:"the_champ_save_email",elemId:a,email:b,id:theChampEmailPopupUniqueId},success:function(a){window.history.pushState({html:"html",pageTitle:"page title"},"","?done=1"),1==a.status&&a.message.response&&"success"==a.message.response?location.href=a.message.url:1==a.status&&"success"==a.message?location.href=theChampRegRedirectionUrl:1==a.status&&"cancelled"==a.message?tb_remove():1==a.status&&"verify"==a.message?document.getElementById("TB_ajaxContent").innerHTML="<strong>"+theChampEmailPopupVerifyMessage+"</strong>":0==a.status&&(document.getElementById("the_champ_error").innerHTML=a.message,jQuery("#TB_ajaxContent").css("height","auto"))},error:function(a,b,c){location.href=decodeURIComponent(theChampRedirectionUrl)}})}function theChampCapitaliseFirstLetter2(a){return a.charAt(0).toUpperCase()+a.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;
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Heateor, the_champ, Hungarian Translator: László Tavaszi http://
3
  Donate link: https://www.heateor.com/donate?action=Super+Socializer
4
  Tags: social login, social share, social commenting, social comments, social plugin, profile data, social analytics, online identity, social profile storage, single sign-on, social media, facebook login
5
  Requires at least: 2.5.0
6
- Tested up to: 4.9.1
7
- Stable tag: 7.9.7
8
  License: GPLv2 or later
9
 
10
  The unique Social Plugin to let you integrate Social Login, Social Share and Social Comments at your website
@@ -200,13 +200,17 @@ Yes, we can help you with it. Just drop an email at support[ at ]heateor[ dot ]c
200
  1. **Social Login**: Social Login interface at Wordpress login form
201
  2. **Social Sharing**: A wide variety of sharing icons
202
  3. **Social Sharing**: Options to chosse size (minimum 16px, no upper limit) and shape (round and square) of sharing icons
203
- 4. **Social Sharing**: Around 90 social networks in Social Sharing
204
  5. **Social Commenting**: WordPress Commenting selected
205
  6. **Social Commenting**: Facebook Commenting selected
206
  7. **Social Commenting**: GooglePlus Commenting selected
207
  8. **Social Commenting**: Disqus Commenting selected
208
 
209
  == Changelog ==
 
 
 
 
210
  = 7.9.7 =
211
  * [New] Included "Super Socializer - Follow Icons" widget to integrate Social Media follow icons with your website
212
  * [Improvement] Users using Social Login were being logged out from website after closing the browser
@@ -1339,4 +1343,8 @@ Yes, we can help you with it. Just drop an email at support[ at ]heateor[ dot ]c
1339
  = 7.9.7 =
1340
  * [New] Included "Super Socializer - Follow Icons" widget to integrate Social Media follow icons with your website
1341
  * [Improvement] Users using Social Login were being logged out from website after closing the browser
1342
- * [Bugfix] Social share icons in "more share icons popup" were coming out of it in a few cases
 
 
 
 
3
  Donate link: https://www.heateor.com/donate?action=Super+Socializer
4
  Tags: social login, social share, social commenting, social comments, social plugin, profile data, social analytics, online identity, social profile storage, single sign-on, social media, facebook login
5
  Requires at least: 2.5.0
6
+ Tested up to: 4.9.2
7
+ Stable tag: 7.10
8
  License: GPLv2 or later
9
 
10
  The unique Social Plugin to let you integrate Social Login, Social Share and Social Comments at your website
200
  1. **Social Login**: Social Login interface at Wordpress login form
201
  2. **Social Sharing**: A wide variety of sharing icons
202
  3. **Social Sharing**: Options to chosse size (minimum 16px, no upper limit) and shape (round and square) of sharing icons
203
+ 4. **Social Sharing**: Around 100 social networks in Social Sharing
204
  5. **Social Commenting**: WordPress Commenting selected
205
  6. **Social Commenting**: Facebook Commenting selected
206
  7. **Social Commenting**: GooglePlus Commenting selected
207
  8. **Social Commenting**: Disqus Commenting selected
208
 
209
  == Changelog ==
210
+ = 7.10 =
211
+ * [Security] Social Login is more secure (props to <a href="https://github.com/calvinhughes" target="_blank">Calvin Hughes</a>)
212
+ * [Improvement] Social avatar functionality was not working when "get_avatar_url" function was being used to show avatar
213
+
214
  = 7.9.7 =
215
  * [New] Included "Super Socializer - Follow Icons" widget to integrate Social Media follow icons with your website
216
  * [Improvement] Users using Social Login were being logged out from website after closing the browser
1343
  = 7.9.7 =
1344
  * [New] Included "Super Socializer - Follow Icons" widget to integrate Social Media follow icons with your website
1345
  * [Improvement] Users using Social Login were being logged out from website after closing the browser
1346
+ * [Bugfix] Social share icons in "more share icons popup" were coming out of it in a few cases
1347
+
1348
+ = 7.10 =
1349
+ * [Security] Social Login is more secure (props to <a href="https://github.com/calvinhughes" target="_blank">Calvin Hughes</a>)
1350
+ * [Improvement] Social avatar functionality was not working when "get_avatar_url" function was being used to show avatar
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 and more.
6
- Version: 7.9.7
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.9.7');
15
 
16
  require 'helper.php';
17
 
@@ -657,6 +657,14 @@ function the_champ_frontend_scripts(){
657
  <?php
658
  if(!$combinedScript){
659
  wp_enqueue_script('the_champ_sl_common', plugins_url('js/front/social_login/common.js', __FILE__), array('jquery'), THE_CHAMP_SS_VERSION, $inFooter);
 
 
 
 
 
 
 
 
660
  }
661
  wp_enqueue_script('thickbox');
662
  wp_enqueue_style('thickbox');
@@ -781,6 +789,14 @@ function the_champ_frontend_scripts(){
781
 
782
  if($combinedScript){
783
  wp_enqueue_script('the_champ_combined_script', plugins_url('js/front/combined.js', __FILE__), array('jquery'), THE_CHAMP_SS_VERSION, $inFooter);
 
 
 
 
 
 
 
 
784
  }
785
  }
786
 
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 and more.
6
+ Version: 7.10
7
  Author: Team Heateor
8
  Author URI: https://www.heateor.com
9
  Text Domain: Super-Socializer
11
  License: GPL2+
12
  */
13
  defined('ABSPATH') or die("Cheating........Uh!!");
14
+ define('THE_CHAMP_SS_VERSION', '7.10');
15
 
16
  require 'helper.php';
17
 
657
  <?php
658
  if(!$combinedScript){
659
  wp_enqueue_script('the_champ_sl_common', plugins_url('js/front/social_login/common.js', __FILE__), array('jquery'), THE_CHAMP_SS_VERSION, $inFooter);
660
+ wp_localize_script(
661
+ 'the_champ_sl_common',
662
+ 'the_champ_sl_ajax_token',
663
+ [
664
+ 'ajax_url' => admin_url('admin-ajax.php'),
665
+ 'security' => wp_create_nonce('the-champ-sl-ajax-token'),
666
+ ]
667
+ );
668
  }
669
  wp_enqueue_script('thickbox');
670
  wp_enqueue_style('thickbox');
789
 
790
  if($combinedScript){
791
  wp_enqueue_script('the_champ_combined_script', plugins_url('js/front/combined.js', __FILE__), array('jquery'), THE_CHAMP_SS_VERSION, $inFooter);
792
+ wp_localize_script(
793
+ 'the_champ_combined_script',
794
+ 'the_champ_sl_ajax_token',
795
+ [
796
+ 'ajax_url' => admin_url('admin-ajax.php'),
797
+ 'security' => wp_create_nonce('the-champ-sl-ajax-token'),
798
+ ]
799
+ );
800
  }
801
  }
802