Version Description
Download this release
Release Info
Developer | nextendweb |
Plugin | Nextend Social Login and Register (Facebook, Google, Twitter) |
Version | 3.0.17 |
Comparing to | |
See all releases |
Code changes from version 3.0.16 to 3.0.17
- admin/admin.php +12 -7
- nextend-facebook-connect.php +1 -1
- nextend-social-login.php +16 -6
- readme.txt +1 -1
admin/admin.php
CHANGED
@@ -472,14 +472,20 @@ class NextendSocialLoginAdmin {
|
|
472 |
*/
|
473 |
public static function apiCall($action, $args = array()) {
|
474 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
475 |
$http_args = array(
|
476 |
'timeout' => 15,
|
477 |
'user-agent' => 'WordPress',
|
478 |
-
'body' => array_merge(
|
479 |
-
'platform' => 'wordpress',
|
480 |
-
'domain' => NextendSocialLogin::getDomain(),
|
481 |
-
'license_key' => NextendSocialLogin::$settings->get('license_key')
|
482 |
-
), $args)
|
483 |
);
|
484 |
|
485 |
$request = wp_remote_get(self::getEndpoint($action), $http_args);
|
@@ -642,8 +648,7 @@ class NextendSocialLoginAdmin {
|
|
642 |
}
|
643 |
|
644 |
}
|
645 |
-
}
|
646 |
-
catch (ex) {
|
647 |
console.error(ex);
|
648 |
console.log(e);
|
649 |
}
|
472 |
*/
|
473 |
public static function apiCall($action, $args = array()) {
|
474 |
|
475 |
+
$body = array(
|
476 |
+
'platform' => 'wordpress',
|
477 |
+
'domain' => NextendSocialLogin::getDomain()
|
478 |
+
);
|
479 |
+
|
480 |
+
$activation_data = NextendSocialLogin::getLicense();
|
481 |
+
if ($activation_data !== false) {
|
482 |
+
$body['license_key'] = $activation_data['license_key'];
|
483 |
+
}
|
484 |
+
|
485 |
$http_args = array(
|
486 |
'timeout' => 15,
|
487 |
'user-agent' => 'WordPress',
|
488 |
+
'body' => array_merge($body, $args)
|
|
|
|
|
|
|
|
|
489 |
);
|
490 |
|
491 |
$request = wp_remote_get(self::getEndpoint($action), $http_args);
|
648 |
}
|
649 |
|
650 |
}
|
651 |
+
} catch (ex) {
|
|
|
652 |
console.error(ex);
|
653 |
console.log(e);
|
654 |
}
|
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.
|
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.17
|
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.
|
20 |
|
21 |
public static $nslPROMinVersion = '3.0.15';
|
22 |
|
@@ -1070,7 +1070,7 @@ class NextendSocialLogin {
|
|
1070 |
}
|
1071 |
|
1072 |
public static function getDomain() {
|
1073 |
-
return parse_url(site_url(), PHP_URL_HOST);
|
1074 |
}
|
1075 |
|
1076 |
public static function getRegisterFlowPage() {
|
@@ -1116,13 +1116,23 @@ class NextendSocialLogin {
|
|
1116 |
}
|
1117 |
|
1118 |
public static function getLicense($strict = true) {
|
1119 |
-
$licenses
|
1120 |
-
$currentDomain
|
|
|
1121 |
|
1122 |
for ($i = 0; $i < count($licenses); $i++) {
|
1123 |
-
$authorizedDomain
|
|
|
1124 |
|
1125 |
-
if ($authorizedDomain === $currentDomain || strrpos($currentDomain, $authorizedDomain) ===
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1126 |
return $licenses[$i];
|
1127 |
}
|
1128 |
}
|
16 |
|
17 |
class NextendSocialLogin {
|
18 |
|
19 |
+
public static $version = '3.0.17';
|
20 |
|
21 |
public static $nslPROMinVersion = '3.0.15';
|
22 |
|
1070 |
}
|
1071 |
|
1072 |
public static function getDomain() {
|
1073 |
+
return preg_replace('/^www\./', '', parse_url(site_url(), PHP_URL_HOST));
|
1074 |
}
|
1075 |
|
1076 |
public static function getRegisterFlowPage() {
|
1116 |
}
|
1117 |
|
1118 |
public static function getLicense($strict = true) {
|
1119 |
+
$licenses = NextendSocialLogin::$settings->get('licenses');
|
1120 |
+
$currentDomain = '.' . NextendSocialLogin::getDomain();
|
1121 |
+
$currentDomainLength = strlen($currentDomain);
|
1122 |
|
1123 |
for ($i = 0; $i < count($licenses); $i++) {
|
1124 |
+
$authorizedDomain = '.' . preg_replace('/^www\./', '', $licenses[$i]['domain']);
|
1125 |
+
$authorizedDomainLength = strlen($authorizedDomain);
|
1126 |
|
1127 |
+
if ($authorizedDomain === $currentDomain || strrpos($currentDomain, $authorizedDomain) === $currentDomainLength - $authorizedDomainLength) {
|
1128 |
+
return $licenses[$i];
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
if (strrpos($currentDomain, $authorizedDomain) === $currentDomainLength - $authorizedDomainLength) {
|
1132 |
+
return $licenses[$i];
|
1133 |
+
}
|
1134 |
+
|
1135 |
+
if (strrpos($authorizedDomain, $currentDomain) === $authorizedDomainLength - $currentDomainLength) {
|
1136 |
return $licenses[$i];
|
1137 |
}
|
1138 |
}
|
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: 5.0
|
7 |
-
Stable tag: 3.0.
|
8 |
Requires PHP: 5.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
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.17
|
8 |
Requires PHP: 5.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|