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

Version Description

  • Fix: We added clear: both; on .nsl-container to make floated elements before the buttons not to mess up the layout.
  • Fix: Jetpack removed the "Register" button in our register flow when the registration was handled over the WordPress default login page.
  • Improvement: The social buttons with the Default style will try to go as wide as the longest button, if there is enough space in the social button container element.
  • Feature: Fullwidth style for the social buttons.
  • Summer Sale offer
Download this release

Release Info

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

Code changes from version 3.0.28 to 3.0.29

admin/admin.php CHANGED
@@ -116,6 +116,8 @@ class NextendSocialLoginAdmin {
116
  public static function admin_init() {
117
 
118
  if (current_user_can('manage_options')) {
 
 
119
  if (!isset($_GET['page']) || $_GET['page'] != 'nextend-social-login' || !isset($_GET['view']) || $_GET['view'] != 'fix-redirect-uri') {
120
  add_action('admin_notices', 'NextendSocialLoginAdmin::show_oauth_uri_notice');
121
  }
116
  public static function admin_init() {
117
 
118
  if (current_user_can('manage_options')) {
119
+ require_once(dirname(__FILE__).'/notice.php');
120
+
121
  if (!isset($_GET['page']) || $_GET['page'] != 'nextend-social-login' || !isset($_GET['view']) || $_GET['view'] != 'fix-redirect-uri') {
122
  add_action('admin_notices', 'NextendSocialLoginAdmin::show_oauth_uri_notice');
123
  }
admin/images/buttons/fullwidth.png ADDED
Binary file
admin/images/notice/nslnotice.png ADDED
Binary file
admin/notice.php ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ $current = time();
5
+ if ($current <= mktime(0, 0, 0, 7, 28, 2021)) {
6
+ if (get_option('nsl_summer_2021') != '1') {
7
+
8
+ add_action('admin_notices', function () {
9
+ if (!defined('NSL_PRO_PATH')) {
10
+ //FREE
11
+ ?>
12
+ <div class="notice notice-info is-dismissible" data-nsldismissable="nsl_summer_2021" style="display:grid;grid-template-columns: 100px auto;padding-top: 25px; padding-bottom: 22px;">
13
+ <img alt="Nextend Social Login" src="<?php echo plugins_url('images/notice/nslnotice.png', NSL_ADMIN_PATH) ?>" width="64" height="64" style="grid-row: 1 / 4; align-self: center;justify-self: center">
14
+ <h3 style="margin:0;">Do you wish to use Nextend Social Login Pro Addon on your site?</h3>
15
+ <p style="margin:0 0 2px;">If the answer is yes, then you may be interested in our <b>Summer
16
+ Sale</b>.
17
+ We are excited to offer a <b>30% discount on all Nextend Social Login Premium plans!</b>
18
+ Limited time offer expires on July 27.</p>
19
+ <p style="margin:0;">
20
+ <a class="button button-primary" href="https://nextendweb.com/social-login/?coupon=SUMMER21&utm_source=wpfree&utm_medium=wp&utm_campaign=summer21#pricing" target="_blank">
21
+ Buy Now</a>
22
+ <a class="button button-dismiss" href="#">Dismiss</a>
23
+ </p>
24
+ </div>
25
+ <?php
26
+ } else {
27
+ //Pro Addon
28
+ if (true === apply_filters('nsl-pro', false)) {
29
+ //license is active
30
+ ?>
31
+ <div class="notice notice-info is-dismissible" data-nsldismissable="nsl_summer_2021" style="display:grid;grid-template-columns: 100px auto;padding-top: 25px; padding-bottom: 22px;">
32
+ <img alt="Nextend Social Login" src="<?php echo plugins_url('images/notice/nslnotice.png', NSL_ADMIN_PATH) ?>" width="64" height="64" style="grid-row: 1 / 4; align-self: center;justify-self: center">
33
+ <h3 style="margin:0;">Need more license? If the answer is yes, then you may be interested in our
34
+ Summer Sale.</h3>
35
+ <p style="margin:0 0 2px;">
36
+ We are excited to offer a <b>30% discount on all Nextend Social Login Premium plans!</b>
37
+ Limited time offer expires on July 27.</p>
38
+ <p style="margin:0;">
39
+ <a class="button button-primary" href="https://nextendweb.com/social-login/?coupon=SUMMER21&utm_source=wpprou&utm_medium=wp&utm_campaign=summer21#pricing" target="_blank">
40
+ Buy Now</a>
41
+ <a class="button button-dismiss" href="#">Dismiss</a>
42
+ </p>
43
+ </div>
44
+ <?php
45
+ } else {
46
+ //license is not active
47
+ ?>
48
+ <div class="notice notice-info is-dismissible" data-nsldismissable="nsl_summer_2021" style="display:grid;grid-template-columns: 100px auto;padding-top: 25px; padding-bottom: 22px;">
49
+ <img alt="Nextend Social Login" src="<?php echo plugins_url('images/notice/nslnotice.png', NSL_ADMIN_PATH) ?>" width="64" height="64" style="grid-row: 1 / 4; align-self: center;justify-self: center">
50
+ <h3 style="margin:0;">Activate your Nextend Social Login Pro Addon now and save 30%</h3>
51
+ <p style="margin:0 0 2px;">
52
+ We are excited to offer a <b>30% discount on all Nextend Social Login Premium plans!</b>
53
+ Limited time offer expires on July 27.</p>
54
+ <p style="margin:0;">
55
+ <a class="button button-primary" href="https://nextendweb.com/social-login/?coupon=SUMMER21&utm_source=wpprona&utm_medium=wp&utm_campaign=summer21#pricing" target="_blank">
56
+ Buy Now</a>
57
+ <a class="button button-dismiss" href="#">Dismiss</a>
58
+ </p>
59
+ </div>
60
+ <?php
61
+ }
62
+ }
63
+ });
64
+
65
+ add_action('admin_footer', function () {
66
+ ?>
67
+ <script>
68
+ (function () {
69
+ function ready(fn) {
70
+ if (document.readyState === "complete" || document.readyState === "interactive") {
71
+ fn();
72
+ } else {
73
+ document.addEventListener("DOMContentLoaded", fn);
74
+ }
75
+ }
76
+
77
+ function serialize(obj) {
78
+ return Object.keys(obj).reduce(function (a, k) {
79
+ a.push(k + '=' + encodeURIComponent(obj[k]));
80
+ return a;
81
+ }, []).join('&');
82
+ }
83
+
84
+ ready(function () {
85
+ setTimeout(function () {
86
+ const buttons = document.querySelectorAll("div[data-nsldismissable] .notice-dismiss, div[data-nsldismissable] .button-dismiss");
87
+ for (let i = 0; i < buttons.length; i++) {
88
+ buttons[i].addEventListener('click', function (e) {
89
+ e.preventDefault();
90
+
91
+ const http = new XMLHttpRequest();
92
+ http.open('POST', ajaxurl, true);
93
+ http.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=UTF-8");
94
+
95
+ http.send(serialize({
96
+ 'action': 'nsl_dismiss_admin_notice',
97
+ 'nonce': <?php echo json_encode(wp_create_nonce('nsl-dismissible-notice')); ?>
98
+ }));
99
+
100
+ e.target.closest('.is-dismissible').remove();
101
+ });
102
+ }
103
+ }, 1000);
104
+ });
105
+ })();
106
+ </script>
107
+ <?php
108
+ });
109
+
110
+ add_action('wp_ajax_nsl_dismiss_admin_notice', function () {
111
+ check_ajax_referer('nsl-dismissible-notice', 'nonce');
112
+
113
+ update_option('nsl_summer_2021', '1');
114
+ wp_die();
115
+ });
116
+ }
117
+ }
admin/templates/settings/buddypress.php CHANGED
@@ -44,6 +44,12 @@ NextendSocialLoginAdmin::showProBox();
44
  <th scope="row"><?php _e('Register button style', 'nextend-facebook-connect'); ?></th>
45
  <td>
46
  <fieldset>
 
 
 
 
 
 
47
  <label>
48
  <input type="radio" name="buddypress_register_button_style"
49
  value="default" <?php if ($settings->get('buddypress_register_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
@@ -93,6 +99,12 @@ NextendSocialLoginAdmin::showProBox();
93
  <th scope="row"><?php _e('Login button style', 'nextend-facebook-connect'); ?></th>
94
  <td>
95
  <fieldset>
 
 
 
 
 
 
96
  <label>
97
  <input type="radio" name="buddypress_login_button_style"
98
  value="default" <?php if ($settings->get('buddypress_login_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
44
  <th scope="row"><?php _e('Register button style', 'nextend-facebook-connect'); ?></th>
45
  <td>
46
  <fieldset>
47
+ <label>
48
+ <input type="radio" name="buddypress_register_button_style"
49
+ value="fullwidth" <?php if ($settings->get('buddypress_register_button_style') == 'fullwidth') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
50
+ <span><?php _e('Fullwidth', 'nextend-facebook-connect'); ?></span><br/>
51
+ <img src="<?php echo plugins_url('images/buttons/fullwidth.png', NSL_ADMIN_PATH) ?>"/>
52
+ </label>
53
  <label>
54
  <input type="radio" name="buddypress_register_button_style"
55
  value="default" <?php if ($settings->get('buddypress_register_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
99
  <th scope="row"><?php _e('Login button style', 'nextend-facebook-connect'); ?></th>
100
  <td>
101
  <fieldset>
102
+ <label>
103
+ <input type="radio" name="buddypress_login_button_style"
104
+ value="fullwidth" <?php if ($settings->get('buddypress_login_button_style') == 'fullwidth') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
105
+ <span><?php _e('Fullwidth', 'nextend-facebook-connect'); ?></span><br/>
106
+ <img src="<?php echo plugins_url('images/buttons/fullwidth.png', NSL_ADMIN_PATH) ?>"/>
107
+ </label>
108
  <label>
109
  <input type="radio" name="buddypress_login_button_style"
110
  value="default" <?php if ($settings->get('buddypress_login_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
admin/templates/settings/comment.php CHANGED
@@ -33,6 +33,12 @@ NextendSocialLoginAdmin::showProBox();
33
  <th scope="row"><?php _e('Button style', 'nextend-facebook-connect'); ?></th>
34
  <td>
35
  <fieldset>
 
 
 
 
 
 
36
  <label>
37
  <input type="radio" name="comment_button_style"
38
  value="default" <?php if ($settings->get('comment_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
33
  <th scope="row"><?php _e('Button style', 'nextend-facebook-connect'); ?></th>
34
  <td>
35
  <fieldset>
36
+ <label>
37
+ <input type="radio" name="comment_button_style"
38
+ value="fullwidth" <?php if ($settings->get('comment_button_style') == 'fullwidth') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
39
+ <span><?php _e('Fullwidth', 'nextend-facebook-connect'); ?></span><br/>
40
+ <img src="<?php echo plugins_url('images/buttons/fullwidth.png', NSL_ADMIN_PATH) ?>"/>
41
+ </label>
42
  <label>
43
  <input type="radio" name="comment_button_style"
44
  value="default" <?php if ($settings->get('comment_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
admin/templates/settings/login-form-pro.php CHANGED
@@ -29,6 +29,12 @@ NextendSocialLoginAdmin::showProBox();
29
  <th scope="row"><?php _e('Login form button style', 'nextend-facebook-connect'); ?></th>
30
  <td>
31
  <fieldset>
 
 
 
 
 
 
32
  <label>
33
  <input type="radio" name="login_form_button_style"
34
  value="default" <?php if ($settings->get('login_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
@@ -85,6 +91,12 @@ NextendSocialLoginAdmin::showProBox();
85
  <th scope="row"><?php _e('Embedded Login form button style', 'nextend-facebook-connect'); ?></th>
86
  <td>
87
  <fieldset>
 
 
 
 
 
 
88
  <label>
89
  <input type="radio" name="embedded_login_form_button_style"
90
  value="default" <?php if ($settings->get('embedded_login_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
29
  <th scope="row"><?php _e('Login form button style', 'nextend-facebook-connect'); ?></th>
30
  <td>
31
  <fieldset>
32
+ <label>
33
+ <input type="radio" name="login_form_button_style"
34
+ value="fullwidth" <?php if ($settings->get('login_form_button_style') == 'fullwidth') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
35
+ <span><?php _e('Fullwidth', 'nextend-facebook-connect'); ?></span><br/>
36
+ <img src="<?php echo plugins_url('images/buttons/fullwidth.png', NSL_ADMIN_PATH) ?>"/>
37
+ </label>
38
  <label>
39
  <input type="radio" name="login_form_button_style"
40
  value="default" <?php if ($settings->get('login_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
91
  <th scope="row"><?php _e('Embedded Login form button style', 'nextend-facebook-connect'); ?></th>
92
  <td>
93
  <fieldset>
94
+ <label>
95
+ <input type="radio" name="embedded_login_form_button_style"
96
+ value="fullwidth" <?php if ($settings->get('embedded_login_form_button_style') == 'fullwidth') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
97
+ <span><?php _e('Fullwidth', 'nextend-facebook-connect'); ?></span><br/>
98
+ <img src="<?php echo plugins_url('images/buttons/fullwidth.png', NSL_ADMIN_PATH) ?>"/>
99
+ </label>
100
  <label>
101
  <input type="radio" name="embedded_login_form_button_style"
102
  value="default" <?php if ($settings->get('embedded_login_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
admin/templates/settings/memberpress.php CHANGED
@@ -33,6 +33,12 @@ NextendSocialLoginAdmin::showProBox();
33
  <th scope="row"><?php _e('Login form button style', 'nextend-facebook-connect'); ?></th>
34
  <td>
35
  <fieldset>
 
 
 
 
 
 
36
  <label>
37
  <input type="radio" name="memberpress_login_form_button_style"
38
  value="default" <?php if ($settings->get('memberpress_login_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
@@ -99,6 +105,12 @@ NextendSocialLoginAdmin::showProBox();
99
  <th scope="row"><?php _e('Sign Up form button style', 'nextend-facebook-connect'); ?></th>
100
  <td>
101
  <fieldset>
 
 
 
 
 
 
102
  <label>
103
  <input type="radio" name="memberpress_signup_form_button_style"
104
  value="default" <?php if ($settings->get('memberpress_signup_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
33
  <th scope="row"><?php _e('Login form button style', 'nextend-facebook-connect'); ?></th>
34
  <td>
35
  <fieldset>
36
+ <label>
37
+ <input type="radio" name="memberpress_login_form_button_style"
38
+ value="fullwidth" <?php if ($settings->get('memberpress_login_form_button_style') == 'fullwidth') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
39
+ <span><?php _e('Fullwidth', 'nextend-facebook-connect'); ?></span><br/>
40
+ <img src="<?php echo plugins_url('images/buttons/fullwidth.png', NSL_ADMIN_PATH) ?>"/>
41
+ </label>
42
  <label>
43
  <input type="radio" name="memberpress_login_form_button_style"
44
  value="default" <?php if ($settings->get('memberpress_login_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
105
  <th scope="row"><?php _e('Sign Up form button style', 'nextend-facebook-connect'); ?></th>
106
  <td>
107
  <fieldset>
108
+ <label>
109
+ <input type="radio" name="memberpress_signup_form_button_style"
110
+ value="fullwidth" <?php if ($settings->get('memberpress_signup_form_button_style') == 'fullwidth') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
111
+ <span><?php _e('Fullwidth', 'nextend-facebook-connect'); ?></span><br/>
112
+ <img src="<?php echo plugins_url('images/buttons/fullwidth.png', NSL_ADMIN_PATH) ?>"/>
113
+ </label>
114
  <label>
115
  <input type="radio" name="memberpress_signup_form_button_style"
116
  value="default" <?php if ($settings->get('memberpress_signup_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
admin/templates/settings/ultimate-member.php CHANGED
@@ -33,6 +33,12 @@ NextendSocialLoginAdmin::showProBox();
33
  <th scope="row"><?php _e('Login form button style', 'nextend-facebook-connect'); ?></th>
34
  <td>
35
  <fieldset>
 
 
 
 
 
 
36
  <label>
37
  <input type="radio" name="ultimatemember_login_form_button_style"
38
  value="default" <?php if ($settings->get('ultimatemember_login_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
@@ -99,6 +105,12 @@ NextendSocialLoginAdmin::showProBox();
99
  <th scope="row"><?php _e('Register form button style', 'nextend-facebook-connect'); ?></th>
100
  <td>
101
  <fieldset>
 
 
 
 
 
 
102
  <label>
103
  <input type="radio" name="ultimatemember_register_form_button_style"
104
  value="default" <?php if ($settings->get('ultimatemember_register_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
33
  <th scope="row"><?php _e('Login form button style', 'nextend-facebook-connect'); ?></th>
34
  <td>
35
  <fieldset>
36
+ <label>
37
+ <input type="radio" name="ultimatemember_login_form_button_style"
38
+ value="fullwidth" <?php if ($settings->get('ultimatemember_login_form_button_style') == 'fullwidth') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
39
+ <span><?php _e('Fullwidth', 'nextend-facebook-connect'); ?></span><br/>
40
+ <img src="<?php echo plugins_url('images/buttons/fullwidth.png', NSL_ADMIN_PATH) ?>"/>
41
+ </label>
42
  <label>
43
  <input type="radio" name="ultimatemember_login_form_button_style"
44
  value="default" <?php if ($settings->get('ultimatemember_login_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
105
  <th scope="row"><?php _e('Register form button style', 'nextend-facebook-connect'); ?></th>
106
  <td>
107
  <fieldset>
108
+ <label>
109
+ <input type="radio" name="ultimatemember_register_form_button_style"
110
+ value="fullwidth" <?php if ($settings->get('ultimatemember_register_form_button_style') == 'fullwidth') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
111
+ <span><?php _e('Fullwidth', 'nextend-facebook-connect'); ?></span><br/>
112
+ <img src="<?php echo plugins_url('images/buttons/fullwidth.png', NSL_ADMIN_PATH) ?>"/>
113
+ </label>
114
  <label>
115
  <input type="radio" name="ultimatemember_register_form_button_style"
116
  value="default" <?php if ($settings->get('ultimatemember_register_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
admin/templates/settings/userpro.php CHANGED
@@ -45,6 +45,12 @@ NextendSocialLoginAdmin::showProBox();
45
  <th scope="row"><?php _e('Login form button style', 'nextend-facebook-connect'); ?></th>
46
  <td>
47
  <fieldset>
 
 
 
 
 
 
48
  <label>
49
  <input type="radio" name="userpro_login_form_button_style"
50
  value="default" <?php if ($settings->get('userpro_login_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
@@ -96,6 +102,12 @@ NextendSocialLoginAdmin::showProBox();
96
  <th scope="row"><?php _e('Register form button style', 'nextend-facebook-connect'); ?></th>
97
  <td>
98
  <fieldset>
 
 
 
 
 
 
99
  <label>
100
  <input type="radio" name="userpro_register_form_button_style"
101
  value="default" <?php if ($settings->get('userpro_register_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
45
  <th scope="row"><?php _e('Login form button style', 'nextend-facebook-connect'); ?></th>
46
  <td>
47
  <fieldset>
48
+ <label>
49
+ <input type="radio" name="userpro_login_form_button_style"
50
+ value="fullwidth" <?php if ($settings->get('userpro_login_form_button_style') == 'fullwidth') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
51
+ <span><?php _e('Fullwidth', 'nextend-facebook-connect'); ?></span><br/>
52
+ <img src="<?php echo plugins_url('images/buttons/fullwidth.png', NSL_ADMIN_PATH) ?>"/>
53
+ </label>
54
  <label>
55
  <input type="radio" name="userpro_login_form_button_style"
56
  value="default" <?php if ($settings->get('userpro_login_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
102
  <th scope="row"><?php _e('Register form button style', 'nextend-facebook-connect'); ?></th>
103
  <td>
104
  <fieldset>
105
+ <label>
106
+ <input type="radio" name="userpro_register_form_button_style"
107
+ value="fullwidth" <?php if ($settings->get('userpro_register_form_button_style') == 'fullwidth') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
108
+ <span><?php _e('Fullwidth', 'nextend-facebook-connect'); ?></span><br/>
109
+ <img src="<?php echo plugins_url('images/buttons/fullwidth.png', NSL_ADMIN_PATH) ?>"/>
110
+ </label>
111
  <label>
112
  <input type="radio" name="userpro_register_form_button_style"
113
  value="default" <?php if ($settings->get('userpro_register_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
admin/templates/settings/woocommerce.php CHANGED
@@ -18,6 +18,12 @@ NextendSocialLoginAdmin::showProBox();
18
  <th scope="row"><?php _e('Button style', 'nextend-facebook-connect'); ?></th>
19
  <td>
20
  <fieldset>
 
 
 
 
 
 
21
  <label>
22
  <input type="radio" name="woocoommerce_form_button_style"
23
  value="default" <?php if ($settings->get('woocoommerce_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
18
  <th scope="row"><?php _e('Button style', 'nextend-facebook-connect'); ?></th>
19
  <td>
20
  <fieldset>
21
+ <label>
22
+ <input type="radio" name="woocoommerce_form_button_style"
23
+ value="fullwidth" <?php if ($settings->get('woocoommerce_form_button_style') == 'fullwidth') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
24
+ <span><?php _e('Fullwidth', 'nextend-facebook-connect'); ?></span><br/>
25
+ <img src="<?php echo plugins_url('images/buttons/fullwidth.png', NSL_ADMIN_PATH) ?>"/>
26
+ </label>
27
  <label>
28
  <input type="radio" name="woocoommerce_form_button_style"
29
  value="default" <?php if ($settings->get('woocoommerce_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
includes/userData.php CHANGED
@@ -101,6 +101,19 @@ class NextendSocialUserData {
101
  throw new NSLContinuePageRenderException('CUSTOM_REGISTER_FLOW');
102
  } else {
103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  if (!function_exists('login_header')) {
105
 
106
  if (NextendSocialLogin::$WPLoginCurrentView == 'register-bp') {
101
  throw new NSLContinuePageRenderException('CUSTOM_REGISTER_FLOW');
102
  } else {
103
 
104
+ /**
105
+ * Jetpack removes our "Register" button in our Register flow, so we need to remove their scripts from there.
106
+ * @url https://wordpress.org/plugins/jetpack/
107
+ */
108
+ if (defined('JETPACK__PLUGIN_FILE')) {
109
+ if (class_exists('Jetpack_SSO') && method_exists('Jetpack_SSO', 'get_instance')) {
110
+ remove_action('login_enqueue_scripts', array(
111
+ Jetpack_SSO::get_instance(),
112
+ 'login_enqueue_scripts'
113
+ ));
114
+ }
115
+ }
116
+
117
  if (!function_exists('login_header')) {
118
 
119
  if (NextendSocialLogin::$WPLoginCurrentView == 'register-bp') {
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.28
7
  Requires PHP: 7.0
8
  Requires at least: 4.9
9
  Author: Nextendweb
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.29
7
  Requires PHP: 7.0
8
  Requires at least: 4.9
9
  Author: Nextendweb
nextend-social-login.php CHANGED
@@ -19,9 +19,9 @@ require_once(NSL_PATH . '/compat.php');
19
 
20
  class NextendSocialLogin {
21
 
22
- public static $version = '3.0.28';
23
 
24
- public static $nslPROMinVersion = '3.0.28';
25
 
26
  public static $proxyPage = false;
27
 
@@ -68,7 +68,11 @@ class NextendSocialLogin {
68
  public static $settings;
69
 
70
  private static $styles = array(
71
- 'default' => array(
 
 
 
 
72
  'container' => 'nsl-container-block',
73
  'align' => array(
74
  'left',
@@ -76,7 +80,7 @@ class NextendSocialLogin {
76
  'center',
77
  )
78
  ),
79
- 'icon' => array(
80
  'container' => 'nsl-container-inline',
81
  'align' => array(
82
  'left',
@@ -84,7 +88,7 @@ class NextendSocialLogin {
84
  'center',
85
  )
86
  ),
87
- 'grid' => array(
88
  'container' => 'nsl-container-grid',
89
  'align' => array(
90
  'left',
@@ -809,11 +813,20 @@ class NextendSocialLogin {
809
  * @param bool $unlink
810
  * @param string $align
811
  * @param array|string $providers
 
812
  *
813
  * @return string
814
  */
815
- public static function renderLinkAndUnlinkButtons($heading = '', $link = true, $unlink = true, $align = "left", $providers = false) {
816
  if (count(self::$enabledProviders)) {
 
 
 
 
 
 
 
 
817
  $buttons = '';
818
  if ($heading !== false) {
819
  if (empty($heading)) {
@@ -861,7 +874,7 @@ class NextendSocialLogin {
861
 
862
  $buttons = '<div class="nsl-container-buttons">' . $buttons . '</div>';
863
 
864
- return '<div class="nsl-container ' . self::$styles['default']['container'] . '" data-align="' . esc_attr($align) . '">' . $buttons . '</div>';
865
 
866
  }
867
  }
@@ -893,6 +906,7 @@ class NextendSocialLogin {
893
  }
894
 
895
  $atts = array_merge(array(
 
896
  'provider' => false,
897
  'login' => 1,
898
  'link' => 0,
@@ -914,7 +928,6 @@ class NextendSocialLogin {
914
  }
915
 
916
  $atts = array_merge(array(
917
- 'style' => 'default',
918
  'redirect' => false,
919
  'trackerdata' => false,
920
  'labeltype' => 'login'
@@ -927,7 +940,7 @@ class NextendSocialLogin {
927
  $unlink = filter_var($atts['unlink'], FILTER_VALIDATE_BOOLEAN);
928
 
929
  if ($link || $unlink) {
930
- return self::renderLinkAndUnlinkButtons($atts['heading'], $link, $unlink, $atts['align'], $providers);
931
  }
932
 
933
  return '';
@@ -985,7 +998,7 @@ class NextendSocialLogin {
985
 
986
  $buttons = '<div class="nsl-container-buttons">' . $buttons . '</div>';
987
 
988
- $ret = '<div class="nsl-container ' . self::$styles[$style]['container'] . '" data-align="' . esc_attr($align) . '">' . $heading . $buttons . '</div>';
989
  if (defined('DOING_AJAX') && DOING_AJAX) {
990
  $id = md5(uniqid('nsl-ajax-'));
991
  $ret = '<div id="' . $id . '">' . $ret . '</div><script>window._nslDOMReady(function(){var socialButtonContainer=document.getElementById("' . $id . '");if(socialButtonContainer){var socialButtons=socialButtonContainer.querySelectorAll("a");socialButtons.forEach(function(el,i){var href=el.getAttribute("href");if(href.indexOf("?")===-1){href+="?"}else{href+="&"}
@@ -1200,7 +1213,7 @@ el.setAttribute("href",href+"redirect="+encodeURIComponent(window.location.href)
1200
  }
1201
 
1202
  public static function bp_template_content() {
1203
- echo self::renderLinkAndUnlinkButtons(false);
1204
  }
1205
 
1206
  public static function getTrackerData() {
19
 
20
  class NextendSocialLogin {
21
 
22
+ public static $version = '3.0.29';
23
 
24
+ public static $nslPROMinVersion = '3.0.29';
25
 
26
  public static $proxyPage = false;
27
 
68
  public static $settings;
69
 
70
  private static $styles = array(
71
+ 'fullwidth' => array(
72
+ 'container' => 'nsl-container-block-fullwidth',
73
+ 'align' => array()
74
+ ),
75
+ 'default' => array(
76
  'container' => 'nsl-container-block',
77
  'align' => array(
78
  'left',
80
  'center',
81
  )
82
  ),
83
+ 'icon' => array(
84
  'container' => 'nsl-container-inline',
85
  'align' => array(
86
  'left',
88
  'center',
89
  )
90
  ),
91
+ 'grid' => array(
92
  'container' => 'nsl-container-grid',
93
  'align' => array(
94
  'left',
813
  * @param bool $unlink
814
  * @param string $align
815
  * @param array|string $providers
816
+ * @param string $style
817
  *
818
  * @return string
819
  */
820
+ public static function renderLinkAndUnlinkButtons($heading = '', $link = true, $unlink = true, $align = "left", $providers = false, $style = "default") {
821
  if (count(self::$enabledProviders)) {
822
+
823
+ /**
824
+ * We shouldn't allow the icon style for Link and Unlink buttons
825
+ */
826
+ if ($style === 'icon') {
827
+ $style = 'default';
828
+ }
829
+
830
  $buttons = '';
831
  if ($heading !== false) {
832
  if (empty($heading)) {
874
 
875
  $buttons = '<div class="nsl-container-buttons">' . $buttons . '</div>';
876
 
877
+ return '<div class="nsl-container ' . self::$styles[$style]['container'] . '"' . ($style !== 'fullwidth' ? ' data-align="' . esc_attr($align) . '"' : '') . '>' . $buttons . '</div>';
878
 
879
  }
880
  }
906
  }
907
 
908
  $atts = array_merge(array(
909
+ 'style' => 'default',
910
  'provider' => false,
911
  'login' => 1,
912
  'link' => 0,
928
  }
929
 
930
  $atts = array_merge(array(
 
931
  'redirect' => false,
932
  'trackerdata' => false,
933
  'labeltype' => 'login'
940
  $unlink = filter_var($atts['unlink'], FILTER_VALIDATE_BOOLEAN);
941
 
942
  if ($link || $unlink) {
943
+ return self::renderLinkAndUnlinkButtons($atts['heading'], $link, $unlink, $atts['align'], $providers, $atts['style']);
944
  }
945
 
946
  return '';
998
 
999
  $buttons = '<div class="nsl-container-buttons">' . $buttons . '</div>';
1000
 
1001
+ $ret = '<div class="nsl-container ' . self::$styles[$style]['container'] . '"' . ($style !== 'fullwidth' ? ' data-align="' . esc_attr($align) . '"' : '') . '>' . $heading . $buttons . '</div>';
1002
  if (defined('DOING_AJAX') && DOING_AJAX) {
1003
  $id = md5(uniqid('nsl-ajax-'));
1004
  $ret = '<div id="' . $id . '">' . $ret . '</div><script>window._nslDOMReady(function(){var socialButtonContainer=document.getElementById("' . $id . '");if(socialButtonContainer){var socialButtons=socialButtonContainer.querySelectorAll("a");socialButtons.forEach(function(el,i){var href=el.getAttribute("href");if(href.indexOf("?")===-1){href+="?"}else{href+="&"}
1213
  }
1214
 
1215
  public static function bp_template_content() {
1216
+ echo self::renderLinkAndUnlinkButtons(false, true, true, NextendSocialLogin::$settings->get('buddypress_register_button_align'), false, NextendSocialLogin::$settings->get('buddypress_login_button_style'));
1217
  }
1218
 
1219
  public static function getTrackerData() {
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.9
6
- Tested up to: 5.7.2
7
- Stable tag: 3.0.28
8
  Requires PHP: 7.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -120,6 +120,14 @@ Using the Pro Addon you can set where the login buttons should appear on the Reg
120
 
121
  == Changelog ==
122
 
 
 
 
 
 
 
 
 
123
  = 3.0.28 =
124
  * Fix: We didn't display the disabled registration notification when the "OAuth redirect uri proxy page" feature was used.
125
  * Fix: Google provider - Social button didn't appear in Opera Mini and iOS Opera Touch.
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.9
6
+ Tested up to: 5.8
7
+ Stable tag: 3.0.29
8
  Requires PHP: 7.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
120
 
121
  == Changelog ==
122
 
123
+ = 3.0.29 =
124
+ * Fix: We added clear: both; on .nsl-container to make floated elements before the buttons not to mess up the layout.
125
+ * Fix: Jetpack removed the "Register" button in our register flow when the registration was handled over the WordPress default login page.
126
+ * Improvement: The social buttons with the Default style will try to go as wide as the longest button, if there is enough space in the social button container element.
127
+ * Feature: Fullwidth style for the social buttons.
128
+ * Summer Sale offer
129
+
130
+
131
  = 3.0.28 =
132
  * Fix: We didn't display the disabled registration notification when the "OAuth redirect uri proxy page" feature was used.
133
  * Fix: Google provider - Social button didn't appear in Opera Mini and iOS Opera Touch.
template-parts/style.css CHANGED
@@ -22,16 +22,21 @@ div.nsl-container .nsl-container-buttons {
22
  padding: 5px 0;
23
  }
24
 
25
- div.nsl-container-block .nsl-container-buttons {
 
 
 
 
 
26
  flex-flow: column;
27
  align-items: center;
28
  }
29
 
 
30
  div.nsl-container-block .nsl-container-buttons a {
31
  flex: 1 1 auto;
32
  display: block;
33
  margin: 5px 0;
34
- max-width: 280px;
35
  width: 100%;
36
  }
37
 
@@ -162,18 +167,11 @@ div.nsl-container .nsl-button-apple div.nsl-button-label-container {
162
  clear: both;
163
  }
164
 
165
- /*Button align start*/
166
- div.nsl-container-block[data-align="left"] .nsl-container-buttons {
167
- align-items: flex-start;
168
- }
169
-
170
- div.nsl-container-block[data-align="center"] .nsl-container-buttons {
171
- align-items: center;
172
  }
173
 
174
- div.nsl-container-block[data-align="right"] .nsl-container-buttons {
175
- align-items: flex-end;
176
- }
177
 
178
  div.nsl-container-inline[data-align="left"] .nsl-container-buttons {
179
  justify-content: flex-start;
22
  padding: 5px 0;
23
  }
24
 
25
+ div.nsl-container.nsl-container-block .nsl-container-buttons {
26
+ display: inline-grid;
27
+ grid-template-columns: minmax(145px, auto);
28
+ }
29
+
30
+ div.nsl-container-block-fullwidth .nsl-container-buttons {
31
  flex-flow: column;
32
  align-items: center;
33
  }
34
 
35
+ div.nsl-container-block-fullwidth .nsl-container-buttons a,
36
  div.nsl-container-block .nsl-container-buttons a {
37
  flex: 1 1 auto;
38
  display: block;
39
  margin: 5px 0;
 
40
  width: 100%;
41
  }
42
 
167
  clear: both;
168
  }
169
 
170
+ .nsl-container{
171
+ clear: both;
 
 
 
 
 
172
  }
173
 
174
+ /*Button align start*/
 
 
175
 
176
  div.nsl-container-inline[data-align="left"] .nsl-container-buttons {
177
  justify-content: flex-start;