Nextend Social Login and Register (Facebook, Google, Twitter) - Version 3.0.19

Version Description

  • Fix: Shortcode - align parameter notice
  • Fix: Social buttons didn't show up properly when the action where we check jQuery was called multiple times.
  • Improvement: Google Select account modal before the login.

  • PRO: Fix: Jetpack - display our social buttons on custom Jetpack comment form

  • PRO: Feature: BuddyPress - option to disable the social buttons on the action: bp_sidebar_login_form

  • PRO: Improvement: LinkedIn v2 REST API update. Getting Started section updated with the new App creation steps.

  • PRO: Removed: LinkedIn Sync data

Download this release

Release Info

Developer nextendweb
Plugin Icon 128x128 Nextend Social Login and Register (Facebook, Google, Twitter)
Version 3.0.19
Comparing to
See all releases

Code changes from version 3.0.18 to 3.0.19

NSL/Persistent/Persistent.php CHANGED
@@ -74,6 +74,11 @@ class Persistent {
74
 
75
  $this->storage = $newStorage;
76
  }
 
 
 
 
 
77
  }
78
 
79
 
74
 
75
  $this->storage = $newStorage;
76
  }
77
+
78
+ public static function clear() {
79
+
80
+ self::$instance->storage->clear();
81
+ }
82
  }
83
 
84
 
admin/templates/header.php CHANGED
@@ -13,7 +13,7 @@ defined('ABSPATH') || die();
13
  <a href="<?php echo NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/nextend-social-login-docs/documentation/', 'header-menu-docs'); ?>"
14
  class="nsl-admin-header-nav" target="_blank"><?php _e('Docs', 'nextend-facebook-connect'); ?></a>
15
 
16
- <a href="<?php echo NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/contact-us/', 'header-menu-support'); ?>"
17
  class="nsl-admin-header-nav" target="_blank"><?php _e('Support', 'nextend-facebook-connect'); ?></a>
18
 
19
  <a href="<?php echo NextendSocialLoginAdmin::getAdminUrl('debug'); ?>"
13
  <a href="<?php echo NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/nextend-social-login-docs/documentation/', 'header-menu-docs'); ?>"
14
  class="nsl-admin-header-nav" target="_blank"><?php _e('Docs', 'nextend-facebook-connect'); ?></a>
15
 
16
+ <a href="<?php echo NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/contact-us/nextend-social-login-support/', 'header-menu-support'); ?>"
17
  class="nsl-admin-header-nav" target="_blank"><?php _e('Support', 'nextend-facebook-connect'); ?></a>
18
 
19
  <a href="<?php echo NextendSocialLoginAdmin::getAdminUrl('debug'); ?>"
admin/templates/settings/buddypress.php CHANGED
@@ -60,6 +60,21 @@ NextendSocialLoginAdmin::showProBox();
60
  </td>
61
  </tr>
62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
 
64
  <tr>
65
  <th scope="row"><?php _e('Login form', 'nextend-facebook-connect'); ?></th>
60
  </td>
61
  </tr>
62
 
63
+ <tr>
64
+ <th scope="row"><?php _e('Sidebar Login form', 'nextend-facebook-connect'); ?></th>
65
+ <td>
66
+ <fieldset>
67
+ <label><input type="radio" name="buddypress_sidebar_login"
68
+ value="" <?php if ($settings->get('buddypress_sidebar_login') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
69
+ <span><?php _e('Hide login buttons', 'nextend-facebook-connect'); ?></span></label><br>
70
+ <label><input type="radio" name="buddypress_sidebar_login"
71
+ value="show" <?php if ($settings->get('buddypress_sidebar_login') == 'show') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
72
+ <span><?php _e('Show login buttons', 'nextend-facebook-connect'); ?></span></label><br>
73
+ <p class="description" id="tagline-buddypress_sidebar_login"><?php _e('Some themes that use BuddyPress, display the social buttons twice in the same login form. This option can disable the one for: <b>bp_sidebar_login_form action</b>. ', 'nextend-facebook-connect'); ?></p>
74
+ </fieldset>
75
+ </td>
76
+
77
+ </tr>
78
 
79
  <tr>
80
  <th scope="row"><?php _e('Login form', 'nextend-facebook-connect'); ?></th>
includes/user.php CHANGED
@@ -106,6 +106,9 @@ class NextendSocialUser {
106
  if (apply_filters('nsl_is_register_allowed', true, $this->provider)) {
107
  $this->register($providerUserID, $email);
108
  } else {
 
 
 
109
  NextendSocialProvider::redirect(__('Authentication error', 'nextend-facebook-connect'), add_query_arg('registration', 'disabled', NextendSocialLogin::getLoginUrl()));
110
  exit;
111
  }
106
  if (apply_filters('nsl_is_register_allowed', true, $this->provider)) {
107
  $this->register($providerUserID, $email);
108
  } else {
109
+ //unset the cookie SESSnsl so users can re-authenticate
110
+ \NSL\Persistent\Persistent::clear();
111
+
112
  NextendSocialProvider::redirect(__('Authentication error', 'nextend-facebook-connect'), add_query_arg('registration', 'disabled', NextendSocialLogin::getLoginUrl()));
113
  exit;
114
  }
js/nsl.js CHANGED
@@ -168,7 +168,7 @@ function checkWebView() {
168
  return isWebView;
169
  }
170
 
171
- _nsl.push(function ($) {
172
  var targetWindow = _targetWindow || 'prefer-popup';
173
 
174
  $('a[data-plugin="nsl"][data-action="connect"],a[data-plugin="nsl"][data-action="link"]').on('click', function (e) {
168
  return isWebView;
169
  }
170
 
171
+ window._nsl.push(function ($) {
172
  var targetWindow = _targetWindow || 'prefer-popup';
173
 
174
  $('a[data-plugin="nsl"][data-action="connect"],a[data-plugin="nsl"][data-action="link"]').on('click', function (e) {
nextend-facebook-connect.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Nextend Social Login
4
  Plugin URI: https://nextendweb.com/
5
  Description: Nextend Social Login displays social login buttons for Facebook, Google and Twitter.
6
- Version: 3.0.18
7
  Author: Nextendweb
8
  License: GPL2
9
  Text Domain: nextend-facebook-connect
3
  Plugin Name: Nextend Social Login
4
  Plugin URI: https://nextendweb.com/
5
  Description: Nextend Social Login displays social login buttons for Facebook, Google and Twitter.
6
+ Version: 3.0.19
7
  Author: Nextendweb
8
  License: GPL2
9
  Text Domain: nextend-facebook-connect
nextend-social-login.php CHANGED
@@ -16,9 +16,9 @@ require_once(NSL_PATH . '/compat.php');
16
 
17
  class NextendSocialLogin {
18
 
19
- public static $version = '3.0.18';
20
 
21
- public static $nslPROMinVersion = '3.0.18';
22
 
23
  public static $proxyPage = false;
24
 
@@ -159,6 +159,7 @@ class NextendSocialLogin {
159
  'buddypress_login' => 'show',
160
  'buddypress_login_form_layout' => 'default',
161
  'buddypress_login_button_style' => 'default',
 
162
 
163
  'woocommerce_login' => 'after',
164
  'woocommerce_login_form_layout' => 'default',
@@ -304,7 +305,13 @@ class NextendSocialLogin {
304
  if (NextendSocialLogin::$settings->get('show_embedded_login_form') != 'hide') {
305
  add_filter('login_form_bottom', 'NextendSocialLogin::filterAddEmbeddedLoginFormButtons');
306
  }
307
- add_action('bp_sidebar_login_form', 'NextendSocialLogin::addLoginButtons');
 
 
 
 
 
 
308
 
309
  add_action('profile_personal_options', 'NextendSocialLogin::addLinkAndUnlinkButtons');
310
 
@@ -402,7 +409,7 @@ class NextendSocialLogin {
402
  }
403
 
404
  public static function checkJqueryLoaded() {
405
- echo '<script type="text/javascript">var _nsl=[];(function(a,d){var c=function(){if(a.jQuery===d)setTimeout(c,33);else{for(var b=0;b<_nsl.length;b++)_nsl[b].call(a,a.jQuery);_nsl={push:function(b){b.call(a,a.jQuery)}}}};c()})(window);</script>';
406
  }
407
 
408
  public static function loginHead() {
@@ -762,7 +769,8 @@ class NextendSocialLogin {
762
  'login' => 1,
763
  'link' => 0,
764
  'unlink' => 0,
765
- 'heading' => false
 
766
  ), $atts);
767
 
768
  if (!is_user_logged_in()) {
@@ -773,7 +781,6 @@ class NextendSocialLogin {
773
 
774
  $atts = array_merge(array(
775
  'style' => 'default',
776
- 'align' => 'left',
777
  'provider' => false,
778
  'redirect' => false,
779
  'trackerdata' => false
@@ -855,7 +862,7 @@ class NextendSocialLogin {
855
  $ret = '<div class="nsl-container ' . self::$styles[$style]['container'] . '" data-align="' . esc_attr($align) . '">' . $heading . $buttons . '</div>';
856
  if (defined('DOING_AJAX') && DOING_AJAX) {
857
  $id = md5(uniqid('nsl-ajax-'));
858
- $ret = '<div id="' . $id . '">' . $ret . '</div><script>_nsl.push(function($){$("#' . $id . '").find("a").each(function(i,el){var href=$(el).attr("href");if(href.indexOf("?") === -1){href+="?"}else{href+="&"}$(el).attr("href", href+"redirect="+encodeURIComponent(window.location.href));});});</script>';
859
  }
860
 
861
  return $ret;
16
 
17
  class NextendSocialLogin {
18
 
19
+ public static $version = '3.0.19';
20
 
21
+ public static $nslPROMinVersion = '3.0.19';
22
 
23
  public static $proxyPage = false;
24
 
159
  'buddypress_login' => 'show',
160
  'buddypress_login_form_layout' => 'default',
161
  'buddypress_login_button_style' => 'default',
162
+ 'buddypress_sidebar_login' => 'show',
163
 
164
  'woocommerce_login' => 'after',
165
  'woocommerce_login_form_layout' => 'default',
305
  if (NextendSocialLogin::$settings->get('show_embedded_login_form') != 'hide') {
306
  add_filter('login_form_bottom', 'NextendSocialLogin::filterAddEmbeddedLoginFormButtons');
307
  }
308
+
309
+ //some themes trigger both the bp_sidebar_login_form action and the login_form action.
310
+ switch (NextendSocialLogin::$settings->get('buddypress_sidebar_login')) {
311
+ case 'show':
312
+ add_action('bp_sidebar_login_form', 'NextendSocialLogin::addLoginButtons');
313
+ break;
314
+ }
315
 
316
  add_action('profile_personal_options', 'NextendSocialLogin::addLinkAndUnlinkButtons');
317
 
409
  }
410
 
411
  public static function checkJqueryLoaded() {
412
+ echo '<script type="text/javascript">(function(a,d){if(a._nsl===d){a._nsl=[];var c=function(){if(a.jQuery===d)setTimeout(c,33);else{for(var b=0;b<a._nsl.length;b++)a._nsl[b].call(a,a.jQuery);a._nsl={push:function(b){b.call(a,a.jQuery)}}}};c()}})(window);</script>';
413
  }
414
 
415
  public static function loginHead() {
769
  'login' => 1,
770
  'link' => 0,
771
  'unlink' => 0,
772
+ 'heading' => false,
773
+ 'align' => 'left',
774
  ), $atts);
775
 
776
  if (!is_user_logged_in()) {
781
 
782
  $atts = array_merge(array(
783
  'style' => 'default',
 
784
  'provider' => false,
785
  'redirect' => false,
786
  'trackerdata' => false
862
  $ret = '<div class="nsl-container ' . self::$styles[$style]['container'] . '" data-align="' . esc_attr($align) . '">' . $heading . $buttons . '</div>';
863
  if (defined('DOING_AJAX') && DOING_AJAX) {
864
  $id = md5(uniqid('nsl-ajax-'));
865
+ $ret = '<div id="' . $id . '">' . $ret . '</div><script>window._nsl.push(function($){$("#' . $id . '").find("a").each(function(i,el){var href=$(el).attr("href");if(href.indexOf("?") === -1){href+="?"}else{href+="&"}$(el).attr("href", href+"redirect="+encodeURIComponent(window.location.href));});});</script>';
866
  }
867
 
868
  return $ret;
providers/google/google-client.php CHANGED
@@ -10,7 +10,7 @@ class NextendSocialProviderGoogleClient extends NextendSocialOauth2 {
10
  );
11
 
12
  private $accessType = 'offline';
13
- private $approvalPrompt = 'force';
14
 
15
  protected $scopes = array(
16
  'email',
@@ -38,15 +38,15 @@ class NextendSocialProviderGoogleClient extends NextendSocialOauth2 {
38
  public function createAuthUrl() {
39
  return add_query_arg(array(
40
  'access_type' => urlencode($this->accessType),
41
- 'approval_prompt' => urlencode($this->approvalPrompt)
42
  ), parent::createAuthUrl());
43
  }
44
 
45
  /**
46
- * @param string $approvalPrompt
47
  */
48
- public function setApprovalPrompt($approvalPrompt) {
49
- $this->approvalPrompt = $approvalPrompt;
50
  }
51
 
52
  /**
10
  );
11
 
12
  private $accessType = 'offline';
13
+ private $prompt = 'select_account';
14
 
15
  protected $scopes = array(
16
  'email',
38
  public function createAuthUrl() {
39
  return add_query_arg(array(
40
  'access_type' => urlencode($this->accessType),
41
+ 'prompt' => urlencode($this->prompt)
42
  ), parent::createAuthUrl());
43
  }
44
 
45
  /**
46
+ * @param string $prompt
47
  */
48
+ public function setPrompt($prompt) {
49
+ $this->prompt = $prompt;
50
  }
51
 
52
  /**
providers/google/google.php CHANGED
@@ -171,7 +171,7 @@ class NextendSocialProviderGoogle extends NextendSocialProvider {
171
  $this->client->setClientId($this->settings->get('client_id'));
172
  $this->client->setClientSecret($this->settings->get('client_secret'));
173
  $this->client->setRedirectUri($this->getRedirectUri());
174
- $this->client->setApprovalPrompt('auto');
175
  }
176
 
177
  return $this->client;
171
  $this->client->setClientId($this->settings->get('client_id'));
172
  $this->client->setClientSecret($this->settings->get('client_secret'));
173
  $this->client->setRedirectUri($this->getRedirectUri());
174
+ $this->client->setPrompt('select_account');
175
  }
176
 
177
  return $this->client;
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: nextendweb
3
  Tags: social login, facebook, google, twitter, linkedin, register, login, social, nextend facebook connect, social sign in
4
  Donate link: https://www.facebook.com/nextendweb
5
  Requires at least: 4.5
6
- Tested up to: 5.0
7
- Stable tag: 3.0.18
8
  Requires PHP: 5.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -15,7 +15,7 @@ One click registration & login plugin for Facebook, Google, Twitter and more. Qu
15
 
16
  >Nextend Facebook Connect, Nextend Google Connect and Nextend Twitter Connect are discontinued and Nextend Social Login takes their place. Feel free to update the old plugins and enjoy Nextend Social Login.
17
 
18
- >[Demo](https://try-nextend-social-login.nextendweb.com/wp-login.php) | [Tutorial videos](https://www.youtube.com/watch?v=buPTza2-6xc&list=PLSawiBnEUNftt3EDqnP2jIXeh6q0pZ5D8&index=1) | [Docs](https://nextendweb.com/nextend-social-login-docs/documentation/) | [Support](https://nextendweb.com/contact-us/) | [Pro Addon](https://nextendweb.com/social-login/)
19
 
20
  Nextend Social Login is a professional, easy to use and free WordPress plugin. It lets your visitors register and login to your site using their social profiles instead of forcing them to spend valuable time to fill out the default registration form. Besides that, they don't need to wait for validation emails or keep track of their username and password anymore.
21
 
@@ -79,13 +79,13 @@ If the permission is given to the app, there are still [other factors](https://n
79
  In the Pro Addon it's possible to ask an email address if it's not returned by Facebook.
80
 
81
  = 4. What should I do when I experience any problems? =
82
- [Contact us](https://nextendweb.com/contact-us/) via email and explain the issue you have.
83
 
84
  = 5. How can I translate the plugin? =
85
- Find the `.pot` file at the /languages folder. From that you can start the translation process. [Drop us](https://nextendweb.com/contact-us/) the final `.po` and `.mo` files and we'll put them to the next releases.
86
 
87
  = 6. I have a feature request... =
88
- That's awesome! [Contact us](https://nextendweb.com/contact-us/) and let's discuss the details.
89
 
90
  = 7. Does Nextend Social Login work with BuddyPress? =
91
  Nextend Social Login Free version does not have BuddyPress specific settings and the login buttons will not appear there. However your users will still be able login and register at the normal WordPress login page. Then when logged in they can use every BuddyPress feature their current user role have access to.
@@ -119,6 +119,16 @@ Using the Pro Addon you can set where the login buttons should appear on the Reg
119
  2. Nextend Social Login and Register in the profile page for account linking
120
 
121
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
122
  = 3.0.18 =
123
  * Fix: _nsl is not defined error
124
  * Fix: The shortcode of [Page for register flow](https://nextendweb.com/nextend-social-login-docs/global-settings/) will be rendered into the correct position.
3
  Tags: social login, facebook, google, twitter, linkedin, register, login, social, nextend facebook connect, social sign in
4
  Donate link: https://www.facebook.com/nextendweb
5
  Requires at least: 4.5
6
+ Tested up to: 5.1
7
+ Stable tag: 3.0.19
8
  Requires PHP: 5.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
15
 
16
  >Nextend Facebook Connect, Nextend Google Connect and Nextend Twitter Connect are discontinued and Nextend Social Login takes their place. Feel free to update the old plugins and enjoy Nextend Social Login.
17
 
18
+ >[Demo](https://try-nextend-social-login.nextendweb.com/wp-login.php) | [Tutorial videos](https://www.youtube.com/watch?v=buPTza2-6xc&list=PLSawiBnEUNftt3EDqnP2jIXeh6q0pZ5D8&index=1) | [Docs](https://nextendweb.com/nextend-social-login-docs/documentation/) | [Support](https://nextendweb.com/contact-us/nextend-social-login-support/) | [Pro Addon](https://nextendweb.com/social-login/)
19
 
20
  Nextend Social Login is a professional, easy to use and free WordPress plugin. It lets your visitors register and login to your site using their social profiles instead of forcing them to spend valuable time to fill out the default registration form. Besides that, they don't need to wait for validation emails or keep track of their username and password anymore.
21
 
79
  In the Pro Addon it's possible to ask an email address if it's not returned by Facebook.
80
 
81
  = 4. What should I do when I experience any problems? =
82
+ [Contact us](https://nextendweb.com/contact-us/nextend-social-login-support/) via email and explain the issue you have.
83
 
84
  = 5. How can I translate the plugin? =
85
+ Find the `.pot` file at the /languages folder. From that you can start the translation process. [Drop us](https://nextendweb.com/contact-us/nextend-social-login-support/) the final `.po` and `.mo` files and we'll put them to the next releases.
86
 
87
  = 6. I have a feature request... =
88
+ That's awesome! [Contact us](https://nextendweb.com/contact-us/nextend-social-login-support/) and let's discuss the details.
89
 
90
  = 7. Does Nextend Social Login work with BuddyPress? =
91
  Nextend Social Login Free version does not have BuddyPress specific settings and the login buttons will not appear there. However your users will still be able login and register at the normal WordPress login page. Then when logged in they can use every BuddyPress feature their current user role have access to.
119
  2. Nextend Social Login and Register in the profile page for account linking
120
 
121
  == Changelog ==
122
+ = 3.0.19 =
123
+ * Fix: Shortcode - align parameter notice
124
+ * Fix: Social buttons didn't show up properly when the action where we check jQuery was called multiple times.
125
+ * Improvement: Google Select account modal before the login.
126
+
127
+ * PRO: Fix: Jetpack - display our social buttons on custom Jetpack comment form
128
+ * PRO: Feature: BuddyPress - option to disable the social buttons on the action: bp_sidebar_login_form
129
+ * PRO: Improvement: LinkedIn v2 REST API update. Getting Started section updated with the new App creation steps.
130
+ * PRO: Removed: [LinkedIn Sync data](https://nextendweb.com/nextend-social-login-docs/provider-linkedin/#sync_data)
131
+
132
  = 3.0.18 =
133
  * Fix: _nsl is not defined error
134
  * Fix: The shortcode of [Page for register flow](https://nextendweb.com/nextend-social-login-docs/global-settings/) will be rendered into the correct position.
template-parts/embedded-login/below.php CHANGED
@@ -1,5 +1,5 @@
1
  <script type="text/javascript">
2
- _nsl.push(function ($) {
3
  $(document).ready(function () {
4
  var $container = $('#<?php echo $containerID; ?>');
5
  $container.find('.nsl-container')
1
  <script type="text/javascript">
2
+ window._nsl.push(function ($) {
3
  $(document).ready(function () {
4
  var $container = $('#<?php echo $containerID; ?>');
5
  $container.find('.nsl-container')
template-parts/login/below.php CHANGED
@@ -1,5 +1,5 @@
1
  <script type="text/javascript">
2
- _nsl.push(function ($) {
3
  $(document).ready(function () {
4
  var $main = $('#nsl-custom-login-form-main');
5
 
1
  <script type="text/javascript">
2
+ window._nsl.push(function ($) {
3
  $(document).ready(function () {
4
  var $main = $('#nsl-custom-login-form-main');
5