Social Login - Version 6.2.6

Version Description

  • Fix for bug in auto scroll script
  • Handled non-english characters in post url
Download this release

Release Info

Developer cyberlord92
Plugin Icon 128x128 Social Login
Version 6.2.6
Comparing to
See all releases

Code changes from version 6.2.5 to 6.2.6

class-mo-openid-login-widget.php CHANGED
@@ -905,9 +905,7 @@ if(mo_openid_is_customer_registered()) {
905
  }
906
 
907
  $user = get_user_by('email', $_SESSION['user_email'] );
908
- if(get_option('mo_openid_login_role_mapping')){
909
- $user->set_role( get_option('mo_openid_login_role_mapping') );
910
- }
911
  if(get_option('moopenid_social_login_avatar') && isset($_SESSION['user_picture'])){
912
  update_user_meta($user_id, 'moopenid_user_avatar',$_SESSION['user_picture']);
913
  }
@@ -1123,9 +1121,7 @@ if(mo_openid_is_customer_registered()) {
1123
  $_SESSION['social_user_id'] = $decrypted_user_id;
1124
 
1125
  $user = get_user_by('email', $user_email );
1126
- if(get_option('mo_openid_login_role_mapping')){
1127
- $user->set_role( get_option('mo_openid_login_role_mapping') );
1128
- }
1129
  if(get_option('moopenid_social_login_avatar') && isset($user_picture)){
1130
  update_user_meta($user_id, 'moopenid_user_avatar', $user_picture);
1131
  }
@@ -1304,9 +1300,7 @@ if(mo_openid_is_customer_registered()) {
1304
  $_SESSION['social_user_id'] = $decrypted_user_id;
1305
 
1306
  $user = get_user_by('id', $user_id );
1307
- if(get_option('mo_openid_login_role_mapping')){
1308
- $user->set_role( get_option('mo_openid_login_role_mapping') );
1309
- }
1310
  if(get_option('moopenid_social_login_avatar') && isset($user_picture)){
1311
  update_user_meta($user_id, 'moopenid_user_avatar', $user_picture);
1312
  }
@@ -1450,9 +1444,7 @@ if(mo_openid_is_customer_registered()) {
1450
  $_SESSION['social_user_id'] = $decrypted_user_id;
1451
 
1452
  $user = get_user_by('email', $user_email );
1453
- if(get_option('mo_openid_login_role_mapping')){
1454
- $user->set_role( get_option('mo_openid_login_role_mapping') );
1455
- }
1456
  if(get_option('moopenid_social_login_avatar') && isset($user_picture)){
1457
  update_user_meta($user_id, 'moopenid_user_avatar', $user_picture);
1458
  }
@@ -1887,9 +1879,7 @@ if(mo_openid_is_customer_registered()) {
1887
  $_SESSION['social_user_id'] = $social_user_id;
1888
 
1889
  $user = get_user_by('email', $user_email );
1890
- if(get_option('mo_openid_login_role_mapping')){
1891
- $user->set_role( get_option('mo_openid_login_role_mapping') );
1892
- }
1893
  if(get_option('moopenid_social_login_avatar') && isset($user_picture)){
1894
  update_user_meta($user_id, 'moopenid_user_avatar', $user_picture);
1895
  }
@@ -2038,9 +2028,6 @@ if(mo_openid_is_customer_registered()) {
2038
  $_SESSION['social_user_id'] = $social_user_id;
2039
 
2040
  $user = get_user_by('id', $user_id );
2041
- if(get_option('mo_openid_login_role_mapping')){
2042
- $user->set_role( get_option('mo_openid_login_role_mapping') );
2043
- }
2044
  if(get_option('moopenid_social_login_avatar') && isset($user_picture)){
2045
  update_user_meta($user_id, 'moopenid_user_avatar', $user_picture);
2046
  }
@@ -2592,6 +2579,13 @@ Thank you.';
2592
  }
2593
  }
2594
 
 
 
 
 
 
 
 
2595
  if(get_option('mo_openid_logout_redirection_enable') == 1){
2596
  add_filter( 'logout_url', 'mo_openid_redirect_after_logout',0,1);
2597
  }
@@ -2603,6 +2597,7 @@ Thank you.';
2603
  add_action( 'init', 'mo_openid_login_validate' );
2604
  //add_action( 'init', 'mo_openid_start_session' );
2605
  //add_action( 'wp_logout', 'mo_openid_end_session' );
 
2606
  add_action( 'wp_login', 'mo_openid_login_redirect', 10, 2);
2607
  add_action( 'wp_login', 'mo_openid_link_account', 9, 2);
2608
  add_filter( 'login_message', 'mo_openid_account_linking');
@@ -2678,8 +2673,10 @@ Thank you.';
2678
  $title = preg_replace('/&.+?;/', '', $title); // kill entities
2679
  $title = str_replace('.', '-', $title);
2680
 
2681
- //$title = preg_replace('/[^%a-z0-9 _-]/', '', $title);
2682
- $title = preg_replace( '|[^a-zあ-ん\p{Han}а-я0-9ㅂㅈㄷㄱ쇼ㅕㅑㅐㅔㅁㄴㅇㄹ호ㅓㅏㅣㅋㅌㅊ퓨ㅜㅡㅃㅉㄸㄲ썌ㅖ _.\-@]|iu', '', $title );
 
 
2683
  $title = preg_replace('/\s+/', '-', $title);
2684
  $title = preg_replace('|-+|', '-', $title);
2685
  $title = trim($title, '-');
905
  }
906
 
907
  $user = get_user_by('email', $_SESSION['user_email'] );
908
+
 
 
909
  if(get_option('moopenid_social_login_avatar') && isset($_SESSION['user_picture'])){
910
  update_user_meta($user_id, 'moopenid_user_avatar',$_SESSION['user_picture']);
911
  }
1121
  $_SESSION['social_user_id'] = $decrypted_user_id;
1122
 
1123
  $user = get_user_by('email', $user_email );
1124
+
 
 
1125
  if(get_option('moopenid_social_login_avatar') && isset($user_picture)){
1126
  update_user_meta($user_id, 'moopenid_user_avatar', $user_picture);
1127
  }
1300
  $_SESSION['social_user_id'] = $decrypted_user_id;
1301
 
1302
  $user = get_user_by('id', $user_id );
1303
+
 
 
1304
  if(get_option('moopenid_social_login_avatar') && isset($user_picture)){
1305
  update_user_meta($user_id, 'moopenid_user_avatar', $user_picture);
1306
  }
1444
  $_SESSION['social_user_id'] = $decrypted_user_id;
1445
 
1446
  $user = get_user_by('email', $user_email );
1447
+
 
 
1448
  if(get_option('moopenid_social_login_avatar') && isset($user_picture)){
1449
  update_user_meta($user_id, 'moopenid_user_avatar', $user_picture);
1450
  }
1879
  $_SESSION['social_user_id'] = $social_user_id;
1880
 
1881
  $user = get_user_by('email', $user_email );
1882
+
 
 
1883
  if(get_option('moopenid_social_login_avatar') && isset($user_picture)){
1884
  update_user_meta($user_id, 'moopenid_user_avatar', $user_picture);
1885
  }
2028
  $_SESSION['social_user_id'] = $social_user_id;
2029
 
2030
  $user = get_user_by('id', $user_id );
 
 
 
2031
  if(get_option('moopenid_social_login_avatar') && isset($user_picture)){
2032
  update_user_meta($user_id, 'moopenid_user_avatar', $user_picture);
2033
  }
2579
  }
2580
  }
2581
 
2582
+ function mo_openid_update_role($user_id=''){
2583
+ if(get_option('mo_openid_login_role_mapping') ){
2584
+ $user = get_user_by('ID',$user_id);
2585
+ $user->set_role( get_option('mo_openid_login_role_mapping') );
2586
+ }
2587
+ }
2588
+
2589
  if(get_option('mo_openid_logout_redirection_enable') == 1){
2590
  add_filter( 'logout_url', 'mo_openid_redirect_after_logout',0,1);
2591
  }
2597
  add_action( 'init', 'mo_openid_login_validate' );
2598
  //add_action( 'init', 'mo_openid_start_session' );
2599
  //add_action( 'wp_logout', 'mo_openid_end_session' );
2600
+ add_action( 'mo_user_register', 'mo_openid_update_role', 1, 1);
2601
  add_action( 'wp_login', 'mo_openid_login_redirect', 10, 2);
2602
  add_action( 'wp_login', 'mo_openid_link_account', 9, 2);
2603
  add_filter( 'login_message', 'mo_openid_account_linking');
2673
  $title = preg_replace('/&.+?;/', '', $title); // kill entities
2674
  $title = str_replace('.', '-', $title);
2675
 
2676
+ //Do not replace special characters for post
2677
+ if (!( 'query' == $context) ) {
2678
+ $title = preg_replace('|[^a-zあ-ん\p{Han}а-я0-9ㅂㅈㄷㄱ쇼ㅕㅑㅐㅔㅁㄴㅇㄹ호ㅓㅏㅣㅋㅌㅊ퓨ㅜㅡㅃㅉㄸㄲ썌ㅖ _.\-@]|iu', '', $title);
2679
+ }
2680
  $title = preg_replace('/\s+/', '-', $title);
2681
  $title = preg_replace('|-+|', '-', $title);
2682
  $title = trim($title, '-');
includes/js/social_login.js CHANGED
@@ -1,7 +1,7 @@
1
  jQuery(window).load(function () {
2
 
3
  // If cookie is set, scroll to the position saved in the cookie.
4
- if ( jQuery.cookie("scroll") !== null ) {
5
  jQuery(document).scrollTop( jQuery.cookie("scroll") );
6
  jQuery.cookie("scroll", null);
7
  }
1
  jQuery(window).load(function () {
2
 
3
  // If cookie is set, scroll to the position saved in the cookie.
4
+ if ( jQuery.cookie("scroll") !== 'null' ) {
5
  jQuery(document).scrollTop( jQuery.cookie("scroll") );
6
  jQuery.cookie("scroll", null);
7
  }
miniorange_openid_sso_settings.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Social Login, Social Sharing by miniOrange
5
  * Plugin URI: https://www.miniorange.com
6
  * Description: Allow your users to login, comment and share with Facebook, Google, Twitter, LinkedIn etc using customizable buttons.
7
- * Version: 6.2.5
8
  * Author: miniOrange
9
  * Author URI: https://www.miniorange.com
10
  * License: GPL2
4
  * Plugin Name: Social Login, Social Sharing by miniOrange
5
  * Plugin URI: https://www.miniorange.com
6
  * Description: Allow your users to login, comment and share with Facebook, Google, Twitter, LinkedIn etc using customizable buttons.
7
+ * Version: 6.2.6
8
  * Author: miniOrange
9
  * Author URI: https://www.miniorange.com
10
  * License: GPL2
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.miniorange.com
4
  Tags: social login, social, facebook, twitter, login
5
  Requires at least: 2.0.2
6
  Tested up to: 4.9.4
7
- Stable tag: 6.2.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -166,6 +166,10 @@ Please email us at info@miniorange.com. You can also submit your query from the
166
 
167
 
168
  == Changelog ==
 
 
 
 
169
  = 6.2.5 =
170
  * Fix in flow of Registration in plugin (OTP not validated)
171
  * Fix in sending email to admin
@@ -473,6 +477,10 @@ Please email us at info@miniorange.com. You can also submit your query from the
473
  * First version of Social Login, Social Sharing plugin.
474
 
475
  == Upgrade Notice ==
 
 
 
 
476
  = 6.2.5 =
477
  * Fix in flow of Registration in plugin (OTP not validated)
478
  * Fix in sending email to admin
4
  Tags: social login, social, facebook, twitter, login
5
  Requires at least: 2.0.2
6
  Tested up to: 4.9.4
7
+ Stable tag: 6.2.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
166
 
167
 
168
  == Changelog ==
169
+ = 6.2.6 =
170
+ * Fix for bug in auto scroll script
171
+ * Handled non-english characters in post url
172
+
173
  = 6.2.5 =
174
  * Fix in flow of Registration in plugin (OTP not validated)
175
  * Fix in sending email to admin
477
  * First version of Social Login, Social Sharing plugin.
478
 
479
  == Upgrade Notice ==
480
+ = 6.2.6 =
481
+ * Fix for bug in auto scroll script
482
+ * Handled non-english characters in post url
483
+
484
  = 6.2.5 =
485
  * Fix in flow of Registration in plugin (OTP not validated)
486
  * Fix in sending email to admin