Version Description
- Fix: _nsl is not defined error
- Fix: The shortcode of Page for register flow will be rendered into the correct position.
Fix: Google - G+ logo is replaced with simple G logo.
PRO: Fix: Target window will open the auth window of the provider in the selected way again.
PRO: Fix: Update notice when the Free and Pro Addon are not compatible.
PRO: Feature: Social buttons for BuddyPress - Login widget
PRO: Feature: Option to disable the WordPress Toolbar on the front-end for some roles.
PRO: New provider - Yahoo
PRO: Note: We had plans to implement the Instagram provider. Unfortunately we need to change our mind, since the Instagram API will become deprecated soon!
Download this release
Release Info
Developer | nextendweb |
Plugin | Nextend Social Login and Register (Facebook, Google, Twitter) |
Version | 3.0.18 |
Comparing to | |
See all releases |
Code changes from version 3.0.17 to 3.0.18
- admin/admin.php +5 -1
- admin/images/buttons/default.png +0 -0
- admin/images/buttons/icon.png +0 -0
- admin/images/google/uniform.png +0 -0
- admin/templates-provider/usage.php +6 -0
- admin/templates/pro-addon.php +18 -0
- admin/templates/settings/buddypress.php +71 -0
- admin/templates/settings/general-pro.php +28 -0
- admin/upgrader.php +7 -0
- includes/userData.php +8 -4
- js/nsl.js +1 -1
- nextend-facebook-connect.php +1 -1
- nextend-social-login.php +12 -7
- providers/facebook/admin/getting-started.php +1 -1
- providers/google/google.php +17 -11
- providers/google/google.png +0 -0
- providers/yahoo/yahoo.php +14 -0
- providers/yahoo/yahoo.png +0 -0
- readme.txt +16 -1
admin/admin.php
CHANGED
@@ -380,12 +380,12 @@ class NextendSocialLoginAdmin {
|
|
380 |
'domain' => NextendSocialLogin::getDomain()
|
381 |
)
|
382 |
);
|
383 |
-
|
384 |
}
|
385 |
} catch (Exception $e) {
|
386 |
\NSL\Notices::addError($e->getMessage());
|
387 |
}
|
388 |
} else {
|
|
|
389 |
$newData['licenses'] = array();
|
390 |
}
|
391 |
break;
|
@@ -480,6 +480,8 @@ class NextendSocialLoginAdmin {
|
|
480 |
$activation_data = NextendSocialLogin::getLicense();
|
481 |
if ($activation_data !== false) {
|
482 |
$body['license_key'] = $activation_data['license_key'];
|
|
|
|
|
483 |
}
|
484 |
|
485 |
$http_args = array(
|
@@ -525,6 +527,8 @@ class NextendSocialLoginAdmin {
|
|
525 |
return 'activated';
|
526 |
} else if (!current_user_can('install_plugins')) {
|
527 |
return 'no-capability';
|
|
|
|
|
528 |
} else {
|
529 |
if (file_exists(WP_PLUGIN_DIR . '/nextend-social-login-pro/nextend-social-login-pro.php')) {
|
530 |
return 'installed';
|
380 |
'domain' => NextendSocialLogin::getDomain()
|
381 |
)
|
382 |
);
|
|
|
383 |
}
|
384 |
} catch (Exception $e) {
|
385 |
\NSL\Notices::addError($e->getMessage());
|
386 |
}
|
387 |
} else {
|
388 |
+
delete_site_transient('update_plugins');
|
389 |
$newData['licenses'] = array();
|
390 |
}
|
391 |
break;
|
480 |
$activation_data = NextendSocialLogin::getLicense();
|
481 |
if ($activation_data !== false) {
|
482 |
$body['license_key'] = $activation_data['license_key'];
|
483 |
+
} else {
|
484 |
+
$body['license_key'] = '';
|
485 |
}
|
486 |
|
487 |
$http_args = array(
|
527 |
return 'activated';
|
528 |
} else if (!current_user_can('install_plugins')) {
|
529 |
return 'no-capability';
|
530 |
+
} else if (class_exists('NextendSocialLoginPRO', false) && version_compare(NextendSocialLoginPRO::$version, NextendSocialLogin::$nslPROMinVersion, '<')) {
|
531 |
+
return 'not-compatible';
|
532 |
} else {
|
533 |
if (file_exists(WP_PLUGIN_DIR . '/nextend-social-login-pro/nextend-social-login-pro.php')) {
|
534 |
return 'installed';
|
admin/images/buttons/default.png
CHANGED
Binary file
|
admin/images/buttons/icon.png
CHANGED
Binary file
|
admin/images/google/uniform.png
CHANGED
Binary file
|
admin/templates-provider/usage.php
CHANGED
@@ -8,6 +8,12 @@ $provider = $this->getProvider();
|
|
8 |
|
9 |
<h4><?php _e('Shortcode', 'nextend-facebook-connect'); ?></h4>
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
<?php
|
12 |
$shortcodes = array(
|
13 |
'[nextend_social_login]',
|
8 |
|
9 |
<h4><?php _e('Shortcode', 'nextend-facebook-connect'); ?></h4>
|
10 |
|
11 |
+
<p>
|
12 |
+
<b><?php _e('Important!', 'nextend-facebook-connect'); ?></b>
|
13 |
+
<?php _e('The shortcodes are only rendered for users who haven\'t logged in yet!', 'nextend-facebook-connect'); ?>
|
14 |
+
<a href="https://nextendweb.com/nextend-social-login-docs/theme-developer/#shortcode"><?php _e('See the full list of shortcode parameters.','nextend-facebook-connect'); ?></a>
|
15 |
+
</p>
|
16 |
+
|
17 |
<?php
|
18 |
$shortcodes = array(
|
19 |
'[nextend_social_login]',
|
admin/templates/pro-addon.php
CHANGED
@@ -111,6 +111,21 @@ function nsl_license_not_installed($view) {
|
|
111 |
<?php
|
112 |
}
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
function nsl_license_activated($view) {
|
115 |
?>
|
116 |
|
@@ -148,6 +163,9 @@ function nsl_license_activated($view) {
|
|
148 |
case 'no-license':
|
149 |
NextendSocialLoginAdmin::authorizeBox($view);
|
150 |
break;
|
|
|
|
|
|
|
151 |
case 'activated':
|
152 |
nsl_license_activated($view);
|
153 |
break;
|
111 |
<?php
|
112 |
}
|
113 |
|
114 |
+
function nsl_not_compatible($view) {
|
115 |
+
$file = 'nextend-social-login-pro/nextend-social-login-pro.php';
|
116 |
+
?>
|
117 |
+
<div class="nsl-box nsl-box-blue">
|
118 |
+
<h2 class="title"><?php _e('Not compatible!', 'nextend-facebook-connect'); ?></h2>
|
119 |
+
<p><?php printf(__('%1$s and %2$s are not compatible. Please update %2$s to version %3$s or newer.', 'nextend-facebook-connect'), "Nextend Social Login", "Nextend Social Login Pro Addon", NextendSocialLogin::$nslPROMinVersion); ?></p>
|
120 |
+
|
121 |
+
<p>
|
122 |
+
<a href="<?php echo esc_url(wp_nonce_url(admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file)); ?>"
|
123 |
+
class="button button-primary"><?php _e('Update Pro Addon', 'nextend-facebook-connect'); ?></a>
|
124 |
+
</p>
|
125 |
+
</div>
|
126 |
+
<?php
|
127 |
+
}
|
128 |
+
|
129 |
function nsl_license_activated($view) {
|
130 |
?>
|
131 |
|
163 |
case 'no-license':
|
164 |
NextendSocialLoginAdmin::authorizeBox($view);
|
165 |
break;
|
166 |
+
case 'not-compatible':
|
167 |
+
nsl_not_compatible($view);
|
168 |
+
break;
|
169 |
case 'activated':
|
170 |
nsl_license_activated($view);
|
171 |
break;
|
admin/templates/settings/buddypress.php
CHANGED
@@ -60,6 +60,77 @@ NextendSocialLoginAdmin::showProBox();
|
|
60 |
</td>
|
61 |
</tr>
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
<tr>
|
64 |
<th scope="row"><?php _e('Button alignment', 'nextend-facebook-connect'); ?></th>
|
65 |
<td>
|
60 |
</td>
|
61 |
</tr>
|
62 |
|
63 |
+
|
64 |
+
<tr>
|
65 |
+
<th scope="row"><?php _e('Login form', 'nextend-facebook-connect'); ?></th>
|
66 |
+
<td>
|
67 |
+
<fieldset>
|
68 |
+
<label><input type="radio" name="buddypress_login"
|
69 |
+
value="" <?php if ($settings->get('buddypress_login') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
70 |
+
<span><?php _e('Hide login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
71 |
+
<label><input type="radio" name="buddypress_login"
|
72 |
+
value="show" <?php if ($settings->get('buddypress_login') == 'show') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
73 |
+
<span><?php _e('Show login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
74 |
+
</fieldset>
|
75 |
+
</td>
|
76 |
+
</tr>
|
77 |
+
<tr>
|
78 |
+
<th scope="row"><?php _e('Login button style', 'nextend-facebook-connect'); ?></th>
|
79 |
+
<td>
|
80 |
+
<fieldset>
|
81 |
+
<label>
|
82 |
+
<input type="radio" name="buddypress_login_button_style"
|
83 |
+
value="default" <?php if ($settings->get('buddypress_login_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
84 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
85 |
+
<img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
|
86 |
+
</label>
|
87 |
+
<label>
|
88 |
+
<input type="radio" name="buddypress_login_button_style"
|
89 |
+
value="icon" <?php if ($settings->get('buddypress_login_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
90 |
+
<span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
|
91 |
+
<img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
|
92 |
+
</label><br>
|
93 |
+
</fieldset>
|
94 |
+
</td>
|
95 |
+
</tr>
|
96 |
+
<tr>
|
97 |
+
<th scope="row"><?php _e('Login layout', 'nextend-facebook-connect'); ?></th>
|
98 |
+
<td>
|
99 |
+
<fieldset>
|
100 |
+
<label>
|
101 |
+
<input type="radio" name="buddypress_login_form_layout"
|
102 |
+
value="default" <?php if ($settings->get('buddypress_login_form_layout') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
103 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
104 |
+
<img src="<?php echo plugins_url('images/layouts/default.png', NSL_ADMIN_PATH) ?>"/>
|
105 |
+
</label>
|
106 |
+
<label>
|
107 |
+
<input type="radio" name="buddypress_login_form_layout"
|
108 |
+
value="below" <?php if ($settings->get('buddypress_login_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
109 |
+
<span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
|
110 |
+
<img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
|
111 |
+
</label>
|
112 |
+
<label>
|
113 |
+
<input type="radio" name="buddypress_login_form_layout"
|
114 |
+
value="below-separator" <?php if ($settings->get('buddypress_login_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
115 |
+
<span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
|
116 |
+
<img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
|
117 |
+
</label>
|
118 |
+
<label>
|
119 |
+
<input type="radio" name="buddypress_login_form_layout"
|
120 |
+
value="above" <?php if ($settings->get('buddypress_login_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
121 |
+
<span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
|
122 |
+
<img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
|
123 |
+
</label>
|
124 |
+
<label>
|
125 |
+
<input type="radio" name="buddypress_login_form_layout"
|
126 |
+
value="above-separator" <?php if ($settings->get('buddypress_login_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
127 |
+
<span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
|
128 |
+
<img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
|
129 |
+
</label><br>
|
130 |
+
</fieldset>
|
131 |
+
</td>
|
132 |
+
</tr>
|
133 |
+
|
134 |
<tr>
|
135 |
<th scope="row"><?php _e('Button alignment', 'nextend-facebook-connect'); ?></th>
|
136 |
<td>
|
admin/templates/settings/general-pro.php
CHANGED
@@ -75,6 +75,34 @@ NextendSocialLoginAdmin::showProBox();
|
|
75 |
</td>
|
76 |
</tr>
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
</tbody>
|
79 |
</table>
|
80 |
<?php if ($isPRO): ?>
|
75 |
</td>
|
76 |
</tr>
|
77 |
|
78 |
+
<tr>
|
79 |
+
<th scope="row"><?php _e('Disable Admin bar for roles', 'nextend-facebook-connect'); ?></th>
|
80 |
+
|
81 |
+
<td>
|
82 |
+
<?php
|
83 |
+
$wp_roles = new WP_Roles();
|
84 |
+
$roles = $wp_roles->get_names();
|
85 |
+
|
86 |
+
$adminbar_disabled_roles = $settings->get('admin_bar_roles');
|
87 |
+
foreach ($roles AS $roleKey => $label):
|
88 |
+
?>
|
89 |
+
<fieldset><label for="admin_bar_roles_<?php echo esc_attr($roleKey); ?>">
|
90 |
+
<input name="admin_bar_roles[]" type="checkbox"
|
91 |
+
id="admin_bar_roles_<?php echo esc_attr($roleKey); ?>"
|
92 |
+
value="<?php echo esc_attr($roleKey); ?>" <?php if (in_array($roleKey, $adminbar_disabled_roles)) : ?> checked="checked" <?php endif ?> <?php echo $attr; ?> />
|
93 |
+
<?php echo $label; ?></label>
|
94 |
+
</fieldset>
|
95 |
+
<?php endforeach; ?>
|
96 |
+
<input type="hidden" name="admin_bar_roles[]" value=""/>
|
97 |
+
</td>
|
98 |
+
|
99 |
+
<td>
|
100 |
+
<fieldset>
|
101 |
+
<input type='hidden' name='admin_bar_roles[]' value='0'>
|
102 |
+
</fieldset>
|
103 |
+
</td>
|
104 |
+
</tr>
|
105 |
+
|
106 |
</tbody>
|
107 |
</table>
|
108 |
<?php if ($isPRO): ?>
|
admin/upgrader.php
CHANGED
@@ -45,6 +45,13 @@ class NextendSocialUpgrader {
|
|
45 |
if (is_array($body) && isset($body['message'])) {
|
46 |
$message = 'Nextend Social Login Pro Addon: ' . $body['message'];
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
\NSL\Notices::addError($message);
|
49 |
|
50 |
return new WP_Error('error', $message);
|
45 |
if (is_array($body) && isset($body['message'])) {
|
46 |
$message = 'Nextend Social Login Pro Addon: ' . $body['message'];
|
47 |
|
48 |
+
if (isset($body['code']) && $body['code'] == 'license_invalid' && NextendSocialLogin::hasLicense()) {
|
49 |
+
NextendSocialLogin::$settings->update(array(
|
50 |
+
'license_key' => ''
|
51 |
+
));
|
52 |
+
$message.=' - the stored license key has been removed!';
|
53 |
+
}
|
54 |
+
|
55 |
\NSL\Notices::addError($message);
|
56 |
|
57 |
return new WP_Error('error', $message);
|
includes/userData.php
CHANGED
@@ -123,7 +123,7 @@ class NextendSocialUserData {
|
|
123 |
|
124 |
login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site!') . '</p>', $this->errors);
|
125 |
|
126 |
-
$this->render_registration_form();
|
127 |
|
128 |
login_footer('user_login');
|
129 |
exit;
|
@@ -146,7 +146,7 @@ class NextendSocialUserData {
|
|
146 |
}
|
147 |
$this->errors = array();
|
148 |
|
149 |
-
$this->render_registration_form();
|
150 |
}
|
151 |
|
152 |
public function render_registration_form() {
|
@@ -161,6 +161,7 @@ class NextendSocialUserData {
|
|
161 |
} else {
|
162 |
$postUrl = add_query_arg('loginSocial', $this->provider->getId(), NextendSocialLogin::getLoginUrl('login_post'));
|
163 |
}
|
|
|
164 |
?>
|
165 |
<form name="registerform" id="registerform" action="<?php echo esc_url($postUrl); ?>" method="post">
|
166 |
<input type="hidden" name="submit" value="1"/>
|
@@ -174,9 +175,11 @@ class NextendSocialUserData {
|
|
174 |
class="button button-primary button-large" value="<?php esc_attr_e('Register'); ?>"/></p>
|
175 |
</form>
|
176 |
<?php
|
|
|
177 |
}
|
178 |
|
179 |
public function render_registration_form_tml() {
|
|
|
180 |
?>
|
181 |
<div class="tml tml-register" id="theme-my-login">
|
182 |
<?php
|
@@ -213,10 +216,11 @@ class NextendSocialUserData {
|
|
213 |
$this->errors = array();
|
214 |
|
215 |
|
216 |
-
$this->render_registration_form();
|
217 |
?>
|
218 |
</div>
|
219 |
<?php
|
|
|
220 |
}
|
221 |
|
222 |
public function bp_before_register_page() {
|
@@ -262,6 +266,6 @@ class NextendSocialUserData {
|
|
262 |
}
|
263 |
$this->errors = array();
|
264 |
|
265 |
-
$this->render_registration_form();
|
266 |
}
|
267 |
}
|
123 |
|
124 |
login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site!') . '</p>', $this->errors);
|
125 |
|
126 |
+
echo $this->render_registration_form();
|
127 |
|
128 |
login_footer('user_login');
|
129 |
exit;
|
146 |
}
|
147 |
$this->errors = array();
|
148 |
|
149 |
+
return $this->render_registration_form();
|
150 |
}
|
151 |
|
152 |
public function render_registration_form() {
|
161 |
} else {
|
162 |
$postUrl = add_query_arg('loginSocial', $this->provider->getId(), NextendSocialLogin::getLoginUrl('login_post'));
|
163 |
}
|
164 |
+
ob_start();
|
165 |
?>
|
166 |
<form name="registerform" id="registerform" action="<?php echo esc_url($postUrl); ?>" method="post">
|
167 |
<input type="hidden" name="submit" value="1"/>
|
175 |
class="button button-primary button-large" value="<?php esc_attr_e('Register'); ?>"/></p>
|
176 |
</form>
|
177 |
<?php
|
178 |
+
return ob_get_clean();
|
179 |
}
|
180 |
|
181 |
public function render_registration_form_tml() {
|
182 |
+
ob_start();
|
183 |
?>
|
184 |
<div class="tml tml-register" id="theme-my-login">
|
185 |
<?php
|
216 |
$this->errors = array();
|
217 |
|
218 |
|
219 |
+
echo $this->render_registration_form();
|
220 |
?>
|
221 |
</div>
|
222 |
<?php
|
223 |
+
return ob_get_clean();
|
224 |
}
|
225 |
|
226 |
public function bp_before_register_page() {
|
266 |
}
|
267 |
$this->errors = array();
|
268 |
|
269 |
+
echo $this->render_registration_form();
|
270 |
}
|
271 |
}
|
js/nsl.js
CHANGED
@@ -169,7 +169,7 @@ function checkWebView() {
|
|
169 |
}
|
170 |
|
171 |
_nsl.push(function ($) {
|
172 |
-
var targetWindow =
|
173 |
|
174 |
$('a[data-plugin="nsl"][data-action="connect"],a[data-plugin="nsl"][data-action="link"]').on('click', function (e) {
|
175 |
var $target = $(this),
|
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) {
|
175 |
var $target = $(this),
|
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.18
|
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.
|
20 |
|
21 |
-
public static $nslPROMinVersion = '3.0.
|
22 |
|
23 |
public static $proxyPage = false;
|
24 |
|
@@ -156,6 +156,9 @@ class NextendSocialLogin {
|
|
156 |
'buddypress_register_button' => 'bp_before_account_details_fields',
|
157 |
'buddypress_register_button_align' => 'left',
|
158 |
'buddypress_register_button_style' => 'default',
|
|
|
|
|
|
|
159 |
|
160 |
'woocommerce_login' => 'after',
|
161 |
'woocommerce_login_form_layout' => 'default',
|
@@ -197,6 +200,8 @@ class NextendSocialLogin {
|
|
197 |
'ultimatemember_register_form_button_style' => 'default',
|
198 |
'ultimatemember_register_form_layout' => 'below-separator',
|
199 |
'ultimatemember_account_details' => 'after',
|
|
|
|
|
200 |
));
|
201 |
|
202 |
add_action('itsec_initialized', 'NextendSocialLogin::disable_better_wp_security_block_long_urls', -1);
|
@@ -277,6 +282,9 @@ class NextendSocialLogin {
|
|
277 |
|
278 |
add_action('parse_request', 'NextendSocialLogin::editProfileRedirect');
|
279 |
|
|
|
|
|
|
|
280 |
if (count(self::$enabledProviders) > 0) {
|
281 |
|
282 |
if (self::$settings->get('show_login_form') == 'hide') {
|
@@ -313,11 +321,8 @@ class NextendSocialLogin {
|
|
313 |
|
314 |
|
315 |
add_action('wp_head', 'NextendSocialLogin::styles', 100);
|
316 |
-
add_action('wp_head', 'NextendSocialLogin::checkFrontendJquery');
|
317 |
-
add_action('login_head', 'NextendSocialLogin::checkFrontendJquery');
|
318 |
|
319 |
add_action('admin_head', 'NextendSocialLogin::styles', 100);
|
320 |
-
add_action('admin_head', 'NextendSocialLogin::checkFrontendJquery');
|
321 |
add_action('login_head', 'NextendSocialLogin::loginHead', 100);
|
322 |
|
323 |
add_action('wp_print_footer_scripts', 'NextendSocialLogin::scripts', 100);
|
@@ -396,7 +401,7 @@ class NextendSocialLogin {
|
|
396 |
}
|
397 |
}
|
398 |
|
399 |
-
public static function
|
400 |
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>';
|
401 |
}
|
402 |
|
@@ -416,7 +421,7 @@ class NextendSocialLogin {
|
|
416 |
if ($once === null) {
|
417 |
$scripts = NSL_PATH . '/js/nsl.js';
|
418 |
if (file_exists($scripts)) {
|
419 |
-
echo '<script type="text/javascript">(function (undefined) {var
|
420 |
}
|
421 |
$once = true;
|
422 |
}
|
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 |
|
156 |
'buddypress_register_button' => 'bp_before_account_details_fields',
|
157 |
'buddypress_register_button_align' => 'left',
|
158 |
'buddypress_register_button_style' => 'default',
|
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',
|
200 |
'ultimatemember_register_form_button_style' => 'default',
|
201 |
'ultimatemember_register_form_layout' => 'below-separator',
|
202 |
'ultimatemember_account_details' => 'after',
|
203 |
+
|
204 |
+
'admin_bar_roles' => array(),
|
205 |
));
|
206 |
|
207 |
add_action('itsec_initialized', 'NextendSocialLogin::disable_better_wp_security_block_long_urls', -1);
|
282 |
|
283 |
add_action('parse_request', 'NextendSocialLogin::editProfileRedirect');
|
284 |
|
285 |
+
//check if jQuery is loaded
|
286 |
+
add_action('wp_print_scripts', 'NextendSocialLogin::checkJqueryLoaded');
|
287 |
+
|
288 |
if (count(self::$enabledProviders) > 0) {
|
289 |
|
290 |
if (self::$settings->get('show_login_form') == 'hide') {
|
321 |
|
322 |
|
323 |
add_action('wp_head', 'NextendSocialLogin::styles', 100);
|
|
|
|
|
324 |
|
325 |
add_action('admin_head', 'NextendSocialLogin::styles', 100);
|
|
|
326 |
add_action('login_head', 'NextendSocialLogin::loginHead', 100);
|
327 |
|
328 |
add_action('wp_print_footer_scripts', 'NextendSocialLogin::scripts', 100);
|
401 |
}
|
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 |
|
421 |
if ($once === null) {
|
422 |
$scripts = NSL_PATH . '/js/nsl.js';
|
423 |
if (file_exists($scripts)) {
|
424 |
+
echo '<script type="text/javascript">(function (undefined) {var _targetWindow =' . wp_json_encode(self::$settings->get('target')) . ";\n" . file_get_contents($scripts) . '})();</script>';
|
425 |
}
|
426 |
$once = true;
|
427 |
}
|
providers/facebook/admin/getting-started.php
CHANGED
@@ -22,7 +22,7 @@ $provider = $this->getProvider();
|
|
22 |
<li><?php printf(__('Navigate to %s', 'nextend-facebook-connect'), '<a href="https://developers.facebook.com/apps/" target="_blank">https://developers.facebook.com/apps/</a>'); ?></li>
|
23 |
<li><?php printf(__('Log in with your %s credentials if you are not logged in', 'nextend-facebook-connect'), 'Facebook'); ?></li>
|
24 |
<li><?php _e('Click on the "Add a New App" button', 'nextend-facebook-connect'); ?></li>
|
25 |
-
<li><?php
|
26 |
<li><?php _e('Click on blue "Create App ID" button', 'nextend-facebook-connect'); ?></li>
|
27 |
<li><?php _e('Select "Integrate Facebook Login" at the Select a Scenario page, then click Confirm.', 'nextend-facebook-connect'); ?></li>
|
28 |
<li><?php _e('Enter your domain name to the App Domains', 'nextend-facebook-connect'); ?></li>
|
22 |
<li><?php printf(__('Navigate to %s', 'nextend-facebook-connect'), '<a href="https://developers.facebook.com/apps/" target="_blank">https://developers.facebook.com/apps/</a>'); ?></li>
|
23 |
<li><?php printf(__('Log in with your %s credentials if you are not logged in', 'nextend-facebook-connect'), 'Facebook'); ?></li>
|
24 |
<li><?php _e('Click on the "Add a New App" button', 'nextend-facebook-connect'); ?></li>
|
25 |
+
<li><?php printf(__('Fill "Display Name" and "Contact Email". The specified "Display Name" will appear on your %s!', 'nextend-facebook-connect'),'<a href="https://developers.facebook.com/docs/facebook-login/permissions/overview/" target="_blank">Consent Screen</a>'); ?></li>
|
26 |
<li><?php _e('Click on blue "Create App ID" button', 'nextend-facebook-connect'); ?></li>
|
27 |
<li><?php _e('Select "Integrate Facebook Login" at the Select a Scenario page, then click Confirm.', 'nextend-facebook-connect'); ?></li>
|
28 |
<li><?php _e('Enter your domain name to the App Domains', 'nextend-facebook-connect'); ?></li>
|
providers/google/google.php
CHANGED
@@ -5,11 +5,13 @@ class NextendSocialProviderGoogle extends NextendSocialProvider {
|
|
5 |
/** @var NextendSocialProviderGoogleClient */
|
6 |
protected $client;
|
7 |
|
8 |
-
protected $color = '#
|
9 |
|
10 |
-
protected $
|
11 |
|
12 |
-
protected $
|
|
|
|
|
13 |
|
14 |
const requiredApi1 = 'Google People API';
|
15 |
|
@@ -47,12 +49,12 @@ class NextendSocialProviderGoogle extends NextendSocialProvider {
|
|
47 |
'node' => 'people',
|
48 |
'description' => self::requiredApi1,
|
49 |
),
|
50 |
-
'residences'
|
51 |
'label' => 'Residences',
|
52 |
'node' => 'people',
|
53 |
'description' => self::requiredApi1,
|
54 |
),
|
55 |
-
'taglines'
|
56 |
'label' => 'Taglines',
|
57 |
'node' => 'people',
|
58 |
'description' => self::requiredApi1,
|
@@ -68,7 +70,7 @@ class NextendSocialProviderGoogle extends NextendSocialProvider {
|
|
68 |
'scope' => 'https://www.googleapis.com/auth/user.addresses.read',
|
69 |
'description' => self::requiredApi1,
|
70 |
),
|
71 |
-
'phoneNumbers'
|
72 |
'label' => 'Phone Numbers',
|
73 |
'node' => 'people',
|
74 |
'scope' => 'https://www.googleapis.com/auth/user.phonenumbers.read',
|
@@ -107,21 +109,25 @@ class NextendSocialProviderGoogle extends NextendSocialProvider {
|
|
107 |
$skin = $this->settings->get('skin');
|
108 |
switch ($skin) {
|
109 |
case 'dark':
|
110 |
-
$color =
|
111 |
-
$svg = $this->
|
112 |
break;
|
113 |
case 'light':
|
114 |
$color = '#fff';
|
115 |
-
$svg = $this->
|
116 |
break;
|
117 |
default:
|
118 |
-
$color = $this->
|
119 |
-
$svg = $this->
|
120 |
}
|
121 |
|
122 |
return '<span class="nsl-button nsl-button-default nsl-button-' . $this->id . '" data-skin="' . $skin . '" style="background-color:' . $color . ';"><span class="nsl-button-svg-container">' . $svg . '</span><span class="nsl-button-label-container">{{label}}</span></span>';
|
123 |
}
|
124 |
|
|
|
|
|
|
|
|
|
125 |
public function validateSettings($newData, $postedData) {
|
126 |
$newData = parent::validateSettings($newData, $postedData);
|
127 |
|
5 |
/** @var NextendSocialProviderGoogleClient */
|
6 |
protected $client;
|
7 |
|
8 |
+
protected $color = '#4285f4';
|
9 |
|
10 |
+
protected $colorUniform = '#dc4e41';
|
11 |
|
12 |
+
protected $svg = '<svg xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path fill="#4285F4" fill-rule="nonzero" d="M20.64 12.2045c0-.6381-.0573-1.2518-.1636-1.8409H12v3.4814h4.8436c-.2086 1.125-.8427 2.0782-1.7959 2.7164v2.2581h2.9087c1.7018-1.5668 2.6836-3.874 2.6836-6.615z"/><path fill="#34A853" fill-rule="nonzero" d="M12 21c2.43 0 4.4673-.806 5.9564-2.1805l-2.9087-2.2581c-.8059.54-1.8368.859-3.0477.859-2.344 0-4.3282-1.5831-5.036-3.7104H3.9574v2.3318C5.4382 18.9832 8.4818 21 12 21z"/><path fill="#FBBC05" fill-rule="nonzero" d="M6.964 13.71c-.18-.54-.2822-1.1168-.2822-1.71s.1023-1.17.2823-1.71V7.9582H3.9573A8.9965 8.9965 0 0 0 3 12c0 1.4523.3477 2.8268.9573 4.0418L6.964 13.71z"/><path fill="#EA4335" fill-rule="nonzero" d="M12 6.5795c1.3214 0 2.5077.4541 3.4405 1.346l2.5813-2.5814C16.4632 3.8918 14.426 3 12 3 8.4818 3 5.4382 5.0168 3.9573 7.9582L6.964 10.29C7.6718 8.1627 9.6559 6.5795 12 6.5795z"/><path d="M3 3h18v18H3z"/></g></svg>';
|
13 |
+
|
14 |
+
protected $svgUniform = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="#fff" fill-rule="evenodd" d="M11.988,14.28 L11.988,9.816 L23.22,9.816 C23.388,10.572 23.52,11.28 23.52,12.276 C23.52,19.128 18.924,24 12,24 C5.376,24 -9.47390314e-15,18.624 -9.47390314e-15,12 C-9.47390314e-15,5.376 5.376,0 12,0 C15.24,0 17.952,1.188 20.028,3.132 L16.62,6.444 C15.756,5.628 14.244,4.668 12,4.668 C8.028,4.668 4.788,7.968 4.788,12.012 C4.788,16.056 8.028,19.356 12,19.356 C16.596,19.356 18.288,16.176 18.6,14.292 L11.988,14.292 L11.988,14.28 Z"/></svg>';
|
15 |
|
16 |
const requiredApi1 = 'Google People API';
|
17 |
|
49 |
'node' => 'people',
|
50 |
'description' => self::requiredApi1,
|
51 |
),
|
52 |
+
'residences' => array(
|
53 |
'label' => 'Residences',
|
54 |
'node' => 'people',
|
55 |
'description' => self::requiredApi1,
|
56 |
),
|
57 |
+
'taglines' => array(
|
58 |
'label' => 'Taglines',
|
59 |
'node' => 'people',
|
60 |
'description' => self::requiredApi1,
|
70 |
'scope' => 'https://www.googleapis.com/auth/user.addresses.read',
|
71 |
'description' => self::requiredApi1,
|
72 |
),
|
73 |
+
'phoneNumbers' => array(
|
74 |
'label' => 'Phone Numbers',
|
75 |
'node' => 'people',
|
76 |
'scope' => 'https://www.googleapis.com/auth/user.phonenumbers.read',
|
109 |
$skin = $this->settings->get('skin');
|
110 |
switch ($skin) {
|
111 |
case 'dark':
|
112 |
+
$color = $this->color;
|
113 |
+
$svg = $this->svg;
|
114 |
break;
|
115 |
case 'light':
|
116 |
$color = '#fff';
|
117 |
+
$svg = $this->svg;
|
118 |
break;
|
119 |
default:
|
120 |
+
$color = $this->colorUniform;
|
121 |
+
$svg = $this->svgUniform;
|
122 |
}
|
123 |
|
124 |
return '<span class="nsl-button nsl-button-default nsl-button-' . $this->id . '" data-skin="' . $skin . '" style="background-color:' . $color . ';"><span class="nsl-button-svg-container">' . $svg . '</span><span class="nsl-button-label-container">{{label}}</span></span>';
|
125 |
}
|
126 |
|
127 |
+
public function getRawIconButton() {
|
128 |
+
return '<span class="nsl-button nsl-button-icon nsl-button-' . $this->id . '" style="background-color:' . $this->colorUniform . ';"><span class="nsl-button-svg-container">' . $this->svgUniform . '</span></span>';
|
129 |
+
}
|
130 |
+
|
131 |
public function validateSettings($newData, $postedData) {
|
132 |
$newData = parent::validateSettings($newData, $postedData);
|
133 |
|
providers/google/google.png
CHANGED
Binary file
|
providers/yahoo/yahoo.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class NextendSocialProviderYahoo extends NextendSocialProviderDummy {
|
4 |
+
|
5 |
+
protected $color = '#720e9e';
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
$this->id = 'yahoo';
|
9 |
+
$this->label = 'Yahoo';
|
10 |
+
$this->path = dirname(__FILE__);
|
11 |
+
}
|
12 |
+
}
|
13 |
+
|
14 |
+
NextendSocialLogin::addProvider(new NextendSocialProviderYahoo());
|
providers/yahoo/yahoo.png
ADDED
Binary file
|
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
|
@@ -119,6 +119,21 @@ 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.16 =
|
123 |
* Fix: NSL Avatars used to override the specified BuddyPress avatars.
|
124 |
* Fix: 500 error when the Extended Profiles setting is disabled in BuddyPress.
|
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
|
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.
|
125 |
+
* Fix: Google - G+ logo is replaced with simple G logo.
|
126 |
+
|
127 |
+
* PRO: Fix: [Target window](https://nextendweb.com/nextend-social-login-docs/global-settings/#pro-settings) will open the auth window of the provider in the selected way again.
|
128 |
+
* PRO: Fix: Update notice when the Free and Pro Addon are not compatible.
|
129 |
+
* PRO: Feature: Social buttons for BuddyPress - Login widget
|
130 |
+
* PRO: Feature: Option to disable the WordPress Toolbar on the front-end for some roles.
|
131 |
+
* PRO: New provider - [Yahoo](https://nextendweb.com/nextend-social-login-docs/provider-yahoo/)
|
132 |
+
* PRO: Note: We had plans to implement the [Instagram](https://nextendweb.com/nextend-social-login-docs/provider-instagram/) provider. Unfortunately we need to change our mind, since the Instagram API will become deprecated soon!
|
133 |
+
|
134 |
+
= 3.0.17 =
|
135 |
+
* Fix: Activation fix on certain sub-domains.
|
136 |
+
|
137 |
= 3.0.16 =
|
138 |
* Fix: NSL Avatars used to override the specified BuddyPress avatars.
|
139 |
* Fix: 500 error when the Extended Profiles setting is disabled in BuddyPress.
|