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

Version Description

  • Fix: Parse error for alternate login page
Download this release

Release Info

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

Code changes from version 3.0.8 to 3.0.9

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.8
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.9
7
  Author: Nextendweb
8
  License: GPL2
9
  Text Domain: nextend-facebook-connect
nextend-social-login.php CHANGED
@@ -16,7 +16,7 @@ require_once(NSL_PATH . '/compat.php');
16
 
17
  class NextendSocialLogin {
18
 
19
- public static $version = '3.0.8';
20
 
21
  public static $nslPROMinVersion = '3.0.8';
22
 
@@ -547,7 +547,7 @@ class NextendSocialLogin {
547
  if ($isAlternatePage) {
548
  nocache_headers();
549
 
550
- if (!empty($_REQUEST['loginSocial'] || (isset($_GET['interim_login']) && $_GET['interim_login'] === 'nsl'))) {
551
 
552
  $action = isset($_GET['action']) ? $_GET['action'] : 'login';
553
  if (!in_array($action, array(
@@ -817,7 +817,7 @@ class NextendSocialLogin {
817
  $providers = array(self::$enabledProviders[$providerID]);
818
  }
819
 
820
- return self::renderButtonsWithContainer($atts['style'], $providers, $atts['redirect'], $atts['trackerdata']);
821
  }
822
 
823
  $link = filter_var($atts['link'], FILTER_VALIDATE_BOOLEAN);
@@ -838,6 +838,10 @@ class NextendSocialLogin {
838
  * @return string
839
  */
840
  public static function renderButtonsWithContainer($style = 'default', $providers = false, $redirect_to = false, $trackerData = false) {
 
 
 
 
841
 
842
  if (!isset(self::$styles[$style])) {
843
  $style = 'default';
@@ -866,7 +870,13 @@ class NextendSocialLogin {
866
  $buttons .= $provider->getConnectButton($style, $redirect_to, $trackerData);
867
  }
868
 
869
- $ret = '<div class="nsl-container ' . self::$styles[$style]['container'] . '">' . $buttons . '</div>';
 
 
 
 
 
 
870
  if (defined('DOING_AJAX') && DOING_AJAX) {
871
  $id = md5(uniqid('nsl-ajax-'));
872
  $ret = '<div id="' . $id . '">' . $ret . '</div><script>(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));});})(jQuery);</script>';
@@ -878,6 +888,7 @@ class NextendSocialLogin {
878
  return '';
879
  }
880
 
 
881
  public static function getCurrentPageURL() {
882
 
883
  if (defined('DOING_AJAX') && DOING_AJAX) {
16
 
17
  class NextendSocialLogin {
18
 
19
+ public static $version = '3.0.9';
20
 
21
  public static $nslPROMinVersion = '3.0.8';
22
 
547
  if ($isAlternatePage) {
548
  nocache_headers();
549
 
550
+ if (!empty($_REQUEST['loginSocial']) || (isset($_GET['interim_login']) && $_GET['interim_login'] === 'nsl')) {
551
 
552
  $action = isset($_GET['action']) ? $_GET['action'] : 'login';
553
  if (!in_array($action, array(
817
  $providers = array(self::$enabledProviders[$providerID]);
818
  }
819
 
820
+ return self::renderButtonsWithContainerAndTitle($atts['heading'], $atts['style'], $providers, $atts['redirect'], $atts['trackerdata']);
821
  }
822
 
823
  $link = filter_var($atts['link'], FILTER_VALIDATE_BOOLEAN);
838
  * @return string
839
  */
840
  public static function renderButtonsWithContainer($style = 'default', $providers = false, $redirect_to = false, $trackerData = false) {
841
+ return self::renderButtonsWithContainerAndTitle(false, $style, $providers, $redirect_to, $trackerData);
842
+ }
843
+
844
+ private static function renderButtonsWithContainerAndTitle($heading = false, $style = 'default', $providers = false, $redirect_to = false, $trackerData = false) {
845
 
846
  if (!isset(self::$styles[$style])) {
847
  $style = 'default';
870
  $buttons .= $provider->getConnectButton($style, $redirect_to, $trackerData);
871
  }
872
 
873
+ if (!empty($heading)) {
874
+ $heading = '<h2>' . $heading . '</h2>';
875
+ } else {
876
+ $heading = '';
877
+ }
878
+
879
+ $ret = '<div class="nsl-container ' . self::$styles[$style]['container'] . '">' . $heading . $buttons . '</div>';
880
  if (defined('DOING_AJAX') && DOING_AJAX) {
881
  $id = md5(uniqid('nsl-ajax-'));
882
  $ret = '<div id="' . $id . '">' . $ret . '</div><script>(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));});})(jQuery);</script>';
888
  return '';
889
  }
890
 
891
+
892
  public static function getCurrentPageURL() {
893
 
894
  if (defined('DOING_AJAX') && DOING_AJAX) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: social login, facebook, google, twitter, linkedin, register, login, social
4
  Donate link: https://www.facebook.com/nextendweb
5
  Requires at least: 4.5
6
  Tested up to: 4.9
7
- Stable tag: 3.0.8
8
  Requires PHP: 5.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -114,6 +114,9 @@ Unfortunately, currently there are no BuddyPress specific settings. However your
114
 
115
  == Changelog ==
116
 
 
 
 
117
  = 3.0.8 =
118
  * Feature: A page can be selected which handles the extra fields for Register flow.
119
  * Feature: A page can be selected which handles the OAuth flow.
4
  Donate link: https://www.facebook.com/nextendweb
5
  Requires at least: 4.5
6
  Tested up to: 4.9
7
+ Stable tag: 3.0.9
8
  Requires PHP: 5.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
114
 
115
  == Changelog ==
116
 
117
+ = 3.0.9 =
118
+ * Fix: Parse error for alternate login page
119
+
120
  = 3.0.8 =
121
  * Feature: A page can be selected which handles the extra fields for Register flow.
122
  * Feature: A page can be selected which handles the OAuth flow.