Version Description
- Compatibility: PHP 7 or greater is required for the new version!.
- Fix: Icon style - Icons will be wrapped into multiple lines when there is no more room for them.
- Fix: Social buttons will no longer be distorted when the page is translated with Google translator.
- Fix: WPLMS theme - social button style and duplicated social buttons.
- Fix: WP Rocket - compatibility with combine JavaScript feature.
- Fix: Popup target window when the social buttons appear in certain modals.
- Fix: Ultimate Member avatars with social registration.
- Fix: Avatar will be synchronized again, if the attachment was already set, but the file doesn't exist.
- Improvement: Database - Register, Link and Login date will be stored in database.
- Improvement: Improvement: Google - Light skin will be the default button skin.
- Improvement: Pages which are being used by other plugins will be filtered out from Page for register flow and OAuth redirect uri proxy page
- Improvement: The Getting Started sections are updated with new steps.
- Improvement: New registrations happening with social login will also be displayed in the BuddyPress - Activity log.
- Improvement: Shortcode provider parameter will also define the visibility of the link and unlink buttons.
- Feature: Option to disable the Google account select prompt on each login.
For developers: The provider instance can now be accessed over "nsl_registration_form_start" and "nsl_registration_form_end" actions
PRO: Provider: Apple
PRO: Fix: Plugin update error - WordPress cached the wrong update url.
PRO: Fix: Social button layouts in Theme My Login forms.
PRO: Fix: Ultimate Member and Support login restrictions - Users will be redirected to the Ultimate Member login page after the registration.
PRO: Improvement: Yahoo new endpoint and app creation guide. New and deprecated Sync data fields.
PRO: Improvement: WooCommerce automatically generated password feature support when Registration notification sent to is set to User or User and Admin.
Download this release
Release Info
Developer | nextendweb |
Plugin | Nextend Social Login and Register (Facebook, Google, Twitter) |
Version | 3.0.21 |
Comparing to | |
See all releases |
Code changes from version 3.0.20 to 3.0.21
- NSL/GDPR.php +134 -132
- NSL/Notices.php +204 -203
- NSL/Persistent/Persistent.php +85 -84
- NSL/Persistent/Storage/Abstract.php +71 -71
- NSL/Persistent/Storage/Session.php +85 -85
- NSL/Persistent/Storage/Transient.php +12 -12
- NSL/REST.php +70 -62
- admin/EditUser.php +71 -71
- admin/admin.php +754 -746
- admin/interim.php +37 -37
- admin/style.css +524 -524
- admin/templates-provider/buttons.php +176 -178
- admin/templates-provider/menu.php +24 -24
- admin/templates-provider/settings-other.php +72 -69
- admin/templates-provider/settings-pro.php +140 -140
- admin/templates-provider/sync-data.php +125 -125
- admin/templates-provider/usage.php +47 -47
- admin/templates/debug.php +65 -65
- admin/templates/fix-redirect-uri.php +35 -35
- admin/templates/footer.php +3 -3
- admin/templates/global-settings.php +60 -59
- admin/templates/header.php +23 -23
- admin/templates/menu.php +13 -13
- admin/templates/pro-addon.php +173 -173
- admin/templates/pro.php +64 -64
- admin/templates/provider.php +7 -7
- admin/templates/providers.php +221 -221
- admin/templates/review.php +85 -85
- admin/templates/settings/buddypress.php +171 -171
- admin/templates/settings/comment.php +74 -74
- admin/templates/settings/general-pro.php +112 -110
- admin/templates/settings/general.php +258 -239
- admin/templates/settings/login-form-pro.php +155 -153
- admin/templates/settings/login-form.php +73 -73
- admin/templates/settings/memberpress.php +172 -172
- admin/templates/settings/privacy.php +110 -108
- admin/templates/settings/ultimate-member.php +187 -187
- admin/templates/settings/userpro.php +168 -168
- admin/templates/settings/woocommerce.php +255 -255
- admin/templates/test-connection.php +66 -64
- admin/upgrader.php +96 -94
- class-settings.php +92 -79
- compat.php +46 -26
- includes/auth.php +38 -38
- includes/avatar.php +415 -401
- includes/compat-wp-login.php +313 -276
- includes/exceptions.php +4 -4
- includes/oauth2.php +310 -308
- includes/provider-admin.php +308 -306
- includes/provider-dummy.php +111 -111
- includes/provider.php +1119 -1078
- includes/user.php +649 -624
- includes/userData.php +284 -280
- js/nsl.js +231 -219
- languages/nextend-facebook-connect-nl_NL.mo +0 -0
- languages/nextend-facebook-connect-nl_NL.po +3138 -0
- licence.txt +339 -339
- nextend-facebook-connect.php +43 -43
- nextend-social-login.php +1228 -1169
- providers/amazon/amazon.php +13 -13
- providers/apple/apple.php +14 -0
- providers/apple/apple.png +0 -0
- providers/disqus/disqus.php +13 -13
- providers/facebook/admin/fix-redirect-uri.php +0 -9
NSL/GDPR.php
CHANGED
@@ -1,133 +1,135 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace NSL;
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
$content
|
34 |
-
|
35 |
-
$content .= '<
|
36 |
-
|
37 |
-
|
38 |
-
$content .= '<
|
39 |
-
|
40 |
-
|
41 |
-
$content .= '<
|
42 |
-
|
43 |
-
|
44 |
-
$content .= '<
|
45 |
-
|
46 |
-
|
47 |
-
$content .= '<
|
48 |
-
|
49 |
-
|
50 |
-
$content .= '<
|
51 |
-
|
52 |
-
|
53 |
-
$content .= '<
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
$
|
77 |
-
|
78 |
-
$
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
'
|
99 |
-
'
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
'
|
127 |
-
'
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
|
|
133 |
new GDPR();
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace NSL;
|
4 |
+
|
5 |
+
use NextendSocialLogin;
|
6 |
+
|
7 |
+
class GDPR {
|
8 |
+
|
9 |
+
public function __construct() {
|
10 |
+
add_action('admin_init', array(
|
11 |
+
$this,
|
12 |
+
'add_privacy_policy_content'
|
13 |
+
));
|
14 |
+
|
15 |
+
add_filter('wp_privacy_personal_data_exporters', array(
|
16 |
+
$this,
|
17 |
+
'register_exporter'
|
18 |
+
), -1);
|
19 |
+
|
20 |
+
/*
|
21 |
+
add_filter('wp_privacy_personal_data_erasers', array(
|
22 |
+
$this,
|
23 |
+
'register_eraser'
|
24 |
+
));
|
25 |
+
*/
|
26 |
+
}
|
27 |
+
|
28 |
+
public function add_privacy_policy_content() {
|
29 |
+
if (!function_exists('wp_add_privacy_policy_content')) {
|
30 |
+
return;
|
31 |
+
}
|
32 |
+
|
33 |
+
$content = '';
|
34 |
+
$content .= '<h2>' . __('What personal data we collect and why we collect it') . '</h2>';
|
35 |
+
$content .= '<p class="privacy-policy-tutorial">' . sprintf(__('%1$s collects data when a visitor register, login or link the account with with any of the enabled social provider. It collects the following data: email address, name, social provider identifier and access token. Also it can collect profile picture and more fields with the Pro Addon\'s sync data feature.'), 'Nextend Social Login') . '</p>';
|
36 |
+
|
37 |
+
$content .= '<h2>' . __('Who we share your data with') . '</h2>';
|
38 |
+
$content .= '<p class="privacy-policy-tutorial">' . sprintf(__('%1$s stores the personal data on your site and does not share it with anyone except the access token which used for the authenticated communication with the social providers.'), 'Nextend Social Login') . '</p>';
|
39 |
+
|
40 |
+
$content .= '<h2>' . __('Does the plugin share personal data with third parties') . '</h2>';
|
41 |
+
$content .= '<p class="privacy-policy-tutorial">' . sprintf(__('%1$s use the access token what the social provider gave to communicate with the providers to verify account and securely access personal data.'), 'Nextend Social Login') . '</p>';
|
42 |
+
|
43 |
+
$content .= '<h2>' . __('How long we retain your data') . '</h2>';
|
44 |
+
$content .= '<p class="privacy-policy-tutorial">' . sprintf(__('%1$s removes the collected personal data when the user deleted from WordPress.'), 'Nextend Social Login') . '</p>';
|
45 |
+
|
46 |
+
$content .= '<h2>' . __('Does the plugin use personal data collected by others?') . '</h2>';
|
47 |
+
$content .= '<p class="privacy-policy-tutorial">' . sprintf(__('%1$s use the personal data collected by the social providers to create account on your site when the visitor authorize it.'), 'Nextend Social Login') . '</p>';
|
48 |
+
|
49 |
+
$content .= '<h2>' . __('Does the plugin store things in the browser?') . '</h2>';
|
50 |
+
$content .= '<p class="privacy-policy-tutorial">' . sprintf(__('Yes, %1$s must create a cookie for visitors who use the social login authorization flow. This cookie required for every provider to secure the communication and to redirect the user back to the last location.'), 'Nextend Social Login') . '</p>';
|
51 |
+
|
52 |
+
$content .= '<h2>' . __('Does the plugin collect telemetry data, directly or indirectly?') . '</h2>';
|
53 |
+
$content .= '<p class="privacy-policy-tutorial">' . __('No') . '</p>';
|
54 |
+
|
55 |
+
$content .= '<h2>' . __('Does the plugin enqueue JavaScript, tracking pixels or embed iframes from a third party?') . '</h2>';
|
56 |
+
$content .= '<p class="privacy-policy-tutorial">' . __('No') . '</p>';
|
57 |
+
|
58 |
+
|
59 |
+
wp_add_privacy_policy_content('Nextend Social Login', wp_kses_post($content));
|
60 |
+
}
|
61 |
+
|
62 |
+
|
63 |
+
public function register_exporter($exporters) {
|
64 |
+
$exporters['nextend-facebook-connect'] = array(
|
65 |
+
'exporter_friendly_name' => 'Nextend Social Login',
|
66 |
+
'callback' => array(
|
67 |
+
$this,
|
68 |
+
'exporter'
|
69 |
+
),
|
70 |
+
);
|
71 |
+
|
72 |
+
return $exporters;
|
73 |
+
}
|
74 |
+
|
75 |
+
public function exporter($email_address, $page = 1) {
|
76 |
+
$email_address = trim($email_address);
|
77 |
+
|
78 |
+
$data_to_export = array();
|
79 |
+
|
80 |
+
$user = get_user_by('email', $email_address);
|
81 |
+
|
82 |
+
if (!$user) {
|
83 |
+
return array(
|
84 |
+
'data' => array(),
|
85 |
+
'done' => true,
|
86 |
+
);
|
87 |
+
}
|
88 |
+
|
89 |
+
$user_data_to_export = array();
|
90 |
+
|
91 |
+
foreach (NextendSocialLogin::$allowedProviders AS $provider) {
|
92 |
+
$user_data_to_export = array_merge($user_data_to_export, $provider->exportPersonalData($user->ID));
|
93 |
+
}
|
94 |
+
|
95 |
+
|
96 |
+
if (!empty($user_data_to_export)) {
|
97 |
+
$data_to_export[] = array(
|
98 |
+
'group_id' => 'user',
|
99 |
+
'group_label' => __('User'),
|
100 |
+
'item_id' => "user-{$user->ID}",
|
101 |
+
'data' => $user_data_to_export,
|
102 |
+
);
|
103 |
+
}
|
104 |
+
|
105 |
+
|
106 |
+
return array(
|
107 |
+
'data' => $data_to_export,
|
108 |
+
'done' => true,
|
109 |
+
);
|
110 |
+
}
|
111 |
+
|
112 |
+
public function register_eraser($erasers) {
|
113 |
+
$erasers['nextend-facebook-connect'] = array(
|
114 |
+
'exporter_friendly_name' => 'Nextend Social Login',
|
115 |
+
'callback' => array(
|
116 |
+
$this,
|
117 |
+
'eraser'
|
118 |
+
),
|
119 |
+
);
|
120 |
+
|
121 |
+
return $erasers;
|
122 |
+
}
|
123 |
+
|
124 |
+
public function eraser($email_address, $page = 1) {
|
125 |
+
return array(
|
126 |
+
'items_removed' => false,
|
127 |
+
'items_retained' => false,
|
128 |
+
'messages' => array(),
|
129 |
+
'done' => true,
|
130 |
+
);
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
|
135 |
new GDPR();
|
NSL/Notices.php
CHANGED
@@ -1,204 +1,205 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace NSL;
|
4 |
-
|
5 |
-
use NSL\Persistent\Persistent;
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
self
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
|
|
204 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace NSL;
|
4 |
+
|
5 |
+
use NSL\Persistent\Persistent;
|
6 |
+
use WP_Error;
|
7 |
+
|
8 |
+
class Notices {
|
9 |
+
|
10 |
+
private static $notices;
|
11 |
+
|
12 |
+
private static $instance;
|
13 |
+
|
14 |
+
public static function init() {
|
15 |
+
if (self::$instance === null) {
|
16 |
+
self::$instance = new self;
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
20 |
+
private function __construct() {
|
21 |
+
|
22 |
+
add_action('init', array(
|
23 |
+
$this,
|
24 |
+
'load'
|
25 |
+
), 11);
|
26 |
+
|
27 |
+
if (basename($_SERVER['PHP_SELF']) !== 'options-general.php' || empty($_GET['page']) || $_GET['page'] !== 'nextend-social-login') {
|
28 |
+
add_action('admin_notices', array(
|
29 |
+
$this,
|
30 |
+
'admin_notices'
|
31 |
+
));
|
32 |
+
}
|
33 |
+
|
34 |
+
add_action('admin_print_footer_scripts', array(
|
35 |
+
$this,
|
36 |
+
'notices_fallback'
|
37 |
+
));
|
38 |
+
add_action('wp_print_footer_scripts', array(
|
39 |
+
$this,
|
40 |
+
'notices_fallback'
|
41 |
+
));
|
42 |
+
}
|
43 |
+
|
44 |
+
public function load() {
|
45 |
+
self::$notices = maybe_unserialize(self::get());
|
46 |
+
if (!is_array(self::$notices)) {
|
47 |
+
self::$notices = array();
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
private static function add($type, $message) {
|
52 |
+
if (!isset(self::$notices[$type])) {
|
53 |
+
self::$notices[$type] = array();
|
54 |
+
}
|
55 |
+
|
56 |
+
if (!in_array($message, self::$notices[$type])) {
|
57 |
+
self::$notices[$type][] = $message;
|
58 |
+
}
|
59 |
+
|
60 |
+
self::set();
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* @param $message string|WP_Error
|
65 |
+
*/
|
66 |
+
public static function addError($message) {
|
67 |
+
if (is_wp_error($message)) {
|
68 |
+
foreach ($message->get_error_messages() as $m) {
|
69 |
+
self::add('error', $m);
|
70 |
+
}
|
71 |
+
} else {
|
72 |
+
self::add('error', $message);
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
public static function getErrors() {
|
77 |
+
if (isset(self::$notices['error'])) {
|
78 |
+
|
79 |
+
$errors = self::$notices['error'];
|
80 |
+
|
81 |
+
unset(self::$notices['error']);
|
82 |
+
self::set();
|
83 |
+
|
84 |
+
return $errors;
|
85 |
+
}
|
86 |
+
|
87 |
+
return false;
|
88 |
+
}
|
89 |
+
|
90 |
+
public static function addSuccess($message) {
|
91 |
+
self::add('success', $message);
|
92 |
+
}
|
93 |
+
|
94 |
+
public static function displayNotices() {
|
95 |
+
|
96 |
+
$html = self::getHTML();
|
97 |
+
|
98 |
+
if (!empty($html)) {
|
99 |
+
echo '<div class="nsl-admin-notices">' . $html . '</div>';
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
public function admin_notices() {
|
104 |
+
echo self::getHTML();
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Displays the non-displayed notices in lightbox as a fallback
|
109 |
+
*/
|
110 |
+
public function notices_fallback() {
|
111 |
+
|
112 |
+
$html = self::getHTML();
|
113 |
+
|
114 |
+
if (!empty($html)) {
|
115 |
+
?>
|
116 |
+
<div id="nsl-notices-fallback" onclick="this.parentNode.removeChild(this);">
|
117 |
+
<?php echo $html; ?>
|
118 |
+
<style>
|
119 |
+
#nsl-notices-fallback {
|
120 |
+
position: fixed;
|
121 |
+
right: 10px;
|
122 |
+
top: 10px;
|
123 |
+
z-index: 10000;
|
124 |
+
}
|
125 |
+
|
126 |
+
.admin-bar #nsl-notices-fallback {
|
127 |
+
top: 42px;
|
128 |
+
}
|
129 |
+
|
130 |
+
#nsl-notices-fallback > div {
|
131 |
+
position: relative;
|
132 |
+
background: #fff;
|
133 |
+
border-left: 4px solid #fff;
|
134 |
+
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
|
135 |
+
margin: 5px 15px 2px;
|
136 |
+
padding: 1px 20px;
|
137 |
+
}
|
138 |
+
|
139 |
+
#nsl-notices-fallback > div.error {
|
140 |
+
display: block;
|
141 |
+
border-left-color: #dc3232;
|
142 |
+
}
|
143 |
+
|
144 |
+
#nsl-notices-fallback > div.updated {
|
145 |
+
display: block;
|
146 |
+
border-left-color: #46b450;
|
147 |
+
}
|
148 |
+
|
149 |
+
#nsl-notices-fallback p {
|
150 |
+
margin: .5em 0;
|
151 |
+
padding: 2px;
|
152 |
+
}
|
153 |
+
|
154 |
+
#nsl-notices-fallback > div:after {
|
155 |
+
position: absolute;
|
156 |
+
right: 5px;
|
157 |
+
top: 5px;
|
158 |
+
content: '\00d7';
|
159 |
+
display: block;
|
160 |
+
height: 16px;
|
161 |
+
width: 16px;
|
162 |
+
line-height: 16px;
|
163 |
+
text-align: center;
|
164 |
+
font-size: 20px;
|
165 |
+
cursor: pointer;
|
166 |
+
}
|
167 |
+
</style>
|
168 |
+
</div>
|
169 |
+
<?php
|
170 |
+
}
|
171 |
+
}
|
172 |
+
|
173 |
+
private static function getHTML() {
|
174 |
+
$html = '';
|
175 |
+
if (isset(self::$notices['success'])) {
|
176 |
+
foreach (self::$notices['success'] AS $message) {
|
177 |
+
$html .= '<div class="updated"><p>' . $message . '</p></div>';
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
if (isset(self::$notices['error'])) {
|
182 |
+
foreach (self::$notices['error'] AS $message) {
|
183 |
+
$html .= '<div class="error"><p>' . $message . '</p></div>';
|
184 |
+
}
|
185 |
+
}
|
186 |
+
|
187 |
+
self::clear();
|
188 |
+
|
189 |
+
return $html;
|
190 |
+
}
|
191 |
+
|
192 |
+
private static function get() {
|
193 |
+
return Persistent::get('notices');
|
194 |
+
}
|
195 |
+
|
196 |
+
private static function set() {
|
197 |
+
Persistent::set('notices', self::$notices);
|
198 |
+
}
|
199 |
+
|
200 |
+
public static function clear() {
|
201 |
+
|
202 |
+
Persistent::delete('notices');
|
203 |
+
self::$notices = array();
|
204 |
+
}
|
205 |
}
|
NSL/Persistent/Persistent.php
CHANGED
@@ -1,85 +1,86 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace NSL\Persistent;
|
4 |
-
|
5 |
-
use NSL\Persistent\Storage\
|
6 |
-
use NSL\Persistent\Storage\
|
7 |
-
use NSL\Persistent\Storage\
|
8 |
-
|
9 |
-
|
10 |
-
require_once dirname(__FILE__) . '/Storage/
|
11 |
-
require_once dirname(__FILE__) . '/Storage/
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
* @param
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
}
|
83 |
-
|
84 |
-
|
|
|
85 |
new Persistent();
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace NSL\Persistent;
|
4 |
+
|
5 |
+
use NSL\Persistent\Storage\Session;
|
6 |
+
use NSL\Persistent\Storage\StorageAbstract;
|
7 |
+
use NSL\Persistent\Storage\Transient;
|
8 |
+
use WP_User;
|
9 |
+
|
10 |
+
require_once dirname(__FILE__) . '/Storage/Abstract.php';
|
11 |
+
require_once dirname(__FILE__) . '/Storage/Session.php';
|
12 |
+
require_once dirname(__FILE__) . '/Storage/Transient.php';
|
13 |
+
|
14 |
+
class Persistent {
|
15 |
+
|
16 |
+
private static $instance;
|
17 |
+
|
18 |
+
/** @var StorageAbstract */
|
19 |
+
private $storage;
|
20 |
+
|
21 |
+
public function __construct() {
|
22 |
+
self::$instance = $this;
|
23 |
+
add_action('init', array(
|
24 |
+
$this,
|
25 |
+
'init'
|
26 |
+
), 0);
|
27 |
+
|
28 |
+
add_action('wp_login', array(
|
29 |
+
$this,
|
30 |
+
'transferSessionToUser'
|
31 |
+
), 10, 2);
|
32 |
+
}
|
33 |
+
|
34 |
+
public function init() {
|
35 |
+
if ($this->storage === NULL) {
|
36 |
+
if (is_user_logged_in()) {
|
37 |
+
$this->storage = new Transient();
|
38 |
+
} else {
|
39 |
+
$this->storage = new Session();
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
public static function set($key, $value) {
|
45 |
+
|
46 |
+
self::$instance->storage->set($key, $value);
|
47 |
+
}
|
48 |
+
|
49 |
+
public static function get($key) {
|
50 |
+
|
51 |
+
return self::$instance->storage->get($key);
|
52 |
+
}
|
53 |
+
|
54 |
+
public static function delete($key) {
|
55 |
+
self::$instance->storage->delete($key);
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* @param $user_login
|
60 |
+
* @param WP_User $user
|
61 |
+
*/
|
62 |
+
public function transferSessionToUser($user_login, $user = null) {
|
63 |
+
|
64 |
+
if (!$user) { // For do_action( 'wp_login' ) calls that lacked passing the 2nd arg.
|
65 |
+
$user = get_user_by('login', $user_login);
|
66 |
+
}
|
67 |
+
|
68 |
+
$newStorage = new Transient($user->ID);
|
69 |
+
/**
|
70 |
+
* $this->storage might be NULL if init action not called yet
|
71 |
+
*/
|
72 |
+
if ($this->storage !== NULL) {
|
73 |
+
$newStorage->transferData($this->storage);
|
74 |
+
}
|
75 |
+
|
76 |
+
$this->storage = $newStorage;
|
77 |
+
}
|
78 |
+
|
79 |
+
public static function clear() {
|
80 |
+
|
81 |
+
self::$instance->storage->clear();
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
|
86 |
new Persistent();
|
NSL/Persistent/Storage/Abstract.php
CHANGED
@@ -1,72 +1,72 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace NSL\Persistent\Storage;
|
4 |
-
|
5 |
-
abstract class StorageAbstract {
|
6 |
-
|
7 |
-
protected $sessionId = null;
|
8 |
-
|
9 |
-
protected $data = array();
|
10 |
-
|
11 |
-
public function set($key, $value) {
|
12 |
-
$this->load(true);
|
13 |
-
|
14 |
-
$this->data[$key] = $value;
|
15 |
-
|
16 |
-
$this->store();
|
17 |
-
}
|
18 |
-
|
19 |
-
public function get($key) {
|
20 |
-
$this->load();
|
21 |
-
|
22 |
-
if (isset($this->data[$key])) {
|
23 |
-
return $this->data[$key];
|
24 |
-
}
|
25 |
-
|
26 |
-
return null;
|
27 |
-
}
|
28 |
-
|
29 |
-
public function delete($key) {
|
30 |
-
$this->load();
|
31 |
-
|
32 |
-
if (isset($this->data[$key])) {
|
33 |
-
unset($this->data[$key]);
|
34 |
-
$this->store();
|
35 |
-
}
|
36 |
-
}
|
37 |
-
|
38 |
-
public function clear() {
|
39 |
-
$this->data = array();
|
40 |
-
$this->store();
|
41 |
-
}
|
42 |
-
|
43 |
-
protected function load($createSession = false) {
|
44 |
-
static $isLoaded = false;
|
45 |
-
|
46 |
-
if (!$isLoaded) {
|
47 |
-
$data = maybe_unserialize(get_site_transient($this->sessionId));
|
48 |
-
if (is_array($data)) {
|
49 |
-
$this->data = $data;
|
50 |
-
}
|
51 |
-
$isLoaded = true;
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
private function store() {
|
56 |
-
if (empty($this->data)) {
|
57 |
-
delete_site_transient($this->sessionId);
|
58 |
-
} else {
|
59 |
-
set_site_transient($this->sessionId, $this->data,
|
60 |
-
}
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* @param StorageAbstract $storage
|
65 |
-
*/
|
66 |
-
public function transferData($storage) {
|
67 |
-
$this->data = $storage->data;
|
68 |
-
$this->store();
|
69 |
-
|
70 |
-
$storage->clear();
|
71 |
-
}
|
72 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace NSL\Persistent\Storage;
|
4 |
+
|
5 |
+
abstract class StorageAbstract {
|
6 |
+
|
7 |
+
protected $sessionId = null;
|
8 |
+
|
9 |
+
protected $data = array();
|
10 |
+
|
11 |
+
public function set($key, $value) {
|
12 |
+
$this->load(true);
|
13 |
+
|
14 |
+
$this->data[$key] = $value;
|
15 |
+
|
16 |
+
$this->store();
|
17 |
+
}
|
18 |
+
|
19 |
+
public function get($key) {
|
20 |
+
$this->load();
|
21 |
+
|
22 |
+
if (isset($this->data[$key])) {
|
23 |
+
return $this->data[$key];
|
24 |
+
}
|
25 |
+
|
26 |
+
return null;
|
27 |
+
}
|
28 |
+
|
29 |
+
public function delete($key) {
|
30 |
+
$this->load();
|
31 |
+
|
32 |
+
if (isset($this->data[$key])) {
|
33 |
+
unset($this->data[$key]);
|
34 |
+
$this->store();
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
public function clear() {
|
39 |
+
$this->data = array();
|
40 |
+
$this->store();
|
41 |
+
}
|
42 |
+
|
43 |
+
protected function load($createSession = false) {
|
44 |
+
static $isLoaded = false;
|
45 |
+
|
46 |
+
if (!$isLoaded) {
|
47 |
+
$data = maybe_unserialize(get_site_transient($this->sessionId));
|
48 |
+
if (is_array($data)) {
|
49 |
+
$this->data = $data;
|
50 |
+
}
|
51 |
+
$isLoaded = true;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
private function store() {
|
56 |
+
if (empty($this->data)) {
|
57 |
+
delete_site_transient($this->sessionId);
|
58 |
+
} else {
|
59 |
+
set_site_transient($this->sessionId, $this->data, apply_filters('nsl_persistent_expiration', HOUR_IN_SECONDS));
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* @param StorageAbstract $storage
|
65 |
+
*/
|
66 |
+
public function transferData($storage) {
|
67 |
+
$this->data = $storage->data;
|
68 |
+
$this->store();
|
69 |
+
|
70 |
+
$storage->clear();
|
71 |
+
}
|
72 |
}
|
NSL/Persistent/Storage/Session.php
CHANGED
@@ -1,86 +1,86 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace NSL\Persistent\Storage;
|
4 |
-
|
5 |
-
class Session extends StorageAbstract {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* @var string name of the cookie. Can be changed with nsl_session_name filter and NSL_SESSION_NAME constant.
|
9 |
-
*
|
10 |
-
* @see https://pantheon.io/docs/caching-advanced-topics/
|
11 |
-
*/
|
12 |
-
private $sessionName = 'SESSnsl';
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* WP Engine hosting needs custom cookie name to prevent caching.
|
18 |
-
*
|
19 |
-
* @see https://wpengine.com/support/wpengine-ecommerce/
|
20 |
-
*/
|
21 |
-
if (class_exists('WpePlugin_common', false)) {
|
22 |
-
$this->sessionName = 'wordpress_nsl';
|
23 |
-
}
|
24 |
-
if (defined('NSL_SESSION_NAME')) {
|
25 |
-
$this->sessionName = NSL_SESSION_NAME;
|
26 |
-
}
|
27 |
-
$this->sessionName = apply_filters('nsl_session_name', $this->sessionName);
|
28 |
-
}
|
29 |
-
|
30 |
-
public function clear() {
|
31 |
-
parent::clear();
|
32 |
-
|
33 |
-
$this->destroy();
|
34 |
-
}
|
35 |
-
|
36 |
-
private function destroy() {
|
37 |
-
$sessionID = $this->sessionId;
|
38 |
-
if ($sessionID) {
|
39 |
-
$this->setCookie($sessionID, time() - YEAR_IN_SECONDS, apply_filters('nsl_session_use_secure_cookie', false));
|
40 |
-
|
41 |
-
add_action('shutdown', array(
|
42 |
-
$this,
|
43 |
-
'destroySiteTransient'
|
44 |
-
));
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
48 |
-
public function destroySiteTransient() {
|
49 |
-
$sessionID = $this->sessionId;
|
50 |
-
if ($sessionID) {
|
51 |
-
delete_site_transient('nsl_' . $sessionID);
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
protected function load($createSession = false) {
|
56 |
-
static $isLoaded = false;
|
57 |
-
if ($this->sessionId === null) {
|
58 |
-
if (isset($_COOKIE[$this->sessionName])) {
|
59 |
-
$this->sessionId = 'nsl_persistent_' . md5(SECURE_AUTH_KEY . $_COOKIE[$this->sessionName]);
|
60 |
-
} else if ($createSession) {
|
61 |
-
$unique = uniqid('nsl', true);
|
62 |
-
|
63 |
-
$this->setCookie($unique,
|
64 |
-
|
65 |
-
$this->sessionId = 'nsl_persistent_' . md5(SECURE_AUTH_KEY . $unique);
|
66 |
-
|
67 |
-
$isLoaded = true;
|
68 |
-
}
|
69 |
-
}
|
70 |
-
|
71 |
-
if (!$isLoaded) {
|
72 |
-
if ($this->sessionId !== null) {
|
73 |
-
$data = maybe_unserialize(get_site_transient($this->sessionId));
|
74 |
-
if (is_array($data)) {
|
75 |
-
$this->data = $data;
|
76 |
-
}
|
77 |
-
$isLoaded = true;
|
78 |
-
}
|
79 |
-
}
|
80 |
-
}
|
81 |
-
|
82 |
-
private function setCookie($value, $expire, $secure = false) {
|
83 |
-
|
84 |
-
setcookie($this->sessionName, $value, $expire, COOKIEPATH ? COOKIEPATH : '/', COOKIE_DOMAIN, $secure);
|
85 |
-
}
|
86 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace NSL\Persistent\Storage;
|
4 |
+
|
5 |
+
class Session extends StorageAbstract {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* @var string name of the cookie. Can be changed with nsl_session_name filter and NSL_SESSION_NAME constant.
|
9 |
+
*
|
10 |
+
* @see https://pantheon.io/docs/caching-advanced-topics/
|
11 |
+
*/
|
12 |
+
private $sessionName = 'SESSnsl';
|
13 |
+
|
14 |
+
public function __construct() {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* WP Engine hosting needs custom cookie name to prevent caching.
|
18 |
+
*
|
19 |
+
* @see https://wpengine.com/support/wpengine-ecommerce/
|
20 |
+
*/
|
21 |
+
if (class_exists('WpePlugin_common', false)) {
|
22 |
+
$this->sessionName = 'wordpress_nsl';
|
23 |
+
}
|
24 |
+
if (defined('NSL_SESSION_NAME')) {
|
25 |
+
$this->sessionName = NSL_SESSION_NAME;
|
26 |
+
}
|
27 |
+
$this->sessionName = apply_filters('nsl_session_name', $this->sessionName);
|
28 |
+
}
|
29 |
+
|
30 |
+
public function clear() {
|
31 |
+
parent::clear();
|
32 |
+
|
33 |
+
$this->destroy();
|
34 |
+
}
|
35 |
+
|
36 |
+
private function destroy() {
|
37 |
+
$sessionID = $this->sessionId;
|
38 |
+
if ($sessionID) {
|
39 |
+
$this->setCookie($sessionID, time() - YEAR_IN_SECONDS, apply_filters('nsl_session_use_secure_cookie', false));
|
40 |
+
|
41 |
+
add_action('shutdown', array(
|
42 |
+
$this,
|
43 |
+
'destroySiteTransient'
|
44 |
+
));
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
public function destroySiteTransient() {
|
49 |
+
$sessionID = $this->sessionId;
|
50 |
+
if ($sessionID) {
|
51 |
+
delete_site_transient('nsl_' . $sessionID);
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
protected function load($createSession = false) {
|
56 |
+
static $isLoaded = false;
|
57 |
+
if ($this->sessionId === null) {
|
58 |
+
if (isset($_COOKIE[$this->sessionName])) {
|
59 |
+
$this->sessionId = 'nsl_persistent_' . md5(SECURE_AUTH_KEY . $_COOKIE[$this->sessionName]);
|
60 |
+
} else if ($createSession) {
|
61 |
+
$unique = uniqid('nsl', true);
|
62 |
+
|
63 |
+
$this->setCookie($unique, apply_filters('nsl_session_cookie_expiration', 0), apply_filters('nsl_session_use_secure_cookie', false));
|
64 |
+
|
65 |
+
$this->sessionId = 'nsl_persistent_' . md5(SECURE_AUTH_KEY . $unique);
|
66 |
+
|
67 |
+
$isLoaded = true;
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
if (!$isLoaded) {
|
72 |
+
if ($this->sessionId !== null) {
|
73 |
+
$data = maybe_unserialize(get_site_transient($this->sessionId));
|
74 |
+
if (is_array($data)) {
|
75 |
+
$this->data = $data;
|
76 |
+
}
|
77 |
+
$isLoaded = true;
|
78 |
+
}
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
private function setCookie($value, $expire, $secure = false) {
|
83 |
+
|
84 |
+
setcookie($this->sessionName, $value, $expire, COOKIEPATH ? COOKIEPATH : '/', COOKIE_DOMAIN, $secure);
|
85 |
+
}
|
86 |
}
|
NSL/Persistent/Storage/Transient.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace NSL\Persistent\Storage;
|
4 |
-
|
5 |
-
class Transient extends StorageAbstract {
|
6 |
-
|
7 |
-
public function __construct($user_id = false) {
|
8 |
-
if ($user_id === false) {
|
9 |
-
$user_id = get_current_user_id();
|
10 |
-
}
|
11 |
-
$this->sessionId = 'nsl_persistent_' . $user_id;
|
12 |
-
}
|
13 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace NSL\Persistent\Storage;
|
4 |
+
|
5 |
+
class Transient extends StorageAbstract {
|
6 |
+
|
7 |
+
public function __construct($user_id = false) {
|
8 |
+
if ($user_id === false) {
|
9 |
+
$user_id = get_current_user_id();
|
10 |
+
}
|
11 |
+
$this->sessionId = 'nsl_persistent_' . $user_id;
|
12 |
+
}
|
13 |
}
|
NSL/REST.php
CHANGED
@@ -1,62 +1,70 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace NSL;
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace NSL;
|
4 |
+
|
5 |
+
use Exception;
|
6 |
+
use NextendSocialLogin;
|
7 |
+
use WP_Error;
|
8 |
+
use WP_REST_Request;
|
9 |
+
use WP_REST_Response;
|
10 |
+
use function add_action;
|
11 |
+
use function register_rest_route;
|
12 |
+
|
13 |
+
class REST {
|
14 |
+
|
15 |
+
public function __construct() {
|
16 |
+
add_action('rest_api_init', array(
|
17 |
+
$this,
|
18 |
+
'rest_api_init'
|
19 |
+
));
|
20 |
+
}
|
21 |
+
|
22 |
+
public function rest_api_init() {
|
23 |
+
register_rest_route('nextend-social-login/v1', '/(?P<provider>\w[\w\s\-]*)/get_user', array(
|
24 |
+
'args' => array(
|
25 |
+
'provider' => array(
|
26 |
+
'required' => true,
|
27 |
+
'validate_callback' => array(
|
28 |
+
$this,
|
29 |
+
'validate_provider'
|
30 |
+
)
|
31 |
+
),
|
32 |
+
'access_token' => array(
|
33 |
+
'required' => true,
|
34 |
+
),
|
35 |
+
),
|
36 |
+
array(
|
37 |
+
'methods' => 'POST',
|
38 |
+
'callback' => array(
|
39 |
+
$this,
|
40 |
+
'get_user'
|
41 |
+
)
|
42 |
+
),
|
43 |
+
));
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
public function validate_provider($providerID) {
|
48 |
+
return NextendSocialLogin::isProviderEnabled($providerID);
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* @param WP_REST_Request $request Full details about the request.
|
53 |
+
*
|
54 |
+
* @return WP_Error|WP_REST_Response
|
55 |
+
*/
|
56 |
+
public function get_user($request) {
|
57 |
+
|
58 |
+
$provider = NextendSocialLogin::$enabledProviders[$request['provider']];
|
59 |
+
try {
|
60 |
+
$user = $provider->findUserByAccessToken($request['access_token']);
|
61 |
+
} catch (Exception $e) {
|
62 |
+
return new WP_Error('error', $e->getMessage());
|
63 |
+
}
|
64 |
+
|
65 |
+
return $user;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
+
new REST();
|
70 |
+
|
admin/EditUser.php
CHANGED
@@ -1,71 +1,71 @@
|
|
1 |
-
<?php
|
2 |
-
/** @var $user WP_User */
|
3 |
-
?>
|
4 |
-
|
5 |
-
<?php foreach (NextendSocialLogin::$enabledProviders AS $provider): ?>
|
6 |
-
<?php
|
7 |
-
$settings = $provider->settings;
|
8 |
-
if (!$provider->isUserConnected($user->ID)) continue;
|
9 |
-
$hasData = false;
|
10 |
-
ob_start();
|
11 |
-
?>
|
12 |
-
|
13 |
-
<h2><?php echo $provider->getLabel(); ?></h2>
|
14 |
-
|
15 |
-
<table class="form-table">
|
16 |
-
<tbody>
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
</tbody>
|
48 |
-
</table>
|
49 |
-
<?php
|
50 |
-
if ($hasData) {
|
51 |
-
echo ob_get_clean();
|
52 |
-
} else {
|
53 |
-
ob_end_clean();
|
54 |
-
}
|
55 |
-
?>
|
56 |
-
<?php endforeach; ?>
|
57 |
-
|
58 |
-
<?php
|
59 |
-
|
60 |
-
function formatUserMeta($user_meta, $level = '') {
|
61 |
-
$formatted_usermeta = '';
|
62 |
-
if (is_array($user_meta)) {
|
63 |
-
foreach ($user_meta as $meta_key => $meta_value) {
|
64 |
-
$formatted_usermeta .= formatUserMeta($meta_value, $level . '[' . $meta_key . ']');
|
65 |
-
}
|
66 |
-
} else {
|
67 |
-
$formatted_usermeta .= "\n" . $level . ' = ' . $user_meta;
|
68 |
-
}
|
69 |
-
|
70 |
-
return $formatted_usermeta;
|
71 |
-
}
|
1 |
+
<?php
|
2 |
+
/** @var $user WP_User */
|
3 |
+
?>
|
4 |
+
|
5 |
+
<?php foreach (NextendSocialLogin::$enabledProviders AS $provider): ?>
|
6 |
+
<?php
|
7 |
+
$settings = $provider->settings;
|
8 |
+
if (!$provider->isUserConnected($user->ID)) continue;
|
9 |
+
$hasData = false;
|
10 |
+
ob_start();
|
11 |
+
?>
|
12 |
+
|
13 |
+
<h2><?php echo $provider->getLabel(); ?></h2>
|
14 |
+
|
15 |
+
<table class="form-table">
|
16 |
+
<tbody>
|
17 |
+
<?php foreach ($provider->getSyncFields() AS $fieldName => $fieldData): ?>
|
18 |
+
<tr>
|
19 |
+
<?php
|
20 |
+
$meta_key = $settings->get('sync_fields/fields/' . $fieldName . '/meta_key');
|
21 |
+
$value = get_user_meta($user->ID, $meta_key, true);
|
22 |
+
if (isset($value) && $value !== '') {
|
23 |
+
?>
|
24 |
+
<th><label><?php echo $fieldData['label'] ?></label></th>
|
25 |
+
<td>
|
26 |
+
<?php
|
27 |
+
|
28 |
+
$unSerialized = maybe_unserialize($value);
|
29 |
+
if (is_array($unSerialized) || is_object($unSerialized)) {
|
30 |
+
|
31 |
+
echo "<pre>";
|
32 |
+
print_r(formatUserMeta((array)$unSerialized));
|
33 |
+
|
34 |
+
echo "</pre>";
|
35 |
+
} else {
|
36 |
+
echo esc_html($value);
|
37 |
+
}
|
38 |
+
$hasData = true;
|
39 |
+
?>
|
40 |
+
</td>
|
41 |
+
<?php
|
42 |
+
}
|
43 |
+
?>
|
44 |
+
</tr>
|
45 |
+
<?php endforeach; ?>
|
46 |
+
|
47 |
+
</tbody>
|
48 |
+
</table>
|
49 |
+
<?php
|
50 |
+
if ($hasData) {
|
51 |
+
echo ob_get_clean();
|
52 |
+
} else {
|
53 |
+
ob_end_clean();
|
54 |
+
}
|
55 |
+
?>
|
56 |
+
<?php endforeach; ?>
|
57 |
+
|
58 |
+
<?php
|
59 |
+
|
60 |
+
function formatUserMeta($user_meta, $level = '') {
|
61 |
+
$formatted_usermeta = '';
|
62 |
+
if (is_array($user_meta)) {
|
63 |
+
foreach ($user_meta as $meta_key => $meta_value) {
|
64 |
+
$formatted_usermeta .= formatUserMeta($meta_value, $level . '[' . $meta_key . ']');
|
65 |
+
}
|
66 |
+
} else {
|
67 |
+
$formatted_usermeta .= "\n" . $level . ' = ' . $user_meta;
|
68 |
+
}
|
69 |
+
|
70 |
+
return $formatted_usermeta;
|
71 |
+
}
|
admin/admin.php
CHANGED
@@ -1,747 +1,755 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
case '
|
66 |
-
self::display_admin_area('
|
67 |
-
break;
|
68 |
-
case '
|
69 |
-
self::display_admin_area('
|
70 |
-
break;
|
71 |
-
case '
|
72 |
-
self::display_admin_area('
|
73 |
-
break;
|
74 |
-
case '
|
75 |
-
self::display_admin_area('
|
76 |
-
break;
|
77 |
-
case '
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
break;
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
include(dirname(__FILE__) . '/templates/' . $view . '.php');
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
if ($_GET['
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
if ($_GET['
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
add_action('
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
'
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
case '
|
336 |
-
case '
|
337 |
-
case '
|
338 |
-
case '
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
case '
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
case '
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
break;
|
363 |
-
case '
|
364 |
-
if (is_array($value)) {
|
365 |
-
$newData[$key] = $value;
|
366 |
-
}
|
367 |
-
break;
|
368 |
-
case '
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
$newData[$key] =
|
408 |
-
}
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
$
|
488 |
-
|
489 |
-
'
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
if (
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
echo '<div class="notice notice-info">
|
588 |
-
<p>' . sprintf(__('%1$s detected that %2$s installed on your site. You
|
589 |
-
<p><a href="' . NextendSocialLoginAdmin::
|
590 |
-
</div>';
|
591 |
-
}
|
592 |
-
|
593 |
-
public static function
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
$
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
<
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
747 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use NSL\Notices;
|
4 |
+
|
5 |
+
define('NSL_ADMIN_PATH', __FILE__);
|
6 |
+
|
7 |
+
require_once dirname(__FILE__) . '/upgrader.php';
|
8 |
+
NextendSocialUpgrader::init();
|
9 |
+
|
10 |
+
class NextendSocialLoginAdmin {
|
11 |
+
|
12 |
+
public static function init() {
|
13 |
+
add_action('admin_menu', 'NextendSocialLoginAdmin::admin_menu', 1);
|
14 |
+
add_action('admin_init', 'NextendSocialLoginAdmin::admin_init');
|
15 |
+
|
16 |
+
add_filter('plugin_action_links', 'NextendSocialLoginAdmin::plugin_action_links', 10, 2);
|
17 |
+
|
18 |
+
add_filter('nsl_update_settings_validate_nextend_social_login', 'NextendSocialLoginAdmin::validateSettings', 10, 2);
|
19 |
+
|
20 |
+
add_action('wp_ajax_nsl_save_review_state', 'NextendSocialLoginAdmin::save_review_state');
|
21 |
+
}
|
22 |
+
|
23 |
+
public static function getAdminUrl($view = 'providers') {
|
24 |
+
|
25 |
+
return add_query_arg(array(
|
26 |
+
'page' => 'nextend-social-login',
|
27 |
+
'view' => $view
|
28 |
+
), admin_url('options-general.php'));
|
29 |
+
}
|
30 |
+
|
31 |
+
public static function getAdminSettingsUrl($subview = 'general') {
|
32 |
+
|
33 |
+
return add_query_arg(array(
|
34 |
+
'page' => 'nextend-social-login',
|
35 |
+
'view' => 'global-settings',
|
36 |
+
'subview' => $subview
|
37 |
+
), admin_url('options-general.php'));
|
38 |
+
}
|
39 |
+
|
40 |
+
public static function admin_menu() {
|
41 |
+
$menu = add_options_page('Nextend Social Login', 'Nextend Social Login', 'manage_options', 'nextend-social-login', array(
|
42 |
+
'NextendSocialLoginAdmin',
|
43 |
+
'display_admin'
|
44 |
+
));
|
45 |
+
|
46 |
+
add_action('admin_print_styles-' . $menu, 'NextendSocialLoginAdmin::admin_css');
|
47 |
+
}
|
48 |
+
|
49 |
+
public static function admin_css() {
|
50 |
+
wp_enqueue_style('nsl-admin-stylesheet', plugins_url('/style.css?nsl-ver=' . urlencode(NextendSocialLogin::$version), NSL_ADMIN_PATH));
|
51 |
+
}
|
52 |
+
|
53 |
+
public static function display_admin() {
|
54 |
+
$view = !empty($_REQUEST['view']) ? $_REQUEST['view'] : '';
|
55 |
+
|
56 |
+
if (substr($view, 0, 9) == 'provider-') {
|
57 |
+
$providerID = substr($view, 9);
|
58 |
+
if (isset(NextendSocialLogin::$providers[$providerID])) {
|
59 |
+
self::display_admin_area('provider', $providerID);
|
60 |
+
|
61 |
+
return;
|
62 |
+
}
|
63 |
+
}
|
64 |
+
switch ($view) {
|
65 |
+
case 'fix-redirect-uri':
|
66 |
+
self::display_admin_area('fix-redirect-uri');
|
67 |
+
break;
|
68 |
+
case 'debug':
|
69 |
+
self::display_admin_area('debug');
|
70 |
+
break;
|
71 |
+
case 'test-connection':
|
72 |
+
self::display_admin_area('test-connection');
|
73 |
+
break;
|
74 |
+
case 'global-settings':
|
75 |
+
self::display_admin_area('global-settings');
|
76 |
+
break;
|
77 |
+
case 'pro-addon':
|
78 |
+
self::display_admin_area('pro-addon');
|
79 |
+
break;
|
80 |
+
case 'install-pro':
|
81 |
+
if (check_admin_referer('nextend-social-login')) {
|
82 |
+
self::display_admin_area('install-pro');
|
83 |
+
} else {
|
84 |
+
self::display_admin_area('providers');
|
85 |
+
}
|
86 |
+
break;
|
87 |
+
default:
|
88 |
+
self::display_admin_area('providers');
|
89 |
+
break;
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* @param string $view
|
95 |
+
* @param string $currentProvider
|
96 |
+
*/
|
97 |
+
private static function display_admin_area($view, $currentProvider = '') {
|
98 |
+
if (empty($currentProvider)) {
|
99 |
+
include(dirname(__FILE__) . '/templates/header.php');
|
100 |
+
include(dirname(__FILE__) . '/templates/menu.php');
|
101 |
+
|
102 |
+
Notices::displayNotices();
|
103 |
+
|
104 |
+
/** @var string $view */
|
105 |
+
include(dirname(__FILE__) . '/templates/' . $view . '.php');
|
106 |
+
include(dirname(__FILE__) . '/templates/footer.php');
|
107 |
+
} else {
|
108 |
+
include(dirname(__FILE__) . '/templates/' . $view . '.php');
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
public static function renderProSettings() {
|
113 |
+
include(dirname(__FILE__) . '/templates/global-settings-pro.php');
|
114 |
+
}
|
115 |
+
|
116 |
+
public static function admin_init() {
|
117 |
+
if (current_user_can('manage_options')) {
|
118 |
+
if (!isset($_GET['page']) || $_GET['page'] != 'nextend-social-login' || !isset($_GET['view']) || $_GET['view'] != 'fix-redirect-uri') {
|
119 |
+
add_action('admin_notices', 'NextendSocialLoginAdmin::show_oauth_uri_notice');
|
120 |
+
}
|
121 |
+
|
122 |
+
if (!self::isPro() && NextendSocialLogin::$settings->get('woocommerce_dismissed') == 0 && class_exists('woocommerce', false) && count(NextendSocialLogin::$enabledProviders)) {
|
123 |
+
add_action('admin_notices', 'NextendSocialLoginAdmin::show_woocommerce_notice');
|
124 |
+
}
|
125 |
+
|
126 |
+
|
127 |
+
if (defined('THEME_MY_LOGIN_VERSION') && version_compare(THEME_MY_LOGIN_VERSION, '7.0.0', '>=')) {
|
128 |
+
if (!NextendSocialLogin::getRegisterFlowPage() || !NextendSocialLogin::getProxyPage()) {
|
129 |
+
add_action('admin_notices', 'NextendSocialLoginAdmin::show_theme_my_login_notice');
|
130 |
+
}
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
if (isset($_GET['page']) && $_GET['page'] == 'nextend-social-login') {
|
135 |
+
if (!empty($_GET['view'])) {
|
136 |
+
switch ($_GET['view']) {
|
137 |
+
case 'enable':
|
138 |
+
case 'sub-enable':
|
139 |
+
if (!empty($_GET['provider'])) {
|
140 |
+
if (check_admin_referer('nextend-social-login_enable_' . $_GET['provider'])) {
|
141 |
+
NextendSocialLogin::enableProvider($_GET['provider']);
|
142 |
+
}
|
143 |
+
if ($_GET['view'] == 'sub-enable') {
|
144 |
+
wp_redirect(NextendSocialLogin::$providers[$_GET['provider']]->getAdmin()
|
145 |
+
->getUrl('settings'));
|
146 |
+
exit;
|
147 |
+
}
|
148 |
+
|
149 |
+
wp_redirect(self::getAdminUrl());
|
150 |
+
exit;
|
151 |
+
}
|
152 |
+
break;
|
153 |
+
case 'disable':
|
154 |
+
case 'sub-disable':
|
155 |
+
if (!empty($_GET['provider'])) {
|
156 |
+
if (check_admin_referer('nextend-social-login_disable_' . $_GET['provider'])) {
|
157 |
+
NextendSocialLogin::disableProvider($_GET['provider']);
|
158 |
+
}
|
159 |
+
if ($_GET['view'] == 'sub-disable') {
|
160 |
+
wp_redirect(NextendSocialLogin::$providers[$_GET['provider']]->getAdmin()
|
161 |
+
->getUrl('settings'));
|
162 |
+
exit;
|
163 |
+
}
|
164 |
+
|
165 |
+
wp_redirect(self::getAdminUrl());
|
166 |
+
exit;
|
167 |
+
}
|
168 |
+
break;
|
169 |
+
case 'update_oauth_redirect_url':
|
170 |
+
if (check_admin_referer('nextend-social-login_update_oauth_redirect_url')) {
|
171 |
+
foreach (NextendSocialLogin::$enabledProviders AS $provider) {
|
172 |
+
$provider->updateOauthRedirectUrl();
|
173 |
+
}
|
174 |
+
}
|
175 |
+
|
176 |
+
wp_redirect(self::getAdminUrl());
|
177 |
+
exit;
|
178 |
+
|
179 |
+
case 'dismiss_woocommerce':
|
180 |
+
if (check_admin_referer('nsl_dismiss_woocommerce')) {
|
181 |
+
NextendSocialLogin::$settings->update(array(
|
182 |
+
'woocommerce_dismissed' => 1
|
183 |
+
));
|
184 |
+
|
185 |
+
if (!empty($_REQUEST['redirect_to'])) {
|
186 |
+
wp_safe_redirect($_REQUEST['redirect_to']);
|
187 |
+
exit;
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
wp_redirect(self::getAdminUrl());
|
192 |
+
break;
|
193 |
+
}
|
194 |
+
}
|
195 |
+
}
|
196 |
+
add_action('admin_post_nextend-social-login', 'NextendSocialLoginAdmin::save_form_data');
|
197 |
+
add_action('wp_ajax_nextend-social-login', 'NextendSocialLoginAdmin::ajax_save_form_data');
|
198 |
+
|
199 |
+
|
200 |
+
add_action('admin_enqueue_scripts', 'NextendSocialLoginAdmin::admin_enqueue_scripts');
|
201 |
+
|
202 |
+
if (!function_exists('json_decode')) {
|
203 |
+
add_settings_error('nextend-social', 'settings_updated', printf(__('%s needs json_decode function.', 'nextend-facebook-connect'), 'Nextend Social Login') . ' ' . __('Please contact your server administrator and ask for solution!', 'nextend-facebook-connect'), 'error');
|
204 |
+
}
|
205 |
+
|
206 |
+
add_action('show_user_profile', array(
|
207 |
+
'NextendSocialLoginAdmin',
|
208 |
+
'showUserFields'
|
209 |
+
));
|
210 |
+
add_action('edit_user_profile', array(
|
211 |
+
'NextendSocialLoginAdmin',
|
212 |
+
'showUserFields'
|
213 |
+
));
|
214 |
+
|
215 |
+
add_filter('display_post_states', array(
|
216 |
+
'NextendSocialLoginAdmin',
|
217 |
+
'display_post_states'
|
218 |
+
), 10, 2);
|
219 |
+
}
|
220 |
+
|
221 |
+
public static function save_form_data() {
|
222 |
+
if (current_user_can('manage_options') && check_admin_referer('nextend-social-login')) {
|
223 |
+
foreach ($_POST AS $k => $v) {
|
224 |
+
if (is_string($v)) {
|
225 |
+
$_POST[$k] = stripslashes($v);
|
226 |
+
}
|
227 |
+
}
|
228 |
+
|
229 |
+
$view = !empty($_REQUEST['view']) ? $_REQUEST['view'] : '';
|
230 |
+
|
231 |
+
if ($view == 'global-settings') {
|
232 |
+
|
233 |
+
NextendSocialLogin::$settings->update($_POST);
|
234 |
+
|
235 |
+
Notices::addSuccess(__('Settings saved.'));
|
236 |
+
|
237 |
+
wp_redirect(self::getAdminSettingsUrl(!empty($_REQUEST['subview']) ? $_REQUEST['subview'] : ''));
|
238 |
+
exit;
|
239 |
+
} else if ($view == 'pro-addon') {
|
240 |
+
|
241 |
+
NextendSocialLogin::$settings->update($_POST);
|
242 |
+
|
243 |
+
if (NextendSocialLogin::hasLicense()) {
|
244 |
+
Notices::addSuccess(__('The activation was successful', 'nextend-facebook-connect'));
|
245 |
+
}
|
246 |
+
|
247 |
+
wp_redirect(self::getAdminUrl($view));
|
248 |
+
exit;
|
249 |
+
} else if ($view == 'pro-addon-deauthorize') {
|
250 |
+
|
251 |
+
NextendSocialLogin::$settings->update(array(
|
252 |
+
'license_key' => ''
|
253 |
+
));
|
254 |
+
|
255 |
+
Notices::addSuccess(__('Deactivate completed.', 'nextend-facebook-connect'));
|
256 |
+
|
257 |
+
wp_redirect(self::getAdminUrl('pro-addon'));
|
258 |
+
exit;
|
259 |
+
|
260 |
+
} else if (substr($view, 0, 9) == 'provider-') {
|
261 |
+
$providerID = substr($view, 9);
|
262 |
+
if (isset(NextendSocialLogin::$providers[$providerID])) {
|
263 |
+
|
264 |
+
if (NextendSocialLogin::$providers[$providerID]->settings->update($_POST)) {
|
265 |
+
Notices::addSuccess(__('Settings saved.'));
|
266 |
+
}
|
267 |
+
|
268 |
+
wp_redirect(NextendSocialLogin::$providers[$providerID]->getAdmin()
|
269 |
+
->getUrl(isset($_POST['subview']) ? $_POST['subview'] : ''));
|
270 |
+
exit;
|
271 |
+
}
|
272 |
+
}
|
273 |
+
}
|
274 |
+
|
275 |
+
wp_redirect(self::getAdminUrl());
|
276 |
+
exit;
|
277 |
+
}
|
278 |
+
|
279 |
+
public static function ajax_save_form_data() {
|
280 |
+
check_ajax_referer('nextend-social-login');
|
281 |
+
if (current_user_can('manage_options')) {
|
282 |
+
$view = !empty($_POST['view']) ? $_POST['view'] : '';
|
283 |
+
switch ($view) {
|
284 |
+
case 'orderProviders':
|
285 |
+
if (!empty($_POST['ordering'])) {
|
286 |
+
NextendSocialLogin::$settings->update(array(
|
287 |
+
'ordering' => $_POST['ordering']
|
288 |
+
));
|
289 |
+
}
|
290 |
+
break;
|
291 |
+
case 'newsletterSubscribe':
|
292 |
+
$user_info = wp_get_current_user();
|
293 |
+
update_user_meta($user_info->ID, 'nsl_newsletter_subscription', 1);
|
294 |
+
break;
|
295 |
+
}
|
296 |
+
}
|
297 |
+
}
|
298 |
+
|
299 |
+
public static function validateSettings($newData, $postedData) {
|
300 |
+
|
301 |
+
if (isset($postedData['redirect'])) {
|
302 |
+
if (isset($postedData['custom_redirect_enabled']) && $postedData['custom_redirect_enabled'] == '1') {
|
303 |
+
$newData['redirect'] = trim(sanitize_text_field($postedData['redirect']));
|
304 |
+
} else {
|
305 |
+
$newData['redirect'] = '';
|
306 |
+
}
|
307 |
+
}
|
308 |
+
|
309 |
+
if (isset($postedData['redirect_reg'])) {
|
310 |
+
if (isset($postedData['custom_redirect_reg_enabled']) && $postedData['custom_redirect_reg_enabled'] == '1') {
|
311 |
+
$newData['redirect_reg'] = trim(sanitize_text_field($postedData['redirect_reg']));
|
312 |
+
} else {
|
313 |
+
$newData['redirect_reg'] = '';
|
314 |
+
}
|
315 |
+
}
|
316 |
+
|
317 |
+
if (isset($postedData['default_redirect'])) {
|
318 |
+
if (isset($postedData['default_redirect_enabled']) && $postedData['default_redirect_enabled'] == '1') {
|
319 |
+
$newData['default_redirect'] = trim(sanitize_text_field($postedData['default_redirect']));
|
320 |
+
} else {
|
321 |
+
$newData['default_redirect'] = '';
|
322 |
+
}
|
323 |
+
}
|
324 |
+
|
325 |
+
if (isset($postedData['default_redirect_reg'])) {
|
326 |
+
if (isset($postedData['default_redirect_reg_enabled']) && $postedData['default_redirect_reg_enabled'] == '1') {
|
327 |
+
$newData['default_redirect_reg'] = trim(sanitize_text_field($postedData['default_redirect_reg']));
|
328 |
+
} else {
|
329 |
+
$newData['default_redirect_reg'] = '';
|
330 |
+
}
|
331 |
+
}
|
332 |
+
|
333 |
+
foreach ($postedData as $key => $value) {
|
334 |
+
switch ($key) {
|
335 |
+
case 'debug':
|
336 |
+
case 'login_restriction':
|
337 |
+
case 'avatars_in_all_media':
|
338 |
+
case 'terms_show':
|
339 |
+
case 'store_name':
|
340 |
+
case 'store_email':
|
341 |
+
case 'avatar_store':
|
342 |
+
case 'store_access_token':
|
343 |
+
case 'redirect_prevent_external':
|
344 |
+
if ($value == 1) {
|
345 |
+
$newData[$key] = 1;
|
346 |
+
} else {
|
347 |
+
$newData[$key] = 0;
|
348 |
+
}
|
349 |
+
break;
|
350 |
+
case 'terms':
|
351 |
+
$newData[$key] = wp_kses_post($value);
|
352 |
+
break;
|
353 |
+
case 'blacklisted_urls':
|
354 |
+
$newData[$key] = sanitize_textarea_field($postedData[$key]);
|
355 |
+
break;
|
356 |
+
case 'show_login_form':
|
357 |
+
case 'login_form_button_align':
|
358 |
+
case 'show_registration_form':
|
359 |
+
case 'show_embedded_login_form':
|
360 |
+
case 'embedded_login_form_button_align':
|
361 |
+
$newData[$key] = sanitize_text_field($value);
|
362 |
+
break;
|
363 |
+
case 'enabled':
|
364 |
+
if (is_array($value)) {
|
365 |
+
$newData[$key] = $value;
|
366 |
+
}
|
367 |
+
break;
|
368 |
+
case 'ordering':
|
369 |
+
if (is_array($value)) {
|
370 |
+
$newData[$key] = $value;
|
371 |
+
}
|
372 |
+
break;
|
373 |
+
case 'license_key':
|
374 |
+
Notices::clear();
|
375 |
+
|
376 |
+
$value = trim(sanitize_text_field($value));
|
377 |
+
|
378 |
+
if (!empty($value)) {
|
379 |
+
try {
|
380 |
+
$response = self::apiCall('test-license', array('license_key' => $value));
|
381 |
+
if ($response === 'OK') {
|
382 |
+
$newData['licenses'] = array(
|
383 |
+
array(
|
384 |
+
'license_key' => $value,
|
385 |
+
'domain' => NextendSocialLogin::getDomain()
|
386 |
+
)
|
387 |
+
);
|
388 |
+
wp_clean_plugins_cache();
|
389 |
+
}
|
390 |
+
} catch (Exception $e) {
|
391 |
+
Notices::addError($e->getMessage());
|
392 |
+
}
|
393 |
+
} else {
|
394 |
+
wp_clean_plugins_cache();
|
395 |
+
$newData['licenses'] = array();
|
396 |
+
}
|
397 |
+
break;
|
398 |
+
case 'review_state':
|
399 |
+
case 'woocommerce_dismissed':
|
400 |
+
$newData[$key] = intval($value);
|
401 |
+
break;
|
402 |
+
case 'register-flow-page':
|
403 |
+
case 'proxy-page':
|
404 |
+
if (get_post($value) !== null) {
|
405 |
+
$newData[$key] = $value;
|
406 |
+
} else {
|
407 |
+
$newData[$key] = '';
|
408 |
+
}
|
409 |
+
break;
|
410 |
+
|
411 |
+
case 'allow_register':
|
412 |
+
if ($value == '0') {
|
413 |
+
$newData[$key] = 0;
|
414 |
+
} else if ($value == '1') {
|
415 |
+
$newData[$key] = 1;
|
416 |
+
} else {
|
417 |
+
$newData[$key] = -1;
|
418 |
+
}
|
419 |
+
break;
|
420 |
+
|
421 |
+
|
422 |
+
}
|
423 |
+
}
|
424 |
+
|
425 |
+
return $newData;
|
426 |
+
}
|
427 |
+
|
428 |
+
public static function plugin_action_links($links, $file) {
|
429 |
+
|
430 |
+
if ($file != NSL_PLUGIN_BASENAME) {
|
431 |
+
return $links;
|
432 |
+
}
|
433 |
+
$settings_link = '<a href="' . esc_url(menu_page_url('nextend-social-login', false)) . '">' . __('Settings') . '</a>';
|
434 |
+
$reactivate_link = sprintf('<a href="%s">%s</a>', wp_nonce_url(admin_url('admin.php?page=nextend-social-login&repairnsl=1'), 'repairnsl'), 'Reactivate');
|
435 |
+
array_unshift($links, $settings_link, $reactivate_link);
|
436 |
+
|
437 |
+
return $links;
|
438 |
+
}
|
439 |
+
|
440 |
+
public static function admin_enqueue_scripts() {
|
441 |
+
if ('settings_page_nextend-social-login' === get_current_screen()->id) {
|
442 |
+
|
443 |
+
// Since WordPress 4.9
|
444 |
+
if (function_exists('wp_enqueue_code_editor')) {
|
445 |
+
// Enqueue code editor and settings for manipulating HTML.
|
446 |
+
$settings = wp_enqueue_code_editor(array('type' => 'text/html'));
|
447 |
+
|
448 |
+
// Bail if user disabled CodeMirror.
|
449 |
+
if (false === $settings) {
|
450 |
+
return;
|
451 |
+
}
|
452 |
+
|
453 |
+
wp_add_inline_script('code-editor', sprintf('jQuery( function() { var settings = %s; jQuery(".nextend-html-editor").each(function(i, el){wp.codeEditor.initialize( el, settings);}); } );', wp_json_encode($settings)));
|
454 |
+
|
455 |
+
$settings['codemirror']['readOnly'] = 'nocursor';
|
456 |
+
|
457 |
+
wp_add_inline_script('code-editor', sprintf('jQuery( function() { var settings = %s; jQuery(".nextend-html-editor-readonly").each(function(i, el){wp.codeEditor.initialize( el, settings);}); } );', wp_json_encode($settings)));
|
458 |
+
}
|
459 |
+
|
460 |
+
if (isset($_GET['view']) && $_GET['view'] == 'pro-addon') {
|
461 |
+
wp_enqueue_script('plugin-install');
|
462 |
+
wp_enqueue_script('updates');
|
463 |
+
}
|
464 |
+
}
|
465 |
+
}
|
466 |
+
|
467 |
+
private static $endpoint = 'https://api.nextendweb.com/v2/nextend-api/v2/';
|
468 |
+
|
469 |
+
public static function getEndpoint($action = '') {
|
470 |
+
return self::$endpoint . 'product/nsl/' . urlencode($action);
|
471 |
+
}
|
472 |
+
|
473 |
+
/**
|
474 |
+
* @param $action
|
475 |
+
* @param array $args
|
476 |
+
*
|
477 |
+
* @return bool|mixed
|
478 |
+
* @throws Exception
|
479 |
+
*/
|
480 |
+
public static function apiCall($action, $args = array()) {
|
481 |
+
|
482 |
+
$body = array(
|
483 |
+
'platform' => 'wordpress',
|
484 |
+
'domain' => NextendSocialLogin::getDomain()
|
485 |
+
);
|
486 |
+
|
487 |
+
$activation_data = NextendSocialLogin::getLicense();
|
488 |
+
if ($activation_data !== false) {
|
489 |
+
$body['license_key'] = $activation_data['license_key'];
|
490 |
+
} else {
|
491 |
+
$body['license_key'] = '';
|
492 |
+
}
|
493 |
+
|
494 |
+
$http_args = array(
|
495 |
+
'timeout' => 15,
|
496 |
+
'user-agent' => 'WordPress',
|
497 |
+
'body' => array_merge($body, $args)
|
498 |
+
);
|
499 |
+
|
500 |
+
$request = wp_remote_get(self::getEndpoint($action), $http_args);
|
501 |
+
|
502 |
+
if (is_wp_error($request)) {
|
503 |
+
|
504 |
+
throw new Exception($request->get_error_message());
|
505 |
+
} else if (wp_remote_retrieve_response_code($request) !== 200) {
|
506 |
+
|
507 |
+
$response = json_decode(wp_remote_retrieve_body($request), true);
|
508 |
+
if (isset($response['message'])) {
|
509 |
+
$message = 'Nextend Social Login Pro Addon: ' . $response['message'];
|
510 |
+
|
511 |
+
Notices::addError($message);
|
512 |
+
|
513 |
+
return new WP_Error('error', $message);
|
514 |
+
}
|
515 |
+
|
516 |
+
throw new Exception(sprintf(__('Unexpected response: %s', 'nextend-facebook-connect'), wp_remote_retrieve_body($request)));
|
517 |
+
}
|
518 |
+
|
519 |
+
$response = json_decode(wp_remote_retrieve_body($request), true);
|
520 |
+
|
521 |
+
return $response;
|
522 |
+
}
|
523 |
+
|
524 |
+
public static function showProBox() {
|
525 |
+
if (!self::isPro()) {
|
526 |
+
include(dirname(__FILE__) . '/templates/pro.php');
|
527 |
+
}
|
528 |
+
}
|
529 |
+
|
530 |
+
public static function getProState() {
|
531 |
+
|
532 |
+
if (NextendSocialLogin::hasLicense()) {
|
533 |
+
if (self::isPro()) {
|
534 |
+
return 'activated';
|
535 |
+
} else if (!current_user_can('install_plugins')) {
|
536 |
+
return 'no-capability';
|
537 |
+
} else if (class_exists('NextendSocialLoginPRO', false) && version_compare(NextendSocialLoginPRO::$version, NextendSocialLogin::$nslPROMinVersion, '<')) {
|
538 |
+
return 'not-compatible';
|
539 |
+
} else {
|
540 |
+
if (file_exists(WP_PLUGIN_DIR . '/nextend-social-login-pro/nextend-social-login-pro.php')) {
|
541 |
+
return 'installed';
|
542 |
+
} else {
|
543 |
+
return 'not-installed';
|
544 |
+
}
|
545 |
+
}
|
546 |
+
}
|
547 |
+
|
548 |
+
return 'no-license';
|
549 |
+
}
|
550 |
+
|
551 |
+
public static function trackUrl($url, $source) {
|
552 |
+
return add_query_arg(array(
|
553 |
+
'utm_campaign' => 'nsl',
|
554 |
+
'utm_source' => urlencode($source),
|
555 |
+
'utm_medium' => 'nsl-wordpress-' . (apply_filters('nsl-pro', false) ? 'pro' : 'free')
|
556 |
+
), $url);
|
557 |
+
}
|
558 |
+
|
559 |
+
public static function save_review_state() {
|
560 |
+
check_ajax_referer('nsl_save_review_state');
|
561 |
+
if (isset($_POST['review_state'])) {
|
562 |
+
$review_state = intval($_POST['review_state']);
|
563 |
+
if ($review_state > 0) {
|
564 |
+
|
565 |
+
NextendSocialLogin::$settings->update(array(
|
566 |
+
'review_state' => $review_state
|
567 |
+
));
|
568 |
+
}
|
569 |
+
}
|
570 |
+
wp_die();
|
571 |
+
}
|
572 |
+
|
573 |
+
public static function show_oauth_uri_notice() {
|
574 |
+
foreach (NextendSocialLogin::$enabledProviders AS $provider) {
|
575 |
+
if (!$provider->checkOauthRedirectUrl()) {
|
576 |
+
echo '<div class="error">
|
577 |
+
<p>' . sprintf(__('%s detected that your login url changed. You must update the Oauth redirect URIs in the related social applications.', 'nextend-facebook-connect'), '<b>Nextend Social Login</b>') . '</p>
|
578 |
+
<p class="submit"><a href="' . NextendSocialLoginAdmin::getAdminUrl('fix-redirect-uri') . '" class="button button-primary">' . __('Fix Error', 'nextend-facebook-connect') . ' - ' . __('Oauth Redirect URI', 'nextend-facebook-connect') . '</a></p>
|
579 |
+
</div>';
|
580 |
+
break;
|
581 |
+
}
|
582 |
+
}
|
583 |
+
}
|
584 |
+
|
585 |
+
public static function show_woocommerce_notice() {
|
586 |
+
$dismissUrl = wp_nonce_url(add_query_arg(array('redirect_to' => NextendSocialLogin::getCurrentPageURL()), NextendSocialLoginAdmin::getAdminUrl('dismiss_woocommerce')), 'nsl_dismiss_woocommerce');
|
587 |
+
echo '<div class="notice notice-info">
|
588 |
+
<p>' . sprintf(__('%1$s detected that %2$s installed on your site. You need the Pro Addon to display Social Login buttons in %2$s login form!', 'nextend-facebook-connect'), '<b>Nextend Social Login</b>', '<b>WooCommerce</b>') . '</p>
|
589 |
+
<p><a href="' . NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/social-login/', 'woocommerce-notice') . '" target="_blank" onclick="window.location.href=\'' . esc_url($dismissUrl) . '\';" class="button button-primary">' . __('Dismiss and check Pro Addon', 'nextend-facebook-connect') . '</a> <a href="' . esc_url($dismissUrl) . '" class="button button-secondary">' . __('Dismiss', 'nextend-facebook-connect') . '</a></p>
|
590 |
+
</div>';
|
591 |
+
}
|
592 |
+
|
593 |
+
public static function show_theme_my_login_notice() {
|
594 |
+
echo '<div class="notice notice-info">
|
595 |
+
<p>' . sprintf(__('%1$s detected that %2$s installed on your site. You must set "<b>Page for register flow</b>" and "<b>OAuth redirect uri proxy page</b>" in %1$s to work properly.', 'nextend-facebook-connect'), '<b>Nextend Social Login</b>', '<b>Theme My Login</b>') . '</p>
|
596 |
+
<p><a href="' . NextendSocialLoginAdmin::getAdminSettingsUrl('general') . '" class="button button-primary">' . __('Fix now', 'nextend-facebook-connect') . '</a></p>
|
597 |
+
</div>';
|
598 |
+
}
|
599 |
+
|
600 |
+
public static function isPro() {
|
601 |
+
return apply_filters('nsl-pro', false);
|
602 |
+
}
|
603 |
+
|
604 |
+
public static function showUserFields($user) {
|
605 |
+
include(dirname(__FILE__) . '/EditUser.php');
|
606 |
+
}
|
607 |
+
|
608 |
+
public static function authorizeBox($view = 'pro-addon') {
|
609 |
+
|
610 |
+
$args = array(
|
611 |
+
'product' => 'nsl',
|
612 |
+
'domain' => NextendSocialLogin::getDomain(),
|
613 |
+
'platform' => 'wordpress'
|
614 |
+
|
615 |
+
);
|
616 |
+
|
617 |
+
$authorizeUrl = NextendSocialLoginAdmin::trackUrl('https://secure.nextendweb.com/authorize/', 'authorize');
|
618 |
+
?>
|
619 |
+
<div class="nsl-box nsl-box-yellow nsl-box-padlock">
|
620 |
+
<h2 class="title"><?php _e('Activate your Pro Addon', 'nextend-facebook-connect'); ?></h2>
|
621 |
+
<p><?php _e('To be able to use the Pro features, you need to activate Nextend Social Connect Pro Addon. You can do this by clicking on the Activate button below then select the related purchase.', 'nextend-facebook-connect'); ?></p>
|
622 |
+
|
623 |
+
<p>
|
624 |
+
<a href="#"
|
625 |
+
onclick="NSLActivate()"
|
626 |
+
class="button button-primary"><?php _e('Activate', 'nextend-facebook-connect'); ?></a>
|
627 |
+
</p>
|
628 |
+
</div>
|
629 |
+
|
630 |
+
<script type="text/javascript">
|
631 |
+
(function ($) {
|
632 |
+
|
633 |
+
var args = <?php echo wp_json_encode($args); ?>;
|
634 |
+
window.addEventListener('message', function (e) {
|
635 |
+
if (e.origin === 'https://secure.nextendweb.com') {
|
636 |
+
if (typeof window.authorizeWindow === 'undefined') {
|
637 |
+
if (typeof e.source !== 'undefined') {
|
638 |
+
window.authorizeWindow = e.source;
|
639 |
+
} else {
|
640 |
+
return false;
|
641 |
+
}
|
642 |
+
}
|
643 |
+
|
644 |
+
try {
|
645 |
+
var envelope = JSON.parse(e.data);
|
646 |
+
|
647 |
+
if (envelope.action) {
|
648 |
+
switch (envelope.action) {
|
649 |
+
case 'ready':
|
650 |
+
window.authorizeWindow.postMessage(JSON.stringify({
|
651 |
+
'action': 'authorize',
|
652 |
+
'data': args
|
653 |
+
}), 'https://secure.nextendweb.com');
|
654 |
+
break;
|
655 |
+
case 'license':
|
656 |
+
$('#nsl_license_key').val(envelope.license_key);
|
657 |
+
$('#nsl_license_form').submit();
|
658 |
+
break;
|
659 |
+
}
|
660 |
+
|
661 |
+
}
|
662 |
+
} catch (ex) {
|
663 |
+
console.error(ex);
|
664 |
+
console.log(e);
|
665 |
+
}
|
666 |
+
}
|
667 |
+
});
|
668 |
+
})(jQuery);
|
669 |
+
|
670 |
+
function NSLActivate() {
|
671 |
+
var isIE = (function detectIE() {
|
672 |
+
var ua = window.navigator.userAgent;
|
673 |
+
|
674 |
+
var msie = ua.indexOf('MSIE ');
|
675 |
+
if (msie > 0) {
|
676 |
+
// IE 10 or older => return version number
|
677 |
+
return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
|
678 |
+
}
|
679 |
+
|
680 |
+
var trident = ua.indexOf('Trident/');
|
681 |
+
if (trident > 0) {
|
682 |
+
// IE 11 => return version number
|
683 |
+
var rv = ua.indexOf('rv:');
|
684 |
+
return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
|
685 |
+
}
|
686 |
+
|
687 |
+
var edge = ua.indexOf('Edge/');
|
688 |
+
if (edge > 0) {
|
689 |
+
// Edge (IE 12+) => return version number
|
690 |
+
return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);
|
691 |
+
}
|
692 |
+
|
693 |
+
// other browser
|
694 |
+
return false;
|
695 |
+
})();
|
696 |
+
|
697 |
+
if (isIE <= 11) {
|
698 |
+
/**
|
699 |
+
* Trick for cross origin popup postMessage in IE 11
|
700 |
+
* @see <https://stackoverflow.com/a/36630058/305604>
|
701 |
+
*/
|
702 |
+
|
703 |
+
window.authorizeWindow = NSLPopup('/', 'authorize-window', 800, 800);
|
704 |
+
window.authorizeWindow.location.href = 'about:blank';
|
705 |
+
window.authorizeWindow.location.href = '<?php echo $authorizeUrl; ?>';
|
706 |
+
} else {
|
707 |
+
window.authorizeWindow = NSLPopup('<?php echo $authorizeUrl; ?>', 'authorize-window', 800, 800);
|
708 |
+
}
|
709 |
+
return false;
|
710 |
+
}
|
711 |
+
</script>
|
712 |
+
|
713 |
+
<form id="nsl_license_form" method="post" action="<?php echo admin_url('admin-post.php'); ?>"
|
714 |
+
novalidate="novalidate" style="display:none;">
|
715 |
+
|
716 |
+
<?php wp_nonce_field('nextend-social-login'); ?>
|
717 |
+
<input type="hidden" name="action" value="nextend-social-login"/>
|
718 |
+
<input type="hidden" name="view" value="<?php echo $view; ?>"/>
|
719 |
+
|
720 |
+
<table class="form-table">
|
721 |
+
<tbody>
|
722 |
+
<tr>
|
723 |
+
<th scope="row"><label
|
724 |
+
for="nsl_license_key"><?php _e('License key', 'nextend-facebook-connect'); ?></label>
|
725 |
+
</th>
|
726 |
+
<?php
|
727 |
+
$license_key = '';
|
728 |
+
$authorizedData = NextendSocialLogin::getLicense();
|
729 |
+
if ($authorizedData !== false) {
|
730 |
+
$license_key = $authorizedData['license_key'];
|
731 |
+
}
|
732 |
+
?>
|
733 |
+
<td><input name="license_key" type="text" id="nsl_license_key"
|
734 |
+
value="<?php echo esc_attr($license_key); ?>"
|
735 |
+
class="regular-text">
|
736 |
+
</td>
|
737 |
+
</tr>
|
738 |
+
</tbody>
|
739 |
+
</table>
|
740 |
+
|
741 |
+
</form>
|
742 |
+
<?php
|
743 |
+
}
|
744 |
+
|
745 |
+
public static function display_post_states($post_states, $post) {
|
746 |
+
if (NextendSocialLogin::getProxyPage() === $post->ID) {
|
747 |
+
$post_states['nsl_proxy_page'] = __('OAuth proxy page') . ' — NSL';
|
748 |
+
}
|
749 |
+
if (NextendSocialLogin::getRegisterFlowPage() === $post->ID) {
|
750 |
+
$post_states['nsl_proxy_page'] = __('Register flow page') . ' — NSL';
|
751 |
+
}
|
752 |
+
|
753 |
+
return $post_states;
|
754 |
+
}
|
755 |
}
|
admin/interim.php
CHANGED
@@ -1,38 +1,38 @@
|
|
1 |
-
<?php
|
2 |
-
if (!defined('ABSPATH')) {
|
3 |
-
exit;
|
4 |
-
}
|
5 |
-
|
6 |
-
global $interim_login;
|
7 |
-
$customize_login = isset($_REQUEST['customize-login']);
|
8 |
-
if ($customize_login) {
|
9 |
-
wp_enqueue_script('customize-base');
|
10 |
-
}
|
11 |
-
|
12 |
-
$message = '<p class="message">' . __('You have logged in successfully.') . '</p>';
|
13 |
-
$interim_login = 'success';
|
14 |
-
?><!DOCTYPE html>
|
15 |
-
<!--[if IE 8]>
|
16 |
-
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8" <?php language_attributes(); ?>>
|
17 |
-
<![endif]-->
|
18 |
-
<!--[if !(IE 8) ]><!-->
|
19 |
-
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
|
20 |
-
<!--<![endif]-->
|
21 |
-
<head>
|
22 |
-
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>"/>
|
23 |
-
<title><?php __('You have logged in successfully.'); ?></title>
|
24 |
-
</head>
|
25 |
-
<body class="login interim-login interim-login-success">
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
</body>
|
37 |
-
</html>
|
38 |
<?php exit;
|
1 |
+
<?php
|
2 |
+
if (!defined('ABSPATH')) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
global $interim_login;
|
7 |
+
$customize_login = isset($_REQUEST['customize-login']);
|
8 |
+
if ($customize_login) {
|
9 |
+
wp_enqueue_script('customize-base');
|
10 |
+
}
|
11 |
+
|
12 |
+
$message = '<p class="message">' . __('You have logged in successfully.') . '</p>';
|
13 |
+
$interim_login = 'success';
|
14 |
+
?><!DOCTYPE html>
|
15 |
+
<!--[if IE 8]>
|
16 |
+
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8" <?php language_attributes(); ?>>
|
17 |
+
<![endif]-->
|
18 |
+
<!--[if !(IE 8) ]><!-->
|
19 |
+
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
|
20 |
+
<!--<![endif]-->
|
21 |
+
<head>
|
22 |
+
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>"/>
|
23 |
+
<title><?php __('You have logged in successfully.'); ?></title>
|
24 |
+
</head>
|
25 |
+
<body class="login interim-login interim-login-success">
|
26 |
+
<?php
|
27 |
+
echo $message;
|
28 |
+
/** This action is documented in wp-login.php */
|
29 |
+
do_action('login_footer'); ?>
|
30 |
+
<?php if ($customize_login) : ?>
|
31 |
+
<script type="text/javascript">setTimeout(function () {
|
32 |
+
new wp.customize.Messenger({url: '<?php echo wp_customize_url(); ?>', channel: 'login'}).send(
|
33 |
+
'login');
|
34 |
+
}, 1000);</script>
|
35 |
+
<?php endif; ?>
|
36 |
+
</body>
|
37 |
+
</html>
|
38 |
<?php exit;
|
admin/style.css
CHANGED
@@ -1,525 +1,525 @@
|
|
1 |
-
#screen-meta,
|
2 |
-
#screen-meta-links {
|
3 |
-
display: none !important;
|
4 |
-
}
|
5 |
-
|
6 |
-
.nsl-clear {
|
7 |
-
clear: both;
|
8 |
-
}
|
9 |
-
|
10 |
-
#wpcontent {
|
11 |
-
padding-left: 0;
|
12 |
-
padding-right: 0;
|
13 |
-
}
|
14 |
-
|
15 |
-
#nsl-admin {
|
16 |
-
margin: 0;
|
17 |
-
}
|
18 |
-
|
19 |
-
.error + #nsl-admin,
|
20 |
-
.notice + #nsl-admin,
|
21 |
-
.updated + #nsl-admin {
|
22 |
-
margin-top: 30px;
|
23 |
-
}
|
24 |
-
|
25 |
-
#nsl-admin,
|
26 |
-
#nsl-admin p,
|
27 |
-
#nsl-admin ul,
|
28 |
-
#nsl-admin li {
|
29 |
-
font-size: 13px;
|
30 |
-
}
|
31 |
-
|
32 |
-
#nsl-admin .nsl-admin-embed-youtube {
|
33 |
-
position: relative;
|
34 |
-
max-width: 1280px;
|
35 |
-
margin-top: 40px;
|
36 |
-
}
|
37 |
-
|
38 |
-
#nsl-admin .nsl-admin-embed-youtube div {
|
39 |
-
padding-bottom: 56.25%;
|
40 |
-
}
|
41 |
-
|
42 |
-
#nsl-admin .nsl-admin-embed-youtube iframe {
|
43 |
-
position: absolute;
|
44 |
-
left: 0;
|
45 |
-
top: 0;
|
46 |
-
width: 100%;
|
47 |
-
height: 100%;
|
48 |
-
}
|
49 |
-
|
50 |
-
#nsl-admin .form-table th em {
|
51 |
-
font-weight: normal;
|
52 |
-
}
|
53 |
-
|
54 |
-
#nsl-admin .nsl-admin-header {
|
55 |
-
background: #0073aa;
|
56 |
-
height: 106px;
|
57 |
-
display: flex;
|
58 |
-
align-items: center;
|
59 |
-
padding: 0 20px;
|
60 |
-
}
|
61 |
-
|
62 |
-
#nsl-admin .nsl-admin-header h1 {
|
63 |
-
margin: 0 auto 0 0;
|
64 |
-
padding: 0;
|
65 |
-
}
|
66 |
-
|
67 |
-
#nsl-admin .nsl-admin-header h1,
|
68 |
-
#nsl-admin .nsl-admin-header h1 a {
|
69 |
-
color: #ffffff;
|
70 |
-
font-size: 24px;
|
71 |
-
text-decoration: none;
|
72 |
-
}
|
73 |
-
|
74 |
-
#nsl-admin .nsl-admin-header h1 a {
|
75 |
-
line-height: 64px;
|
76 |
-
vertical-align: top;
|
77 |
-
}
|
78 |
-
|
79 |
-
#nsl-admin .nsl-admin-header a:focus {
|
80 |
-
box-shadow: none;
|
81 |
-
}
|
82 |
-
|
83 |
-
#nsl-admin .nsl-admin-header h1 a img {
|
84 |
-
margin: 0 10px;
|
85 |
-
vertical-align: middle;
|
86 |
-
}
|
87 |
-
|
88 |
-
#nsl-admin .nsl-admin-header a.nsl-admin-header-nav {
|
89 |
-
color: #ffffff;
|
90 |
-
font-size: 16px;
|
91 |
-
text-decoration: none;
|
92 |
-
padding: 20px;
|
93 |
-
}
|
94 |
-
|
95 |
-
#nsl-admin .nsl-admin-nav-bar {
|
96 |
-
display: flex;
|
97 |
-
background: #ffffff;
|
98 |
-
height: 55px;
|
99 |
-
border-bottom: 1px solid #dbdbdb;
|
100 |
-
padding: 0 10px;
|
101 |
-
}
|
102 |
-
|
103 |
-
#nsl-admin .nsl-admin-nav-bar .nsl-admin-nav-tab {
|
104 |
-
padding: 0 20px;
|
105 |
-
}
|
106 |
-
|
107 |
-
#nsl-admin .nsl-admin-nav-bar .nsl-admin-nav-tab {
|
108 |
-
line-height: 55px;
|
109 |
-
text-decoration: none;
|
110 |
-
color: #23282d;
|
111 |
-
}
|
112 |
-
|
113 |
-
#nsl-admin .nsl-admin-nav-bar .nsl-admin-nav-tab:focus {
|
114 |
-
box-shadow: none;
|
115 |
-
}
|
116 |
-
|
117 |
-
#nsl-admin .nsl-admin-nav-bar .nsl-admin-nav-tab.nsl-admin-nav-tab-active {
|
118 |
-
box-shadow: inset 0 -3px 0 0 #00a0d2;
|
119 |
-
color: #000;
|
120 |
-
font-weight: bold;
|
121 |
-
}
|
122 |
-
|
123 |
-
#nsl-admin .nsl-admin-sub-nav-bar {
|
124 |
-
display: flex;
|
125 |
-
height: 40px;
|
126 |
-
border-bottom: 1px solid #dddddd;
|
127 |
-
}
|
128 |
-
|
129 |
-
#nsl-admin .nsl-admin-sub-nav-bar .nsl-admin-nav-tab {
|
130 |
-
position: relative;
|
131 |
-
margin-right: 30px;
|
132 |
-
line-height: 40px;
|
133 |
-
text-decoration: none;
|
134 |
-
color: #23282d;
|
135 |
-
}
|
136 |
-
|
137 |
-
#nsl-admin .nsl-admin-sub-nav-bar .nsl-admin-nav-tab:focus {
|
138 |
-
box-shadow: none;
|
139 |
-
}
|
140 |
-
|
141 |
-
#nsl-admin .nsl-admin-sub-nav-bar .nsl-admin-nav-tab.nsl-admin-nav-tab-active {
|
142 |
-
box-shadow: inset 0 -3px 0 0 #00a0d2;
|
143 |
-
color: #000;
|
144 |
-
font-weight: bold;
|
145 |
-
}
|
146 |
-
|
147 |
-
#nsl-admin .nsl-admin-sub-nav-bar .nsl-admin-nav-tab .nsl-pro-badge {
|
148 |
-
display: block;
|
149 |
-
background: #0073aa;
|
150 |
-
border-radius: 3px;
|
151 |
-
color: #fff;
|
152 |
-
position: absolute;
|
153 |
-
right: -20px;
|
154 |
-
top: -2px;
|
155 |
-
padding: 0 5px;
|
156 |
-
line-height: 16px;
|
157 |
-
font-size: 10px;
|
158 |
-
font-weight: normal;
|
159 |
-
text-transform: uppercase;
|
160 |
-
}
|
161 |
-
|
162 |
-
.nsl-dashboard-providers {
|
163 |
-
position: relative;
|
164 |
-
padding: 15px;
|
165 |
-
}
|
166 |
-
|
167 |
-
.nsl-dashboard-providers .nsl-dashboard-newsletter {
|
168 |
-
position: relative;
|
169 |
-
float: left;
|
170 |
-
width: 340px;
|
171 |
-
height: 220px;
|
172 |
-
margin: 15px;
|
173 |
-
box-sizing: border-box;
|
174 |
-
border-radius: 5px;
|
175 |
-
padding: 15px;
|
176 |
-
display: flex;
|
177 |
-
flex-flow: column;
|
178 |
-
}
|
179 |
-
|
180 |
-
.nsl-dashboard-providers .nsl-dashboard-newsletter-content {
|
181 |
-
text-align: center;
|
182 |
-
display: flex;
|
183 |
-
flex-flow: column;
|
184 |
-
justify-content: center;
|
185 |
-
align-items: center;
|
186 |
-
height: 100%;
|
187 |
-
}
|
188 |
-
|
189 |
-
.nsl-dashboard-providers .nsl-dashboard-newsletter-content h2 {
|
190 |
-
color: #000000;
|
191 |
-
font-size: 18px;
|
192 |
-
line-height: 1.5;
|
193 |
-
margin: 0;
|
194 |
-
font-weight: 600;
|
195 |
-
}
|
196 |
-
|
197 |
-
.nsl-dashboard-providers .nsl-dashboard-newsletter-content input[type="text"] {
|
198 |
-
margin: 0 0 13px 0;
|
199 |
-
text-align: center;
|
200 |
-
}
|
201 |
-
|
202 |
-
.nsl-dashboard-providers .nsl-dashboard-provider {
|
203 |
-
position: relative;
|
204 |
-
float: left;
|
205 |
-
width: 340px;
|
206 |
-
height: 220px;
|
207 |
-
margin: 15px;
|
208 |
-
|
209 |
-
display: flex;
|
210 |
-
flex-flow: column;
|
211 |
-
}
|
212 |
-
|
213 |
-
.nsl-dashboard-providers .nsl-dashboard-provider-top {
|
214 |
-
height: 166px;
|
215 |
-
display: flex;
|
216 |
-
flex-flow: column;
|
217 |
-
justify-content: center;
|
218 |
-
align-items: center;
|
219 |
-
border-top-left-radius: 5px;
|
220 |
-
border-top-right-radius: 5px;
|
221 |
-
}
|
222 |
-
|
223 |
-
.nsl-dashboard-providers h2 {
|
224 |
-
color: #ffffff;
|
225 |
-
font-size: 22px;
|
226 |
-
margin: 20px 0 0 0;
|
227 |
-
font-weight: 600;
|
228 |
-
}
|
229 |
-
|
230 |
-
.nsl-dashboard-providers .nsl-dashboard-provider-bottom {
|
231 |
-
background: #ffffff;
|
232 |
-
flex: 1 1 auto;
|
233 |
-
display: flex;
|
234 |
-
align-items: center;
|
235 |
-
padding: 0 15px;
|
236 |
-
border: 1px solid #dbdbdb;
|
237 |
-
border-width: 0 1px 1px 1px;
|
238 |
-
border-bottom-left-radius: 5px;
|
239 |
-
border-bottom-right-radius: 5px;
|
240 |
-
}
|
241 |
-
|
242 |
-
.nsl-dashboard-provider-bottom-state {
|
243 |
-
margin-right: auto;
|
244 |
-
font-size: 14px;
|
245 |
-
color: #23282d;
|
246 |
-
}
|
247 |
-
|
248 |
-
[data-state="not-tested"] .nsl-dashboard-provider-bottom-state {
|
249 |
-
color: #0b97c6;
|
250 |
-
}
|
251 |
-
|
252 |
-
[data-state="disabled"] .nsl-dashboard-provider-bottom-state {
|
253 |
-
color: #c8463f;
|
254 |
-
}
|
255 |
-
|
256 |
-
[data-state="enabled"] .nsl-dashboard-provider-bottom-state {
|
257 |
-
color: #46b450;
|
258 |
-
}
|
259 |
-
|
260 |
-
.nsl-dashboard-providers .nsl-dashboard-provider-bottom a + a {
|
261 |
-
margin-left: 10px;
|
262 |
-
}
|
263 |
-
|
264 |
-
.nsl-dashboard-provider-sortable-handle {
|
265 |
-
position: absolute;
|
266 |
-
left: 0;
|
267 |
-
top: 0;
|
268 |
-
width: 27px;
|
269 |
-
height: 34px;
|
270 |
-
cursor: move;
|
271 |
-
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAiCAYAAACuoaIwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA+tpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxNSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE4LTAxLTE3VDE1OjE4OjM5KzAxOjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAxOC0wMS0xN1QxNjoxMTo0MSswMTowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAxOC0wMS0xN1QxNjoxMTo0MSswMTowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QjhCNkM3MkZGQjk4MTFFN0E4RDJBRUZBQTI4OUVBNzIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QjhCNkM3MzBGQjk4MTFFN0E4RDJBRUZBQTI4OUVBNzIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpCOEI2QzcyREZCOTgxMUU3QThEMkFFRkFBMjg5RUE3MiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpCOEI2QzcyRUZCOTgxMUU3QThEMkFFRkFBMjg5RUE3MiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Po8u91EAAABlSURBVHjaYvz//z8DvQATAx3BqGWjlg0ey1iIUKMDxHFQ9iIgvkKkHFk+AxnGD8VxJMhRHIyMZMoRbRkoeD4B8QcgXkiCHKZrRsvG0aQ/mvRHk/5o0h9N+qNJf9SyUcuoCAACDABr5TA7L7qpSQAAAABJRU5ErkJggg==');
|
272 |
-
}
|
273 |
-
|
274 |
-
.nsl-provider-notice {
|
275 |
-
position: absolute;
|
276 |
-
right: 10px;
|
277 |
-
top: 0;
|
278 |
-
color: #fff;
|
279 |
-
line-height: 32px;
|
280 |
-
font-size: 16px;
|
281 |
-
}
|
282 |
-
|
283 |
-
.nsl-admin-notices {
|
284 |
-
padding: 30px 30px 0;
|
285 |
-
}
|
286 |
-
|
287 |
-
.nsl-admin-content .nsl-admin-notices {
|
288 |
-
padding: 20px 0 0;
|
289 |
-
}
|
290 |
-
|
291 |
-
.nsl-admin-notices > div {
|
292 |
-
margin: 5px 0 2px;
|
293 |
-
}
|
294 |
-
|
295 |
-
.nsl-admin-content {
|
296 |
-
padding: 10px 30px;
|
297 |
-
}
|
298 |
-
|
299 |
-
.nsl-admin-sub-content {
|
300 |
-
padding: 20px 0;
|
301 |
-
}
|
302 |
-
|
303 |
-
.nsl-box {
|
304 |
-
max-width: 500px;
|
305 |
-
padding: 30px;
|
306 |
-
margin: 30px 0;
|
307 |
-
background: #ffffff no-repeat 20px 40px;
|
308 |
-
border-radius: 5px;
|
309 |
-
padding-left: 110px;
|
310 |
-
}
|
311 |
-
|
312 |
-
.nsl-box h2 {
|
313 |
-
margin: 10px 0 0 0;
|
314 |
-
}
|
315 |
-
|
316 |
-
.nsl-box p {
|
317 |
-
margin: 20px 0 0 0;
|
318 |
-
}
|
319 |
-
|
320 |
-
.nsl-box-yellow {
|
321 |
-
border: 3px solid #f9cb4f;
|
322 |
-
}
|
323 |
-
|
324 |
-
.nsl-box-yellow-bg {
|
325 |
-
background: #faf7ea no-repeat 20px 40px;
|
326 |
-
}
|
327 |
-
|
328 |
-
.nsl-box-blue {
|
329 |
-
border: 3px solid #00a0d2;
|
330 |
-
background-image: url('images/test-needed.png');
|
331 |
-
}
|
332 |
-
|
333 |
-
.nsl-box-green {
|
334 |
-
border: 3px solid #46b450;
|
335 |
-
background-image: url('images/ok.png');
|
336 |
-
}
|
337 |
-
|
338 |
-
.nsl-box-red {
|
339 |
-
border: 3px solid #c8463f;
|
340 |
-
}
|
341 |
-
|
342 |
-
.nsl-box-error {
|
343 |
-
background-image: url('images/error.png');
|
344 |
-
}
|
345 |
-
|
346 |
-
.nsl-box-padlock {
|
347 |
-
background-image: url('images/padlock.png');
|
348 |
-
}
|
349 |
-
|
350 |
-
.nsl-box-exclamation-mark {
|
351 |
-
background-image: url('images/exclamation-mark.png');
|
352 |
-
}
|
353 |
-
|
354 |
-
.nsl-box .button {
|
355 |
-
margin-right: 10px;
|
356 |
-
}
|
357 |
-
|
358 |
-
#nsl-test-configuration {
|
359 |
-
line-height: 28px;
|
360 |
-
}
|
361 |
-
|
362 |
-
#nsl-test-configuration > * {
|
363 |
-
margin-right: 10px;
|
364 |
-
}
|
365 |
-
|
366 |
-
#nsl-test-please-save {
|
367 |
-
display: none;
|
368 |
-
}
|
369 |
-
|
370 |
-
#nsl-admin .CodeMirror {
|
371 |
-
height: auto;
|
372 |
-
}
|
373 |
-
|
374 |
-
#nsl-admin .CodeMirror-scroll {
|
375 |
-
min-height: 100px;
|
376 |
-
}
|
377 |
-
|
378 |
-
#nsl-admin fieldset label {
|
379 |
-
vertical-align: top;
|
380 |
-
}
|
381 |
-
|
382 |
-
input[type="radio"] ~ img {
|
383 |
-
margin-top: 20px;
|
384 |
-
margin-right: 30px;
|
385 |
-
}
|
386 |
-
|
387 |
-
input[type="radio"]:checked ~ img {
|
388 |
-
box-shadow: 0 0 0 3px #00a0d2;
|
389 |
-
border-radius: 3px;
|
390 |
-
}
|
391 |
-
|
392 |
-
.nsl-box-review {
|
393 |
-
position: relative;
|
394 |
-
float: left;
|
395 |
-
width: 340px;
|
396 |
-
height: 220px;
|
397 |
-
margin: 15px;
|
398 |
-
text-align: center;
|
399 |
-
background: #fff;
|
400 |
-
border-radius: 5px;
|
401 |
-
}
|
402 |
-
|
403 |
-
.nsl-box-review-bigstar {
|
404 |
-
width: 170px;
|
405 |
-
height: 105px;
|
406 |
-
margin: 20px auto 0;
|
407 |
-
background-image: url('images/stars-big.png');
|
408 |
-
}
|
409 |
-
|
410 |
-
[data-stars="1"] .nsl-box-review-bigstar {
|
411 |
-
background-position: 0 -105px;
|
412 |
-
}
|
413 |
-
|
414 |
-
[data-stars="2"] .nsl-box-review-bigstar {
|
415 |
-
background-position: 0 -210px;
|
416 |
-
}
|
417 |
-
|
418 |
-
[data-stars="3"] .nsl-box-review-bigstar {
|
419 |
-
background-position: 0 -315px;
|
420 |
-
}
|
421 |
-
|
422 |
-
[data-stars="4"] .nsl-box-review-bigstar {
|
423 |
-
background-position: 0 -420px;
|
424 |
-
}
|
425 |
-
|
426 |
-
[data-stars="5"] .nsl-box-review-bigstar {
|
427 |
-
background-position: 0 -525px;
|
428 |
-
}
|
429 |
-
|
430 |
-
.nsl-box-review-label {
|
431 |
-
color: #7b8898;
|
432 |
-
font-size: 15px;
|
433 |
-
line-height: 22px;
|
434 |
-
height: 22px;
|
435 |
-
overflow: hidden;
|
436 |
-
display: none;
|
437 |
-
}
|
438 |
-
|
439 |
-
[data-stars="0"] .nsl-box-review-label[data-star="0"],
|
440 |
-
[data-stars="1"] .nsl-box-review-label[data-star="1"],
|
441 |
-
[data-stars="2"] .nsl-box-review-label[data-star="2"],
|
442 |
-
[data-stars="3"] .nsl-box-review-label[data-star="3"],
|
443 |
-
[data-stars="4"] .nsl-box-review-label[data-star="4"],
|
444 |
-
[data-stars="5"] .nsl-box-review-label[data-star="5"] {
|
445 |
-
display: block;
|
446 |
-
}
|
447 |
-
|
448 |
-
.nsl-box-review-stars-container {
|
449 |
-
width: 170px;
|
450 |
-
height: 34px;
|
451 |
-
margin: 0 auto;
|
452 |
-
}
|
453 |
-
|
454 |
-
.nsl-box-review-star {
|
455 |
-
cursor: pointer;
|
456 |
-
transition: transform 0.4s;
|
457 |
-
vertical-align: top;
|
458 |
-
float: left;
|
459 |
-
width: 34px;
|
460 |
-
height: 34px;
|
461 |
-
background-image: url('images/stars-small.png');
|
462 |
-
}
|
463 |
-
|
464 |
-
[data-stars="1"] .nsl-box-review-star[data-star="1"],
|
465 |
-
[data-stars="2"] .nsl-box-review-star[data-star="1"],
|
466 |
-
[data-stars="2"] .nsl-box-review-star[data-star="2"],
|
467 |
-
[data-stars="3"] .nsl-box-review-star[data-star="1"],
|
468 |
-
[data-stars="3"] .nsl-box-review-star[data-star="2"],
|
469 |
-
[data-stars="3"] .nsl-box-review-star[data-star="3"],
|
470 |
-
[data-stars="4"] .nsl-box-review-star[data-star="1"],
|
471 |
-
[data-stars="4"] .nsl-box-review-star[data-star="2"],
|
472 |
-
[data-stars="4"] .nsl-box-review-star[data-star="3"],
|
473 |
-
[data-stars="4"] .nsl-box-review-star[data-star="4"],
|
474 |
-
[data-stars="5"] .nsl-box-review-star[data-star="1"],
|
475 |
-
[data-stars="5"] .nsl-box-review-star[data-star="2"],
|
476 |
-
[data-stars="5"] .nsl-box-review-star[data-star="3"],
|
477 |
-
[data-stars="5"] .nsl-box-review-star[data-star="4"],
|
478 |
-
[data-stars="5"] .nsl-box-review-star[data-star="5"] {
|
479 |
-
background-position: 0 -34px;
|
480 |
-
transform: scale(1.3);
|
481 |
-
}
|
482 |
-
|
483 |
-
.nsl-box-review-star-5 {
|
484 |
-
position: relative;
|
485 |
-
display: flex;
|
486 |
-
flex-flow: column;
|
487 |
-
border: 3px solid #f9cb4f;
|
488 |
-
justify-content: center;
|
489 |
-
box-sizing: border-box;
|
490 |
-
padding: 0 30px;
|
491 |
-
}
|
492 |
-
|
493 |
-
.nsl-box-review-star-5 h3 {
|
494 |
-
margin: 0 0 10px;
|
495 |
-
}
|
496 |
-
|
497 |
-
.nsl-box-review-star-5-description {
|
498 |
-
margin: 0 0 20px;
|
499 |
-
}
|
500 |
-
|
501 |
-
.nsl-box-review-star-5 .nsl-box-review-star-5-close {
|
502 |
-
display: none;
|
503 |
-
position: absolute;
|
504 |
-
right: 10px;
|
505 |
-
top: 10px;
|
506 |
-
color: #23282d;
|
507 |
-
cursor: pointer;
|
508 |
-
}
|
509 |
-
|
510 |
-
.nsl-box-review-star-5:HOVER .nsl-box-review-star-5-close {
|
511 |
-
display: block;
|
512 |
-
}
|
513 |
-
|
514 |
-
.nsl-box-review-star-5 .nsl-box-review-star-5-close:before {
|
515 |
-
content: "\f158";
|
516 |
-
font: 400 16px/1 dashicons;
|
517 |
-
speak: none;
|
518 |
-
vertical-align: middle;
|
519 |
-
-webkit-font-smoothing: antialiased;
|
520 |
-
-moz-osx-font-smoothing: grayscale;
|
521 |
-
}
|
522 |
-
|
523 |
-
.nsl-admin-setting-disabled input[type=text] {
|
524 |
-
display: none;
|
525 |
}
|
1 |
+
#screen-meta,
|
2 |
+
#screen-meta-links {
|
3 |
+
display: none !important;
|
4 |
+
}
|
5 |
+
|
6 |
+
.nsl-clear {
|
7 |
+
clear: both;
|
8 |
+
}
|
9 |
+
|
10 |
+
#wpcontent {
|
11 |
+
padding-left: 0;
|
12 |
+
padding-right: 0;
|
13 |
+
}
|
14 |
+
|
15 |
+
#nsl-admin {
|
16 |
+
margin: 0;
|
17 |
+
}
|
18 |
+
|
19 |
+
.error + #nsl-admin,
|
20 |
+
.notice + #nsl-admin,
|
21 |
+
.updated + #nsl-admin {
|
22 |
+
margin-top: 30px;
|
23 |
+
}
|
24 |
+
|
25 |
+
#nsl-admin,
|
26 |
+
#nsl-admin p,
|
27 |
+
#nsl-admin ul,
|
28 |
+
#nsl-admin li {
|
29 |
+
font-size: 13px;
|
30 |
+
}
|
31 |
+
|
32 |
+
#nsl-admin .nsl-admin-embed-youtube {
|
33 |
+
position: relative;
|
34 |
+
max-width: 1280px;
|
35 |
+
margin-top: 40px;
|
36 |
+
}
|
37 |
+
|
38 |
+
#nsl-admin .nsl-admin-embed-youtube div {
|
39 |
+
padding-bottom: 56.25%;
|
40 |
+
}
|
41 |
+
|
42 |
+
#nsl-admin .nsl-admin-embed-youtube iframe {
|
43 |
+
position: absolute;
|
44 |
+
left: 0;
|
45 |
+
top: 0;
|
46 |
+
width: 100%;
|
47 |
+
height: 100%;
|
48 |
+
}
|
49 |
+
|
50 |
+
#nsl-admin .form-table th em {
|
51 |
+
font-weight: normal;
|
52 |
+
}
|
53 |
+
|
54 |
+
#nsl-admin .nsl-admin-header {
|
55 |
+
background: #0073aa;
|
56 |
+
height: 106px;
|
57 |
+
display: flex;
|
58 |
+
align-items: center;
|
59 |
+
padding: 0 20px;
|
60 |
+
}
|
61 |
+
|
62 |
+
#nsl-admin .nsl-admin-header h1 {
|
63 |
+
margin: 0 auto 0 0;
|
64 |
+
padding: 0;
|
65 |
+
}
|
66 |
+
|
67 |
+
#nsl-admin .nsl-admin-header h1,
|
68 |
+
#nsl-admin .nsl-admin-header h1 a {
|
69 |
+
color: #ffffff;
|
70 |
+
font-size: 24px;
|
71 |
+
text-decoration: none;
|
72 |
+
}
|
73 |
+
|
74 |
+
#nsl-admin .nsl-admin-header h1 a {
|
75 |
+
line-height: 64px;
|
76 |
+
vertical-align: top;
|
77 |
+
}
|
78 |
+
|
79 |
+
#nsl-admin .nsl-admin-header a:focus {
|
80 |
+
box-shadow: none;
|
81 |
+
}
|
82 |
+
|
83 |
+
#nsl-admin .nsl-admin-header h1 a img {
|
84 |
+
margin: 0 10px;
|
85 |
+
vertical-align: middle;
|
86 |
+
}
|
87 |
+
|
88 |
+
#nsl-admin .nsl-admin-header a.nsl-admin-header-nav {
|
89 |
+
color: #ffffff;
|
90 |
+
font-size: 16px;
|
91 |
+
text-decoration: none;
|
92 |
+
padding: 20px;
|
93 |
+
}
|
94 |
+
|
95 |
+
#nsl-admin .nsl-admin-nav-bar {
|
96 |
+
display: flex;
|
97 |
+
background: #ffffff;
|
98 |
+
height: 55px;
|
99 |
+
border-bottom: 1px solid #dbdbdb;
|
100 |
+
padding: 0 10px;
|
101 |
+
}
|
102 |
+
|
103 |
+
#nsl-admin .nsl-admin-nav-bar .nsl-admin-nav-tab {
|
104 |
+
padding: 0 20px;
|
105 |
+
}
|
106 |
+
|
107 |
+
#nsl-admin .nsl-admin-nav-bar .nsl-admin-nav-tab {
|
108 |
+
line-height: 55px;
|
109 |
+
text-decoration: none;
|
110 |
+
color: #23282d;
|
111 |
+
}
|
112 |
+
|
113 |
+
#nsl-admin .nsl-admin-nav-bar .nsl-admin-nav-tab:focus {
|
114 |
+
box-shadow: none;
|
115 |
+
}
|
116 |
+
|
117 |
+
#nsl-admin .nsl-admin-nav-bar .nsl-admin-nav-tab.nsl-admin-nav-tab-active {
|
118 |
+
box-shadow: inset 0 -3px 0 0 #00a0d2;
|
119 |
+
color: #000;
|
120 |
+
font-weight: bold;
|
121 |
+
}
|
122 |
+
|
123 |
+
#nsl-admin .nsl-admin-sub-nav-bar {
|
124 |
+
display: flex;
|
125 |
+
height: 40px;
|
126 |
+
border-bottom: 1px solid #dddddd;
|
127 |
+
}
|
128 |
+
|
129 |
+
#nsl-admin .nsl-admin-sub-nav-bar .nsl-admin-nav-tab {
|
130 |
+
position: relative;
|
131 |
+
margin-right: 30px;
|
132 |
+
line-height: 40px;
|
133 |
+
text-decoration: none;
|
134 |
+
color: #23282d;
|
135 |
+
}
|
136 |
+
|
137 |
+
#nsl-admin .nsl-admin-sub-nav-bar .nsl-admin-nav-tab:focus {
|
138 |
+
box-shadow: none;
|
139 |
+
}
|
140 |
+
|
141 |
+
#nsl-admin .nsl-admin-sub-nav-bar .nsl-admin-nav-tab.nsl-admin-nav-tab-active {
|
142 |
+
box-shadow: inset 0 -3px 0 0 #00a0d2;
|
143 |
+
color: #000;
|
144 |
+
font-weight: bold;
|
145 |
+
}
|
146 |
+
|
147 |
+
#nsl-admin .nsl-admin-sub-nav-bar .nsl-admin-nav-tab .nsl-pro-badge {
|
148 |
+
display: block;
|
149 |
+
background: #0073aa;
|
150 |
+
border-radius: 3px;
|
151 |
+
color: #fff;
|
152 |
+
position: absolute;
|
153 |
+
right: -20px;
|
154 |
+
top: -2px;
|
155 |
+
padding: 0 5px;
|
156 |
+
line-height: 16px;
|
157 |
+
font-size: 10px;
|
158 |
+
font-weight: normal;
|
159 |
+
text-transform: uppercase;
|
160 |
+
}
|
161 |
+
|
162 |
+
.nsl-dashboard-providers {
|
163 |
+
position: relative;
|
164 |
+
padding: 15px;
|
165 |
+
}
|
166 |
+
|
167 |
+
.nsl-dashboard-providers .nsl-dashboard-newsletter {
|
168 |
+
position: relative;
|
169 |
+
float: left;
|
170 |
+
width: 340px;
|
171 |
+
height: 220px;
|
172 |
+
margin: 15px;
|
173 |
+
box-sizing: border-box;
|
174 |
+
border-radius: 5px;
|
175 |
+
padding: 15px;
|
176 |
+
display: flex;
|
177 |
+
flex-flow: column;
|
178 |
+
}
|
179 |
+
|
180 |
+
.nsl-dashboard-providers .nsl-dashboard-newsletter-content {
|
181 |
+
text-align: center;
|
182 |
+
display: flex;
|
183 |
+
flex-flow: column;
|
184 |
+
justify-content: center;
|
185 |
+
align-items: center;
|
186 |
+
height: 100%;
|
187 |
+
}
|
188 |
+
|
189 |
+
.nsl-dashboard-providers .nsl-dashboard-newsletter-content h2 {
|
190 |
+
color: #000000;
|
191 |
+
font-size: 18px;
|
192 |
+
line-height: 1.5;
|
193 |
+
margin: 0;
|
194 |
+
font-weight: 600;
|
195 |
+
}
|
196 |
+
|
197 |
+
.nsl-dashboard-providers .nsl-dashboard-newsletter-content input[type="text"] {
|
198 |
+
margin: 0 0 13px 0;
|
199 |
+
text-align: center;
|
200 |
+
}
|
201 |
+
|
202 |
+
.nsl-dashboard-providers .nsl-dashboard-provider {
|
203 |
+
position: relative;
|
204 |
+
float: left;
|
205 |
+
width: 340px;
|
206 |
+
height: 220px;
|
207 |
+
margin: 15px;
|
208 |
+
|
209 |
+
display: flex;
|
210 |
+
flex-flow: column;
|
211 |
+
}
|
212 |
+
|
213 |
+
.nsl-dashboard-providers .nsl-dashboard-provider-top {
|
214 |
+
height: 166px;
|
215 |
+
display: flex;
|
216 |
+
flex-flow: column;
|
217 |
+
justify-content: center;
|
218 |
+
align-items: center;
|
219 |
+
border-top-left-radius: 5px;
|
220 |
+
border-top-right-radius: 5px;
|
221 |
+
}
|
222 |
+
|
223 |
+
.nsl-dashboard-providers h2 {
|
224 |
+
color: #ffffff;
|
225 |
+
font-size: 22px;
|
226 |
+
margin: 20px 0 0 0;
|
227 |
+
font-weight: 600;
|
228 |
+
}
|
229 |
+
|
230 |
+
.nsl-dashboard-providers .nsl-dashboard-provider-bottom {
|
231 |
+
background: #ffffff;
|
232 |
+
flex: 1 1 auto;
|
233 |
+
display: flex;
|
234 |
+
align-items: center;
|
235 |
+
padding: 0 15px;
|
236 |
+
border: 1px solid #dbdbdb;
|
237 |
+
border-width: 0 1px 1px 1px;
|
238 |
+
border-bottom-left-radius: 5px;
|
239 |
+
border-bottom-right-radius: 5px;
|
240 |
+
}
|
241 |
+
|
242 |
+
.nsl-dashboard-provider-bottom-state {
|
243 |
+
margin-right: auto;
|
244 |
+
font-size: 14px;
|
245 |
+
color: #23282d;
|
246 |
+
}
|
247 |
+
|
248 |
+
[data-state="not-tested"] .nsl-dashboard-provider-bottom-state {
|
249 |
+
color: #0b97c6;
|
250 |
+
}
|
251 |
+
|
252 |
+
[data-state="disabled"] .nsl-dashboard-provider-bottom-state {
|
253 |
+
color: #c8463f;
|
254 |
+
}
|
255 |
+
|
256 |
+
[data-state="enabled"] .nsl-dashboard-provider-bottom-state {
|
257 |
+
color: #46b450;
|
258 |
+
}
|
259 |
+
|
260 |
+
.nsl-dashboard-providers .nsl-dashboard-provider-bottom a + a {
|
261 |
+
margin-left: 10px;
|
262 |
+
}
|
263 |
+
|
264 |
+
.nsl-dashboard-provider-sortable-handle {
|
265 |
+
position: absolute;
|
266 |
+
left: 0;
|
267 |
+
top: 0;
|
268 |
+
width: 27px;
|
269 |
+
height: 34px;
|
270 |
+
cursor: move;
|
271 |
+
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAiCAYAAACuoaIwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA+tpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxNSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE4LTAxLTE3VDE1OjE4OjM5KzAxOjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAxOC0wMS0xN1QxNjoxMTo0MSswMTowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAxOC0wMS0xN1QxNjoxMTo0MSswMTowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QjhCNkM3MkZGQjk4MTFFN0E4RDJBRUZBQTI4OUVBNzIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QjhCNkM3MzBGQjk4MTFFN0E4RDJBRUZBQTI4OUVBNzIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpCOEI2QzcyREZCOTgxMUU3QThEMkFFRkFBMjg5RUE3MiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpCOEI2QzcyRUZCOTgxMUU3QThEMkFFRkFBMjg5RUE3MiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Po8u91EAAABlSURBVHjaYvz//z8DvQATAx3BqGWjlg0ey1iIUKMDxHFQ9iIgvkKkHFk+AxnGD8VxJMhRHIyMZMoRbRkoeD4B8QcgXkiCHKZrRsvG0aQ/mvRHk/5o0h9N+qNJf9SyUcuoCAACDABr5TA7L7qpSQAAAABJRU5ErkJggg==');
|
272 |
+
}
|
273 |
+
|
274 |
+
.nsl-provider-notice {
|
275 |
+
position: absolute;
|
276 |
+
right: 10px;
|
277 |
+
top: 0;
|
278 |
+
color: #fff;
|
279 |
+
line-height: 32px;
|
280 |
+
font-size: 16px;
|
281 |
+
}
|
282 |
+
|
283 |
+
.nsl-admin-notices {
|
284 |
+
padding: 30px 30px 0;
|
285 |
+
}
|
286 |
+
|
287 |
+
.nsl-admin-content .nsl-admin-notices {
|
288 |
+
padding: 20px 0 0;
|
289 |
+
}
|
290 |
+
|
291 |
+
.nsl-admin-notices > div {
|
292 |
+
margin: 5px 0 2px;
|
293 |
+
}
|
294 |
+
|
295 |
+
.nsl-admin-content {
|
296 |
+
padding: 10px 30px;
|
297 |
+
}
|
298 |
+
|
299 |
+
.nsl-admin-sub-content {
|
300 |
+
padding: 20px 0;
|
301 |
+
}
|
302 |
+
|
303 |
+
.nsl-box {
|
304 |
+
max-width: 500px;
|
305 |
+
padding: 30px;
|
306 |
+
margin: 30px 0;
|
307 |
+
background: #ffffff no-repeat 20px 40px;
|
308 |
+
border-radius: 5px;
|
309 |
+
padding-left: 110px;
|
310 |
+
}
|
311 |
+
|
312 |
+
.nsl-box h2 {
|
313 |
+
margin: 10px 0 0 0;
|
314 |
+
}
|
315 |
+
|
316 |
+
.nsl-box p {
|
317 |
+
margin: 20px 0 0 0;
|
318 |
+
}
|
319 |
+
|
320 |
+
.nsl-box-yellow {
|
321 |
+
border: 3px solid #f9cb4f;
|
322 |
+
}
|
323 |
+
|
324 |
+
.nsl-box-yellow-bg {
|
325 |
+
background: #faf7ea no-repeat 20px 40px;
|
326 |
+
}
|
327 |
+
|
328 |
+
.nsl-box-blue {
|
329 |
+
border: 3px solid #00a0d2;
|
330 |
+
background-image: url('images/test-needed.png');
|
331 |
+
}
|
332 |
+
|
333 |
+
.nsl-box-green {
|
334 |
+
border: 3px solid #46b450;
|
335 |
+
background-image: url('images/ok.png');
|
336 |
+
}
|
337 |
+
|
338 |
+
.nsl-box-red {
|
339 |
+
border: 3px solid #c8463f;
|
340 |
+
}
|
341 |
+
|
342 |
+
.nsl-box-error {
|
343 |
+
background-image: url('images/error.png');
|
344 |
+
}
|
345 |
+
|
346 |
+
.nsl-box-padlock {
|
347 |
+
background-image: url('images/padlock.png');
|
348 |
+
}
|
349 |
+
|
350 |
+
.nsl-box-exclamation-mark {
|
351 |
+
background-image: url('images/exclamation-mark.png');
|
352 |
+
}
|
353 |
+
|
354 |
+
.nsl-box .button {
|
355 |
+
margin-right: 10px;
|
356 |
+
}
|
357 |
+
|
358 |
+
#nsl-test-configuration {
|
359 |
+
line-height: 28px;
|
360 |
+
}
|
361 |
+
|
362 |
+
#nsl-test-configuration > * {
|
363 |
+
margin-right: 10px;
|
364 |
+
}
|
365 |
+
|
366 |
+
#nsl-test-please-save {
|
367 |
+
display: none;
|
368 |
+
}
|
369 |
+
|
370 |
+
#nsl-admin .CodeMirror {
|
371 |
+
height: auto;
|
372 |
+
}
|
373 |
+
|
374 |
+
#nsl-admin .CodeMirror-scroll {
|
375 |
+
min-height: 100px;
|
376 |
+
}
|
377 |
+
|
378 |
+
#nsl-admin fieldset label {
|
379 |
+
vertical-align: top;
|
380 |
+
}
|
381 |
+
|
382 |
+
input[type="radio"] ~ img {
|
383 |
+
margin-top: 20px;
|
384 |
+
margin-right: 30px;
|
385 |
+
}
|
386 |
+
|
387 |
+
input[type="radio"]:checked ~ img {
|
388 |
+
box-shadow: 0 0 0 3px #00a0d2;
|
389 |
+
border-radius: 3px;
|
390 |
+
}
|
391 |
+
|
392 |
+
.nsl-box-review {
|
393 |
+
position: relative;
|
394 |
+
float: left;
|
395 |
+
width: 340px;
|
396 |
+
height: 220px;
|
397 |
+
margin: 15px;
|
398 |
+
text-align: center;
|
399 |
+
background: #fff;
|
400 |
+
border-radius: 5px;
|
401 |
+
}
|
402 |
+
|
403 |
+
.nsl-box-review-bigstar {
|
404 |
+
width: 170px;
|
405 |
+
height: 105px;
|
406 |
+
margin: 20px auto 0;
|
407 |
+
background-image: url('images/stars-big.png');
|
408 |
+
}
|
409 |
+
|
410 |
+
[data-stars="1"] .nsl-box-review-bigstar {
|
411 |
+
background-position: 0 -105px;
|
412 |
+
}
|
413 |
+
|
414 |
+
[data-stars="2"] .nsl-box-review-bigstar {
|
415 |
+
background-position: 0 -210px;
|
416 |
+
}
|
417 |
+
|
418 |
+
[data-stars="3"] .nsl-box-review-bigstar {
|
419 |
+
background-position: 0 -315px;
|
420 |
+
}
|
421 |
+
|
422 |
+
[data-stars="4"] .nsl-box-review-bigstar {
|
423 |
+
background-position: 0 -420px;
|
424 |
+
}
|
425 |
+
|
426 |
+
[data-stars="5"] .nsl-box-review-bigstar {
|
427 |
+
background-position: 0 -525px;
|
428 |
+
}
|
429 |
+
|
430 |
+
.nsl-box-review-label {
|
431 |
+
color: #7b8898;
|
432 |
+
font-size: 15px;
|
433 |
+
line-height: 22px;
|
434 |
+
height: 22px;
|
435 |
+
overflow: hidden;
|
436 |
+
display: none;
|
437 |
+
}
|
438 |
+
|
439 |
+
[data-stars="0"] .nsl-box-review-label[data-star="0"],
|
440 |
+
[data-stars="1"] .nsl-box-review-label[data-star="1"],
|
441 |
+
[data-stars="2"] .nsl-box-review-label[data-star="2"],
|
442 |
+
[data-stars="3"] .nsl-box-review-label[data-star="3"],
|
443 |
+
[data-stars="4"] .nsl-box-review-label[data-star="4"],
|
444 |
+
[data-stars="5"] .nsl-box-review-label[data-star="5"] {
|
445 |
+
display: block;
|
446 |
+
}
|
447 |
+
|
448 |
+
.nsl-box-review-stars-container {
|
449 |
+
width: 170px;
|
450 |
+
height: 34px;
|
451 |
+
margin: 0 auto;
|
452 |
+
}
|
453 |
+
|
454 |
+
.nsl-box-review-star {
|
455 |
+
cursor: pointer;
|
456 |
+
transition: transform 0.4s;
|
457 |
+
vertical-align: top;
|
458 |
+
float: left;
|
459 |
+
width: 34px;
|
460 |
+
height: 34px;
|
461 |
+
background-image: url('images/stars-small.png');
|
462 |
+
}
|
463 |
+
|
464 |
+
[data-stars="1"] .nsl-box-review-star[data-star="1"],
|
465 |
+
[data-stars="2"] .nsl-box-review-star[data-star="1"],
|
466 |
+
[data-stars="2"] .nsl-box-review-star[data-star="2"],
|
467 |
+
[data-stars="3"] .nsl-box-review-star[data-star="1"],
|
468 |
+
[data-stars="3"] .nsl-box-review-star[data-star="2"],
|
469 |
+
[data-stars="3"] .nsl-box-review-star[data-star="3"],
|
470 |
+
[data-stars="4"] .nsl-box-review-star[data-star="1"],
|
471 |
+
[data-stars="4"] .nsl-box-review-star[data-star="2"],
|
472 |
+
[data-stars="4"] .nsl-box-review-star[data-star="3"],
|
473 |
+
[data-stars="4"] .nsl-box-review-star[data-star="4"],
|
474 |
+
[data-stars="5"] .nsl-box-review-star[data-star="1"],
|
475 |
+
[data-stars="5"] .nsl-box-review-star[data-star="2"],
|
476 |
+
[data-stars="5"] .nsl-box-review-star[data-star="3"],
|
477 |
+
[data-stars="5"] .nsl-box-review-star[data-star="4"],
|
478 |
+
[data-stars="5"] .nsl-box-review-star[data-star="5"] {
|
479 |
+
background-position: 0 -34px;
|
480 |
+
transform: scale(1.3);
|
481 |
+
}
|
482 |
+
|
483 |
+
.nsl-box-review-star-5 {
|
484 |
+
position: relative;
|
485 |
+
display: flex;
|
486 |
+
flex-flow: column;
|
487 |
+
border: 3px solid #f9cb4f;
|
488 |
+
justify-content: center;
|
489 |
+
box-sizing: border-box;
|
490 |
+
padding: 0 30px;
|
491 |
+
}
|
492 |
+
|
493 |
+
.nsl-box-review-star-5 h3 {
|
494 |
+
margin: 0 0 10px;
|
495 |
+
}
|
496 |
+
|
497 |
+
.nsl-box-review-star-5-description {
|
498 |
+
margin: 0 0 20px;
|
499 |
+
}
|
500 |
+
|
501 |
+
.nsl-box-review-star-5 .nsl-box-review-star-5-close {
|
502 |
+
display: none;
|
503 |
+
position: absolute;
|
504 |
+
right: 10px;
|
505 |
+
top: 10px;
|
506 |
+
color: #23282d;
|
507 |
+
cursor: pointer;
|
508 |
+
}
|
509 |
+
|
510 |
+
.nsl-box-review-star-5:HOVER .nsl-box-review-star-5-close {
|
511 |
+
display: block;
|
512 |
+
}
|
513 |
+
|
514 |
+
.nsl-box-review-star-5 .nsl-box-review-star-5-close:before {
|
515 |
+
content: "\f158";
|
516 |
+
font: 400 16px/1 dashicons;
|
517 |
+
speak: none;
|
518 |
+
vertical-align: middle;
|
519 |
+
-webkit-font-smoothing: antialiased;
|
520 |
+
-moz-osx-font-smoothing: grayscale;
|
521 |
+
}
|
522 |
+
|
523 |
+
.nsl-admin-setting-disabled input[type=text] {
|
524 |
+
display: none;
|
525 |
}
|
admin/templates-provider/buttons.php
CHANGED
@@ -1,178 +1,176 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
/** @var $this NextendSocialProviderAdmin */
|
4 |
-
|
5 |
-
$provider = $this->getProvider();
|
6 |
-
|
7 |
-
$settings = $provider->settings;
|
8 |
-
|
9 |
-
$isPRO = apply_filters('nsl-pro', false);
|
10 |
-
?>
|
11 |
-
<div class="nsl-admin-sub-content">
|
12 |
-
<script type="text/javascript">
|
13 |
-
|
14 |
-
|
15 |
-
window.resetButtonToDefault = function (id) {
|
16 |
-
var defaultButtonValues = {
|
17 |
-
'#login_label': <?php echo wp_json_encode($settings->get('login_label', 'default')); ?>,
|
18 |
-
'#link_label': <?php echo wp_json_encode($settings->get('link_label', 'default')); ?>,
|
19 |
-
'#unlink_label': <?php echo wp_json_encode($settings->get('unlink_label', 'default')); ?>,
|
20 |
-
'#custom_default_button': <?php echo wp_json_encode($provider->getRawDefaultButton()); ?>,
|
21 |
-
'#custom_icon_button': <?php echo wp_json_encode($provider->getRawIconButton()); ?>
|
22 |
-
};
|
23 |
-
|
24 |
-
var $CodeMirror = jQuery(id).val(defaultButtonValues[id]).siblings('.CodeMirror').get(0);
|
25 |
-
if ($CodeMirror && typeof $CodeMirror.CodeMirror !== 'undefined') {
|
26 |
-
$CodeMirror.CodeMirror.setValue(defaultButtonValues[id]);
|
27 |
-
}
|
28 |
-
return false;
|
29 |
-
};
|
30 |
-
|
31 |
-
$(document).ready(function () {
|
32 |
-
$('#custom_default_button_enabled').on('change', function () {
|
33 |
-
if ($(this).is(':checked')) {
|
34 |
-
$('#custom_default_button_textarea_container').css('display', '');
|
35 |
-
|
36 |
-
var $CodeMirror = jQuery('#custom_default_button').siblings('.CodeMirror').get(0);
|
37 |
-
if ($CodeMirror && typeof $CodeMirror.CodeMirror !== 'undefined') {
|
38 |
-
$CodeMirror.CodeMirror.refresh();
|
39 |
-
}
|
40 |
-
}
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
<input type="hidden" name="
|
67 |
-
|
68 |
-
<
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
<
|
81 |
-
|
82 |
-
|
83 |
-
<
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
<
|
92 |
-
|
93 |
-
|
94 |
-
<
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
<
|
103 |
-
|
104 |
-
|
105 |
-
<
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
$
|
119 |
-
|
120 |
-
|
121 |
-
$
|
122 |
-
}
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
$
|
150 |
-
|
151 |
-
|
152 |
-
$
|
153 |
-
}
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
</form>
|
178 |
-
</div>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
/** @var $this NextendSocialProviderAdmin */
|
4 |
+
|
5 |
+
$provider = $this->getProvider();
|
6 |
+
|
7 |
+
$settings = $provider->settings;
|
8 |
+
|
9 |
+
$isPRO = apply_filters('nsl-pro', false);
|
10 |
+
?>
|
11 |
+
<div class="nsl-admin-sub-content">
|
12 |
+
<script type="text/javascript">
|
13 |
+
(function ($) {
|
14 |
+
|
15 |
+
window.resetButtonToDefault = function (id) {
|
16 |
+
var defaultButtonValues = {
|
17 |
+
'#login_label': <?php echo wp_json_encode($settings->get('login_label', 'default')); ?>,
|
18 |
+
'#link_label': <?php echo wp_json_encode($settings->get('link_label', 'default')); ?>,
|
19 |
+
'#unlink_label': <?php echo wp_json_encode($settings->get('unlink_label', 'default')); ?>,
|
20 |
+
'#custom_default_button': <?php echo wp_json_encode($provider->getRawDefaultButton()); ?>,
|
21 |
+
'#custom_icon_button': <?php echo wp_json_encode($provider->getRawIconButton()); ?>
|
22 |
+
};
|
23 |
+
|
24 |
+
var $CodeMirror = jQuery(id).val(defaultButtonValues[id]).siblings('.CodeMirror').get(0);
|
25 |
+
if ($CodeMirror && typeof $CodeMirror.CodeMirror !== 'undefined') {
|
26 |
+
$CodeMirror.CodeMirror.setValue(defaultButtonValues[id]);
|
27 |
+
}
|
28 |
+
return false;
|
29 |
+
};
|
30 |
+
|
31 |
+
$(document).ready(function () {
|
32 |
+
$('#custom_default_button_enabled').on('change', function () {
|
33 |
+
if ($(this).is(':checked')) {
|
34 |
+
$('#custom_default_button_textarea_container').css('display', '');
|
35 |
+
|
36 |
+
var $CodeMirror = jQuery('#custom_default_button').siblings('.CodeMirror').get(0);
|
37 |
+
if ($CodeMirror && typeof $CodeMirror.CodeMirror !== 'undefined') {
|
38 |
+
$CodeMirror.CodeMirror.refresh();
|
39 |
+
}
|
40 |
+
} else {
|
41 |
+
$('#custom_default_button_textarea_container').css('display', 'none');
|
42 |
+
}
|
43 |
+
});
|
44 |
+
|
45 |
+
$('#custom_icon_button_enabled').on('change', function () {
|
46 |
+
if ($(this).is(':checked')) {
|
47 |
+
$('#custom_icon_button_textarea_container').css('display', '');
|
48 |
+
|
49 |
+
var $CodeMirror = jQuery('#custom_icon_button').siblings('.CodeMirror').get(0);
|
50 |
+
if ($CodeMirror && typeof $CodeMirror.CodeMirror !== 'undefined') {
|
51 |
+
$CodeMirror.CodeMirror.refresh();
|
52 |
+
}
|
53 |
+
} else {
|
54 |
+
$('#custom_icon_button_textarea_container').css('display', 'none');
|
55 |
+
}
|
56 |
+
});
|
57 |
+
});
|
58 |
+
})(jQuery);
|
59 |
+
</script>
|
60 |
+
|
61 |
+
<form method="post" action="<?php echo admin_url('admin-post.php'); ?>" novalidate="novalidate">
|
62 |
+
|
63 |
+
<?php wp_nonce_field('nextend-social-login'); ?>
|
64 |
+
<input type="hidden" name="action" value="nextend-social-login"/>
|
65 |
+
<input type="hidden" name="view" value="provider-<?php echo $provider->getId(); ?>"/>
|
66 |
+
<input type="hidden" name="subview" value="buttons"/>
|
67 |
+
|
68 |
+
<table class="form-table">
|
69 |
+
<tbody>
|
70 |
+
<?php
|
71 |
+
$buttonsPath = $provider->getPath() . '/admin/buttons.php';
|
72 |
+
if (file_exists($buttonsPath)) {
|
73 |
+
include($buttonsPath);
|
74 |
+
}
|
75 |
+
?>
|
76 |
+
|
77 |
+
<tr>
|
78 |
+
<th scope="row"><label
|
79 |
+
for="login_label"><?php _e('Login label', 'nextend-facebook-connect'); ?></label></th>
|
80 |
+
<td>
|
81 |
+
<input name="login_label" type="text" id="login_label"
|
82 |
+
value="<?php echo esc_attr($settings->get('login_label')); ?>" class="regular-text">
|
83 |
+
<p class="description"><a href="#"
|
84 |
+
onclick="return resetButtonToDefault('#login_label');"><?php _e('Reset to default', 'nextend-facebook-connect'); ?></a>
|
85 |
+
</p>
|
86 |
+
</td>
|
87 |
+
</tr>
|
88 |
+
<tr>
|
89 |
+
<th scope="row"><label for="link_label"><?php _e('Link label', 'nextend-facebook-connect'); ?></label>
|
90 |
+
</th>
|
91 |
+
<td>
|
92 |
+
<input name="link_label" type="text" id="link_label"
|
93 |
+
value="<?php echo esc_attr($settings->get('link_label')); ?>" class="regular-text">
|
94 |
+
<p class="description"><a href="#"
|
95 |
+
onclick="return resetButtonToDefault('#link_label');"><?php _e('Reset to default', 'nextend-facebook-connect'); ?></a>
|
96 |
+
</p>
|
97 |
+
</td>
|
98 |
+
</tr>
|
99 |
+
<tr>
|
100 |
+
<th scope="row"><label
|
101 |
+
for="unlink_label"><?php _e('Unlink label', 'nextend-facebook-connect'); ?></label></th>
|
102 |
+
<td>
|
103 |
+
<input name="unlink_label" type="text" id="unlink_label"
|
104 |
+
value="<?php echo esc_attr($settings->get('unlink_label')); ?>" class="regular-text">
|
105 |
+
<p class="description"><a href="#"
|
106 |
+
onclick="return resetButtonToDefault('#unlink_label');"><?php _e('Reset to default', 'nextend-facebook-connect'); ?></a>
|
107 |
+
</p>
|
108 |
+
</td>
|
109 |
+
</tr>
|
110 |
+
<tr>
|
111 |
+
<th scope="row"><label
|
112 |
+
for="custom_default_button"><?php _e('Default button', 'nextend-facebook-connect'); ?></label>
|
113 |
+
</th>
|
114 |
+
<td>
|
115 |
+
<?php
|
116 |
+
$useCustom = false;
|
117 |
+
$buttonTemplate = $settings->get('custom_default_button');
|
118 |
+
if (!empty($buttonTemplate)) {
|
119 |
+
$useCustom = true;
|
120 |
+
} else {
|
121 |
+
$buttonTemplate = $provider->getRawDefaultButton();
|
122 |
+
}
|
123 |
+
?>
|
124 |
+
<fieldset><label for="custom_default_button_enabled">
|
125 |
+
<input name="custom_default_button_enabled" type="checkbox"
|
126 |
+
id="custom_default_button_enabled"
|
127 |
+
value="1" <?php if ($useCustom): ?> checked<?php endif; ?>>
|
128 |
+
<?php _e('Use custom button', 'nextend-facebook-connect'); ?></label>
|
129 |
+
</fieldset>
|
130 |
+
<div id="custom_default_button_textarea_container" <?php if (!$useCustom): ?> style="display:none;"<?php endif; ?>>
|
131 |
+
<textarea cols="160" rows="6" name="custom_default_button" id="custom_default_button"
|
132 |
+
class="nextend-html-editor"
|
133 |
+
aria-describedby="editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"><?php echo esc_textarea($buttonTemplate); ?></textarea>
|
134 |
+
<p class="description"><a href="#"
|
135 |
+
onclick="return resetButtonToDefault('#custom_default_button');"><?php _e('Reset to default', 'nextend-facebook-connect'); ?></a><br><br><?php printf(__('Use the %s in your custom button\'s code to make the label show up.', 'nextend-facebook-connect'), "<code>{{label}}</code>"); ?>
|
136 |
+
</p>
|
137 |
+
</div>
|
138 |
+
</td>
|
139 |
+
</tr>
|
140 |
+
<?php if ($isPRO): ?>
|
141 |
+
<tr>
|
142 |
+
<th scope="row"><label
|
143 |
+
for="custom_icon_button"><?php _e('Icon button', 'nextend-facebook-connect'); ?></label>
|
144 |
+
</th>
|
145 |
+
<td>
|
146 |
+
<?php
|
147 |
+
$useCustom = false;
|
148 |
+
$buttonTemplate = $settings->get('custom_icon_button');
|
149 |
+
if (!empty($buttonTemplate)) {
|
150 |
+
$useCustom = true;
|
151 |
+
} else {
|
152 |
+
$buttonTemplate = $provider->getRawIconButton();
|
153 |
+
}
|
154 |
+
?>
|
155 |
+
<fieldset><label for="custom_icon_button_enabled">
|
156 |
+
<input name="custom_icon_button_enabled" type="checkbox" id="custom_icon_button_enabled"
|
157 |
+
value="1" <?php if ($useCustom): ?> checked<?php endif; ?>>
|
158 |
+
<?php _e('Use custom button', 'nextend-facebook-connect'); ?></label>
|
159 |
+
</fieldset>
|
160 |
+
<div id="custom_icon_button_textarea_container" <?php if (!$useCustom): ?> style="display:none;"<?php endif; ?>>
|
161 |
+
<textarea cols="160" rows="6" name="custom_icon_button" id="custom_icon_button"
|
162 |
+
class="nextend-html-editor"
|
163 |
+
aria-describedby="editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"><?php echo esc_textarea($buttonTemplate); ?></textarea>
|
164 |
+
<p class="description"><a href="#"
|
165 |
+
onclick="return resetButtonToDefault('#custom_icon_button');"><?php _e('Reset to default', 'nextend-facebook-connect'); ?></a>
|
166 |
+
</p>
|
167 |
+
</div>
|
168 |
+
</td>
|
169 |
+
</tr>
|
170 |
+
<?php endif; ?>
|
171 |
+
</tbody>
|
172 |
+
</table>
|
173 |
+
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
174 |
+
value="<?php _e('Save Changes'); ?>"></p>
|
175 |
+
</form>
|
176 |
+
</div>
|
|
|
|
admin/templates-provider/menu.php
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
/** @var $this NextendSocialProviderAdmin */
|
4 |
-
/** @var $view string */
|
5 |
-
|
6 |
-
$proBadge = '';
|
7 |
-
if (!NextendSocialLoginAdmin::isPro()) {
|
8 |
-
$proBadge = '<span class="nsl-pro-badge">Pro</span>';
|
9 |
-
}
|
10 |
-
?>
|
11 |
-
<div class="nsl-admin-sub-nav-bar">
|
12 |
-
<a href="<?php echo $this->getUrl(); ?>"
|
13 |
-
class="nsl-admin-nav-tab<?php if ($view === 'getting-started'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Getting Started', 'nextend-facebook-connect'); ?></a>
|
14 |
-
<a href="<?php echo $this->getUrl('settings'); ?>"
|
15 |
-
class="nsl-admin-nav-tab<?php if ($view === 'settings'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Settings', 'nextend-facebook-connect'); ?></a>
|
16 |
-
<a href="<?php echo $this->getUrl('buttons'); ?>"
|
17 |
-
class="nsl-admin-nav-tab<?php if ($view === 'buttons'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Buttons', 'nextend-facebook-connect'); ?></a>
|
18 |
-
|
19 |
-
<?php if ($this->provider->hasSyncFields()): ?>
|
20 |
-
<a href="<?php echo $this->getUrl('sync-data'); ?>"
|
21 |
-
class="nsl-admin-nav-tab<?php if ($view === 'sync-data'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Sync data', 'nextend-facebook-connect'); ?><?php echo $proBadge; ?></a>
|
22 |
-
<?php endif; ?>
|
23 |
-
<a href="<?php echo $this->getUrl('usage'); ?>"
|
24 |
-
class="nsl-admin-nav-tab<?php if ($view === 'usage'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Usage', 'nextend-facebook-connect'); ?></a>
|
25 |
</div>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
/** @var $this NextendSocialProviderAdmin */
|
4 |
+
/** @var $view string */
|
5 |
+
|
6 |
+
$proBadge = '';
|
7 |
+
if (!NextendSocialLoginAdmin::isPro()) {
|
8 |
+
$proBadge = '<span class="nsl-pro-badge">Pro</span>';
|
9 |
+
}
|
10 |
+
?>
|
11 |
+
<div class="nsl-admin-sub-nav-bar">
|
12 |
+
<a href="<?php echo $this->getUrl(); ?>"
|
13 |
+
class="nsl-admin-nav-tab<?php if ($view === 'getting-started'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Getting Started', 'nextend-facebook-connect'); ?></a>
|
14 |
+
<a href="<?php echo $this->getUrl('settings'); ?>"
|
15 |
+
class="nsl-admin-nav-tab<?php if ($view === 'settings'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Settings', 'nextend-facebook-connect'); ?></a>
|
16 |
+
<a href="<?php echo $this->getUrl('buttons'); ?>"
|
17 |
+
class="nsl-admin-nav-tab<?php if ($view === 'buttons'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Buttons', 'nextend-facebook-connect'); ?></a>
|
18 |
+
|
19 |
+
<?php if ($this->provider->hasSyncFields()): ?>
|
20 |
+
<a href="<?php echo $this->getUrl('sync-data'); ?>"
|
21 |
+
class="nsl-admin-nav-tab<?php if ($view === 'sync-data'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Sync data', 'nextend-facebook-connect'); ?><?php echo $proBadge; ?></a>
|
22 |
+
<?php endif; ?>
|
23 |
+
<a href="<?php echo $this->getUrl('usage'); ?>"
|
24 |
+
class="nsl-admin-nav-tab<?php if ($view === 'usage'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Usage', 'nextend-facebook-connect'); ?></a>
|
25 |
</div>
|
admin/templates-provider/settings-other.php
CHANGED
@@ -1,70 +1,73 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
/** @var $this NextendSocialProviderAdmin */
|
4 |
-
|
5 |
-
$provider = $this->getProvider();
|
6 |
-
|
7 |
-
$settings = $provider->settings;
|
8 |
-
?>
|
9 |
-
|
10 |
-
<hr/>
|
11 |
-
<h2><?php _e('Other settings', 'nextend-facebook-connect'); ?></h2>
|
12 |
-
<table class="form-table">
|
13 |
-
<tbody>
|
14 |
-
<tr>
|
15 |
-
<th scope="row"><label
|
16 |
-
for="user_prefix"><?php _e('Username prefix on register', 'nextend-facebook-connect'); ?></label
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
70 |
</table>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
/** @var $this NextendSocialProviderAdmin */
|
4 |
+
|
5 |
+
$provider = $this->getProvider();
|
6 |
+
|
7 |
+
$settings = $provider->settings;
|
8 |
+
?>
|
9 |
+
|
10 |
+
<hr/>
|
11 |
+
<h2><?php _e('Other settings', 'nextend-facebook-connect'); ?></h2>
|
12 |
+
<table class="form-table">
|
13 |
+
<tbody>
|
14 |
+
<tr>
|
15 |
+
<th scope="row"><label
|
16 |
+
for="user_prefix"><?php _e('Username prefix on register', 'nextend-facebook-connect'); ?></label>
|
17 |
+
</th>
|
18 |
+
<td><input name="user_prefix" type="text" id="user_prefix"
|
19 |
+
value="<?php echo esc_attr($settings->get('user_prefix')); ?>" class="regular-text"></td>
|
20 |
+
</tr>
|
21 |
+
<tr>
|
22 |
+
<th scope="row"><label
|
23 |
+
for="user_fallback"><?php _e('Fallback username prefix on register', 'nextend-facebook-connect'); ?></label>
|
24 |
+
</th>
|
25 |
+
<td><input name="user_fallback" type="text" id="user_fallback"
|
26 |
+
value="<?php echo esc_attr($settings->get('user_fallback')); ?>" class="regular-text">
|
27 |
+
<p class="description" id="tagline-user_fallback"><?php _e('Used when username is invalid or not stored', 'nextend-facebook-connect'); ?></p>
|
28 |
+
</td>
|
29 |
+
</tr>
|
30 |
+
<?php if (NextendSocialLogin::$settings->get('terms_show') == 1): ?>
|
31 |
+
<tr>
|
32 |
+
<th scope="row"><?php _e('Terms and conditions', 'nextend-facebook-connect'); ?></th>
|
33 |
+
<td>
|
34 |
+
<?php
|
35 |
+
$terms = $settings->get('terms');
|
36 |
+
$hasOverriddenTerms = !empty($terms);
|
37 |
+
?>
|
38 |
+
<fieldset>
|
39 |
+
<label for="terms_override">
|
40 |
+
<input type="hidden" name="terms_override" value="0">
|
41 |
+
<input type="checkbox" name="terms_override" id="terms_override"
|
42 |
+
value="1" <?php if ($hasOverriddenTerms) : ?> checked="checked" <?php endif; ?>>
|
43 |
+
<?php printf(__('Override global "%1$s"', 'nextend-facebook-connect'), __('Terms and conditions', 'nextend-facebook-connect')); ?>
|
44 |
+
</label>
|
45 |
+
|
46 |
+
<div id="nsl-terms" <?php if (!$hasOverriddenTerms) : ?> style="display:none;" <?php endif; ?>>
|
47 |
+
<?php
|
48 |
+
wp_editor($terms, 'terms', array(
|
49 |
+
'textarea_rows' => 4,
|
50 |
+
'media_buttons' => false
|
51 |
+
));
|
52 |
+
?>
|
53 |
+
</div>
|
54 |
+
</fieldset>
|
55 |
+
<script type="text/javascript">
|
56 |
+
(function ($) {
|
57 |
+
|
58 |
+
$(document).ready(function () {
|
59 |
+
$('#terms_override').on('change', function () {
|
60 |
+
if ($(this).is(':checked')) {
|
61 |
+
$('#nsl-terms').css('display', '');
|
62 |
+
} else {
|
63 |
+
$('#nsl-terms').css('display', 'none');
|
64 |
+
}
|
65 |
+
});
|
66 |
+
});
|
67 |
+
})(jQuery);
|
68 |
+
</script>
|
69 |
+
</td>
|
70 |
+
</tr>
|
71 |
+
<?php endif; ?>
|
72 |
+
</tbody>
|
73 |
</table>
|
admin/templates-provider/settings-pro.php
CHANGED
@@ -1,141 +1,141 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
/** @var $this NextendSocialProviderAdmin */
|
4 |
-
|
5 |
-
$provider = $this->getProvider();
|
6 |
-
|
7 |
-
$settings = $provider->settings;
|
8 |
-
|
9 |
-
$isPRO = apply_filters('nsl-pro', false);
|
10 |
-
|
11 |
-
$attr = '';
|
12 |
-
if (!$isPRO) {
|
13 |
-
$attr = ' disabled ';
|
14 |
-
}
|
15 |
-
?>
|
16 |
-
|
17 |
-
<hr/>
|
18 |
-
<h1><?php _e('PRO settings', 'nextend-facebook-connect'); ?></h1>
|
19 |
-
|
20 |
-
|
21 |
-
<?php
|
22 |
-
NextendSocialLoginAdmin::showProBox();
|
23 |
-
?>
|
24 |
-
<input type="hidden" name="tested" id="tested" value="<?php echo esc_attr($settings->get('tested')); ?>"/>
|
25 |
-
<table class="form-table" <?php if (!$isPRO): ?> style="opacity:0.5;"<?php endif; ?>>
|
26 |
-
<tbody>
|
27 |
-
<tr>
|
28 |
-
<th scope="row"><?php _e('Ask E-mail on registration', 'nextend-facebook-connect'); ?></th>
|
29 |
-
<td>
|
30 |
-
<fieldset>
|
31 |
-
<legend class="screen-reader-text">
|
32 |
-
<span><?php _e('Ask E-mail on registration', 'nextend-facebook-connect'); ?></span></legend>
|
33 |
-
<label><input type="radio" name="ask_email"
|
34 |
-
value="never" <?php if ($settings->get('ask_email') == 'never') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
35 |
-
<span><?php _e('Never', 'nextend-facebook-connect'); ?></span></label><br>
|
36 |
-
<label><input type="radio" name="ask_email"
|
37 |
-
value="when-empty" <?php if ($settings->get('ask_email') == 'when-empty') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
38 |
-
<span><?php _e('When email is not provided or empty', 'nextend-facebook-connect'); ?></span></label><br>
|
39 |
-
<label><input type="radio" name="ask_email"
|
40 |
-
value="always" <?php if ($settings->get('ask_email') == 'always') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
41 |
-
<span><?php _e('Always', 'nextend-facebook-connect'); ?></span></label><br>
|
42 |
-
</fieldset>
|
43 |
-
</td>
|
44 |
-
</tr>
|
45 |
-
<tr>
|
46 |
-
<th scope="row"><?php _e('Ask Username on registration', 'nextend-facebook-connect'); ?></th>
|
47 |
-
<td>
|
48 |
-
<fieldset>
|
49 |
-
<legend class="screen-reader-text">
|
50 |
-
<span><?php _e('Ask Username on registration', 'nextend-facebook-connect'); ?></span></legend>
|
51 |
-
<label><input type="radio" name="ask_user"
|
52 |
-
value="never" <?php if ($settings->get('ask_user') == 'never') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
53 |
-
<span><?php _e('Never, generate automatically', 'nextend-facebook-connect'); ?></span></label><br>
|
54 |
-
<label><input type="radio" name="ask_user"
|
55 |
-
value="when-empty" <?php if ($settings->get('ask_user') == 'when-empty') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
56 |
-
<span><?php _e('When username is empty or invalid', 'nextend-facebook-connect'); ?></span></label><br>
|
57 |
-
<label><input type="radio" name="ask_user"
|
58 |
-
value="always" <?php if ($settings->get('ask_user') == 'always') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
59 |
-
<span><?php _e('Always', 'nextend-facebook-connect'); ?></span></label><br>
|
60 |
-
</fieldset>
|
61 |
-
</td>
|
62 |
-
</tr>
|
63 |
-
<tr>
|
64 |
-
<th scope="row"><?php _e('Ask Password on registration', 'nextend-facebook-connect'); ?></th>
|
65 |
-
<td>
|
66 |
-
<fieldset>
|
67 |
-
<label><input type="radio" name="ask_password"
|
68 |
-
value="never" <?php if ($settings->get('ask_password') == 'never') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
69 |
-
<span><?php _e('Never', 'nextend-facebook-connect'); ?></span></label><br>
|
70 |
-
<label><input type="radio" name="ask_password"
|
71 |
-
value="always" <?php if ($settings->get('ask_password') == 'always') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
72 |
-
<span><?php _e('Always', 'nextend-facebook-connect'); ?></span></label><br>
|
73 |
-
</fieldset>
|
74 |
-
</td>
|
75 |
-
</tr>
|
76 |
-
<tr>
|
77 |
-
<th scope="row"><?php _e('Automatically connect the existing account upon registration', 'nextend-facebook-connect'); ?></th>
|
78 |
-
<td>
|
79 |
-
<fieldset>
|
80 |
-
<legend class="screen-reader-text">
|
81 |
-
<span><?php _e('Automatically connect the existing account upon registration', 'nextend-facebook-connect'); ?></span>
|
82 |
-
</legend>
|
83 |
-
<label><input type="radio" name="auto_link"
|
84 |
-
value="disabled" <?php if ($settings->get('auto_link') == 'disabled') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
85 |
-
<span><?php _e('Disabled', 'nextend-facebook-connect'); ?></span></label><br>
|
86 |
-
<label><input type="radio" name="auto_link"
|
87 |
-
value="email" <?php if ($settings->get('auto_link') == 'email') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
88 |
-
<span><?php _e('Automatic, based on email address', 'nextend-facebook-connect'); ?></span></label><br>
|
89 |
-
</fieldset>
|
90 |
-
</td>
|
91 |
-
</tr>
|
92 |
-
<tr>
|
93 |
-
<th scope="row"><?php _e('Disable login for the selected roles', 'nextend-facebook-connect'); ?></th>
|
94 |
-
<td>
|
95 |
-
|
96 |
-
$wp_roles = new WP_Roles();
|
97 |
-
$roles = $wp_roles->get_names();
|
98 |
-
|
99 |
-
$disable_roles = $settings->get('disabled_roles');
|
100 |
-
foreach ($roles AS $roleKey => $label):
|
101 |
-
?>
|
102 |
-
<fieldset><label for="disabled_roles_<?php echo esc_attr($roleKey); ?>">
|
103 |
-
<input name="disabled_roles[]" type="checkbox"
|
104 |
-
id="disabled_roles_<?php echo esc_attr($roleKey); ?>"
|
105 |
-
value="<?php echo esc_attr($roleKey); ?>" <?php if (in_array($roleKey, $disable_roles)) : ?> checked <?php endif ?> <?php echo $attr; ?> />
|
106 |
-
<?php echo $label; ?></label>
|
107 |
-
</fieldset>
|
108 |
-
<?php endforeach; ?>
|
109 |
-
<input type="hidden" name="disabled_roles[]" value=""/>
|
110 |
-
</td>
|
111 |
-
</tr>
|
112 |
-
<tr>
|
113 |
-
<th scope="row"><?php _e('Default roles for user who registered with this provider', 'nextend-facebook-connect'); ?></th>
|
114 |
-
<td>
|
115 |
-
|
116 |
-
$register_roles = $settings->get('register_roles');
|
117 |
-
?>
|
118 |
-
<fieldset><label for="register_roles_default">
|
119 |
-
<input name="register_roles[]" type="checkbox" id="register_roles_default"
|
120 |
-
value="default" <?php if (in_array('default', $register_roles)) : ?> checked <?php endif ?> <?php echo $attr; ?> />
|
121 |
-
<?php _e('Default', 'nextend-facebook-connect'); ?></label>
|
122 |
-
</fieldset>
|
123 |
-
<?php
|
124 |
-
foreach ($roles AS $roleKey => $label):
|
125 |
-
?>
|
126 |
-
<fieldset><label for="register_roles_<?php echo esc_attr($roleKey); ?>">
|
127 |
-
<input name="register_roles[]" type="checkbox"
|
128 |
-
id="register_roles_<?php echo esc_attr($roleKey); ?>"
|
129 |
-
value="<?php echo esc_attr($roleKey); ?>" <?php if (in_array($roleKey, $register_roles)) : ?> checked <?php endif ?> <?php echo $attr; ?> />
|
130 |
-
<?php echo $label; ?></label>
|
131 |
-
</fieldset>
|
132 |
-
<?php endforeach; ?>
|
133 |
-
<input type="hidden" name="register_roles[]" value=""/>
|
134 |
-
</td>
|
135 |
-
</tr>
|
136 |
-
</tbody>
|
137 |
-
</table>
|
138 |
-
<?php if ($isPRO): ?>
|
139 |
-
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
140 |
-
value="<?php _e('Save Changes'); ?>"></p>
|
141 |
<?php endif; ?>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
/** @var $this NextendSocialProviderAdmin */
|
4 |
+
|
5 |
+
$provider = $this->getProvider();
|
6 |
+
|
7 |
+
$settings = $provider->settings;
|
8 |
+
|
9 |
+
$isPRO = apply_filters('nsl-pro', false);
|
10 |
+
|
11 |
+
$attr = '';
|
12 |
+
if (!$isPRO) {
|
13 |
+
$attr = ' disabled ';
|
14 |
+
}
|
15 |
+
?>
|
16 |
+
|
17 |
+
<hr/>
|
18 |
+
<h1><?php _e('PRO settings', 'nextend-facebook-connect'); ?></h1>
|
19 |
+
|
20 |
+
|
21 |
+
<?php
|
22 |
+
NextendSocialLoginAdmin::showProBox();
|
23 |
+
?>
|
24 |
+
<input type="hidden" name="tested" id="tested" value="<?php echo esc_attr($settings->get('tested')); ?>"/>
|
25 |
+
<table class="form-table" <?php if (!$isPRO): ?> style="opacity:0.5;"<?php endif; ?>>
|
26 |
+
<tbody>
|
27 |
+
<tr>
|
28 |
+
<th scope="row"><?php _e('Ask E-mail on registration', 'nextend-facebook-connect'); ?></th>
|
29 |
+
<td>
|
30 |
+
<fieldset>
|
31 |
+
<legend class="screen-reader-text">
|
32 |
+
<span><?php _e('Ask E-mail on registration', 'nextend-facebook-connect'); ?></span></legend>
|
33 |
+
<label><input type="radio" name="ask_email"
|
34 |
+
value="never" <?php if ($settings->get('ask_email') == 'never') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
35 |
+
<span><?php _e('Never', 'nextend-facebook-connect'); ?></span></label><br>
|
36 |
+
<label><input type="radio" name="ask_email"
|
37 |
+
value="when-empty" <?php if ($settings->get('ask_email') == 'when-empty') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
38 |
+
<span><?php _e('When email is not provided or empty', 'nextend-facebook-connect'); ?></span></label><br>
|
39 |
+
<label><input type="radio" name="ask_email"
|
40 |
+
value="always" <?php if ($settings->get('ask_email') == 'always') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
41 |
+
<span><?php _e('Always', 'nextend-facebook-connect'); ?></span></label><br>
|
42 |
+
</fieldset>
|
43 |
+
</td>
|
44 |
+
</tr>
|
45 |
+
<tr>
|
46 |
+
<th scope="row"><?php _e('Ask Username on registration', 'nextend-facebook-connect'); ?></th>
|
47 |
+
<td>
|
48 |
+
<fieldset>
|
49 |
+
<legend class="screen-reader-text">
|
50 |
+
<span><?php _e('Ask Username on registration', 'nextend-facebook-connect'); ?></span></legend>
|
51 |
+
<label><input type="radio" name="ask_user"
|
52 |
+
value="never" <?php if ($settings->get('ask_user') == 'never') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
53 |
+
<span><?php _e('Never, generate automatically', 'nextend-facebook-connect'); ?></span></label><br>
|
54 |
+
<label><input type="radio" name="ask_user"
|
55 |
+
value="when-empty" <?php if ($settings->get('ask_user') == 'when-empty') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
56 |
+
<span><?php _e('When username is empty or invalid', 'nextend-facebook-connect'); ?></span></label><br>
|
57 |
+
<label><input type="radio" name="ask_user"
|
58 |
+
value="always" <?php if ($settings->get('ask_user') == 'always') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
59 |
+
<span><?php _e('Always', 'nextend-facebook-connect'); ?></span></label><br>
|
60 |
+
</fieldset>
|
61 |
+
</td>
|
62 |
+
</tr>
|
63 |
+
<tr>
|
64 |
+
<th scope="row"><?php _e('Ask Password on registration', 'nextend-facebook-connect'); ?></th>
|
65 |
+
<td>
|
66 |
+
<fieldset>
|
67 |
+
<label><input type="radio" name="ask_password"
|
68 |
+
value="never" <?php if ($settings->get('ask_password') == 'never') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
69 |
+
<span><?php _e('Never', 'nextend-facebook-connect'); ?></span></label><br>
|
70 |
+
<label><input type="radio" name="ask_password"
|
71 |
+
value="always" <?php if ($settings->get('ask_password') == 'always') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
72 |
+
<span><?php _e('Always', 'nextend-facebook-connect'); ?></span></label><br>
|
73 |
+
</fieldset>
|
74 |
+
</td>
|
75 |
+
</tr>
|
76 |
+
<tr>
|
77 |
+
<th scope="row"><?php _e('Automatically connect the existing account upon registration', 'nextend-facebook-connect'); ?></th>
|
78 |
+
<td>
|
79 |
+
<fieldset>
|
80 |
+
<legend class="screen-reader-text">
|
81 |
+
<span><?php _e('Automatically connect the existing account upon registration', 'nextend-facebook-connect'); ?></span>
|
82 |
+
</legend>
|
83 |
+
<label><input type="radio" name="auto_link"
|
84 |
+
value="disabled" <?php if ($settings->get('auto_link') == 'disabled') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
85 |
+
<span><?php _e('Disabled', 'nextend-facebook-connect'); ?></span></label><br>
|
86 |
+
<label><input type="radio" name="auto_link"
|
87 |
+
value="email" <?php if ($settings->get('auto_link') == 'email') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
88 |
+
<span><?php _e('Automatic, based on email address', 'nextend-facebook-connect'); ?></span></label><br>
|
89 |
+
</fieldset>
|
90 |
+
</td>
|
91 |
+
</tr>
|
92 |
+
<tr>
|
93 |
+
<th scope="row"><?php _e('Disable login for the selected roles', 'nextend-facebook-connect'); ?></th>
|
94 |
+
<td>
|
95 |
+
<?php
|
96 |
+
$wp_roles = new WP_Roles();
|
97 |
+
$roles = $wp_roles->get_names();
|
98 |
+
|
99 |
+
$disable_roles = $settings->get('disabled_roles');
|
100 |
+
foreach ($roles AS $roleKey => $label):
|
101 |
+
?>
|
102 |
+
<fieldset><label for="disabled_roles_<?php echo esc_attr($roleKey); ?>">
|
103 |
+
<input name="disabled_roles[]" type="checkbox"
|
104 |
+
id="disabled_roles_<?php echo esc_attr($roleKey); ?>"
|
105 |
+
value="<?php echo esc_attr($roleKey); ?>" <?php if (in_array($roleKey, $disable_roles)) : ?> checked <?php endif ?> <?php echo $attr; ?> />
|
106 |
+
<?php echo $label; ?></label>
|
107 |
+
</fieldset>
|
108 |
+
<?php endforeach; ?>
|
109 |
+
<input type="hidden" name="disabled_roles[]" value=""/>
|
110 |
+
</td>
|
111 |
+
</tr>
|
112 |
+
<tr>
|
113 |
+
<th scope="row"><?php _e('Default roles for user who registered with this provider', 'nextend-facebook-connect'); ?></th>
|
114 |
+
<td>
|
115 |
+
<?php
|
116 |
+
$register_roles = $settings->get('register_roles');
|
117 |
+
?>
|
118 |
+
<fieldset><label for="register_roles_default">
|
119 |
+
<input name="register_roles[]" type="checkbox" id="register_roles_default"
|
120 |
+
value="default" <?php if (in_array('default', $register_roles)) : ?> checked <?php endif ?> <?php echo $attr; ?> />
|
121 |
+
<?php _e('Default', 'nextend-facebook-connect'); ?></label>
|
122 |
+
</fieldset>
|
123 |
+
<?php
|
124 |
+
foreach ($roles AS $roleKey => $label):
|
125 |
+
?>
|
126 |
+
<fieldset><label for="register_roles_<?php echo esc_attr($roleKey); ?>">
|
127 |
+
<input name="register_roles[]" type="checkbox"
|
128 |
+
id="register_roles_<?php echo esc_attr($roleKey); ?>"
|
129 |
+
value="<?php echo esc_attr($roleKey); ?>" <?php if (in_array($roleKey, $register_roles)) : ?> checked <?php endif ?> <?php echo $attr; ?> />
|
130 |
+
<?php echo $label; ?></label>
|
131 |
+
</fieldset>
|
132 |
+
<?php endforeach; ?>
|
133 |
+
<input type="hidden" name="register_roles[]" value=""/>
|
134 |
+
</td>
|
135 |
+
</tr>
|
136 |
+
</tbody>
|
137 |
+
</table>
|
138 |
+
<?php if ($isPRO): ?>
|
139 |
+
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
140 |
+
value="<?php _e('Save Changes'); ?>"></p>
|
141 |
<?php endif; ?>
|
admin/templates-provider/sync-data.php
CHANGED
@@ -1,126 +1,126 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
/** @var $this NextendSocialProviderAdmin */
|
4 |
-
|
5 |
-
$provider = $this->getProvider();
|
6 |
-
|
7 |
-
$settings = $provider->settings;
|
8 |
-
|
9 |
-
$isPRO = apply_filters('nsl-pro', false);
|
10 |
-
|
11 |
-
$attr = '';
|
12 |
-
if (!$isPRO) {
|
13 |
-
$attr = ' disabled ';
|
14 |
-
}
|
15 |
-
?>
|
16 |
-
|
17 |
-
<div class="nsl-admin-sub-content">
|
18 |
-
|
19 |
-
<?php
|
20 |
-
NextendSocialLoginAdmin::showProBox();
|
21 |
-
?>
|
22 |
-
|
23 |
-
<form method="post" action="<?php echo admin_url('admin-post.php'); ?>" novalidate="novalidate">
|
24 |
-
|
25 |
-
|
26 |
-
<input type="hidden" name="action" value="nextend-social-login"/>
|
27 |
-
<input type="hidden" name="view" value="provider-<?php echo $provider->getId(); ?>"/>
|
28 |
-
<input type="hidden" name="subview" value="sync-data"/>
|
29 |
-
<input type="hidden" name="settings_saved" value="1"/>
|
30 |
-
|
31 |
-
<?php
|
32 |
-
$sync_warning_message = apply_filters('nsl_' . $provider->getId() . '_sync_warning', false);
|
33 |
-
if (!empty($sync_warning_message)): ?>
|
34 |
-
<div class="notice notice-warning">
|
35 |
-
<p>
|
36 |
-
<?php echo $sync_warning_message; ?>
|
37 |
-
</p>
|
38 |
-
</div>
|
39 |
-
<?php endif; ?>
|
40 |
-
|
41 |
-
<table class="form-table">
|
42 |
-
<tbody>
|
43 |
-
<tr>
|
44 |
-
<th scope="row"><label>Sync fields</label></th>
|
45 |
-
<td>
|
46 |
-
<fieldset>
|
47 |
-
<label for="sync_fields_register">
|
48 |
-
<input type="checkbox" id="sync_fields_register"
|
49 |
-
value="1" checked disabled/>
|
50 |
-
<?php _e('Register', 'nextend-facebook-connect'); ?>
|
51 |
-
</label>
|
52 |
-
</fieldset>
|
53 |
-
<fieldset>
|
54 |
-
<label for="sync_fields_login">
|
55 |
-
<input name="sync_fields[login]" type="hidden" value="0"/>
|
56 |
-
<input name="sync_fields[login]" type="checkbox" id="sync_fields_login"
|
57 |
-
value="1" <?php if ($settings->get('sync_fields/login')): ?> checked<?php endif; ?> <?php echo $attr; ?>/>
|
58 |
-
<?php _e('Login', 'nextend-facebook-connect'); ?>
|
59 |
-
</label>
|
60 |
-
</fieldset>
|
61 |
-
<fieldset>
|
62 |
-
<label for="sync_fields_link">
|
63 |
-
<input name="sync_fields[link]" type="hidden" value="0"/>
|
64 |
-
<input name="sync_fields[link]" type="checkbox" id="sync_fields_link"
|
65 |
-
value="1" <?php if ($settings->get('sync_fields/link')): ?> checked<?php endif; ?> <?php echo $attr; ?>/>
|
66 |
-
<?php _e('Link', 'nextend-facebook-connect'); ?>
|
67 |
-
</label>
|
68 |
-
</fieldset>
|
69 |
-
</td>
|
70 |
-
</tr>
|
71 |
-
<?php
|
72 |
-
|
73 |
-
$syncFields = $provider->getSyncFields();
|
74 |
-
foreach ($syncFields AS $fieldName => $fieldData):
|
75 |
-
?>
|
76 |
-
<tr>
|
77 |
-
<th scope="row"><label for="sync_fields_locale"><?php echo $fieldData['label']; ?></label></th>
|
78 |
-
<td>
|
79 |
-
<fieldset>
|
80 |
-
<label for="sync_fields_<?php echo $fieldName; ?>_enabled">
|
81 |
-
<input name="sync_fields[fields][<?php echo $fieldName; ?>][enabled]" type="hidden" value="0" <?php echo $attr; ?>/>
|
82 |
-
<input name="sync_fields[fields][<?php echo $fieldName; ?>][enabled]" type="checkbox" id="sync_fields_<?php echo $fieldName; ?>_enabled"
|
83 |
-
value="1" <?php if ($settings->get('sync_fields/fields/' . $fieldName . '/enabled')): ?> checked<?php endif; ?> <?php echo $attr; ?>/>
|
84 |
-
<?php _e('Store in meta key', 'nextend-facebook-connect'); ?>
|
85 |
-
</label>
|
86 |
-
<input name="sync_fields[fields][<?php echo $fieldName; ?>][meta_key]" type="text" id="sync_fields_<?php echo $fieldName; ?>_meta_key"
|
87 |
-
value="<?php echo esc_attr($settings->get('sync_fields/fields/' . $fieldName . '/meta_key')); ?>" class="regular-text" <?php echo $attr; ?>/>
|
88 |
-
</fieldset>
|
89 |
-
<?php
|
90 |
-
$description = $provider->getSyncDataFieldDescription($fieldName);
|
91 |
-
?>
|
92 |
-
<?php if (!empty($description)): ?>
|
93 |
-
<p class="description">
|
94 |
-
<?php echo $description; ?>
|
95 |
-
</p>
|
96 |
-
<?php endif; ?>
|
97 |
-
</td>
|
98 |
-
</tr>
|
99 |
-
<?php endforeach; ?>
|
100 |
-
</tbody>
|
101 |
-
</table>
|
102 |
-
<?php if ($isPRO): ?>
|
103 |
-
<p class="submit">
|
104 |
-
<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e('Save Changes'); ?>">
|
105 |
-
</p>
|
106 |
-
<?php endif; ?>
|
107 |
-
</form>
|
108 |
-
</div>
|
109 |
-
|
110 |
-
<script type="text/javascript">
|
111 |
-
(function ($) {
|
112 |
-
|
113 |
-
$(document).ready(function () {
|
114 |
-
var $checkboxes = $('input[type="checkbox"]');
|
115 |
-
$checkboxes.on('change', function (e) {
|
116 |
-
var $checkbox = $(this);
|
117 |
-
$checkbox.closest('td').toggleClass('nsl-admin-setting-disabled', !$checkbox.is(':checked'));
|
118 |
-
});
|
119 |
-
|
120 |
-
$checkboxes.each(function () {
|
121 |
-
var $checkbox = $(this);
|
122 |
-
$checkbox.closest('td').toggleClass('nsl-admin-setting-disabled', !$checkbox.is(':checked'));
|
123 |
-
});
|
124 |
-
});
|
125 |
-
})(jQuery);
|
126 |
</script>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
/** @var $this NextendSocialProviderAdmin */
|
4 |
+
|
5 |
+
$provider = $this->getProvider();
|
6 |
+
|
7 |
+
$settings = $provider->settings;
|
8 |
+
|
9 |
+
$isPRO = apply_filters('nsl-pro', false);
|
10 |
+
|
11 |
+
$attr = '';
|
12 |
+
if (!$isPRO) {
|
13 |
+
$attr = ' disabled ';
|
14 |
+
}
|
15 |
+
?>
|
16 |
+
|
17 |
+
<div class="nsl-admin-sub-content">
|
18 |
+
|
19 |
+
<?php
|
20 |
+
NextendSocialLoginAdmin::showProBox();
|
21 |
+
?>
|
22 |
+
|
23 |
+
<form method="post" action="<?php echo admin_url('admin-post.php'); ?>" novalidate="novalidate">
|
24 |
+
|
25 |
+
<?php wp_nonce_field('nextend-social-login'); ?>
|
26 |
+
<input type="hidden" name="action" value="nextend-social-login"/>
|
27 |
+
<input type="hidden" name="view" value="provider-<?php echo $provider->getId(); ?>"/>
|
28 |
+
<input type="hidden" name="subview" value="sync-data"/>
|
29 |
+
<input type="hidden" name="settings_saved" value="1"/>
|
30 |
+
|
31 |
+
<?php
|
32 |
+
$sync_warning_message = apply_filters('nsl_' . $provider->getId() . '_sync_warning', false);
|
33 |
+
if (!empty($sync_warning_message)): ?>
|
34 |
+
<div class="notice notice-warning">
|
35 |
+
<p>
|
36 |
+
<?php echo $sync_warning_message; ?>
|
37 |
+
</p>
|
38 |
+
</div>
|
39 |
+
<?php endif; ?>
|
40 |
+
|
41 |
+
<table class="form-table">
|
42 |
+
<tbody>
|
43 |
+
<tr>
|
44 |
+
<th scope="row"><label>Sync fields</label></th>
|
45 |
+
<td>
|
46 |
+
<fieldset>
|
47 |
+
<label for="sync_fields_register">
|
48 |
+
<input type="checkbox" id="sync_fields_register"
|
49 |
+
value="1" checked disabled/>
|
50 |
+
<?php _e('Register', 'nextend-facebook-connect'); ?>
|
51 |
+
</label>
|
52 |
+
</fieldset>
|
53 |
+
<fieldset>
|
54 |
+
<label for="sync_fields_login">
|
55 |
+
<input name="sync_fields[login]" type="hidden" value="0"/>
|
56 |
+
<input name="sync_fields[login]" type="checkbox" id="sync_fields_login"
|
57 |
+
value="1" <?php if ($settings->get('sync_fields/login')): ?> checked<?php endif; ?> <?php echo $attr; ?>/>
|
58 |
+
<?php _e('Login', 'nextend-facebook-connect'); ?>
|
59 |
+
</label>
|
60 |
+
</fieldset>
|
61 |
+
<fieldset>
|
62 |
+
<label for="sync_fields_link">
|
63 |
+
<input name="sync_fields[link]" type="hidden" value="0"/>
|
64 |
+
<input name="sync_fields[link]" type="checkbox" id="sync_fields_link"
|
65 |
+
value="1" <?php if ($settings->get('sync_fields/link')): ?> checked<?php endif; ?> <?php echo $attr; ?>/>
|
66 |
+
<?php _e('Link', 'nextend-facebook-connect'); ?>
|
67 |
+
</label>
|
68 |
+
</fieldset>
|
69 |
+
</td>
|
70 |
+
</tr>
|
71 |
+
<?php
|
72 |
+
|
73 |
+
$syncFields = $provider->getSyncFields();
|
74 |
+
foreach ($syncFields AS $fieldName => $fieldData):
|
75 |
+
?>
|
76 |
+
<tr>
|
77 |
+
<th scope="row"><label for="sync_fields_locale"><?php echo $fieldData['label']; ?></label></th>
|
78 |
+
<td>
|
79 |
+
<fieldset>
|
80 |
+
<label for="sync_fields_<?php echo $fieldName; ?>_enabled">
|
81 |
+
<input name="sync_fields[fields][<?php echo $fieldName; ?>][enabled]" type="hidden" value="0" <?php echo $attr; ?>/>
|
82 |
+
<input name="sync_fields[fields][<?php echo $fieldName; ?>][enabled]" type="checkbox" id="sync_fields_<?php echo $fieldName; ?>_enabled"
|
83 |
+
value="1" <?php if ($settings->get('sync_fields/fields/' . $fieldName . '/enabled')): ?> checked<?php endif; ?> <?php echo $attr; ?>/>
|
84 |
+
<?php _e('Store in meta key', 'nextend-facebook-connect'); ?>
|
85 |
+
</label>
|
86 |
+
<input name="sync_fields[fields][<?php echo $fieldName; ?>][meta_key]" type="text" id="sync_fields_<?php echo $fieldName; ?>_meta_key"
|
87 |
+
value="<?php echo esc_attr($settings->get('sync_fields/fields/' . $fieldName . '/meta_key')); ?>" class="regular-text" <?php echo $attr; ?>/>
|
88 |
+
</fieldset>
|
89 |
+
<?php
|
90 |
+
$description = $provider->getSyncDataFieldDescription($fieldName);
|
91 |
+
?>
|
92 |
+
<?php if (!empty($description)): ?>
|
93 |
+
<p class="description">
|
94 |
+
<?php echo $description; ?>
|
95 |
+
</p>
|
96 |
+
<?php endif; ?>
|
97 |
+
</td>
|
98 |
+
</tr>
|
99 |
+
<?php endforeach; ?>
|
100 |
+
</tbody>
|
101 |
+
</table>
|
102 |
+
<?php if ($isPRO): ?>
|
103 |
+
<p class="submit">
|
104 |
+
<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e('Save Changes'); ?>">
|
105 |
+
</p>
|
106 |
+
<?php endif; ?>
|
107 |
+
</form>
|
108 |
+
</div>
|
109 |
+
|
110 |
+
<script type="text/javascript">
|
111 |
+
(function ($) {
|
112 |
+
|
113 |
+
$(document).ready(function () {
|
114 |
+
var $checkboxes = $('input[type="checkbox"]');
|
115 |
+
$checkboxes.on('change', function (e) {
|
116 |
+
var $checkbox = $(this);
|
117 |
+
$checkbox.closest('td').toggleClass('nsl-admin-setting-disabled', !$checkbox.is(':checked'));
|
118 |
+
});
|
119 |
+
|
120 |
+
$checkboxes.each(function () {
|
121 |
+
var $checkbox = $(this);
|
122 |
+
$checkbox.closest('td').toggleClass('nsl-admin-setting-disabled', !$checkbox.is(':checked'));
|
123 |
+
});
|
124 |
+
});
|
125 |
+
})(jQuery);
|
126 |
</script>
|
admin/templates-provider/usage.php
CHANGED
@@ -1,47 +1,47 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
/** @var $this NextendSocialProviderAdmin */
|
4 |
-
|
5 |
-
$provider = $this->getProvider();
|
6 |
-
?>
|
7 |
-
<div class="nsl-admin-sub-content">
|
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]',
|
20 |
-
'[nextend_social_login provider="' . $provider->getId() . '"]',
|
21 |
-
'[nextend_social_login provider="' . $provider->getId() . '" style="icon"]',
|
22 |
-
'[nextend_social_login provider="' . $provider->getId() . '" style="icon" redirect="https://nextendweb.com/"]',
|
23 |
-
'[nextend_social_login trackerdata="source"]'
|
24 |
-
);
|
25 |
-
?>
|
26 |
-
|
27 |
-
<textarea readonly cols="160" rows="6" class="nextend-html-editor-readonly"
|
28 |
-
aria-describedby="editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"><?php echo implode("\n\n", $shortcodes); ?></textarea>
|
29 |
-
|
30 |
-
|
31 |
-
<h4><?php _e('Simple link', 'nextend-facebook-connect'); ?></h4>
|
32 |
-
|
33 |
-
<?php
|
34 |
-
$html = '<a href="' . $provider->getLoginUrl() . '" data-plugin="nsl" data-action="connect" data-redirect="current" data-provider="' . esc_attr($provider->getId()) . '" data-popupwidth="' . $provider->getPopupWidth() . '" data-popupheight="' . $provider->getPopupHeight() . '">' . "\n\t" . __('Click here to login or register', 'nextend-facebook-connect') . "\n" . '</a>';
|
35 |
-
?>
|
36 |
-
<textarea readonly cols="160" rows="6" class="nextend-html-editor-readonly"
|
37 |
-
aria-describedby="editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"><?php echo esc_textarea($html); ?></textarea>
|
38 |
-
|
39 |
-
<h4><?php _e('Image button', 'nextend-facebook-connect'); ?></h4>
|
40 |
-
|
41 |
-
<?php
|
42 |
-
$html = '<a href="' . $provider->getLoginUrl() . '" data-plugin="nsl" data-action="connect" data-redirect="current" data-provider="' . esc_attr($provider->getId()) . '" data-popupwidth="' . $provider->getPopupWidth() . '" data-popupheight="' . $provider->getPopupHeight() . '">' . "\n\t" . '<img src="' . __('Image url', 'nextend-facebook-connect') . '" alt="" />' . "\n" . '</a>';
|
43 |
-
?>
|
44 |
-
<textarea readonly cols="160" rows="6" class="nextend-html-editor-readonly"
|
45 |
-
aria-describedby="editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"><?php echo esc_textarea($html); ?></textarea>
|
46 |
-
|
47 |
-
</div>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
/** @var $this NextendSocialProviderAdmin */
|
4 |
+
|
5 |
+
$provider = $this->getProvider();
|
6 |
+
?>
|
7 |
+
<div class="nsl-admin-sub-content">
|
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]',
|
20 |
+
'[nextend_social_login provider="' . $provider->getId() . '"]',
|
21 |
+
'[nextend_social_login provider="' . $provider->getId() . '" style="icon"]',
|
22 |
+
'[nextend_social_login provider="' . $provider->getId() . '" style="icon" redirect="https://nextendweb.com/"]',
|
23 |
+
'[nextend_social_login trackerdata="source"]'
|
24 |
+
);
|
25 |
+
?>
|
26 |
+
|
27 |
+
<textarea readonly cols="160" rows="6" class="nextend-html-editor-readonly"
|
28 |
+
aria-describedby="editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"><?php echo implode("\n\n", $shortcodes); ?></textarea>
|
29 |
+
|
30 |
+
|
31 |
+
<h4><?php _e('Simple link', 'nextend-facebook-connect'); ?></h4>
|
32 |
+
|
33 |
+
<?php
|
34 |
+
$html = '<a href="' . $provider->getLoginUrl() . '" data-plugin="nsl" data-action="connect" data-redirect="current" data-provider="' . esc_attr($provider->getId()) . '" data-popupwidth="' . $provider->getPopupWidth() . '" data-popupheight="' . $provider->getPopupHeight() . '">' . "\n\t" . __('Click here to login or register', 'nextend-facebook-connect') . "\n" . '</a>';
|
35 |
+
?>
|
36 |
+
<textarea readonly cols="160" rows="6" class="nextend-html-editor-readonly"
|
37 |
+
aria-describedby="editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"><?php echo esc_textarea($html); ?></textarea>
|
38 |
+
|
39 |
+
<h4><?php _e('Image button', 'nextend-facebook-connect'); ?></h4>
|
40 |
+
|
41 |
+
<?php
|
42 |
+
$html = '<a href="' . $provider->getLoginUrl() . '" data-plugin="nsl" data-action="connect" data-redirect="current" data-provider="' . esc_attr($provider->getId()) . '" data-popupwidth="' . $provider->getPopupWidth() . '" data-popupheight="' . $provider->getPopupHeight() . '">' . "\n\t" . '<img src="' . __('Image url', 'nextend-facebook-connect') . '" alt="" />' . "\n" . '</a>';
|
43 |
+
?>
|
44 |
+
<textarea readonly cols="160" rows="6" class="nextend-html-editor-readonly"
|
45 |
+
aria-describedby="editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"><?php echo esc_textarea($html); ?></textarea>
|
46 |
+
|
47 |
+
</div>
|
admin/templates/debug.php
CHANGED
@@ -1,66 +1,66 @@
|
|
1 |
-
<div class="nsl-admin-content">
|
2 |
-
<style>
|
3 |
-
.nsl-admin-notices {
|
4 |
-
display: none;
|
5 |
-
}
|
6 |
-
</style>
|
7 |
-
<h1 class="title"><?php _e('Debug', 'nextend-facebook-connect'); ?></h1>
|
8 |
-
<?php
|
9 |
-
|
10 |
-
|
11 |
-
if (NextendSocialLoginAdmin::isPro()) {
|
12 |
-
$activation_data = NextendSocialLogin::getLicense();
|
13 |
-
|
14 |
-
$proAddonState = NextendSocialLoginAdmin::getProState();
|
15 |
-
echo "<p><b>Pro Addon State</b>: " . $proAddonState . "</p>";
|
16 |
-
|
17 |
-
echo "<p><b>Authorized Domain</b>: " . $activation_data['domain'] . "</p>";
|
18 |
-
|
19 |
-
$currentDomain = NextendSocialLogin::getDomain();
|
20 |
-
echo "<p><b>Current Domain</b>: " . $currentDomain . "</p><br>";
|
21 |
-
|
22 |
-
$licenseKey = substr($activation_data['license_key'], 0, 8);
|
23 |
-
echo "<p><b>License Key</b>: " . $licenseKey . "...</p>";
|
24 |
-
|
25 |
-
$isLicenseKeyOk = NextendSocialLogin::hasLicense();
|
26 |
-
echo "<p><b>License Key OK</b>: " . (boolval($isLicenseKeyOk) ? 'Yes' : 'No') . "</p><br>";
|
27 |
-
}
|
28 |
-
|
29 |
-
$defaultRedirect = NextendSocialLogin::$settings->get('default_redirect');
|
30 |
-
echo "<p><b>Default Redirect URL</b>: " . $defaultRedirect . "</p>";
|
31 |
-
|
32 |
-
$defaultRedirectReg = NextendSocialLogin::$settings->get('default_redirect_reg');
|
33 |
-
echo "<p><b>Default Reg Redirect URL</b>: " . $defaultRedirectReg . "</p><br>";
|
34 |
-
|
35 |
-
$fixRedirect = NextendSocialLogin::$settings->get('redirect');
|
36 |
-
echo "<p><b>Fix Redirect URL</b>: " . $fixRedirect . "</p>";
|
37 |
-
|
38 |
-
$fixRedirectReg = NextendSocialLogin::$settings->get('redirect_reg');
|
39 |
-
echo "<p><b>Fix Reg Redirect URL</b>: " . $fixRedirectReg . "</p><br>";
|
40 |
-
|
41 |
-
echo '<h1>' . __('Test network connection with providers', 'nextend-facebook-connect') . '</h1>';
|
42 |
-
|
43 |
-
if (!function_exists('curl_init')) {
|
44 |
-
?>
|
45 |
-
|
46 |
-
<div class="error">
|
47 |
-
<p>
|
48 |
-
<?php _e('You don\'t have cURL support, please enable it in php.ini!', 'nextend-facebook-connect'); ?>
|
49 |
-
</p>
|
50 |
-
</div>
|
51 |
-
|
52 |
-
<?php
|
53 |
-
} else {
|
54 |
-
foreach (NextendSocialLogin::$allowedProviders AS $provider) {
|
55 |
-
?>
|
56 |
-
<p>
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
<?php
|
62 |
-
}
|
63 |
-
}
|
64 |
-
|
65 |
-
?>
|
66 |
</div>
|
1 |
+
<div class="nsl-admin-content">
|
2 |
+
<style>
|
3 |
+
.nsl-admin-notices {
|
4 |
+
display: none;
|
5 |
+
}
|
6 |
+
</style>
|
7 |
+
<h1 class="title"><?php _e('Debug', 'nextend-facebook-connect'); ?></h1>
|
8 |
+
<?php
|
9 |
+
|
10 |
+
|
11 |
+
if (NextendSocialLoginAdmin::isPro()) {
|
12 |
+
$activation_data = NextendSocialLogin::getLicense();
|
13 |
+
|
14 |
+
$proAddonState = NextendSocialLoginAdmin::getProState();
|
15 |
+
echo "<p><b>Pro Addon State</b>: " . $proAddonState . "</p>";
|
16 |
+
|
17 |
+
echo "<p><b>Authorized Domain</b>: " . $activation_data['domain'] . "</p>";
|
18 |
+
|
19 |
+
$currentDomain = NextendSocialLogin::getDomain();
|
20 |
+
echo "<p><b>Current Domain</b>: " . $currentDomain . "</p><br>";
|
21 |
+
|
22 |
+
$licenseKey = substr($activation_data['license_key'], 0, 8);
|
23 |
+
echo "<p><b>License Key</b>: " . $licenseKey . "...</p>";
|
24 |
+
|
25 |
+
$isLicenseKeyOk = NextendSocialLogin::hasLicense();
|
26 |
+
echo "<p><b>License Key OK</b>: " . (boolval($isLicenseKeyOk) ? 'Yes' : 'No') . "</p><br>";
|
27 |
+
}
|
28 |
+
|
29 |
+
$defaultRedirect = NextendSocialLogin::$settings->get('default_redirect');
|
30 |
+
echo "<p><b>Default Redirect URL</b>: " . $defaultRedirect . "</p>";
|
31 |
+
|
32 |
+
$defaultRedirectReg = NextendSocialLogin::$settings->get('default_redirect_reg');
|
33 |
+
echo "<p><b>Default Reg Redirect URL</b>: " . $defaultRedirectReg . "</p><br>";
|
34 |
+
|
35 |
+
$fixRedirect = NextendSocialLogin::$settings->get('redirect');
|
36 |
+
echo "<p><b>Fix Redirect URL</b>: " . $fixRedirect . "</p>";
|
37 |
+
|
38 |
+
$fixRedirectReg = NextendSocialLogin::$settings->get('redirect_reg');
|
39 |
+
echo "<p><b>Fix Reg Redirect URL</b>: " . $fixRedirectReg . "</p><br>";
|
40 |
+
|
41 |
+
echo '<h1>' . __('Test network connection with providers', 'nextend-facebook-connect') . '</h1>';
|
42 |
+
|
43 |
+
if (!function_exists('curl_init')) {
|
44 |
+
?>
|
45 |
+
|
46 |
+
<div class="error">
|
47 |
+
<p>
|
48 |
+
<?php _e('You don\'t have cURL support, please enable it in php.ini!', 'nextend-facebook-connect'); ?>
|
49 |
+
</p>
|
50 |
+
</div>
|
51 |
+
|
52 |
+
<?php
|
53 |
+
} else {
|
54 |
+
foreach (NextendSocialLogin::$allowedProviders AS $provider) {
|
55 |
+
?>
|
56 |
+
<p>
|
57 |
+
<a target="_blank" href="<?php echo add_query_arg('provider', $provider->getId(), NextendSocialLoginAdmin::getAdminUrl('test-connection')); ?>" class="button button-primary">
|
58 |
+
<?php printf(__('Test %1$s connection', 'nextend-facebook-connect'), $provider->getLabel()); ?>
|
59 |
+
</a>
|
60 |
+
</p>
|
61 |
+
<?php
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
?>
|
66 |
</div>
|
admin/templates/fix-redirect-uri.php
CHANGED
@@ -1,36 +1,36 @@
|
|
1 |
-
<div class="nsl-admin-content">
|
2 |
-
<h1 class="title"><?php _e('Fix Oauth Redirect URIs', 'nextend-facebook-connect'); ?></h1>
|
3 |
-
<?php
|
4 |
-
/** @var NextendSocialProvider[] $wrongOauthProviders */
|
5 |
-
$wrongOauthProviders = array();
|
6 |
-
foreach (NextendSocialLogin::$enabledProviders AS $provider) {
|
7 |
-
if (!$provider->checkOauthRedirectUrl()) {
|
8 |
-
$wrongOauthProviders[] = $provider;
|
9 |
-
}
|
10 |
-
}
|
11 |
-
|
12 |
-
if (count($wrongOauthProviders) === 0) {
|
13 |
-
echo '<div class="updated"><p>' . __('Every Oauth Redirect URI seems fine', 'nextend-facebook-connect') . '</p></div>';
|
14 |
-
|
15 |
-
foreach (NextendSocialLogin::$enabledProviders AS $provider) {
|
16 |
-
$provider->getAdmin()
|
17 |
-
->renderOauthChangedInstruction();
|
18 |
-
}
|
19 |
-
} else {
|
20 |
-
?>
|
21 |
-
<p><?php printf(__('%s detected that your login url changed. You must update the Oauth redirect URIs in the related social applications.', 'nextend-facebook-connect'), '<b>Nextend Social Login</b>'); ?></p>
|
22 |
-
|
23 |
-
<?php
|
24 |
-
foreach ($wrongOauthProviders AS $provider) {
|
25 |
-
$provider->getAdmin()
|
26 |
-
->renderOauthChangedInstruction();
|
27 |
-
}
|
28 |
-
?>
|
29 |
-
|
30 |
-
|
31 |
-
<a href="<?php echo wp_nonce_url(NextendSocialLoginAdmin::getAdminUrl('update_oauth_redirect_url'), 'nextend-social-login_update_oauth_redirect_url'); ?>" class="button button-primary">
|
32 |
-
<?php _e('Got it', 'nextend-facebook-connect'); ?>
|
33 |
-
</a>
|
34 |
-
|
35 |
-
<?php } ?>
|
36 |
</div>
|
1 |
+
<div class="nsl-admin-content">
|
2 |
+
<h1 class="title"><?php _e('Fix Oauth Redirect URIs', 'nextend-facebook-connect'); ?></h1>
|
3 |
+
<?php
|
4 |
+
/** @var NextendSocialProvider[] $wrongOauthProviders */
|
5 |
+
$wrongOauthProviders = array();
|
6 |
+
foreach (NextendSocialLogin::$enabledProviders AS $provider) {
|
7 |
+
if (!$provider->checkOauthRedirectUrl()) {
|
8 |
+
$wrongOauthProviders[] = $provider;
|
9 |
+
}
|
10 |
+
}
|
11 |
+
|
12 |
+
if (count($wrongOauthProviders) === 0) {
|
13 |
+
echo '<div class="updated"><p>' . __('Every Oauth Redirect URI seems fine', 'nextend-facebook-connect') . '</p></div>';
|
14 |
+
|
15 |
+
foreach (NextendSocialLogin::$enabledProviders AS $provider) {
|
16 |
+
$provider->getAdmin()
|
17 |
+
->renderOauthChangedInstruction();
|
18 |
+
}
|
19 |
+
} else {
|
20 |
+
?>
|
21 |
+
<p><?php printf(__('%s detected that your login url changed. You must update the Oauth redirect URIs in the related social applications.', 'nextend-facebook-connect'), '<b>Nextend Social Login</b>'); ?></p>
|
22 |
+
|
23 |
+
<?php
|
24 |
+
foreach ($wrongOauthProviders AS $provider) {
|
25 |
+
$provider->getAdmin()
|
26 |
+
->renderOauthChangedInstruction();
|
27 |
+
}
|
28 |
+
?>
|
29 |
+
|
30 |
+
|
31 |
+
<a href="<?php echo wp_nonce_url(NextendSocialLoginAdmin::getAdminUrl('update_oauth_redirect_url'), 'nextend-social-login_update_oauth_redirect_url'); ?>" class="button button-primary">
|
32 |
+
<?php _e('Got it', 'nextend-facebook-connect'); ?>
|
33 |
+
</a>
|
34 |
+
|
35 |
+
<?php } ?>
|
36 |
</div>
|
admin/templates/footer.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
?>
|
4 |
</div>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
?>
|
4 |
</div>
|
admin/templates/global-settings.php
CHANGED
@@ -1,60 +1,61 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
|
4 |
-
/** @var $view string */
|
5 |
-
|
6 |
-
$allowedSubviews = array(
|
7 |
-
'general',
|
8 |
-
'privacy',
|
9 |
-
'login-form',
|
10 |
-
'woocommerce',
|
11 |
-
'comment',
|
12 |
-
'buddypress',
|
13 |
-
'memberpress',
|
14 |
-
'userpro',
|
15 |
-
'ultimate-member'
|
16 |
-
);
|
17 |
-
|
18 |
-
$subview = (!empty($_GET['subview']) && in_array($_GET['subview'], $allowedSubviews)) ? $_GET['subview'] : 'general';
|
19 |
-
|
20 |
-
$settings = NextendSocialLogin::$settings;
|
21 |
-
|
22 |
-
$proBadge = '';
|
23 |
-
if (!NextendSocialLoginAdmin::isPro()) {
|
24 |
-
$proBadge = '<span class="nsl-pro-badge">Pro</span>';
|
25 |
-
}
|
26 |
-
?>
|
27 |
-
<div class="nsl-admin-content">
|
28 |
-
<h1><?php _e('Global Settings', 'nextend-facebook-connect'); ?></h1>
|
29 |
-
<div class="nsl-admin-sub-nav-bar">
|
30 |
-
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('general'); ?>"
|
31 |
-
class="nsl-admin-nav-tab<?php if ($subview === 'general'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('General', 'nextend-facebook-connect'); ?></a>
|
32 |
-
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('privacy'); ?>"
|
33 |
-
class="nsl-admin-nav-tab<?php if ($subview === 'privacy'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Privacy', 'nextend-facebook-connect'); ?></a>
|
34 |
-
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('login-form'); ?>"
|
35 |
-
class="nsl-admin-nav-tab<?php if ($subview === 'login-form'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Login Form', 'nextend-facebook-connect'); ?></a>
|
36 |
-
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('woocommerce'); ?>"
|
37 |
-
class="nsl-admin-nav-tab<?php if ($subview === 'woocommerce'): ?> nsl-admin-nav-tab-active<?php endif; ?>">WooCommerce<?php echo $proBadge; ?></a>
|
38 |
-
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('comment'); ?>"
|
39 |
-
class="nsl-admin-nav-tab<?php if ($subview === 'comment'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Comment', 'nextend-facebook-connect'); ?><?php echo $proBadge; ?></a>
|
40 |
-
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('buddypress'); ?>"
|
41 |
-
class="nsl-admin-nav-tab<?php if ($subview === 'buddypress'): ?> nsl-admin-nav-tab-active<?php endif; ?>">BuddyPress<?php echo $proBadge; ?></a>
|
42 |
-
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('memberpress'); ?>"
|
43 |
-
class="nsl-admin-nav-tab<?php if ($subview === 'memberpress'): ?> nsl-admin-nav-tab-active<?php endif; ?>">MemberPress<?php echo $proBadge; ?></a>
|
44 |
-
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('userpro'); ?>"
|
45 |
-
class="nsl-admin-nav-tab<?php if ($subview === 'userpro'): ?> nsl-admin-nav-tab-active<?php endif; ?>">UserPro<?php echo $proBadge; ?></a>
|
46 |
-
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('ultimate-member'); ?>"
|
47 |
-
class="nsl-admin-nav-tab<?php if ($subview === 'ultimate-member'): ?> nsl-admin-nav-tab-active<?php endif; ?>">Ultimate
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
<input type="hidden" name="
|
54 |
-
<input type="hidden" name="
|
55 |
-
<input type="hidden" name="
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
60 |
</div>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
|
4 |
+
/** @var $view string */
|
5 |
+
|
6 |
+
$allowedSubviews = array(
|
7 |
+
'general',
|
8 |
+
'privacy',
|
9 |
+
'login-form',
|
10 |
+
'woocommerce',
|
11 |
+
'comment',
|
12 |
+
'buddypress',
|
13 |
+
'memberpress',
|
14 |
+
'userpro',
|
15 |
+
'ultimate-member'
|
16 |
+
);
|
17 |
+
|
18 |
+
$subview = (!empty($_GET['subview']) && in_array($_GET['subview'], $allowedSubviews)) ? $_GET['subview'] : 'general';
|
19 |
+
|
20 |
+
$settings = NextendSocialLogin::$settings;
|
21 |
+
|
22 |
+
$proBadge = '';
|
23 |
+
if (!NextendSocialLoginAdmin::isPro()) {
|
24 |
+
$proBadge = '<span class="nsl-pro-badge">Pro</span>';
|
25 |
+
}
|
26 |
+
?>
|
27 |
+
<div class="nsl-admin-content">
|
28 |
+
<h1><?php _e('Global Settings', 'nextend-facebook-connect'); ?></h1>
|
29 |
+
<div class="nsl-admin-sub-nav-bar">
|
30 |
+
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('general'); ?>"
|
31 |
+
class="nsl-admin-nav-tab<?php if ($subview === 'general'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('General', 'nextend-facebook-connect'); ?></a>
|
32 |
+
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('privacy'); ?>"
|
33 |
+
class="nsl-admin-nav-tab<?php if ($subview === 'privacy'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Privacy', 'nextend-facebook-connect'); ?></a>
|
34 |
+
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('login-form'); ?>"
|
35 |
+
class="nsl-admin-nav-tab<?php if ($subview === 'login-form'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Login Form', 'nextend-facebook-connect'); ?></a>
|
36 |
+
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('woocommerce'); ?>"
|
37 |
+
class="nsl-admin-nav-tab<?php if ($subview === 'woocommerce'): ?> nsl-admin-nav-tab-active<?php endif; ?>">WooCommerce<?php echo $proBadge; ?></a>
|
38 |
+
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('comment'); ?>"
|
39 |
+
class="nsl-admin-nav-tab<?php if ($subview === 'comment'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Comment', 'nextend-facebook-connect'); ?><?php echo $proBadge; ?></a>
|
40 |
+
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('buddypress'); ?>"
|
41 |
+
class="nsl-admin-nav-tab<?php if ($subview === 'buddypress'): ?> nsl-admin-nav-tab-active<?php endif; ?>">BuddyPress<?php echo $proBadge; ?></a>
|
42 |
+
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('memberpress'); ?>"
|
43 |
+
class="nsl-admin-nav-tab<?php if ($subview === 'memberpress'): ?> nsl-admin-nav-tab-active<?php endif; ?>">MemberPress<?php echo $proBadge; ?></a>
|
44 |
+
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('userpro'); ?>"
|
45 |
+
class="nsl-admin-nav-tab<?php if ($subview === 'userpro'): ?> nsl-admin-nav-tab-active<?php endif; ?>">UserPro<?php echo $proBadge; ?></a>
|
46 |
+
<a href="<?php echo NextendSocialLoginAdmin::getAdminSettingsUrl('ultimate-member'); ?>"
|
47 |
+
class="nsl-admin-nav-tab<?php if ($subview === 'ultimate-member'): ?> nsl-admin-nav-tab-active<?php endif; ?>">Ultimate
|
48 |
+
Member<?php echo $proBadge; ?></a>
|
49 |
+
</div>
|
50 |
+
<form method="post" action="<?php echo admin_url('admin-post.php'); ?>" novalidate="novalidate">
|
51 |
+
|
52 |
+
<?php wp_nonce_field('nextend-social-login'); ?>
|
53 |
+
<input type="hidden" name="action" value="nextend-social-login"/>
|
54 |
+
<input type="hidden" name="view" value="<?php echo esc_attr($view); ?>"/>
|
55 |
+
<input type="hidden" name="subview" value="<?php echo esc_attr($subview); ?>"/>
|
56 |
+
<input type="hidden" name="settings_saved" value="1"/>
|
57 |
+
<?php
|
58 |
+
include(dirname(__FILE__) . '/settings/' . $subview . '.php');
|
59 |
+
?>
|
60 |
+
</form>
|
61 |
</div>
|
admin/templates/header.php
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
?>
|
4 |
-
<div id="nsl-admin">
|
5 |
-
<div class="nsl-admin-header">
|
6 |
-
<h1>
|
7 |
-
<a href="<?php echo NextendSocialLoginAdmin::getAdminUrl(); ?>">
|
8 |
-
<img src="<?php echo plugins_url('images/nsl-logo.png', NSL_ADMIN_PATH) ?>" width="64" height="64"
|
9 |
-
alt="Nextend Social Login"/>
|
10 |
-
Nextend Social Login</a>
|
11 |
-
</h1>
|
12 |
-
|
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'); ?>"
|
20 |
-
class="nsl-admin-header-nav"><?php _e('Debug', 'nextend-facebook-connect'); ?></a>
|
21 |
-
|
22 |
-
<a href="<?php echo NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/social-login/', 'header-menu-pro-addon'); ?>"
|
23 |
-
class="nsl-admin-header-nav" target="_blank"><?php _e('Pro Addon', 'nextend-facebook-connect'); ?></a>
|
24 |
</div>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
?>
|
4 |
+
<div id="nsl-admin">
|
5 |
+
<div class="nsl-admin-header">
|
6 |
+
<h1>
|
7 |
+
<a href="<?php echo NextendSocialLoginAdmin::getAdminUrl(); ?>">
|
8 |
+
<img src="<?php echo plugins_url('images/nsl-logo.png', NSL_ADMIN_PATH) ?>" width="64" height="64"
|
9 |
+
alt="Nextend Social Login"/>
|
10 |
+
Nextend Social Login</a>
|
11 |
+
</h1>
|
12 |
+
|
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'); ?>"
|
20 |
+
class="nsl-admin-header-nav"><?php _e('Debug', 'nextend-facebook-connect'); ?></a>
|
21 |
+
|
22 |
+
<a href="<?php echo NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/social-login/', 'header-menu-pro-addon'); ?>"
|
23 |
+
class="nsl-admin-header-nav" target="_blank"><?php _e('Pro Addon', 'nextend-facebook-connect'); ?></a>
|
24 |
</div>
|
admin/templates/menu.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
<?php
|
2 |
-
/** @var $view string */
|
3 |
-
?>
|
4 |
-
<div class="nsl-admin-nav-bar">
|
5 |
-
<a href="<?php echo NextendSocialLoginAdmin::getAdminUrl(); ?>"
|
6 |
-
class="nsl-admin-nav-tab<?php if ($view === 'providers'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Providers', 'nextend-facebook-connect'); ?></a>
|
7 |
-
<a href="<?php echo NextendSocialLoginAdmin::getAdminUrl('global-settings'); ?>"
|
8 |
-
class="nsl-admin-nav-tab<?php if ($view === 'global-settings'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Global Settings', 'nextend-facebook-connect'); ?></a>
|
9 |
-
|
10 |
-
<?php if ($view === 'pro-addon' || NextendSocialLogin::hasLicense() || defined('NSL_PRO_PATH')): ?>
|
11 |
-
<a href="<?php echo NextendSocialLoginAdmin::getAdminUrl('pro-addon'); ?>"
|
12 |
-
class="nsl-admin-nav-tab<?php if ($view === 'pro-addon'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Pro Addon', 'nextend-facebook-connect'); ?></a>
|
13 |
-
<?php endif; ?>
|
14 |
</div>
|
1 |
+
<?php
|
2 |
+
/** @var $view string */
|
3 |
+
?>
|
4 |
+
<div class="nsl-admin-nav-bar">
|
5 |
+
<a href="<?php echo NextendSocialLoginAdmin::getAdminUrl(); ?>"
|
6 |
+
class="nsl-admin-nav-tab<?php if ($view === 'providers'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Providers', 'nextend-facebook-connect'); ?></a>
|
7 |
+
<a href="<?php echo NextendSocialLoginAdmin::getAdminUrl('global-settings'); ?>"
|
8 |
+
class="nsl-admin-nav-tab<?php if ($view === 'global-settings'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Global Settings', 'nextend-facebook-connect'); ?></a>
|
9 |
+
|
10 |
+
<?php if ($view === 'pro-addon' || NextendSocialLogin::hasLicense() || defined('NSL_PRO_PATH')): ?>
|
11 |
+
<a href="<?php echo NextendSocialLoginAdmin::getAdminUrl('pro-addon'); ?>"
|
12 |
+
class="nsl-admin-nav-tab<?php if ($view === 'pro-addon'): ?> nsl-admin-nav-tab-active<?php endif; ?>"><?php _e('Pro Addon', 'nextend-facebook-connect'); ?></a>
|
13 |
+
<?php endif; ?>
|
14 |
</div>
|
admin/templates/pro-addon.php
CHANGED
@@ -1,174 +1,174 @@
|
|
1 |
-
<?php
|
2 |
-
/** @var $view string */
|
3 |
-
|
4 |
-
defined('ABSPATH') || die();
|
5 |
-
|
6 |
-
$settings = NextendSocialLogin::$settings;
|
7 |
-
|
8 |
-
$state = NextendSocialLoginAdmin::getProState();
|
9 |
-
|
10 |
-
function nsl_license_no_capability($view) {
|
11 |
-
?>
|
12 |
-
<div class="nsl-box nsl-box-red nsl-box-error">
|
13 |
-
<h2 class="title"><?php _e('Error', 'nextend-facebook-connect'); ?></h2>
|
14 |
-
<p><?php _e('You don’t have sufficient permissions to install and activate plugins. Please contact your site’s administrator!', 'nextend-facebook-connect'); ?></p>
|
15 |
-
</div>
|
16 |
-
<?php
|
17 |
-
}
|
18 |
-
|
19 |
-
function nsl_license_installed($view) {
|
20 |
-
?>
|
21 |
-
<div class="nsl-box nsl-box-blue">
|
22 |
-
<h2 class="title"><?php _e('Activate Pro Addon', 'nextend-facebook-connect'); ?></h2>
|
23 |
-
<p><?php _e('Pro Addon is installed but not activated. To be able to use the Pro features, you need to activate it.', 'nextend-facebook-connect'); ?></p>
|
24 |
-
|
25 |
-
<p>
|
26 |
-
<a href="<?php echo wp_nonce_url(add_query_arg(array(
|
27 |
-
'action' => 'activate',
|
28 |
-
'plugin' => urlencode('nextend-social-login-pro/nextend-social-login-pro.php'),
|
29 |
-
'plugin_status' => 'all'
|
30 |
-
), admin_url('plugins.php')), 'activate-plugin_' . 'nextend-social-login-pro/nextend-social-login-pro.php'); ?>"
|
31 |
-
target="_blank" onclick="setTimeout(function(){window.location.reload(true)}, 2000)"
|
32 |
-
class="button button-primary"><?php _e('Activate Pro Addon', 'nextend-facebook-connect'); ?></a>
|
33 |
-
<a href="<?php echo wp_nonce_url(add_query_arg(array(
|
34 |
-
'action' => 'nextend-social-login',
|
35 |
-
'view' => 'pro-addon-deauthorize'
|
36 |
-
), admin_url('admin-post.php')), 'nextend-social-login'); ?>" class="button button-secondary">
|
37 |
-
|
38 |
-
</a>
|
39 |
-
</p>
|
40 |
-
</div>
|
41 |
-
<?php
|
42 |
-
}
|
43 |
-
|
44 |
-
function nsl_license_not_installed($view) {
|
45 |
-
$plugin_slug = 'nextend-social-login-pro';
|
46 |
-
?>
|
47 |
-
<div class="nsl-box nsl-box-blue plugin-card-<?php echo $plugin_slug; ?>">
|
48 |
-
<h2 class="title"><?php _e('Pro Addon is not installed', 'nextend-facebook-connect'); ?></h2>
|
49 |
-
|
50 |
-
<p><?php _e('To access the Pro features, you need to install and activate the Pro Addon.', 'nextend-facebook-connect'); ?></p>
|
51 |
-
|
52 |
-
<p class="submit">
|
53 |
-
<a class="install-now button button-primary" data-slug="<?php echo $plugin_slug; ?>"
|
54 |
-
href="<?php echo esc_url(wp_nonce_url(add_query_arg(array(
|
55 |
-
'action' => 'install-plugin',
|
56 |
-
'plugin' => $plugin_slug,
|
57 |
-
'from' => 'nextend-facebook-connect',
|
58 |
-
), self_admin_url('update.php')), 'install-plugin_' . $plugin_slug)); ?>"
|
59 |
-
aria-label="<?php echo esc_attr(sprintf(__('Install %s now'), 'Nextend Social Login PRO Addon')); ?>"
|
60 |
-
data-name="<?php echo esc_attr('Nextend Social Login PRO Addon'); ?>"><?php _e('Install Pro Addon', 'nextend-facebook-connect'); ?></a>
|
61 |
-
</p>
|
62 |
-
</div>
|
63 |
-
<script type="text/javascript">
|
64 |
-
|
65 |
-
$(document).on('ready', function () {
|
66 |
-
var $button = $('.install-now').on('click.nsl', function (event) {
|
67 |
-
if (typeof wp.updates.installPlugin === 'function') {
|
68 |
-
/** @since WordPress 4.6.0 */
|
69 |
-
|
70 |
-
event.preventDefault();
|
71 |
-
|
72 |
-
if ($button.hasClass('updating-message') || $button.hasClass('button-disabled')) {
|
73 |
-
return;
|
74 |
-
}
|
75 |
-
|
76 |
-
if (wp.updates.shouldRequestFilesystemCredentials && !wp.updates.ajaxLocked) {
|
77 |
-
wp.updates.requestFilesystemCredentials(event);
|
78 |
-
|
79 |
-
$(document).on('credential-modal-cancel', function () {
|
80 |
-
var $message = $('.install-now.updating-message');
|
81 |
-
|
82 |
-
$message.removeClass('updating-message').text(wp.updates.l10n.installNow);
|
83 |
-
|
84 |
-
wp.a11y.speak(wp.updates.l10n.updateCancel, 'polite');
|
85 |
-
});
|
86 |
-
}
|
87 |
-
|
88 |
-
wp.updates.installPlugin({
|
89 |
-
slug: $button.data('slug'),
|
90 |
-
success: function (response) {
|
91 |
-
if (response.activateUrl) {
|
92 |
-
|
93 |
-
$button.addClass('updating-message')
|
94 |
-
.text( <?php echo wp_json_encode(__('Activating...', 'nextend-facebook-connect'))?> );
|
95 |
-
|
96 |
-
window.onNSLProActivate = function () {
|
97 |
-
window.location.reload(true);
|
98 |
-
};
|
99 |
-
$('<iframe onload="onNSLProActivate()" src="' + response.activateUrl +
|
100 |
-
'" style="visibility:hidden;"></iframe>').appendTo('body');
|
101 |
-
}
|
102 |
-
}
|
103 |
-
}).always(function () {
|
104 |
-
$button.off('.nsl');
|
105 |
-
});
|
106 |
-
}
|
107 |
-
});
|
108 |
-
});
|
109 |
-
})(jQuery);
|
110 |
-
</script>
|
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 |
-
|
132 |
-
<div class="nsl-box nsl-box-green">
|
133 |
-
<h2 class="title"><?php _e('Pro Addon is installed and activated', 'nextend-facebook-connect'); ?></h2>
|
134 |
-
|
135 |
-
<p><?php _e('You installed and activated the Pro Addon. If you don’t want to use it anymore, you can deactivate using the button below.', 'nextend-facebook-connect'); ?></p>
|
136 |
-
|
137 |
-
<p class="submit">
|
138 |
-
<a href="<?php echo wp_nonce_url(add_query_arg(array(
|
139 |
-
'action' => 'nextend-social-login',
|
140 |
-
'view' => 'pro-addon-deauthorize'
|
141 |
-
), admin_url('admin-post.php')), 'nextend-social-login'); ?>" class="button button-secondary">
|
142 |
-
|
143 |
-
</a>
|
144 |
-
</p>
|
145 |
-
</div>
|
146 |
-
<?php
|
147 |
-
}
|
148 |
-
|
149 |
-
|
150 |
-
?>
|
151 |
-
<div class="nsl-admin-content">
|
152 |
-
|
153 |
-
switch ($state) {
|
154 |
-
case 'no-capability':
|
155 |
-
nsl_license_no_capability($view);
|
156 |
-
break;
|
157 |
-
case 'installed':
|
158 |
-
nsl_license_installed($view);
|
159 |
-
break;
|
160 |
-
case 'not-installed':
|
161 |
-
nsl_license_not_installed($view);
|
162 |
-
break;
|
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;
|
172 |
-
}
|
173 |
-
?>
|
174 |
</div>
|
1 |
+
<?php
|
2 |
+
/** @var $view string */
|
3 |
+
|
4 |
+
defined('ABSPATH') || die();
|
5 |
+
|
6 |
+
$settings = NextendSocialLogin::$settings;
|
7 |
+
|
8 |
+
$state = NextendSocialLoginAdmin::getProState();
|
9 |
+
|
10 |
+
function nsl_license_no_capability($view) {
|
11 |
+
?>
|
12 |
+
<div class="nsl-box nsl-box-red nsl-box-error">
|
13 |
+
<h2 class="title"><?php _e('Error', 'nextend-facebook-connect'); ?></h2>
|
14 |
+
<p><?php _e('You don’t have sufficient permissions to install and activate plugins. Please contact your site’s administrator!', 'nextend-facebook-connect'); ?></p>
|
15 |
+
</div>
|
16 |
+
<?php
|
17 |
+
}
|
18 |
+
|
19 |
+
function nsl_license_installed($view) {
|
20 |
+
?>
|
21 |
+
<div class="nsl-box nsl-box-blue">
|
22 |
+
<h2 class="title"><?php _e('Activate Pro Addon', 'nextend-facebook-connect'); ?></h2>
|
23 |
+
<p><?php _e('Pro Addon is installed but not activated. To be able to use the Pro features, you need to activate it.', 'nextend-facebook-connect'); ?></p>
|
24 |
+
|
25 |
+
<p>
|
26 |
+
<a href="<?php echo wp_nonce_url(add_query_arg(array(
|
27 |
+
'action' => 'activate',
|
28 |
+
'plugin' => urlencode('nextend-social-login-pro/nextend-social-login-pro.php'),
|
29 |
+
'plugin_status' => 'all'
|
30 |
+
), admin_url('plugins.php')), 'activate-plugin_' . 'nextend-social-login-pro/nextend-social-login-pro.php'); ?>"
|
31 |
+
target="_blank" onclick="setTimeout(function(){window.location.reload(true)}, 2000)"
|
32 |
+
class="button button-primary"><?php _e('Activate Pro Addon', 'nextend-facebook-connect'); ?></a>
|
33 |
+
<a href="<?php echo wp_nonce_url(add_query_arg(array(
|
34 |
+
'action' => 'nextend-social-login',
|
35 |
+
'view' => 'pro-addon-deauthorize'
|
36 |
+
), admin_url('admin-post.php')), 'nextend-social-login'); ?>" class="button button-secondary">
|
37 |
+
<?php _e('Deactivate Pro Addon', 'nextend-facebook-connect'); ?>
|
38 |
+
</a>
|
39 |
+
</p>
|
40 |
+
</div>
|
41 |
+
<?php
|
42 |
+
}
|
43 |
+
|
44 |
+
function nsl_license_not_installed($view) {
|
45 |
+
$plugin_slug = 'nextend-social-login-pro';
|
46 |
+
?>
|
47 |
+
<div class="nsl-box nsl-box-blue plugin-card-<?php echo $plugin_slug; ?>">
|
48 |
+
<h2 class="title"><?php _e('Pro Addon is not installed', 'nextend-facebook-connect'); ?></h2>
|
49 |
+
|
50 |
+
<p><?php _e('To access the Pro features, you need to install and activate the Pro Addon.', 'nextend-facebook-connect'); ?></p>
|
51 |
+
|
52 |
+
<p class="submit">
|
53 |
+
<a class="install-now button button-primary" data-slug="<?php echo $plugin_slug; ?>"
|
54 |
+
href="<?php echo esc_url(wp_nonce_url(add_query_arg(array(
|
55 |
+
'action' => 'install-plugin',
|
56 |
+
'plugin' => $plugin_slug,
|
57 |
+
'from' => 'nextend-facebook-connect',
|
58 |
+
), self_admin_url('update.php')), 'install-plugin_' . $plugin_slug)); ?>"
|
59 |
+
aria-label="<?php echo esc_attr(sprintf(__('Install %s now'), 'Nextend Social Login PRO Addon')); ?>"
|
60 |
+
data-name="<?php echo esc_attr('Nextend Social Login PRO Addon'); ?>"><?php _e('Install Pro Addon', 'nextend-facebook-connect'); ?></a>
|
61 |
+
</p>
|
62 |
+
</div>
|
63 |
+
<script type="text/javascript">
|
64 |
+
(function ($) {
|
65 |
+
$(document).on('ready', function () {
|
66 |
+
var $button = $('.install-now').on('click.nsl', function (event) {
|
67 |
+
if (typeof wp.updates.installPlugin === 'function') {
|
68 |
+
/** @since WordPress 4.6.0 */
|
69 |
+
|
70 |
+
event.preventDefault();
|
71 |
+
|
72 |
+
if ($button.hasClass('updating-message') || $button.hasClass('button-disabled')) {
|
73 |
+
return;
|
74 |
+
}
|
75 |
+
|
76 |
+
if (wp.updates.shouldRequestFilesystemCredentials && !wp.updates.ajaxLocked) {
|
77 |
+
wp.updates.requestFilesystemCredentials(event);
|
78 |
+
|
79 |
+
$(document).on('credential-modal-cancel', function () {
|
80 |
+
var $message = $('.install-now.updating-message');
|
81 |
+
|
82 |
+
$message.removeClass('updating-message').text(wp.updates.l10n.installNow);
|
83 |
+
|
84 |
+
wp.a11y.speak(wp.updates.l10n.updateCancel, 'polite');
|
85 |
+
});
|
86 |
+
}
|
87 |
+
|
88 |
+
wp.updates.installPlugin({
|
89 |
+
slug: $button.data('slug'),
|
90 |
+
success: function (response) {
|
91 |
+
if (response.activateUrl) {
|
92 |
+
|
93 |
+
$button.addClass('updating-message')
|
94 |
+
.text( <?php echo wp_json_encode(__('Activating...', 'nextend-facebook-connect'))?> );
|
95 |
+
|
96 |
+
window.onNSLProActivate = function () {
|
97 |
+
window.location.reload(true);
|
98 |
+
};
|
99 |
+
$('<iframe onload="onNSLProActivate()" src="' + response.activateUrl +
|
100 |
+
'" style="visibility:hidden;"></iframe>').appendTo('body');
|
101 |
+
}
|
102 |
+
}
|
103 |
+
}).always(function () {
|
104 |
+
$button.off('.nsl');
|
105 |
+
});
|
106 |
+
}
|
107 |
+
});
|
108 |
+
});
|
109 |
+
})(jQuery);
|
110 |
+
</script>
|
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 |
+
|
132 |
+
<div class="nsl-box nsl-box-green">
|
133 |
+
<h2 class="title"><?php _e('Pro Addon is installed and activated', 'nextend-facebook-connect'); ?></h2>
|
134 |
+
|
135 |
+
<p><?php _e('You installed and activated the Pro Addon. If you don’t want to use it anymore, you can deactivate using the button below.', 'nextend-facebook-connect'); ?></p>
|
136 |
+
|
137 |
+
<p class="submit">
|
138 |
+
<a href="<?php echo wp_nonce_url(add_query_arg(array(
|
139 |
+
'action' => 'nextend-social-login',
|
140 |
+
'view' => 'pro-addon-deauthorize'
|
141 |
+
), admin_url('admin-post.php')), 'nextend-social-login'); ?>" class="button button-secondary">
|
142 |
+
<?php _e('Deactivate Pro Addon', 'nextend-facebook-connect'); ?>
|
143 |
+
</a>
|
144 |
+
</p>
|
145 |
+
</div>
|
146 |
+
<?php
|
147 |
+
}
|
148 |
+
|
149 |
+
|
150 |
+
?>
|
151 |
+
<div class="nsl-admin-content">
|
152 |
+
<?php
|
153 |
+
switch ($state) {
|
154 |
+
case 'no-capability':
|
155 |
+
nsl_license_no_capability($view);
|
156 |
+
break;
|
157 |
+
case 'installed':
|
158 |
+
nsl_license_installed($view);
|
159 |
+
break;
|
160 |
+
case 'not-installed':
|
161 |
+
nsl_license_not_installed($view);
|
162 |
+
break;
|
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;
|
172 |
+
}
|
173 |
+
?>
|
174 |
</div>
|
admin/templates/pro.php
CHANGED
@@ -1,65 +1,65 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$state = NextendSocialLoginAdmin::getProState();
|
4 |
-
|
5 |
-
function nsl_get_pro_no_license() {
|
6 |
-
?>
|
7 |
-
<div class="nsl-box nsl-box-yellow nsl-box-yellow-bg nsl-box-padlock">
|
8 |
-
<h2 class="title"><?php _e('Get Pro Addon to unlock more features', 'nextend-facebook-connect'); ?></h2>
|
9 |
-
<p><?php printf(__('The features below are available in %s Pro Addon. Get it today and tweak the awesome settings.', 'nextend-facebook-connect'), "Nextend Social Login"); ?></p>
|
10 |
-
<p><?php _e('If you already have a license, you can Authorize your Pro Addon. Otherwise you can purchase it using the button below.', 'nextend-facebook-connect'); ?></p>
|
11 |
-
<p>
|
12 |
-
<a href="<?php echo NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/social-login/', 'buy-pro-addon-button'); ?>"
|
13 |
-
target="_blank"
|
14 |
-
class="button button-primary"><?php _e('Buy Pro Addon', 'nextend-facebook-connect'); ?></a>
|
15 |
-
<a href="<?php echo NextendSocialLoginAdmin::getAdminUrl('pro-addon'); ?>"
|
16 |
-
class="button button-secondary"><?php _e('Authorize Pro Addon', 'nextend-facebook-connect'); ?></a>
|
17 |
-
</p>
|
18 |
-
</div>
|
19 |
-
<?php
|
20 |
-
}
|
21 |
-
|
22 |
-
function nsl_get_pro_installed() {
|
23 |
-
?>
|
24 |
-
<div class="nsl-box nsl-box-blue">
|
25 |
-
<h2 class="title"><?php _e('Pro Addon is not activated', 'nextend-facebook-connect'); ?></h2>
|
26 |
-
<p><?php _e('To be able to use the Pro features, you need to install and activate the Nextend Social Connect Pro Addon.', 'nextend-facebook-connect'); ?></p>
|
27 |
-
<p>
|
28 |
-
<a href="<?php echo wp_nonce_url(add_query_arg(array(
|
29 |
-
'action' => 'activate',
|
30 |
-
'plugin' => urlencode('nextend-social-login-pro/nextend-social-login-pro.php'),
|
31 |
-
'plugin_status' => 'all'
|
32 |
-
), admin_url('plugins.php')), 'activate-plugin_' . 'nextend-social-login-pro/nextend-social-login-pro.php'); ?>"
|
33 |
-
target="_blank" onclick="setTimeout(function(){window.location.reload(true)}, 2000)"
|
34 |
-
class="button button-primary"><?php _e('Activate Pro Addon', 'nextend-facebook-connect'); ?></a>
|
35 |
-
</p>
|
36 |
-
</div>
|
37 |
-
<?php
|
38 |
-
}
|
39 |
-
|
40 |
-
function nsl_get_pro_not_installed() {
|
41 |
-
?>
|
42 |
-
<div class="nsl-box nsl-box-blue">
|
43 |
-
<h2 class="title"><?php _e('Pro Addon is not installed', 'nextend-facebook-connect'); ?></h2>
|
44 |
-
<p><?php _e('To be able to use the Pro features, you need to install and activate the Nextend Social Connect Pro Addon.', 'nextend-facebook-connect'); ?></p>
|
45 |
-
<p>
|
46 |
-
<a href="<?php echo NextendSocialLoginAdmin::getAdminUrl('pro-addon'); ?>"
|
47 |
-
class="button button-primary"><?php _e('Install Pro Addon', 'nextend-facebook-connect'); ?></a>
|
48 |
-
</p>
|
49 |
-
</div>
|
50 |
-
<?php
|
51 |
-
}
|
52 |
-
|
53 |
-
switch ($state) {
|
54 |
-
case 'no-capability':
|
55 |
-
break;
|
56 |
-
case 'not-installed':
|
57 |
-
nsl_get_pro_not_installed();
|
58 |
-
break;
|
59 |
-
case 'installed':
|
60 |
-
nsl_get_pro_installed();
|
61 |
-
break;
|
62 |
-
default:
|
63 |
-
nsl_get_pro_no_license();
|
64 |
-
break;
|
65 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$state = NextendSocialLoginAdmin::getProState();
|
4 |
+
|
5 |
+
function nsl_get_pro_no_license() {
|
6 |
+
?>
|
7 |
+
<div class="nsl-box nsl-box-yellow nsl-box-yellow-bg nsl-box-padlock">
|
8 |
+
<h2 class="title"><?php _e('Get Pro Addon to unlock more features', 'nextend-facebook-connect'); ?></h2>
|
9 |
+
<p><?php printf(__('The features below are available in %s Pro Addon. Get it today and tweak the awesome settings.', 'nextend-facebook-connect'), "Nextend Social Login"); ?></p>
|
10 |
+
<p><?php _e('If you already have a license, you can Authorize your Pro Addon. Otherwise you can purchase it using the button below.', 'nextend-facebook-connect'); ?></p>
|
11 |
+
<p>
|
12 |
+
<a href="<?php echo NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/social-login/', 'buy-pro-addon-button'); ?>"
|
13 |
+
target="_blank"
|
14 |
+
class="button button-primary"><?php _e('Buy Pro Addon', 'nextend-facebook-connect'); ?></a>
|
15 |
+
<a href="<?php echo NextendSocialLoginAdmin::getAdminUrl('pro-addon'); ?>"
|
16 |
+
class="button button-secondary"><?php _e('Authorize Pro Addon', 'nextend-facebook-connect'); ?></a>
|
17 |
+
</p>
|
18 |
+
</div>
|
19 |
+
<?php
|
20 |
+
}
|
21 |
+
|
22 |
+
function nsl_get_pro_installed() {
|
23 |
+
?>
|
24 |
+
<div class="nsl-box nsl-box-blue">
|
25 |
+
<h2 class="title"><?php _e('Pro Addon is not activated', 'nextend-facebook-connect'); ?></h2>
|
26 |
+
<p><?php _e('To be able to use the Pro features, you need to install and activate the Nextend Social Connect Pro Addon.', 'nextend-facebook-connect'); ?></p>
|
27 |
+
<p>
|
28 |
+
<a href="<?php echo wp_nonce_url(add_query_arg(array(
|
29 |
+
'action' => 'activate',
|
30 |
+
'plugin' => urlencode('nextend-social-login-pro/nextend-social-login-pro.php'),
|
31 |
+
'plugin_status' => 'all'
|
32 |
+
), admin_url('plugins.php')), 'activate-plugin_' . 'nextend-social-login-pro/nextend-social-login-pro.php'); ?>"
|
33 |
+
target="_blank" onclick="setTimeout(function(){window.location.reload(true)}, 2000)"
|
34 |
+
class="button button-primary"><?php _e('Activate Pro Addon', 'nextend-facebook-connect'); ?></a>
|
35 |
+
</p>
|
36 |
+
</div>
|
37 |
+
<?php
|
38 |
+
}
|
39 |
+
|
40 |
+
function nsl_get_pro_not_installed() {
|
41 |
+
?>
|
42 |
+
<div class="nsl-box nsl-box-blue">
|
43 |
+
<h2 class="title"><?php _e('Pro Addon is not installed', 'nextend-facebook-connect'); ?></h2>
|
44 |
+
<p><?php _e('To be able to use the Pro features, you need to install and activate the Nextend Social Connect Pro Addon.', 'nextend-facebook-connect'); ?></p>
|
45 |
+
<p>
|
46 |
+
<a href="<?php echo NextendSocialLoginAdmin::getAdminUrl('pro-addon'); ?>"
|
47 |
+
class="button button-primary"><?php _e('Install Pro Addon', 'nextend-facebook-connect'); ?></a>
|
48 |
+
</p>
|
49 |
+
</div>
|
50 |
+
<?php
|
51 |
+
}
|
52 |
+
|
53 |
+
switch ($state) {
|
54 |
+
case 'no-capability':
|
55 |
+
break;
|
56 |
+
case 'not-installed':
|
57 |
+
nsl_get_pro_not_installed();
|
58 |
+
break;
|
59 |
+
case 'installed':
|
60 |
+
nsl_get_pro_installed();
|
61 |
+
break;
|
62 |
+
default:
|
63 |
+
nsl_get_pro_no_license();
|
64 |
+
break;
|
65 |
}
|
admin/templates/provider.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
<?php
|
2 |
-
/** @var $currentProvider string */
|
3 |
-
|
4 |
-
$provider = NextendSocialLogin::$providers[$currentProvider];
|
5 |
-
|
6 |
-
$admin = $provider->getAdmin();
|
7 |
-
|
8 |
$admin->settingsForm();
|
1 |
+
<?php
|
2 |
+
/** @var $currentProvider string */
|
3 |
+
|
4 |
+
$provider = NextendSocialLogin::$providers[$currentProvider];
|
5 |
+
|
6 |
+
$admin = $provider->getAdmin();
|
7 |
+
|
8 |
$admin->settingsForm();
|
admin/templates/providers.php
CHANGED
@@ -1,222 +1,222 @@
|
|
1 |
-
<?php
|
2 |
-
wp_enqueue_script('jquery-ui-sortable');
|
3 |
-
?>
|
4 |
-
<div class="nsl-dashboard-providers-container">
|
5 |
-
<div class="nsl-dashboard-providers">
|
6 |
-
<?php
|
7 |
-
if (count(NextendSocialLogin::$enabledProviders) > 0) {
|
8 |
-
include_once(dirname(__FILE__) . '/review.php');
|
9 |
-
}
|
10 |
-
?>
|
11 |
-
|
12 |
-
<?php foreach (NextendSocialLogin::$providers AS $provider): ?>
|
13 |
-
<?php
|
14 |
-
$state = $provider->getState();
|
15 |
-
$providerAdmin = $provider->getAdmin();
|
16 |
-
?>
|
17 |
-
|
18 |
-
<div class="nsl-dashboard-provider" data-provider="<?php echo $provider->getId(); ?>"
|
19 |
-
data-state="<?php echo $state; ?>">
|
20 |
-
<div class="nsl-dashboard-provider-top" style="background-color: <?php echo $provider->getColor(); ?>;">
|
21 |
-
<img src="<?php echo $provider->getIcon(); ?>" height="60"
|
22 |
-
alt="<?php echo esc_attr($provider->getLabel()); ?>"/>
|
23 |
-
<h2><?php echo $provider->getLabel(); ?></h2>
|
24 |
-
</div>
|
25 |
-
<div class="nsl-dashboard-provider-bottom">
|
26 |
-
<div class="nsl-dashboard-provider-bottom-state">
|
27 |
-
|
28 |
-
switch ($state) {
|
29 |
-
case 'pro-only':
|
30 |
-
_e('Not Available', 'nextend-facebook-connect');
|
31 |
-
break;
|
32 |
-
case 'not-configured':
|
33 |
-
_e('Not Configured', 'nextend-facebook-connect');
|
34 |
-
break;
|
35 |
-
case 'not-tested':
|
36 |
-
_e('Not Verified', 'nextend-facebook-connect');
|
37 |
-
break;
|
38 |
-
case 'disabled':
|
39 |
-
_e('Disabled', 'nextend-facebook-connect');
|
40 |
-
break;
|
41 |
-
case 'enabled':
|
42 |
-
_e('Enabled', 'nextend-facebook-connect');
|
43 |
-
break;
|
44 |
-
}
|
45 |
-
?>
|
46 |
-
</div>
|
47 |
-
|
48 |
-
<?php
|
49 |
-
switch ($state) {
|
50 |
-
case 'pro-only':
|
51 |
-
?>
|
52 |
-
<a href="<?php echo NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/social-login/', 'buy-pro-addon-button-' . $provider->getId()); ?>"
|
53 |
-
class="button button-secondary" target="_blank">
|
54 |
-
|
55 |
-
</a>
|
56 |
-
<?php
|
57 |
-
break;
|
58 |
-
case 'not-configured':
|
59 |
-
?>
|
60 |
-
<a href="<?php echo $providerAdmin->getUrl(); ?>" class="button button-secondary">
|
61 |
-
|
62 |
-
</a>
|
63 |
-
<?php
|
64 |
-
break;
|
65 |
-
case 'not-tested':
|
66 |
-
?>
|
67 |
-
<a href="<?php echo $providerAdmin->getUrl('settings'); ?>"
|
68 |
-
class="button button-secondary">
|
69 |
-
|
70 |
-
</a>
|
71 |
-
<?php
|
72 |
-
break;
|
73 |
-
case 'disabled':
|
74 |
-
?>
|
75 |
-
<a href="<?php echo wp_nonce_url(add_query_arg('provider', $provider->getId(), NextendSocialLoginAdmin::getAdminUrl('enable')), 'nextend-social-login_enable_' . $provider->getId()); ?>"
|
76 |
-
class="button button-primary">
|
77 |
-
|
78 |
-
</a>
|
79 |
-
<a href="<?php echo $providerAdmin->getUrl('settings'); ?>"
|
80 |
-
class="button button-secondary">
|
81 |
-
|
82 |
-
</a>
|
83 |
-
<?php
|
84 |
-
break;
|
85 |
-
case 'enabled':
|
86 |
-
?>
|
87 |
-
<a href="<?php echo wp_nonce_url(add_query_arg('provider', $provider->getId(), NextendSocialLoginAdmin::getAdminUrl('disable')), 'nextend-social-login_disable_' . $provider->getId()); ?>"
|
88 |
-
class="button button-secondary">
|
89 |
-
|
90 |
-
</a>
|
91 |
-
<a href="<?php echo $providerAdmin->getUrl('settings'); ?>"
|
92 |
-
class="button button-secondary">
|
93 |
-
|
94 |
-
</a>
|
95 |
-
<?php
|
96 |
-
break;
|
97 |
-
}
|
98 |
-
?>
|
99 |
-
</div>
|
100 |
-
|
101 |
-
<div class="nsl-dashboard-provider-sortable-handle"></div>
|
102 |
-
</div>
|
103 |
-
<?php endforeach; ?>
|
104 |
-
|
105 |
-
<?php
|
106 |
-
$user_info = wp_get_current_user();
|
107 |
-
$already_subscribed = get_user_meta($user_info->ID, 'nsl_newsletter_subscription', true);
|
108 |
-
if (!$already_subscribed):
|
109 |
-
?>
|
110 |
-
|
111 |
-
<div class="nsl-dashboard-newsletter" style="background-color: #fff; border: 2px solid #0073aa">
|
112 |
-
<div class="nsl-dashboard-newsletter-content">
|
113 |
-
|
114 |
-
<h2><?php _e('Stay Updated', 'nextend-facebook-connect'); ?></h2>
|
115 |
-
<p><?php _e('Receive info on the latest plugin updates and social provider related changes.', 'nextend-facebook-connect'); ?></p>
|
116 |
-
<input type="text" name="newsletter_subscription" id="newsletter_subscription" placeholder="<?php _e('Enter your email address', 'nextend-facebook-connect'); ?>"
|
117 |
-
value="<?php if (!empty($user_info->user_email)) : echo $user_info->user_email; endif; ?>" size="25">
|
118 |
-
|
119 |
-
<a onclick="nslNewsletter()" class="button button-primary">
|
120 |
-
<?php _e('Subscribe', 'nextend-facebook-connect'); ?>
|
121 |
-
</a>
|
122 |
-
|
123 |
-
</div>
|
124 |
-
</div>
|
125 |
-
|
126 |
-
<?php endif; ?>
|
127 |
-
|
128 |
-
</div>
|
129 |
-
<div class="nsl-clear"></div>
|
130 |
-
</div>
|
131 |
-
|
132 |
-
<script>
|
133 |
-
|
134 |
-
$(document).ready(function () {
|
135 |
-
var _ajax_nonce = '<?php echo wp_create_nonce("nextend-social-login"); ?>',
|
136 |
-
savingMessage = <?php echo wp_json_encode(__('Saving...', 'nextend-facebook-connect')); ?>,
|
137 |
-
errorMessage = <?php echo wp_json_encode(__('Saving failed', 'nextend-facebook-connect')); ?>,
|
138 |
-
successMessage = <?php echo wp_json_encode(__('Order Saved', 'nextend-facebook-connect')); ?>;
|
139 |
-
$('.nsl-dashboard-providers').sortable({
|
140 |
-
handle: '.nsl-dashboard-provider-sortable-handle',
|
141 |
-
items: ' > .nsl-dashboard-provider',
|
142 |
-
tolerance: 'pointer',
|
143 |
-
stop: function (event, ui) {
|
144 |
-
var $providers = $('.nsl-dashboard-providers > .nsl-dashboard-provider'),
|
145 |
-
providerList = [];
|
146 |
-
for (var i = 0; i < $providers.length; i++) {
|
147 |
-
providerList.push($providers.eq(i).data('provider'));
|
148 |
-
}
|
149 |
-
|
150 |
-
ui.item.find('.nsl-provider-notice').remove();
|
151 |
-
|
152 |
-
var $notice = $('<div class="nsl-provider-notice">' + savingMessage + '</div>')
|
153 |
-
.appendTo(ui.item);
|
154 |
-
|
155 |
-
$.ajax({
|
156 |
-
type: 'post',
|
157 |
-
dataType: 'json',
|
158 |
-
url: ajaxurl,
|
159 |
-
data: {
|
160 |
-
'_ajax_nonce': _ajax_nonce,
|
161 |
-
'action': 'nextend-social-login',
|
162 |
-
'view': 'orderProviders',
|
163 |
-
'ordering': providerList
|
164 |
-
},
|
165 |
-
success: function () {
|
166 |
-
$notice.html(successMessage);
|
167 |
-
setTimeout(function () {
|
168 |
-
$notice.fadeOut(300, function () {
|
169 |
-
$notice.remove();
|
170 |
-
});
|
171 |
-
}, 2000);
|
172 |
-
},
|
173 |
-
error: function () {
|
174 |
-
$notice.html(errorMessage);
|
175 |
-
setTimeout(function () {
|
176 |
-
$notice.fadeOut(300, function () {
|
177 |
-
$notice.remove();
|
178 |
-
});
|
179 |
-
}, 3000);
|
180 |
-
}
|
181 |
-
});
|
182 |
-
}
|
183 |
-
});
|
184 |
-
|
185 |
-
<?php if (!$already_subscribed): ?>
|
186 |
-
window.nslNewsletter = function () {
|
187 |
-
$.ajax({
|
188 |
-
type: 'post',
|
189 |
-
dataType: 'json',
|
190 |
-
url: 'https://api.nextendweb.com/v2/nextend-api/v2/product/nsl/subscribe',
|
191 |
-
data: {
|
192 |
-
'email': $('#newsletter_subscription').val()
|
193 |
-
},
|
194 |
-
success: function () {
|
195 |
-
|
196 |
-
$.ajax({
|
197 |
-
type: 'post',
|
198 |
-
dataType: 'json',
|
199 |
-
url: ajaxurl,
|
200 |
-
data: {
|
201 |
-
'_ajax_nonce': _ajax_nonce,
|
202 |
-
'action': 'nextend-social-login',
|
203 |
-
'view': 'newsletterSubscribe'
|
204 |
-
},
|
205 |
-
success: function () {
|
206 |
-
|
207 |
-
$('.nsl-dashboard-newsletter-content').html("<h2><?php _e('Successfully subscribed!', 'nextend-facebook-connect'); ?></h2><p><?php _e('We\'ll be bringing you all the latest news and updates about Social Login - right to your inbox.', 'nextend-facebook-connect'); ?></p>");
|
208 |
-
}
|
209 |
-
});
|
210 |
-
},
|
211 |
-
error: function (error) {
|
212 |
-
//NOTICE FOR ERROR:
|
213 |
-
if ($('.nsl-newsletter-notice>.error').length === 0) {
|
214 |
-
$('.nsl-dashboard-providers-container').prepend('<div class="nsl-newsletter-notice"><div class="error"><p><?php _e('The entered email address is invalid!', 'nextend-facebook-connect'); ?><p></div></div>');
|
215 |
-
}
|
216 |
-
}
|
217 |
-
});
|
218 |
-
};
|
219 |
-
<?php endif; ?>
|
220 |
-
});
|
221 |
-
})(jQuery);
|
222 |
</script>
|
1 |
+
<?php
|
2 |
+
wp_enqueue_script('jquery-ui-sortable');
|
3 |
+
?>
|
4 |
+
<div class="nsl-dashboard-providers-container">
|
5 |
+
<div class="nsl-dashboard-providers">
|
6 |
+
<?php
|
7 |
+
if (count(NextendSocialLogin::$enabledProviders) > 0) {
|
8 |
+
include_once(dirname(__FILE__) . '/review.php');
|
9 |
+
}
|
10 |
+
?>
|
11 |
+
|
12 |
+
<?php foreach (NextendSocialLogin::$providers AS $provider): ?>
|
13 |
+
<?php
|
14 |
+
$state = $provider->getState();
|
15 |
+
$providerAdmin = $provider->getAdmin();
|
16 |
+
?>
|
17 |
+
|
18 |
+
<div class="nsl-dashboard-provider" data-provider="<?php echo $provider->getId(); ?>"
|
19 |
+
data-state="<?php echo $state; ?>">
|
20 |
+
<div class="nsl-dashboard-provider-top" style="background-color: <?php echo $provider->getColor(); ?>;">
|
21 |
+
<img src="<?php echo $provider->getIcon(); ?>" height="60"
|
22 |
+
alt="<?php echo esc_attr($provider->getLabel()); ?>"/>
|
23 |
+
<h2><?php echo $provider->getLabel(); ?></h2>
|
24 |
+
</div>
|
25 |
+
<div class="nsl-dashboard-provider-bottom">
|
26 |
+
<div class="nsl-dashboard-provider-bottom-state">
|
27 |
+
<?php
|
28 |
+
switch ($state) {
|
29 |
+
case 'pro-only':
|
30 |
+
_e('Not Available', 'nextend-facebook-connect');
|
31 |
+
break;
|
32 |
+
case 'not-configured':
|
33 |
+
_e('Not Configured', 'nextend-facebook-connect');
|
34 |
+
break;
|
35 |
+
case 'not-tested':
|
36 |
+
_e('Not Verified', 'nextend-facebook-connect');
|
37 |
+
break;
|
38 |
+
case 'disabled':
|
39 |
+
_e('Disabled', 'nextend-facebook-connect');
|
40 |
+
break;
|
41 |
+
case 'enabled':
|
42 |
+
_e('Enabled', 'nextend-facebook-connect');
|
43 |
+
break;
|
44 |
+
}
|
45 |
+
?>
|
46 |
+
</div>
|
47 |
+
|
48 |
+
<?php
|
49 |
+
switch ($state) {
|
50 |
+
case 'pro-only':
|
51 |
+
?>
|
52 |
+
<a href="<?php echo NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/social-login/', 'buy-pro-addon-button-' . $provider->getId()); ?>"
|
53 |
+
class="button button-secondary" target="_blank">
|
54 |
+
<?php _e('Upgrade Now', 'nextend-facebook-connect'); ?>
|
55 |
+
</a>
|
56 |
+
<?php
|
57 |
+
break;
|
58 |
+
case 'not-configured':
|
59 |
+
?>
|
60 |
+
<a href="<?php echo $providerAdmin->getUrl(); ?>" class="button button-secondary">
|
61 |
+
<?php _e('Getting Started', 'nextend-facebook-connect'); ?>
|
62 |
+
</a>
|
63 |
+
<?php
|
64 |
+
break;
|
65 |
+
case 'not-tested':
|
66 |
+
?>
|
67 |
+
<a href="<?php echo $providerAdmin->getUrl('settings'); ?>"
|
68 |
+
class="button button-secondary">
|
69 |
+
<?php _e('Verify Settings', 'nextend-facebook-connect'); ?>
|
70 |
+
</a>
|
71 |
+
<?php
|
72 |
+
break;
|
73 |
+
case 'disabled':
|
74 |
+
?>
|
75 |
+
<a href="<?php echo wp_nonce_url(add_query_arg('provider', $provider->getId(), NextendSocialLoginAdmin::getAdminUrl('enable')), 'nextend-social-login_enable_' . $provider->getId()); ?>"
|
76 |
+
class="button button-primary">
|
77 |
+
<?php _e('Enable', 'nextend-facebook-connect'); ?>
|
78 |
+
</a>
|
79 |
+
<a href="<?php echo $providerAdmin->getUrl('settings'); ?>"
|
80 |
+
class="button button-secondary">
|
81 |
+
<?php _e('Settings', 'nextend-facebook-connect'); ?>
|
82 |
+
</a>
|
83 |
+
<?php
|
84 |
+
break;
|
85 |
+
case 'enabled':
|
86 |
+
?>
|
87 |
+
<a href="<?php echo wp_nonce_url(add_query_arg('provider', $provider->getId(), NextendSocialLoginAdmin::getAdminUrl('disable')), 'nextend-social-login_disable_' . $provider->getId()); ?>"
|
88 |
+
class="button button-secondary">
|
89 |
+
<?php _e('Disable', 'nextend-facebook-connect'); ?>
|
90 |
+
</a>
|
91 |
+
<a href="<?php echo $providerAdmin->getUrl('settings'); ?>"
|
92 |
+
class="button button-secondary">
|
93 |
+
<?php _e('Settings', 'nextend-facebook-connect'); ?>
|
94 |
+
</a>
|
95 |
+
<?php
|
96 |
+
break;
|
97 |
+
}
|
98 |
+
?>
|
99 |
+
</div>
|
100 |
+
|
101 |
+
<div class="nsl-dashboard-provider-sortable-handle"></div>
|
102 |
+
</div>
|
103 |
+
<?php endforeach; ?>
|
104 |
+
|
105 |
+
<?php
|
106 |
+
$user_info = wp_get_current_user();
|
107 |
+
$already_subscribed = get_user_meta($user_info->ID, 'nsl_newsletter_subscription', true);
|
108 |
+
if (!$already_subscribed):
|
109 |
+
?>
|
110 |
+
|
111 |
+
<div class="nsl-dashboard-newsletter" style="background-color: #fff; border: 2px solid #0073aa">
|
112 |
+
<div class="nsl-dashboard-newsletter-content">
|
113 |
+
|
114 |
+
<h2><?php _e('Stay Updated', 'nextend-facebook-connect'); ?></h2>
|
115 |
+
<p><?php _e('Receive info on the latest plugin updates and social provider related changes.', 'nextend-facebook-connect'); ?></p>
|
116 |
+
<input type="text" name="newsletter_subscription" id="newsletter_subscription" placeholder="<?php _e('Enter your email address', 'nextend-facebook-connect'); ?>"
|
117 |
+
value="<?php if (!empty($user_info->user_email)) : echo $user_info->user_email; endif; ?>" size="25">
|
118 |
+
|
119 |
+
<a onclick="nslNewsletter()" class="button button-primary">
|
120 |
+
<?php _e('Subscribe', 'nextend-facebook-connect'); ?>
|
121 |
+
</a>
|
122 |
+
|
123 |
+
</div>
|
124 |
+
</div>
|
125 |
+
|
126 |
+
<?php endif; ?>
|
127 |
+
|
128 |
+
</div>
|
129 |
+
<div class="nsl-clear"></div>
|
130 |
+
</div>
|
131 |
+
|
132 |
+
<script>
|
133 |
+
(function ($) {
|
134 |
+
$(document).ready(function () {
|
135 |
+
var _ajax_nonce = '<?php echo wp_create_nonce("nextend-social-login"); ?>',
|
136 |
+
savingMessage = <?php echo wp_json_encode(__('Saving...', 'nextend-facebook-connect')); ?>,
|
137 |
+
errorMessage = <?php echo wp_json_encode(__('Saving failed', 'nextend-facebook-connect')); ?>,
|
138 |
+
successMessage = <?php echo wp_json_encode(__('Order Saved', 'nextend-facebook-connect')); ?>;
|
139 |
+
$('.nsl-dashboard-providers').sortable({
|
140 |
+
handle: '.nsl-dashboard-provider-sortable-handle',
|
141 |
+
items: ' > .nsl-dashboard-provider',
|
142 |
+
tolerance: 'pointer',
|
143 |
+
stop: function (event, ui) {
|
144 |
+
var $providers = $('.nsl-dashboard-providers > .nsl-dashboard-provider'),
|
145 |
+
providerList = [];
|
146 |
+
for (var i = 0; i < $providers.length; i++) {
|
147 |
+
providerList.push($providers.eq(i).data('provider'));
|
148 |
+
}
|
149 |
+
|
150 |
+
ui.item.find('.nsl-provider-notice').remove();
|
151 |
+
|
152 |
+
var $notice = $('<div class="nsl-provider-notice">' + savingMessage + '</div>')
|
153 |
+
.appendTo(ui.item);
|
154 |
+
|
155 |
+
$.ajax({
|
156 |
+
type: 'post',
|
157 |
+
dataType: 'json',
|
158 |
+
url: ajaxurl,
|
159 |
+
data: {
|
160 |
+
'_ajax_nonce': _ajax_nonce,
|
161 |
+
'action': 'nextend-social-login',
|
162 |
+
'view': 'orderProviders',
|
163 |
+
'ordering': providerList
|
164 |
+
},
|
165 |
+
success: function () {
|
166 |
+
$notice.html(successMessage);
|
167 |
+
setTimeout(function () {
|
168 |
+
$notice.fadeOut(300, function () {
|
169 |
+
$notice.remove();
|
170 |
+
});
|
171 |
+
}, 2000);
|
172 |
+
},
|
173 |
+
error: function () {
|
174 |
+
$notice.html(errorMessage);
|
175 |
+
setTimeout(function () {
|
176 |
+
$notice.fadeOut(300, function () {
|
177 |
+
$notice.remove();
|
178 |
+
});
|
179 |
+
}, 3000);
|
180 |
+
}
|
181 |
+
});
|
182 |
+
}
|
183 |
+
});
|
184 |
+
|
185 |
+
<?php if (!$already_subscribed): ?>
|
186 |
+
window.nslNewsletter = function () {
|
187 |
+
$.ajax({
|
188 |
+
type: 'post',
|
189 |
+
dataType: 'json',
|
190 |
+
url: 'https://api.nextendweb.com/v2/nextend-api/v2/product/nsl/subscribe',
|
191 |
+
data: {
|
192 |
+
'email': $('#newsletter_subscription').val()
|
193 |
+
},
|
194 |
+
success: function () {
|
195 |
+
|
196 |
+
$.ajax({
|
197 |
+
type: 'post',
|
198 |
+
dataType: 'json',
|
199 |
+
url: ajaxurl,
|
200 |
+
data: {
|
201 |
+
'_ajax_nonce': _ajax_nonce,
|
202 |
+
'action': 'nextend-social-login',
|
203 |
+
'view': 'newsletterSubscribe'
|
204 |
+
},
|
205 |
+
success: function () {
|
206 |
+
|
207 |
+
$('.nsl-dashboard-newsletter-content').html("<h2><?php _e('Successfully subscribed!', 'nextend-facebook-connect'); ?></h2><p><?php _e('We\'ll be bringing you all the latest news and updates about Social Login - right to your inbox.', 'nextend-facebook-connect'); ?></p>");
|
208 |
+
}
|
209 |
+
});
|
210 |
+
},
|
211 |
+
error: function (error) {
|
212 |
+
//NOTICE FOR ERROR:
|
213 |
+
if ($('.nsl-newsletter-notice>.error').length === 0) {
|
214 |
+
$('.nsl-dashboard-providers-container').prepend('<div class="nsl-newsletter-notice"><div class="error"><p><?php _e('The entered email address is invalid!', 'nextend-facebook-connect'); ?><p></div></div>');
|
215 |
+
}
|
216 |
+
}
|
217 |
+
});
|
218 |
+
};
|
219 |
+
<?php endif; ?>
|
220 |
+
});
|
221 |
+
})(jQuery);
|
222 |
</script>
|
admin/templates/review.php
CHANGED
@@ -1,86 +1,86 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$state = NextendSocialLogin::$settings->get('review_state');
|
4 |
-
|
5 |
-
if ((0 < $state && $state < 5) || $state == 6) {
|
6 |
-
// Rated 1, 2, 3, 4 OR 6
|
7 |
-
return;
|
8 |
-
}
|
9 |
-
?>
|
10 |
-
|
11 |
-
<?php if ($state == -1): ?>
|
12 |
-
<div class="nsl-box-review nsl-box-review-step-1" data-stars="0">
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
</div>
|
28 |
-
<?php endif; ?>
|
29 |
-
|
30 |
-
<div class="nsl-box-review nsl-box-review-star-5" <?php if ($state != 5): ?>style="display:none;"<?php endif; ?>>
|
31 |
-
<h3><?php _e('Please Leave a Review', 'nextend-facebook-connect'); ?></h3>
|
32 |
-
<div class="nsl-box-review-star-5-description"><?php _e('If you are happy with <b>Nextend Social Login</b> and can take a minute please leave us a review. It will be a tremendous help for us!', 'nextend-facebook-connect'); ?></div>
|
33 |
-
<div class="nsl-box-review-star-5-primary">
|
34 |
-
<a href="<?php echo esc_attr(NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/redirect/nsl-review.html', 'dashboard-review-5')); ?>" target="_blank" class="button button-primary"><?php _e('Ok, you deserve it', 'nextend-facebook-connect'); ?></a>
|
35 |
-
</div>
|
36 |
-
|
37 |
-
<div class="nsl-box-review-star-5-close"></div>
|
38 |
-
</div>
|
39 |
-
<script>
|
40 |
-
|
41 |
-
$(document).ready(function () {
|
42 |
-
var $box = $('.nsl-box-review-step-1'),
|
43 |
-
$box5 = $('.nsl-box-review-star-5'),
|
44 |
-
updateReviewState = function (state) {
|
45 |
-
$.post(ajaxurl, {
|
46 |
-
'action': 'nsl_save_review_state',
|
47 |
-
'review_state': state,
|
48 |
-
'_ajax_nonce': <?php echo wp_json_encode(wp_create_nonce('nsl_save_review_state')); ?>
|
49 |
-
});
|
50 |
-
};
|
51 |
-
$box.find('.nsl-box-review-star').on({
|
52 |
-
mouseenter: function () {
|
53 |
-
$box.attr('data-stars', $(this).data('star'));
|
54 |
-
},
|
55 |
-
click: function (e) {
|
56 |
-
e.preventDefault();
|
57 |
-
|
58 |
-
var star = parseInt($(this).data('star'));
|
59 |
-
if (star < 5) {
|
60 |
-
var win = window.open($(this).data('href'), '_blank');
|
61 |
-
|
62 |
-
$box.remove();
|
63 |
-
|
64 |
-
updateReviewState(star);
|
65 |
-
|
66 |
-
win.focus();
|
67 |
-
} else {
|
68 |
-
updateReviewState(5);
|
69 |
-
$box.remove();
|
70 |
-
$box5.css('display', '');
|
71 |
-
}
|
72 |
-
}
|
73 |
-
});
|
74 |
-
$box.find('.nsl-box-review-stars-container').on({
|
75 |
-
mouseleave: function () {
|
76 |
-
$box.attr('data-stars', 0);
|
77 |
-
}
|
78 |
-
});
|
79 |
-
|
80 |
-
$box5.find('a, .nsl-box-review-star-5-close').on('click', function () {
|
81 |
-
$box5.remove();
|
82 |
-
updateReviewState(6);
|
83 |
-
});
|
84 |
-
});
|
85 |
-
})(jQuery);
|
86 |
</script>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$state = NextendSocialLogin::$settings->get('review_state');
|
4 |
+
|
5 |
+
if ((0 < $state && $state < 5) || $state == 6) {
|
6 |
+
// Rated 1, 2, 3, 4 OR 6
|
7 |
+
return;
|
8 |
+
}
|
9 |
+
?>
|
10 |
+
|
11 |
+
<?php if ($state == -1): ?>
|
12 |
+
<div class="nsl-box-review nsl-box-review-step-1" data-stars="0">
|
13 |
+
<div class="nsl-box-review-bigstar"></div>
|
14 |
+
<div class="nsl-box-review-label" data-star="0"><?php _e('Rate your experience!', 'nextend-facebook-connect'); ?></div>
|
15 |
+
<div class="nsl-box-review-label" data-star="1"><?php _e('Hated it', 'nextend-facebook-connect'); ?></div>
|
16 |
+
<div class="nsl-box-review-label" data-star="2"><?php _e('Disliked it', 'nextend-facebook-connect'); ?></div>
|
17 |
+
<div class="nsl-box-review-label" data-star="3"><?php _e('It was ok', 'nextend-facebook-connect'); ?></div>
|
18 |
+
<div class="nsl-box-review-label" data-star="4"><?php _e('Liked it', 'nextend-facebook-connect'); ?></div>
|
19 |
+
<div class="nsl-box-review-label" data-star="5"><?php _e('Loved it', 'nextend-facebook-connect'); ?></div>
|
20 |
+
<div class="nsl-box-review-stars-container">
|
21 |
+
<div class="nsl-box-review-star" data-star="1" data-href="<?php echo esc_attr(NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/contact-us/suggestion/', 'dashboard-review-1')); ?>"></div>
|
22 |
+
<div class="nsl-box-review-star" data-star="2" data-href="<?php echo esc_attr(NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/contact-us/suggestion/', 'dashboard-review-2')); ?>"></div>
|
23 |
+
<div class="nsl-box-review-star" data-star="3" data-href="<?php echo esc_attr(NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/contact-us/satisfaction-feedback/', 'dashboard-review-3')); ?>"></div>
|
24 |
+
<div class="nsl-box-review-star" data-star="4" data-href="<?php echo esc_attr(NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/contact-us/satisfaction-feedback/', 'dashboard-review-4')); ?>"></div>
|
25 |
+
<div class="nsl-box-review-star" data-star="5"></div>
|
26 |
+
</div>
|
27 |
+
</div>
|
28 |
+
<?php endif; ?>
|
29 |
+
|
30 |
+
<div class="nsl-box-review nsl-box-review-star-5" <?php if ($state != 5): ?>style="display:none;"<?php endif; ?>>
|
31 |
+
<h3><?php _e('Please Leave a Review', 'nextend-facebook-connect'); ?></h3>
|
32 |
+
<div class="nsl-box-review-star-5-description"><?php _e('If you are happy with <b>Nextend Social Login</b> and can take a minute please leave us a review. It will be a tremendous help for us!', 'nextend-facebook-connect'); ?></div>
|
33 |
+
<div class="nsl-box-review-star-5-primary">
|
34 |
+
<a href="<?php echo esc_attr(NextendSocialLoginAdmin::trackUrl('https://nextendweb.com/redirect/nsl-review.html', 'dashboard-review-5')); ?>" target="_blank" class="button button-primary"><?php _e('Ok, you deserve it', 'nextend-facebook-connect'); ?></a>
|
35 |
+
</div>
|
36 |
+
|
37 |
+
<div class="nsl-box-review-star-5-close"></div>
|
38 |
+
</div>
|
39 |
+
<script>
|
40 |
+
(function ($) {
|
41 |
+
$(document).ready(function () {
|
42 |
+
var $box = $('.nsl-box-review-step-1'),
|
43 |
+
$box5 = $('.nsl-box-review-star-5'),
|
44 |
+
updateReviewState = function (state) {
|
45 |
+
$.post(ajaxurl, {
|
46 |
+
'action': 'nsl_save_review_state',
|
47 |
+
'review_state': state,
|
48 |
+
'_ajax_nonce': <?php echo wp_json_encode(wp_create_nonce('nsl_save_review_state')); ?>
|
49 |
+
});
|
50 |
+
};
|
51 |
+
$box.find('.nsl-box-review-star').on({
|
52 |
+
mouseenter: function () {
|
53 |
+
$box.attr('data-stars', $(this).data('star'));
|
54 |
+
},
|
55 |
+
click: function (e) {
|
56 |
+
e.preventDefault();
|
57 |
+
|
58 |
+
var star = parseInt($(this).data('star'));
|
59 |
+
if (star < 5) {
|
60 |
+
var win = window.open($(this).data('href'), '_blank');
|
61 |
+
|
62 |
+
$box.remove();
|
63 |
+
|
64 |
+
updateReviewState(star);
|
65 |
+
|
66 |
+
win.focus();
|
67 |
+
} else {
|
68 |
+
updateReviewState(5);
|
69 |
+
$box.remove();
|
70 |
+
$box5.css('display', '');
|
71 |
+
}
|
72 |
+
}
|
73 |
+
});
|
74 |
+
$box.find('.nsl-box-review-stars-container').on({
|
75 |
+
mouseleave: function () {
|
76 |
+
$box.attr('data-stars', 0);
|
77 |
+
}
|
78 |
+
});
|
79 |
+
|
80 |
+
$box5.find('a, .nsl-box-review-star-5-close').on('click', function () {
|
81 |
+
$box5.remove();
|
82 |
+
updateReviewState(6);
|
83 |
+
});
|
84 |
+
});
|
85 |
+
})(jQuery);
|
86 |
</script>
|
admin/templates/settings/buddypress.php
CHANGED
@@ -1,171 +1,171 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
|
4 |
-
$isPRO = NextendSocialLoginAdmin::isPro();
|
5 |
-
|
6 |
-
$attr = '';
|
7 |
-
if (!$isPRO) {
|
8 |
-
$attr = ' disabled ';
|
9 |
-
}
|
10 |
-
|
11 |
-
$settings = NextendSocialLogin::$settings;
|
12 |
-
|
13 |
-
NextendSocialLoginAdmin::showProBox();
|
14 |
-
?>
|
15 |
-
<table class="form-table">
|
16 |
-
<tbody>
|
17 |
-
<tr>
|
18 |
-
<th scope="row"><?php _e('Register form', 'nextend-facebook-connect'); ?></th>
|
19 |
-
<td>
|
20 |
-
<fieldset>
|
21 |
-
<label><input type="radio" name="buddypress_register_button"
|
22 |
-
value="" <?php if ($settings->get('buddypress_register_button') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
23 |
-
<span><?php _e('No Connect button', 'nextend-facebook-connect'); ?></span></label><br>
|
24 |
-
<label><input type="radio" name="buddypress_register_button"
|
25 |
-
value="bp_before_register_page" <?php if ($settings->get('buddypress_register_button') == 'bp_before_register_page') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
26 |
-
<span><?php _e('Connect button before register', 'nextend-facebook-connect'); ?></span>
|
27 |
-
<code><?php _e('Action:'); ?>
|
28 |
-
bp_before_register_page</code></label><br>
|
29 |
-
<label><input type="radio" name="buddypress_register_button"
|
30 |
-
value="bp_before_account_details_fields" <?php if ($settings->get('buddypress_register_button') == 'bp_before_account_details_fields') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
31 |
-
<span><?php _e('Connect button before account details', 'nextend-facebook-connect'); ?></span>
|
32 |
-
<code><?php _e('Action:'); ?>
|
33 |
-
bp_before_account_details_fields</code></label><br>
|
34 |
-
<label><input type="radio" name="buddypress_register_button"
|
35 |
-
value="bp_after_register_page" <?php if ($settings->get('buddypress_register_button') == 'bp_after_register_page') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
36 |
-
<span><?php _e('Connect button after register', 'nextend-facebook-connect'); ?></span>
|
37 |
-
<code><?php _e('Action:'); ?>
|
38 |
-
bp_after_register_page</code></label><br>
|
39 |
-
</fieldset>
|
40 |
-
</td>
|
41 |
-
</tr>
|
42 |
-
|
43 |
-
<tr>
|
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; ?>>
|
50 |
-
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
51 |
-
<img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
|
52 |
-
</label>
|
53 |
-
<label>
|
54 |
-
<input type="radio" name="buddypress_register_button_style"
|
55 |
-
value="icon" <?php if ($settings->get('buddypress_register_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
56 |
-
<span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
|
57 |
-
<img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
|
58 |
-
</label><br>
|
59 |
-
</fieldset>
|
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>
|
81 |
-
<td>
|
82 |
-
<fieldset>
|
83 |
-
<label><input type="radio" name="buddypress_login"
|
84 |
-
value="" <?php if ($settings->get('buddypress_login') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
85 |
-
<span><?php _e('Hide login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
86 |
-
<label><input type="radio" name="buddypress_login"
|
87 |
-
value="show" <?php if ($settings->get('buddypress_login') == 'show') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
88 |
-
<span><?php _e('Show login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
89 |
-
</fieldset>
|
90 |
-
</td>
|
91 |
-
</tr>
|
92 |
-
<tr>
|
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; ?>>
|
99 |
-
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
100 |
-
<img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
|
101 |
-
</label>
|
102 |
-
<label>
|
103 |
-
<input type="radio" name="buddypress_login_button_style"
|
104 |
-
value="icon" <?php if ($settings->get('buddypress_login_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
105 |
-
<span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
|
106 |
-
<img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
|
107 |
-
</label><br>
|
108 |
-
</fieldset>
|
109 |
-
</td>
|
110 |
-
</tr>
|
111 |
-
<tr>
|
112 |
-
<th scope="row"><?php _e('Login layout', 'nextend-facebook-connect'); ?></th>
|
113 |
-
<td>
|
114 |
-
<fieldset>
|
115 |
-
<label>
|
116 |
-
<input type="radio" name="buddypress_login_form_layout"
|
117 |
-
value="default" <?php if ($settings->get('buddypress_login_form_layout') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
118 |
-
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
119 |
-
<img src="<?php echo plugins_url('images/layouts/default.png', NSL_ADMIN_PATH) ?>"/>
|
120 |
-
</label>
|
121 |
-
<label>
|
122 |
-
<input type="radio" name="buddypress_login_form_layout"
|
123 |
-
value="below" <?php if ($settings->get('buddypress_login_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
124 |
-
<span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
|
125 |
-
<img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
|
126 |
-
</label>
|
127 |
-
<label>
|
128 |
-
<input type="radio" name="buddypress_login_form_layout"
|
129 |
-
value="below-separator" <?php if ($settings->get('buddypress_login_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
130 |
-
<span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
|
131 |
-
<img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
|
132 |
-
</label>
|
133 |
-
<label>
|
134 |
-
<input type="radio" name="buddypress_login_form_layout"
|
135 |
-
value="above" <?php if ($settings->get('buddypress_login_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
136 |
-
<span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
|
137 |
-
<img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
|
138 |
-
</label>
|
139 |
-
<label>
|
140 |
-
<input type="radio" name="buddypress_login_form_layout"
|
141 |
-
value="above-separator" <?php if ($settings->get('buddypress_login_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
142 |
-
<span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
|
143 |
-
<img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
|
144 |
-
</label><br>
|
145 |
-
</fieldset>
|
146 |
-
</td>
|
147 |
-
</tr>
|
148 |
-
|
149 |
-
<tr>
|
150 |
-
<th scope="row"><?php _e('Button alignment', 'nextend-facebook-connect'); ?></th>
|
151 |
-
<td>
|
152 |
-
<fieldset>
|
153 |
-
<label><input type="radio" name="buddypress_register_button_align"
|
154 |
-
value="left" <?php if ($settings->get('buddypress_register_button_align') == 'left') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
155 |
-
<span><?php _e('Left', 'nextend-facebook-connect'); ?></span></label><br>
|
156 |
-
<label><input type="radio" name="buddypress_register_button_align"
|
157 |
-
value="center" <?php if ($settings->get('buddypress_register_button_align') == 'center') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
158 |
-
<span><?php _e('Center', 'nextend-facebook-connect'); ?></span></label><br>
|
159 |
-
|
160 |
-
<label><input type="radio" name="buddypress_register_button_align"
|
161 |
-
value="right" <?php if ($settings->get('buddypress_register_button_align') == 'right') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
162 |
-
<span><?php _e('Right', 'nextend-facebook-connect'); ?></span></label><br>
|
163 |
-
</fieldset>
|
164 |
-
</td>
|
165 |
-
</tr>
|
166 |
-
</tbody>
|
167 |
-
</table>
|
168 |
-
<?php if ($isPRO): ?>
|
169 |
-
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
170 |
-
value="<?php _e('Save Changes'); ?>"></p>
|
171 |
-
<?php endif; ?>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
|
4 |
+
$isPRO = NextendSocialLoginAdmin::isPro();
|
5 |
+
|
6 |
+
$attr = '';
|
7 |
+
if (!$isPRO) {
|
8 |
+
$attr = ' disabled ';
|
9 |
+
}
|
10 |
+
|
11 |
+
$settings = NextendSocialLogin::$settings;
|
12 |
+
|
13 |
+
NextendSocialLoginAdmin::showProBox();
|
14 |
+
?>
|
15 |
+
<table class="form-table">
|
16 |
+
<tbody>
|
17 |
+
<tr>
|
18 |
+
<th scope="row"><?php _e('Register form', 'nextend-facebook-connect'); ?></th>
|
19 |
+
<td>
|
20 |
+
<fieldset>
|
21 |
+
<label><input type="radio" name="buddypress_register_button"
|
22 |
+
value="" <?php if ($settings->get('buddypress_register_button') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
23 |
+
<span><?php _e('No Connect button', 'nextend-facebook-connect'); ?></span></label><br>
|
24 |
+
<label><input type="radio" name="buddypress_register_button"
|
25 |
+
value="bp_before_register_page" <?php if ($settings->get('buddypress_register_button') == 'bp_before_register_page') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
26 |
+
<span><?php _e('Connect button before register', 'nextend-facebook-connect'); ?></span>
|
27 |
+
<code><?php _e('Action:'); ?>
|
28 |
+
bp_before_register_page</code></label><br>
|
29 |
+
<label><input type="radio" name="buddypress_register_button"
|
30 |
+
value="bp_before_account_details_fields" <?php if ($settings->get('buddypress_register_button') == 'bp_before_account_details_fields') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
31 |
+
<span><?php _e('Connect button before account details', 'nextend-facebook-connect'); ?></span>
|
32 |
+
<code><?php _e('Action:'); ?>
|
33 |
+
bp_before_account_details_fields</code></label><br>
|
34 |
+
<label><input type="radio" name="buddypress_register_button"
|
35 |
+
value="bp_after_register_page" <?php if ($settings->get('buddypress_register_button') == 'bp_after_register_page') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
36 |
+
<span><?php _e('Connect button after register', 'nextend-facebook-connect'); ?></span>
|
37 |
+
<code><?php _e('Action:'); ?>
|
38 |
+
bp_after_register_page</code></label><br>
|
39 |
+
</fieldset>
|
40 |
+
</td>
|
41 |
+
</tr>
|
42 |
+
|
43 |
+
<tr>
|
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; ?>>
|
50 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
51 |
+
<img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
|
52 |
+
</label>
|
53 |
+
<label>
|
54 |
+
<input type="radio" name="buddypress_register_button_style"
|
55 |
+
value="icon" <?php if ($settings->get('buddypress_register_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
56 |
+
<span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
|
57 |
+
<img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
|
58 |
+
</label><br>
|
59 |
+
</fieldset>
|
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>
|
81 |
+
<td>
|
82 |
+
<fieldset>
|
83 |
+
<label><input type="radio" name="buddypress_login"
|
84 |
+
value="" <?php if ($settings->get('buddypress_login') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
85 |
+
<span><?php _e('Hide login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
86 |
+
<label><input type="radio" name="buddypress_login"
|
87 |
+
value="show" <?php if ($settings->get('buddypress_login') == 'show') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
88 |
+
<span><?php _e('Show login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
89 |
+
</fieldset>
|
90 |
+
</td>
|
91 |
+
</tr>
|
92 |
+
<tr>
|
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; ?>>
|
99 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
100 |
+
<img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
|
101 |
+
</label>
|
102 |
+
<label>
|
103 |
+
<input type="radio" name="buddypress_login_button_style"
|
104 |
+
value="icon" <?php if ($settings->get('buddypress_login_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
105 |
+
<span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
|
106 |
+
<img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
|
107 |
+
</label><br>
|
108 |
+
</fieldset>
|
109 |
+
</td>
|
110 |
+
</tr>
|
111 |
+
<tr>
|
112 |
+
<th scope="row"><?php _e('Login layout', 'nextend-facebook-connect'); ?></th>
|
113 |
+
<td>
|
114 |
+
<fieldset>
|
115 |
+
<label>
|
116 |
+
<input type="radio" name="buddypress_login_form_layout"
|
117 |
+
value="default" <?php if ($settings->get('buddypress_login_form_layout') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
118 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
119 |
+
<img src="<?php echo plugins_url('images/layouts/default.png', NSL_ADMIN_PATH) ?>"/>
|
120 |
+
</label>
|
121 |
+
<label>
|
122 |
+
<input type="radio" name="buddypress_login_form_layout"
|
123 |
+
value="below" <?php if ($settings->get('buddypress_login_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
124 |
+
<span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
|
125 |
+
<img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
|
126 |
+
</label>
|
127 |
+
<label>
|
128 |
+
<input type="radio" name="buddypress_login_form_layout"
|
129 |
+
value="below-separator" <?php if ($settings->get('buddypress_login_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
130 |
+
<span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
|
131 |
+
<img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
|
132 |
+
</label>
|
133 |
+
<label>
|
134 |
+
<input type="radio" name="buddypress_login_form_layout"
|
135 |
+
value="above" <?php if ($settings->get('buddypress_login_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
136 |
+
<span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
|
137 |
+
<img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
|
138 |
+
</label>
|
139 |
+
<label>
|
140 |
+
<input type="radio" name="buddypress_login_form_layout"
|
141 |
+
value="above-separator" <?php if ($settings->get('buddypress_login_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
142 |
+
<span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
|
143 |
+
<img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
|
144 |
+
</label><br>
|
145 |
+
</fieldset>
|
146 |
+
</td>
|
147 |
+
</tr>
|
148 |
+
|
149 |
+
<tr>
|
150 |
+
<th scope="row"><?php _e('Button alignment', 'nextend-facebook-connect'); ?></th>
|
151 |
+
<td>
|
152 |
+
<fieldset>
|
153 |
+
<label><input type="radio" name="buddypress_register_button_align"
|
154 |
+
value="left" <?php if ($settings->get('buddypress_register_button_align') == 'left') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
155 |
+
<span><?php _e('Left', 'nextend-facebook-connect'); ?></span></label><br>
|
156 |
+
<label><input type="radio" name="buddypress_register_button_align"
|
157 |
+
value="center" <?php if ($settings->get('buddypress_register_button_align') == 'center') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
158 |
+
<span><?php _e('Center', 'nextend-facebook-connect'); ?></span></label><br>
|
159 |
+
|
160 |
+
<label><input type="radio" name="buddypress_register_button_align"
|
161 |
+
value="right" <?php if ($settings->get('buddypress_register_button_align') == 'right') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
162 |
+
<span><?php _e('Right', 'nextend-facebook-connect'); ?></span></label><br>
|
163 |
+
</fieldset>
|
164 |
+
</td>
|
165 |
+
</tr>
|
166 |
+
</tbody>
|
167 |
+
</table>
|
168 |
+
<?php if ($isPRO): ?>
|
169 |
+
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
170 |
+
value="<?php _e('Save Changes'); ?>"></p>
|
171 |
+
<?php endif; ?>
|
admin/templates/settings/comment.php
CHANGED
@@ -1,74 +1,74 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
|
4 |
-
$isPRO = NextendSocialLoginAdmin::isPro();
|
5 |
-
|
6 |
-
$attr = '';
|
7 |
-
if (!$isPRO) {
|
8 |
-
$attr = ' disabled ';
|
9 |
-
}
|
10 |
-
|
11 |
-
$settings = NextendSocialLogin::$settings;
|
12 |
-
|
13 |
-
NextendSocialLoginAdmin::showProBox();
|
14 |
-
?>
|
15 |
-
<table class="form-table">
|
16 |
-
<tbody>
|
17 |
-
<tr>
|
18 |
-
<th scope="row"><?php _e('Login button', 'nextend-facebook-connect'); ?></th>
|
19 |
-
<td>
|
20 |
-
<fieldset>
|
21 |
-
<label><input type="radio" name="comment_login_button"
|
22 |
-
value="show" <?php if ($settings->get('comment_login_button') == 'show') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
23 |
-
<span><?php _e('Show', 'nextend-facebook-connect'); ?></span></label><br>
|
24 |
-
<label><input type="radio" name="comment_login_button"
|
25 |
-
value="hide" <?php if ($settings->get('comment_login_button') == 'hide') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
26 |
-
<span><?php _e('Hide', 'nextend-facebook-connect'); ?></span></label><br>
|
27 |
-
</fieldset>
|
28 |
-
<p class="description"><?php printf(__('You need to turn on the \' %1$s > %2$s > %3$s \' for this feature to work', 'nextend-facebook-connect'), __('Settings'), __('Discussion'), __('Users must be registered and logged in to comment')); ?></p>
|
29 |
-
</td>
|
30 |
-
</tr>
|
31 |
-
|
32 |
-
<tr>
|
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; ?>>
|
39 |
-
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
40 |
-
<img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
|
41 |
-
</label>
|
42 |
-
<label>
|
43 |
-
<input type="radio" name="comment_button_style"
|
44 |
-
value="icon" <?php if ($settings->get('comment_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
45 |
-
<span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
|
46 |
-
<img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
|
47 |
-
</label><br>
|
48 |
-
</fieldset>
|
49 |
-
</td>
|
50 |
-
</tr>
|
51 |
-
|
52 |
-
<tr>
|
53 |
-
<th scope="row"><?php _e('Button alignment', 'nextend-facebook-connect'); ?></th>
|
54 |
-
<td>
|
55 |
-
<fieldset>
|
56 |
-
<label><input type="radio" name="comment_button_align"
|
57 |
-
value="left" <?php if ($settings->get('comment_button_align') == 'left') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
58 |
-
<span><?php _e('Left', 'nextend-facebook-connect'); ?></span></label><br>
|
59 |
-
<label><input type="radio" name="comment_button_align"
|
60 |
-
value="center" <?php if ($settings->get('comment_button_align') == 'center') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
61 |
-
<span><?php _e('Center', 'nextend-facebook-connect'); ?></span></label><br>
|
62 |
-
|
63 |
-
<label><input type="radio" name="comment_button_align"
|
64 |
-
value="right" <?php if ($settings->get('comment_button_align') == 'right') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
65 |
-
<span><?php _e('Right', 'nextend-facebook-connect'); ?></span></label><br>
|
66 |
-
</fieldset>
|
67 |
-
</td>
|
68 |
-
</tr>
|
69 |
-
</tbody>
|
70 |
-
</table>
|
71 |
-
<?php if ($isPRO): ?>
|
72 |
-
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
73 |
-
value="<?php _e('Save Changes'); ?>"></p>
|
74 |
-
<?php endif; ?>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
|
4 |
+
$isPRO = NextendSocialLoginAdmin::isPro();
|
5 |
+
|
6 |
+
$attr = '';
|
7 |
+
if (!$isPRO) {
|
8 |
+
$attr = ' disabled ';
|
9 |
+
}
|
10 |
+
|
11 |
+
$settings = NextendSocialLogin::$settings;
|
12 |
+
|
13 |
+
NextendSocialLoginAdmin::showProBox();
|
14 |
+
?>
|
15 |
+
<table class="form-table">
|
16 |
+
<tbody>
|
17 |
+
<tr>
|
18 |
+
<th scope="row"><?php _e('Login button', 'nextend-facebook-connect'); ?></th>
|
19 |
+
<td>
|
20 |
+
<fieldset>
|
21 |
+
<label><input type="radio" name="comment_login_button"
|
22 |
+
value="show" <?php if ($settings->get('comment_login_button') == 'show') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
23 |
+
<span><?php _e('Show', 'nextend-facebook-connect'); ?></span></label><br>
|
24 |
+
<label><input type="radio" name="comment_login_button"
|
25 |
+
value="hide" <?php if ($settings->get('comment_login_button') == 'hide') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
26 |
+
<span><?php _e('Hide', 'nextend-facebook-connect'); ?></span></label><br>
|
27 |
+
</fieldset>
|
28 |
+
<p class="description"><?php printf(__('You need to turn on the \' %1$s > %2$s > %3$s \' for this feature to work', 'nextend-facebook-connect'), __('Settings'), __('Discussion'), __('Users must be registered and logged in to comment')); ?></p>
|
29 |
+
</td>
|
30 |
+
</tr>
|
31 |
+
|
32 |
+
<tr>
|
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; ?>>
|
39 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
40 |
+
<img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
|
41 |
+
</label>
|
42 |
+
<label>
|
43 |
+
<input type="radio" name="comment_button_style"
|
44 |
+
value="icon" <?php if ($settings->get('comment_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
45 |
+
<span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
|
46 |
+
<img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
|
47 |
+
</label><br>
|
48 |
+
</fieldset>
|
49 |
+
</td>
|
50 |
+
</tr>
|
51 |
+
|
52 |
+
<tr>
|
53 |
+
<th scope="row"><?php _e('Button alignment', 'nextend-facebook-connect'); ?></th>
|
54 |
+
<td>
|
55 |
+
<fieldset>
|
56 |
+
<label><input type="radio" name="comment_button_align"
|
57 |
+
value="left" <?php if ($settings->get('comment_button_align') == 'left') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
58 |
+
<span><?php _e('Left', 'nextend-facebook-connect'); ?></span></label><br>
|
59 |
+
<label><input type="radio" name="comment_button_align"
|
60 |
+
value="center" <?php if ($settings->get('comment_button_align') == 'center') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
61 |
+
<span><?php _e('Center', 'nextend-facebook-connect'); ?></span></label><br>
|
62 |
+
|
63 |
+
<label><input type="radio" name="comment_button_align"
|
64 |
+
value="right" <?php if ($settings->get('comment_button_align') == 'right') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
65 |
+
<span><?php _e('Right', 'nextend-facebook-connect'); ?></span></label><br>
|
66 |
+
</fieldset>
|
67 |
+
</td>
|
68 |
+
</tr>
|
69 |
+
</tbody>
|
70 |
+
</table>
|
71 |
+
<?php if ($isPRO): ?>
|
72 |
+
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
73 |
+
value="<?php _e('Save Changes'); ?>"></p>
|
74 |
+
<?php endif; ?>
|
admin/templates/settings/general-pro.php
CHANGED
@@ -1,111 +1,113 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
|
4 |
-
$isPRO = NextendSocialLoginAdmin::isPro();
|
5 |
-
if (!$isPRO):
|
6 |
-
?>
|
7 |
-
<p class="submit"
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
<
|
27 |
-
<
|
28 |
-
<
|
29 |
-
<
|
30 |
-
|
31 |
-
|
32 |
-
<
|
33 |
-
|
34 |
-
|
35 |
-
<
|
36 |
-
|
37 |
-
|
38 |
-
<
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
<
|
46 |
-
<
|
47 |
-
|
48 |
-
|
49 |
-
<
|
50 |
-
|
51 |
-
|
52 |
-
<
|
53 |
-
|
54 |
-
|
55 |
-
<
|
56 |
-
|
57 |
-
|
58 |
-
<
|
59 |
-
|
60 |
-
|
61 |
-
<
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
<
|
69 |
-
<
|
70 |
-
|
71 |
-
|
72 |
-
<
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
111 |
<?php endif; ?>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
|
4 |
+
$isPRO = NextendSocialLoginAdmin::isPro();
|
5 |
+
if (!$isPRO):
|
6 |
+
?>
|
7 |
+
<p class="submit">
|
8 |
+
<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e('Save Changes'); ?>">
|
9 |
+
</p>
|
10 |
+
|
11 |
+
<hr/>
|
12 |
+
<h1><?php _e('PRO settings', 'nextend-facebook-connect'); ?></h1>
|
13 |
+
<?php
|
14 |
+
endif;
|
15 |
+
|
16 |
+
$attr = '';
|
17 |
+
if (!$isPRO) {
|
18 |
+
$attr = ' disabled ';
|
19 |
+
}
|
20 |
+
|
21 |
+
$settings = NextendSocialLogin::$settings;
|
22 |
+
|
23 |
+
NextendSocialLoginAdmin::showProBox();
|
24 |
+
?>
|
25 |
+
|
26 |
+
<table class="form-table">
|
27 |
+
<tbody>
|
28 |
+
<tr>
|
29 |
+
<th scope="row"><?php _e('Target window', 'nextend-facebook-connect'); ?></th>
|
30 |
+
<td>
|
31 |
+
<fieldset>
|
32 |
+
<label><input type="radio" name="target"
|
33 |
+
value="prefer-popup" <?php if ($settings->get('target') == 'prefer-popup') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
34 |
+
<span><?php _e('Prefer popup', 'nextend-facebook-connect'); ?></span></label><br>
|
35 |
+
<label><input type="radio" name="target"
|
36 |
+
value="prefer-new-tab" <?php if ($settings->get('target') == 'prefer-new-tab') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
37 |
+
<span><?php _e('Prefer new tab', 'nextend-facebook-connect'); ?></span></label><br>
|
38 |
+
<label><input type="radio" name="target"
|
39 |
+
value="prefer-same-window" <?php if ($settings->get('target') == 'prefer-same-window') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
40 |
+
<span><?php _e('Prefer same window', 'nextend-facebook-connect'); ?></span></label><br>
|
41 |
+
</fieldset>
|
42 |
+
</td>
|
43 |
+
</tr>
|
44 |
+
|
45 |
+
<tr>
|
46 |
+
<th scope="row"><?php _e('Registration notification sent to', 'nextend-facebook-connect'); ?></th>
|
47 |
+
<td>
|
48 |
+
<fieldset>
|
49 |
+
<label><input type="radio" name="registration_notification_notify"
|
50 |
+
value="0" <?php if ($settings->get('registration_notification_notify') == '0') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
51 |
+
<span><?php _e('WordPress default', 'nextend-facebook-connect'); ?></span></label><br>
|
52 |
+
<label><input type="radio" name="registration_notification_notify"
|
53 |
+
value="nobody" <?php if ($settings->get('registration_notification_notify') == 'nobody') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
54 |
+
<span><?php _e('Nobody', 'nextend-facebook-connect'); ?></span></label><br>
|
55 |
+
<label><input type="radio" name="registration_notification_notify"
|
56 |
+
value="user" <?php if ($settings->get('registration_notification_notify') == 'user') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
57 |
+
<span><?php _e('User', 'nextend-facebook-connect'); ?></span></label><br>
|
58 |
+
<label><input type="radio" name="registration_notification_notify"
|
59 |
+
value="admin" <?php if ($settings->get('registration_notification_notify') == 'admin') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
60 |
+
<span><?php _e('Admin', 'nextend-facebook-connect'); ?></span></label><br>
|
61 |
+
<label><input type="radio" name="registration_notification_notify"
|
62 |
+
value="both" <?php if ($settings->get('registration_notification_notify') == 'both') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
63 |
+
<span><?php _e('User and Admin', 'nextend-facebook-connect'); ?></span></label><br>
|
64 |
+
</fieldset>
|
65 |
+
</td>
|
66 |
+
</tr>
|
67 |
+
|
68 |
+
<tr>
|
69 |
+
<th scope="row"><?php _e('Unlink', 'nextend-facebook-connect'); ?></th>
|
70 |
+
<td>
|
71 |
+
<fieldset>
|
72 |
+
<label>
|
73 |
+
<input type='hidden' name='allow_unlink' value='0'>
|
74 |
+
<input type="checkbox" name="allow_unlink" value="1" <?php if ($settings->get('allow_unlink') != '0') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
75 |
+
<span><?php _e('Allow Social account unlink', 'nextend-facebook-connect'); ?></span></label><br>
|
76 |
+
</fieldset>
|
77 |
+
</td>
|
78 |
+
</tr>
|
79 |
+
|
80 |
+
<tr>
|
81 |
+
<th scope="row"><?php _e('Disable Admin bar for roles', 'nextend-facebook-connect'); ?></th>
|
82 |
+
|
83 |
+
<td>
|
84 |
+
<?php
|
85 |
+
$wp_roles = new WP_Roles();
|
86 |
+
$roles = $wp_roles->get_names();
|
87 |
+
|
88 |
+
$adminbar_disabled_roles = $settings->get('admin_bar_roles');
|
89 |
+
foreach ($roles AS $roleKey => $label):
|
90 |
+
?>
|
91 |
+
<fieldset><label for="admin_bar_roles_<?php echo esc_attr($roleKey); ?>">
|
92 |
+
<input name="admin_bar_roles[]" type="checkbox"
|
93 |
+
id="admin_bar_roles_<?php echo esc_attr($roleKey); ?>"
|
94 |
+
value="<?php echo esc_attr($roleKey); ?>" <?php if (in_array($roleKey, $adminbar_disabled_roles)) : ?> checked="checked" <?php endif ?> <?php echo $attr; ?> />
|
95 |
+
<?php echo $label; ?></label>
|
96 |
+
</fieldset>
|
97 |
+
<?php endforeach; ?>
|
98 |
+
<input type="hidden" name="admin_bar_roles[]" value=""/>
|
99 |
+
</td>
|
100 |
+
|
101 |
+
<td>
|
102 |
+
<fieldset>
|
103 |
+
<input type='hidden' name='admin_bar_roles[]' value='0'>
|
104 |
+
</fieldset>
|
105 |
+
</td>
|
106 |
+
</tr>
|
107 |
+
|
108 |
+
</tbody>
|
109 |
+
</table>
|
110 |
+
<?php if ($isPRO): ?>
|
111 |
+
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
112 |
+
value="<?php _e('Save Changes'); ?>"></p>
|
113 |
<?php endif; ?>
|
admin/templates/settings/general.php
CHANGED
@@ -1,240 +1,259 @@
|
|
1 |
-
<script type="text/javascript">
|
2 |
-
(function ($) {
|
3 |
-
$(document).ready(function () {
|
4 |
-
$('#custom_redirect_enabled').on('change', function () {
|
5 |
-
if ($(this).is(':checked')) {
|
6 |
-
$('#redirect').css('display', '');
|
7 |
-
}
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
$('#default_redirect').css('display', '');
|
25 |
-
}
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
<
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
</
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
?>
|
1 |
+
<script type="text/javascript">
|
2 |
+
(function ($) {
|
3 |
+
$(document).ready(function () {
|
4 |
+
$('#custom_redirect_enabled').on('change', function () {
|
5 |
+
if ($(this).is(':checked')) {
|
6 |
+
$('#redirect').css('display', '');
|
7 |
+
} else {
|
8 |
+
$('#redirect').css('display', 'none');
|
9 |
+
}
|
10 |
+
});
|
11 |
+
|
12 |
+
$('#custom_redirect_reg_enabled').on('change', function () {
|
13 |
+
if ($(this).is(':checked')) {
|
14 |
+
$('#redirect_reg').css('display', '');
|
15 |
+
} else {
|
16 |
+
$('#redirect_reg').css('display', 'none');
|
17 |
+
}
|
18 |
+
});
|
19 |
+
|
20 |
+
$('#default_redirect_enabled').on('change', function () {
|
21 |
+
if ($(this).is(':checked')) {
|
22 |
+
$('#default_redirect').css('display', '');
|
23 |
+
} else {
|
24 |
+
$('#default_redirect').css('display', 'none');
|
25 |
+
}
|
26 |
+
});
|
27 |
+
|
28 |
+
$('#default_redirect_reg_enabled').on('change', function () {
|
29 |
+
if ($(this).is(':checked')) {
|
30 |
+
$('#default_redirect_reg').css('display', '');
|
31 |
+
} else {
|
32 |
+
$('#default_redirect_reg').css('display', 'none');
|
33 |
+
}
|
34 |
+
});
|
35 |
+
});
|
36 |
+
})(jQuery);
|
37 |
+
</script>
|
38 |
+
|
39 |
+
|
40 |
+
<table class="form-table">
|
41 |
+
<tbody>
|
42 |
+
<tr>
|
43 |
+
<th scope="row"><?php _e('Debug mode', 'nextend-facebook-connect'); ?></th>
|
44 |
+
<td>
|
45 |
+
<fieldset>
|
46 |
+
<label><input type="radio" name="debug"
|
47 |
+
value="0" <?php if ($settings->get('debug') == '0') : ?> checked="checked" <?php endif; ?>>
|
48 |
+
<span><?php _e('Disabled', 'nextend-facebook-connect'); ?></span></label><br>
|
49 |
+
<label><input type="radio" name="debug"
|
50 |
+
value="1" <?php if ($settings->get('debug') == '1') : ?> checked="checked" <?php endif; ?>>
|
51 |
+
<span><?php _e('Enabled', 'nextend-facebook-connect'); ?></span></label><br>
|
52 |
+
</fieldset>
|
53 |
+
</td>
|
54 |
+
</tr>
|
55 |
+
<tr>
|
56 |
+
<th scope="row"><?php _e('Page for register flow', 'nextend-facebook-connect'); ?></th>
|
57 |
+
<td>
|
58 |
+
<?php
|
59 |
+
add_filter('get_pages', array(
|
60 |
+
'NextendSocialLogin',
|
61 |
+
'getFreePagesForRegisterFlow'
|
62 |
+
));
|
63 |
+
|
64 |
+
wp_dropdown_pages(array(
|
65 |
+
'name' => 'register-flow-page',
|
66 |
+
'show_option_none' => __('None', "nextend-facebook-connect"),
|
67 |
+
'selected' => $settings->get('register-flow-page')
|
68 |
+
));
|
69 |
+
remove_filter('get_pages', array(
|
70 |
+
'NextendSocialLogin',
|
71 |
+
'getFreePagesForRegisterFlow'
|
72 |
+
));
|
73 |
+
?>
|
74 |
+
<p class="description" id="tagline-register-flow-page-1"><?php _e("This setting is used when you request additional data from the users (such as email address) and to display the Terms and conditions.", "nextend-facebook-connect"); ?></p>
|
75 |
+
<p class="description" id="tagline-register-flow-page"><?php printf(__('%2$s First create a new page and insert the following shortcode: %1$s then select this page above', 'nextend-facebook-connect'), '<code>[nextend_social_login_register_flow]</code>', '<b>' . __("Usage:", "nextend-facebook-connect") . '</b>'); ?></p>
|
76 |
+
<p class="description" id="tagline-register-flow-page"><?php printf(__('%1$s You won\'t be able to reach the selected page unless a social login/registration happens.', 'nextend-facebook-connect'), '<b>' . __("Important:", "nextend-facebook-connect") . '</b>'); ?></p>
|
77 |
+
</td>
|
78 |
+
</tr>
|
79 |
+
<tr>
|
80 |
+
<th scope="row"><?php _e('OAuth redirect uri proxy page', 'nextend-facebook-connect'); ?></th>
|
81 |
+
<td>
|
82 |
+
|
83 |
+
<?php
|
84 |
+
add_filter('get_pages', array(
|
85 |
+
'NextendSocialLogin',
|
86 |
+
'getFreePagesForOauthProxyPage'
|
87 |
+
));
|
88 |
+
|
89 |
+
wp_dropdown_pages(array(
|
90 |
+
'name' => 'proxy-page',
|
91 |
+
'show_option_none' => __('None', "nextend-facebook-connect"),
|
92 |
+
'selected' => $settings->get('proxy-page')
|
93 |
+
));
|
94 |
+
|
95 |
+
remove_filter('get_pages', array(
|
96 |
+
'NextendSocialLogin',
|
97 |
+
'getFreePagesForOauthProxyPage'
|
98 |
+
));
|
99 |
+
?>
|
100 |
+
<p class="description" id="tagline-proxy-page-1"><?php _e("You can use this setting when wp-login.php page is not available to handle the OAuth flow.", "nextend-facebook-connect") ?></p>
|
101 |
+
<p class="description" id="tagline-register-flow-page"><?php printf(__('%1$s First create a new page then select this page above.', 'nextend-facebook-connect'), '<b>' . __("Usage:", "nextend-facebook-connect") . '</b>'); ?></p>
|
102 |
+
<p class="description" id="tagline-register-flow-page"><?php printf(__('%1$s You won\'t be able to reach the selected page unless a social login/registration happens.', 'nextend-facebook-connect'), '<b>' . __("Important:", "nextend-facebook-connect") . '</b>'); ?></p>
|
103 |
+
</td>
|
104 |
+
</tr>
|
105 |
+
|
106 |
+
<tr>
|
107 |
+
<th scope="row"><label
|
108 |
+
for="default_redirect"><?php _e('Prevent external redirect overrides', 'nextend-facebook-connect'); ?></label>
|
109 |
+
</th>
|
110 |
+
<td>
|
111 |
+
<label for="redirect_prevent_external">
|
112 |
+
<input type="hidden" name="redirect_prevent_external" value="0">
|
113 |
+
<input type="checkbox" name="redirect_prevent_external" id="redirect_prevent_external" value="1"<?php if ($settings->get('redirect_prevent_external') == '1') : ?> checked="checked" <?php endif; ?>>
|
114 |
+
<?php _e('Disable external redirects', 'nextend-facebook-connect'); ?>
|
115 |
+
</label>
|
116 |
+
</td>
|
117 |
+
</tr>
|
118 |
+
|
119 |
+
<tr>
|
120 |
+
<th scope="row"><label
|
121 |
+
for="default_redirect"><?php _e('Default redirect url', 'nextend-facebook-connect'); ?></label>
|
122 |
+
</th>
|
123 |
+
<td>
|
124 |
+
<?php
|
125 |
+
$useDefault = false;
|
126 |
+
$default_redirect = $settings->get('default_redirect');
|
127 |
+
if (!empty($default_redirect)) {
|
128 |
+
$useDefault = true;
|
129 |
+
}
|
130 |
+
?>
|
131 |
+
<fieldset><label for="default_redirect_enabled">
|
132 |
+
<input name="default_redirect_enabled" type="checkbox" id="default_redirect_enabled"
|
133 |
+
value="1" <?php if ($useDefault): ?> checked<?php endif; ?>>
|
134 |
+
<?php _e('for Login', 'nextend-facebook-connect'); ?></label>
|
135 |
+
</fieldset>
|
136 |
+
<input name="default_redirect" type="text" id="default_redirect" value="<?php echo esc_attr($default_redirect); ?>"
|
137 |
+
class="regular-text"<?php if (!$useDefault): ?> style="display:none;"<?php endif; ?>>
|
138 |
+
|
139 |
+
<?php
|
140 |
+
$useDefault = false;
|
141 |
+
$default_redirectReg = $settings->get('default_redirect_reg');
|
142 |
+
if (!empty($default_redirectReg)) {
|
143 |
+
$useDefault = true;
|
144 |
+
}
|
145 |
+
?>
|
146 |
+
<fieldset><label for="default_redirect_reg_enabled">
|
147 |
+
<input name="default_redirect_reg_enabled" type="checkbox" id="default_redirect_reg_enabled"
|
148 |
+
value="1" <?php if ($useDefault): ?> checked<?php endif; ?>>
|
149 |
+
<?php _e('for Register', 'nextend-facebook-connect'); ?></label>
|
150 |
+
</fieldset>
|
151 |
+
<input name="default_redirect_reg" type="text" id="default_redirect_reg"
|
152 |
+
value="<?php echo esc_attr($default_redirectReg); ?>"
|
153 |
+
class="regular-text"<?php if (!$useDefault): ?> style="display:none;"<?php endif; ?>>
|
154 |
+
</td>
|
155 |
+
</tr>
|
156 |
+
|
157 |
+
<tr>
|
158 |
+
<th scope="row"><label
|
159 |
+
for="redirect"><?php _e('Fixed redirect url', 'nextend-facebook-connect'); ?></label>
|
160 |
+
</th>
|
161 |
+
<td>
|
162 |
+
<?php
|
163 |
+
$useCustom = false;
|
164 |
+
$redirect = $settings->get('redirect');
|
165 |
+
if (!empty($redirect)) {
|
166 |
+
$useCustom = true;
|
167 |
+
}
|
168 |
+
?>
|
169 |
+
<fieldset><label for="custom_redirect_enabled">
|
170 |
+
<input name="custom_redirect_enabled" type="checkbox" id="custom_redirect_enabled"
|
171 |
+
value="1" <?php if ($useCustom): ?> checked<?php endif; ?>>
|
172 |
+
<?php _e('for Login', 'nextend-facebook-connect'); ?></label>
|
173 |
+
</fieldset>
|
174 |
+
<input name="redirect" type="text" id="redirect" value="<?php echo esc_attr($redirect); ?>"
|
175 |
+
class="regular-text"<?php if (!$useCustom): ?> style="display:none;"<?php endif; ?>>
|
176 |
+
|
177 |
+
<?php
|
178 |
+
$useCustom = false;
|
179 |
+
$redirectReg = $settings->get('redirect_reg');
|
180 |
+
if (!empty($redirectReg)) {
|
181 |
+
$useCustom = true;
|
182 |
+
}
|
183 |
+
?>
|
184 |
+
<fieldset><label for="custom_redirect_reg_enabled">
|
185 |
+
<input name="custom_redirect_reg_enabled" type="checkbox" id="custom_redirect_reg_enabled"
|
186 |
+
value="1" <?php if ($useCustom): ?> checked<?php endif; ?>>
|
187 |
+
<?php _e('for Register', 'nextend-facebook-connect'); ?></label>
|
188 |
+
</fieldset>
|
189 |
+
<input name="redirect_reg" type="text" id="redirect_reg"
|
190 |
+
value="<?php echo esc_attr($redirectReg); ?>"
|
191 |
+
class="regular-text"<?php if (!$useCustom): ?> style="display:none;"<?php endif; ?>>
|
192 |
+
</td>
|
193 |
+
</tr>
|
194 |
+
|
195 |
+
<tr>
|
196 |
+
<th scope="row"><?php _e('Blacklisted redirects', 'nextend-facebook-connect'); ?></th>
|
197 |
+
<td>
|
198 |
+
<?php
|
199 |
+
$blacklistedUrls = $settings->get('blacklisted_urls');
|
200 |
+
?>
|
201 |
+
<textarea rows="4" cols="53" name="blacklisted_urls" id="blacklisted_urls"><?php echo esc_textarea($blacklistedUrls); ?></textarea>
|
202 |
+
<p class="description"><?php _e('If you want to blacklist redirect url params. One pattern per line.', 'nextend-facebook-connect'); ?></p>
|
203 |
+
</td>
|
204 |
+
</tr>
|
205 |
+
|
206 |
+
<tr>
|
207 |
+
<th scope="row"><?php _e('Support login restrictions', 'nextend-facebook-connect'); ?></th>
|
208 |
+
<td>
|
209 |
+
<fieldset>
|
210 |
+
<label><input type="radio" name="login_restriction"
|
211 |
+
value="0" <?php if ($settings->get('login_restriction') == '0') : ?> checked="checked" <?php endif; ?>>
|
212 |
+
<span><?php _e('Disabled', 'nextend-facebook-connect'); ?></span></label><br>
|
213 |
+
<label><input type="radio" name="login_restriction"
|
214 |
+
value="1" <?php if ($settings->get('login_restriction') == '1') : ?> checked="checked" <?php endif; ?>>
|
215 |
+
<span><?php _e('Enabled', 'nextend-facebook-connect'); ?></span></label><br>
|
216 |
+
</fieldset>
|
217 |
+
<p class="description" id="tagline-login-restriction"><?php printf(__('Please visit to our %1$s to check what plugins are supported!', 'nextend-facebook-connect'), '<a href="https://nextendweb.com/nextend-social-login-docs/login-restriction/" target="_blank">Login Restriction page</a>'); ?></p>
|
218 |
+
</td>
|
219 |
+
</tr>
|
220 |
+
|
221 |
+
<tr>
|
222 |
+
<th scope="row"><?php _e('Display avatars in "All media items"', 'nextend-facebook-connect'); ?></th>
|
223 |
+
<td>
|
224 |
+
<fieldset>
|
225 |
+
<label><input type="radio" name="avatars_in_all_media"
|
226 |
+
value="0" <?php if ($settings->get('avatars_in_all_media') == '0') : ?> checked="checked" <?php endif; ?>>
|
227 |
+
<span><?php _e('Disabled', 'nextend-facebook-connect'); ?></span></label><br>
|
228 |
+
<label><input type="radio" name="avatars_in_all_media"
|
229 |
+
value="1" <?php if ($settings->get('avatars_in_all_media') == '1') : ?> checked="checked" <?php endif; ?>>
|
230 |
+
<span><?php _e('Enabled', 'nextend-facebook-connect'); ?></span></label><br>
|
231 |
+
</fieldset>
|
232 |
+
<p class="description"><?php _e('Enabling this option can speed up loading images in Media Library - Grid view!', 'nextend-facebook-connect'); ?></p>
|
233 |
+
</td>
|
234 |
+
</tr>
|
235 |
+
|
236 |
+
<tr>
|
237 |
+
<th scope="row"><?php _e('Membership', 'nextend-facebook-connect'); ?></th>
|
238 |
+
<td>
|
239 |
+
<fieldset>
|
240 |
+
<label><input type="radio" name="allow_register"
|
241 |
+
value="-1" <?php if ($settings->get('allow_register') == '-1') : ?> checked="checked" <?php endif; ?>>
|
242 |
+
<span><?php _e('WordPress default', 'nextend-facebook-connect'); ?></span></label><br>
|
243 |
+
<label><input type="radio" name="allow_register"
|
244 |
+
value="0" <?php if ($settings->get('allow_register') == '0') : ?> checked="checked" <?php endif; ?>>
|
245 |
+
<span><?php _e('Disabled', 'nextend-facebook-connect'); ?></span></label><br>
|
246 |
+
<label><input type="radio" name="allow_register"
|
247 |
+
value="1" <?php if ($settings->get('allow_register') == '1') : ?> checked="checked" <?php endif; ?>>
|
248 |
+
<span><?php _e('Enabled', 'nextend-facebook-connect'); ?></span></label><br>
|
249 |
+
</fieldset>
|
250 |
+
<p class="description"><?php _e('Allow registration with Social login.', 'nextend-facebook-connect'); ?></p>
|
251 |
+
</td>
|
252 |
+
</tr>
|
253 |
+
|
254 |
+
</tbody>
|
255 |
+
</table>
|
256 |
+
|
257 |
+
<?php
|
258 |
+
include dirname(__FILE__) . '/general-pro.php';
|
259 |
?>
|
admin/templates/settings/login-form-pro.php
CHANGED
@@ -1,154 +1,156 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
|
4 |
-
$isPRO = NextendSocialLoginAdmin::isPro();
|
5 |
-
if (!$isPRO):
|
6 |
-
?>
|
7 |
-
<p class="submit"
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
<
|
27 |
-
<
|
28 |
-
<
|
29 |
-
<
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
<
|
48 |
-
<
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
<
|
85 |
-
<
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
<
|
104 |
-
<
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
<
|
135 |
-
<
|
136 |
-
|
137 |
-
|
138 |
-
<
|
139 |
-
|
140 |
-
|
141 |
-
<
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
<
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
|
|
|
|
154 |
<?php endif; ?>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
|
4 |
+
$isPRO = NextendSocialLoginAdmin::isPro();
|
5 |
+
if (!$isPRO):
|
6 |
+
?>
|
7 |
+
<p class="submit">
|
8 |
+
<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e('Save Changes'); ?>">
|
9 |
+
</p>
|
10 |
+
|
11 |
+
<hr/>
|
12 |
+
<h1><?php _e('PRO settings', 'nextend-facebook-connect'); ?></h1>
|
13 |
+
<?php
|
14 |
+
endif;
|
15 |
+
|
16 |
+
$attr = '';
|
17 |
+
if (!$isPRO) {
|
18 |
+
$attr = ' disabled ';
|
19 |
+
}
|
20 |
+
|
21 |
+
$settings = NextendSocialLogin::$settings;
|
22 |
+
|
23 |
+
NextendSocialLoginAdmin::showProBox();
|
24 |
+
?>
|
25 |
+
|
26 |
+
<table class="form-table">
|
27 |
+
<tbody>
|
28 |
+
<tr>
|
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; ?>>
|
35 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
36 |
+
<img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
|
37 |
+
</label>
|
38 |
+
<label>
|
39 |
+
<input type="radio" name="login_form_button_style"
|
40 |
+
value="icon" <?php if ($settings->get('login_form_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
41 |
+
<span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
|
42 |
+
<img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
|
43 |
+
</label><br>
|
44 |
+
</fieldset>
|
45 |
+
</td>
|
46 |
+
</tr>
|
47 |
+
<tr>
|
48 |
+
<th scope="row"><?php _e('Login layout', 'nextend-facebook-connect'); ?></th>
|
49 |
+
<td>
|
50 |
+
<fieldset>
|
51 |
+
<label>
|
52 |
+
<input type="radio" name="login_form_layout"
|
53 |
+
value="below" <?php if ($settings->get('login_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
54 |
+
<span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
|
55 |
+
<img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
|
56 |
+
</label>
|
57 |
+
<label>
|
58 |
+
<input type="radio" name="login_form_layout"
|
59 |
+
value="below-separator" <?php if ($settings->get('login_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
60 |
+
<span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
|
61 |
+
<img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
|
62 |
+
</label>
|
63 |
+
<label>
|
64 |
+
<input type="radio" name="login_form_layout"
|
65 |
+
value="below-floating" <?php if ($settings->get('login_form_layout') == 'below-floating') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
66 |
+
<span><?php _e('Below and floating', 'nextend-facebook-connect'); ?></span><br/>
|
67 |
+
<img src="<?php echo plugins_url('images/layouts/below-floating.png', NSL_ADMIN_PATH) ?>"/>
|
68 |
+
</label>
|
69 |
+
<label>
|
70 |
+
<input type="radio" name="login_form_layout"
|
71 |
+
value="above" <?php if ($settings->get('login_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
72 |
+
<span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
|
73 |
+
<img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
|
74 |
+
</label>
|
75 |
+
<label>
|
76 |
+
<input type="radio" name="login_form_layout"
|
77 |
+
value="above-separator" <?php if ($settings->get('login_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
78 |
+
<span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
|
79 |
+
<img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
|
80 |
+
</label><br>
|
81 |
+
</fieldset>
|
82 |
+
</td>
|
83 |
+
</tr>
|
84 |
+
<tr>
|
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; ?>>
|
91 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
92 |
+
<img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
|
93 |
+
</label>
|
94 |
+
<label>
|
95 |
+
<input type="radio" name="embedded_login_form_button_style"
|
96 |
+
value="icon" <?php if ($settings->get('embedded_login_form_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
97 |
+
<span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
|
98 |
+
<img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
|
99 |
+
</label><br>
|
100 |
+
</fieldset>
|
101 |
+
</td>
|
102 |
+
</tr>
|
103 |
+
<tr>
|
104 |
+
<th scope="row"><?php _e('Embedded Login layout', 'nextend-facebook-connect'); ?></th>
|
105 |
+
<td>
|
106 |
+
<fieldset>
|
107 |
+
<label>
|
108 |
+
<input type="radio" name="embedded_login_form_layout"
|
109 |
+
value="below" <?php if ($settings->get('embedded_login_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
110 |
+
<span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
|
111 |
+
<img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
|
112 |
+
</label>
|
113 |
+
<label>
|
114 |
+
<input type="radio" name="embedded_login_form_layout"
|
115 |
+
value="below-separator" <?php if ($settings->get('embedded_login_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
116 |
+
<span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
|
117 |
+
<img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
|
118 |
+
</label>
|
119 |
+
<label>
|
120 |
+
<input type="radio" name="embedded_login_form_layout"
|
121 |
+
value="above" <?php if ($settings->get('embedded_login_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
122 |
+
<span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
|
123 |
+
<img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
|
124 |
+
</label>
|
125 |
+
<label>
|
126 |
+
<input type="radio" name="embedded_login_form_layout"
|
127 |
+
value="above-separator" <?php if ($settings->get('embedded_login_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
128 |
+
<span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
|
129 |
+
<img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
|
130 |
+
</label><br>
|
131 |
+
</fieldset>
|
132 |
+
</td>
|
133 |
+
</tr>
|
134 |
+
<tr>
|
135 |
+
<th scope="row"><?php _e('Embedded login form button alignment', 'nextend-facebook-connect'); ?></th>
|
136 |
+
<td>
|
137 |
+
<fieldset>
|
138 |
+
<label><input type="radio" name="embedded_login_form_button_align"
|
139 |
+
value="left" <?php if ($settings->get('embedded_login_form_button_align') == 'left') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
140 |
+
<span><?php _e('Left', 'nextend-facebook-connect'); ?></span></label><br>
|
141 |
+
<label><input type="radio" name="embedded_login_form_button_align"
|
142 |
+
value="center" <?php if ($settings->get('embedded_login_form_button_align') == 'center') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
143 |
+
<span><?php _e('Center', 'nextend-facebook-connect'); ?></span></label><br>
|
144 |
+
|
145 |
+
<label><input type="radio" name="embedded_login_form_button_align"
|
146 |
+
value="right" <?php if ($settings->get('embedded_login_form_button_align') == 'right') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
147 |
+
<span><?php _e('Right', 'nextend-facebook-connect'); ?></span></label><br>
|
148 |
+
</fieldset>
|
149 |
+
</td>
|
150 |
+
</tr>
|
151 |
+
</tbody>
|
152 |
+
</table>
|
153 |
+
<?php if ($isPRO): ?>
|
154 |
+
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
155 |
+
value="<?php _e('Save Changes'); ?>"></p>
|
156 |
<?php endif; ?>
|
admin/templates/settings/login-form.php
CHANGED
@@ -1,74 +1,74 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
|
4 |
-
$settings = NextendSocialLogin::$settings;
|
5 |
-
?>
|
6 |
-
<table class="form-table">
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
</table>
|
71 |
-
|
72 |
-
<?php
|
73 |
-
include dirname(__FILE__) . '/login-form-pro.php';
|
74 |
?>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
|
4 |
+
$settings = NextendSocialLogin::$settings;
|
5 |
+
?>
|
6 |
+
<table class="form-table">
|
7 |
+
<tbody>
|
8 |
+
<tr>
|
9 |
+
<th scope="row"><?php _e('Login Form', 'nextend-facebook-connect'); ?></th>
|
10 |
+
<td>
|
11 |
+
<fieldset>
|
12 |
+
<label><input type="radio" name="show_login_form"
|
13 |
+
value="show" <?php if ($settings->get('show_login_form') == 'show') : ?> checked="checked" <?php endif; ?>>
|
14 |
+
<span><?php _e('Show login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
15 |
+
<label><input type="radio" name="show_login_form"
|
16 |
+
value="hide" <?php if ($settings->get('show_login_form') == 'hide') : ?> checked="checked" <?php endif; ?>>
|
17 |
+
<span><?php _e('Hide login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
18 |
+
</fieldset>
|
19 |
+
</td>
|
20 |
+
</tr>
|
21 |
+
<tr>
|
22 |
+
<th scope="row"><?php _e('Registration Form', 'nextend-facebook-connect'); ?></th>
|
23 |
+
<td>
|
24 |
+
<fieldset>
|
25 |
+
<label><input type="radio" name="show_registration_form"
|
26 |
+
value="show" <?php if ($settings->get('show_registration_form') == 'show') : ?> checked="checked" <?php endif; ?>>
|
27 |
+
<span><?php _e('Show login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
28 |
+
<label><input type="radio" name="show_registration_form"
|
29 |
+
value="hide" <?php if ($settings->get('show_registration_form') == 'hide') : ?> checked="checked" <?php endif; ?>>
|
30 |
+
<span><?php _e('Hide login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
31 |
+
</fieldset>
|
32 |
+
</td>
|
33 |
+
</tr>
|
34 |
+
<tr>
|
35 |
+
<th scope="row">
|
36 |
+
<?php _e('Embedded login form', 'nextend-facebook-connect'); ?>
|
37 |
+
<br>
|
38 |
+
<code>wp_login_form</code>
|
39 |
+
</th>
|
40 |
+
<td>
|
41 |
+
<fieldset>
|
42 |
+
<label><input type="radio" name="show_embedded_login_form"
|
43 |
+
value="show" <?php if ($settings->get('show_embedded_login_form') == 'show') : ?> checked="checked" <?php endif; ?>>
|
44 |
+
<span><?php _e('Show login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
45 |
+
<label><input type="radio" name="show_embedded_login_form"
|
46 |
+
value="hide" <?php if ($settings->get('show_embedded_login_form') == 'hide') : ?> checked="checked" <?php endif; ?>>
|
47 |
+
<span><?php _e('Hide login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
48 |
+
</fieldset>
|
49 |
+
</td>
|
50 |
+
</tr>
|
51 |
+
|
52 |
+
<tr>
|
53 |
+
<th scope="row"><?php _e('Button alignment', 'nextend-facebook-connect'); ?></th>
|
54 |
+
<td>
|
55 |
+
<fieldset>
|
56 |
+
<label><input type="radio" name="login_form_button_align"
|
57 |
+
value="left" <?php if ($settings->get('login_form_button_align') == 'left') : ?> checked="checked" <?php endif; ?>>
|
58 |
+
<span><?php _e('Left', 'nextend-facebook-connect'); ?></span></label><br>
|
59 |
+
<label><input type="radio" name="login_form_button_align"
|
60 |
+
value="center" <?php if ($settings->get('login_form_button_align') == 'center') : ?> checked="checked" <?php endif; ?>>
|
61 |
+
<span><?php _e('Center', 'nextend-facebook-connect'); ?></span></label><br>
|
62 |
+
|
63 |
+
<label><input type="radio" name="login_form_button_align"
|
64 |
+
value="right" <?php if ($settings->get('login_form_button_align') == 'right') : ?> checked="checked" <?php endif; ?>>
|
65 |
+
<span><?php _e('Right', 'nextend-facebook-connect'); ?></span></label><br>
|
66 |
+
</fieldset>
|
67 |
+
</td>
|
68 |
+
</tr>
|
69 |
+
</tbody>
|
70 |
+
</table>
|
71 |
+
|
72 |
+
<?php
|
73 |
+
include dirname(__FILE__) . '/login-form-pro.php';
|
74 |
?>
|
admin/templates/settings/memberpress.php
CHANGED
@@ -1,172 +1,172 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
|
4 |
-
$isPRO = NextendSocialLoginAdmin::isPro();
|
5 |
-
|
6 |
-
$attr = '';
|
7 |
-
if (!$isPRO) {
|
8 |
-
$attr = ' disabled ';
|
9 |
-
}
|
10 |
-
|
11 |
-
$settings = NextendSocialLogin::$settings;
|
12 |
-
|
13 |
-
NextendSocialLoginAdmin::showProBox();
|
14 |
-
?>
|
15 |
-
<table class="form-table">
|
16 |
-
<tbody>
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
</tbody>
|
168 |
-
</table>
|
169 |
-
<?php if ($isPRO): ?>
|
170 |
-
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
171 |
-
value="<?php _e('Save Changes'); ?>"></p>
|
172 |
-
<?php endif; ?>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
|
4 |
+
$isPRO = NextendSocialLoginAdmin::isPro();
|
5 |
+
|
6 |
+
$attr = '';
|
7 |
+
if (!$isPRO) {
|
8 |
+
$attr = ' disabled ';
|
9 |
+
}
|
10 |
+
|
11 |
+
$settings = NextendSocialLogin::$settings;
|
12 |
+
|
13 |
+
NextendSocialLoginAdmin::showProBox();
|
14 |
+
?>
|
15 |
+
<table class="form-table">
|
16 |
+
<tbody>
|
17 |
+
<tr>
|
18 |
+
<th scope="row"><?php _e('Login form button style', 'nextend-facebook-connect'); ?></th>
|
19 |
+
<td>
|
20 |
+
<fieldset>
|
21 |
+
<label>
|
22 |
+
<input type="radio" name="memberpress_login_form_button_style"
|
23 |
+
value="default" <?php if ($settings->get('memberpress_login_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
24 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
25 |
+
<img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
|
26 |
+
</label>
|
27 |
+
<label>
|
28 |
+
<input type="radio" name="memberpress_login_form_button_style"
|
29 |
+
value="icon" <?php if ($settings->get('memberpress_login_form_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
30 |
+
<span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
|
31 |
+
<img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
|
32 |
+
</label><br>
|
33 |
+
</fieldset>
|
34 |
+
</td>
|
35 |
+
</tr>
|
36 |
+
<tr>
|
37 |
+
<th scope="row"><?php _e('Login layout', 'nextend-facebook-connect'); ?></th>
|
38 |
+
<td>
|
39 |
+
<fieldset>
|
40 |
+
<label>
|
41 |
+
<input type="radio" name="memberpress_login_form_layout"
|
42 |
+
value="below" <?php if ($settings->get('memberpress_login_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
43 |
+
<span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
|
44 |
+
<img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
|
45 |
+
</label>
|
46 |
+
<label>
|
47 |
+
<input type="radio" name="memberpress_login_form_layout"
|
48 |
+
value="below-separator" <?php if ($settings->get('memberpress_login_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
49 |
+
<span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
|
50 |
+
<img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
|
51 |
+
</label>
|
52 |
+
<label>
|
53 |
+
<input type="radio" name="memberpress_login_form_layout"
|
54 |
+
value="above" <?php if ($settings->get('memberpress_login_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
55 |
+
<span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
|
56 |
+
<img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
|
57 |
+
</label>
|
58 |
+
<label>
|
59 |
+
<input type="radio" name="memberpress_login_form_layout"
|
60 |
+
value="above-separator" <?php if ($settings->get('memberpress_login_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
61 |
+
<span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
|
62 |
+
<img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
|
63 |
+
</label><br>
|
64 |
+
</fieldset>
|
65 |
+
</td>
|
66 |
+
</tr>
|
67 |
+
|
68 |
+
<tr>
|
69 |
+
<th scope="row"><?php _e('Sign Up form', 'nextend-facebook-connect'); ?></th>
|
70 |
+
<td>
|
71 |
+
<fieldset>
|
72 |
+
<label><input type="radio" name="memberpress_signup"
|
73 |
+
value="" <?php if ($settings->get('memberpress_signup') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
74 |
+
<span><?php _e('No Connect button in Sign Up form', 'nextend-facebook-connect'); ?></span></label><br>
|
75 |
+
<label><input type="radio" name="memberpress_signup"
|
76 |
+
value="before" <?php if ($settings->get('memberpress_signup') == 'before') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
77 |
+
<span><?php _e('Connect button on', 'nextend-facebook-connect'); ?></span>
|
78 |
+
<code><?php _e('Action:'); ?>
|
79 |
+
mepr-checkout-before-submit</code></label>
|
80 |
+
</fieldset>
|
81 |
+
</td>
|
82 |
+
</tr>
|
83 |
+
<tr>
|
84 |
+
<th scope="row"><?php _e('Sign Up form button style', 'nextend-facebook-connect'); ?></th>
|
85 |
+
<td>
|
86 |
+
<fieldset>
|
87 |
+
<label>
|
88 |
+
<input type="radio" name="memberpress_signup_form_button_style"
|
89 |
+
value="default" <?php if ($settings->get('memberpress_signup_form_button_style') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
90 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
91 |
+
<img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
|
92 |
+
</label>
|
93 |
+
<label>
|
94 |
+
<input type="radio" name="memberpress_signup_form_button_style"
|
95 |
+
value="icon" <?php if ($settings->get('memberpress_signup_form_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
96 |
+
<span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
|
97 |
+
<img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
|
98 |
+
</label><br>
|
99 |
+
</fieldset>
|
100 |
+
</td>
|
101 |
+
</tr>
|
102 |
+
<tr>
|
103 |
+
<th scope="row"><?php _e('Sign Up layout', 'nextend-facebook-connect'); ?></th>
|
104 |
+
<td>
|
105 |
+
<fieldset>
|
106 |
+
<label>
|
107 |
+
<input type="radio" name="memberpress_signup_form_layout"
|
108 |
+
value="below" <?php if ($settings->get('memberpress_signup_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="memberpress_signup_form_layout"
|
114 |
+
value="below-separator" <?php if ($settings->get('memberpress_signup_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="memberpress_signup_form_layout"
|
120 |
+
value="above" <?php if ($settings->get('memberpress_signup_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="memberpress_signup_form_layout"
|
126 |
+
value="above-separator" <?php if ($settings->get('memberpress_signup_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('Account details', 'nextend-facebook-connect'); ?></th>
|
136 |
+
<td>
|
137 |
+
<fieldset>
|
138 |
+
<label><input type="radio" name="memberpress_account_details"
|
139 |
+
value="" <?php if ($settings->get('memberpress_account_details') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
140 |
+
<span><?php _e('No link buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
141 |
+
<label><input type="radio" name="memberpress_account_details"
|
142 |
+
value="after" <?php if ($settings->get('memberpress_account_details') == 'after') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
143 |
+
<span><?php _e('Link buttons after account details', 'nextend-facebook-connect'); ?></span>
|
144 |
+
<code><?php _e('Action:'); ?>
|
145 |
+
mepr_account_home</code></label><br>
|
146 |
+
</fieldset>
|
147 |
+
</td>
|
148 |
+
</tr>
|
149 |
+
|
150 |
+
<tr>
|
151 |
+
<th scope="row"><?php _e('Button alignment', 'nextend-facebook-connect'); ?></th>
|
152 |
+
<td>
|
153 |
+
<fieldset>
|
154 |
+
<label><input type="radio" name="memberpress_form_button_align"
|
155 |
+
value="left" <?php if ($settings->get('memberpress_form_button_align') == 'left') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
156 |
+
<span><?php _e('Left', 'nextend-facebook-connect'); ?></span></label><br>
|
157 |
+
<label><input type="radio" name="memberpress_form_button_align"
|
158 |
+
value="center" <?php if ($settings->get('memberpress_form_button_align') == 'center') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
159 |
+
<span><?php _e('Center', 'nextend-facebook-connect'); ?></span></label><br>
|
160 |
+
|
161 |
+
<label><input type="radio" name="memberpress_form_button_align"
|
162 |
+
value="right" <?php if ($settings->get('memberpress_form_button_align') == 'right') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
163 |
+
<span><?php _e('Right', 'nextend-facebook-connect'); ?></span></label><br>
|
164 |
+
</fieldset>
|
165 |
+
</td>
|
166 |
+
</tr>
|
167 |
+
</tbody>
|
168 |
+
</table>
|
169 |
+
<?php if ($isPRO): ?>
|
170 |
+
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
171 |
+
value="<?php _e('Save Changes'); ?>"></p>
|
172 |
+
<?php endif; ?>
|
admin/templates/settings/privacy.php
CHANGED
@@ -1,108 +1,110 @@
|
|
1 |
-
<script type="text/javascript">
|
2 |
-
(function ($) {
|
3 |
-
|
4 |
-
window.NSLResetTerms = function () {
|
5 |
-
var id = 'terms',
|
6 |
-
content = <?php echo wp_json_encode(__('By clicking Register, you accept our <a href="#privacy_policy_url" target="_blank">Privacy Policy</a>', 'nextend-facebook-connect')); ?>;
|
7 |
-
|
8 |
-
if ($('#wp-' + id + '-wrap').hasClass('html-active')) {
|
9 |
-
$('#' + id).val(content);
|
10 |
-
} else { // We are in tinyMCE mode
|
11 |
-
var activeEditor = tinyMCE.get(id);
|
12 |
-
if (activeEditor !== null) {
|
13 |
-
activeEditor.setContent(content);
|
14 |
-
}
|
15 |
-
}
|
16 |
-
|
17 |
-
return false;
|
18 |
-
};
|
19 |
-
|
20 |
-
$(document).ready(function () {
|
21 |
-
$('#terms_show').on('change', function () {
|
22 |
-
if ($(this).is(':checked')) {
|
23 |
-
$('#nsl-terms').css('display', '');
|
24 |
-
} else {
|
25 |
-
$('#nsl-terms').css('display', 'none');
|
26 |
-
}
|
27 |
-
});
|
28 |
-
});
|
29 |
-
})(jQuery);
|
30 |
-
</script>
|
31 |
-
|
32 |
-
<table class="form-table">
|
33 |
-
<tbody>
|
34 |
-
<tr>
|
35 |
-
<th scope="row"><?php _e('Terms and conditions', 'nextend-facebook-connect'); ?></th>
|
36 |
-
<td>
|
37 |
-
<fieldset>
|
38 |
-
<label for="terms_show">
|
39 |
-
<input type="hidden" name="terms_show" value="0">
|
40 |
-
<input type="checkbox" name="terms_show" id="terms_show"
|
41 |
-
value="1" <?php if ($settings->get('terms_show') == '1') : ?> checked="checked" <?php endif; ?>>
|
42 |
-
<?php _e('Show', 'nextend-facebook-connect'); ?>
|
43 |
-
</label>
|
44 |
-
|
45 |
-
<div id="nsl-terms" <?php if ($settings->get('terms_show') != '1') : ?> style="display:none;" <?php endif; ?>>
|
46 |
-
<?php
|
47 |
-
wp_editor($settings->get('terms'), 'terms', array(
|
48 |
-
'textarea_rows' => 4,
|
49 |
-
'media_buttons' => false
|
50 |
-
));
|
51 |
-
?>
|
52 |
-
<p class="description"><a href="#"
|
53 |
-
onclick="return NSLResetTerms();"><?php _e('Reset to default', 'nextend-facebook-connect'); ?></a>
|
54 |
-
</div>
|
55 |
-
</fieldset>
|
56 |
-
</td>
|
57 |
-
</tr>
|
58 |
-
<tr>
|
59 |
-
<th scope="row"><?php _e('Store', 'nextend-facebook-connect'); ?></th>
|
60 |
-
<td>
|
61 |
-
<label for="store_name">
|
62 |
-
<input type="hidden" name="store_name" value="0">
|
63 |
-
<input type="checkbox" name="store_name" id="store_name"
|
64 |
-
value="1" <?php if ($settings->get('store_name') == '1') : ?> checked="checked" <?php endif; ?>>
|
65 |
-
<?php _e('First and last name', 'nextend-facebook-connect'); ?>
|
66 |
-
</label>
|
67 |
-
<p class="description"
|
68 |
-
id="tagline-store_name"><?php _e('When not enabled, username will be randomly generated.', 'nextend-facebook-connect'); ?></p>
|
69 |
-
</td>
|
70 |
-
</tr>
|
71 |
-
<tr>
|
72 |
-
<th scope="row"></th>
|
73 |
-
<td>
|
74 |
-
<label for="store_email">
|
75 |
-
<input type="hidden" name="store_email" value="0">
|
76 |
-
<input type="checkbox" name="store_email" id="store_email"
|
77 |
-
value="1" <?php if ($settings->get('store_email') == '1') : ?> checked="checked" <?php endif; ?>>
|
78 |
-
<?php _e('Email', 'nextend-facebook-connect'); ?>
|
79 |
-
</label>
|
80 |
-
<p class="description"
|
81 |
-
id="tagline-store_email"><?php _e('When not enabled, email will be empty.', 'nextend-facebook-connect'); ?></p>
|
82 |
-
</td>
|
83 |
-
</tr>
|
84 |
-
<tr>
|
85 |
-
<th scope="row"></th>
|
86 |
-
<td>
|
87 |
-
<label for="avatar_store">
|
88 |
-
<input type="hidden" name="avatar_store" value="0">
|
89 |
-
<input type="checkbox" name="avatar_store" id="avatar_store"
|
90 |
-
value="1" <?php if ($settings->get('avatar_store') == '1') : ?> checked="checked" <?php endif; ?>>
|
91 |
-
<?php _e('Avatar', 'nextend-facebook-connect'); ?>
|
92 |
-
</label>
|
93 |
-
</td>
|
94 |
-
</tr>
|
95 |
-
<tr>
|
96 |
-
<th scope="row"></th>
|
97 |
-
<td>
|
98 |
-
<label for="store_access_token">
|
99 |
-
<input type="hidden" name="store_access_token" value="0">
|
100 |
-
<input type="checkbox" name="store_access_token" id="store_access_token"
|
101 |
-
value="1" <?php if ($settings->get('store_access_token') == '1') : ?> checked="checked" <?php endif; ?>>
|
102 |
-
<?php _e('Access token', 'nextend-facebook-connect'); ?>
|
103 |
-
</label>
|
104 |
-
</td>
|
105 |
-
</tr>
|
106 |
-
</tbody>
|
107 |
-
</table>
|
108 |
-
<p class="submit"
|
|
|
|
1 |
+
<script type="text/javascript">
|
2 |
+
(function ($) {
|
3 |
+
|
4 |
+
window.NSLResetTerms = function () {
|
5 |
+
var id = 'terms',
|
6 |
+
content = <?php echo wp_json_encode(__('By clicking Register, you accept our <a href="#privacy_policy_url" target="_blank">Privacy Policy</a>', 'nextend-facebook-connect')); ?>;
|
7 |
+
|
8 |
+
if ($('#wp-' + id + '-wrap').hasClass('html-active')) {
|
9 |
+
$('#' + id).val(content);
|
10 |
+
} else { // We are in tinyMCE mode
|
11 |
+
var activeEditor = tinyMCE.get(id);
|
12 |
+
if (activeEditor !== null) {
|
13 |
+
activeEditor.setContent(content);
|
14 |
+
}
|
15 |
+
}
|
16 |
+
|
17 |
+
return false;
|
18 |
+
};
|
19 |
+
|
20 |
+
$(document).ready(function () {
|
21 |
+
$('#terms_show').on('change', function () {
|
22 |
+
if ($(this).is(':checked')) {
|
23 |
+
$('#nsl-terms').css('display', '');
|
24 |
+
} else {
|
25 |
+
$('#nsl-terms').css('display', 'none');
|
26 |
+
}
|
27 |
+
});
|
28 |
+
});
|
29 |
+
})(jQuery);
|
30 |
+
</script>
|
31 |
+
|
32 |
+
<table class="form-table">
|
33 |
+
<tbody>
|
34 |
+
<tr>
|
35 |
+
<th scope="row"><?php _e('Terms and conditions', 'nextend-facebook-connect'); ?></th>
|
36 |
+
<td>
|
37 |
+
<fieldset>
|
38 |
+
<label for="terms_show">
|
39 |
+
<input type="hidden" name="terms_show" value="0">
|
40 |
+
<input type="checkbox" name="terms_show" id="terms_show"
|
41 |
+
value="1" <?php if ($settings->get('terms_show') == '1') : ?> checked="checked" <?php endif; ?>>
|
42 |
+
<?php _e('Show', 'nextend-facebook-connect'); ?>
|
43 |
+
</label>
|
44 |
+
|
45 |
+
<div id="nsl-terms" <?php if ($settings->get('terms_show') != '1') : ?> style="display:none;" <?php endif; ?>>
|
46 |
+
<?php
|
47 |
+
wp_editor($settings->get('terms'), 'terms', array(
|
48 |
+
'textarea_rows' => 4,
|
49 |
+
'media_buttons' => false
|
50 |
+
));
|
51 |
+
?>
|
52 |
+
<p class="description"><a href="#"
|
53 |
+
onclick="return NSLResetTerms();"><?php _e('Reset to default', 'nextend-facebook-connect'); ?></a>
|
54 |
+
</div>
|
55 |
+
</fieldset>
|
56 |
+
</td>
|
57 |
+
</tr>
|
58 |
+
<tr>
|
59 |
+
<th scope="row"><?php _e('Store', 'nextend-facebook-connect'); ?></th>
|
60 |
+
<td>
|
61 |
+
<label for="store_name">
|
62 |
+
<input type="hidden" name="store_name" value="0">
|
63 |
+
<input type="checkbox" name="store_name" id="store_name"
|
64 |
+
value="1" <?php if ($settings->get('store_name') == '1') : ?> checked="checked" <?php endif; ?>>
|
65 |
+
<?php _e('First and last name', 'nextend-facebook-connect'); ?>
|
66 |
+
</label>
|
67 |
+
<p class="description"
|
68 |
+
id="tagline-store_name"><?php _e('When not enabled, username will be randomly generated.', 'nextend-facebook-connect'); ?></p>
|
69 |
+
</td>
|
70 |
+
</tr>
|
71 |
+
<tr>
|
72 |
+
<th scope="row"></th>
|
73 |
+
<td>
|
74 |
+
<label for="store_email">
|
75 |
+
<input type="hidden" name="store_email" value="0">
|
76 |
+
<input type="checkbox" name="store_email" id="store_email"
|
77 |
+
value="1" <?php if ($settings->get('store_email') == '1') : ?> checked="checked" <?php endif; ?>>
|
78 |
+
<?php _e('Email', 'nextend-facebook-connect'); ?>
|
79 |
+
</label>
|
80 |
+
<p class="description"
|
81 |
+
id="tagline-store_email"><?php _e('When not enabled, email will be empty.', 'nextend-facebook-connect'); ?></p>
|
82 |
+
</td>
|
83 |
+
</tr>
|
84 |
+
<tr>
|
85 |
+
<th scope="row"></th>
|
86 |
+
<td>
|
87 |
+
<label for="avatar_store">
|
88 |
+
<input type="hidden" name="avatar_store" value="0">
|
89 |
+
<input type="checkbox" name="avatar_store" id="avatar_store"
|
90 |
+
value="1" <?php if ($settings->get('avatar_store') == '1') : ?> checked="checked" <?php endif; ?>>
|
91 |
+
<?php _e('Avatar', 'nextend-facebook-connect'); ?>
|
92 |
+
</label>
|
93 |
+
</td>
|
94 |
+
</tr>
|
95 |
+
<tr>
|
96 |
+
<th scope="row"></th>
|
97 |
+
<td>
|
98 |
+
<label for="store_access_token">
|
99 |
+
<input type="hidden" name="store_access_token" value="0">
|
100 |
+
<input type="checkbox" name="store_access_token" id="store_access_token"
|
101 |
+
value="1" <?php if ($settings->get('store_access_token') == '1') : ?> checked="checked" <?php endif; ?>>
|
102 |
+
<?php _e('Access token', 'nextend-facebook-connect'); ?>
|
103 |
+
</label>
|
104 |
+
</td>
|
105 |
+
</tr>
|
106 |
+
</tbody>
|
107 |
+
</table>
|
108 |
+
<p class="submit">
|
109 |
+
<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e('Save Changes'); ?>">
|
110 |
+
</p>
|
admin/templates/settings/ultimate-member.php
CHANGED
@@ -1,187 +1,187 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
|
4 |
-
$isPRO = NextendSocialLoginAdmin::isPro();
|
5 |
-
|
6 |
-
$attr = '';
|
7 |
-
if (!$isPRO) {
|
8 |
-
$attr = ' disabled ';
|
9 |
-
}
|
10 |
-
|
11 |
-
$settings = NextendSocialLogin::$settings;
|
12 |
-
|
13 |
-
NextendSocialLoginAdmin::showProBox();
|
14 |
-
?>
|
15 |
-
<table class="form-table">
|
16 |
-
<tbody>
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
</tbody>
|
183 |
-
</table>
|
184 |
-
<?php if ($isPRO): ?>
|
185 |
-
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
186 |
-
value="<?php _e('Save Changes'); ?>"></p>
|
187 |
-
<?php endif; ?>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
|
4 |
+
$isPRO = NextendSocialLoginAdmin::isPro();
|
5 |
+
|
6 |
+
$attr = '';
|
7 |
+
if (!$isPRO) {
|
8 |
+
$attr = ' disabled ';
|
9 |
+
}
|
10 |
+
|
11 |
+
$settings = NextendSocialLogin::$settings;
|
12 |
+
|
13 |
+
NextendSocialLoginAdmin::showProBox();
|
14 |
+
?>
|
15 |
+
<table class="form-table">
|
16 |
+
<tbody>
|
17 |
+
<tr>
|
18 |
+
<th scope="row"><?php _e('Login form', 'nextend-facebook-connect'); ?></th>
|
19 |
+
<td>
|
20 |
+
<fieldset>
|
21 |
+
<label><input type="radio" name="ultimatemember_login"
|
22 |
+
value="" <?php if ($settings->get('ultimatemember_login') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
23 |
+
<span><?php _e('No Connect button in Login form', 'nextend-facebook-connect'); ?></span></label><br>
|
24 |
+
<label><input type="radio" name="ultimatemember_login"
|
25 |
+
value="after" <?php if ($settings->get('ultimatemember_login') == 'after') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
26 |
+
<span><?php _e('Connect button on', 'nextend-facebook-connect'); ?></span>
|
27 |
+
<code><?php _e('Action:'); ?>
|
28 |
+
um_after_login_fields</code></label>
|
29 |
+
</fieldset>
|
30 |
+
</td>
|
31 |
+
</tr>
|
32 |
+
<tr>
|
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; ?>>
|
39 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
40 |
+
<img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
|
41 |
+
</label>
|
42 |
+
<label>
|
43 |
+
<input type="radio" name="ultimatemember_login_form_button_style"
|
44 |
+
value="icon" <?php if ($settings->get('ultimatemember_login_form_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
45 |
+
<span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
|
46 |
+
<img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
|
47 |
+
</label><br>
|
48 |
+
</fieldset>
|
49 |
+
</td>
|
50 |
+
</tr>
|
51 |
+
<tr>
|
52 |
+
<th scope="row"><?php _e('Login layout', 'nextend-facebook-connect'); ?></th>
|
53 |
+
<td>
|
54 |
+
<fieldset>
|
55 |
+
<label>
|
56 |
+
<input type="radio" name="ultimatemember_login_form_layout"
|
57 |
+
value="below" <?php if ($settings->get('ultimatemember_login_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
58 |
+
<span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
|
59 |
+
<img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
|
60 |
+
</label>
|
61 |
+
<label>
|
62 |
+
<input type="radio" name="ultimatemember_login_form_layout"
|
63 |
+
value="below-separator" <?php if ($settings->get('ultimatemember_login_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
64 |
+
<span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
|
65 |
+
<img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
|
66 |
+
</label>
|
67 |
+
<label>
|
68 |
+
<input type="radio" name="ultimatemember_login_form_layout"
|
69 |
+
value="above" <?php if ($settings->get('ultimatemember_login_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
70 |
+
<span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
|
71 |
+
<img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
|
72 |
+
</label>
|
73 |
+
<label>
|
74 |
+
<input type="radio" name="ultimatemember_login_form_layout"
|
75 |
+
value="above-separator" <?php if ($settings->get('ultimatemember_login_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
76 |
+
<span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
|
77 |
+
<img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
|
78 |
+
</label><br>
|
79 |
+
</fieldset>
|
80 |
+
</td>
|
81 |
+
</tr>
|
82 |
+
|
83 |
+
<tr>
|
84 |
+
<th scope="row"><?php _e('Register form', 'nextend-facebook-connect'); ?></th>
|
85 |
+
<td>
|
86 |
+
<fieldset>
|
87 |
+
<label><input type="radio" name="ultimatemember_register"
|
88 |
+
value="" <?php if ($settings->get('ultimatemember_register') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
89 |
+
<span><?php _e('No Connect button in Register form', 'nextend-facebook-connect'); ?></span></label><br>
|
90 |
+
<label><input type="radio" name="ultimatemember_register"
|
91 |
+
value="after" <?php if ($settings->get('ultimatemember_register') == 'after') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
92 |
+
<span><?php _e('Connect button on', 'nextend-facebook-connect'); ?></span>
|
93 |
+
<code><?php _e('Action:'); ?>
|
94 |
+
um_after_register_fields</code></label>
|
95 |
+
</fieldset>
|
96 |
+
</td>
|
97 |
+
</tr>
|
98 |
+
<tr>
|
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; ?>>
|
105 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
106 |
+
<img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
|
107 |
+
</label>
|
108 |
+
<label>
|
109 |
+
<input type="radio" name="ultimatemember_register_form_button_style"
|
110 |
+
value="icon" <?php if ($settings->get('ultimatemember_register_form_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
111 |
+
<span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
|
112 |
+
<img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
|
113 |
+
</label><br>
|
114 |
+
</fieldset>
|
115 |
+
</td>
|
116 |
+
</tr>
|
117 |
+
<tr>
|
118 |
+
<th scope="row"><?php _e('Register layout', 'nextend-facebook-connect'); ?></th>
|
119 |
+
<td>
|
120 |
+
<fieldset>
|
121 |
+
<label>
|
122 |
+
<input type="radio" name="ultimatemember_register_form_layout"
|
123 |
+
value="below" <?php if ($settings->get('ultimatemember_register_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
124 |
+
<span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
|
125 |
+
<img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
|
126 |
+
</label>
|
127 |
+
<label>
|
128 |
+
<input type="radio" name="ultimatemember_register_form_layout"
|
129 |
+
value="below-separator" <?php if ($settings->get('ultimatemember_register_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
130 |
+
<span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
|
131 |
+
<img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
|
132 |
+
</label>
|
133 |
+
<label>
|
134 |
+
<input type="radio" name="ultimatemember_register_form_layout"
|
135 |
+
value="above" <?php if ($settings->get('ultimatemember_register_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
136 |
+
<span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
|
137 |
+
<img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
|
138 |
+
</label>
|
139 |
+
<label>
|
140 |
+
<input type="radio" name="ultimatemember_register_form_layout"
|
141 |
+
value="above-separator" <?php if ($settings->get('ultimatemember_register_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
142 |
+
<span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
|
143 |
+
<img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
|
144 |
+
</label><br>
|
145 |
+
</fieldset>
|
146 |
+
</td>
|
147 |
+
</tr>
|
148 |
+
|
149 |
+
<tr>
|
150 |
+
<th scope="row"><?php _e('Account details', 'nextend-facebook-connect'); ?></th>
|
151 |
+
<td>
|
152 |
+
<fieldset>
|
153 |
+
<label><input type="radio" name="ultimatemember_account_details"
|
154 |
+
value="" <?php if ($settings->get('ultimatemember_account_details') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
155 |
+
<span><?php _e('No link buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
156 |
+
<label><input type="radio" name="ultimatemember_account_details"
|
157 |
+
value="after" <?php if ($settings->get('ultimatemember_account_details') == 'after') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
158 |
+
<span><?php _e('Link buttons after account details', 'nextend-facebook-connect'); ?></span>
|
159 |
+
<code><?php _e('Action:'); ?>
|
160 |
+
um_after_account_general_button</code></label><br>
|
161 |
+
</fieldset>
|
162 |
+
</td>
|
163 |
+
</tr>
|
164 |
+
|
165 |
+
<tr>
|
166 |
+
<th scope="row"><?php _e('Button alignment', 'nextend-facebook-connect'); ?></th>
|
167 |
+
<td>
|
168 |
+
<fieldset>
|
169 |
+
<label><input type="radio" name="ultimatemember_form_button_align"
|
170 |
+
value="left" <?php if ($settings->get('ultimatemember_form_button_align') == 'left') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
171 |
+
<span><?php _e('Left', 'nextend-facebook-connect'); ?></span></label><br>
|
172 |
+
<label><input type="radio" name="ultimatemember_form_button_align"
|
173 |
+
value="center" <?php if ($settings->get('ultimatemember_form_button_align') == 'center') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
174 |
+
<span><?php _e('Center', 'nextend-facebook-connect'); ?></span></label><br>
|
175 |
+
|
176 |
+
<label><input type="radio" name="ultimatemember_form_button_align"
|
177 |
+
value="right" <?php if ($settings->get('ultimatemember_form_button_align') == 'right') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
178 |
+
<span><?php _e('Right', 'nextend-facebook-connect'); ?></span></label><br>
|
179 |
+
</fieldset>
|
180 |
+
</td>
|
181 |
+
</tr>
|
182 |
+
</tbody>
|
183 |
+
</table>
|
184 |
+
<?php if ($isPRO): ?>
|
185 |
+
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
186 |
+
value="<?php _e('Save Changes'); ?>"></p>
|
187 |
+
<?php endif; ?>
|
admin/templates/settings/userpro.php
CHANGED
@@ -1,168 +1,168 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
|
4 |
-
$isPRO = NextendSocialLoginAdmin::isPro();
|
5 |
-
|
6 |
-
$attr = '';
|
7 |
-
if (!$isPRO) {
|
8 |
-
$attr = ' disabled ';
|
9 |
-
}
|
10 |
-
|
11 |
-
$settings = NextendSocialLogin::$settings;
|
12 |
-
|
13 |
-
NextendSocialLoginAdmin::showProBox();
|
14 |
-
?>
|
15 |
-
<table class="form-table">
|
16 |
-
<tbody>
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
</tbody>
|
164 |
-
</table>
|
165 |
-
<?php if ($isPRO): ?>
|
166 |
-
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
167 |
-
value="<?php _e('Save Changes'); ?>"></p>
|
168 |
-
<?php endif; ?>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
|
4 |
+
$isPRO = NextendSocialLoginAdmin::isPro();
|
5 |
+
|
6 |
+
$attr = '';
|
7 |
+
if (!$isPRO) {
|
8 |
+
$attr = ' disabled ';
|
9 |
+
}
|
10 |
+
|
11 |
+
$settings = NextendSocialLogin::$settings;
|
12 |
+
|
13 |
+
NextendSocialLoginAdmin::showProBox();
|
14 |
+
?>
|
15 |
+
<table class="form-table">
|
16 |
+
<tbody>
|
17 |
+
<tr>
|
18 |
+
<th scope="row"><?php _e('Login Form', 'nextend-facebook-connect'); ?></th>
|
19 |
+
<td>
|
20 |
+
<fieldset>
|
21 |
+
<label><input type="radio" name="userpro_show_login_form"
|
22 |
+
value="show" <?php if ($settings->get('userpro_show_login_form') == 'show') : ?> checked="checked" <?php endif; ?> <?php echo $attr; ?>>
|
23 |
+
<span><?php _e('Show login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
24 |
+
<label><input type="radio" name="userpro_show_login_form"
|
25 |
+
value="hide" <?php if ($settings->get('userpro_show_login_form') == 'hide') : ?> checked="checked" <?php endif; ?> <?php echo $attr; ?>>
|
26 |
+
<span><?php _e('Hide login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
27 |
+
</fieldset>
|
28 |
+
</td>
|
29 |
+
</tr>
|
30 |
+
<tr>
|
31 |
+
<th scope="row"><?php _e('Register Form', 'nextend-facebook-connect'); ?></th>
|
32 |
+
<td>
|
33 |
+
<fieldset>
|
34 |
+
<label><input type="radio" name="userpro_show_register_form"
|
35 |
+
value="show" <?php if ($settings->get('userpro_show_register_form') == 'show') : ?> checked="checked" <?php endif; ?> <?php echo $attr; ?>>
|
36 |
+
<span><?php _e('Show login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
37 |
+
<label><input type="radio" name="userpro_show_register_form"
|
38 |
+
value="hide" <?php if ($settings->get('userpro_show_register_form') == 'hide') : ?> checked="checked" <?php endif; ?> <?php echo $attr; ?>>
|
39 |
+
<span><?php _e('Hide login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
40 |
+
</fieldset>
|
41 |
+
</td>
|
42 |
+
</tr>
|
43 |
+
|
44 |
+
<tr>
|
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; ?>>
|
51 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
52 |
+
<img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
|
53 |
+
</label>
|
54 |
+
<label>
|
55 |
+
<input type="radio" name="userpro_login_form_button_style"
|
56 |
+
value="icon" <?php if ($settings->get('userpro_login_form_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
57 |
+
<span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
|
58 |
+
<img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
|
59 |
+
</label><br>
|
60 |
+
</fieldset>
|
61 |
+
</td>
|
62 |
+
</tr>
|
63 |
+
<tr>
|
64 |
+
<th scope="row"><?php _e('Login layout', 'nextend-facebook-connect'); ?></th>
|
65 |
+
<td>
|
66 |
+
<fieldset>
|
67 |
+
<label>
|
68 |
+
<input type="radio" name="userpro_login_form_layout"
|
69 |
+
value="below" <?php if ($settings->get('userpro_login_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
70 |
+
<span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
|
71 |
+
<img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
|
72 |
+
</label>
|
73 |
+
<label>
|
74 |
+
<input type="radio" name="userpro_login_form_layout"
|
75 |
+
value="below-separator" <?php if ($settings->get('userpro_login_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
76 |
+
<span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
|
77 |
+
<img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
|
78 |
+
</label>
|
79 |
+
<label>
|
80 |
+
<input type="radio" name="userpro_login_form_layout"
|
81 |
+
value="above" <?php if ($settings->get('userpro_login_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
82 |
+
<span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
|
83 |
+
<img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
|
84 |
+
</label>
|
85 |
+
<label>
|
86 |
+
<input type="radio" name="userpro_login_form_layout"
|
87 |
+
value="above-separator" <?php if ($settings->get('userpro_login_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
88 |
+
<span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
|
89 |
+
<img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
|
90 |
+
</label><br>
|
91 |
+
</fieldset>
|
92 |
+
</td>
|
93 |
+
</tr>
|
94 |
+
|
95 |
+
<tr>
|
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; ?>>
|
102 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
103 |
+
<img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
|
104 |
+
</label>
|
105 |
+
<label>
|
106 |
+
<input type="radio" name="userpro_register_form_button_style"
|
107 |
+
value="icon" <?php if ($settings->get('userpro_register_form_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
108 |
+
<span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
|
109 |
+
<img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
|
110 |
+
</label><br>
|
111 |
+
</fieldset>
|
112 |
+
</td>
|
113 |
+
</tr>
|
114 |
+
<tr>
|
115 |
+
<th scope="row"><?php _e('Register layout', 'nextend-facebook-connect'); ?></th>
|
116 |
+
<td>
|
117 |
+
<fieldset>
|
118 |
+
<label>
|
119 |
+
<input type="radio" name="userpro_register_form_layout"
|
120 |
+
value="below" <?php if ($settings->get('userpro_register_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
121 |
+
<span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
|
122 |
+
<img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
|
123 |
+
</label>
|
124 |
+
<label>
|
125 |
+
<input type="radio" name="userpro_register_form_layout"
|
126 |
+
value="below-separator" <?php if ($settings->get('userpro_register_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
127 |
+
<span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
|
128 |
+
<img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
|
129 |
+
</label>
|
130 |
+
<label>
|
131 |
+
<input type="radio" name="userpro_register_form_layout"
|
132 |
+
value="above" <?php if ($settings->get('userpro_register_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
133 |
+
<span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
|
134 |
+
<img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
|
135 |
+
</label>
|
136 |
+
<label>
|
137 |
+
<input type="radio" name="userpro_register_form_layout"
|
138 |
+
value="above-separator" <?php if ($settings->get('userpro_register_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
139 |
+
<span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
|
140 |
+
<img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
|
141 |
+
</label><br>
|
142 |
+
</fieldset>
|
143 |
+
</td>
|
144 |
+
</tr>
|
145 |
+
|
146 |
+
<tr>
|
147 |
+
<th scope="row"><?php _e('Button alignment', 'nextend-facebook-connect'); ?></th>
|
148 |
+
<td>
|
149 |
+
<fieldset>
|
150 |
+
<label><input type="radio" name="userpro_form_button_align"
|
151 |
+
value="left" <?php if ($settings->get('userpro_form_button_align') == 'left') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
152 |
+
<span><?php _e('Left', 'nextend-facebook-connect'); ?></span></label><br>
|
153 |
+
<label><input type="radio" name="userpro_form_button_align"
|
154 |
+
value="center" <?php if ($settings->get('userpro_form_button_align') == 'center') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
155 |
+
<span><?php _e('Center', 'nextend-facebook-connect'); ?></span></label><br>
|
156 |
+
|
157 |
+
<label><input type="radio" name="userpro_form_button_align"
|
158 |
+
value="right" <?php if ($settings->get('userpro_form_button_align') == 'right') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
159 |
+
<span><?php _e('Right', 'nextend-facebook-connect'); ?></span></label><br>
|
160 |
+
</fieldset>
|
161 |
+
</td>
|
162 |
+
</tr>
|
163 |
+
</tbody>
|
164 |
+
</table>
|
165 |
+
<?php if ($isPRO): ?>
|
166 |
+
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
167 |
+
value="<?php _e('Save Changes'); ?>"></p>
|
168 |
+
<?php endif; ?>
|
admin/templates/settings/woocommerce.php
CHANGED
@@ -1,255 +1,255 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
|
4 |
-
$isPRO = NextendSocialLoginAdmin::isPro();
|
5 |
-
|
6 |
-
$attr = '';
|
7 |
-
if (!$isPRO) {
|
8 |
-
$attr = ' disabled ';
|
9 |
-
}
|
10 |
-
|
11 |
-
$settings = NextendSocialLogin::$settings;
|
12 |
-
|
13 |
-
NextendSocialLoginAdmin::showProBox();
|
14 |
-
?>
|
15 |
-
<table class="form-table">
|
16 |
-
<tbody>
|
17 |
-
<tr>
|
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; ?>>
|
24 |
-
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
25 |
-
<img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
|
26 |
-
</label>
|
27 |
-
<label>
|
28 |
-
<input type="radio" name="woocoommerce_form_button_style"
|
29 |
-
value="icon" <?php if ($settings->get('woocoommerce_form_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
30 |
-
<span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
|
31 |
-
<img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
|
32 |
-
</label><br>
|
33 |
-
</fieldset>
|
34 |
-
</td>
|
35 |
-
</tr>
|
36 |
-
|
37 |
-
<tr>
|
38 |
-
<th scope="row"><?php _e('Login form', 'nextend-facebook-connect'); ?></th>
|
39 |
-
<td>
|
40 |
-
<fieldset>
|
41 |
-
<label><input type="radio" name="woocommerce_login"
|
42 |
-
value="" <?php if ($settings->get('woocommerce_login') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
43 |
-
<span><?php _e('No Connect button in login form', 'nextend-facebook-connect'); ?></span></label><br>
|
44 |
-
<label><input type="radio" name="woocommerce_login"
|
45 |
-
value="before" <?php if ($settings->get('woocommerce_login') == 'before') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
46 |
-
<span><?php _e('Connect button on', 'nextend-facebook-connect'); ?></span>
|
47 |
-
<code><?php _e('Action:'); ?>
|
48 |
-
woocommerce_login_form_start</code></label><br>
|
49 |
-
<label><input type="radio" name="woocommerce_login"
|
50 |
-
value="after" <?php if ($settings->get('woocommerce_login') == 'after') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
51 |
-
<span><?php _e('Connect button on', 'nextend-facebook-connect'); ?></span>
|
52 |
-
<code><?php _e('Action:'); ?>
|
53 |
-
woocommerce_login_form_end</code></label><br>
|
54 |
-
</fieldset>
|
55 |
-
</td>
|
56 |
-
</tr>
|
57 |
-
<tr>
|
58 |
-
<th scope="row"><?php _e('Login layout', 'nextend-facebook-connect'); ?></th>
|
59 |
-
<td>
|
60 |
-
<fieldset>
|
61 |
-
<label>
|
62 |
-
<input type="radio" name="woocommerce_login_form_layout"
|
63 |
-
value="default" <?php if ($settings->get('woocommerce_login_form_layout') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
64 |
-
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
65 |
-
<img src="<?php echo plugins_url('images/layouts/default.png', NSL_ADMIN_PATH) ?>"/>
|
66 |
-
</label>
|
67 |
-
<label>
|
68 |
-
<input type="radio" name="woocommerce_login_form_layout"
|
69 |
-
value="below" <?php if ($settings->get('woocommerce_login_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
70 |
-
<span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
|
71 |
-
<img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
|
72 |
-
</label>
|
73 |
-
<label>
|
74 |
-
<input type="radio" name="woocommerce_login_form_layout"
|
75 |
-
value="below-separator" <?php if ($settings->get('woocommerce_login_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
76 |
-
<span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
|
77 |
-
<img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
|
78 |
-
</label>
|
79 |
-
<label>
|
80 |
-
<input type="radio" name="woocommerce_login_form_layout"
|
81 |
-
value="above" <?php if ($settings->get('woocommerce_login_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
82 |
-
<span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
|
83 |
-
<img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
|
84 |
-
</label>
|
85 |
-
<label>
|
86 |
-
<input type="radio" name="woocommerce_login_form_layout"
|
87 |
-
value="above-separator" <?php if ($settings->get('woocommerce_login_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
88 |
-
<span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
|
89 |
-
<img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
|
90 |
-
</label><br>
|
91 |
-
</fieldset>
|
92 |
-
</td>
|
93 |
-
</tr>
|
94 |
-
|
95 |
-
<tr>
|
96 |
-
<th scope="row"><?php _e('Register form', 'nextend-facebook-connect'); ?></th>
|
97 |
-
<td>
|
98 |
-
<fieldset>
|
99 |
-
<label><input type="radio" name="woocommerce_register"
|
100 |
-
value="" <?php if ($settings->get('woocommerce_register') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
101 |
-
<span><?php _e('No Connect button in register form', 'nextend-facebook-connect'); ?></span></label><br>
|
102 |
-
<label><input type="radio" name="woocommerce_register"
|
103 |
-
value="before" <?php if ($settings->get('woocommerce_register') == 'before') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
104 |
-
<span><?php _e('Connect button on', 'nextend-facebook-connect'); ?></span>
|
105 |
-
<code><?php _e('Action:'); ?>
|
106 |
-
woocommerce_register_form_start</code></label><br>
|
107 |
-
<label><input type="radio" name="woocommerce_register"
|
108 |
-
value="after" <?php if ($settings->get('woocommerce_register') == 'after') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
109 |
-
<span><?php _e('Connect button on', 'nextend-facebook-connect'); ?></span>
|
110 |
-
<code><?php _e('Action:'); ?>
|
111 |
-
woocommerce_register_form_end</code></label><br>
|
112 |
-
</fieldset>
|
113 |
-
</td>
|
114 |
-
</tr>
|
115 |
-
<tr>
|
116 |
-
<th scope="row"><?php _e('Register layout', 'nextend-facebook-connect'); ?></th>
|
117 |
-
<td>
|
118 |
-
<fieldset>
|
119 |
-
<label>
|
120 |
-
<input type="radio" name="woocommerce_register_form_layout"
|
121 |
-
value="default" <?php if ($settings->get('woocommerce_register_form_layout') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
122 |
-
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
123 |
-
<img src="<?php echo plugins_url('images/layouts/default.png', NSL_ADMIN_PATH) ?>"/>
|
124 |
-
</label>
|
125 |
-
<label>
|
126 |
-
<input type="radio" name="woocommerce_register_form_layout"
|
127 |
-
value="below" <?php if ($settings->get('woocommerce_register_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
128 |
-
<span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
|
129 |
-
<img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
|
130 |
-
</label>
|
131 |
-
<label>
|
132 |
-
<input type="radio" name="woocommerce_register_form_layout"
|
133 |
-
value="below-separator" <?php if ($settings->get('woocommerce_register_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
134 |
-
<span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
|
135 |
-
<img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
|
136 |
-
</label>
|
137 |
-
<label>
|
138 |
-
<input type="radio" name="woocommerce_register_form_layout"
|
139 |
-
value="above" <?php if ($settings->get('woocommerce_register_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
140 |
-
<span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
|
141 |
-
<img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
|
142 |
-
</label>
|
143 |
-
<label>
|
144 |
-
<input type="radio" name="woocommerce_register_form_layout"
|
145 |
-
value="above-separator" <?php if ($settings->get('woocommerce_register_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
146 |
-
<span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
|
147 |
-
<img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
|
148 |
-
</label><br>
|
149 |
-
</fieldset>
|
150 |
-
</td>
|
151 |
-
</tr>
|
152 |
-
|
153 |
-
<tr>
|
154 |
-
<th scope="row"><?php _e('Billing form', 'nextend-facebook-connect'); ?></th>
|
155 |
-
<td>
|
156 |
-
<fieldset>
|
157 |
-
<label><input type="radio" name="woocommerce_billing"
|
158 |
-
value="" <?php if ($settings->get('woocommerce_billing') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
159 |
-
<span><?php _e('No Connect button in billing form', 'nextend-facebook-connect'); ?></span></label><br>
|
160 |
-
<label><input type="radio" name="woocommerce_billing"
|
161 |
-
value="before" <?php if ($settings->get('woocommerce_billing') == 'before') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
162 |
-
<span><?php _e('Connect button on', 'nextend-facebook-connect'); ?></span>
|
163 |
-
<code><?php _e('Action:'); ?>
|
164 |
-
woocommerce_before_checkout_billing_form</code></label><br>
|
165 |
-
<label><input type="radio" name="woocommerce_billing"
|
166 |
-
value="after" <?php if ($settings->get('woocommerce_billing') == 'after') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
167 |
-
<span><?php _e('Connect button on', 'nextend-facebook-connect'); ?></span></label>
|
168 |
-
<code><?php _e('Action:'); ?>
|
169 |
-
woocommerce_after_checkout_billing_form</code><br>
|
170 |
-
</fieldset>
|
171 |
-
</td>
|
172 |
-
</tr>
|
173 |
-
<tr>
|
174 |
-
<th scope="row"><?php _e('Billing layout', 'nextend-facebook-connect'); ?></th>
|
175 |
-
<td>
|
176 |
-
<fieldset>
|
177 |
-
<label>
|
178 |
-
<input type="radio" name="woocommerce_billing_form_layout"
|
179 |
-
value="default" <?php if ($settings->get('woocommerce_billing_form_layout') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
180 |
-
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
181 |
-
<img src="<?php echo plugins_url('images/layouts/default.png', NSL_ADMIN_PATH) ?>"/>
|
182 |
-
</label>
|
183 |
-
<label>
|
184 |
-
<input type="radio" name="woocommerce_billing_form_layout"
|
185 |
-
value="below" <?php if ($settings->get('woocommerce_billing_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
186 |
-
<span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
|
187 |
-
<img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
|
188 |
-
</label>
|
189 |
-
<label>
|
190 |
-
<input type="radio" name="woocommerce_billing_form_layout"
|
191 |
-
value="below-separator" <?php if ($settings->get('woocommerce_billing_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
192 |
-
<span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
|
193 |
-
<img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
|
194 |
-
</label>
|
195 |
-
<label>
|
196 |
-
<input type="radio" name="woocommerce_billing_form_layout"
|
197 |
-
value="above" <?php if ($settings->get('woocommerce_billing_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
198 |
-
<span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
|
199 |
-
<img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
|
200 |
-
</label>
|
201 |
-
<label>
|
202 |
-
<input type="radio" name="woocommerce_billing_form_layout"
|
203 |
-
value="above-separator" <?php if ($settings->get('woocommerce_billing_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
204 |
-
<span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
|
205 |
-
<img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
|
206 |
-
</label><br>
|
207 |
-
</fieldset>
|
208 |
-
</td>
|
209 |
-
</tr>
|
210 |
-
|
211 |
-
<tr>
|
212 |
-
<th scope="row"><?php _e('Account details', 'nextend-facebook-connect'); ?></th>
|
213 |
-
<td>
|
214 |
-
<fieldset>
|
215 |
-
<label><input type="radio" name="woocommerce_account_details"
|
216 |
-
value="" <?php if ($settings->get('woocommerce_account_details') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
217 |
-
<span><?php _e('No Connect buttons in account details form', 'nextend-facebook-connect'); ?></span></label><br>
|
218 |
-
<label><input type="radio" name="woocommerce_account_details"
|
219 |
-
value="before" <?php if ($settings->get('woocommerce_account_details') == 'before') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
220 |
-
<span><?php _e('Link buttons on', 'nextend-facebook-connect'); ?></span>
|
221 |
-
<code><?php _e('Action:'); ?>
|
222 |
-
woocommerce_edit_account_form_start</code></label><br>
|
223 |
-
<label><input type="radio" name="woocommerce_account_details"
|
224 |
-
value="after" <?php if ($settings->get('woocommerce_account_details') == 'after') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
225 |
-
<span><?php _e('Link buttons on', 'nextend-facebook-connect'); ?></span>
|
226 |
-
<code><?php _e('Action:'); ?>
|
227 |
-
woocommerce_edit_account_form_end</code></label><br>
|
228 |
-
</fieldset>
|
229 |
-
</td>
|
230 |
-
</tr>
|
231 |
-
|
232 |
-
<tr>
|
233 |
-
<th scope="row"><?php _e('Button alignment', 'nextend-facebook-connect'); ?></th>
|
234 |
-
<td>
|
235 |
-
<fieldset>
|
236 |
-
<label><input type="radio" name="woocoommerce_form_button_align"
|
237 |
-
value="left" <?php if ($settings->get('woocoommerce_form_button_align') == 'left') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
238 |
-
<span><?php _e('Left', 'nextend-facebook-connect'); ?></span></label><br>
|
239 |
-
<label><input type="radio" name="woocoommerce_form_button_align"
|
240 |
-
value="center" <?php if ($settings->get('woocoommerce_form_button_align') == 'center') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
241 |
-
<span><?php _e('Center', 'nextend-facebook-connect'); ?></span></label><br>
|
242 |
-
|
243 |
-
<label><input type="radio" name="woocoommerce_form_button_align"
|
244 |
-
value="right" <?php if ($settings->get('woocoommerce_form_button_align') == 'right') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
245 |
-
<span><?php _e('Right', 'nextend-facebook-connect'); ?></span></label><br>
|
246 |
-
</fieldset>
|
247 |
-
</td>
|
248 |
-
</tr>
|
249 |
-
|
250 |
-
</tbody>
|
251 |
-
</table>
|
252 |
-
<?php if ($isPRO): ?>
|
253 |
-
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
254 |
-
value="<?php _e('Save Changes'); ?>"></p>
|
255 |
-
<?php endif; ?>
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
|
4 |
+
$isPRO = NextendSocialLoginAdmin::isPro();
|
5 |
+
|
6 |
+
$attr = '';
|
7 |
+
if (!$isPRO) {
|
8 |
+
$attr = ' disabled ';
|
9 |
+
}
|
10 |
+
|
11 |
+
$settings = NextendSocialLogin::$settings;
|
12 |
+
|
13 |
+
NextendSocialLoginAdmin::showProBox();
|
14 |
+
?>
|
15 |
+
<table class="form-table">
|
16 |
+
<tbody>
|
17 |
+
<tr>
|
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; ?>>
|
24 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
25 |
+
<img src="<?php echo plugins_url('images/buttons/default.png', NSL_ADMIN_PATH) ?>"/>
|
26 |
+
</label>
|
27 |
+
<label>
|
28 |
+
<input type="radio" name="woocoommerce_form_button_style"
|
29 |
+
value="icon" <?php if ($settings->get('woocoommerce_form_button_style') == 'icon') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
30 |
+
<span><?php _e('Icon', 'nextend-facebook-connect'); ?></span><br/>
|
31 |
+
<img src="<?php echo plugins_url('images/buttons/icon.png', NSL_ADMIN_PATH) ?>"/>
|
32 |
+
</label><br>
|
33 |
+
</fieldset>
|
34 |
+
</td>
|
35 |
+
</tr>
|
36 |
+
|
37 |
+
<tr>
|
38 |
+
<th scope="row"><?php _e('Login form', 'nextend-facebook-connect'); ?></th>
|
39 |
+
<td>
|
40 |
+
<fieldset>
|
41 |
+
<label><input type="radio" name="woocommerce_login"
|
42 |
+
value="" <?php if ($settings->get('woocommerce_login') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
43 |
+
<span><?php _e('No Connect button in login form', 'nextend-facebook-connect'); ?></span></label><br>
|
44 |
+
<label><input type="radio" name="woocommerce_login"
|
45 |
+
value="before" <?php if ($settings->get('woocommerce_login') == 'before') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
46 |
+
<span><?php _e('Connect button on', 'nextend-facebook-connect'); ?></span>
|
47 |
+
<code><?php _e('Action:'); ?>
|
48 |
+
woocommerce_login_form_start</code></label><br>
|
49 |
+
<label><input type="radio" name="woocommerce_login"
|
50 |
+
value="after" <?php if ($settings->get('woocommerce_login') == 'after') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
51 |
+
<span><?php _e('Connect button on', 'nextend-facebook-connect'); ?></span>
|
52 |
+
<code><?php _e('Action:'); ?>
|
53 |
+
woocommerce_login_form_end</code></label><br>
|
54 |
+
</fieldset>
|
55 |
+
</td>
|
56 |
+
</tr>
|
57 |
+
<tr>
|
58 |
+
<th scope="row"><?php _e('Login layout', 'nextend-facebook-connect'); ?></th>
|
59 |
+
<td>
|
60 |
+
<fieldset>
|
61 |
+
<label>
|
62 |
+
<input type="radio" name="woocommerce_login_form_layout"
|
63 |
+
value="default" <?php if ($settings->get('woocommerce_login_form_layout') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
64 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
65 |
+
<img src="<?php echo plugins_url('images/layouts/default.png', NSL_ADMIN_PATH) ?>"/>
|
66 |
+
</label>
|
67 |
+
<label>
|
68 |
+
<input type="radio" name="woocommerce_login_form_layout"
|
69 |
+
value="below" <?php if ($settings->get('woocommerce_login_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
70 |
+
<span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
|
71 |
+
<img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
|
72 |
+
</label>
|
73 |
+
<label>
|
74 |
+
<input type="radio" name="woocommerce_login_form_layout"
|
75 |
+
value="below-separator" <?php if ($settings->get('woocommerce_login_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
76 |
+
<span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
|
77 |
+
<img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
|
78 |
+
</label>
|
79 |
+
<label>
|
80 |
+
<input type="radio" name="woocommerce_login_form_layout"
|
81 |
+
value="above" <?php if ($settings->get('woocommerce_login_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
82 |
+
<span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
|
83 |
+
<img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
|
84 |
+
</label>
|
85 |
+
<label>
|
86 |
+
<input type="radio" name="woocommerce_login_form_layout"
|
87 |
+
value="above-separator" <?php if ($settings->get('woocommerce_login_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
88 |
+
<span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
|
89 |
+
<img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
|
90 |
+
</label><br>
|
91 |
+
</fieldset>
|
92 |
+
</td>
|
93 |
+
</tr>
|
94 |
+
|
95 |
+
<tr>
|
96 |
+
<th scope="row"><?php _e('Register form', 'nextend-facebook-connect'); ?></th>
|
97 |
+
<td>
|
98 |
+
<fieldset>
|
99 |
+
<label><input type="radio" name="woocommerce_register"
|
100 |
+
value="" <?php if ($settings->get('woocommerce_register') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
101 |
+
<span><?php _e('No Connect button in register form', 'nextend-facebook-connect'); ?></span></label><br>
|
102 |
+
<label><input type="radio" name="woocommerce_register"
|
103 |
+
value="before" <?php if ($settings->get('woocommerce_register') == 'before') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
104 |
+
<span><?php _e('Connect button on', 'nextend-facebook-connect'); ?></span>
|
105 |
+
<code><?php _e('Action:'); ?>
|
106 |
+
woocommerce_register_form_start</code></label><br>
|
107 |
+
<label><input type="radio" name="woocommerce_register"
|
108 |
+
value="after" <?php if ($settings->get('woocommerce_register') == 'after') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
109 |
+
<span><?php _e('Connect button on', 'nextend-facebook-connect'); ?></span>
|
110 |
+
<code><?php _e('Action:'); ?>
|
111 |
+
woocommerce_register_form_end</code></label><br>
|
112 |
+
</fieldset>
|
113 |
+
</td>
|
114 |
+
</tr>
|
115 |
+
<tr>
|
116 |
+
<th scope="row"><?php _e('Register layout', 'nextend-facebook-connect'); ?></th>
|
117 |
+
<td>
|
118 |
+
<fieldset>
|
119 |
+
<label>
|
120 |
+
<input type="radio" name="woocommerce_register_form_layout"
|
121 |
+
value="default" <?php if ($settings->get('woocommerce_register_form_layout') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
122 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
123 |
+
<img src="<?php echo plugins_url('images/layouts/default.png', NSL_ADMIN_PATH) ?>"/>
|
124 |
+
</label>
|
125 |
+
<label>
|
126 |
+
<input type="radio" name="woocommerce_register_form_layout"
|
127 |
+
value="below" <?php if ($settings->get('woocommerce_register_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
128 |
+
<span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
|
129 |
+
<img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
|
130 |
+
</label>
|
131 |
+
<label>
|
132 |
+
<input type="radio" name="woocommerce_register_form_layout"
|
133 |
+
value="below-separator" <?php if ($settings->get('woocommerce_register_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
134 |
+
<span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
|
135 |
+
<img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
|
136 |
+
</label>
|
137 |
+
<label>
|
138 |
+
<input type="radio" name="woocommerce_register_form_layout"
|
139 |
+
value="above" <?php if ($settings->get('woocommerce_register_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
140 |
+
<span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
|
141 |
+
<img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
|
142 |
+
</label>
|
143 |
+
<label>
|
144 |
+
<input type="radio" name="woocommerce_register_form_layout"
|
145 |
+
value="above-separator" <?php if ($settings->get('woocommerce_register_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
146 |
+
<span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
|
147 |
+
<img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
|
148 |
+
</label><br>
|
149 |
+
</fieldset>
|
150 |
+
</td>
|
151 |
+
</tr>
|
152 |
+
|
153 |
+
<tr>
|
154 |
+
<th scope="row"><?php _e('Billing form', 'nextend-facebook-connect'); ?></th>
|
155 |
+
<td>
|
156 |
+
<fieldset>
|
157 |
+
<label><input type="radio" name="woocommerce_billing"
|
158 |
+
value="" <?php if ($settings->get('woocommerce_billing') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
159 |
+
<span><?php _e('No Connect button in billing form', 'nextend-facebook-connect'); ?></span></label><br>
|
160 |
+
<label><input type="radio" name="woocommerce_billing"
|
161 |
+
value="before" <?php if ($settings->get('woocommerce_billing') == 'before') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
162 |
+
<span><?php _e('Connect button on', 'nextend-facebook-connect'); ?></span>
|
163 |
+
<code><?php _e('Action:'); ?>
|
164 |
+
woocommerce_before_checkout_billing_form</code></label><br>
|
165 |
+
<label><input type="radio" name="woocommerce_billing"
|
166 |
+
value="after" <?php if ($settings->get('woocommerce_billing') == 'after') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
167 |
+
<span><?php _e('Connect button on', 'nextend-facebook-connect'); ?></span></label>
|
168 |
+
<code><?php _e('Action:'); ?>
|
169 |
+
woocommerce_after_checkout_billing_form</code><br>
|
170 |
+
</fieldset>
|
171 |
+
</td>
|
172 |
+
</tr>
|
173 |
+
<tr>
|
174 |
+
<th scope="row"><?php _e('Billing layout', 'nextend-facebook-connect'); ?></th>
|
175 |
+
<td>
|
176 |
+
<fieldset>
|
177 |
+
<label>
|
178 |
+
<input type="radio" name="woocommerce_billing_form_layout"
|
179 |
+
value="default" <?php if ($settings->get('woocommerce_billing_form_layout') == 'default') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
180 |
+
<span><?php _e('Default', 'nextend-facebook-connect'); ?></span><br/>
|
181 |
+
<img src="<?php echo plugins_url('images/layouts/default.png', NSL_ADMIN_PATH) ?>"/>
|
182 |
+
</label>
|
183 |
+
<label>
|
184 |
+
<input type="radio" name="woocommerce_billing_form_layout"
|
185 |
+
value="below" <?php if ($settings->get('woocommerce_billing_form_layout') == 'below') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
186 |
+
<span><?php _e('Below', 'nextend-facebook-connect'); ?></span><br/>
|
187 |
+
<img src="<?php echo plugins_url('images/layouts/below.png', NSL_ADMIN_PATH) ?>"/>
|
188 |
+
</label>
|
189 |
+
<label>
|
190 |
+
<input type="radio" name="woocommerce_billing_form_layout"
|
191 |
+
value="below-separator" <?php if ($settings->get('woocommerce_billing_form_layout') == 'below-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
192 |
+
<span><?php _e('Below with separator', 'nextend-facebook-connect'); ?></span><br/>
|
193 |
+
<img src="<?php echo plugins_url('images/layouts/below-separator.png', NSL_ADMIN_PATH) ?>"/>
|
194 |
+
</label>
|
195 |
+
<label>
|
196 |
+
<input type="radio" name="woocommerce_billing_form_layout"
|
197 |
+
value="above" <?php if ($settings->get('woocommerce_billing_form_layout') == 'above') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
198 |
+
<span><?php _e('Above', 'nextend-facebook-connect'); ?></span><br/>
|
199 |
+
<img src="<?php echo plugins_url('images/layouts/above.png', NSL_ADMIN_PATH) ?>"/>
|
200 |
+
</label>
|
201 |
+
<label>
|
202 |
+
<input type="radio" name="woocommerce_billing_form_layout"
|
203 |
+
value="above-separator" <?php if ($settings->get('woocommerce_billing_form_layout') == 'above-separator') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
204 |
+
<span><?php _e('Above with separator', 'nextend-facebook-connect'); ?></span><br/>
|
205 |
+
<img src="<?php echo plugins_url('images/layouts/above-separator.png', NSL_ADMIN_PATH) ?>"/>
|
206 |
+
</label><br>
|
207 |
+
</fieldset>
|
208 |
+
</td>
|
209 |
+
</tr>
|
210 |
+
|
211 |
+
<tr>
|
212 |
+
<th scope="row"><?php _e('Account details', 'nextend-facebook-connect'); ?></th>
|
213 |
+
<td>
|
214 |
+
<fieldset>
|
215 |
+
<label><input type="radio" name="woocommerce_account_details"
|
216 |
+
value="" <?php if ($settings->get('woocommerce_account_details') == '') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
217 |
+
<span><?php _e('No Connect buttons in account details form', 'nextend-facebook-connect'); ?></span></label><br>
|
218 |
+
<label><input type="radio" name="woocommerce_account_details"
|
219 |
+
value="before" <?php if ($settings->get('woocommerce_account_details') == 'before') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
220 |
+
<span><?php _e('Link buttons on', 'nextend-facebook-connect'); ?></span>
|
221 |
+
<code><?php _e('Action:'); ?>
|
222 |
+
woocommerce_edit_account_form_start</code></label><br>
|
223 |
+
<label><input type="radio" name="woocommerce_account_details"
|
224 |
+
value="after" <?php if ($settings->get('woocommerce_account_details') == 'after') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
225 |
+
<span><?php _e('Link buttons on', 'nextend-facebook-connect'); ?></span>
|
226 |
+
<code><?php _e('Action:'); ?>
|
227 |
+
woocommerce_edit_account_form_end</code></label><br>
|
228 |
+
</fieldset>
|
229 |
+
</td>
|
230 |
+
</tr>
|
231 |
+
|
232 |
+
<tr>
|
233 |
+
<th scope="row"><?php _e('Button alignment', 'nextend-facebook-connect'); ?></th>
|
234 |
+
<td>
|
235 |
+
<fieldset>
|
236 |
+
<label><input type="radio" name="woocoommerce_form_button_align"
|
237 |
+
value="left" <?php if ($settings->get('woocoommerce_form_button_align') == 'left') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
238 |
+
<span><?php _e('Left', 'nextend-facebook-connect'); ?></span></label><br>
|
239 |
+
<label><input type="radio" name="woocoommerce_form_button_align"
|
240 |
+
value="center" <?php if ($settings->get('woocoommerce_form_button_align') == 'center') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
241 |
+
<span><?php _e('Center', 'nextend-facebook-connect'); ?></span></label><br>
|
242 |
+
|
243 |
+
<label><input type="radio" name="woocoommerce_form_button_align"
|
244 |
+
value="right" <?php if ($settings->get('woocoommerce_form_button_align') == 'right') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
245 |
+
<span><?php _e('Right', 'nextend-facebook-connect'); ?></span></label><br>
|
246 |
+
</fieldset>
|
247 |
+
</td>
|
248 |
+
</tr>
|
249 |
+
|
250 |
+
</tbody>
|
251 |
+
</table>
|
252 |
+
<?php if ($isPRO): ?>
|
253 |
+
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
254 |
+
value="<?php _e('Save Changes'); ?>"></p>
|
255 |
+
<?php endif; ?>
|
admin/templates/test-connection.php
CHANGED
@@ -1,65 +1,67 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if (isset($_GET['provider'])) {
|
4 |
-
$providerID = $_GET['provider'];
|
5 |
-
|
6 |
-
if (isset(NextendSocialLogin::$allowedProviders[$providerID])) {
|
7 |
-
$provider = NextendSocialLogin::$allowedProviders[$providerID];
|
8 |
-
?>
|
9 |
-
<div class="nsl-admin-content">
|
10 |
-
|
11 |
-
|
12 |
-
<?php
|
13 |
-
|
14 |
-
$ch = curl_init();
|
15 |
-
curl_setopt($ch, CURLOPT_URL, $provider->getTestUrl());
|
16 |
-
curl_setopt($ch, CURLOPT_POST, 1);
|
17 |
-
curl_setopt($ch, CURLOPT_POSTFIELDS, "");
|
18 |
-
curl_setopt($ch, CURLOPT_VERBOSE, true);
|
19 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
20 |
-
|
21 |
-
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
|
22 |
-
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
|
23 |
-
|
24 |
-
$cacert = ABSPATH . WPINC . '/certificates/ca-bundle.crt';
|
25 |
-
if (file_exists($cacert)) {
|
26 |
-
curl_setopt($ch, CURLOPT_CAINFO, $cacert);
|
27 |
-
}
|
28 |
-
|
29 |
-
$file = tempnam(sys_get_temp_dir(), 'nsl-test');
|
30 |
-
$temporaryHandle = fopen($file, 'w+');
|
31 |
-
curl_setopt($ch, CURLOPT_STDERR, $temporaryHandle);
|
32 |
-
|
33 |
-
$output = curl_exec($ch);
|
34 |
-
curl_close($ch);
|
35 |
-
|
36 |
-
rewind($temporaryHandle);
|
37 |
-
|
38 |
-
$verboseLog = stream_get_contents($temporaryHandle);
|
39 |
-
if (preg_match('/connected/i', $verboseLog)) {
|
40 |
-
?>
|
41 |
-
<div class="updated"><p
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
|
|
|
|
65 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (isset($_GET['provider'])) {
|
4 |
+
$providerID = $_GET['provider'];
|
5 |
+
|
6 |
+
if (isset(NextendSocialLogin::$allowedProviders[$providerID])) {
|
7 |
+
$provider = NextendSocialLogin::$allowedProviders[$providerID];
|
8 |
+
?>
|
9 |
+
<div class="nsl-admin-content">
|
10 |
+
<h1>Debug: <?php echo $provider->getLabel(); ?></h1>
|
11 |
+
|
12 |
+
<?php
|
13 |
+
|
14 |
+
$ch = curl_init();
|
15 |
+
curl_setopt($ch, CURLOPT_URL, $provider->getTestUrl());
|
16 |
+
curl_setopt($ch, CURLOPT_POST, 1);
|
17 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, "");
|
18 |
+
curl_setopt($ch, CURLOPT_VERBOSE, true);
|
19 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
20 |
+
|
21 |
+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
|
22 |
+
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
|
23 |
+
|
24 |
+
$cacert = ABSPATH . WPINC . '/certificates/ca-bundle.crt';
|
25 |
+
if (file_exists($cacert)) {
|
26 |
+
curl_setopt($ch, CURLOPT_CAINFO, $cacert);
|
27 |
+
}
|
28 |
+
|
29 |
+
$file = tempnam(sys_get_temp_dir(), 'nsl-test');
|
30 |
+
$temporaryHandle = fopen($file, 'w+');
|
31 |
+
curl_setopt($ch, CURLOPT_STDERR, $temporaryHandle);
|
32 |
+
|
33 |
+
$output = curl_exec($ch);
|
34 |
+
curl_close($ch);
|
35 |
+
|
36 |
+
rewind($temporaryHandle);
|
37 |
+
|
38 |
+
$verboseLog = stream_get_contents($temporaryHandle);
|
39 |
+
if (preg_match('/connected/i', $verboseLog)) {
|
40 |
+
?>
|
41 |
+
<div class="updated"><p>
|
42 |
+
<b><?php printf(__('Network connection successful: %1$s', 'nextend-facebook-connect'), $provider->getTestUrl()); ?></b>
|
43 |
+
</p></div>
|
44 |
+
<?php
|
45 |
+
} else {
|
46 |
+
?>
|
47 |
+
<div class="error">
|
48 |
+
<p>
|
49 |
+
<b><?php printf(__('Network connection failed: %1$s', 'nextend-facebook-connect'), $provider->getTestUrl()); ?></b>
|
50 |
+
</p>
|
51 |
+
<p>
|
52 |
+
<?php _e('Please contact with your hosting provider to resolve the network issue between your server and the provider.', 'nextend-facebook-connect'); ?>
|
53 |
+
</p>
|
54 |
+
</div>
|
55 |
+
<?php
|
56 |
+
}
|
57 |
+
|
58 |
+
echo "<pre>", htmlspecialchars($verboseLog), "</pre>\n";
|
59 |
+
fclose($temporaryHandle);
|
60 |
+
|
61 |
+
echo "<pre>", htmlspecialchars($output), "</pre>\n";
|
62 |
+
@unlink($file);
|
63 |
+
?>
|
64 |
+
</div>
|
65 |
+
<?php
|
66 |
+
}
|
67 |
}
|
admin/upgrader.php
CHANGED
@@ -1,95 +1,97 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
add_filter('
|
10 |
-
|
11 |
-
add_filter('
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
$res =
|
21 |
-
}
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
$item =
|
78 |
-
}
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
$transient->no_update[$filename]
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
|
|
|
|
95 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use NSL\Notices;
|
4 |
+
|
5 |
+
class NextendSocialUpgrader {
|
6 |
+
|
7 |
+
public static function init() {
|
8 |
+
|
9 |
+
add_filter('plugins_api', 'NextendSocialUpgrader::plugins_api', 20, 3); // WooCommerce use priority 20, so better to follow
|
10 |
+
|
11 |
+
add_filter('upgrader_pre_download', 'NextendSocialUpgrader::upgrader_pre_download', 10, 3);
|
12 |
+
|
13 |
+
add_filter('pre_set_site_transient_update_plugins', 'NextendSocialUpgrader::injectUpdate');
|
14 |
+
|
15 |
+
}
|
16 |
+
|
17 |
+
public static function plugins_api($res, $action, $args) {
|
18 |
+
if ($action === 'plugin_information' && $args->slug === 'nextend-social-login-pro') {
|
19 |
+
try {
|
20 |
+
$res = (object)NextendSocialLoginAdmin::apiCall($action, (array)$args);
|
21 |
+
} catch (Exception $e) {
|
22 |
+
$res = new WP_Error('error', $e->getMessage());
|
23 |
+
}
|
24 |
+
}
|
25 |
+
|
26 |
+
return $res;
|
27 |
+
}
|
28 |
+
|
29 |
+
public static function upgrader_pre_download($reply, $package, $upgrader) {
|
30 |
+
$needle = NextendSocialLoginAdmin::getEndpoint();
|
31 |
+
if (substr($package, 0, strlen($needle)) == $needle) {
|
32 |
+
add_filter('http_response', 'NextendSocialUpgrader::http_response', 10, 3);
|
33 |
+
}
|
34 |
+
|
35 |
+
return $reply;
|
36 |
+
}
|
37 |
+
|
38 |
+
public static function http_response($response, $r, $url) {
|
39 |
+
|
40 |
+
$needle = NextendSocialLoginAdmin::getEndpoint();
|
41 |
+
if (substr($url, 0, strlen($needle)) == $needle && 200 != wp_remote_retrieve_response_code($response) || is_wp_error($response)) {
|
42 |
+
|
43 |
+
if (isset($response['filename']) && file_exists($response['filename'])) {
|
44 |
+
|
45 |
+
$body = @json_decode(@file_get_contents($response['filename']), true);
|
46 |
+
|
47 |
+
if (is_array($body) && isset($body['message'])) {
|
48 |
+
$message = 'Nextend Social Login Pro Addon: ' . $body['message'];
|
49 |
+
|
50 |
+
if (isset($body['code']) && $body['code'] == 'license_invalid' && NextendSocialLogin::hasLicense()) {
|
51 |
+
NextendSocialLogin::$settings->update(array(
|
52 |
+
'license_key' => ''
|
53 |
+
));
|
54 |
+
$message .= ' - the stored license key has been removed!';
|
55 |
+
}
|
56 |
+
|
57 |
+
Notices::addError($message);
|
58 |
+
|
59 |
+
return new WP_Error('error', $message);
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
return $response;
|
65 |
+
}
|
66 |
+
|
67 |
+
public static function injectUpdate($transient) {
|
68 |
+
|
69 |
+
if (!class_exists('NextendSocialLoginPRO', false)) {
|
70 |
+
return $transient;
|
71 |
+
}
|
72 |
+
|
73 |
+
$filename = "nextend-social-login-pro/nextend-social-login-pro.php";
|
74 |
+
|
75 |
+
if (!isset($transient->response[$filename])) {
|
76 |
+
try {
|
77 |
+
$item = (object)NextendSocialLoginAdmin::apiCall('plugin_information', array('slug' => 'nextend-social-login-pro'));
|
78 |
+
} catch (Exception $e) {
|
79 |
+
$item = new WP_Error('error', $e->getMessage());
|
80 |
+
}
|
81 |
+
|
82 |
+
if (!is_wp_error($item)) {
|
83 |
+
$item->plugin = 'nextend-social-login-pro/nextend-social-login-pro.php';
|
84 |
+
if (version_compare(NextendSocialLoginPRO::$version, $item->new_version, '<')) {
|
85 |
+
$transient->response[$filename] = (object)$item;
|
86 |
+
unset($transient->no_update[$filename]);
|
87 |
+
} else {
|
88 |
+
$transient->no_update[$filename] = (object)$item;
|
89 |
+
unset($transient->response[$filename]);
|
90 |
+
}
|
91 |
+
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
return $transient;
|
96 |
+
}
|
97 |
}
|
class-settings.php
CHANGED
@@ -1,80 +1,93 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class NextendSocialLoginSettings {
|
4 |
-
|
5 |
-
protected $optionKey;
|
6 |
-
|
7 |
-
protected $settings = array(
|
8 |
-
'default' => array(),
|
9 |
-
'stored' => array(),
|
10 |
-
'final' => array()
|
11 |
-
);
|
12 |
-
|
13 |
-
/**
|
14 |
-
* NextendSocialLoginSettings constructor.
|
15 |
-
*
|
16 |
-
* @param $optionKey string
|
17 |
-
* @param $defaultSettings array
|
18 |
-
*/
|
19 |
-
public function __construct($optionKey, $defaultSettings) {
|
20 |
-
$this->optionKey = $optionKey;
|
21 |
-
|
22 |
-
$this->settings['default'] = $defaultSettings;
|
23 |
-
|
24 |
-
|
25 |
-
$storedSettings = get_option($this->optionKey);
|
26 |
-
if ($storedSettings !== false) {
|
27 |
-
$storedSettings = (array)maybe_unserialize($storedSettings);
|
28 |
-
} else {
|
29 |
-
$storedSettings = array();
|
30 |
-
}
|
31 |
-
|
32 |
-
$this->settings['stored'] = array_merge($this->settings['default'], $storedSettings);
|
33 |
-
|
34 |
-
$this->settings['final'] = apply_filters('nsl_finalize_settings_' . $optionKey, $this->settings['stored']);
|
35 |
-
}
|
36 |
-
|
37 |
-
public function get($key, $storage = 'final') {
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
$this->settings[
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
}
|
49 |
-
|
50 |
-
public function
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class NextendSocialLoginSettings {
|
4 |
+
|
5 |
+
protected $optionKey;
|
6 |
+
|
7 |
+
protected $settings = array(
|
8 |
+
'default' => array(),
|
9 |
+
'stored' => array(),
|
10 |
+
'final' => array()
|
11 |
+
);
|
12 |
+
|
13 |
+
/**
|
14 |
+
* NextendSocialLoginSettings constructor.
|
15 |
+
*
|
16 |
+
* @param $optionKey string
|
17 |
+
* @param $defaultSettings array
|
18 |
+
*/
|
19 |
+
public function __construct($optionKey, $defaultSettings) {
|
20 |
+
$this->optionKey = $optionKey;
|
21 |
+
|
22 |
+
$this->settings['default'] = $defaultSettings;
|
23 |
+
|
24 |
+
|
25 |
+
$storedSettings = get_option($this->optionKey);
|
26 |
+
if ($storedSettings !== false) {
|
27 |
+
$storedSettings = (array)maybe_unserialize($storedSettings);
|
28 |
+
} else {
|
29 |
+
$storedSettings = array();
|
30 |
+
}
|
31 |
+
|
32 |
+
$this->settings['stored'] = array_merge($this->settings['default'], $storedSettings);
|
33 |
+
|
34 |
+
$this->settings['final'] = apply_filters('nsl_finalize_settings_' . $optionKey, $this->settings['stored']);
|
35 |
+
}
|
36 |
+
|
37 |
+
public function get($key, $storage = 'final') {
|
38 |
+
if (!isset($this->settings[$storage][$key])) {
|
39 |
+
return false;
|
40 |
+
}
|
41 |
+
|
42 |
+
return $this->settings[$storage][$key];
|
43 |
+
}
|
44 |
+
|
45 |
+
public function set($key, $value) {
|
46 |
+
$this->settings['stored'][$key] = $value;
|
47 |
+
$this->storeSettings();
|
48 |
+
}
|
49 |
+
|
50 |
+
public function getAll($storage = 'final') {
|
51 |
+
return $this->settings[$storage];
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* @param array $postedData
|
56 |
+
*
|
57 |
+
* @return bool
|
58 |
+
*/
|
59 |
+
public function update($postedData) {
|
60 |
+
if (is_array($postedData)) {
|
61 |
+
$newData = array();
|
62 |
+
$newData = apply_filters('nsl_update_settings_validate_' . $this->optionKey, $newData, $postedData);
|
63 |
+
|
64 |
+
if (count($newData)) {
|
65 |
+
|
66 |
+
$isChanged = false;
|
67 |
+
foreach ($newData AS $key => $value) {
|
68 |
+
if ($this->settings['stored'][$key] != $value) {
|
69 |
+
$this->settings['stored'][$key] = $value;
|
70 |
+
$isChanged = true;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
if ($isChanged) {
|
75 |
+
$allowedKeys = array_keys($this->settings['default']);
|
76 |
+
$this->settings['stored'] = array_intersect_key($this->settings['stored'], array_flip($allowedKeys));
|
77 |
+
|
78 |
+
$this->storeSettings();
|
79 |
+
|
80 |
+
return true;
|
81 |
+
}
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
return false;
|
86 |
+
}
|
87 |
+
|
88 |
+
protected function storeSettings() {
|
89 |
+
update_option($this->optionKey, maybe_serialize($this->settings['stored']));
|
90 |
+
|
91 |
+
$this->settings['final'] = apply_filters('nsl_finalize_settings_' . $this->optionKey, $this->settings['stored']);
|
92 |
+
}
|
93 |
}
|
compat.php
CHANGED
@@ -1,26 +1,46 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
class NextendSocialLoginCompatibility {
|
5 |
-
|
6 |
-
public function __construct() {
|
7 |
-
add_action('after_setup_theme', array(
|
8 |
-
$this,
|
9 |
-
'after_setup_theme'
|
10 |
-
), 11);
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class NextendSocialLoginCompatibility {
|
5 |
+
|
6 |
+
public function __construct() {
|
7 |
+
add_action('after_setup_theme', array(
|
8 |
+
$this,
|
9 |
+
'after_setup_theme'
|
10 |
+
), 11);
|
11 |
+
|
12 |
+
add_action('wp_head', array(
|
13 |
+
$this,
|
14 |
+
'wplms_hide_duplicate_buttons'
|
15 |
+
), 10);
|
16 |
+
|
17 |
+
}
|
18 |
+
|
19 |
+
public function after_setup_theme() {
|
20 |
+
global $pagenow;
|
21 |
+
|
22 |
+
/** Compatibility fix for Socialize theme @SEE https://themeforest.net/item/socialize-multipurpose-buddypress-theme/12897637 */
|
23 |
+
if (function_exists('ghostpool_login_redirect')) {
|
24 |
+
if ('wp-login.php' === $pagenow && !empty($_GET['loginSocial'])) {
|
25 |
+
/** If the action not removed, then the wp-login.php always redirected to {siteurl}/#login/ and it break social login */
|
26 |
+
remove_action('init', 'ghostpool_login_redirect');
|
27 |
+
}
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
public function wplms_hide_duplicate_buttons() {
|
32 |
+
if (class_exists('vibe_bp_login', false)) {
|
33 |
+
echo "<style>
|
34 |
+
/**
|
35 |
+
WPLMS triggers the same hook twice in the same form -> Hide duplicated social buttons.
|
36 |
+
*/
|
37 |
+
div#vibe_bp_login div#nsl-custom-login-form-2{
|
38 |
+
display:none;
|
39 |
+
}
|
40 |
+
</style>
|
41 |
+
";
|
42 |
+
}
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
new NextendSocialLoginCompatibility();
|
includes/auth.php
CHANGED
@@ -1,39 +1,39 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
abstract class NextendSocialAuth {
|
4 |
-
|
5 |
-
protected $providerID;
|
6 |
-
|
7 |
-
protected $access_token_data;
|
8 |
-
|
9 |
-
public function __construct($providerID) {
|
10 |
-
$this->providerID = $providerID;
|
11 |
-
}
|
12 |
-
|
13 |
-
public function checkError() {
|
14 |
-
|
15 |
-
}
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @param string $access_token_data
|
19 |
-
*/
|
20 |
-
public function setAccessTokenData($access_token_data) {
|
21 |
-
$this->access_token_data = json_decode($access_token_data, true);
|
22 |
-
}
|
23 |
-
|
24 |
-
public abstract function createAuthUrl();
|
25 |
-
|
26 |
-
public abstract function authenticate();
|
27 |
-
|
28 |
-
public abstract function get($path, $data = array(), $endpoint = false);
|
29 |
-
|
30 |
-
/**
|
31 |
-
* @return bool
|
32 |
-
*/
|
33 |
-
public abstract function hasAuthenticateData();
|
34 |
-
|
35 |
-
/**
|
36 |
-
* @return string
|
37 |
-
*/
|
38 |
-
public abstract function getTestUrl();
|
39 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
abstract class NextendSocialAuth {
|
4 |
+
|
5 |
+
protected $providerID;
|
6 |
+
|
7 |
+
protected $access_token_data;
|
8 |
+
|
9 |
+
public function __construct($providerID) {
|
10 |
+
$this->providerID = $providerID;
|
11 |
+
}
|
12 |
+
|
13 |
+
public function checkError() {
|
14 |
+
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @param string $access_token_data
|
19 |
+
*/
|
20 |
+
public function setAccessTokenData($access_token_data) {
|
21 |
+
$this->access_token_data = json_decode($access_token_data, true);
|
22 |
+
}
|
23 |
+
|
24 |
+
public abstract function createAuthUrl();
|
25 |
+
|
26 |
+
public abstract function authenticate();
|
27 |
+
|
28 |
+
public abstract function get($path, $data = array(), $endpoint = false);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @return bool
|
32 |
+
*/
|
33 |
+
public abstract function hasAuthenticateData();
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @return string
|
37 |
+
*/
|
38 |
+
public abstract function getTestUrl();
|
39 |
}
|
includes/avatar.php
CHANGED
@@ -1,402 +1,416 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class NextendSocialLoginAvatar {
|
4 |
-
|
5 |
-
/**
|
6 |
-
* @return NextendSocialLoginAvatar
|
7 |
-
*/
|
8 |
-
public static function getInstance() {
|
9 |
-
static $inst = null;
|
10 |
-
if ($inst === null) {
|
11 |
-
$inst = new self();
|
12 |
-
}
|
13 |
-
|
14 |
-
return $inst;
|
15 |
-
}
|
16 |
-
|
17 |
-
|
18 |
-
public function __construct() {
|
19 |
-
if (NextendSocialLogin::$settings->get('avatar_store')) {
|
20 |
-
add_action('nsl_update_avatar', array(
|
21 |
-
$this,
|
22 |
-
'updateAvatar'
|
23 |
-
), 10, 3);
|
24 |
-
|
25 |
-
// WP User Avatar https://wordpress.org/plugins/wp-user-avatar/
|
26 |
-
// Ultimate member
|
27 |
-
if (!defined('WPUA_VERSION') && !class_exists('UM', false) && !class_exists('buddypress', false)) {
|
28 |
-
add_filter('get_avatar', array(
|
29 |
-
$this,
|
30 |
-
'renderAvatar'
|
31 |
-
), 5, 6);
|
32 |
-
|
33 |
-
add_filter('bp_core_fetch_avatar', array(
|
34 |
-
$this,
|
35 |
-
'renderAvatarBP'
|
36 |
-
), 3, 2);
|
37 |
-
|
38 |
-
add_filter('bp_core_fetch_avatar_url', array(
|
39 |
-
$this,
|
40 |
-
'renderAvatarBPUrl'
|
41 |
-
), 3, 2);
|
42 |
-
|
43 |
-
}
|
44 |
-
|
45 |
-
add_filter('post_mime_types', array(
|
46 |
-
$this,
|
47 |
-
'addPostMimeTypeAvatar'
|
48 |
-
));
|
49 |
-
|
50 |
-
add_filter('ajax_query_attachments_args', array(
|
51 |
-
$this,
|
52 |
-
'modifyQueryAttachmentsArgs'
|
53 |
-
));
|
54 |
-
}
|
55 |
-
}
|
56 |
-
|
57 |
-
public function addPostMimeTypeAvatar($types) {
|
58 |
-
$types['avatar'] = array(
|
59 |
-
__('Avatar', 'nextend-facebook-connect'),
|
60 |
-
__('Manage Avatar', 'nextend-facebook-connect'),
|
61 |
-
_n_noop('Avatar <span class="count">(%s)</span>', 'Avatar <span class="count">(%s)</span>', 'nextend-facebook-connect')
|
62 |
-
);
|
63 |
-
|
64 |
-
return $types;
|
65 |
-
}
|
66 |
-
|
67 |
-
public function modifyQueryAttachmentsArgs($query) {
|
68 |
-
if (!isset($query['meta_query']) || !is_array($query['meta_query'])) {
|
69 |
-
$query['meta_query'] = array();
|
70 |
-
}
|
71 |
-
if ($query['post_mime_type'] === 'avatar') {
|
72 |
-
$query['post_mime_type'] = 'image';
|
73 |
-
$query['meta_query']['relation'] = 'AND';
|
74 |
-
$query['meta_query'][] = array(
|
75 |
-
'key' => '_wp_attachment_wp_user_avatar',
|
76 |
-
'compare' => 'EXISTS'
|
77 |
-
);
|
78 |
-
} else {
|
79 |
-
$avatars_in_all_media = NextendSocialLogin::$settings->get('avatars_in_all_media');
|
80 |
-
|
81 |
-
//Avatars will be loaded in Media Libray Grid view - All media items if $avatars_in_all_media is disabled!
|
82 |
-
if (!$avatars_in_all_media) {
|
83 |
-
$query['meta_query']['relation'] = 'AND';
|
84 |
-
$query['meta_query'][] = array(
|
85 |
-
'key' => '_wp_attachment_wp_user_avatar',
|
86 |
-
'compare' => 'NOT EXISTS'
|
87 |
-
);
|
88 |
-
}
|
89 |
-
}
|
90 |
-
|
91 |
-
return $query;
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* @param NextendSocialProvider $provider
|
96 |
-
* @param $user_id
|
97 |
-
* @param $avatarUrl
|
98 |
-
*/
|
99 |
-
public function updateAvatar($provider, $user_id, $avatarUrl) {
|
100 |
-
global $blog_id, $wpdb;
|
101 |
-
if (!empty($avatarUrl)) {
|
102 |
-
|
103 |
-
if (class_exists('UM', false)) {
|
104 |
-
require_once(ABSPATH . '/wp-admin/includes/file.php');
|
105 |
-
$profile_photo = get_user_meta($user_id, 'profile_photo', true);
|
106 |
-
if (empty($profile_photo)) {
|
107 |
-
$extension = 'jpg';
|
108 |
-
if (preg_match('/\.(jpg|jpeg|gif|png)/', $avatarUrl, $match)) {
|
109 |
-
$extension = $match[1];
|
110 |
-
}
|
111 |
-
$avatarTempPath = download_url($avatarUrl);
|
112 |
-
if (!is_wp_error($avatarTempPath)) {
|
113 |
-
$
|
114 |
-
$
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
$
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
if (
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
$
|
214 |
-
if (
|
215 |
-
$
|
216 |
-
$
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
}
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
$
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
$
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
}
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
NextendSocialLoginAvatar::getInstance();
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class NextendSocialLoginAvatar {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* @return NextendSocialLoginAvatar
|
7 |
+
*/
|
8 |
+
public static function getInstance() {
|
9 |
+
static $inst = null;
|
10 |
+
if ($inst === null) {
|
11 |
+
$inst = new self();
|
12 |
+
}
|
13 |
+
|
14 |
+
return $inst;
|
15 |
+
}
|
16 |
+
|
17 |
+
|
18 |
+
public function __construct() {
|
19 |
+
if (NextendSocialLogin::$settings->get('avatar_store')) {
|
20 |
+
add_action('nsl_update_avatar', array(
|
21 |
+
$this,
|
22 |
+
'updateAvatar'
|
23 |
+
), 10, 3);
|
24 |
+
|
25 |
+
// WP User Avatar https://wordpress.org/plugins/wp-user-avatar/
|
26 |
+
// Ultimate member
|
27 |
+
if (!defined('WPUA_VERSION') && !class_exists('UM', false) && !class_exists('buddypress', false)) {
|
28 |
+
add_filter('get_avatar', array(
|
29 |
+
$this,
|
30 |
+
'renderAvatar'
|
31 |
+
), 5, 6);
|
32 |
+
|
33 |
+
add_filter('bp_core_fetch_avatar', array(
|
34 |
+
$this,
|
35 |
+
'renderAvatarBP'
|
36 |
+
), 3, 2);
|
37 |
+
|
38 |
+
add_filter('bp_core_fetch_avatar_url', array(
|
39 |
+
$this,
|
40 |
+
'renderAvatarBPUrl'
|
41 |
+
), 3, 2);
|
42 |
+
|
43 |
+
}
|
44 |
+
|
45 |
+
add_filter('post_mime_types', array(
|
46 |
+
$this,
|
47 |
+
'addPostMimeTypeAvatar'
|
48 |
+
));
|
49 |
+
|
50 |
+
add_filter('ajax_query_attachments_args', array(
|
51 |
+
$this,
|
52 |
+
'modifyQueryAttachmentsArgs'
|
53 |
+
));
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
public function addPostMimeTypeAvatar($types) {
|
58 |
+
$types['avatar'] = array(
|
59 |
+
__('Avatar', 'nextend-facebook-connect'),
|
60 |
+
__('Manage Avatar', 'nextend-facebook-connect'),
|
61 |
+
_n_noop('Avatar <span class="count">(%s)</span>', 'Avatar <span class="count">(%s)</span>', 'nextend-facebook-connect')
|
62 |
+
);
|
63 |
+
|
64 |
+
return $types;
|
65 |
+
}
|
66 |
+
|
67 |
+
public function modifyQueryAttachmentsArgs($query) {
|
68 |
+
if (!isset($query['meta_query']) || !is_array($query['meta_query'])) {
|
69 |
+
$query['meta_query'] = array();
|
70 |
+
}
|
71 |
+
if ($query['post_mime_type'] === 'avatar') {
|
72 |
+
$query['post_mime_type'] = 'image';
|
73 |
+
$query['meta_query']['relation'] = 'AND';
|
74 |
+
$query['meta_query'][] = array(
|
75 |
+
'key' => '_wp_attachment_wp_user_avatar',
|
76 |
+
'compare' => 'EXISTS'
|
77 |
+
);
|
78 |
+
} else {
|
79 |
+
$avatars_in_all_media = NextendSocialLogin::$settings->get('avatars_in_all_media');
|
80 |
+
|
81 |
+
//Avatars will be loaded in Media Libray Grid view - All media items if $avatars_in_all_media is disabled!
|
82 |
+
if (!$avatars_in_all_media) {
|
83 |
+
$query['meta_query']['relation'] = 'AND';
|
84 |
+
$query['meta_query'][] = array(
|
85 |
+
'key' => '_wp_attachment_wp_user_avatar',
|
86 |
+
'compare' => 'NOT EXISTS'
|
87 |
+
);
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
return $query;
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* @param NextendSocialProvider $provider
|
96 |
+
* @param $user_id
|
97 |
+
* @param $avatarUrl
|
98 |
+
*/
|
99 |
+
public function updateAvatar($provider, $user_id, $avatarUrl) {
|
100 |
+
global $blog_id, $wpdb;
|
101 |
+
if (!empty($avatarUrl)) {
|
102 |
+
|
103 |
+
if (class_exists('UM', false)) {
|
104 |
+
require_once(ABSPATH . '/wp-admin/includes/file.php');
|
105 |
+
$profile_photo = get_user_meta($user_id, 'profile_photo', true);
|
106 |
+
if (empty($profile_photo)) {
|
107 |
+
$extension = 'jpg';
|
108 |
+
if (preg_match('/\.(jpg|jpeg|gif|png)/', $avatarUrl, $match)) {
|
109 |
+
$extension = $match[1];
|
110 |
+
}
|
111 |
+
$avatarTempPath = download_url($avatarUrl);
|
112 |
+
if (!is_wp_error($avatarTempPath)) {
|
113 |
+
$umAvatarKey = 'profile_photo';
|
114 |
+
$umNameWithExtension = $umAvatarKey . '.' . $extension;
|
115 |
+
$umUserAvatarDir = UM()
|
116 |
+
->uploader()
|
117 |
+
->get_upload_user_base_dir($user_id, true);
|
118 |
+
if ($umUserAvatarDir) {
|
119 |
+
$umUserAvatarPath = $umUserAvatarDir . DIRECTORY_SEPARATOR . $umNameWithExtension;
|
120 |
+
$umAvatarInfo = @getimagesize($avatarTempPath);
|
121 |
+
|
122 |
+
/*this copy will be deleted after resizing*/
|
123 |
+
copy($avatarTempPath, $umUserAvatarPath);
|
124 |
+
UM()
|
125 |
+
->uploader()
|
126 |
+
->resize_image($umUserAvatarPath, $umUserAvatarPath, $umAvatarKey, $user_id, '0,0,' . $umAvatarInfo[0] . ',' . $umAvatarInfo[0]);
|
127 |
+
/*the final profile_photo*/
|
128 |
+
copy($avatarTempPath, $umUserAvatarPath);
|
129 |
+
|
130 |
+
update_user_meta($user_id, $umAvatarKey, $umNameWithExtension);
|
131 |
+
}
|
132 |
+
}
|
133 |
+
unlink($avatarTempPath);
|
134 |
+
|
135 |
+
UM()
|
136 |
+
->user()
|
137 |
+
->remove_cache($user_id);
|
138 |
+
};
|
139 |
+
|
140 |
+
return;
|
141 |
+
}
|
142 |
+
|
143 |
+
//upload user avatar for BuddyPress - bp_displayed_user_avatar() function
|
144 |
+
if (class_exists('BuddyPress', false)) {
|
145 |
+
if (!empty($avatarUrl)) {
|
146 |
+
$extension = 'jpg';
|
147 |
+
if (preg_match('/\.(jpg|jpeg|gif|png)/', $avatarUrl, $match)) {
|
148 |
+
$extension = $match[1];
|
149 |
+
}
|
150 |
+
|
151 |
+
require_once(ABSPATH . '/wp-admin/includes/file.php');
|
152 |
+
$avatarTempPath = download_url($avatarUrl);
|
153 |
+
|
154 |
+
if (!is_wp_error($avatarTempPath)) {
|
155 |
+
if (!function_exists('xprofile_avatar_upload_dir')) {
|
156 |
+
require_once(buddypress()->plugin_dir . '/bp-xprofile/bp-xprofile-functions.php');
|
157 |
+
}
|
158 |
+
$pathInfo = xprofile_avatar_upload_dir('avatars', $user_id);
|
159 |
+
|
160 |
+
if (wp_mkdir_p($pathInfo['path'])) {
|
161 |
+
if ($av_dir = opendir($pathInfo['path'] . '/')) {
|
162 |
+
$hasAvatar = false;
|
163 |
+
while (false !== ($avatar_file = readdir($av_dir))) {
|
164 |
+
if ((preg_match("/-bpfull/", $avatar_file) || preg_match("/-bpthumb/", $avatar_file))) {
|
165 |
+
$hasAvatar = true;
|
166 |
+
break;
|
167 |
+
}
|
168 |
+
}
|
169 |
+
if (!$hasAvatar) {
|
170 |
+
copy($avatarTempPath, $pathInfo['path'] . '/' . 'avatar-bpfull.' . $extension);
|
171 |
+
rename($avatarTempPath, $pathInfo['path'] . '/' . 'avatar-bpthumb.' . $extension);
|
172 |
+
}
|
173 |
+
}
|
174 |
+
closedir($av_dir);
|
175 |
+
}
|
176 |
+
}
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
|
181 |
+
/**
|
182 |
+
* $original_attachment_id is false, if the user has had avatar set but the path is not found.
|
183 |
+
*/
|
184 |
+
$original_attachment_id = get_user_meta($user_id, $wpdb->get_blog_prefix($blog_id) . 'user_avatar', true);
|
185 |
+
if ($original_attachment_id) {
|
186 |
+
$attached_file = get_attached_file($original_attachment_id);
|
187 |
+
if (($attached_file && !file_exists($attached_file)) || !$attached_file) {
|
188 |
+
$original_attachment_id = false;
|
189 |
+
}
|
190 |
+
}
|
191 |
+
$overwriteAttachment = false;
|
192 |
+
/**
|
193 |
+
* Overwrite the original attachment if avatar was set and the provider attachment exits.
|
194 |
+
*/
|
195 |
+
if ($original_attachment_id && get_post_meta($original_attachment_id, $provider->getId() . '_avatar', true)) {
|
196 |
+
$overwriteAttachment = true;
|
197 |
+
}
|
198 |
+
|
199 |
+
if (!$original_attachment_id) {
|
200 |
+
/**
|
201 |
+
* If the user unlink and link the social provider back the original avatar will be used.
|
202 |
+
*/
|
203 |
+
$args = array(
|
204 |
+
'post_type' => 'attachment',
|
205 |
+
'post_status' => 'inherit',
|
206 |
+
'meta_query' => array(
|
207 |
+
array(
|
208 |
+
'key' => $provider->getId() . '_avatar',
|
209 |
+
'value' => $provider->getAuthUserData('id')
|
210 |
+
)
|
211 |
+
)
|
212 |
+
);
|
213 |
+
$query = new WP_Query($args);
|
214 |
+
if ($query->post_count > 0) {
|
215 |
+
$original_attachment_id = $query->posts[0]->ID;
|
216 |
+
$overwriteAttachment = true;
|
217 |
+
update_user_meta($user_id, $wpdb->get_blog_prefix($blog_id) . 'user_avatar', $original_attachment_id);
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
/**
|
222 |
+
* If there was no original avatar or overwrite mode is on, download the avatar of the selected provider.*
|
223 |
+
*/
|
224 |
+
if (!$original_attachment_id || $overwriteAttachment === true) {
|
225 |
+
require_once(ABSPATH . '/wp-admin/includes/file.php');
|
226 |
+
|
227 |
+
$avatarTempPath = download_url($avatarUrl);
|
228 |
+
if (!is_wp_error($avatarTempPath)) {
|
229 |
+
$mime = wp_get_image_mime($avatarTempPath);
|
230 |
+
$mime_to_ext = apply_filters('getimagesize_mimes_to_exts', array(
|
231 |
+
'image/jpeg' => 'jpg',
|
232 |
+
'image/png' => 'png',
|
233 |
+
'image/gif' => 'gif',
|
234 |
+
'image/bmp' => 'bmp',
|
235 |
+
'image/tiff' => 'tif',
|
236 |
+
));
|
237 |
+
|
238 |
+
/**
|
239 |
+
* If the uploaded image has extension from the mime type and it is appear in the $mime_to_ext.
|
240 |
+
* Make a unique filename, depending on the extension.
|
241 |
+
* Copy the downloaded file with the new name to the uploads path.
|
242 |
+
* Unlin the downloaded file.
|
243 |
+
*/
|
244 |
+
if (isset($mime_to_ext[$mime])) {
|
245 |
+
|
246 |
+
$wp_upload_dir = wp_upload_dir();
|
247 |
+
$filename = 'user-' . $user_id . '.' . $mime_to_ext[$mime];
|
248 |
+
|
249 |
+
$filename = wp_unique_filename($wp_upload_dir['path'], $filename);
|
250 |
+
|
251 |
+
$newAvatarPath = trailingslashit($wp_upload_dir['path']) . $filename;
|
252 |
+
$newFile = @copy($avatarTempPath, $newAvatarPath);
|
253 |
+
@unlink($avatarTempPath);
|
254 |
+
|
255 |
+
if (false !== $newFile) {
|
256 |
+
$url = $wp_upload_dir['url'] . '/' . basename($filename);
|
257 |
+
|
258 |
+
if ($overwriteAttachment) {
|
259 |
+
$originalAvatarImage = get_attached_file($original_attachment_id);
|
260 |
+
|
261 |
+
// we got the same image, so we do not want to store it
|
262 |
+
if (md5_file($originalAvatarImage) === md5_file($newAvatarPath)) {
|
263 |
+
@unlink($newAvatarPath);
|
264 |
+
} else {
|
265 |
+
// Store the new avatar and remove the old one
|
266 |
+
@unlink($originalAvatarImage);
|
267 |
+
update_attached_file($original_attachment_id, $newAvatarPath);
|
268 |
+
|
269 |
+
// Make sure that this file is included, as wp_generate_attachment_metadata() depends on it.
|
270 |
+
require_once(ABSPATH . 'wp-admin/includes/image.php');
|
271 |
+
|
272 |
+
wp_update_attachment_metadata($original_attachment_id, wp_generate_attachment_metadata($original_attachment_id, $newAvatarPath));
|
273 |
+
|
274 |
+
update_user_meta($user_id, $wpdb->get_blog_prefix($blog_id) . 'user_avatar', $original_attachment_id);
|
275 |
+
}
|
276 |
+
} else {
|
277 |
+
$attachment = array(
|
278 |
+
'guid' => $url,
|
279 |
+
'post_mime_type' => $mime,
|
280 |
+
'post_title' => '',
|
281 |
+
'post_content' => '',
|
282 |
+
'post_status' => 'private',
|
283 |
+
);
|
284 |
+
|
285 |
+
$new_attachment_id = wp_insert_attachment($attachment, $newAvatarPath);
|
286 |
+
if (!is_wp_error($new_attachment_id)) {
|
287 |
+
|
288 |
+
// Make sure that this file is included, as wp_generate_attachment_metadata() depends on it.
|
289 |
+
require_once(ABSPATH . 'wp-admin/includes/image.php');
|
290 |
+
|
291 |
+
wp_update_attachment_metadata($new_attachment_id, wp_generate_attachment_metadata($new_attachment_id, $newAvatarPath));
|
292 |
+
|
293 |
+
update_post_meta($new_attachment_id, $provider->getId() . '_avatar', $provider->getAuthUserData('id'));
|
294 |
+
update_post_meta($new_attachment_id, '_wp_attachment_wp_user_avatar', $user_id);
|
295 |
+
|
296 |
+
update_user_meta($user_id, $wpdb->get_blog_prefix($blog_id) . 'user_avatar', $new_attachment_id);
|
297 |
+
}
|
298 |
+
}
|
299 |
+
}
|
300 |
+
}
|
301 |
+
}
|
302 |
+
}
|
303 |
+
}
|
304 |
+
}
|
305 |
+
|
306 |
+
public function renderAvatar($avatar = '', $id_or_email, $size = 96, $default = '', $alt = false, $args = array()) {
|
307 |
+
global $blog_id, $wpdb;
|
308 |
+
|
309 |
+
$id = 0;
|
310 |
+
/**
|
311 |
+
* Get the user id depending on the $id_or_email, it can be the user id, email and object.
|
312 |
+
*/
|
313 |
+
if (is_numeric($id_or_email)) {
|
314 |
+
$id = $id_or_email;
|
315 |
+
} else if (is_string($id_or_email)) {
|
316 |
+
$user = get_user_by('email', $id_or_email);
|
317 |
+
if ($user) {
|
318 |
+
$id = $user->ID;
|
319 |
+
}
|
320 |
+
} else if (is_object($id_or_email)) {
|
321 |
+
if (!empty($id_or_email->comment_author_email)) {
|
322 |
+
$user = get_user_by('email', $id_or_email->comment_author_email);
|
323 |
+
if ($user) {
|
324 |
+
$id = $user->ID;
|
325 |
+
}
|
326 |
+
} else if (!empty($id_or_email->user_id)) {
|
327 |
+
$id = $id_or_email->user_id;
|
328 |
+
}
|
329 |
+
}
|
330 |
+
if ($id == 0) {
|
331 |
+
return $avatar;
|
332 |
+
}
|
333 |
+
|
334 |
+
$url = '';
|
335 |
+
|
336 |
+
/**
|
337 |
+
* Get the avatar attachment id of the user.
|
338 |
+
*/
|
339 |
+
$attachment_id = get_user_meta($id, $wpdb->get_blog_prefix($blog_id) . 'user_avatar', true);
|
340 |
+
if (wp_attachment_is_image($attachment_id)) {
|
341 |
+
$get_size = is_numeric($size) ? array(
|
342 |
+
$size,
|
343 |
+
$size
|
344 |
+
) : $size;
|
345 |
+
$image_src_array = wp_get_attachment_image_src($attachment_id, $get_size);
|
346 |
+
|
347 |
+
$url = $image_src_array[0];
|
348 |
+
|
349 |
+
if (is_numeric($size)) {
|
350 |
+
$args['width'] = $image_src_array[1];
|
351 |
+
$args['height'] = $image_src_array[2];
|
352 |
+
}
|
353 |
+
}
|
354 |
+
|
355 |
+
if (empty($url)) {
|
356 |
+
$url = NextendSocialLogin::getAvatar($id);
|
357 |
+
}
|
358 |
+
|
359 |
+
if (!$url) {
|
360 |
+
return $avatar;
|
361 |
+
}
|
362 |
+
|
363 |
+
if (defined('IS_PROFILE_PAGE') && IS_PROFILE_PAGE) {
|
364 |
+
add_filter('user_profile_picture_description', array(
|
365 |
+
$this,
|
366 |
+
'removeProfilePictureGravatarDescription'
|
367 |
+
));
|
368 |
+
}
|
369 |
+
|
370 |
+
$class = array(
|
371 |
+
'avatar',
|
372 |
+
'avatar-' . (int)$args['size'],
|
373 |
+
'photo'
|
374 |
+
);
|
375 |
+
|
376 |
+
if ($args['class']) {
|
377 |
+
if (is_array($args['class'])) {
|
378 |
+
$class = array_merge($class, $args['class']);
|
379 |
+
} else {
|
380 |
+
$class[] = $args['class'];
|
381 |
+
}
|
382 |
+
}
|
383 |
+
|
384 |
+
return sprintf("<img alt='%s' src='%s' class='%s' height='%d' width='%d' %s/>", esc_attr($args['alt']), esc_url($url), esc_attr(join(' ', $class)), (int)$args['height'], (int)$args['width'], $args['extra_attr']);
|
385 |
+
}
|
386 |
+
|
387 |
+
public function renderAvatarBP($avatar, $params) {
|
388 |
+
|
389 |
+
if (strpos($avatar, 'gravatar.com', 0) > -1) {
|
390 |
+
|
391 |
+
$avatar = $this->renderAvatar($avatar, ($params['object'] == 'user') ? $params['item_id'] : '', ($params['object'] == 'user') ? (($params['type'] == 'thumb') ? 50 : 150) : 50, '', '');
|
392 |
+
}
|
393 |
+
|
394 |
+
return $avatar;
|
395 |
+
}
|
396 |
+
|
397 |
+
public function renderAvatarBPUrl($avatar, $params) {
|
398 |
+
|
399 |
+
if (strpos($avatar, 'gravatar.com', 0) > -1) {
|
400 |
+
|
401 |
+
$avatar = $this->renderAvatar($avatar, ($params['object'] == 'user') ? $params['item_id'] : '', ($params['object'] == 'user') ? (($params['type'] == 'thumb') ? 50 : 150) : 50, '', '');
|
402 |
+
}
|
403 |
+
|
404 |
+
return $avatar;
|
405 |
+
}
|
406 |
+
|
407 |
+
public function removeProfilePictureGravatarDescription($description) {
|
408 |
+
if (strpos($description, 'Gravatar') !== false) {
|
409 |
+
return '';
|
410 |
+
}
|
411 |
+
|
412 |
+
return $description;
|
413 |
+
}
|
414 |
+
}
|
415 |
+
|
416 |
NextendSocialLoginAvatar::getInstance();
|
includes/compat-wp-login.php
CHANGED
@@ -1,277 +1,314 @@
|
|
1 |
-
<?php
|
2 |
-
if (!defined('ABSPATH')) {
|
3 |
-
exit;
|
4 |
-
}
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Output the login page header.
|
8 |
-
*
|
9 |
-
* @param string $title Optional. WordPress login Page title to display in the `<title>` element.
|
10 |
-
* Default 'Log In'.
|
11 |
-
* @param string $message Optional. Message to display in header. Default empty.
|
12 |
-
* @param WP_Error $wp_error Optional. The error to pass. Default empty.
|
13 |
-
*/
|
14 |
-
function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
|
15 |
-
global $error, $interim_login, $action;
|
16 |
-
|
17 |
-
// Don't index any of these forms
|
18 |
-
add_action(
|
19 |
-
|
20 |
-
add_action(
|
21 |
-
|
22 |
-
if (
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
$
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
<
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
<?php
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
nocache_headers();
|
1 |
+
<?php
|
2 |
+
if (!defined('ABSPATH')) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Output the login page header.
|
8 |
+
*
|
9 |
+
* @param string $title Optional. WordPress login Page title to display in the `<title>` element.
|
10 |
+
* Default 'Log In'.
|
11 |
+
* @param string $message Optional. Message to display in header. Default empty.
|
12 |
+
* @param WP_Error $wp_error Optional. The error to pass. Default empty.
|
13 |
+
*/
|
14 |
+
function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
|
15 |
+
global $error, $interim_login, $action;
|
16 |
+
|
17 |
+
// Don't index any of these forms
|
18 |
+
add_action('login_head', 'wp_no_robots');
|
19 |
+
|
20 |
+
add_action('login_head', 'wp_login_viewport_meta');
|
21 |
+
|
22 |
+
if (empty($wp_error)) $wp_error = new WP_Error();
|
23 |
+
|
24 |
+
// Shake it!
|
25 |
+
$shake_error_codes = array(
|
26 |
+
'empty_password',
|
27 |
+
'empty_email',
|
28 |
+
'invalid_email',
|
29 |
+
'invalidcombo',
|
30 |
+
'empty_username',
|
31 |
+
'invalid_username',
|
32 |
+
'incorrect_password'
|
33 |
+
);
|
34 |
+
/**
|
35 |
+
* Filters the error codes array for shaking the login form.
|
36 |
+
*
|
37 |
+
* @param array $shake_error_codes Error codes that shake the login form.
|
38 |
+
*
|
39 |
+
* @since 3.0.0
|
40 |
+
*
|
41 |
+
*/
|
42 |
+
$shake_error_codes = apply_filters('shake_error_codes', $shake_error_codes);
|
43 |
+
|
44 |
+
if ($shake_error_codes && $wp_error->get_error_code() && in_array($wp_error->get_error_code(), $shake_error_codes)) add_action('login_head', 'wp_shake_js', 12);
|
45 |
+
|
46 |
+
$login_title = get_bloginfo('name', 'display');
|
47 |
+
|
48 |
+
/* translators: Login screen title. 1: Login screen name, 2: Network or site name */
|
49 |
+
$login_title = sprintf(__('%1$s ‹ %2$s — WordPress'), $title, $login_title);
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Filters the title tag content for login page.
|
53 |
+
*
|
54 |
+
* @param string $login_title The page title, with extra context added.
|
55 |
+
* @param string $title The original page title.
|
56 |
+
*
|
57 |
+
* @since 4.9.0
|
58 |
+
*
|
59 |
+
*/
|
60 |
+
$login_title = apply_filters('login_title', $login_title, $title);
|
61 |
+
|
62 |
+
?><!DOCTYPE html>
|
63 |
+
<!--[if IE 8]>
|
64 |
+
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8" <?php language_attributes(); ?>>
|
65 |
+
<![endif]-->
|
66 |
+
<!--[if !(IE 8) ]><!-->
|
67 |
+
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
|
68 |
+
<!--<![endif]-->
|
69 |
+
<head>
|
70 |
+
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>"/>
|
71 |
+
<title><?php echo $login_title; ?></title>
|
72 |
+
<?php
|
73 |
+
|
74 |
+
wp_enqueue_style('login');
|
75 |
+
|
76 |
+
/*
|
77 |
+
* Remove all stored post data on logging out.
|
78 |
+
* This could be added by add_action('login_head'...) like wp_shake_js(),
|
79 |
+
* but maybe better if it's not removable by plugins
|
80 |
+
*/
|
81 |
+
if ('loggedout' == $wp_error->get_error_code()) {
|
82 |
+
?>
|
83 |
+
<script>if ("sessionStorage" in window) {
|
84 |
+
try {
|
85 |
+
for (var key in sessionStorage) {
|
86 |
+
if (key.indexOf("wp-autosave-") != -1) {
|
87 |
+
sessionStorage.removeItem(key)
|
88 |
+
}
|
89 |
+
}
|
90 |
+
} catch (e) {
|
91 |
+
}
|
92 |
+
}
|
93 |
+
</script>
|
94 |
+
<?php
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Enqueue scripts and styles for the login page.
|
99 |
+
*
|
100 |
+
* @since 3.1.0
|
101 |
+
*/
|
102 |
+
do_action('login_enqueue_scripts');
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Fires in the login page header after scripts are enqueued.
|
106 |
+
*
|
107 |
+
* @since 2.1.0
|
108 |
+
*/
|
109 |
+
do_action('login_head');
|
110 |
+
|
111 |
+
if (is_multisite()) {
|
112 |
+
$login_header_url = network_home_url();
|
113 |
+
$login_header_title = get_network()->site_name;
|
114 |
+
} else {
|
115 |
+
$login_header_url = __('https://wordpress.org/');
|
116 |
+
$login_header_title = __('Powered by WordPress');
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Filters link URL of the header logo above login form.
|
121 |
+
*
|
122 |
+
* @param string $login_header_url Login header logo URL.
|
123 |
+
*
|
124 |
+
* @since 2.1.0
|
125 |
+
*
|
126 |
+
*/
|
127 |
+
$login_header_url = apply_filters('login_headerurl', $login_header_url);
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Filters the title attribute of the header logo above login form.
|
131 |
+
*
|
132 |
+
* @param string $login_header_title Login header logo title attribute.
|
133 |
+
*
|
134 |
+
* @since 2.1.0
|
135 |
+
*
|
136 |
+
*/
|
137 |
+
$login_header_title = apply_filters('login_headertitle', $login_header_title);
|
138 |
+
|
139 |
+
/*
|
140 |
+
* To match the URL/title set above, Multisite sites have the blog name,
|
141 |
+
* while single sites get the header title.
|
142 |
+
*/
|
143 |
+
if (is_multisite()) {
|
144 |
+
$login_header_text = get_bloginfo('name', 'display');
|
145 |
+
} else {
|
146 |
+
$login_header_text = $login_header_title;
|
147 |
+
}
|
148 |
+
|
149 |
+
$classes = array(
|
150 |
+
'login-action-' . $action,
|
151 |
+
'wp-core-ui'
|
152 |
+
);
|
153 |
+
if (is_rtl()) $classes[] = 'rtl';
|
154 |
+
if ($interim_login) {
|
155 |
+
$classes[] = 'interim-login';
|
156 |
+
?>
|
157 |
+
<style type="text/css">html {
|
158 |
+
background-color: transparent;
|
159 |
+
}</style>
|
160 |
+
<?php
|
161 |
+
|
162 |
+
if ('success' === $interim_login) $classes[] = 'interim-login-success';
|
163 |
+
}
|
164 |
+
$classes[] = ' locale-' . sanitize_html_class(strtolower(str_replace('_', '-', get_locale())));
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Filters the login page body classes.
|
168 |
+
*
|
169 |
+
* @param array $classes An array of body classes.
|
170 |
+
* @param string $action The action that brought the visitor to the login page.
|
171 |
+
*
|
172 |
+
* @since 3.5.0
|
173 |
+
*
|
174 |
+
*/
|
175 |
+
$classes = apply_filters('login_body_class', $classes, $action);
|
176 |
+
|
177 |
+
?>
|
178 |
+
</head>
|
179 |
+
<body class="login <?php echo esc_attr(implode(' ', $classes)); ?>">
|
180 |
+
<?php
|
181 |
+
/**
|
182 |
+
* Fires in the login page header after the body tag is opened.
|
183 |
+
*
|
184 |
+
* @since 4.6.0
|
185 |
+
*/
|
186 |
+
do_action('login_header');
|
187 |
+
?>
|
188 |
+
<div id="login">
|
189 |
+
<h1>
|
190 |
+
<a href="<?php echo esc_url($login_header_url); ?>" title="<?php echo esc_attr($login_header_title); ?>" tabindex="-1"><?php echo $login_header_text; ?></a>
|
191 |
+
</h1>
|
192 |
+
<?php
|
193 |
+
|
194 |
+
unset($login_header_url, $login_header_title);
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Filters the message to display above the login form.
|
198 |
+
*
|
199 |
+
* @param string $message Login message text.
|
200 |
+
*
|
201 |
+
* @since 2.1.0
|
202 |
+
*
|
203 |
+
*/
|
204 |
+
$message = apply_filters('login_message', $message);
|
205 |
+
if (!empty($message)) echo $message . "\n";
|
206 |
+
|
207 |
+
// In case a plugin uses $error rather than the $wp_errors object
|
208 |
+
if (!empty($error)) {
|
209 |
+
$wp_error->add('error', $error);
|
210 |
+
unset($error);
|
211 |
+
}
|
212 |
+
|
213 |
+
if ($wp_error->get_error_code()) {
|
214 |
+
$errors = '';
|
215 |
+
$messages = '';
|
216 |
+
foreach ($wp_error->get_error_codes() as $code) {
|
217 |
+
$severity = $wp_error->get_error_data($code);
|
218 |
+
foreach ($wp_error->get_error_messages($code) as $error_message) {
|
219 |
+
if ('message' == $severity) $messages .= ' ' . $error_message . "<br />\n"; else
|
220 |
+
$errors .= ' ' . $error_message . "<br />\n";
|
221 |
+
}
|
222 |
+
}
|
223 |
+
if (!empty($errors)) {
|
224 |
+
/**
|
225 |
+
* Filters the error messages displayed above the login form.
|
226 |
+
*
|
227 |
+
* @param string $errors Login error message.
|
228 |
+
*
|
229 |
+
* @since 2.1.0
|
230 |
+
*
|
231 |
+
*/
|
232 |
+
echo '<div id="login_error">' . apply_filters('login_errors', $errors) . "</div>\n";
|
233 |
+
}
|
234 |
+
if (!empty($messages)) {
|
235 |
+
/**
|
236 |
+
* Filters instructional messages displayed above the login form.
|
237 |
+
*
|
238 |
+
* @param string $messages Login messages.
|
239 |
+
*
|
240 |
+
* @since 2.5.0
|
241 |
+
*
|
242 |
+
*/
|
243 |
+
echo '<p class="message">' . apply_filters('login_messages', $messages) . "</p>\n";
|
244 |
+
}
|
245 |
+
}
|
246 |
+
} // End of login_header()
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Outputs the footer for the login page.
|
250 |
+
*
|
251 |
+
* @param string $input_id Which input to auto-focus
|
252 |
+
*/
|
253 |
+
function login_footer($input_id = '') {
|
254 |
+
global $interim_login;
|
255 |
+
|
256 |
+
// Don't allow interim logins to navigate away from the page.
|
257 |
+
if (!$interim_login): ?>
|
258 |
+
<p id="backtoblog"><a href="<?php echo esc_url(home_url('/')); ?>"><?php
|
259 |
+
/* translators: %s: site title */
|
260 |
+
printf(_x('← Back to %s', 'site'), get_bloginfo('title', 'display'));
|
261 |
+
?></a></p>
|
262 |
+
<?php
|
263 |
+
if (function_exists('the_privacy_policy_link')) {
|
264 |
+
the_privacy_policy_link('<div class="privacy-policy-page-link">', '</div>');
|
265 |
+
}
|
266 |
+
?>
|
267 |
+
<?php endif; ?>
|
268 |
+
|
269 |
+
</div>
|
270 |
+
|
271 |
+
<?php if (!empty($input_id)) : ?>
|
272 |
+
<script type="text/javascript">
|
273 |
+
try {
|
274 |
+
document.getElementById('<?php echo $input_id; ?>').focus();
|
275 |
+
} catch (e) {
|
276 |
+
}
|
277 |
+
if (typeof wpOnload == 'function') wpOnload();
|
278 |
+
</script>
|
279 |
+
<?php endif; ?>
|
280 |
+
|
281 |
+
<?php
|
282 |
+
/**
|
283 |
+
* Fires in the login page footer.
|
284 |
+
*
|
285 |
+
* @since 3.1.0
|
286 |
+
*/
|
287 |
+
do_action('login_footer'); ?>
|
288 |
+
<div class="clear"></div>
|
289 |
+
</body>
|
290 |
+
</html>
|
291 |
+
<?php
|
292 |
+
}
|
293 |
+
|
294 |
+
/**
|
295 |
+
* @since 3.7.0
|
296 |
+
*/
|
297 |
+
function wp_login_viewport_meta() {
|
298 |
+
?>
|
299 |
+
<meta name="viewport" content="width=device-width"/>
|
300 |
+
<?php
|
301 |
+
}
|
302 |
+
|
303 |
+
if (!in_array($action, array(
|
304 |
+
'postpass',
|
305 |
+
'logout',
|
306 |
+
'lostpassword',
|
307 |
+
'retrievepassword',
|
308 |
+
'resetpass',
|
309 |
+
'rp',
|
310 |
+
'register',
|
311 |
+
'login'
|
312 |
+
), true) && false === has_filter('login_form_' . $action)) $action = 'login';
|
313 |
+
|
314 |
nocache_headers();
|
includes/exceptions.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class NSLContinuePageRenderException extends Exception {
|
4 |
-
|
5 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class NSLContinuePageRenderException extends Exception {
|
4 |
+
|
5 |
}
|
includes/oauth2.php
CHANGED
@@ -1,309 +1,311 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
protected $
|
13 |
-
|
14 |
-
protected $
|
15 |
-
|
16 |
-
protected $
|
17 |
-
|
18 |
-
protected $
|
19 |
-
|
20 |
-
protected $
|
21 |
-
|
22 |
-
protected $
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
*
|
69 |
-
*
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
'
|
77 |
-
'
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
*
|
92 |
-
*
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
*
|
102 |
-
*
|
103 |
-
*
|
104 |
-
*
|
105 |
-
*
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
'
|
118 |
-
|
119 |
-
|
120 |
-
'
|
121 |
-
'
|
122 |
-
'
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
$
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
* @
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
*
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
*
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
*
|
209 |
-
*
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
$
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
* @param $
|
257 |
-
*
|
258 |
-
* @
|
259 |
-
*
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
'
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
*
|
294 |
-
*
|
295 |
-
*
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
|
|
|
|
309 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use NSL\Persistent\Persistent;
|
4 |
+
|
5 |
+
require_once NSL_PATH . '/includes/auth.php';
|
6 |
+
|
7 |
+
|
8 |
+
abstract class NextendSocialOauth2 extends NextendSocialAuth {
|
9 |
+
|
10 |
+
const CSRF_LENGTH = 32;
|
11 |
+
|
12 |
+
protected $state = false;
|
13 |
+
|
14 |
+
protected $client_id;
|
15 |
+
protected $client_secret;
|
16 |
+
protected $redirect_uri;
|
17 |
+
|
18 |
+
protected $endpointAuthorization;
|
19 |
+
protected $endpointAccessToken;
|
20 |
+
protected $endpointRestAPI;
|
21 |
+
|
22 |
+
protected $defaultRestParams = array();
|
23 |
+
|
24 |
+
protected $scopes = array();
|
25 |
+
|
26 |
+
public function checkError() {
|
27 |
+
if (isset($_GET['error']) && isset($_GET['error_description'])) {
|
28 |
+
if ($this->validateState()) {
|
29 |
+
throw new Exception($_GET['error'] . ': ' . htmlspecialchars_decode($_GET['error_description']));
|
30 |
+
}
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
public function getTestUrl() {
|
35 |
+
return $this->endpointAccessToken;
|
36 |
+
}
|
37 |
+
|
38 |
+
public function hasAuthenticateData() {
|
39 |
+
return isset($_REQUEST['code']);
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* @param string $client_id
|
44 |
+
*/
|
45 |
+
public function setClientId($client_id) {
|
46 |
+
$this->client_id = $client_id;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* @param string $client_secret
|
51 |
+
*/
|
52 |
+
public function setClientSecret($client_secret) {
|
53 |
+
$this->client_secret = $client_secret;
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* @param string $redirect_uri
|
58 |
+
*/
|
59 |
+
public function setRedirectUri($redirect_uri) {
|
60 |
+
$this->redirect_uri = $redirect_uri;
|
61 |
+
}
|
62 |
+
|
63 |
+
public function getEndpointAuthorization() {
|
64 |
+
return $this->endpointAuthorization;
|
65 |
+
}
|
66 |
+
|
67 |
+
/*
|
68 |
+
* Adds response_type, client_id, redirect_uri and state as query parameter in the Authorization Url.
|
69 |
+
* client_id can be found in the App when you create one
|
70 |
+
* redirect_uri is the url you wish to be redirected after you entered you login credentials
|
71 |
+
* state is a randomly generated string
|
72 |
+
*/
|
73 |
+
public function createAuthUrl() {
|
74 |
+
|
75 |
+
$args = array(
|
76 |
+
'response_type' => 'code',
|
77 |
+
'client_id' => urlencode($this->client_id),
|
78 |
+
'redirect_uri' => urlencode($this->redirect_uri),
|
79 |
+
'state' => urlencode($this->getState())
|
80 |
+
);
|
81 |
+
|
82 |
+
$scopes = apply_filters('nsl_' . $this->providerID . '_scopes', $this->scopes);
|
83 |
+
if (count($scopes)) {
|
84 |
+
$args['scope'] = urlencode($this->formatScopes($scopes));
|
85 |
+
}
|
86 |
+
|
87 |
+
return add_query_arg($args, $this->getEndpointAuthorization());
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* @param $scopes
|
92 |
+
* Connects an array of scopes with whitespace.
|
93 |
+
*
|
94 |
+
* @return string
|
95 |
+
*/
|
96 |
+
protected function formatScopes($scopes) {
|
97 |
+
return implode(' ', array_unique($scopes));
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* @return bool|false|string
|
102 |
+
* If the code that was sent by the selected provider and the state is valid,
|
103 |
+
* we can make a request for an accessToken with wp_remote_post().
|
104 |
+
* The result contains HTTP headers and content.
|
105 |
+
*
|
106 |
+
* Returns the accessToken with which we can make certain requests for their user profile data.
|
107 |
+
* @throws Exception
|
108 |
+
*/
|
109 |
+
public function authenticate() {
|
110 |
+
|
111 |
+
if (isset($_GET['code'])) {
|
112 |
+
if (!$this->validateState()) {
|
113 |
+
throw new Exception('Unable to validate CSRF state');
|
114 |
+
}
|
115 |
+
|
116 |
+
$http_args = array(
|
117 |
+
'timeout' => 15,
|
118 |
+
'user-agent' => 'WordPress',
|
119 |
+
'body' => array(
|
120 |
+
'grant_type' => 'authorization_code',
|
121 |
+
'code' => $_GET['code'],
|
122 |
+
'redirect_uri' => $this->redirect_uri,
|
123 |
+
'client_id' => $this->client_id,
|
124 |
+
'client_secret' => $this->client_secret
|
125 |
+
)
|
126 |
+
);
|
127 |
+
|
128 |
+
$request = wp_remote_post($this->endpointAccessToken, $this->extendAllHttpArgs($http_args));
|
129 |
+
|
130 |
+
if (is_wp_error($request)) {
|
131 |
+
|
132 |
+
throw new Exception($request->get_error_message());
|
133 |
+
} else if (wp_remote_retrieve_response_code($request) !== 200) {
|
134 |
+
|
135 |
+
$this->errorFromResponse(json_decode(wp_remote_retrieve_body($request), true));
|
136 |
+
}
|
137 |
+
|
138 |
+
$accessTokenData = json_decode(wp_remote_retrieve_body($request), true);
|
139 |
+
|
140 |
+
if (!is_array($accessTokenData)) {
|
141 |
+
throw new Exception(sprintf(__('Unexpected response: %s', 'nextend-facebook-connect'), wp_remote_retrieve_body($request)));
|
142 |
+
}
|
143 |
+
|
144 |
+
$accessTokenData['created'] = time();
|
145 |
+
|
146 |
+
$this->access_token_data = $accessTokenData;
|
147 |
+
|
148 |
+
return wp_json_encode($accessTokenData);
|
149 |
+
}
|
150 |
+
|
151 |
+
return false;
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* @param $response
|
156 |
+
*
|
157 |
+
* @throws Exception
|
158 |
+
*/
|
159 |
+
protected function errorFromResponse($response) {
|
160 |
+
if (isset($response['error'])) {
|
161 |
+
throw new Exception($response['error'] . ': ' . $response['error_description']);
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
public function deleteLoginPersistentData() {
|
166 |
+
Persistent::delete($this->providerID . '_state');
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* If the stored state is the same as the state we have received from the remote Provider, it is valid.
|
171 |
+
*
|
172 |
+
* @return bool
|
173 |
+
*/
|
174 |
+
protected function validateState() {
|
175 |
+
$this->state = Persistent::get($this->providerID . '_state');
|
176 |
+
if ($this->state === false) {
|
177 |
+
return false;
|
178 |
+
}
|
179 |
+
|
180 |
+
if (empty($_GET['state'])) {
|
181 |
+
return false;
|
182 |
+
}
|
183 |
+
|
184 |
+
if ($_GET['state'] == $this->state) {
|
185 |
+
return true;
|
186 |
+
}
|
187 |
+
|
188 |
+
return false;
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Returns the stored state for the current provider.
|
193 |
+
*
|
194 |
+
* @return bool|mixed|null|string
|
195 |
+
*/
|
196 |
+
protected function getState() {
|
197 |
+
$this->state = Persistent::get($this->providerID . '_state');
|
198 |
+
if ($this->state === null) {
|
199 |
+
$this->state = $this->generateRandomState();
|
200 |
+
|
201 |
+
Persistent::set($this->providerID . '_state', $this->state);
|
202 |
+
}
|
203 |
+
|
204 |
+
return $this->state;
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Generates a random string, which will be needed for the remote provider.
|
209 |
+
* It will be stored for a time.
|
210 |
+
*
|
211 |
+
* @return bool|string
|
212 |
+
*/
|
213 |
+
protected function generateRandomState() {
|
214 |
+
|
215 |
+
if (function_exists('random_bytes')) {
|
216 |
+
return $this->bytesToString(random_bytes(self::CSRF_LENGTH));
|
217 |
+
}
|
218 |
+
|
219 |
+
if (function_exists('mcrypt_create_iv')) {
|
220 |
+
/** @noinspection PhpDeprecationInspection */
|
221 |
+
$binaryString = mcrypt_create_iv(self::CSRF_LENGTH, MCRYPT_DEV_URANDOM);
|
222 |
+
|
223 |
+
if ($binaryString !== false) {
|
224 |
+
return $this->bytesToString($binaryString);
|
225 |
+
}
|
226 |
+
}
|
227 |
+
|
228 |
+
if (function_exists('openssl_random_pseudo_bytes')) {
|
229 |
+
$wasCryptographicallyStrong = false;
|
230 |
+
|
231 |
+
$binaryString = openssl_random_pseudo_bytes(self::CSRF_LENGTH, $wasCryptographicallyStrong);
|
232 |
+
|
233 |
+
if ($binaryString !== false && $wasCryptographicallyStrong === true) {
|
234 |
+
return $this->bytesToString($binaryString);
|
235 |
+
}
|
236 |
+
}
|
237 |
+
|
238 |
+
return $this->randomStr(self::CSRF_LENGTH);
|
239 |
+
}
|
240 |
+
|
241 |
+
private function bytesToString($binaryString) {
|
242 |
+
return substr(bin2hex($binaryString), 0, self::CSRF_LENGTH);
|
243 |
+
}
|
244 |
+
|
245 |
+
private function randomStr($length, $keyspace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') {
|
246 |
+
$str = '';
|
247 |
+
$max = strlen($keyspace) - 1;
|
248 |
+
for ($i = 0; $i < $length; ++$i) {
|
249 |
+
$str .= $keyspace[random_int(0, $max)];
|
250 |
+
}
|
251 |
+
|
252 |
+
return $str;
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* @param $path
|
257 |
+
* @param array $data
|
258 |
+
* @param $endpoint
|
259 |
+
*
|
260 |
+
* @return array
|
261 |
+
* @throws Exception
|
262 |
+
*/
|
263 |
+
public function get($path, $data = array(), $endpoint = false) {
|
264 |
+
|
265 |
+
$http_args = array(
|
266 |
+
'timeout' => 15,
|
267 |
+
'user-agent' => 'WordPress',
|
268 |
+
'body' => array_merge($this->defaultRestParams, $data)
|
269 |
+
);
|
270 |
+
if (!$endpoint) {
|
271 |
+
$endpoint = $this->endpointRestAPI;
|
272 |
+
}
|
273 |
+
$request = wp_remote_get($endpoint . $path, $this->extendHttpArgs($this->extendAllHttpArgs($http_args)));
|
274 |
+
|
275 |
+
if (is_wp_error($request)) {
|
276 |
+
|
277 |
+
throw new Exception($request->get_error_message());
|
278 |
+
} else if (wp_remote_retrieve_response_code($request) !== 200) {
|
279 |
+
|
280 |
+
$this->errorFromResponse(json_decode(wp_remote_retrieve_body($request), true));
|
281 |
+
}
|
282 |
+
|
283 |
+
$result = json_decode(wp_remote_retrieve_body($request), true);
|
284 |
+
|
285 |
+
if (!is_array($result)) {
|
286 |
+
throw new Exception(sprintf(__('Unexpected response: %s', 'nextend-facebook-connect'), wp_remote_retrieve_body($request)));
|
287 |
+
}
|
288 |
+
|
289 |
+
return $result;
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* @param $http_args
|
294 |
+
* Puts additional data into the http header.
|
295 |
+
* Used for getting access to the resources with a bearer token.
|
296 |
+
*
|
297 |
+
* @return mixed
|
298 |
+
*/
|
299 |
+
protected function extendHttpArgs($http_args) {
|
300 |
+
$http_args['headers'] = array(
|
301 |
+
'Authorization' => 'Bearer ' . $this->access_token_data['access_token']
|
302 |
+
);
|
303 |
+
|
304 |
+
return $http_args;
|
305 |
+
}
|
306 |
+
|
307 |
+
protected function extendAllHttpArgs($http_args) {
|
308 |
+
|
309 |
+
return $http_args;
|
310 |
+
}
|
311 |
}
|
includes/provider-admin.php
CHANGED
@@ -1,307 +1,309 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
*
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
$this->
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
*
|
42 |
-
*
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
*
|
54 |
-
*
|
55 |
-
*
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
$newData['terms'] = '';
|
86 |
-
}
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
case '
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
*
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
$view
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
include(self::$globalPath . '/templates-provider/
|
176 |
-
} else if ($view == '
|
177 |
-
include(self::$globalPath . '/templates-provider/
|
178 |
-
} else {
|
179 |
-
include(
|
180 |
-
}
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
$
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
<p
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
jQuery('
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
|
|
|
|
307 |
NextendSocialProviderAdmin::$globalPath = NSL_PATH . '/admin';
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use NSL\Notices;
|
4 |
+
|
5 |
+
class NextendSocialProviderAdmin {
|
6 |
+
|
7 |
+
/** @var string path to global /admin folder */
|
8 |
+
public static $globalPath;
|
9 |
+
|
10 |
+
/** @var NextendSocialProvider */
|
11 |
+
protected $provider;
|
12 |
+
|
13 |
+
/** @var string path to current providers /admin folder */
|
14 |
+
protected $path;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* NextendSocialProviderAdmin constructor.
|
18 |
+
*
|
19 |
+
* @param NextendSocialProvider $provider
|
20 |
+
*/
|
21 |
+
public function __construct($provider) {
|
22 |
+
$this->provider = $provider;
|
23 |
+
|
24 |
+
$this->path = $this->provider->getPath() . '/admin';
|
25 |
+
|
26 |
+
|
27 |
+
add_filter('nsl_update_settings_validate_' . $this->provider->getOptionKey(), array(
|
28 |
+
$this,
|
29 |
+
'validateSettings'
|
30 |
+
), 10, 2);
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* @return NextendSocialProvider
|
35 |
+
*/
|
36 |
+
public function getProvider() {
|
37 |
+
return $this->provider;
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @param string $subview
|
42 |
+
* Returns the admin URL for a subview.
|
43 |
+
*
|
44 |
+
* @return string
|
45 |
+
*/
|
46 |
+
public function getUrl($subview = '') {
|
47 |
+
return add_query_arg(array(
|
48 |
+
'subview' => $subview
|
49 |
+
), NextendSocialLoginAdmin::getAdminUrl('provider-' . $this->provider->getId()));
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* @param $newData
|
54 |
+
* @param $postedData
|
55 |
+
* Returns the validated settings for the buttons.
|
56 |
+
*
|
57 |
+
* @return mixed
|
58 |
+
*/
|
59 |
+
public function validateSettings($newData, $postedData) {
|
60 |
+
|
61 |
+
$newData = $this->provider->validateSettings($newData, $postedData);
|
62 |
+
|
63 |
+
if (isset($postedData['custom_default_button'])) {
|
64 |
+
if (isset($postedData['custom_default_button_enabled']) && $postedData['custom_default_button_enabled'] == '1') {
|
65 |
+
$newData['custom_default_button'] = $postedData['custom_default_button'];
|
66 |
+
} else {
|
67 |
+
if ($postedData['custom_default_button'] != '') {
|
68 |
+
$newData['custom_default_button'] = '';
|
69 |
+
}
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
if (isset($postedData['custom_icon_button'])) {
|
74 |
+
if (isset($postedData['custom_icon_button_enabled']) && $postedData['custom_icon_button_enabled'] == '1') {
|
75 |
+
$newData['custom_icon_button'] = $postedData['custom_icon_button'];
|
76 |
+
} else {
|
77 |
+
if ($postedData['custom_icon_button'] != '') {
|
78 |
+
$newData['custom_icon_button'] = '';
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
if (isset($postedData['terms'])) {
|
84 |
+
if (isset($postedData['terms_override']) && $postedData['terms_override'] == '1') {
|
85 |
+
$newData['terms'] = $postedData['terms'];
|
86 |
+
} else {
|
87 |
+
$newData['terms'] = '';
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
foreach ($postedData AS $key => $value) {
|
92 |
+
|
93 |
+
switch ($key) {
|
94 |
+
case 'login_label':
|
95 |
+
case 'link_label':
|
96 |
+
case 'unlink_label':
|
97 |
+
$newData[$key] = wp_kses_post($value);
|
98 |
+
break;
|
99 |
+
case 'user_prefix':
|
100 |
+
case 'user_fallback':
|
101 |
+
$newData[$key] = preg_replace("/[^A-Za-z0-9\-_ ]/", '', $value);
|
102 |
+
break;
|
103 |
+
case 'settings_saved':
|
104 |
+
$newData[$key] = intval($value) ? 1 : 0;
|
105 |
+
break;
|
106 |
+
case 'oauth_redirect_url':
|
107 |
+
$newData[$key] = $value;
|
108 |
+
break;
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
return $newData;
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Displays a subview if it is set in the URL.
|
117 |
+
*/
|
118 |
+
public function settingsForm() {
|
119 |
+
$subview = !empty($_REQUEST['subview']) ? $_REQUEST['subview'] : '';
|
120 |
+
$this->displaySubView($subview);
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* @param $subview
|
125 |
+
* Display the requested subview
|
126 |
+
*/
|
127 |
+
protected function displaySubView($subview) {
|
128 |
+
if (!$this->provider->adminDisplaySubView($subview)) {
|
129 |
+
switch ($subview) {
|
130 |
+
case 'settings':
|
131 |
+
$this->render('settings');
|
132 |
+
break;
|
133 |
+
case 'buttons':
|
134 |
+
$this->render('buttons');
|
135 |
+
break;
|
136 |
+
case 'sync-data':
|
137 |
+
if ($this->provider->hasSyncFields()) {
|
138 |
+
$this->render('sync-data');
|
139 |
+
} else {
|
140 |
+
wp_redirect($this->provider->getAdmin()
|
141 |
+
->getUrl());
|
142 |
+
exit;
|
143 |
+
}
|
144 |
+
break;
|
145 |
+
case 'usage':
|
146 |
+
$this->render('usage');
|
147 |
+
break;
|
148 |
+
default:
|
149 |
+
$this->render('getting-started');
|
150 |
+
break;
|
151 |
+
}
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* @param $view
|
157 |
+
* @param bool $showMenu
|
158 |
+
* Enframe the specified part-view with the complete view(header, menu, footer).
|
159 |
+
*/
|
160 |
+
public function render($view, $showMenu = true) {
|
161 |
+
include(self::$globalPath . '/templates/header.php');
|
162 |
+
$_view = $view;
|
163 |
+
$view = 'providers';
|
164 |
+
include(self::$globalPath . '/templates/menu.php');
|
165 |
+
$view = $_view;
|
166 |
+
echo '<div class="nsl-admin-content">';
|
167 |
+
echo '<h1>' . $this->provider->getLabel() . '</h1>';
|
168 |
+
if ($showMenu) {
|
169 |
+
include(self::$globalPath . '/templates-provider/menu.php');
|
170 |
+
}
|
171 |
+
|
172 |
+
Notices::displayNotices();
|
173 |
+
|
174 |
+
if ($view == 'buttons') {
|
175 |
+
include(self::$globalPath . '/templates-provider/buttons.php');
|
176 |
+
} else if ($view == 'usage') {
|
177 |
+
include(self::$globalPath . '/templates-provider/usage.php');
|
178 |
+
} else if ($view == 'sync-data') {
|
179 |
+
include(self::$globalPath . '/templates-provider/sync-data.php');
|
180 |
+
} else {
|
181 |
+
include($this->path . '/' . $view . '.php');
|
182 |
+
}
|
183 |
+
echo '</div>';
|
184 |
+
include(self::$globalPath . '/templates/footer.php');
|
185 |
+
}
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Display the Verify part of the settings subview.
|
189 |
+
*/
|
190 |
+
public function renderSettingsHeader() {
|
191 |
+
|
192 |
+
$provider = $this->provider;
|
193 |
+
|
194 |
+
$state = $provider->getState();
|
195 |
+
?>
|
196 |
+
<?php if ($state == 'not-tested') : ?>
|
197 |
+
<div class="nsl-box nsl-box-blue">
|
198 |
+
<h2 class="title"><?php _e('Your configuration needs to be verified', 'nextend-facebook-connect'); ?></h2>
|
199 |
+
<p><?php _e('Before you can start letting your users register with your app it needs to be tested. This test makes sure that no users will have troubles with the login and registration process. <br> If you see error message in the popup check the copied ID and secret or the app itself. Otherwise your settings are fine.', 'nextend-facebook-connect'); ?></p>
|
200 |
+
|
201 |
+
<p id="nsl-test-configuration">
|
202 |
+
<a id="nsl-test-button" href="#"
|
203 |
+
onclick="NSLPopup('<?php echo add_query_arg('test', '1', $provider->getLoginUrl()); ?>', 'test-window', <?php echo $provider->getPopupWidth(); ?>, <?php echo $provider->getPopupHeight(); ?>); return false;"
|
204 |
+
class="button button-primary"><?php _e('Verify Settings', 'nextend-facebook-connect'); ?></a>
|
205 |
+
<span id="nsl-test-please-save"><?php _e('Please save your changes to verify settings.', 'nextend-facebook-connect'); ?></span>
|
206 |
+
</p>
|
207 |
+
</div>
|
208 |
+
<?php endif; ?>
|
209 |
+
|
210 |
+
|
211 |
+
<?php if ($provider->settings->get('tested') == '1') : ?>
|
212 |
+
<div class="nsl-box <?php if ($state == 'enabled'): ?>nsl-box-green<?php else: ?> nsl-box-yellow nsl-box-exclamation-mark<?php endif; ?>">
|
213 |
+
<h2 class="title"><?php _e('Works Fine', 'nextend-facebook-connect'); ?> -
|
214 |
+
<?php
|
215 |
+
switch ($state) {
|
216 |
+
case 'disabled':
|
217 |
+
_e('Disabled', 'nextend-facebook-connect');
|
218 |
+
break;
|
219 |
+
case 'enabled':
|
220 |
+
_e('Enabled', 'nextend-facebook-connect');
|
221 |
+
break;
|
222 |
+
}
|
223 |
+
?></h2>
|
224 |
+
<p><?php
|
225 |
+
switch ($state) {
|
226 |
+
case 'disabled':
|
227 |
+
printf(__('This provider is currently disabled, which means that users can’t register or login via their %s account.', 'nextend-facebook-connect'), $provider->getLabel());
|
228 |
+
break;
|
229 |
+
case 'enabled':
|
230 |
+
printf(__('This provider works fine, but you can test it again. If you don’t want to let users register or login with %s anymore you can disable it.', 'nextend-facebook-connect'), $provider->getLabel());
|
231 |
+
echo '</p>';
|
232 |
+
echo '<p>';
|
233 |
+
printf(__('This provider is currently enabled, which means that users can register or login via their %s account.', 'nextend-facebook-connect'), $provider->getLabel());
|
234 |
+
break;
|
235 |
+
}
|
236 |
+
?></p>
|
237 |
+
|
238 |
+
<p id="nsl-test-configuration">
|
239 |
+
<a id="nsl-test-button" href="#"
|
240 |
+
onclick="NSLPopup('<?php echo add_query_arg('test', '1', $provider->getLoginUrl()); ?>', 'test-window', <?php echo $provider->getPopupWidth(); ?>, <?php echo $provider->getPopupHeight(); ?>); return false"
|
241 |
+
class="button button-secondary"><?php _e('Verify Settings Again', 'nextend-facebook-connect'); ?></a>
|
242 |
+
<span id="nsl-test-please-save"><?php _e('Please save your changes before verifying settings.', 'nextend-facebook-connect'); ?></span>
|
243 |
+
<?php
|
244 |
+
switch ($state) {
|
245 |
+
case 'disabled':
|
246 |
+
?>
|
247 |
+
<a href="<?php echo wp_nonce_url(add_query_arg('provider', $provider->getId(), NextendSocialLoginAdmin::getAdminUrl('sub-enable')), 'nextend-social-login_enable_' . $provider->getId()); ?>"
|
248 |
+
class="button button-primary">
|
249 |
+
<?php _e('Enable', 'nextend-facebook-connect'); ?>
|
250 |
+
</a>
|
251 |
+
<?php
|
252 |
+
break;
|
253 |
+
case 'enabled':
|
254 |
+
?>
|
255 |
+
<a href="<?php echo wp_nonce_url(add_query_arg('provider', $provider->getId(), NextendSocialLoginAdmin::getAdminUrl('sub-disable')), 'nextend-social-login_disable_' . $provider->getId()); ?>"
|
256 |
+
class="button button-secondary">
|
257 |
+
<?php _e('Disable', 'nextend-facebook-connect'); ?>
|
258 |
+
</a>
|
259 |
+
<?php
|
260 |
+
break;
|
261 |
+
}
|
262 |
+
?>
|
263 |
+
</p>
|
264 |
+
</div>
|
265 |
+
<?php endif; ?>
|
266 |
+
|
267 |
+
|
268 |
+
<script type="text/javascript">
|
269 |
+
|
270 |
+
jQuery(document).on('ready', function () {
|
271 |
+
var $test = jQuery('#nsl-test-configuration');
|
272 |
+
if ($test.length) {
|
273 |
+
jQuery(<?php echo wp_json_encode('#' . implode(',#', array_keys($provider->getRequiredFields()))); ?>)
|
274 |
+
.on('keyup.test', function () {
|
275 |
+
jQuery('#nsl-test-button').remove();
|
276 |
+
jQuery('#nsl-test-please-save').css('display', 'inline');
|
277 |
+
jQuery('input').off('keyup.test');
|
278 |
+
});
|
279 |
+
}
|
280 |
+
});
|
281 |
+
</script>
|
282 |
+
<?php
|
283 |
+
}
|
284 |
+
|
285 |
+
/**
|
286 |
+
* Displays the free setting options.
|
287 |
+
*/
|
288 |
+
public function renderOtherSettings() {
|
289 |
+
include(self::$globalPath . '/templates-provider/settings-other.php');
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Displays the pro setting options.
|
294 |
+
*/
|
295 |
+
public function renderProSettings() {
|
296 |
+
include(self::$globalPath . '/templates-provider/settings-pro.php');
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Displays message if Oauth Redirect URI has changed.
|
301 |
+
*/
|
302 |
+
public function renderOauthChangedInstruction() {
|
303 |
+
echo '<h2>' . $this->provider->getLabel() . '</h2>';
|
304 |
+
|
305 |
+
include($this->path . '/fix-redirect-uri.php');
|
306 |
+
}
|
307 |
+
}
|
308 |
+
|
309 |
NextendSocialProviderAdmin::$globalPath = NSL_PATH . '/admin';
|
includes/provider-dummy.php
CHANGED
@@ -1,112 +1,112 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
abstract class NextendSocialProviderDummy {
|
4 |
-
|
5 |
-
protected $id;
|
6 |
-
protected $label;
|
7 |
-
protected $path;
|
8 |
-
|
9 |
-
protected $color = '#fff';
|
10 |
-
|
11 |
-
protected $popupWidth = 600;
|
12 |
-
|
13 |
-
protected $popupHeight = 600;
|
14 |
-
|
15 |
-
/** @var NextendSocialLoginSettings */
|
16 |
-
public $settings;
|
17 |
-
|
18 |
-
/** @var NextendSocialProviderAdmin */
|
19 |
-
protected $admin = null;
|
20 |
-
|
21 |
-
public function needPro() {
|
22 |
-
return true;
|
23 |
-
}
|
24 |
-
|
25 |
-
/**
|
26 |
-
* @return string
|
27 |
-
*/
|
28 |
-
public function getId() {
|
29 |
-
return $this->id;
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* @return string
|
34 |
-
*/
|
35 |
-
public function getLabel() {
|
36 |
-
return $this->label;
|
37 |
-
}
|
38 |
-
|
39 |
-
public function enable() {
|
40 |
-
return false;
|
41 |
-
}
|
42 |
-
|
43 |
-
public function isEnabled() {
|
44 |
-
return false;
|
45 |
-
}
|
46 |
-
|
47 |
-
public function isTested() {
|
48 |
-
return false;
|
49 |
-
}
|
50 |
-
|
51 |
-
public function isTest() {
|
52 |
-
return false;
|
53 |
-
}
|
54 |
-
|
55 |
-
public function connect() {
|
56 |
-
|
57 |
-
}
|
58 |
-
|
59 |
-
public function getState() {
|
60 |
-
return 'pro-only';
|
61 |
-
}
|
62 |
-
|
63 |
-
public function getIcon() {
|
64 |
-
return plugins_url('/providers/' . $this->id . '/' . $this->id . '.png', NSL_PATH_FILE);
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* @return string
|
69 |
-
*/
|
70 |
-
public function getColor() {
|
71 |
-
return $this->color;
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* @return int
|
76 |
-
*/
|
77 |
-
public function getPopupWidth() {
|
78 |
-
return $this->popupWidth;
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* @return int
|
83 |
-
*/
|
84 |
-
public function getPopupHeight() {
|
85 |
-
return $this->popupHeight;
|
86 |
-
}
|
87 |
-
|
88 |
-
/**
|
89 |
-
* @return mixed
|
90 |
-
*/
|
91 |
-
public function getPath() {
|
92 |
-
return $this->path;
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* @return NextendSocialProviderAdmin
|
97 |
-
*/
|
98 |
-
public function getAdmin() {
|
99 |
-
return $this->admin;
|
100 |
-
}
|
101 |
-
|
102 |
-
/**
|
103 |
-
* @param string $subview
|
104 |
-
*
|
105 |
-
* @return bool
|
106 |
-
*/
|
107 |
-
public function adminDisplaySubView($subview) {
|
108 |
-
|
109 |
-
return false;
|
110 |
-
}
|
111 |
-
|
112 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
abstract class NextendSocialProviderDummy {
|
4 |
+
|
5 |
+
protected $id;
|
6 |
+
protected $label;
|
7 |
+
protected $path;
|
8 |
+
|
9 |
+
protected $color = '#fff';
|
10 |
+
|
11 |
+
protected $popupWidth = 600;
|
12 |
+
|
13 |
+
protected $popupHeight = 600;
|
14 |
+
|
15 |
+
/** @var NextendSocialLoginSettings */
|
16 |
+
public $settings;
|
17 |
+
|
18 |
+
/** @var NextendSocialProviderAdmin */
|
19 |
+
protected $admin = null;
|
20 |
+
|
21 |
+
public function needPro() {
|
22 |
+
return true;
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @return string
|
27 |
+
*/
|
28 |
+
public function getId() {
|
29 |
+
return $this->id;
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* @return string
|
34 |
+
*/
|
35 |
+
public function getLabel() {
|
36 |
+
return $this->label;
|
37 |
+
}
|
38 |
+
|
39 |
+
public function enable() {
|
40 |
+
return false;
|
41 |
+
}
|
42 |
+
|
43 |
+
public function isEnabled() {
|
44 |
+
return false;
|
45 |
+
}
|
46 |
+
|
47 |
+
public function isTested() {
|
48 |
+
return false;
|
49 |
+
}
|
50 |
+
|
51 |
+
public function isTest() {
|
52 |
+
return false;
|
53 |
+
}
|
54 |
+
|
55 |
+
public function connect() {
|
56 |
+
|
57 |
+
}
|
58 |
+
|
59 |
+
public function getState() {
|
60 |
+
return 'pro-only';
|
61 |
+
}
|
62 |
+
|
63 |
+
public function getIcon() {
|
64 |
+
return plugins_url('/providers/' . $this->id . '/' . $this->id . '.png', NSL_PATH_FILE);
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* @return string
|
69 |
+
*/
|
70 |
+
public function getColor() {
|
71 |
+
return $this->color;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* @return int
|
76 |
+
*/
|
77 |
+
public function getPopupWidth() {
|
78 |
+
return $this->popupWidth;
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* @return int
|
83 |
+
*/
|
84 |
+
public function getPopupHeight() {
|
85 |
+
return $this->popupHeight;
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* @return mixed
|
90 |
+
*/
|
91 |
+
public function getPath() {
|
92 |
+
return $this->path;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* @return NextendSocialProviderAdmin
|
97 |
+
*/
|
98 |
+
public function getAdmin() {
|
99 |
+
return $this->admin;
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* @param string $subview
|
104 |
+
*
|
105 |
+
* @return bool
|
106 |
+
*/
|
107 |
+
public function adminDisplaySubView($subview) {
|
108 |
+
|
109 |
+
return false;
|
110 |
+
}
|
111 |
+
|
112 |
}
|
includes/provider.php
CHANGED
@@ -1,1079 +1,1120 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
protected $
|
13 |
-
|
14 |
-
|
15 |
-
protected $
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
'
|
47 |
-
'
|
48 |
-
'
|
49 |
-
|
50 |
-
)
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
'
|
64 |
-
'
|
65 |
-
'
|
66 |
-
'
|
67 |
-
'
|
68 |
-
'
|
69 |
-
'
|
70 |
-
'
|
71 |
-
|
72 |
-
'
|
73 |
-
'
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
}
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
} catch (
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
$
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
}
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
)
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
}
|
494 |
-
|
495 |
-
/**
|
496 |
-
*
|
497 |
-
*
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
$
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
if ($
|
587 |
-
$
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
exit;
|
669 |
-
}
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
$fixedRedirect =
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
if (empty($
|
762 |
-
$
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
}
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
return
|
815 |
-
}
|
816 |
-
|
817 |
-
/**
|
818 |
-
*
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
<
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
protected function
|
944 |
-
|
945 |
-
}
|
946 |
-
|
947 |
-
protected function
|
948 |
-
return $
|
949 |
-
}
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1079 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use NSL\Notices;
|
4 |
+
use NSL\Persistent\Persistent;
|
5 |
+
|
6 |
+
require_once dirname(__FILE__) . '/provider-admin.php';
|
7 |
+
require_once dirname(__FILE__) . '/provider-dummy.php';
|
8 |
+
require_once dirname(__FILE__) . '/user.php';
|
9 |
+
|
10 |
+
abstract class NextendSocialProvider extends NextendSocialProviderDummy {
|
11 |
+
|
12 |
+
protected $dbID;
|
13 |
+
protected $optionKey;
|
14 |
+
|
15 |
+
protected $enabled = false;
|
16 |
+
|
17 |
+
/** @var NextendSocialAuth */
|
18 |
+
protected $client;
|
19 |
+
|
20 |
+
protected $authUserData = array();
|
21 |
+
|
22 |
+
protected $requiredFields = array();
|
23 |
+
|
24 |
+
protected $svg = '';
|
25 |
+
|
26 |
+
protected $sync_fields = array();
|
27 |
+
|
28 |
+
/**
|
29 |
+
* NextendSocialProvider constructor.
|
30 |
+
*
|
31 |
+
* @param $defaultSettings
|
32 |
+
*/
|
33 |
+
public function __construct($defaultSettings) {
|
34 |
+
|
35 |
+
if (empty($this->dbID)) {
|
36 |
+
$this->dbID = $this->id;
|
37 |
+
}
|
38 |
+
|
39 |
+
$this->optionKey = 'nsl_' . $this->id;
|
40 |
+
|
41 |
+
do_action('nsl_provider_init', $this);
|
42 |
+
|
43 |
+
$this->sync_fields = apply_filters('nsl_' . $this->getId() . '_sync_fields', $this->sync_fields);
|
44 |
+
|
45 |
+
$extraSettings = apply_filters('nsl_' . $this->getId() . '_extra_settings', array(
|
46 |
+
'ask_email' => 'when-empty',
|
47 |
+
'ask_user' => 'never',
|
48 |
+
'ask_password' => 'never',
|
49 |
+
'auto_link' => 'email',
|
50 |
+
'disabled_roles' => array(),
|
51 |
+
'register_roles' => array(
|
52 |
+
'default'
|
53 |
+
)
|
54 |
+
));
|
55 |
+
|
56 |
+
foreach ($this->getSyncFields() AS $field_name => $fieldData) {
|
57 |
+
|
58 |
+
$extraSettings['sync_fields/fields/' . $field_name . '/enabled'] = 0;
|
59 |
+
$extraSettings['sync_fields/fields/' . $field_name . '/meta_key'] = $this->id . '_' . $field_name;
|
60 |
+
}
|
61 |
+
|
62 |
+
$this->settings = new NextendSocialLoginSettings($this->optionKey, array_merge(array(
|
63 |
+
'settings_saved' => '0',
|
64 |
+
'tested' => '0',
|
65 |
+
'custom_default_button' => '',
|
66 |
+
'custom_icon_button' => '',
|
67 |
+
'login_label' => '',
|
68 |
+
'link_label' => '',
|
69 |
+
'unlink_label' => '',
|
70 |
+
'user_prefix' => '',
|
71 |
+
'user_fallback' => '',
|
72 |
+
'oauth_redirect_url' => '',
|
73 |
+
'terms' => '',
|
74 |
+
|
75 |
+
'sync_fields/link' => 0,
|
76 |
+
'sync_fields/login' => 0
|
77 |
+
), $extraSettings, $defaultSettings));
|
78 |
+
|
79 |
+
$this->admin = new NextendSocialProviderAdmin($this);
|
80 |
+
|
81 |
+
}
|
82 |
+
|
83 |
+
public function getOptionKey() {
|
84 |
+
return $this->optionKey;
|
85 |
+
}
|
86 |
+
|
87 |
+
public function getRawDefaultButton() {
|
88 |
+
|
89 |
+
return '<div class="nsl-button nsl-button-default nsl-button-' . $this->id . '" style="background-color:' . $this->color . ';"><div class="nsl-button-svg-container">' . $this->svg . '</div><div class="nsl-button-label-container">{{label}}</div></div>';
|
90 |
+
}
|
91 |
+
|
92 |
+
public function getRawIconButton() {
|
93 |
+
return '<div class="nsl-button nsl-button-icon nsl-button-' . $this->id . '" style="background-color:' . $this->color . ';"><div class="nsl-button-svg-container">' . $this->svg . '</div></div>';
|
94 |
+
}
|
95 |
+
|
96 |
+
public function getDefaultButton($label) {
|
97 |
+
$button = $this->settings->get('custom_default_button');
|
98 |
+
if (!empty($button)) {
|
99 |
+
return str_replace('{{label}}', __($label, 'nextend-facebook-connect'), $button);
|
100 |
+
}
|
101 |
+
|
102 |
+
return str_replace('{{label}}', __($label, 'nextend-facebook-connect'), $this->getRawDefaultButton());
|
103 |
+
}
|
104 |
+
|
105 |
+
public function getIconButton() {
|
106 |
+
$button = $this->settings->get('custom_icon_button');
|
107 |
+
if (!empty($button)) {
|
108 |
+
return $button;
|
109 |
+
}
|
110 |
+
|
111 |
+
return $this->getRawIconButton();
|
112 |
+
}
|
113 |
+
|
114 |
+
public function getLoginUrl() {
|
115 |
+
$args = array('loginSocial' => $this->getId());
|
116 |
+
|
117 |
+
if (isset($_REQUEST['interim-login'])) {
|
118 |
+
$args['interim-login'] = 1;
|
119 |
+
}
|
120 |
+
|
121 |
+
return add_query_arg($args, NextendSocialLogin::getLoginUrl());
|
122 |
+
}
|
123 |
+
|
124 |
+
public function getRedirectUri() {
|
125 |
+
$args = array('loginSocial' => $this->getId());
|
126 |
+
|
127 |
+
return add_query_arg($args, NextendSocialLogin::getLoginUrl());
|
128 |
+
}
|
129 |
+
|
130 |
+
public function getRedirectUriForApp() {
|
131 |
+
return $this->getRedirectUri();
|
132 |
+
}
|
133 |
+
|
134 |
+
public function needPro() {
|
135 |
+
return false;
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Enable the selected provider.
|
140 |
+
*
|
141 |
+
* @return bool
|
142 |
+
*/
|
143 |
+
public function enable() {
|
144 |
+
$this->enabled = true;
|
145 |
+
|
146 |
+
do_action('nsl_' . $this->getId() . '_enabled');
|
147 |
+
|
148 |
+
return true;
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Check if provider is enabled.
|
153 |
+
*
|
154 |
+
* @return bool
|
155 |
+
*/
|
156 |
+
public function isEnabled() {
|
157 |
+
return $this->enabled;
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Check if provider is verified.
|
162 |
+
*
|
163 |
+
* @return bool
|
164 |
+
*/
|
165 |
+
public function isTested() {
|
166 |
+
return !!$this->settings->get('tested');
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Check if login url was changed by another plugin. If it was changed returns true, else false.
|
171 |
+
*
|
172 |
+
* @return bool
|
173 |
+
*/
|
174 |
+
public function checkOauthRedirectUrl() {
|
175 |
+
$oauth_redirect_url = $this->settings->get('oauth_redirect_url');
|
176 |
+
if (empty($oauth_redirect_url) || $oauth_redirect_url == $this->getRedirectUri()) {
|
177 |
+
return true;
|
178 |
+
}
|
179 |
+
|
180 |
+
return false;
|
181 |
+
}
|
182 |
+
|
183 |
+
public function updateOauthRedirectUrl() {
|
184 |
+
$this->settings->update(array(
|
185 |
+
'oauth_redirect_url' => $this->getRedirectUri()
|
186 |
+
));
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* @return array
|
191 |
+
*/
|
192 |
+
public function getRequiredFields() {
|
193 |
+
return $this->requiredFields;
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Get the current state of a Provider.
|
198 |
+
*
|
199 |
+
* @return string
|
200 |
+
*/
|
201 |
+
public function getState() {
|
202 |
+
foreach ($this->requiredFields AS $name => $label) {
|
203 |
+
$value = $this->settings->get($name);
|
204 |
+
if (empty($value)) {
|
205 |
+
return 'not-configured';
|
206 |
+
}
|
207 |
+
}
|
208 |
+
if (!$this->isTested()) {
|
209 |
+
return 'not-tested';
|
210 |
+
}
|
211 |
+
|
212 |
+
if (!$this->isEnabled()) {
|
213 |
+
return 'disabled';
|
214 |
+
}
|
215 |
+
|
216 |
+
return 'enabled';
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* Authenticate and connect with the provider.
|
221 |
+
*/
|
222 |
+
public function connect() {
|
223 |
+
try {
|
224 |
+
$this->doAuthenticate();
|
225 |
+
} catch (NSLContinuePageRenderException $e) {
|
226 |
+
// This is not an error. We allow the page to continue the normal display flow and later we inject our things.
|
227 |
+
// Used by Theme my login function where we override the shortcode and we display our email request.
|
228 |
+
} catch (Exception $e) {
|
229 |
+
$this->onError($e);
|
230 |
+
}
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* @return NextendSocialAuth
|
235 |
+
*/
|
236 |
+
protected abstract function getClient();
|
237 |
+
|
238 |
+
public function getTestUrl() {
|
239 |
+
return $this->getClient()
|
240 |
+
->getTestUrl();
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* @throws NSLContinuePageRenderException
|
245 |
+
*/
|
246 |
+
protected function doAuthenticate() {
|
247 |
+
|
248 |
+
if (!headers_sent()) {
|
249 |
+
//All In One WP Security sets a LOCATION header, so we need to remove it to do a successful test.
|
250 |
+
if (function_exists('header_remove')) {
|
251 |
+
header_remove("LOCATION");
|
252 |
+
} else {
|
253 |
+
header('LOCATION:', true); //Under PHP 5.3
|
254 |
+
}
|
255 |
+
}
|
256 |
+
|
257 |
+
//If it is a real login action, add the actions for the connection.
|
258 |
+
if (!$this->isTest()) {
|
259 |
+
add_action($this->id . '_login_action_before', array(
|
260 |
+
$this,
|
261 |
+
'liveConnectBefore'
|
262 |
+
));
|
263 |
+
add_action($this->id . '_login_action_redirect', array(
|
264 |
+
$this,
|
265 |
+
'liveConnectRedirect'
|
266 |
+
));
|
267 |
+
add_action($this->id . '_login_action_get_user_profile', array(
|
268 |
+
$this,
|
269 |
+
'liveConnectGetUserProfile'
|
270 |
+
));
|
271 |
+
|
272 |
+
$interim_login = isset($_REQUEST['interim-login']);
|
273 |
+
if ($interim_login) {
|
274 |
+
Persistent::set($this->id . '_interim_login', 1);
|
275 |
+
}
|
276 |
+
/**
|
277 |
+
* Store the settings for the provider login.
|
278 |
+
*/
|
279 |
+
$display = isset($_REQUEST['display']);
|
280 |
+
if ($display && $_REQUEST['display'] == 'popup') {
|
281 |
+
Persistent::set($this->id . '_display', 'popup');
|
282 |
+
}
|
283 |
+
|
284 |
+
} else { //This is just to verify the settings.
|
285 |
+
add_action($this->id . '_login_action_get_user_profile', array(
|
286 |
+
$this,
|
287 |
+
'testConnectGetUserProfile'
|
288 |
+
));
|
289 |
+
}
|
290 |
+
|
291 |
+
// Redirect if the registration is blocked by another Plugin like Cerber.
|
292 |
+
if (function_exists('cerber_is_allowed')) {
|
293 |
+
$allowed = cerber_is_allowed();
|
294 |
+
if (!$allowed) {
|
295 |
+
global $wp_cerber;
|
296 |
+
$error = $wp_cerber->getErrorMsg();
|
297 |
+
Notices::addError($error);
|
298 |
+
$this->redirectToLoginForm();
|
299 |
+
}
|
300 |
+
}
|
301 |
+
|
302 |
+
do_action($this->id . '_login_action_before', $this);
|
303 |
+
|
304 |
+
$client = $this->getClient();
|
305 |
+
|
306 |
+
$accessTokenData = $this->getAnonymousAccessToken();
|
307 |
+
|
308 |
+
$client->checkError();
|
309 |
+
|
310 |
+
do_action($this->id . '_login_action_redirect', $this);
|
311 |
+
|
312 |
+
/**
|
313 |
+
* Check if we have an accessToken and a code.
|
314 |
+
* If there is no access token and code it redirects to the Authorization Url.
|
315 |
+
*/
|
316 |
+
if (!$accessTokenData && !$client->hasAuthenticateData()) {
|
317 |
+
|
318 |
+
header('LOCATION: ' . $client->createAuthUrl());
|
319 |
+
exit;
|
320 |
+
|
321 |
+
} else {
|
322 |
+
/**
|
323 |
+
* If the code is OK but there is no access token, authentication is necessary.
|
324 |
+
*/
|
325 |
+
if (!$accessTokenData) {
|
326 |
+
|
327 |
+
$accessTokenData = $client->authenticate();
|
328 |
+
|
329 |
+
$accessTokenData = $this->requestLongLivedToken($accessTokenData);
|
330 |
+
|
331 |
+
/**
|
332 |
+
* store the access token
|
333 |
+
*/
|
334 |
+
$this->setAnonymousAccessToken($accessTokenData);
|
335 |
+
} else {
|
336 |
+
$client->setAccessTokenData($accessTokenData);
|
337 |
+
}
|
338 |
+
/**
|
339 |
+
* if the login display was in popup window,
|
340 |
+
* in the source window the user is redirected to the login url.
|
341 |
+
* and the popup window must be closed
|
342 |
+
*/
|
343 |
+
if (Persistent::get($this->id . '_display') == 'popup') {
|
344 |
+
Persistent::delete($this->id . '_display');
|
345 |
+
?>
|
346 |
+
<!doctype html>
|
347 |
+
<html lang=en>
|
348 |
+
<head>
|
349 |
+
<meta charset=utf-8>
|
350 |
+
<title><?php _e('Authentication successful', 'nextend-facebook-connect'); ?></title>
|
351 |
+
<script type="text/javascript">
|
352 |
+
try {
|
353 |
+
if (window.opener !== null && window.opener !== window) {
|
354 |
+
var sameOrigin = true;
|
355 |
+
try {
|
356 |
+
var currentOrigin = window.location.protocol + '//' + window.location.hostname;
|
357 |
+
if (window.opener.location.href.substring(0, currentOrigin.length) !== currentOrigin) {
|
358 |
+
sameOrigin = false;
|
359 |
+
}
|
360 |
+
|
361 |
+
} catch (e) {
|
362 |
+
// Blocked cross origin
|
363 |
+
sameOrigin = false;
|
364 |
+
}
|
365 |
+
if (sameOrigin) {
|
366 |
+
var url = <?php echo wp_json_encode($this->getLoginUrl()); ?>;
|
367 |
+
if (typeof window.opener.nslRedirect === 'function') {
|
368 |
+
window.opener.nslRedirect(url);
|
369 |
+
} else {
|
370 |
+
window.opener.location = url;
|
371 |
+
}
|
372 |
+
window.close();
|
373 |
+
} else {
|
374 |
+
window.location.reload(true);
|
375 |
+
}
|
376 |
+
} else {
|
377 |
+
window.location.reload(true);
|
378 |
+
}
|
379 |
+
} catch (e) {
|
380 |
+
window.location.reload(true);
|
381 |
+
}
|
382 |
+
</script>
|
383 |
+
</head>
|
384 |
+
<body><a href="<?php echo esc_url($this->getLoginUrl()); ?>"><?php echo 'Continue...'; ?></a></body>
|
385 |
+
</html>
|
386 |
+
<?php
|
387 |
+
exit;
|
388 |
+
}
|
389 |
+
|
390 |
+
/**
|
391 |
+
* Retrieves the userinfo trough the REST API and connect with the provider.
|
392 |
+
* Redirects to the last location.
|
393 |
+
*/
|
394 |
+
$this->authUserData = $this->getCurrentUserInfo();
|
395 |
+
|
396 |
+
do_action($this->id . '_login_action_get_user_profile', $accessTokenData);
|
397 |
+
}
|
398 |
+
}
|
399 |
+
|
400 |
+
/**
|
401 |
+
* @param $access_token
|
402 |
+
* Connect with the selected provider.
|
403 |
+
* After a successful login, we no longer need the previous persistent data.
|
404 |
+
*/
|
405 |
+
public function liveConnectGetUserProfile($access_token) {
|
406 |
+
|
407 |
+
$socialUser = new NextendSocialUser($this, $access_token);
|
408 |
+
$socialUser->liveConnectGetUserProfile();
|
409 |
+
|
410 |
+
$this->deleteLoginPersistentData();
|
411 |
+
$this->redirectToLastLocationOther();
|
412 |
+
}
|
413 |
+
|
414 |
+
/**
|
415 |
+
* @param $user_id
|
416 |
+
* @param $providerIdentifier
|
417 |
+
* @param $isRegister
|
418 |
+
* Insert the userid into the wp_social_users table,
|
419 |
+
* in this way a link is created between user accounts and the providers.
|
420 |
+
*
|
421 |
+
* @return bool
|
422 |
+
*/
|
423 |
+
public function linkUserToProviderIdentifier($user_id, $providerIdentifier, $isRegister = false) {
|
424 |
+
/** @var $wpdb WPDB */ global $wpdb;
|
425 |
+
|
426 |
+
$connectedProviderID = $this->getProviderIdentifierByUserID($user_id);
|
427 |
+
|
428 |
+
if ($connectedProviderID !== null) {
|
429 |
+
if ($connectedProviderID == $providerIdentifier) {
|
430 |
+
// This provider already linked to this user
|
431 |
+
return true;
|
432 |
+
}
|
433 |
+
|
434 |
+
// User already have this provider attached to his account with different provider id.
|
435 |
+
return false;
|
436 |
+
}
|
437 |
+
|
438 |
+
if ($isRegister) {
|
439 |
+
/**
|
440 |
+
* This is a register action.
|
441 |
+
*/
|
442 |
+
$wpdb->insert($wpdb->prefix . 'social_users', array(
|
443 |
+
'ID' => $user_id,
|
444 |
+
'type' => $this->dbID,
|
445 |
+
'identifier' => $providerIdentifier,
|
446 |
+
'register_date' => current_time('mysql'),
|
447 |
+
'link_date' => current_time('mysql'),
|
448 |
+
), array(
|
449 |
+
'%d',
|
450 |
+
'%s',
|
451 |
+
'%s',
|
452 |
+
'%s',
|
453 |
+
'%s'
|
454 |
+
));
|
455 |
+
} else {
|
456 |
+
/**
|
457 |
+
* This is a link action.
|
458 |
+
*/
|
459 |
+
$wpdb->insert($wpdb->prefix . 'social_users', array(
|
460 |
+
'ID' => $user_id,
|
461 |
+
'type' => $this->dbID,
|
462 |
+
'identifier' => $providerIdentifier,
|
463 |
+
'link_date' => current_time('mysql'),
|
464 |
+
), array(
|
465 |
+
'%d',
|
466 |
+
'%s',
|
467 |
+
'%s',
|
468 |
+
'%s'
|
469 |
+
));
|
470 |
+
}
|
471 |
+
|
472 |
+
do_action('nsl_' . $this->getId() . '_link_user', $user_id, $this->getId());
|
473 |
+
|
474 |
+
return true;
|
475 |
+
}
|
476 |
+
|
477 |
+
public function getUserIDByProviderIdentifier($identifier) {
|
478 |
+
/** @var $wpdb WPDB */ global $wpdb;
|
479 |
+
|
480 |
+
return $wpdb->get_var($wpdb->prepare('SELECT ID FROM `' . $wpdb->prefix . 'social_users` WHERE type = %s AND identifier = %s', array(
|
481 |
+
$this->dbID,
|
482 |
+
$identifier
|
483 |
+
)));
|
484 |
+
}
|
485 |
+
|
486 |
+
protected function getProviderIdentifierByUserID($user_id) {
|
487 |
+
/** @var $wpdb WPDB */ global $wpdb;
|
488 |
+
|
489 |
+
return $wpdb->get_var($wpdb->prepare('SELECT identifier FROM `' . $wpdb->prefix . 'social_users` WHERE type = %s AND ID = %s', array(
|
490 |
+
$this->dbID,
|
491 |
+
$user_id
|
492 |
+
)));
|
493 |
+
}
|
494 |
+
|
495 |
+
/**
|
496 |
+
* @param $user_id
|
497 |
+
* Delete the link between the user account and the provider.
|
498 |
+
*/
|
499 |
+
public function removeConnectionByUserID($user_id) {
|
500 |
+
/** @var $wpdb WPDB */ global $wpdb;
|
501 |
+
|
502 |
+
$wpdb->query($wpdb->prepare('DELETE FROM `' . $wpdb->prefix . 'social_users` WHERE type = %s AND ID = %d', array(
|
503 |
+
$this->dbID,
|
504 |
+
$user_id
|
505 |
+
)));
|
506 |
+
}
|
507 |
+
|
508 |
+
protected function unlinkUser() {
|
509 |
+
//Filter to disable unlinking social accounts
|
510 |
+
$unlinkAllowed = apply_filters('nsl_allow_unlink', true);
|
511 |
+
|
512 |
+
if ($unlinkAllowed) {
|
513 |
+
$user_info = wp_get_current_user();
|
514 |
+
if ($user_info->ID) {
|
515 |
+
$this->removeConnectionByUserID($user_info->ID);
|
516 |
+
|
517 |
+
return true;
|
518 |
+
}
|
519 |
+
}
|
520 |
+
|
521 |
+
return false;
|
522 |
+
}
|
523 |
+
|
524 |
+
/**
|
525 |
+
* If the current user has linked the account with a provider return the user identifier else false.
|
526 |
+
*
|
527 |
+
* @return bool|null|string
|
528 |
+
*/
|
529 |
+
public function isCurrentUserConnected() {
|
530 |
+
/** @var $wpdb WPDB */ global $wpdb;
|
531 |
+
|
532 |
+
$current_user = wp_get_current_user();
|
533 |
+
$ID = $wpdb->get_var($wpdb->prepare('SELECT identifier FROM `' . $wpdb->prefix . 'social_users` WHERE type LIKE %s AND ID = %d', array(
|
534 |
+
$this->dbID,
|
535 |
+
$current_user->ID
|
536 |
+
)));
|
537 |
+
if ($ID === null) {
|
538 |
+
return false;
|
539 |
+
}
|
540 |
+
|
541 |
+
return $ID;
|
542 |
+
}
|
543 |
+
|
544 |
+
/**
|
545 |
+
* @param $user_id
|
546 |
+
* If a user has linked the account with a provider return the user identifier else false.
|
547 |
+
*
|
548 |
+
* @return bool|null|string
|
549 |
+
*/
|
550 |
+
public function isUserConnected($user_id) {
|
551 |
+
/** @var $wpdb WPDB */ global $wpdb;
|
552 |
+
|
553 |
+
$ID = $wpdb->get_var($wpdb->prepare('SELECT identifier FROM `' . $wpdb->prefix . 'social_users` WHERE type LIKE %s AND ID = %d', array(
|
554 |
+
$this->dbID,
|
555 |
+
$user_id
|
556 |
+
)));
|
557 |
+
if ($ID === null) {
|
558 |
+
return false;
|
559 |
+
}
|
560 |
+
|
561 |
+
return $ID;
|
562 |
+
}
|
563 |
+
|
564 |
+
public function findUserByAccessToken($access_token) {
|
565 |
+
return $this->getUserIDByProviderIdentifier($this->findSocialIDByAccessToken($access_token));
|
566 |
+
}
|
567 |
+
|
568 |
+
public function findSocialIDByAccessToken($access_token) {
|
569 |
+
$client = $this->getClient();
|
570 |
+
$client->setAccessTokenData($access_token);
|
571 |
+
$this->authUserData = $this->getCurrentUserInfo();
|
572 |
+
|
573 |
+
return $this->getAuthUserData('id');
|
574 |
+
}
|
575 |
+
|
576 |
+
public function getConnectButton($buttonStyle = 'default', $redirectTo = null, $trackerData = false) {
|
577 |
+
$arg = array();
|
578 |
+
if (!empty($redirectTo)) {
|
579 |
+
$arg['redirect'] = urlencode($redirectTo);
|
580 |
+
} else if (!empty($_GET['redirect_to'])) {
|
581 |
+
$arg['redirect'] = urlencode($_GET['redirect_to']);
|
582 |
+
} else {
|
583 |
+
$arg['redirect'] = NextendSocialLogin::getCurrentPageURL();
|
584 |
+
}
|
585 |
+
|
586 |
+
if ($trackerData !== false) {
|
587 |
+
$arg['trackerdata'] = urlencode($trackerData);
|
588 |
+
$arg['trackerdata_hash'] = urlencode(wp_hash($trackerData));
|
589 |
+
|
590 |
+
}
|
591 |
+
|
592 |
+
switch ($buttonStyle) {
|
593 |
+
case 'icon':
|
594 |
+
|
595 |
+
$button = $this->getIconButton();
|
596 |
+
break;
|
597 |
+
default:
|
598 |
+
|
599 |
+
$button = $this->getDefaultButton($this->settings->get('login_label'));
|
600 |
+
break;
|
601 |
+
}
|
602 |
+
|
603 |
+
return '<a href="' . esc_url(add_query_arg($arg, $this->getLoginUrl())) . '" rel="nofollow" aria-label="' . esc_attr__($this->settings->get('login_label')) . '" data-plugin="nsl" data-action="connect" data-provider="' . esc_attr($this->getId()) . '" data-popupwidth="' . $this->getPopupWidth() . '" data-popupheight="' . $this->getPopupHeight() . '">' . $button . '</a>';
|
604 |
+
}
|
605 |
+
|
606 |
+
public function getLinkButton() {
|
607 |
+
|
608 |
+
$args = array(
|
609 |
+
'action' => 'link'
|
610 |
+
);
|
611 |
+
|
612 |
+
$redirect = NextendSocialLogin::getCurrentPageURL();
|
613 |
+
if ($redirect !== false) {
|
614 |
+
$args['redirect'] = urlencode($redirect);
|
615 |
+
}
|
616 |
+
|
617 |
+
return '<a href="' . esc_url(add_query_arg($args, $this->getLoginUrl())) . '" style="text-decoration:none;display:inline-block;box-shadow:none;" data-plugin="nsl" data-action="link" data-provider="' . esc_attr($this->getId()) . '" data-popupwidth="' . $this->getPopupWidth() . '" data-popupheight="' . $this->getPopupHeight() . '" aria-label="' . esc_attr__($this->settings->get('link_label')) . '">' . $this->getDefaultButton($this->settings->get('link_label')) . '</a>';
|
618 |
+
}
|
619 |
+
|
620 |
+
public function getUnLinkButton() {
|
621 |
+
|
622 |
+
$args = array(
|
623 |
+
'action' => 'unlink'
|
624 |
+
);
|
625 |
+
|
626 |
+
$redirect = NextendSocialLogin::getCurrentPageURL();
|
627 |
+
if ($redirect !== false) {
|
628 |
+
$args['redirect'] = urlencode($redirect);
|
629 |
+
}
|
630 |
+
|
631 |
+
return '<a href="' . esc_url(add_query_arg($args, $this->getLoginUrl())) . '" style="text-decoration:none;display:inline-block;box-shadow:none;" data-plugin="nsl" data-action="unlink" data-provider="' . esc_attr($this->getId()) . '" aria-label="' . esc_attr__($this->settings->get('unlink_label')) . '">' . $this->getDefaultButton($this->settings->get('unlink_label')) . '</a>';
|
632 |
+
}
|
633 |
+
|
634 |
+
public function redirectToLoginForm() {
|
635 |
+
self::redirect(__('Authentication error', 'nextend-facebook-connect'), NextendSocialLogin::getLoginUrl());
|
636 |
+
}
|
637 |
+
|
638 |
+
/**
|
639 |
+
* -Allows for logged in users to unlink their account from a provider, if it was linked, and
|
640 |
+
* redirects to the last location.
|
641 |
+
* -During linking process, store the action as link. After the linking process is finished,
|
642 |
+
* delete this stored info and redirects to the last location.
|
643 |
+
*/
|
644 |
+
public function liveConnectBefore() {
|
645 |
+
|
646 |
+
if (is_user_logged_in() && $this->isCurrentUserConnected()) {
|
647 |
+
|
648 |
+
if (isset($_GET['action']) && $_GET['action'] == 'unlink') {
|
649 |
+
if ($this->unlinkUser()) {
|
650 |
+
Notices::addSuccess(__('Unlink successful.', 'nextend-facebook-connect'));
|
651 |
+
} else {
|
652 |
+
Notices::addError(__('Unlink is not allowed!', 'nextend-facebook-connect'));
|
653 |
+
}
|
654 |
+
}
|
655 |
+
|
656 |
+
$this->redirectToLastLocationOther();
|
657 |
+
exit;
|
658 |
+
}
|
659 |
+
|
660 |
+
if (isset($_GET['action']) && $_GET['action'] == 'link') {
|
661 |
+
Persistent::set($this->id . '_action', 'link');
|
662 |
+
}
|
663 |
+
|
664 |
+
if (is_user_logged_in() && Persistent::get($this->id . '_action') != 'link') {
|
665 |
+
$this->deleteLoginPersistentData();
|
666 |
+
|
667 |
+
$this->redirectToLastLocationOther();
|
668 |
+
exit;
|
669 |
+
}
|
670 |
+
}
|
671 |
+
|
672 |
+
/**
|
673 |
+
* Store where the user logged in.
|
674 |
+
*/
|
675 |
+
public function liveConnectRedirect() {
|
676 |
+
if (!empty($_GET['trackerdata']) && !empty($_GET['trackerdata_hash'])) {
|
677 |
+
if (wp_hash($_GET['trackerdata']) === $_GET['trackerdata_hash']) {
|
678 |
+
Persistent::set('trackerdata', $_GET['trackerdata']);
|
679 |
+
}
|
680 |
+
}
|
681 |
+
if (!empty($_GET['redirect'])) {
|
682 |
+
Persistent::set('redirect', $_GET['redirect']);
|
683 |
+
}
|
684 |
+
}
|
685 |
+
|
686 |
+
public function redirectToLastLocation() {
|
687 |
+
|
688 |
+
if (Persistent::get($this->id . '_interim_login') == 1) {
|
689 |
+
$this->deleteLoginPersistentData();
|
690 |
+
|
691 |
+
$url = add_query_arg('interim_login', 'nsl', NextendSocialLogin::getLoginUrl('login'));
|
692 |
+
|
693 |
+
self::redirect(__('Authentication successful', 'nextend-facebook-connect'), $url);
|
694 |
+
|
695 |
+
exit;
|
696 |
+
}
|
697 |
+
|
698 |
+
self::redirect(__('Authentication successful', 'nextend-facebook-connect'), $this->getLastLocationRedirectTo());
|
699 |
+
}
|
700 |
+
|
701 |
+
protected function redirectToLastLocationOther() {
|
702 |
+
$this->redirectToLastLocation();
|
703 |
+
}
|
704 |
+
|
705 |
+
protected function validateRedirect($location) {
|
706 |
+
$location = wp_sanitize_redirect($location);
|
707 |
+
|
708 |
+
return wp_validate_redirect($location, apply_filters('wp_safe_redirect_fallback', admin_url(), 302));
|
709 |
+
}
|
710 |
+
|
711 |
+
public function hasFixedRedirect() {
|
712 |
+
if (NextendSocialLogin::$WPLoginCurrentFlow == 'register') {
|
713 |
+
$fixedRedirect = NextendSocialLogin::$settings->get('redirect_reg');
|
714 |
+
$fixedRedirect = apply_filters($this->id . '_register_redirect_url', $fixedRedirect, $this);
|
715 |
+
if (!empty($fixedRedirect)) {
|
716 |
+
return true;
|
717 |
+
}
|
718 |
+
|
719 |
+
} else if (NextendSocialLogin::$WPLoginCurrentFlow == 'login') {
|
720 |
+
$fixedRedirect = NextendSocialLogin::$settings->get('redirect');
|
721 |
+
$fixedRedirect = apply_filters($this->id . '_login_redirect_url', $fixedRedirect, $this);
|
722 |
+
if (!empty($fixedRedirect)) {
|
723 |
+
return true;
|
724 |
+
}
|
725 |
+
}
|
726 |
+
|
727 |
+
return false;
|
728 |
+
}
|
729 |
+
|
730 |
+
/**
|
731 |
+
* If fixed redirect url is set, redirect to fixed redirect url.
|
732 |
+
* If fixed redirect url is not set, but redirect is in the url redirect to the $_GET['redirect'].
|
733 |
+
* If fixed redirect url is not set and there is no redirect in the url, redirects to the default redirect url if it
|
734 |
+
* is set.
|
735 |
+
* Else redirect to the site url.
|
736 |
+
*
|
737 |
+
* @return mixed|void
|
738 |
+
*/
|
739 |
+
protected function getLastLocationRedirectTo() {
|
740 |
+
$redirect_to = '';
|
741 |
+
$requested_redirect_to = '';
|
742 |
+
$fixedRedirect = '';
|
743 |
+
|
744 |
+
if (NextendSocialLogin::$WPLoginCurrentFlow == 'register') {
|
745 |
+
|
746 |
+
$fixedRedirect = NextendSocialLogin::$settings->get('redirect_reg');
|
747 |
+
$fixedRedirect = apply_filters($this->id . '_register_redirect_url', $fixedRedirect, $this);
|
748 |
+
|
749 |
+
} else if (NextendSocialLogin::$WPLoginCurrentFlow == 'login') {
|
750 |
+
|
751 |
+
$fixedRedirect = NextendSocialLogin::$settings->get('redirect');
|
752 |
+
$fixedRedirect = apply_filters($this->id . '_login_redirect_url', $fixedRedirect, $this);
|
753 |
+
|
754 |
+
}
|
755 |
+
|
756 |
+
if (!empty($fixedRedirect)) {
|
757 |
+
$redirect_to = $fixedRedirect;
|
758 |
+
} else {
|
759 |
+
$requested_redirect_to = Persistent::get('redirect');
|
760 |
+
|
761 |
+
if (!empty($requested_redirect_to)) {
|
762 |
+
if (empty($requested_redirect_to) || !NextendSocialLogin::isAllowedRedirectUrl($requested_redirect_to)) {
|
763 |
+
if (!empty($_GET['redirect']) && NextendSocialLogin::isAllowedRedirectUrl($_GET['redirect'])) {
|
764 |
+
$requested_redirect_to = $_GET['redirect'];
|
765 |
+
} else {
|
766 |
+
$requested_redirect_to = '';
|
767 |
+
}
|
768 |
+
}
|
769 |
+
|
770 |
+
if (empty($requested_redirect_to)) {
|
771 |
+
$redirect_to = site_url();
|
772 |
+
} else {
|
773 |
+
$redirect_to = $requested_redirect_to;
|
774 |
+
}
|
775 |
+
$redirect_to = wp_sanitize_redirect($redirect_to);
|
776 |
+
$redirect_to = wp_validate_redirect($redirect_to, site_url());
|
777 |
+
|
778 |
+
$redirect_to = $this->validateRedirect($redirect_to);
|
779 |
+
} else if (!empty($_GET['redirect']) && NextendSocialLogin::isAllowedRedirectUrl($_GET['redirect'])) {
|
780 |
+
$redirect_to = $_GET['redirect'];
|
781 |
+
|
782 |
+
$redirect_to = wp_sanitize_redirect($redirect_to);
|
783 |
+
$redirect_to = wp_validate_redirect($redirect_to, site_url());
|
784 |
+
|
785 |
+
$redirect_to = $this->validateRedirect($redirect_to);
|
786 |
+
}
|
787 |
+
|
788 |
+
if (empty($redirect_to)) {
|
789 |
+
$defaultRedirect = '';
|
790 |
+
|
791 |
+
if (NextendSocialLogin::$WPLoginCurrentFlow == 'register') {
|
792 |
+
$defaultRedirect = NextendSocialLogin::$settings->get('default_redirect_reg');
|
793 |
+
$defaultRedirect = apply_filters($this->id . '_default_register_redirect_url', $defaultRedirect, $this);
|
794 |
+
|
795 |
+
} else if (NextendSocialLogin::$WPLoginCurrentFlow == 'login') {
|
796 |
+
$defaultRedirect = NextendSocialLogin::$settings->get('default_redirect');
|
797 |
+
$defaultRedirect = apply_filters($this->id . '_default_[login_redirect_url', $defaultRedirect, $this);
|
798 |
+
}
|
799 |
+
|
800 |
+
if ((!empty($defaultRedirect))) {
|
801 |
+
$redirect_to = $defaultRedirect;
|
802 |
+
}
|
803 |
+
}
|
804 |
+
|
805 |
+
$redirect_to = apply_filters('nsl_' . $this->getId() . 'default_last_location_redirect', $redirect_to, $requested_redirect_to);
|
806 |
+
}
|
807 |
+
|
808 |
+
if ($redirect_to == '' || $redirect_to == $this->getLoginUrl()) {
|
809 |
+
$redirect_to = site_url();
|
810 |
+
}
|
811 |
+
|
812 |
+
Persistent::delete('redirect');
|
813 |
+
|
814 |
+
return apply_filters('nsl_' . $this->getId() . 'last_location_redirect', $redirect_to, $requested_redirect_to);
|
815 |
+
}
|
816 |
+
|
817 |
+
/**
|
818 |
+
* @param $user_id
|
819 |
+
* @param $provider NextendSocialProvider
|
820 |
+
* @param $access_token string
|
821 |
+
*/
|
822 |
+
public function syncProfile($user_id, $provider, $access_token) {
|
823 |
+
}
|
824 |
+
|
825 |
+
/**
|
826 |
+
* Check if a logged in user with manage_options capability, want to verify their provider settings.
|
827 |
+
*
|
828 |
+
* @return bool
|
829 |
+
*/
|
830 |
+
public function isTest() {
|
831 |
+
if (is_user_logged_in() && current_user_can('manage_options')) {
|
832 |
+
if (isset($_REQUEST['test'])) {
|
833 |
+
Persistent::set('test', 1);
|
834 |
+
|
835 |
+
return true;
|
836 |
+
} else if (Persistent::get('test') == 1) {
|
837 |
+
return true;
|
838 |
+
}
|
839 |
+
}
|
840 |
+
|
841 |
+
return false;
|
842 |
+
}
|
843 |
+
|
844 |
+
/**
|
845 |
+
* Make the current provider in verified mode, and update the oauth_redirect_url.
|
846 |
+
*/
|
847 |
+
public function testConnectGetUserProfile() {
|
848 |
+
|
849 |
+
$this->deleteLoginPersistentData();
|
850 |
+
|
851 |
+
$this->settings->update(array(
|
852 |
+
'tested' => 1,
|
853 |
+
'oauth_redirect_url' => $this->getRedirectUri()
|
854 |
+
));
|
855 |
+
|
856 |
+
Notices::addSuccess(__('The test was successful', 'nextend-facebook-connect'));
|
857 |
+
|
858 |
+
?>
|
859 |
+
<!doctype html>
|
860 |
+
<html lang=en>
|
861 |
+
<head>
|
862 |
+
<meta charset=utf-8>
|
863 |
+
<title><?php _e('The test was successful', 'nextend-facebook-connect'); ?></title>
|
864 |
+
<script type="text/javascript">
|
865 |
+
window.opener.location.reload(true);
|
866 |
+
window.close();
|
867 |
+
</script>
|
868 |
+
</head>
|
869 |
+
</html>
|
870 |
+
<?php
|
871 |
+
exit;
|
872 |
+
}
|
873 |
+
|
874 |
+
/**
|
875 |
+
* @param $accessToken
|
876 |
+
* Store the accessToken data.
|
877 |
+
*/
|
878 |
+
protected function setAnonymousAccessToken($accessToken) {
|
879 |
+
Persistent::set($this->id . '_at', $accessToken);
|
880 |
+
}
|
881 |
+
|
882 |
+
protected function getAnonymousAccessToken() {
|
883 |
+
return Persistent::get($this->id . '_at');
|
884 |
+
}
|
885 |
+
|
886 |
+
public function deleteLoginPersistentData() {
|
887 |
+
Persistent::delete($this->id . '_at');
|
888 |
+
Persistent::delete($this->id . '_interim_login');
|
889 |
+
Persistent::delete($this->id . '_display');
|
890 |
+
Persistent::delete($this->id . '_action');
|
891 |
+
Persistent::delete('test');
|
892 |
+
}
|
893 |
+
|
894 |
+
/**
|
895 |
+
* @param $e Exception
|
896 |
+
*/
|
897 |
+
protected function onError($e) {
|
898 |
+
if (NextendSocialLogin::$settings->get('debug') == 1 || $this->isTest()) {
|
899 |
+
header('HTTP/1.0 401 Unauthorized');
|
900 |
+
echo "Error: " . $e->getMessage() . "\n";
|
901 |
+
} else {
|
902 |
+
//@TODO we might need to make difference between user cancelled auth and error and redirect the user based on that.
|
903 |
+
$url = $this->getLastLocationRedirectTo();
|
904 |
+
?>
|
905 |
+
<!doctype html>
|
906 |
+
<html lang=en>
|
907 |
+
<head>
|
908 |
+
<meta charset=utf-8>
|
909 |
+
<title><?php echo __('Authentication failed', 'nextend-facebook-connect'); ?></title>
|
910 |
+
<script type="text/javascript">
|
911 |
+
try {
|
912 |
+
if (window.opener !== null && window.opener !== window) {
|
913 |
+
var sameOrigin = true;
|
914 |
+
try {
|
915 |
+
var currentOrigin = window.location.protocol + '//' + window.location.hostname;
|
916 |
+
if (window.opener.location.href.substring(0, currentOrigin.length) !== currentOrigin) {
|
917 |
+
sameOrigin = false;
|
918 |
+
}
|
919 |
+
|
920 |
+
} catch (e) {
|
921 |
+
// Blocked cross origin
|
922 |
+
sameOrigin = false;
|
923 |
+
}
|
924 |
+
if (sameOrigin) {
|
925 |
+
window.close();
|
926 |
+
}
|
927 |
+
}
|
928 |
+
} catch (e) {
|
929 |
+
}
|
930 |
+
window.location = <?php echo wp_json_encode($url); ?>;
|
931 |
+
</script>
|
932 |
+
<meta http-equiv="refresh" content="0;<?php echo esc_attr($url); ?>">
|
933 |
+
</head>
|
934 |
+
<body>
|
935 |
+
</body>
|
936 |
+
</html>
|
937 |
+
<?php
|
938 |
+
}
|
939 |
+
$this->deleteLoginPersistentData();
|
940 |
+
exit;
|
941 |
+
}
|
942 |
+
|
943 |
+
protected function saveUserData($user_id, $key, $data) {
|
944 |
+
update_user_meta($user_id, $this->id . '_' . $key, $data);
|
945 |
+
}
|
946 |
+
|
947 |
+
protected function getUserData($user_id, $key) {
|
948 |
+
return get_user_meta($user_id, $this->id . '_' . $key, true);
|
949 |
+
}
|
950 |
+
|
951 |
+
public function getAccessToken($user_id) {
|
952 |
+
return $this->getUserData($user_id, 'access_token');
|
953 |
+
}
|
954 |
+
|
955 |
+
/**
|
956 |
+
* @param $user_id
|
957 |
+
*
|
958 |
+
* @return bool
|
959 |
+
* @deprecated
|
960 |
+
*
|
961 |
+
*/
|
962 |
+
public function getAvatar($user_id) {
|
963 |
+
|
964 |
+
return false;
|
965 |
+
}
|
966 |
+
|
967 |
+
/**
|
968 |
+
* @return array
|
969 |
+
*/
|
970 |
+
protected function getCurrentUserInfo() {
|
971 |
+
return array();
|
972 |
+
}
|
973 |
+
|
974 |
+
protected function requestLongLivedToken($accessTokenData) {
|
975 |
+
return $accessTokenData;
|
976 |
+
}
|
977 |
+
|
978 |
+
/**
|
979 |
+
* @param $key
|
980 |
+
*
|
981 |
+
* @return string
|
982 |
+
*/
|
983 |
+
public function getAuthUserData($key) {
|
984 |
+
return '';
|
985 |
+
}
|
986 |
+
|
987 |
+
/**
|
988 |
+
* @param $title
|
989 |
+
* @param $url
|
990 |
+
* Redirect the source of the popup window to a specified url.
|
991 |
+
*/
|
992 |
+
public static function redirect($title, $url) {
|
993 |
+
?>
|
994 |
+
<!doctype html>
|
995 |
+
<html lang=en>
|
996 |
+
<head>
|
997 |
+
<meta charset=utf-8>
|
998 |
+
<title><?php echo $title; ?></title>
|
999 |
+
<script type="text/javascript">
|
1000 |
+
try {
|
1001 |
+
if (window.opener !== null && window.opener !== window) {
|
1002 |
+
var sameOrigin = true;
|
1003 |
+
try {
|
1004 |
+
var currentOrigin = window.location.protocol + '//' + window.location.hostname;
|
1005 |
+
if (window.opener.location.href.substring(0, currentOrigin.length) !== currentOrigin) {
|
1006 |
+
sameOrigin = false;
|
1007 |
+
}
|
1008 |
+
|
1009 |
+
} catch (e) {
|
1010 |
+
// Blocked cross origin
|
1011 |
+
sameOrigin = false;
|
1012 |
+
}
|
1013 |
+
if (sameOrigin) {
|
1014 |
+
window.opener.location = <?php echo wp_json_encode($url); ?>;
|
1015 |
+
window.close();
|
1016 |
+
}
|
1017 |
+
}
|
1018 |
+
} catch (e) {
|
1019 |
+
}
|
1020 |
+
window.location = <?php echo wp_json_encode($url); ?>;
|
1021 |
+
</script>
|
1022 |
+
<meta http-equiv="refresh" content="0;<?php echo esc_attr($url); ?>">
|
1023 |
+
</head>
|
1024 |
+
<body>
|
1025 |
+
</body>
|
1026 |
+
</html>
|
1027 |
+
<?php
|
1028 |
+
exit;
|
1029 |
+
}
|
1030 |
+
|
1031 |
+
public function getSyncFields() {
|
1032 |
+
return $this->sync_fields;
|
1033 |
+
}
|
1034 |
+
|
1035 |
+
public function hasSyncFields() {
|
1036 |
+
return !empty($this->sync_fields);
|
1037 |
+
}
|
1038 |
+
|
1039 |
+
public function validateSettings($newData, $postedData) {
|
1040 |
+
|
1041 |
+
return $newData;
|
1042 |
+
}
|
1043 |
+
|
1044 |
+
protected function needUpdateAvatar($user_id) {
|
1045 |
+
return apply_filters('nsl_avatar_store', NextendSocialLogin::$settings->get('avatar_store'), $user_id, $this);
|
1046 |
+
}
|
1047 |
+
|
1048 |
+
protected function updateAvatar($user_id, $url) {
|
1049 |
+
do_action('nsl_update_avatar', $this, $user_id, $url);
|
1050 |
+
}
|
1051 |
+
|
1052 |
+
public function exportPersonalData($userID) {
|
1053 |
+
$data = array();
|
1054 |
+
|
1055 |
+
$socialID = $this->isUserConnected($userID);
|
1056 |
+
if ($socialID !== false) {
|
1057 |
+
$data[] = array(
|
1058 |
+
'name' => $this->getLabel() . ' ' . __('Identifier'),
|
1059 |
+
'value' => $socialID,
|
1060 |
+
);
|
1061 |
+
}
|
1062 |
+
|
1063 |
+
$accessToken = $this->getAccessToken($userID);
|
1064 |
+
if (!empty($accessToken)) {
|
1065 |
+
$data[] = array(
|
1066 |
+
'name' => $this->getLabel() . ' ' . __('Access token'),
|
1067 |
+
'value' => $accessToken,
|
1068 |
+
);
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
$profilePicture = $this->getUserData($userID, 'profile_picture');
|
1072 |
+
if (!empty($profilePicture)) {
|
1073 |
+
$data[] = array(
|
1074 |
+
'name' => $this->getLabel() . ' ' . __('Profile picture'),
|
1075 |
+
'value' => $profilePicture,
|
1076 |
+
);
|
1077 |
+
}
|
1078 |
+
|
1079 |
+
foreach ($this->getSyncFields() AS $fieldName => $fieldData) {
|
1080 |
+
$meta_key = $this->settings->get('sync_fields/fields/' . $fieldName . '/meta_key');
|
1081 |
+
if (!empty($meta_key)) {
|
1082 |
+
$value = get_user_meta($userID, $meta_key, true);
|
1083 |
+
if (!empty($value)) {
|
1084 |
+
$data[] = array(
|
1085 |
+
'name' => $this->getLabel() . ' ' . $fieldData['label'],
|
1086 |
+
'value' => $value
|
1087 |
+
);
|
1088 |
+
}
|
1089 |
+
}
|
1090 |
+
}
|
1091 |
+
|
1092 |
+
|
1093 |
+
return $data;
|
1094 |
+
}
|
1095 |
+
|
1096 |
+
protected function storeAccessToken($userID, $accessToken) {
|
1097 |
+
if (NextendSocialLogin::$settings->get('store_access_token') == 1) {
|
1098 |
+
$this->saveUserData($userID, 'access_token', $accessToken);
|
1099 |
+
}
|
1100 |
+
}
|
1101 |
+
|
1102 |
+
public function getSyncDataFieldDescription($fieldName) {
|
1103 |
+
return '';
|
1104 |
+
}
|
1105 |
+
|
1106 |
+
/**
|
1107 |
+
* @param $user_id
|
1108 |
+
* Update social_users table with login date of the user.
|
1109 |
+
*/
|
1110 |
+
public function logLoginDate($user_id) {
|
1111 |
+
/** @var $wpdb WPDB */ global $wpdb;
|
1112 |
+
$wpdb->update($wpdb->prefix . 'social_users', array('login_date' => current_time('mysql'),), array(
|
1113 |
+
'ID' => $user_id,
|
1114 |
+
'type' => $this->dbID
|
1115 |
+
), array(
|
1116 |
+
'%s',
|
1117 |
+
'%s'
|
1118 |
+
));
|
1119 |
+
}
|
1120 |
}
|
includes/user.php
CHANGED
@@ -1,625 +1,650 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
protected $
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
* @
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
*
|
43 |
-
*
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
if (!
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
if ($
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
if (
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
)
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
*
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
'
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
* @
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
}
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
$
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
if (
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
$this->provider
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
*
|
547 |
-
*
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
* @
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
}
|
621 |
-
|
622 |
-
public function
|
623 |
-
|
624 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
625 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use NSL\Notices;
|
4 |
+
use NSL\Persistent\Persistent;
|
5 |
+
|
6 |
+
require_once(NSL_PATH . '/includes/userData.php');
|
7 |
+
|
8 |
+
class NextendSocialUser {
|
9 |
+
|
10 |
+
/** @var NextendSocialProvider */
|
11 |
+
protected $provider;
|
12 |
+
|
13 |
+
protected $access_token;
|
14 |
+
|
15 |
+
private $userExtraData;
|
16 |
+
|
17 |
+
protected $user_id;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* NextendSocialUser constructor.
|
21 |
+
*
|
22 |
+
* @param NextendSocialProvider $provider
|
23 |
+
* @param $access_token
|
24 |
+
*/
|
25 |
+
public function __construct($provider, $access_token) {
|
26 |
+
$this->provider = $provider;
|
27 |
+
$this->access_token = $access_token;
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @param $key
|
32 |
+
* $key is like id, email, name, first_name, last_name
|
33 |
+
* Returns a single userdata of the current provider or empty sting if $key is invalid.
|
34 |
+
*
|
35 |
+
* @return string
|
36 |
+
*/
|
37 |
+
public function getAuthUserData($key) {
|
38 |
+
return $this->provider->getAuthUserData($key);
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Connect with a Provider
|
43 |
+
* If user is not logged in
|
44 |
+
* - and has no linked social data (in wp_social_users table), prepare them for register.
|
45 |
+
* - but if has linked social data, log them in.
|
46 |
+
* If the user is logged in, retrieve the user data,
|
47 |
+
* - if the user has no linked social data with the selected provider and there is no other user who linked that id
|
48 |
+
* , link them and sync the access_token.
|
49 |
+
*/
|
50 |
+
public function liveConnectGetUserProfile() {
|
51 |
+
|
52 |
+
$user_id = $this->provider->getUserIDByProviderIdentifier($this->getAuthUserData('id'));
|
53 |
+
if ($user_id !== null && !get_user_by('id', $user_id)) {
|
54 |
+
$this->provider->removeConnectionByUserID($user_id);
|
55 |
+
$user_id = null;
|
56 |
+
}
|
57 |
+
|
58 |
+
if (!is_user_logged_in()) {
|
59 |
+
|
60 |
+
if ($user_id == null) {
|
61 |
+
$this->prepareRegister();
|
62 |
+
} else {
|
63 |
+
$this->login($user_id);
|
64 |
+
}
|
65 |
+
} else {
|
66 |
+
$current_user = wp_get_current_user();
|
67 |
+
if ($user_id === null) {
|
68 |
+
// Let's connect the account to the current user!
|
69 |
+
|
70 |
+
if ($this->provider->linkUserToProviderIdentifier($current_user->ID, $this->getAuthUserData('id'))) {
|
71 |
+
|
72 |
+
$this->provider->syncProfile($current_user->ID, $this->provider, $this->access_token);
|
73 |
+
|
74 |
+
Notices::addSuccess(sprintf(__('Your %1$s account is successfully linked with your account. Now you can sign in with %2$s easily.', 'nextend-facebook-connect'), $this->provider->getLabel(), $this->provider->getLabel()));
|
75 |
+
} else {
|
76 |
+
|
77 |
+
Notices::addError(sprintf(__('You have already linked a(n) %s account. Please unlink the current and then you can link other %s account.', 'nextend-facebook-connect'), $this->provider->getLabel(), $this->provider->getLabel()));
|
78 |
+
}
|
79 |
+
|
80 |
+
} else if ($current_user->ID != $user_id) {
|
81 |
+
|
82 |
+
Notices::addError(sprintf(__('This %s account is already linked to other user.', 'nextend-facebook-connect'), $this->provider->getLabel()));
|
83 |
+
}
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Prepares the registration and registers the user.
|
89 |
+
* If the email is not registered yet, checks if register is enabled call register() function.
|
90 |
+
* If the email is already registered, checks if autolink is enabled, if it is, log the user in.
|
91 |
+
* Autolink enabled: links the current provider account with the existing social account and attempts to login.
|
92 |
+
* Autolink disabled: Add error with already registered email message.
|
93 |
+
*/
|
94 |
+
protected function prepareRegister() {
|
95 |
+
|
96 |
+
$user_id = false;
|
97 |
+
|
98 |
+
$providerUserID = $this->getAuthUserData('id');
|
99 |
+
|
100 |
+
$email = '';
|
101 |
+
if (NextendSocialLogin::$settings->get('store_email') == 1) {
|
102 |
+
$email = $this->getAuthUserData('email');
|
103 |
+
}
|
104 |
+
|
105 |
+
if (empty($email)) {
|
106 |
+
$email = '';
|
107 |
+
} else {
|
108 |
+
$user_id = email_exists($email);
|
109 |
+
}
|
110 |
+
if ($user_id === false) { // Real register
|
111 |
+
if (apply_filters('nsl_is_register_allowed', true, $this->provider)) {
|
112 |
+
$this->register($providerUserID, $email);
|
113 |
+
} else {
|
114 |
+
//unset the persistent data, so if an error happened, the user can re-authenticate with providers (Google) that offer account selector screen
|
115 |
+
Persistent::delete($this->provider->getId() . '_at');
|
116 |
+
Persistent::delete($this->provider->getId() . '_state');
|
117 |
+
|
118 |
+
|
119 |
+
$proxyPage = NextendSocialLogin::getProxyPage();
|
120 |
+
if ($proxyPage) {
|
121 |
+
$errors = new WP_Error();
|
122 |
+
$errors->add('registerdisabled', __('User registration is currently not allowed.'));
|
123 |
+
Notices::addError($errors->get_error_message());
|
124 |
+
}
|
125 |
+
|
126 |
+
|
127 |
+
NextendSocialProvider::redirect(__('Authentication error', 'nextend-facebook-connect'), add_query_arg('registration', 'disabled', NextendSocialLogin::getLoginUrl()));
|
128 |
+
exit;
|
129 |
+
}
|
130 |
+
|
131 |
+
} else if ($this->autoLink($user_id, $providerUserID)) {
|
132 |
+
$this->login($user_id);
|
133 |
+
}
|
134 |
+
|
135 |
+
$this->provider->redirectToLoginForm();
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* @param $username
|
140 |
+
* Makes the username in an appropriate format. Removes white space and some special characters.
|
141 |
+
* Also turns it into lowercase. And put a prefix before the username if user_prefix is set.
|
142 |
+
* If this formated username is valid returns it, else return false.
|
143 |
+
*
|
144 |
+
* @return bool|string
|
145 |
+
*/
|
146 |
+
protected function sanitizeUserName($username) {
|
147 |
+
if (empty($username)) {
|
148 |
+
return false;
|
149 |
+
}
|
150 |
+
|
151 |
+
$username = strtolower($username);
|
152 |
+
|
153 |
+
$username = preg_replace('/\s+/', '', $username);
|
154 |
+
|
155 |
+
$sanitized_user_login = sanitize_user($this->provider->settings->get('user_prefix') . $username, true);
|
156 |
+
|
157 |
+
if (empty($sanitized_user_login)) {
|
158 |
+
return false;
|
159 |
+
}
|
160 |
+
|
161 |
+
if (!validate_username($sanitized_user_login)) {
|
162 |
+
return false;
|
163 |
+
}
|
164 |
+
|
165 |
+
return $sanitized_user_login;
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* @param $providerID
|
170 |
+
* @param $email
|
171 |
+
* Registers the user.
|
172 |
+
*
|
173 |
+
* @return bool
|
174 |
+
*/
|
175 |
+
protected function register($providerID, $email) {
|
176 |
+
|
177 |
+
NextendSocialLogin::$WPLoginCurrentFlow = 'register';
|
178 |
+
|
179 |
+
$sanitized_user_login = false;
|
180 |
+
|
181 |
+
if (NextendSocialLogin::$settings->get('store_name') == 1) {
|
182 |
+
/**
|
183 |
+
* First checks provided first_name & last_name if it is not available checks name if it is neither available checks secondary_name.
|
184 |
+
*/
|
185 |
+
$sanitized_user_login = $this->sanitizeUserName($this->getAuthUserData('first_name') . $this->getAuthUserData('last_name'));
|
186 |
+
if ($sanitized_user_login === false) {
|
187 |
+
$sanitized_user_login = $this->sanitizeUserName($this->getAuthUserData('username'));
|
188 |
+
if ($sanitized_user_login === false) {
|
189 |
+
$sanitized_user_login = $this->sanitizeUserName($this->getAuthUserData('name'));
|
190 |
+
}
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
$email = '';
|
195 |
+
if (NextendSocialLogin::$settings->get('store_email') == 1) {
|
196 |
+
$email = $this->getAuthUserData('email');
|
197 |
+
}
|
198 |
+
$userData = array(
|
199 |
+
'email' => $email,
|
200 |
+
'username' => $sanitized_user_login
|
201 |
+
);
|
202 |
+
|
203 |
+
do_action('nsl_before_register', $this->provider);
|
204 |
+
|
205 |
+
do_action('nsl_' . $this->provider->getId() . '_before_register');
|
206 |
+
|
207 |
+
if (NextendSocialLogin::$settings->get('terms_show') == '1') {
|
208 |
+
|
209 |
+
add_filter('nsl_registration_require_extra_input', array(
|
210 |
+
$this,
|
211 |
+
'require_extra_input_terms'
|
212 |
+
));
|
213 |
+
}
|
214 |
+
|
215 |
+
|
216 |
+
/** @var array $userData Validated user data */
|
217 |
+
$userData = $this->finalizeUserData($userData);
|
218 |
+
|
219 |
+
/**
|
220 |
+
* -If neither of the usernames ( first_name & last_name, secondary_name) are appropriate, the fallback username will be combined with and id that was sent by the provider.
|
221 |
+
* -In this way we can generate an appropriate username.
|
222 |
+
*/
|
223 |
+
if (empty($userData['username'])) {
|
224 |
+
$userData['username'] = sanitize_user($this->provider->settings->get('user_fallback') . md5(uniqid(rand())), true);
|
225 |
+
}
|
226 |
+
|
227 |
+
/**
|
228 |
+
* If the username is already in use, it will get a number suffix, that is not registered yet.
|
229 |
+
*/
|
230 |
+
$default_user_name = $userData['username'];
|
231 |
+
$i = 1;
|
232 |
+
while (username_exists($userData['username'])) {
|
233 |
+
$userData['username'] = $default_user_name . $i;
|
234 |
+
$i++;
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Generates a random password. And set the default_password_nag to true. So the user get notify about randomly generated password.
|
239 |
+
*/
|
240 |
+
if (empty($userData['password'])) {
|
241 |
+
$userData['password'] = wp_generate_password(12, false);
|
242 |
+
|
243 |
+
add_action('user_register', array(
|
244 |
+
$this,
|
245 |
+
'registerCompleteDefaultPasswordNag'
|
246 |
+
));
|
247 |
+
}
|
248 |
+
/**
|
249 |
+
* Preregister, checks what roles shall be informed about the registration and sends a notification to them.
|
250 |
+
*/
|
251 |
+
do_action('nsl_pre_register_new_user', $this);
|
252 |
+
|
253 |
+
$loginRestriction = NextendSocialLogin::$settings->get('login_restriction');
|
254 |
+
if ($loginRestriction) {
|
255 |
+
$errors = new WP_Error();
|
256 |
+
|
257 |
+
//Prevent New User Approve registration before NSL registration
|
258 |
+
if (class_exists('pw_new_user_approve', false)) {
|
259 |
+
remove_action('register_post', array(
|
260 |
+
pw_new_user_approve::instance(),
|
261 |
+
'create_new_user'
|
262 |
+
), 10);
|
263 |
+
}
|
264 |
+
|
265 |
+
//Ultimate Member redirects before we update the Avatar, we need to sync before the redirect
|
266 |
+
if (class_exists('UM', false)) {
|
267 |
+
add_action('um_registration_after_auto_login', array(
|
268 |
+
$this,
|
269 |
+
'syncProfileUser'
|
270 |
+
), 10);
|
271 |
+
}
|
272 |
+
|
273 |
+
/*For TML 6.4.17 Register notification integration*/
|
274 |
+
do_action('register_post', $userData['username'], $userData['email'], $errors);
|
275 |
+
|
276 |
+
if ($errors->get_error_code()) {
|
277 |
+
Notices::addError($errors);
|
278 |
+
$this->redirectToLastLocationLogin();
|
279 |
+
}
|
280 |
+
}
|
281 |
+
|
282 |
+
/**
|
283 |
+
* Eduma theme user priority 1000 to auto log in users. We need to stay under that priority @see https://themeforest.net/item/education-wordpress-theme-education-wp/14058034
|
284 |
+
* WooCommerce Follow-Up Emails use priority 10, so we need higher @see https://woocommerce.com/products/follow-up-emails/
|
285 |
+
*
|
286 |
+
* If there was no error during the registration process,
|
287 |
+
* -links the user to the providerIdentifier ( wp_social_users table in database store this link ).
|
288 |
+
* -set the roles for the user.
|
289 |
+
* -login the user.
|
290 |
+
*/
|
291 |
+
add_action('user_register', array(
|
292 |
+
$this,
|
293 |
+
'registerComplete'
|
294 |
+
), 31);
|
295 |
+
|
296 |
+
$this->userExtraData = $userData;
|
297 |
+
|
298 |
+
$user_data = array(
|
299 |
+
'user_login' => wp_slash($userData['username']),
|
300 |
+
'user_email' => wp_slash($userData['email']),
|
301 |
+
'user_pass' => $userData['password']
|
302 |
+
);
|
303 |
+
|
304 |
+
if (NextendSocialLogin::$settings->get('store_name') == 1) {
|
305 |
+
$name = $this->getAuthUserData('name');
|
306 |
+
if (!empty($name)) {
|
307 |
+
$user_data['display_name'] = $name;
|
308 |
+
}
|
309 |
+
|
310 |
+
$first_name = $this->getAuthUserData('first_name');
|
311 |
+
if (!empty($first_name)) {
|
312 |
+
$user_data['first_name'] = $first_name;
|
313 |
+
}
|
314 |
+
|
315 |
+
$last_name = $this->getAuthUserData('last_name');
|
316 |
+
if (!empty($last_name)) {
|
317 |
+
$user_data['last_name'] = $last_name;
|
318 |
+
}
|
319 |
+
}
|
320 |
+
|
321 |
+
//Prevent sending the Woocommerce User Email Verification notification if Login restriction is turned off.
|
322 |
+
if (class_exists('XLWUEV_Core', false) && !$loginRestriction) {
|
323 |
+
remove_action('user_register', array(
|
324 |
+
XLWUEV_Woocommerce_Confirmation_Email_Public::instance(),
|
325 |
+
'custom_form_user_register'
|
326 |
+
), 10);
|
327 |
+
remove_action('woocommerce_created_customer_notification', array(
|
328 |
+
XLWUEV_Woocommerce_Confirmation_Email_Public::instance(),
|
329 |
+
'new_user_registration_from_registration_form'
|
330 |
+
), 10);
|
331 |
+
}
|
332 |
+
|
333 |
+
|
334 |
+
$error = wp_insert_user($user_data);
|
335 |
+
|
336 |
+
if (is_wp_error($error)) {
|
337 |
+
|
338 |
+
Notices::addError($error);
|
339 |
+
$this->redirectToLastLocationLogin();
|
340 |
+
|
341 |
+
} else if ($error === 0) {
|
342 |
+
$this->registerError();
|
343 |
+
exit;
|
344 |
+
}
|
345 |
+
|
346 |
+
//registerComplete will log in user and redirects. If we reach here, the user creation failed.
|
347 |
+
return false;
|
348 |
+
}
|
349 |
+
|
350 |
+
/**
|
351 |
+
* By setting the default_password_nag to true, will inform the user about random password usage.
|
352 |
+
*/
|
353 |
+
public function registerCompleteDefaultPasswordNag($user_id) {
|
354 |
+
update_user_option($user_id, 'default_password_nag', true, true);
|
355 |
+
}
|
356 |
+
|
357 |
+
|
358 |
+
/**
|
359 |
+
* @param $user_id
|
360 |
+
* Retrieves the name, first_name, last_name and update the user data.
|
361 |
+
* Also set a reminder to change the generated password.
|
362 |
+
* Links the user with the provider. Set their roles. Send notification about the registration to the selected
|
363 |
+
* roles. Logs the user in.
|
364 |
+
*
|
365 |
+
* @return bool
|
366 |
+
*/
|
367 |
+
public function registerComplete($user_id) {
|
368 |
+
if (is_wp_error($user_id) || $user_id === 0) {
|
369 |
+
/** Registration failed */
|
370 |
+
$this->registerError();
|
371 |
+
|
372 |
+
return false;
|
373 |
+
}
|
374 |
+
|
375 |
+
if (class_exists('WooCommerce', false)) {
|
376 |
+
if (NextendSocialLogin::$settings->get('store_name') == 1) {
|
377 |
+
$first_name = $this->getAuthUserData('first_name');
|
378 |
+
if (!empty($first_name)) {
|
379 |
+
add_user_meta($user_id, 'billing_first_name', $first_name);
|
380 |
+
}
|
381 |
+
|
382 |
+
$last_name = $this->getAuthUserData('last_name');
|
383 |
+
if (!empty($last_name)) {
|
384 |
+
add_user_meta($user_id, 'billing_last_name', $last_name);
|
385 |
+
}
|
386 |
+
}
|
387 |
+
}
|
388 |
+
|
389 |
+
update_user_option($user_id, 'default_password_nag', true, true);
|
390 |
+
|
391 |
+
$this->provider->linkUserToProviderIdentifier($user_id, $this->getAuthUserData('id'), true);
|
392 |
+
|
393 |
+
do_action('nsl_registration_store_extra_input', $user_id, $this->userExtraData);
|
394 |
+
|
395 |
+
do_action('nsl_register_new_user', $user_id, $this->provider);
|
396 |
+
do_action('nsl_' . $this->provider->getId() . '_register_new_user', $user_id, $this->provider);
|
397 |
+
|
398 |
+
$this->provider->deleteLoginPersistentData();
|
399 |
+
|
400 |
+
do_action('register_new_user', $user_id);
|
401 |
+
|
402 |
+
//BuddyPress - add register activity to accounts registered with social login
|
403 |
+
if (class_exists('BuddyPress', false)) {
|
404 |
+
if (!function_exists('bp_core_new_user_activity')) {
|
405 |
+
require_once(buddypress()->plugin_dir . '/bp-members/bp-members-activity.php');
|
406 |
+
}
|
407 |
+
bp_core_new_user_activity($user_id);
|
408 |
+
}
|
409 |
+
|
410 |
+
/*Ultimate Member Registration integration -> Registration notificationhoz*/
|
411 |
+
$loginRestriction = NextendSocialLogin::$settings->get('login_restriction');
|
412 |
+
if (class_exists('UM', false) && $loginRestriction) {
|
413 |
+
//Necessary to clear the UM user cache that was generated by: um\core\User:set_gravatar
|
414 |
+
UM()
|
415 |
+
->user()
|
416 |
+
->remove_cache($user_id);
|
417 |
+
add_filter('um_get_current_page_url', array(
|
418 |
+
$this,
|
419 |
+
'um_get_loginpage'
|
420 |
+
));
|
421 |
+
do_action('um_user_register', $user_id, array());
|
422 |
+
}
|
423 |
+
|
424 |
+
|
425 |
+
//Woocommerce User Email Verification integration - By default it blocks login with NSL
|
426 |
+
if (class_exists('XLWUEV_Core', false) && !$loginRestriction) {
|
427 |
+
update_user_meta($user_id, 'wcemailverified', 'true');
|
428 |
+
}
|
429 |
+
|
430 |
+
$this->login($user_id);
|
431 |
+
|
432 |
+
return true;
|
433 |
+
}
|
434 |
+
|
435 |
+
|
436 |
+
private function registerError() {
|
437 |
+
/** @var $wpdb WPDB */ global $wpdb;
|
438 |
+
|
439 |
+
$isDebug = NextendSocialLogin::$settings->get('debug') == 1;
|
440 |
+
if ($isDebug) {
|
441 |
+
if ($wpdb->last_error !== '') {
|
442 |
+
echo "<div id='error'><p class='wpdberror'><strong>WordPress database error:</strong> [" . esc_html($wpdb->last_error) . "]<br /><code>" . esc_html($wpdb->last_query) . "</code></p></div>";
|
443 |
+
}
|
444 |
+
}
|
445 |
+
|
446 |
+
$this->provider->deleteLoginPersistentData();
|
447 |
+
|
448 |
+
if ($isDebug) {
|
449 |
+
exit;
|
450 |
+
}
|
451 |
+
}
|
452 |
+
|
453 |
+
protected function login($user_id) {
|
454 |
+
/** @var $wpdb WPDB */ global $wpdb;
|
455 |
+
|
456 |
+
$loginRestriction = NextendSocialLogin::$settings->get('login_restriction');
|
457 |
+
if ($loginRestriction) {
|
458 |
+
$user = new WP_User($user_id);
|
459 |
+
$user = apply_filters('authenticate', $user, $user->get('user_login'), null);
|
460 |
+
if (is_wp_error($user)) {
|
461 |
+
Notices::addError($user);
|
462 |
+
$this->provider->redirectToLoginForm();
|
463 |
+
|
464 |
+
return $user;
|
465 |
+
}
|
466 |
+
|
467 |
+
/**
|
468 |
+
* Other plugins use this hook to prevent log in
|
469 |
+
*/
|
470 |
+
$user = apply_filters('wp_authenticate_user', $user, null);
|
471 |
+
if (is_wp_error($user)) {
|
472 |
+
Notices::addError($user);
|
473 |
+
$this->provider->redirectToLoginForm();
|
474 |
+
|
475 |
+
return $user;
|
476 |
+
}
|
477 |
+
}
|
478 |
+
|
479 |
+
|
480 |
+
$this->user_id = $user_id;
|
481 |
+
|
482 |
+
add_action('nsl_' . $this->provider->getId() . '_login', array(
|
483 |
+
$this->provider,
|
484 |
+
'syncProfile'
|
485 |
+
), 10, 3);
|
486 |
+
|
487 |
+
$isLoginAllowed = apply_filters('nsl_' . $this->provider->getId() . '_is_login_allowed', true, $this->provider, $user_id);
|
488 |
+
|
489 |
+
if ($isLoginAllowed) {
|
490 |
+
|
491 |
+
wp_set_current_user($user_id);
|
492 |
+
|
493 |
+
$secure_cookie = is_ssl();
|
494 |
+
$secure_cookie = apply_filters('secure_signon_cookie', $secure_cookie, array());
|
495 |
+
global $auth_secure_cookie; // XXX ugly hack to pass this to wp_authenticate_cookie
|
496 |
+
|
497 |
+
$auth_secure_cookie = $secure_cookie;
|
498 |
+
wp_set_auth_cookie($user_id, true, $secure_cookie);
|
499 |
+
$user_info = get_userdata($user_id);
|
500 |
+
|
501 |
+
$this->provider->logLoginDate($user_id);
|
502 |
+
|
503 |
+
$addStrongerRedirect = NextendSocialLogin::$settings->get('redirect_prevent_external') == 1 || $this->provider->hasFixedRedirect();
|
504 |
+
if ($addStrongerRedirect) {
|
505 |
+
/**
|
506 |
+
* If another plugin tries to redirect in wp_login action, we will intercept and use our redirects
|
507 |
+
*/
|
508 |
+
add_filter('wp_redirect', array(
|
509 |
+
$this,
|
510 |
+
'wp_redirect_filter'
|
511 |
+
), 10000000);
|
512 |
+
}
|
513 |
+
|
514 |
+
do_action('wp_login', $user_info->user_login, $user_info);
|
515 |
+
|
516 |
+
if ($addStrongerRedirect) {
|
517 |
+
/**
|
518 |
+
* Remove redirect interception when not needed anymore
|
519 |
+
*/
|
520 |
+
remove_filter('wp_redirect', array(
|
521 |
+
$this,
|
522 |
+
'wp_redirect_filter'
|
523 |
+
), 10000000);
|
524 |
+
}
|
525 |
+
|
526 |
+
$this->finishLogin();
|
527 |
+
}
|
528 |
+
|
529 |
+
$this->provider->redirectToLoginForm();
|
530 |
+
}
|
531 |
+
|
532 |
+
public function wp_redirect_filter($redirect) {
|
533 |
+
$this->finishLogin();
|
534 |
+
exit;
|
535 |
+
}
|
536 |
+
|
537 |
+
protected function finishLogin() {
|
538 |
+
|
539 |
+
do_action('nsl_login', $this->user_id, $this->provider);
|
540 |
+
do_action('nsl_' . $this->provider->getId() . '_login', $this->user_id, $this->provider, $this->access_token);
|
541 |
+
|
542 |
+
$this->redirectToLastLocationLogin();
|
543 |
+
}
|
544 |
+
|
545 |
+
/**
|
546 |
+
* Redirect the user to
|
547 |
+
* -the Fixed redirect url if it is set
|
548 |
+
* -where the login happened if redirect is specified in the url
|
549 |
+
* -the Default redirect url if it is set, and if redirect was not specified in the url
|
550 |
+
*/
|
551 |
+
public function redirectToLastLocationLogin() {
|
552 |
+
|
553 |
+
if (NextendSocialLogin::$settings->get('redirect_prevent_external') == 0) {
|
554 |
+
add_filter('nsl_' . $this->provider->getId() . 'default_last_location_redirect', array(
|
555 |
+
$this,
|
556 |
+
'loginLastLocationRedirect'
|
557 |
+
), 9, 2);
|
558 |
+
}
|
559 |
+
|
560 |
+
$this->provider->redirectToLastLocation();
|
561 |
+
}
|
562 |
+
|
563 |
+
/**
|
564 |
+
* @param $redirect_to
|
565 |
+
* @param $requested_redirect_to
|
566 |
+
* Modifies where the user shall be redirected, after successful login.
|
567 |
+
*
|
568 |
+
* @return mixed|void
|
569 |
+
*/
|
570 |
+
public function loginLastLocationRedirect($redirect_to, $requested_redirect_to) {
|
571 |
+
return apply_filters('login_redirect', $redirect_to, $requested_redirect_to, wp_get_current_user());
|
572 |
+
}
|
573 |
+
|
574 |
+
/**
|
575 |
+
* @param $user_id
|
576 |
+
* @param $providerUserID
|
577 |
+
* If autoLink is enabled, it links the current account with the provider.
|
578 |
+
*
|
579 |
+
* @return bool
|
580 |
+
*/
|
581 |
+
public function autoLink($user_id, $providerUserID) {
|
582 |
+
|
583 |
+
$isAutoLinkAllowed = true;
|
584 |
+
$isAutoLinkAllowed = apply_filters('nsl_' . $this->provider->getId() . '_auto_link_allowed', $isAutoLinkAllowed, $this->provider, $user_id);
|
585 |
+
if ($isAutoLinkAllowed) {
|
586 |
+
return $this->provider->linkUserToProviderIdentifier($user_id, $providerUserID);
|
587 |
+
}
|
588 |
+
|
589 |
+
return false;
|
590 |
+
}
|
591 |
+
|
592 |
+
/**
|
593 |
+
* @return NextendSocialProvider
|
594 |
+
*/
|
595 |
+
public function getProvider() {
|
596 |
+
return $this->provider;
|
597 |
+
}
|
598 |
+
|
599 |
+
/**
|
600 |
+
* @param $userData
|
601 |
+
*
|
602 |
+
* @return array
|
603 |
+
* @throws NSLContinuePageRenderException
|
604 |
+
*/
|
605 |
+
public function finalizeUserData($userData) {
|
606 |
+
|
607 |
+
$data = new NextendSocialUserData($userData, $this, $this->provider);
|
608 |
+
|
609 |
+
return $data->toArray();
|
610 |
+
}
|
611 |
+
|
612 |
+
public function require_extra_input_terms($askExtraData) {
|
613 |
+
|
614 |
+
add_action('nsl_registration_form_end', array(
|
615 |
+
$this,
|
616 |
+
'registration_form_terms'
|
617 |
+
), 10000);
|
618 |
+
|
619 |
+
return true;
|
620 |
+
}
|
621 |
+
|
622 |
+
public function registration_form_terms($userData) {
|
623 |
+
?>
|
624 |
+
<p>
|
625 |
+
<?php
|
626 |
+
$terms = $this->provider->settings->get('terms');
|
627 |
+
|
628 |
+
if (empty($terms)) {
|
629 |
+
$terms = NextendSocialLogin::$settings->get('terms');
|
630 |
+
}
|
631 |
+
|
632 |
+
if (function_exists('get_privacy_policy_url')) {
|
633 |
+
$terms = str_replace('#privacy_policy_url', get_privacy_policy_url(), $terms);
|
634 |
+
}
|
635 |
+
|
636 |
+
echo __($terms, 'nextend-facebook-connect');
|
637 |
+
|
638 |
+
?>
|
639 |
+
</p>
|
640 |
+
<?php
|
641 |
+
}
|
642 |
+
|
643 |
+
public function syncProfileUser($user_id) {
|
644 |
+
$this->provider->syncProfile($user_id, $this->provider, $this->access_token);
|
645 |
+
}
|
646 |
+
|
647 |
+
public function um_get_loginpage($page_url) {
|
648 |
+
return um_get_core_page('login');
|
649 |
+
}
|
650 |
}
|
includes/userData.php
CHANGED
@@ -1,281 +1,285 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
private $
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
*
|
23 |
-
*
|
24 |
-
* @param $
|
25 |
-
*
|
26 |
-
* @
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
$this->
|
33 |
-
|
34 |
-
$
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
$this->
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
}
|
239 |
-
|
240 |
-
public function
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
}
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
if (!empty($
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
|
|
|
|
|
|
|
|
281 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use NSL\Notices;
|
4 |
+
|
5 |
+
class NextendSocialUserData {
|
6 |
+
|
7 |
+
/** @var array */
|
8 |
+
private $userData;
|
9 |
+
|
10 |
+
/** @var NextendSocialUser */
|
11 |
+
private $socialUser;
|
12 |
+
|
13 |
+
/** @var NextendSocialProvider */
|
14 |
+
private $provider;
|
15 |
+
|
16 |
+
/** @var WP_Error */
|
17 |
+
private $errors;
|
18 |
+
|
19 |
+
private $isCustomRegisterFlow = false;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* NextendSocialUserData constructor.
|
23 |
+
*
|
24 |
+
* @param $userData
|
25 |
+
* @param $socialUser
|
26 |
+
* @param $provider
|
27 |
+
*
|
28 |
+
* @throws NSLContinuePageRenderException
|
29 |
+
*/
|
30 |
+
public function __construct($userData, $socialUser, $provider) {
|
31 |
+
|
32 |
+
$this->userData = $userData;
|
33 |
+
$this->socialUser = $socialUser;
|
34 |
+
$this->provider = $provider;
|
35 |
+
|
36 |
+
$askExtraData = apply_filters('nsl_registration_require_extra_input', false, $this->userData);
|
37 |
+
|
38 |
+
if ($askExtraData) {
|
39 |
+
$registerFlowPage = NextendSocialLogin::getRegisterFlowPage();
|
40 |
+
if ($registerFlowPage !== false) {
|
41 |
+
if (!is_page($registerFlowPage)) {
|
42 |
+
wp_redirect(add_query_arg(array(
|
43 |
+
'loginSocial' => $this->provider->getId()
|
44 |
+
), get_permalink($registerFlowPage)));
|
45 |
+
exit;
|
46 |
+
}
|
47 |
+
$this->isCustomRegisterFlow = true;
|
48 |
+
|
49 |
+
} else if (NextendSocialLogin::$WPLoginCurrentView == 'login' && get_option('users_can_register')) {
|
50 |
+
wp_redirect(add_query_arg(array(
|
51 |
+
'loginSocial' => $this->provider->getId()
|
52 |
+
), NextendSocialLogin::getRegisterUrl()));
|
53 |
+
exit;
|
54 |
+
}
|
55 |
+
|
56 |
+
$this->errors = new WP_Error();
|
57 |
+
|
58 |
+
$this->userData = apply_filters('nsl_registration_validate_extra_input', $this->userData, $this->errors);
|
59 |
+
|
60 |
+
/**
|
61 |
+
* It is not a submit or there is an error
|
62 |
+
*/
|
63 |
+
if (!$this->isPost() || $this->errors->get_error_code() != '') {
|
64 |
+
$this->displayForm();
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
$this->errors = new WP_Error();
|
69 |
+
$this->userData = apply_filters('nsl_registration_user_data', $this->userData, $this->provider, $this->errors);
|
70 |
+
|
71 |
+
if ($this->errors->get_error_code() != '') {
|
72 |
+
$this->provider->deleteLoginPersistentData();
|
73 |
+
if ($this->errors->get_error_message() != '') {
|
74 |
+
Notices::addError($this->errors->get_error_message());
|
75 |
+
}
|
76 |
+
|
77 |
+
wp_redirect(site_url('wp-login.php'));
|
78 |
+
exit();
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
public function toArray() {
|
83 |
+
return $this->userData;
|
84 |
+
}
|
85 |
+
|
86 |
+
public function isPost() {
|
87 |
+
return isset($_POST['submit']);
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* @throws NSLContinuePageRenderException
|
92 |
+
*/
|
93 |
+
public function displayForm() {
|
94 |
+
NextendSocialLogin::removeLoginFormAssets();
|
95 |
+
|
96 |
+
if ($this->isCustomRegisterFlow) {
|
97 |
+
add_shortcode('nextend_social_login_register_flow', array(
|
98 |
+
$this,
|
99 |
+
'customRegisterFlowShortcode'
|
100 |
+
));
|
101 |
+
throw new NSLContinuePageRenderException('CUSTOM_REGISTER_FLOW');
|
102 |
+
} else {
|
103 |
+
|
104 |
+
if (!function_exists('login_header')) {
|
105 |
+
|
106 |
+
if (NextendSocialLogin::$WPLoginCurrentView == 'register-bp') {
|
107 |
+
|
108 |
+
if (class_exists('NextendSocialLoginPRO', false)) {
|
109 |
+
remove_action('bp_before_account_details_fields', 'NextendSocialLoginPRO::bp_register_form');
|
110 |
+
remove_action('bp_before_register_page', 'NextendSocialLoginPRO::bp_register_form');
|
111 |
+
remove_action('bp_after_register_page', 'NextendSocialLoginPRO::bp_register_form');
|
112 |
+
}
|
113 |
+
|
114 |
+
add_action('bp_before_register_page', array(
|
115 |
+
$this,
|
116 |
+
'bp_before_register_page'
|
117 |
+
));
|
118 |
+
|
119 |
+
add_action('bp_after_register_page', array(
|
120 |
+
$this,
|
121 |
+
'bp_after_register_page'
|
122 |
+
));
|
123 |
+
|
124 |
+
throw new NSLContinuePageRenderException('BuddyPress');
|
125 |
+
} else if (defined('THEME_MY_LOGIN_PATH')) {
|
126 |
+
add_shortcode('theme-my-login', array(
|
127 |
+
$this,
|
128 |
+
'render_registration_form_tml'
|
129 |
+
));
|
130 |
+
|
131 |
+
throw new NSLContinuePageRenderException('THEME_MY_LOGIN');
|
132 |
+
}
|
133 |
+
|
134 |
+
require_once(dirname(__FILE__) . '/compat-wp-login.php');
|
135 |
+
}
|
136 |
+
|
137 |
+
login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site!') . '</p>', $this->errors);
|
138 |
+
|
139 |
+
echo $this->render_registration_form();
|
140 |
+
|
141 |
+
login_footer('user_login');
|
142 |
+
exit;
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
public function customRegisterFlowShortcode() {
|
147 |
+
$errors = $this->errors;
|
148 |
+
if (is_wp_error($errors)) {
|
149 |
+
$html = array();
|
150 |
+
if ($errors->get_error_messages()) {
|
151 |
+
foreach ($errors->get_error_messages() as $error) {
|
152 |
+
$html[] = '<div class="error">' . $error . '</div>';
|
153 |
+
}
|
154 |
+
}
|
155 |
+
if (!empty($html)) {
|
156 |
+
echo '<style>.nsl-messages .error{background-color: #e2401c;border-left: .6180469716em solid rgba(0,0,0,.15);padding: 1em 1.618em;margin-bottom: 2.617924em;color:#fff;}</style>';
|
157 |
+
echo '<div class="nsl-messages">' . implode('', $html) . '</div>';
|
158 |
+
}
|
159 |
+
}
|
160 |
+
$this->errors = array();
|
161 |
+
|
162 |
+
return $this->render_registration_form();
|
163 |
+
}
|
164 |
+
|
165 |
+
public function render_registration_form() {
|
166 |
+
if ($this->isCustomRegisterFlow) {
|
167 |
+
$postUrl = add_query_arg(array(
|
168 |
+
'loginSocial' => $this->provider->getId()
|
169 |
+
), get_permalink(NextendSocialLogin::getRegisterFlowPage()));
|
170 |
+
} else if (strpos(NextendSocialLogin::$WPLoginCurrentView, 'register') === 0) {
|
171 |
+
$postUrl = add_query_arg(array(
|
172 |
+
'loginSocial' => $this->provider->getId()
|
173 |
+
), NextendSocialLogin::getRegisterUrl());
|
174 |
+
} else {
|
175 |
+
$postUrl = add_query_arg('loginSocial', $this->provider->getId(), NextendSocialLogin::getLoginUrl('login_post'));
|
176 |
+
}
|
177 |
+
ob_start();
|
178 |
+
?>
|
179 |
+
<form name="registerform" id="registerform" action="<?php echo esc_url($postUrl); ?>" method="post">
|
180 |
+
<input type="hidden" name="submit" value="1"/>
|
181 |
+
|
182 |
+
<?php do_action('nsl_registration_form_start', $this->userData, $this->provider); ?>
|
183 |
+
|
184 |
+
<?php do_action('nsl_registration_form_end', $this->userData, $this->provider); ?>
|
185 |
+
|
186 |
+
<br class="clear"/>
|
187 |
+
<p class="submit"><input type="submit" name="wp-submit" id="wp-submit"
|
188 |
+
class="button button-primary button-large" value="<?php esc_attr_e('Register'); ?>"/>
|
189 |
+
</p>
|
190 |
+
</form>
|
191 |
+
<?php
|
192 |
+
return ob_get_clean();
|
193 |
+
}
|
194 |
+
|
195 |
+
public function render_registration_form_tml() {
|
196 |
+
ob_start();
|
197 |
+
?>
|
198 |
+
<div class="tml tml-register" id="theme-my-login">
|
199 |
+
<?php
|
200 |
+
$registerMessage = Theme_My_Login_Template::get_action_template_message('register');
|
201 |
+
if (!empty($registerMessage)) {
|
202 |
+
$before_message = '<p class="message">';
|
203 |
+
$after_message = '</p>';
|
204 |
+
echo $before_message . $registerMessage . $after_message;
|
205 |
+
}
|
206 |
+
|
207 |
+
$wp_error = $this->errors;
|
208 |
+
if (is_wp_error($wp_error)) {
|
209 |
+
if ($wp_error->get_error_code()) {
|
210 |
+
$errors = '';
|
211 |
+
$messages = '';
|
212 |
+
foreach ($wp_error->get_error_codes() as $code) {
|
213 |
+
$severity = $wp_error->get_error_data($code);
|
214 |
+
foreach ($wp_error->get_error_messages($code) as $error) {
|
215 |
+
if ('message' == $severity) {
|
216 |
+
$messages .= ' ' . $error . "<br />\n";
|
217 |
+
} else {
|
218 |
+
$errors .= ' ' . $error . "<br />\n";
|
219 |
+
}
|
220 |
+
}
|
221 |
+
}
|
222 |
+
if (!empty($errors)) {
|
223 |
+
echo '<p class="error">' . apply_filters('login_errors', $errors) . "</p>\n";
|
224 |
+
}
|
225 |
+
if (!empty($messages)) {
|
226 |
+
echo '<p class="message">' . apply_filters('login_messages', $messages) . "</p>\n";
|
227 |
+
}
|
228 |
+
}
|
229 |
+
}
|
230 |
+
$this->errors = array();
|
231 |
+
|
232 |
+
|
233 |
+
echo $this->render_registration_form();
|
234 |
+
?>
|
235 |
+
</div>
|
236 |
+
<?php
|
237 |
+
return ob_get_clean();
|
238 |
+
}
|
239 |
+
|
240 |
+
public function bp_before_register_page() {
|
241 |
+
ob_start();
|
242 |
+
}
|
243 |
+
|
244 |
+
public function bp_after_register_page() {
|
245 |
+
ob_end_clean();
|
246 |
+
|
247 |
+
$wp_error = $this->errors;
|
248 |
+
if (is_wp_error($wp_error)) {
|
249 |
+
if ($wp_error->get_error_code()) {
|
250 |
+
$errors = '';
|
251 |
+
$messages = '';
|
252 |
+
foreach ($wp_error->get_error_codes() as $code) {
|
253 |
+
$severity = $wp_error->get_error_data($code);
|
254 |
+
foreach ($wp_error->get_error_messages($code) as $error) {
|
255 |
+
if ('message' == $severity) {
|
256 |
+
$messages .= ' ' . $error . "<br />\n";
|
257 |
+
} else {
|
258 |
+
$errors .= ' ' . $error . "<br />\n";
|
259 |
+
}
|
260 |
+
}
|
261 |
+
}
|
262 |
+
$html = '';
|
263 |
+
if (!empty($errors)) {
|
264 |
+
$html .= '<div class="error">' . apply_filters('login_errors', $errors) . "</div>\n";
|
265 |
+
}
|
266 |
+
if (!empty($messages)) {
|
267 |
+
$html .= '<div class="message">' . apply_filters('login_messages', $messages) . "</div>\n";
|
268 |
+
}
|
269 |
+
|
270 |
+
if (!empty($html)) {
|
271 |
+
?>
|
272 |
+
<div id="signup_form" class="standard-form">
|
273 |
+
<div>
|
274 |
+
<?php echo $html; ?>
|
275 |
+
</div>
|
276 |
+
</div>
|
277 |
+
<?php
|
278 |
+
}
|
279 |
+
}
|
280 |
+
}
|
281 |
+
$this->errors = array();
|
282 |
+
|
283 |
+
echo $this->render_registration_form();
|
284 |
+
}
|
285 |
}
|
js/nsl.js
CHANGED
@@ -1,220 +1,232 @@
|
|
1 |
-
window.
|
2 |
-
var userAgent = navigator.userAgent,
|
3 |
-
mobile = function () {
|
4 |
-
return /\b(iPhone|iP[ao]d)/.test(userAgent) ||
|
5 |
-
/\b(iP[ao]d)/.test(userAgent) ||
|
6 |
-
/Android/i.test(userAgent) ||
|
7 |
-
/Mobile/i.test(userAgent);
|
8 |
-
},
|
9 |
-
screenX = window.screenX !== undefined ? window.screenX : window.screenLeft,
|
10 |
-
screenY = window.screenY !== undefined ? window.screenY : window.screenTop,
|
11 |
-
outerWidth = window.outerWidth !== undefined ? window.outerWidth : document.documentElement.clientWidth,
|
12 |
-
outerHeight = window.outerHeight !== undefined ? window.outerHeight : document.documentElement.clientHeight - 22,
|
13 |
-
targetWidth = mobile() ? null : w,
|
14 |
-
targetHeight = mobile() ? null : h,
|
15 |
-
V = screenX < 0 ? window.screen.width + screenX : screenX,
|
16 |
-
left = parseInt(V + (outerWidth - targetWidth) / 2, 10),
|
17 |
-
right = parseInt(screenY + (outerHeight - targetHeight) / 2.5, 10),
|
18 |
-
features = [];
|
19 |
-
if (targetWidth !== null) {
|
20 |
-
features.push('width=' + targetWidth);
|
21 |
-
}
|
22 |
-
if (targetHeight !== null) {
|
23 |
-
features.push('height=' + targetHeight);
|
24 |
-
}
|
25 |
-
features.push('left=' + left);
|
26 |
-
features.push('top=' + right);
|
27 |
-
features.push('scrollbars=1');
|
28 |
-
|
29 |
-
var newWindow = window.open(url, title, features.join(','));
|
30 |
-
|
31 |
-
if (window.focus) {
|
32 |
-
newWindow.focus();
|
33 |
-
}
|
34 |
-
|
35 |
-
return newWindow;
|
36 |
-
};
|
37 |
-
|
38 |
-
var isWebView = null;
|
39 |
-
|
40 |
-
function checkWebView() {
|
41 |
-
if (isWebView === null) {
|
42 |
-
function _detectOS(ua) {
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
}
|
157 |
-
|
158 |
-
var
|
159 |
-
var
|
160 |
-
var
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
}
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
href
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
if (
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
});
|
1 |
+
window.NSLPopup = function (url, title, w, h) {
|
2 |
+
var userAgent = navigator.userAgent,
|
3 |
+
mobile = function () {
|
4 |
+
return /\b(iPhone|iP[ao]d)/.test(userAgent) ||
|
5 |
+
/\b(iP[ao]d)/.test(userAgent) ||
|
6 |
+
/Android/i.test(userAgent) ||
|
7 |
+
/Mobile/i.test(userAgent);
|
8 |
+
},
|
9 |
+
screenX = window.screenX !== undefined ? window.screenX : window.screenLeft,
|
10 |
+
screenY = window.screenY !== undefined ? window.screenY : window.screenTop,
|
11 |
+
outerWidth = window.outerWidth !== undefined ? window.outerWidth : document.documentElement.clientWidth,
|
12 |
+
outerHeight = window.outerHeight !== undefined ? window.outerHeight : document.documentElement.clientHeight - 22,
|
13 |
+
targetWidth = mobile() ? null : w,
|
14 |
+
targetHeight = mobile() ? null : h,
|
15 |
+
V = screenX < 0 ? window.screen.width + screenX : screenX,
|
16 |
+
left = parseInt(V + (outerWidth - targetWidth) / 2, 10),
|
17 |
+
right = parseInt(screenY + (outerHeight - targetHeight) / 2.5, 10),
|
18 |
+
features = [];
|
19 |
+
if (targetWidth !== null) {
|
20 |
+
features.push('width=' + targetWidth);
|
21 |
+
}
|
22 |
+
if (targetHeight !== null) {
|
23 |
+
features.push('height=' + targetHeight);
|
24 |
+
}
|
25 |
+
features.push('left=' + left);
|
26 |
+
features.push('top=' + right);
|
27 |
+
features.push('scrollbars=1');
|
28 |
+
|
29 |
+
var newWindow = window.open(url, title, features.join(','));
|
30 |
+
|
31 |
+
if (window.focus) {
|
32 |
+
newWindow.focus();
|
33 |
+
}
|
34 |
+
|
35 |
+
return newWindow;
|
36 |
+
};
|
37 |
+
|
38 |
+
var isWebView = null;
|
39 |
+
|
40 |
+
function checkWebView() {
|
41 |
+
if (isWebView === null) {
|
42 |
+
function _detectOS(ua) {
|
43 |
+
if (/Android/.test(ua)) {
|
44 |
+
return "Android";
|
45 |
+
} else if (/iPhone|iPad|iPod/.test(ua)) {
|
46 |
+
return "iOS";
|
47 |
+
} else if (/Windows/.test(ua)) {
|
48 |
+
return "Windows";
|
49 |
+
} else if (/Mac OS X/.test(ua)) {
|
50 |
+
return "Mac";
|
51 |
+
} else if (/CrOS/.test(ua)) {
|
52 |
+
return "Chrome OS";
|
53 |
+
} else if (/Firefox/.test(ua)) {
|
54 |
+
return "Firefox OS";
|
55 |
+
}
|
56 |
+
return "";
|
57 |
+
}
|
58 |
+
|
59 |
+
function _detectBrowser(ua) {
|
60 |
+
var android = /Android/.test(ua);
|
61 |
+
|
62 |
+
if (/CriOS/.test(ua)) {
|
63 |
+
return "Chrome for iOS";
|
64 |
+
} else if (/Edge/.test(ua)) {
|
65 |
+
return "Edge";
|
66 |
+
} else if (android && /Silk\//.test(ua)) {
|
67 |
+
return "Silk";
|
68 |
+
} else if (/Chrome/.test(ua)) {
|
69 |
+
return "Chrome";
|
70 |
+
} else if (/Firefox/.test(ua)) {
|
71 |
+
return "Firefox";
|
72 |
+
} else if (android) {
|
73 |
+
return "AOSP";
|
74 |
+
} else if (/MSIE|Trident/.test(ua)) {
|
75 |
+
return "IE";
|
76 |
+
} else if (/Safari\//.test(ua)) {
|
77 |
+
return "Safari";
|
78 |
+
} else if (/AppleWebKit/.test(ua)) {
|
79 |
+
return "WebKit";
|
80 |
+
}
|
81 |
+
return "";
|
82 |
+
}
|
83 |
+
|
84 |
+
function _detectBrowserVersion(ua, browser) {
|
85 |
+
if (browser === "Chrome for iOS") {
|
86 |
+
return _getVersion(ua, "CriOS/");
|
87 |
+
} else if (browser === "Edge") {
|
88 |
+
return _getVersion(ua, "Edge/");
|
89 |
+
} else if (browser === "Chrome") {
|
90 |
+
return _getVersion(ua, "Chrome/");
|
91 |
+
} else if (browser === "Firefox") {
|
92 |
+
return _getVersion(ua, "Firefox/");
|
93 |
+
} else if (browser === "Silk") {
|
94 |
+
return _getVersion(ua, "Silk/");
|
95 |
+
} else if (browser === "AOSP") {
|
96 |
+
return _getVersion(ua, "Version/");
|
97 |
+
} else if (browser === "IE") {
|
98 |
+
return /IEMobile/.test(ua) ? _getVersion(ua, "IEMobile/") :
|
99 |
+
/MSIE/.test(ua) ? _getVersion(ua, "MSIE ")
|
100 |
+
:
|
101 |
+
_getVersion(ua, "rv:");
|
102 |
+
} else if (browser === "Safari") {
|
103 |
+
return _getVersion(ua, "Version/");
|
104 |
+
} else if (browser === "WebKit") {
|
105 |
+
return _getVersion(ua, "WebKit/");
|
106 |
+
}
|
107 |
+
return "0.0.0";
|
108 |
+
}
|
109 |
+
|
110 |
+
function _getVersion(ua, token) {
|
111 |
+
try {
|
112 |
+
return _normalizeSemverString(ua.split(token)[1].trim().split(/[^\w\.]/)[0]);
|
113 |
+
} catch (o_O) {
|
114 |
+
}
|
115 |
+
return "0.0.0";
|
116 |
+
}
|
117 |
+
|
118 |
+
function _normalizeSemverString(version) {
|
119 |
+
var ary = version.split(/[\._]/);
|
120 |
+
return (parseInt(ary[0], 10) || 0) + "." +
|
121 |
+
(parseInt(ary[1], 10) || 0) + "." +
|
122 |
+
(parseInt(ary[2], 10) || 0);
|
123 |
+
}
|
124 |
+
|
125 |
+
function _isWebView(ua, os, browser, version, options) {
|
126 |
+
switch (os + browser) {
|
127 |
+
case "iOSSafari":
|
128 |
+
return false;
|
129 |
+
case "iOSWebKit":
|
130 |
+
return _isWebView_iOS(options);
|
131 |
+
case "AndroidAOSP":
|
132 |
+
return false;
|
133 |
+
case "AndroidChrome":
|
134 |
+
return parseFloat(version) >= 42 ? /; wv/.test(ua) : /\d{2}\.0\.0/.test(version) ? true : _isWebView_Android(options);
|
135 |
+
}
|
136 |
+
return false;
|
137 |
+
}
|
138 |
+
|
139 |
+
function _isWebView_iOS(options) {
|
140 |
+
var document = (window["document"] || {});
|
141 |
+
|
142 |
+
if ("WEB_VIEW" in options) {
|
143 |
+
return options["WEB_VIEW"];
|
144 |
+
}
|
145 |
+
return !("fullscreenEnabled" in document || "webkitFullscreenEnabled" in document || false);
|
146 |
+
}
|
147 |
+
|
148 |
+
function _isWebView_Android(options) {
|
149 |
+
if ("WEB_VIEW" in options) {
|
150 |
+
return options["WEB_VIEW"];
|
151 |
+
}
|
152 |
+
return !("requestFileSystem" in window || "webkitRequestFileSystem" in window || false);
|
153 |
+
}
|
154 |
+
|
155 |
+
var options = {};
|
156 |
+
var nav = window.navigator || {};
|
157 |
+
var ua = nav.userAgent || "";
|
158 |
+
var os = _detectOS(ua);
|
159 |
+
var browser = _detectBrowser(ua);
|
160 |
+
var browserVersion = _detectBrowserVersion(ua, browser);
|
161 |
+
|
162 |
+
isWebView = _isWebView(ua, os, browser, browserVersion, options);
|
163 |
+
}
|
164 |
+
|
165 |
+
return isWebView;
|
166 |
+
}
|
167 |
+
|
168 |
+
window._nsl.push(function ($) {
|
169 |
+
|
170 |
+
window.nslRedirect = function (url) {
|
171 |
+
$('<div style="position:fixed;z-index:1000000;left:0;top:0;width:100%;height:100%;"></div>').appendTo('body');
|
172 |
+
window.location = url;
|
173 |
+
};
|
174 |
+
|
175 |
+
var targetWindow = _targetWindow || 'prefer-popup',
|
176 |
+
lastPopup = false;
|
177 |
+
|
178 |
+
$(document.body).on('click', 'a[data-plugin="nsl"][data-action="connect"],a[data-plugin="nsl"][data-action="link"]', function (e) {
|
179 |
+
if (lastPopup && !lastPopup.closed) {
|
180 |
+
e.preventDefault();
|
181 |
+
lastPopup.focus();
|
182 |
+
} else {
|
183 |
+
|
184 |
+
var $target = $(this),
|
185 |
+
href = $target.attr('href'),
|
186 |
+
success = false;
|
187 |
+
if (href.indexOf('?') !== -1) {
|
188 |
+
href += '&';
|
189 |
+
} else {
|
190 |
+
href += '?';
|
191 |
+
}
|
192 |
+
var redirectTo = $target.data('redirect');
|
193 |
+
if (redirectTo === 'current') {
|
194 |
+
href += 'redirect=' + encodeURIComponent(window.location.href) + '&';
|
195 |
+
} else if (redirectTo && redirectTo !== '') {
|
196 |
+
href += 'redirect=' + encodeURIComponent(redirectTo) + '&';
|
197 |
+
}
|
198 |
+
|
199 |
+
if (targetWindow !== 'prefer-same-window' && checkWebView()) {
|
200 |
+
targetWindow = 'prefer-same-window';
|
201 |
+
}
|
202 |
+
|
203 |
+
if (targetWindow === 'prefer-popup') {
|
204 |
+
|
205 |
+
lastPopup = NSLPopup(href + 'display=popup', 'nsl-social-connect', $target.data('popupwidth'), $target.data('popupheight'));
|
206 |
+
if (lastPopup) {
|
207 |
+
success = true;
|
208 |
+
e.preventDefault();
|
209 |
+
}
|
210 |
+
} else if (targetWindow === 'prefer-new-tab') {
|
211 |
+
var newTab = window.open(href + 'display=popup', '_blank');
|
212 |
+
if (newTab) {
|
213 |
+
if (window.focus) {
|
214 |
+
newTab.focus();
|
215 |
+
}
|
216 |
+
success = true;
|
217 |
+
e.preventDefault();
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
if (!success) {
|
222 |
+
window.location = href;
|
223 |
+
e.preventDefault();
|
224 |
+
}
|
225 |
+
}
|
226 |
+
});
|
227 |
+
|
228 |
+
var googleLoginButton = $('a[data-plugin="nsl"][data-provider="google"]');
|
229 |
+
if (googleLoginButton.length && checkWebView()) {
|
230 |
+
googleLoginButton.remove();
|
231 |
+
}
|
232 |
});
|
languages/nextend-facebook-connect-nl_NL.mo
ADDED
Binary file
|
languages/nextend-facebook-connect-nl_NL.po
ADDED
@@ -0,0 +1,3138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: nextend-facebook-connect\n"
|
4 |
+
"POT-Creation-Date: 2019-04-23 12:32+0200\n"
|
5 |
+
"PO-Revision-Date: 2019-11-08 07:47+0100\n"
|
6 |
+
"Last-Translator: Erik Molenaar <info@erikmolenaar.nl>\n"
|
7 |
+
"Language-Team: nextend-facebook-connect\n"
|
8 |
+
"Language: nl_NL\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 2.2\n"
|
13 |
+
"X-Poedit-Basepath: ../..\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
17 |
+
"_n_noop:1,2;_c;_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
|
18 |
+
"esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;"
|
19 |
+
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_x:1,2c;esc_html_e\n"
|
20 |
+
"X-Poedit-Flags-xgettext: −−default-domain=nextend-facebook-connect\n"
|
21 |
+
"X-Poedit-SearchPath-0: nextend-social-login-pro\n"
|
22 |
+
"X-Poedit-SearchPath-1: nextend-facebook-connect\n"
|
23 |
+
|
24 |
+
#: nextend-facebook-connect/NSL/GDPR.php:32
|
25 |
+
msgid "What personal data we collect and why we collect it"
|
26 |
+
msgstr "Welke persoonlijke gegevens we verzamelen en waarom we deze verzamelen"
|
27 |
+
|
28 |
+
#: nextend-facebook-connect/NSL/GDPR.php:33
|
29 |
+
#, php-format
|
30 |
+
msgid ""
|
31 |
+
"%1$s collects data when a visitor register, login or link the account with "
|
32 |
+
"with any of the enabled social provider. It collects the following data: "
|
33 |
+
"email address, name, social provider identifier and access token. Also it "
|
34 |
+
"can collect profile picture and more fields with the Pro Addon's sync data "
|
35 |
+
"feature."
|
36 |
+
msgstr ""
|
37 |
+
"%1$s verzamelt gegevens wanneer een bezoeker zich registreert, zich aanmeldt "
|
38 |
+
"of het account koppelt aan een van de ingeschakelde social providers. Het "
|
39 |
+
"verzamelt de volgende gegevens: e-mailadres, naam, social provider ID en "
|
40 |
+
"toegangstoken. Ook kan het de profielfoto en meer velden verzamelen met de "
|
41 |
+
"synchronisatiegegevensfunctie van de Pro-uitbreiding."
|
42 |
+
|
43 |
+
#: nextend-facebook-connect/NSL/GDPR.php:35
|
44 |
+
msgid "Who we share your data with"
|
45 |
+
msgstr "Met wie we je gegevens delen"
|
46 |
+
|
47 |
+
#: nextend-facebook-connect/NSL/GDPR.php:36
|
48 |
+
#, php-format
|
49 |
+
msgid ""
|
50 |
+
"%1$s stores the personal data on your site and does not share it with anyone "
|
51 |
+
"except the access token which used for the authenticated communication with "
|
52 |
+
"the social providers."
|
53 |
+
msgstr ""
|
54 |
+
"%1$s slaat de persoonlijke gegevens op je site op en deelt deze met niemand "
|
55 |
+
"behalve het toegangstoken dat werd gebruikt voor de geverifieerde "
|
56 |
+
"communicatie met de social providers."
|
57 |
+
|
58 |
+
#: nextend-facebook-connect/NSL/GDPR.php:38
|
59 |
+
msgid "Does the plugin share personal data with third parties"
|
60 |
+
msgstr "Deelt de plug-in persoonlijke gegevens met derden"
|
61 |
+
|
62 |
+
#: nextend-facebook-connect/NSL/GDPR.php:39
|
63 |
+
#, php-format
|
64 |
+
msgid ""
|
65 |
+
"%1$s use the access token what the social provider gave to communicate with "
|
66 |
+
"the providers to verify account and securely access personal data."
|
67 |
+
msgstr ""
|
68 |
+
"%1$s gebruiken het toegangstoken dat de social provider heeft gegeven om met "
|
69 |
+
"de providers te communiceren om het account te verifiëren en veilig toegang "
|
70 |
+
"te krijgen tot persoonlijke gegevens."
|
71 |
+
|
72 |
+
#: nextend-facebook-connect/NSL/GDPR.php:41
|
73 |
+
msgid "How long we retain your data"
|
74 |
+
msgstr "Hoe lang wij je gegevens bewaren"
|
75 |
+
|
76 |
+
#: nextend-facebook-connect/NSL/GDPR.php:42
|
77 |
+
#, php-format
|
78 |
+
msgid ""
|
79 |
+
"%1$s removes the collected personal data when the user deleted from "
|
80 |
+
"WordPress."
|
81 |
+
msgstr ""
|
82 |
+
"%1$s verwijdert de verzamelde persoonlijke gegevens wanneer de gebruiker "
|
83 |
+
"deze heeft verwijderd uit WordPress."
|
84 |
+
|
85 |
+
#: nextend-facebook-connect/NSL/GDPR.php:44
|
86 |
+
msgid "Does the plugin use personal data collected by others?"
|
87 |
+
msgstr ""
|
88 |
+
"Gebruikt de plugin persoonlijke gegevens die door anderen zijn verzameld?"
|
89 |
+
|
90 |
+
#: nextend-facebook-connect/NSL/GDPR.php:45
|
91 |
+
#, php-format
|
92 |
+
msgid ""
|
93 |
+
"%1$s use the personal data collected by the social providers to create "
|
94 |
+
"account on your site when the visitor authorize it."
|
95 |
+
msgstr ""
|
96 |
+
"%1$s gebruiken de persoonlijke gegevens die door de social providers zijn "
|
97 |
+
"verzameld om een account op je site te maken wanneer de bezoeker deze "
|
98 |
+
"autoriseert."
|
99 |
+
|
100 |
+
#: nextend-facebook-connect/NSL/GDPR.php:47
|
101 |
+
msgid "Does the plugin store things in the browser?"
|
102 |
+
msgstr "Slaat de plugin dingen op in de browser?"
|
103 |
+
|
104 |
+
#: nextend-facebook-connect/NSL/GDPR.php:48
|
105 |
+
#, php-format
|
106 |
+
msgid ""
|
107 |
+
"Yes, %1$s must create a cookie for visitors who use the social login "
|
108 |
+
"authorization flow. This cookie required for every provider to secure the "
|
109 |
+
"communication and to redirect the user back to the last location."
|
110 |
+
msgstr ""
|
111 |
+
"Ja, %1$s moet een cookie maken voor bezoekers die gebruikmaken van het "
|
112 |
+
"Social Login autorisatieproces. Deze cookie is vereist voor elke provider om "
|
113 |
+
"de communicatie te beveiligen en de gebruiker om te leiden naar de laatste "
|
114 |
+
"locatie."
|
115 |
+
|
116 |
+
#: nextend-facebook-connect/NSL/GDPR.php:50
|
117 |
+
msgid "Does the plugin collect telemetry data, directly or indirectly?"
|
118 |
+
msgstr "Verzamelt de plug-in telemetriegegevens, direct of indirect?"
|
119 |
+
|
120 |
+
#: nextend-facebook-connect/NSL/GDPR.php:51
|
121 |
+
#: nextend-facebook-connect/NSL/GDPR.php:54
|
122 |
+
msgid "No"
|
123 |
+
msgstr "Nee"
|
124 |
+
|
125 |
+
#: nextend-facebook-connect/NSL/GDPR.php:53
|
126 |
+
msgid ""
|
127 |
+
"Does the plugin enqueue JavaScript, tracking pixels or embed iframes from a "
|
128 |
+
"third party?"
|
129 |
+
msgstr ""
|
130 |
+
"Voegt de plug-in JavaScript, trackingpixels of ingesloten iframes toe van "
|
131 |
+
"een derde partij?"
|
132 |
+
|
133 |
+
#: nextend-facebook-connect/NSL/GDPR.php:97
|
134 |
+
#: nextend-facebook-connect/admin/templates/settings/general-pro.php:55
|
135 |
+
msgid "User"
|
136 |
+
msgstr "Gebruiker"
|
137 |
+
|
138 |
+
#: nextend-facebook-connect/admin/admin.php:200
|
139 |
+
#, php-format
|
140 |
+
msgid "%s needs json_decode function."
|
141 |
+
msgstr "%s heeft de functie json_decode nodig."
|
142 |
+
|
143 |
+
#: nextend-facebook-connect/admin/admin.php:200
|
144 |
+
msgid "Please contact your server administrator and ask for solution!"
|
145 |
+
msgstr "Neem contact op met je serverbeheerder en vraag om een oplossing!"
|
146 |
+
|
147 |
+
#: nextend-facebook-connect/admin/admin.php:232
|
148 |
+
#: nextend-facebook-connect/admin/admin.php:262
|
149 |
+
msgid "Settings saved."
|
150 |
+
msgstr "Instellingen opgeslagen."
|
151 |
+
|
152 |
+
#: nextend-facebook-connect/admin/admin.php:241
|
153 |
+
msgid "The activation was successful"
|
154 |
+
msgstr "De activering was succesvol"
|
155 |
+
|
156 |
+
#: nextend-facebook-connect/admin/admin.php:252
|
157 |
+
msgid "Deactivate completed."
|
158 |
+
msgstr "Deactiveren voltooid."
|
159 |
+
|
160 |
+
#: nextend-facebook-connect/admin/admin.php:427
|
161 |
+
#: nextend-facebook-connect/admin/templates-provider/menu.php:15
|
162 |
+
#: nextend-facebook-connect/admin/templates/providers.php:81
|
163 |
+
#: nextend-facebook-connect/admin/templates/providers.php:93
|
164 |
+
#: nextend-facebook-connect/admin/templates/settings/comment.php:28
|
165 |
+
msgid "Settings"
|
166 |
+
msgstr "Instellingen"
|
167 |
+
|
168 |
+
#: nextend-facebook-connect/admin/admin.php:509
|
169 |
+
#: nextend-facebook-connect/includes/oauth2.php:139
|
170 |
+
#: nextend-facebook-connect/includes/oauth2.php:284
|
171 |
+
#: nextend-facebook-connect/providers/facebook/facebook-client.php:84
|
172 |
+
#: nextend-facebook-connect/providers/twitter/twitter-client.php:163
|
173 |
+
#, php-format
|
174 |
+
msgid "Unexpected response: %s"
|
175 |
+
msgstr "Onverwachte reactie: %s"
|
176 |
+
|
177 |
+
#: nextend-facebook-connect/admin/admin.php:570
|
178 |
+
#: nextend-facebook-connect/admin/templates/fix-redirect-uri.php:21
|
179 |
+
#, php-format
|
180 |
+
msgid ""
|
181 |
+
"%s detected that your login url changed. You must update the Oauth redirect "
|
182 |
+
"URIs in the related social applications."
|
183 |
+
msgstr ""
|
184 |
+
"%s detecteert dat je inlog-URL is gewijzigd. Je moet de Oauth-omleidings-"
|
185 |
+
"URI's bijwerken in de bijbehorende social applicatie."
|
186 |
+
|
187 |
+
#: nextend-facebook-connect/admin/admin.php:571
|
188 |
+
msgid "Fix Error"
|
189 |
+
msgstr "Fout Oplossen"
|
190 |
+
|
191 |
+
#: nextend-facebook-connect/admin/admin.php:571
|
192 |
+
msgid "Oauth Redirect URI"
|
193 |
+
msgstr "Oauth Omleidings-URI"
|
194 |
+
|
195 |
+
#: nextend-facebook-connect/admin/admin.php:581
|
196 |
+
#, php-format
|
197 |
+
msgid ""
|
198 |
+
"%1$s detected that %2$s installed on your site. You need the Pro Addon to "
|
199 |
+
"display Social Login buttons in %2$s login form!"
|
200 |
+
msgstr ""
|
201 |
+
"%1$s gedetecteerd dat %2$s op je site heeft geïnstalleerd. Je hebt de Pro "
|
202 |
+
"Add-on nodig om Social Login-knoppen weer te geven in het %2$s "
|
203 |
+
"aanmeldingsformulier!"
|
204 |
+
|
205 |
+
#: nextend-facebook-connect/admin/admin.php:582
|
206 |
+
msgid "Dismiss and check Pro Addon"
|
207 |
+
msgstr "Sluiten en vink Pro-uitbreiding aan"
|
208 |
+
|
209 |
+
#: nextend-facebook-connect/admin/admin.php:582
|
210 |
+
msgid "Dismiss"
|
211 |
+
msgstr "Sluiten"
|
212 |
+
|
213 |
+
#: nextend-facebook-connect/admin/admin.php:588
|
214 |
+
#, php-format
|
215 |
+
msgid ""
|
216 |
+
"%1$s detected that %2$s installed on your site. You must set \"<b>Page for "
|
217 |
+
"register flow</b>\" and \"<b>OAuth redirect uri proxy page</b>\" in %1$s to "
|
218 |
+
"work properly."
|
219 |
+
msgstr ""
|
220 |
+
"%1$s gedetecteerd dat %2$s op je site heeft geïnstalleerd. Je moet "
|
221 |
+
"\"<b>Pagina voor registreerproces</b>\" en \"<b>OAuth-omleidingspagina voor "
|
222 |
+
"uri-proxy</b>\" instellen om %1$s correct te laten werken."
|
223 |
+
|
224 |
+
#: nextend-facebook-connect/admin/admin.php:589
|
225 |
+
msgid "Fix now"
|
226 |
+
msgstr "Nu maken"
|
227 |
+
|
228 |
+
#: nextend-facebook-connect/admin/admin.php:613
|
229 |
+
msgid "Activate your Pro Addon"
|
230 |
+
msgstr "Activeer je Pro Add-on"
|
231 |
+
|
232 |
+
#: nextend-facebook-connect/admin/admin.php:614
|
233 |
+
msgid ""
|
234 |
+
"To be able to use the Pro features, you need to activate Nextend Social "
|
235 |
+
"Connect Pro Addon. You can do this by clicking on the Activate button below "
|
236 |
+
"then select the related purchase."
|
237 |
+
msgstr ""
|
238 |
+
"Om de Pro-functies te kunnen gebruiken, moet je Nextend Social Connect Pro-"
|
239 |
+
"uitbreiding activeren. Je kunt dit doen door hieronder op de knop Activeren "
|
240 |
+
"te klikken en vervolgens de bijbehorende aankoop te selecteren."
|
241 |
+
|
242 |
+
#: nextend-facebook-connect/admin/admin.php:619
|
243 |
+
#: nextend-social-login-pro/nextend-social-login-pro.php:57
|
244 |
+
msgid "Activate"
|
245 |
+
msgstr "Activeren"
|
246 |
+
|
247 |
+
#: nextend-facebook-connect/admin/admin.php:717
|
248 |
+
msgid "License key"
|
249 |
+
msgstr "Licentiesleutel"
|
250 |
+
|
251 |
+
#: nextend-facebook-connect/admin/admin.php:739
|
252 |
+
msgid "OAuth proxy page"
|
253 |
+
msgstr "OAuth-proxy-pagina"
|
254 |
+
|
255 |
+
#: nextend-facebook-connect/admin/admin.php:742
|
256 |
+
msgid "Register flow page"
|
257 |
+
msgstr "Registreerproces-pagina"
|
258 |
+
|
259 |
+
#: nextend-facebook-connect/admin/interim.php:12
|
260 |
+
#: nextend-facebook-connect/admin/interim.php:23
|
261 |
+
msgid "You have logged in successfully."
|
262 |
+
msgstr "Je bent succesvol ingelogd."
|
263 |
+
|
264 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:81
|
265 |
+
msgid "Login label"
|
266 |
+
msgstr "Login label"
|
267 |
+
|
268 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:86
|
269 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:97
|
270 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:108
|
271 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:137
|
272 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:167
|
273 |
+
#: nextend-facebook-connect/admin/templates/settings/privacy.php:53
|
274 |
+
msgid "Reset to default"
|
275 |
+
msgstr "Reset naar standaard"
|
276 |
+
|
277 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:91
|
278 |
+
msgid "Link label"
|
279 |
+
msgstr "Koppel label"
|
280 |
+
|
281 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:103
|
282 |
+
msgid "Unlink label"
|
283 |
+
msgstr "Ontkoppel label"
|
284 |
+
|
285 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:114
|
286 |
+
msgid "Default button"
|
287 |
+
msgstr "Standaard knop"
|
288 |
+
|
289 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:130
|
290 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:160
|
291 |
+
msgid "Use custom button"
|
292 |
+
msgstr "Gebruik de aangepaste knop"
|
293 |
+
|
294 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:137
|
295 |
+
#, php-format
|
296 |
+
msgid "Use the %s in your custom button's code to make the label show up."
|
297 |
+
msgstr ""
|
298 |
+
"Gebruik de %s in de code van je aangepaste knop om het label te laten "
|
299 |
+
"verschijnen."
|
300 |
+
|
301 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:145
|
302 |
+
msgid "Icon button"
|
303 |
+
msgstr "Pictogram knop"
|
304 |
+
|
305 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:176
|
306 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:140
|
307 |
+
#: nextend-facebook-connect/admin/templates-provider/sync-data.php:104
|
308 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:170
|
309 |
+
#: nextend-facebook-connect/admin/templates/settings/comment.php:73
|
310 |
+
#: nextend-facebook-connect/admin/templates/settings/general-pro.php:7
|
311 |
+
#: nextend-facebook-connect/admin/templates/settings/general-pro.php:110
|
312 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:7
|
313 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:153
|
314 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:171
|
315 |
+
#: nextend-facebook-connect/admin/templates/settings/privacy.php:108
|
316 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:186
|
317 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:167
|
318 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:254
|
319 |
+
#: nextend-facebook-connect/providers/facebook/admin/settings.php:55
|
320 |
+
#: nextend-facebook-connect/providers/google/admin/settings.php:49
|
321 |
+
#: nextend-facebook-connect/providers/twitter/admin/settings.php:48
|
322 |
+
#: nextend-social-login-pro/providers/amazon/admin/settings.php:47
|
323 |
+
#: nextend-social-login-pro/providers/disqus/admin/settings.php:47
|
324 |
+
#: nextend-social-login-pro/providers/linkedin/admin/settings.php:47
|
325 |
+
#: nextend-social-login-pro/providers/paypal/admin/settings.php:60
|
326 |
+
#: nextend-social-login-pro/providers/vk/admin/settings.php:47
|
327 |
+
#: nextend-social-login-pro/providers/wordpress/admin/settings.php:47
|
328 |
+
#: nextend-social-login-pro/providers/yahoo/admin/settings.php:65
|
329 |
+
msgid "Save Changes"
|
330 |
+
msgstr "Wijzigingen Opslaan"
|
331 |
+
|
332 |
+
#: nextend-facebook-connect/admin/templates-provider/menu.php:13
|
333 |
+
#: nextend-facebook-connect/admin/templates/providers.php:61
|
334 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:15
|
335 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:9
|
336 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:9
|
337 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:15
|
338 |
+
#: nextend-social-login-pro/providers/disqus/admin/getting-started.php:8
|
339 |
+
#: nextend-social-login-pro/providers/linkedin/admin/getting-started.php:8
|
340 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:8
|
341 |
+
#: nextend-social-login-pro/providers/vk/admin/getting-started.php:8
|
342 |
+
#: nextend-social-login-pro/providers/wordpress/admin/getting-started.php:8
|
343 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:8
|
344 |
+
msgid "Getting Started"
|
345 |
+
msgstr "Aan de Slag"
|
346 |
+
|
347 |
+
#: nextend-facebook-connect/admin/templates-provider/menu.php:17
|
348 |
+
msgid "Buttons"
|
349 |
+
msgstr "Knoppen"
|
350 |
+
|
351 |
+
#: nextend-facebook-connect/admin/templates-provider/menu.php:21
|
352 |
+
msgid "Sync data"
|
353 |
+
msgstr "Gegevens synchroniseren"
|
354 |
+
|
355 |
+
#: nextend-facebook-connect/admin/templates-provider/menu.php:24
|
356 |
+
msgid "Usage"
|
357 |
+
msgstr "Gebruik"
|
358 |
+
|
359 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-other.php:11
|
360 |
+
msgid "Other settings"
|
361 |
+
msgstr "Overige instellingen"
|
362 |
+
|
363 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-other.php:16
|
364 |
+
msgid "Username prefix on register"
|
365 |
+
msgstr "Voorvoegsel gebruikersnaam bij registratie"
|
366 |
+
|
367 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-other.php:22
|
368 |
+
msgid "Fallback username prefix on register"
|
369 |
+
msgstr "Terugval gebruikersnaam prefix bij registratie"
|
370 |
+
|
371 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-other.php:25
|
372 |
+
msgid "Used when username is invalid or not stored"
|
373 |
+
msgstr ""
|
374 |
+
"Wordt gebruikt wanneer gebruikersnaam ongeldig is of niet is opgeslagen"
|
375 |
+
|
376 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-other.php:29
|
377 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-other.php:40
|
378 |
+
#: nextend-facebook-connect/admin/templates/settings/privacy.php:35
|
379 |
+
msgid "Terms and conditions"
|
380 |
+
msgstr "Algemene voorwaarden"
|
381 |
+
|
382 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-other.php:40
|
383 |
+
#, php-format
|
384 |
+
msgid "Override global \"%1$s\""
|
385 |
+
msgstr "Overschrijd globale \"%1$s\""
|
386 |
+
|
387 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:18
|
388 |
+
#: nextend-facebook-connect/admin/templates/settings/general-pro.php:10
|
389 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:10
|
390 |
+
msgid "PRO settings"
|
391 |
+
msgstr "PRO-instellingen"
|
392 |
+
|
393 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:28
|
394 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:32
|
395 |
+
msgid "Ask E-mail on registration"
|
396 |
+
msgstr "Vraag E-mail bij inschrijving"
|
397 |
+
|
398 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:35
|
399 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:69
|
400 |
+
msgid "Never"
|
401 |
+
msgstr "Nooit"
|
402 |
+
|
403 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:38
|
404 |
+
msgid "When email is not provided or empty"
|
405 |
+
msgstr "Wanneer e-mail niet wordt verstrekt of leeg is"
|
406 |
+
|
407 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:41
|
408 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:59
|
409 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:72
|
410 |
+
msgid "Always"
|
411 |
+
msgstr "Altijd"
|
412 |
+
|
413 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:46
|
414 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:50
|
415 |
+
msgid "Ask Username on registration"
|
416 |
+
msgstr "Vraag Gebruikersnaam bij registratie"
|
417 |
+
|
418 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:53
|
419 |
+
msgid "Never, generate automatically"
|
420 |
+
msgstr "Nooit, automatisch genereren"
|
421 |
+
|
422 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:56
|
423 |
+
msgid "When username is empty or invalid"
|
424 |
+
msgstr "Wanneer gebruikersnaam leeg of ongeldig is"
|
425 |
+
|
426 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:64
|
427 |
+
msgid "Ask Password on registration"
|
428 |
+
msgstr "Vraag Wachtwoord bij registratie"
|
429 |
+
|
430 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:77
|
431 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:81
|
432 |
+
msgid "Automatically connect the existing account upon registration"
|
433 |
+
msgstr "Verbind het bestaande account automatisch bij registratie"
|
434 |
+
|
435 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:85
|
436 |
+
#: nextend-facebook-connect/admin/templates/providers.php:39
|
437 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:53
|
438 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:193
|
439 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:208
|
440 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:226
|
441 |
+
#: nextend-facebook-connect/includes/provider-admin.php:215
|
442 |
+
msgid "Disabled"
|
443 |
+
msgstr "Uitgeschakeld"
|
444 |
+
|
445 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:88
|
446 |
+
msgid "Automatic, based on email address"
|
447 |
+
msgstr "Automatisch, op basis van e-mailadres"
|
448 |
+
|
449 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:93
|
450 |
+
msgid "Disable login for the selected roles"
|
451 |
+
msgstr "Login voor de geselecteerde rollen uitschakelen"
|
452 |
+
|
453 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:113
|
454 |
+
msgid "Default roles for user who registered with this provider"
|
455 |
+
msgstr ""
|
456 |
+
"Standaardrollen voor gebruiker die zich bij deze provider heeft geregistreerd"
|
457 |
+
|
458 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:121
|
459 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:50
|
460 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:99
|
461 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:118
|
462 |
+
#: nextend-facebook-connect/admin/templates/settings/comment.php:39
|
463 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:33
|
464 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:89
|
465 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:24
|
466 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:90
|
467 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:39
|
468 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:105
|
469 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:51
|
470 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:102
|
471 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:24
|
472 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:64
|
473 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:122
|
474 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:180
|
475 |
+
#: nextend-facebook-connect/widget.php:42
|
476 |
+
msgid "Default"
|
477 |
+
msgstr "Standaard"
|
478 |
+
|
479 |
+
#: nextend-facebook-connect/admin/templates-provider/sync-data.php:50
|
480 |
+
#: nextend-facebook-connect/includes/userData.php:185
|
481 |
+
msgid "Register"
|
482 |
+
msgstr "Registreren"
|
483 |
+
|
484 |
+
#: nextend-facebook-connect/admin/templates-provider/sync-data.php:58
|
485 |
+
msgid "Login"
|
486 |
+
msgstr "Inloggen"
|
487 |
+
|
488 |
+
#: nextend-facebook-connect/admin/templates-provider/sync-data.php:66
|
489 |
+
msgid "Link"
|
490 |
+
msgstr "Koppel"
|
491 |
+
|
492 |
+
#: nextend-facebook-connect/admin/templates-provider/sync-data.php:84
|
493 |
+
msgid "Store in meta key"
|
494 |
+
msgstr "Bewaren in metasleutel"
|
495 |
+
|
496 |
+
#: nextend-facebook-connect/admin/templates-provider/usage.php:9
|
497 |
+
msgid "Shortcode"
|
498 |
+
msgstr "Shortcode"
|
499 |
+
|
500 |
+
#: nextend-facebook-connect/admin/templates-provider/usage.php:12
|
501 |
+
msgid "Important!"
|
502 |
+
msgstr "Belangrijk!"
|
503 |
+
|
504 |
+
#: nextend-facebook-connect/admin/templates-provider/usage.php:13
|
505 |
+
msgid "The shortcodes are only rendered for users who haven't logged in yet!"
|
506 |
+
msgstr ""
|
507 |
+
"De shortcodes worden alleen weergegeven voor gebruikers die nog niet "
|
508 |
+
"ingelogd zijn!"
|
509 |
+
|
510 |
+
#: nextend-facebook-connect/admin/templates-provider/usage.php:14
|
511 |
+
msgid "See the full list of shortcode parameters."
|
512 |
+
msgstr "Zie de volledige lijst met shortcode-parameters."
|
513 |
+
|
514 |
+
#: nextend-facebook-connect/admin/templates-provider/usage.php:31
|
515 |
+
msgid "Simple link"
|
516 |
+
msgstr "Eenvoudige link"
|
517 |
+
|
518 |
+
#: nextend-facebook-connect/admin/templates-provider/usage.php:34
|
519 |
+
msgid "Click here to login or register"
|
520 |
+
msgstr "Klik hier om in te loggen of te registreren"
|
521 |
+
|
522 |
+
#: nextend-facebook-connect/admin/templates-provider/usage.php:39
|
523 |
+
msgid "Image button"
|
524 |
+
msgstr "Knop afbeelding"
|
525 |
+
|
526 |
+
#: nextend-facebook-connect/admin/templates-provider/usage.php:42
|
527 |
+
msgid "Image url"
|
528 |
+
msgstr "URL afbeelding"
|
529 |
+
|
530 |
+
#: nextend-facebook-connect/admin/templates/debug.php:7
|
531 |
+
#: nextend-facebook-connect/admin/templates/header.php:20
|
532 |
+
msgid "Debug"
|
533 |
+
msgstr "Debug"
|
534 |
+
|
535 |
+
#: nextend-facebook-connect/admin/templates/debug.php:41
|
536 |
+
msgid "Test network connection with providers"
|
537 |
+
msgstr "Test de netwerkverbinding met providers"
|
538 |
+
|
539 |
+
#: nextend-facebook-connect/admin/templates/debug.php:48
|
540 |
+
msgid "You don't have cURL support, please enable it in php.ini!"
|
541 |
+
msgstr "Je hebt geen cURL-ondersteuning, schakel dit in in php.ini!"
|
542 |
+
|
543 |
+
#: nextend-facebook-connect/admin/templates/debug.php:58
|
544 |
+
#, php-format
|
545 |
+
msgid "Test %1$s connection"
|
546 |
+
msgstr "Test %1$s connectie"
|
547 |
+
|
548 |
+
#: nextend-facebook-connect/admin/templates/fix-redirect-uri.php:2
|
549 |
+
msgid "Fix Oauth Redirect URIs"
|
550 |
+
msgstr "Fix Oauth Omleidings-URI's"
|
551 |
+
|
552 |
+
#: nextend-facebook-connect/admin/templates/fix-redirect-uri.php:13
|
553 |
+
msgid "Every Oauth Redirect URI seems fine"
|
554 |
+
msgstr "Elke Oauth Omleidings-URI lijkt in orde"
|
555 |
+
|
556 |
+
#: nextend-facebook-connect/admin/templates/fix-redirect-uri.php:32
|
557 |
+
msgid "Got it"
|
558 |
+
msgstr "Oké"
|
559 |
+
|
560 |
+
#: nextend-facebook-connect/admin/templates/global-settings.php:28
|
561 |
+
#: nextend-facebook-connect/admin/templates/menu.php:8
|
562 |
+
msgid "Global Settings"
|
563 |
+
msgstr "Algemene Instellingen"
|
564 |
+
|
565 |
+
#: nextend-facebook-connect/admin/templates/global-settings.php:31
|
566 |
+
msgid "General"
|
567 |
+
msgstr "Algemeen"
|
568 |
+
|
569 |
+
#: nextend-facebook-connect/admin/templates/global-settings.php:33
|
570 |
+
msgid "Privacy"
|
571 |
+
msgstr "Privacy"
|
572 |
+
|
573 |
+
#: nextend-facebook-connect/admin/templates/global-settings.php:35
|
574 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form.php:9
|
575 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:18
|
576 |
+
msgid "Login Form"
|
577 |
+
msgstr "Loginformulier"
|
578 |
+
|
579 |
+
#: nextend-facebook-connect/admin/templates/global-settings.php:39
|
580 |
+
msgid "Comment"
|
581 |
+
msgstr "Reactie"
|
582 |
+
|
583 |
+
#: nextend-facebook-connect/admin/templates/header.php:14
|
584 |
+
msgid "Docs"
|
585 |
+
msgstr "Documentatie"
|
586 |
+
|
587 |
+
#: nextend-facebook-connect/admin/templates/header.php:17
|
588 |
+
msgid "Support"
|
589 |
+
msgstr "Ondersteuning"
|
590 |
+
|
591 |
+
#: nextend-facebook-connect/admin/templates/header.php:23
|
592 |
+
#: nextend-facebook-connect/admin/templates/menu.php:12
|
593 |
+
msgid "Pro Addon"
|
594 |
+
msgstr "Pro-uitbreiding"
|
595 |
+
|
596 |
+
#: nextend-facebook-connect/admin/templates/menu.php:6
|
597 |
+
msgid "Providers"
|
598 |
+
msgstr "Providers"
|
599 |
+
|
600 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:13
|
601 |
+
msgid "Error"
|
602 |
+
msgstr "Fout"
|
603 |
+
|
604 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:14
|
605 |
+
msgid ""
|
606 |
+
"You don’t have sufficient permissions to install and activate plugins. "
|
607 |
+
"Please contact your site’s administrator!"
|
608 |
+
msgstr ""
|
609 |
+
"Je hebt niet voldoende rechten om plugins te installeren en te activeren. "
|
610 |
+
"Neem contact op met de sitebeheerder!"
|
611 |
+
|
612 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:22
|
613 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:32
|
614 |
+
#: nextend-facebook-connect/admin/templates/pro.php:34
|
615 |
+
msgid "Activate Pro Addon"
|
616 |
+
msgstr "Activeren Pro-uitbreiding"
|
617 |
+
|
618 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:23
|
619 |
+
msgid ""
|
620 |
+
"Pro Addon is installed but not activated. To be able to use the Pro "
|
621 |
+
"features, you need to activate it."
|
622 |
+
msgstr ""
|
623 |
+
"Pro-uitbreiding is geïnstalleerd maar niet geactiveerd. Om de Pro-functies "
|
624 |
+
"te kunnen gebruiken, moet je deze activeren."
|
625 |
+
|
626 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:37
|
627 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:142
|
628 |
+
msgid "Deactivate Pro Addon"
|
629 |
+
msgstr "Deactiveren Pro-uitbreiding"
|
630 |
+
|
631 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:48
|
632 |
+
#: nextend-facebook-connect/admin/templates/pro.php:43
|
633 |
+
msgid "Pro Addon is not installed"
|
634 |
+
msgstr "Pro-uitbreiding is niet geïnstalleerd"
|
635 |
+
|
636 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:50
|
637 |
+
msgid ""
|
638 |
+
"To access the Pro features, you need to install and activate the Pro Addon."
|
639 |
+
msgstr ""
|
640 |
+
"Om toegang te krijgen tot de Pro-functies moet je de Pro-uitbreiding "
|
641 |
+
"installeren en activeren."
|
642 |
+
|
643 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:59
|
644 |
+
#, php-format
|
645 |
+
msgid "Install %s now"
|
646 |
+
msgstr "Installeer %s nu"
|
647 |
+
|
648 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:60
|
649 |
+
#: nextend-facebook-connect/admin/templates/pro.php:47
|
650 |
+
msgid "Install Pro Addon"
|
651 |
+
msgstr "Installeer Pro-uitbreiding"
|
652 |
+
|
653 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:94
|
654 |
+
msgid "Activating..."
|
655 |
+
msgstr "Activeren..."
|
656 |
+
|
657 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:118
|
658 |
+
msgid "Not compatible!"
|
659 |
+
msgstr "Niet compatibel!"
|
660 |
+
|
661 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:119
|
662 |
+
#, php-format
|
663 |
+
msgid ""
|
664 |
+
"%1$s and %2$s are not compatible. Please update %2$s to version %3$s or "
|
665 |
+
"newer."
|
666 |
+
msgstr ""
|
667 |
+
"%1$s en %2$s zijn niet compatibel. Gelieve %2$s bij te werken naar versie "
|
668 |
+
"%3$s of nieuwer."
|
669 |
+
|
670 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:123
|
671 |
+
msgid "Update Pro Addon"
|
672 |
+
msgstr "Update Pro-uitbreiding"
|
673 |
+
|
674 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:133
|
675 |
+
msgid "Pro Addon is installed and activated"
|
676 |
+
msgstr "Pro-uitbreiding is geïnstalleerd en geactiveerd"
|
677 |
+
|
678 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:135
|
679 |
+
msgid ""
|
680 |
+
"You installed and activated the Pro Addon. If you don’t want to use it "
|
681 |
+
"anymore, you can deactivate using the button below."
|
682 |
+
msgstr ""
|
683 |
+
"Je hebt de Pro-uitbreiding geïnstalleerd en geactiveerd. Als je deze niet "
|
684 |
+
"meer wilt gebruiken, kun je deze uitschakelen met de onderstaande knop."
|
685 |
+
|
686 |
+
#: nextend-facebook-connect/admin/templates/pro.php:8
|
687 |
+
msgid "Get Pro Addon to unlock more features"
|
688 |
+
msgstr "Koop Pro-uitbreiding om meer functies te ontgrendelen"
|
689 |
+
|
690 |
+
#: nextend-facebook-connect/admin/templates/pro.php:9
|
691 |
+
#, php-format
|
692 |
+
msgid ""
|
693 |
+
"The features below are available in %s Pro Addon. Get it today and tweak the "
|
694 |
+
"awesome settings."
|
695 |
+
msgstr ""
|
696 |
+
"De onderstaande functies zijn beschikbaar in %s Pro-uitbreiding. Koop deze "
|
697 |
+
"vandaag nog en pas deze geweldige instellingen aan."
|
698 |
+
|
699 |
+
#: nextend-facebook-connect/admin/templates/pro.php:10
|
700 |
+
msgid ""
|
701 |
+
"If you already have a license, you can Authorize your Pro Addon. Otherwise "
|
702 |
+
"you can purchase it using the button below."
|
703 |
+
msgstr ""
|
704 |
+
"Als je al een licentie hebt, kunt je je Pro-uitbreiding autoriseren. Anders "
|
705 |
+
"kun je deze kopen met onderstaande knop."
|
706 |
+
|
707 |
+
#: nextend-facebook-connect/admin/templates/pro.php:14
|
708 |
+
msgid "Buy Pro Addon"
|
709 |
+
msgstr "Koop Pro-uitbreiding"
|
710 |
+
|
711 |
+
#: nextend-facebook-connect/admin/templates/pro.php:16
|
712 |
+
msgid "Authorize Pro Addon"
|
713 |
+
msgstr "Machtigen Pro-uitbreiding"
|
714 |
+
|
715 |
+
#: nextend-facebook-connect/admin/templates/pro.php:25
|
716 |
+
msgid "Pro Addon is not activated"
|
717 |
+
msgstr "Pro-uitbreiding is niet geactiveerd"
|
718 |
+
|
719 |
+
#: nextend-facebook-connect/admin/templates/pro.php:26
|
720 |
+
#: nextend-facebook-connect/admin/templates/pro.php:44
|
721 |
+
msgid ""
|
722 |
+
"To be able to use the Pro features, you need to install and activate the "
|
723 |
+
"Nextend Social Connect Pro Addon."
|
724 |
+
msgstr ""
|
725 |
+
"Om de Pro-functies te kunnen gebruiken, moet je de Nextend Social Connect "
|
726 |
+
"Pro-uitbreiding installeren en activeren."
|
727 |
+
|
728 |
+
#: nextend-facebook-connect/admin/templates/providers.php:30
|
729 |
+
msgid "Not Available"
|
730 |
+
msgstr "Niet Beschikbaar"
|
731 |
+
|
732 |
+
#: nextend-facebook-connect/admin/templates/providers.php:33
|
733 |
+
msgid "Not Configured"
|
734 |
+
msgstr "Niet Geconfigureerd"
|
735 |
+
|
736 |
+
#: nextend-facebook-connect/admin/templates/providers.php:36
|
737 |
+
msgid "Not Verified"
|
738 |
+
msgstr "Niet Geverifieerd"
|
739 |
+
|
740 |
+
#: nextend-facebook-connect/admin/templates/providers.php:42
|
741 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:56
|
742 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:196
|
743 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:211
|
744 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:229
|
745 |
+
#: nextend-facebook-connect/includes/provider-admin.php:218
|
746 |
+
#: nextend-social-login-pro/providers/paypal/admin/settings.php:51
|
747 |
+
msgid "Enabled"
|
748 |
+
msgstr "Ingeschakeld"
|
749 |
+
|
750 |
+
#: nextend-facebook-connect/admin/templates/providers.php:54
|
751 |
+
msgid "Upgrade Now"
|
752 |
+
msgstr "Nu Bijwerken"
|
753 |
+
|
754 |
+
#: nextend-facebook-connect/admin/templates/providers.php:69
|
755 |
+
#: nextend-facebook-connect/includes/provider-admin.php:202
|
756 |
+
msgid "Verify Settings"
|
757 |
+
msgstr "Instellingen Controleren"
|
758 |
+
|
759 |
+
#: nextend-facebook-connect/admin/templates/providers.php:77
|
760 |
+
#: nextend-facebook-connect/includes/provider-admin.php:247
|
761 |
+
msgid "Enable"
|
762 |
+
msgstr "Inschakelen"
|
763 |
+
|
764 |
+
#: nextend-facebook-connect/admin/templates/providers.php:89
|
765 |
+
#: nextend-facebook-connect/includes/provider-admin.php:255
|
766 |
+
msgid "Disable"
|
767 |
+
msgstr "Uitschakelen"
|
768 |
+
|
769 |
+
#: nextend-facebook-connect/admin/templates/providers.php:114
|
770 |
+
msgid "Stay Updated"
|
771 |
+
msgstr "Blijf op de Hoogte"
|
772 |
+
|
773 |
+
#: nextend-facebook-connect/admin/templates/providers.php:115
|
774 |
+
msgid ""
|
775 |
+
"Receive info on the latest plugin updates and social provider related "
|
776 |
+
"changes."
|
777 |
+
msgstr ""
|
778 |
+
"Ontvang informatie over de laatste plugin-updates en wijzigingen bij social "
|
779 |
+
"providers."
|
780 |
+
|
781 |
+
#: nextend-facebook-connect/admin/templates/providers.php:116
|
782 |
+
msgid "Enter your email address"
|
783 |
+
msgstr "Vul je e-mailadres in"
|
784 |
+
|
785 |
+
#: nextend-facebook-connect/admin/templates/providers.php:120
|
786 |
+
msgid "Subscribe"
|
787 |
+
msgstr "Inschrijven"
|
788 |
+
|
789 |
+
#: nextend-facebook-connect/admin/templates/providers.php:136
|
790 |
+
msgid "Saving..."
|
791 |
+
msgstr "Opslaan…"
|
792 |
+
|
793 |
+
#: nextend-facebook-connect/admin/templates/providers.php:137
|
794 |
+
msgid "Saving failed"
|
795 |
+
msgstr "Opslaan mislukt"
|
796 |
+
|
797 |
+
#: nextend-facebook-connect/admin/templates/providers.php:138
|
798 |
+
msgid "Order Saved"
|
799 |
+
msgstr "Bestelling Opgeslagen"
|
800 |
+
|
801 |
+
#: nextend-facebook-connect/admin/templates/providers.php:207
|
802 |
+
msgid "Successfully subscribed!"
|
803 |
+
msgstr "Succesvol ingeschreven!"
|
804 |
+
|
805 |
+
#: nextend-facebook-connect/admin/templates/providers.php:207
|
806 |
+
msgid ""
|
807 |
+
"We'll be bringing you all the latest news and updates about Social Login - "
|
808 |
+
"right to your inbox."
|
809 |
+
msgstr ""
|
810 |
+
"We brengen je het laatste nieuws en updates over Social Login - direct in je "
|
811 |
+
"inbox."
|
812 |
+
|
813 |
+
#: nextend-facebook-connect/admin/templates/providers.php:214
|
814 |
+
msgid "The entered email address is invalid!"
|
815 |
+
msgstr "Het ingevoerde e-mailadres is ongeldig!"
|
816 |
+
|
817 |
+
#: nextend-facebook-connect/admin/templates/review.php:14
|
818 |
+
msgid "Rate your experience!"
|
819 |
+
msgstr "Beoordeel je ervaring!"
|
820 |
+
|
821 |
+
#: nextend-facebook-connect/admin/templates/review.php:15
|
822 |
+
msgid "Hated it"
|
823 |
+
msgstr "Haatte het"
|
824 |
+
|
825 |
+
#: nextend-facebook-connect/admin/templates/review.php:16
|
826 |
+
msgid "Disliked it"
|
827 |
+
msgstr "Niet zo leuk"
|
828 |
+
|
829 |
+
#: nextend-facebook-connect/admin/templates/review.php:17
|
830 |
+
msgid "It was ok"
|
831 |
+
msgstr "Het was oké"
|
832 |
+
|
833 |
+
#: nextend-facebook-connect/admin/templates/review.php:18
|
834 |
+
msgid "Liked it"
|
835 |
+
msgstr "Vond het leuk"
|
836 |
+
|
837 |
+
#: nextend-facebook-connect/admin/templates/review.php:19
|
838 |
+
msgid "Loved it"
|
839 |
+
msgstr "Vond het geweldig"
|
840 |
+
|
841 |
+
#: nextend-facebook-connect/admin/templates/review.php:31
|
842 |
+
msgid "Please Leave a Review"
|
843 |
+
msgstr "Laat alsjeblieft een recensie achter"
|
844 |
+
|
845 |
+
#: nextend-facebook-connect/admin/templates/review.php:32
|
846 |
+
msgid ""
|
847 |
+
"If you are happy with <b>Nextend Social Login</b> and can take a minute "
|
848 |
+
"please leave us a review. It will be a tremendous help for us!"
|
849 |
+
msgstr ""
|
850 |
+
"Als je tevreden bent met <b>Nextend Social Login</b> en je hebt een minuutje "
|
851 |
+
"de tijd, laat dan een beoordeling achter. Je helpt ons daar enorm mee!"
|
852 |
+
|
853 |
+
#: nextend-facebook-connect/admin/templates/review.php:34
|
854 |
+
msgid "Ok, you deserve it"
|
855 |
+
msgstr "Ok, je verdient het"
|
856 |
+
|
857 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:18
|
858 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:84
|
859 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:96
|
860 |
+
msgid "Register form"
|
861 |
+
msgstr "Registratieformulier"
|
862 |
+
|
863 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:23
|
864 |
+
msgid "No Connect button"
|
865 |
+
msgstr "Geen Verbindingsknop"
|
866 |
+
|
867 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:26
|
868 |
+
msgid "Connect button before register"
|
869 |
+
msgstr "Verbindingsknop voor registratie"
|
870 |
+
|
871 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:27
|
872 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:32
|
873 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:37
|
874 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:78
|
875 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:144
|
876 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:27
|
877 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:93
|
878 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:159
|
879 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:47
|
880 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:52
|
881 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:105
|
882 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:110
|
883 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:163
|
884 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:168
|
885 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:221
|
886 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:226
|
887 |
+
msgid "Action:"
|
888 |
+
msgstr "Actie:"
|
889 |
+
|
890 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:31
|
891 |
+
msgid "Connect button before account details"
|
892 |
+
msgstr "Verbindingsknop voor account details"
|
893 |
+
|
894 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:36
|
895 |
+
msgid "Connect button after register"
|
896 |
+
msgstr "Verbindingsknop na registratie"
|
897 |
+
|
898 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:44
|
899 |
+
msgid "Register button style"
|
900 |
+
msgstr "Registreerknop-stijl"
|
901 |
+
|
902 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:56
|
903 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:105
|
904 |
+
#: nextend-facebook-connect/admin/templates/settings/comment.php:45
|
905 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:39
|
906 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:95
|
907 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:30
|
908 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:96
|
909 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:45
|
910 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:111
|
911 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:57
|
912 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:108
|
913 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:30
|
914 |
+
#: nextend-facebook-connect/widget.php:47
|
915 |
+
msgid "Icon"
|
916 |
+
msgstr "Icoon"
|
917 |
+
|
918 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:64
|
919 |
+
msgid "Sidebar Login form"
|
920 |
+
msgstr "Sidebar Login formulier"
|
921 |
+
|
922 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:69
|
923 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:85
|
924 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form.php:17
|
925 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form.php:30
|
926 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form.php:47
|
927 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:26
|
928 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:39
|
929 |
+
msgid "Hide login buttons"
|
930 |
+
msgstr "Inlogknoppen verbergen"
|
931 |
+
|
932 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:72
|
933 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:88
|
934 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form.php:14
|
935 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form.php:27
|
936 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form.php:44
|
937 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:23
|
938 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:36
|
939 |
+
#: nextend-facebook-connect/widget.php:76
|
940 |
+
msgid "Show login buttons"
|
941 |
+
msgstr "Inlogknoppen tonen"
|
942 |
+
|
943 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:73
|
944 |
+
msgid ""
|
945 |
+
"Some themes that use BuddyPress, display the social buttons twice in the "
|
946 |
+
"same login form. This option can disable the one for: "
|
947 |
+
"<b>bp_sidebar_login_form action</b>. "
|
948 |
+
msgstr ""
|
949 |
+
"Sommige thema's die gebruik maken van BuddyPress, tonen de social knoppen "
|
950 |
+
"twee keer in hetzelfde inlogformulier. Deze optie kan die voor: "
|
951 |
+
"<b>bp_sidebar_login_form action</b> uitschakelen. "
|
952 |
+
|
953 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:80
|
954 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:18
|
955 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:38
|
956 |
+
msgid "Login form"
|
957 |
+
msgstr "Login formulier"
|
958 |
+
|
959 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:93
|
960 |
+
msgid "Login button style"
|
961 |
+
msgstr "Inlogknop stijl"
|
962 |
+
|
963 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:112
|
964 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:46
|
965 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:37
|
966 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:52
|
967 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:64
|
968 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:58
|
969 |
+
msgid "Login layout"
|
970 |
+
msgstr "Inlog-layout"
|
971 |
+
|
972 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:124
|
973 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:52
|
974 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:108
|
975 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:43
|
976 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:109
|
977 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:58
|
978 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:124
|
979 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:70
|
980 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:121
|
981 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:70
|
982 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:128
|
983 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:186
|
984 |
+
msgid "Below"
|
985 |
+
msgstr "Onderstaand"
|
986 |
+
|
987 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:130
|
988 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:58
|
989 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:114
|
990 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:49
|
991 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:115
|
992 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:64
|
993 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:130
|
994 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:76
|
995 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:127
|
996 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:76
|
997 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:134
|
998 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:192
|
999 |
+
msgid "Below with separator"
|
1000 |
+
msgstr "Hieronder met separator"
|
1001 |
+
|
1002 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:136
|
1003 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:70
|
1004 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:120
|
1005 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:55
|
1006 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:121
|
1007 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:70
|
1008 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:136
|
1009 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:82
|
1010 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:133
|
1011 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:82
|
1012 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:140
|
1013 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:198
|
1014 |
+
msgid "Above"
|
1015 |
+
msgstr "Boven"
|
1016 |
+
|
1017 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:142
|
1018 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:76
|
1019 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:126
|
1020 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:61
|
1021 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:127
|
1022 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:76
|
1023 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:142
|
1024 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:88
|
1025 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:139
|
1026 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:88
|
1027 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:146
|
1028 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:204
|
1029 |
+
msgid "Above with separator"
|
1030 |
+
msgstr "Hierboven met separator"
|
1031 |
+
|
1032 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:150
|
1033 |
+
#: nextend-facebook-connect/admin/templates/settings/comment.php:53
|
1034 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form.php:53
|
1035 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:151
|
1036 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:166
|
1037 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:147
|
1038 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:233
|
1039 |
+
msgid "Button alignment"
|
1040 |
+
msgstr "Knoppen uitlijning"
|
1041 |
+
|
1042 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:155
|
1043 |
+
#: nextend-facebook-connect/admin/templates/settings/comment.php:58
|
1044 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:138
|
1045 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form.php:58
|
1046 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:156
|
1047 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:171
|
1048 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:152
|
1049 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:238
|
1050 |
+
#: nextend-facebook-connect/widget.php:57
|
1051 |
+
msgid "Left"
|
1052 |
+
msgstr "Links"
|
1053 |
+
|
1054 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:158
|
1055 |
+
#: nextend-facebook-connect/admin/templates/settings/comment.php:61
|
1056 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:141
|
1057 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form.php:61
|
1058 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:159
|
1059 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:174
|
1060 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:155
|
1061 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:241
|
1062 |
+
#: nextend-facebook-connect/widget.php:62
|
1063 |
+
msgid "Center"
|
1064 |
+
msgstr "Midden"
|
1065 |
+
|
1066 |
+
#: nextend-facebook-connect/admin/templates/settings/buddypress.php:162
|
1067 |
+
#: nextend-facebook-connect/admin/templates/settings/comment.php:65
|
1068 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:145
|
1069 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form.php:65
|
1070 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:163
|
1071 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:178
|
1072 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:159
|
1073 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:245
|
1074 |
+
#: nextend-facebook-connect/widget.php:67
|
1075 |
+
msgid "Right"
|
1076 |
+
msgstr "Rechts"
|
1077 |
+
|
1078 |
+
#: nextend-facebook-connect/admin/templates/settings/comment.php:18
|
1079 |
+
msgid "Login button"
|
1080 |
+
msgstr "Loginknop"
|
1081 |
+
|
1082 |
+
#: nextend-facebook-connect/admin/templates/settings/comment.php:23
|
1083 |
+
#: nextend-facebook-connect/admin/templates/settings/privacy.php:42
|
1084 |
+
msgid "Show"
|
1085 |
+
msgstr "Toon"
|
1086 |
+
|
1087 |
+
#: nextend-facebook-connect/admin/templates/settings/comment.php:26
|
1088 |
+
msgid "Hide"
|
1089 |
+
msgstr "Verberg"
|
1090 |
+
|
1091 |
+
#: nextend-facebook-connect/admin/templates/settings/comment.php:28
|
1092 |
+
#, php-format
|
1093 |
+
msgid "You need to turn on the ' %1$s > %2$s > %3$s ' for this feature to work"
|
1094 |
+
msgstr ""
|
1095 |
+
"Je moet de ' %1$s > %2$s > %3$s ' aanzetten om deze functie te laten werken"
|
1096 |
+
|
1097 |
+
#: nextend-facebook-connect/admin/templates/settings/comment.php:28
|
1098 |
+
msgid "Discussion"
|
1099 |
+
msgstr "Discussie"
|
1100 |
+
|
1101 |
+
#: nextend-facebook-connect/admin/templates/settings/comment.php:28
|
1102 |
+
msgid "Users must be registered and logged in to comment"
|
1103 |
+
msgstr ""
|
1104 |
+
"Je moet geregistreerd en ingelogd zijn om een reactie te kunnen plaatsen"
|
1105 |
+
|
1106 |
+
#: nextend-facebook-connect/admin/templates/settings/comment.php:33
|
1107 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:18
|
1108 |
+
msgid "Button style"
|
1109 |
+
msgstr "Knop stijl"
|
1110 |
+
|
1111 |
+
#: nextend-facebook-connect/admin/templates/settings/general-pro.php:27
|
1112 |
+
msgid "Target window"
|
1113 |
+
msgstr "Doelvenster"
|
1114 |
+
|
1115 |
+
#: nextend-facebook-connect/admin/templates/settings/general-pro.php:32
|
1116 |
+
msgid "Prefer popup"
|
1117 |
+
msgstr "Bij voorkeur popup"
|
1118 |
+
|
1119 |
+
#: nextend-facebook-connect/admin/templates/settings/general-pro.php:35
|
1120 |
+
msgid "Prefer new tab"
|
1121 |
+
msgstr "Bij voorkeur nieuw tabblad"
|
1122 |
+
|
1123 |
+
#: nextend-facebook-connect/admin/templates/settings/general-pro.php:38
|
1124 |
+
msgid "Prefer same window"
|
1125 |
+
msgstr "Bij voorkeur hetzelfde venster"
|
1126 |
+
|
1127 |
+
#: nextend-facebook-connect/admin/templates/settings/general-pro.php:44
|
1128 |
+
msgid "Registration notification sent to"
|
1129 |
+
msgstr "Registratie notificatie verzonden naar"
|
1130 |
+
|
1131 |
+
#: nextend-facebook-connect/admin/templates/settings/general-pro.php:49
|
1132 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:223
|
1133 |
+
msgid "WordPress default"
|
1134 |
+
msgstr "WordPress standaard"
|
1135 |
+
|
1136 |
+
#: nextend-facebook-connect/admin/templates/settings/general-pro.php:52
|
1137 |
+
msgid "Nobody"
|
1138 |
+
msgstr "Niemand"
|
1139 |
+
|
1140 |
+
#: nextend-facebook-connect/admin/templates/settings/general-pro.php:58
|
1141 |
+
msgid "Admin"
|
1142 |
+
msgstr "Beheerder"
|
1143 |
+
|
1144 |
+
#: nextend-facebook-connect/admin/templates/settings/general-pro.php:61
|
1145 |
+
msgid "User and Admin"
|
1146 |
+
msgstr "Gebruiker en Beheerder"
|
1147 |
+
|
1148 |
+
#: nextend-facebook-connect/admin/templates/settings/general-pro.php:67
|
1149 |
+
msgid "Unlink"
|
1150 |
+
msgstr "Ontkoppelen"
|
1151 |
+
|
1152 |
+
#: nextend-facebook-connect/admin/templates/settings/general-pro.php:73
|
1153 |
+
msgid "Allow Social account unlink"
|
1154 |
+
msgstr "Sta ontkoppelen Social account toe"
|
1155 |
+
|
1156 |
+
#: nextend-facebook-connect/admin/templates/settings/general-pro.php:79
|
1157 |
+
msgid "Disable Admin bar for roles"
|
1158 |
+
msgstr "Adminbalk voor rollen uitschakelen"
|
1159 |
+
|
1160 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:48
|
1161 |
+
msgid "Debug mode"
|
1162 |
+
msgstr "Debugmodus"
|
1163 |
+
|
1164 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:61
|
1165 |
+
msgid "Page for register flow"
|
1166 |
+
msgstr "Pagina voor registreerproces"
|
1167 |
+
|
1168 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:65
|
1169 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:78
|
1170 |
+
msgid "None"
|
1171 |
+
msgstr "Geen"
|
1172 |
+
|
1173 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:68
|
1174 |
+
msgid ""
|
1175 |
+
"This setting is used when you request additional data from the users (such "
|
1176 |
+
"as email address) and to display the Terms and conditions."
|
1177 |
+
msgstr ""
|
1178 |
+
"Deze instelling wordt gebruikt wanneer je gebruikers om aanvullende gegevens "
|
1179 |
+
"vraagt (zoals het e-mailadres) en om de algemene voorwaarden weer te geven."
|
1180 |
+
|
1181 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:69
|
1182 |
+
#, php-format
|
1183 |
+
msgid ""
|
1184 |
+
"%2$s First create a new page and insert the following shortcode: %1$s then "
|
1185 |
+
"select this page above"
|
1186 |
+
msgstr ""
|
1187 |
+
"%2$s Maak eerst een nieuwe pagina aan en voeg de volgende shortcode toe: "
|
1188 |
+
"%1$s en selecteer dan deze pagina hierboven"
|
1189 |
+
|
1190 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:69
|
1191 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:82
|
1192 |
+
msgid "Usage:"
|
1193 |
+
msgstr "Gebruik:"
|
1194 |
+
|
1195 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:70
|
1196 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:83
|
1197 |
+
#, php-format
|
1198 |
+
msgid ""
|
1199 |
+
"%1$s You won't be able to reach the selected page unless a social login/"
|
1200 |
+
"registration happens."
|
1201 |
+
msgstr ""
|
1202 |
+
"%1$s Je kunt de geselecteerde pagina niet bereiken tenzij er een social "
|
1203 |
+
"login/registratie plaatsvindt."
|
1204 |
+
|
1205 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:70
|
1206 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:83
|
1207 |
+
msgid "Important:"
|
1208 |
+
msgstr "Let op:"
|
1209 |
+
|
1210 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:74
|
1211 |
+
msgid "OAuth redirect uri proxy page"
|
1212 |
+
msgstr "OAuth omleidings-uri proxy pagina"
|
1213 |
+
|
1214 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:81
|
1215 |
+
msgid ""
|
1216 |
+
"You can use this setting when wp-login.php page is not available to handle "
|
1217 |
+
"the OAuth flow."
|
1218 |
+
msgstr ""
|
1219 |
+
"Je kunt deze instelling gebruiken wanneer de wp-login.php pagina niet "
|
1220 |
+
"beschikbaar is om het OAuth-proces te verwerken."
|
1221 |
+
|
1222 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:82
|
1223 |
+
#, php-format
|
1224 |
+
msgid "%1$s First create a new page then select this page above."
|
1225 |
+
msgstr ""
|
1226 |
+
"%1$s Maak eerst een nieuwe pagina aan en selecteer dan deze pagina hierboven."
|
1227 |
+
|
1228 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:89
|
1229 |
+
msgid "Prevent external redirect overrides"
|
1230 |
+
msgstr "Voorkom overschrijvingen bij externe omleidingen"
|
1231 |
+
|
1232 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:95
|
1233 |
+
msgid "Disable external redirects"
|
1234 |
+
msgstr "Externe omleidingen uitschakelen"
|
1235 |
+
|
1236 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:102
|
1237 |
+
msgid "Default redirect url"
|
1238 |
+
msgstr "Standaard omleidings-URL"
|
1239 |
+
|
1240 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:115
|
1241 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:153
|
1242 |
+
msgid "for Login"
|
1243 |
+
msgstr "voor Inloggen"
|
1244 |
+
|
1245 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:130
|
1246 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:168
|
1247 |
+
msgid "for Register"
|
1248 |
+
msgstr "voor Registreren"
|
1249 |
+
|
1250 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:140
|
1251 |
+
msgid "Fixed redirect url"
|
1252 |
+
msgstr "Vaste omleidings-URL"
|
1253 |
+
|
1254 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:177
|
1255 |
+
msgid "Blacklisted redirects"
|
1256 |
+
msgstr "Zwarte lijst van omleidingen"
|
1257 |
+
|
1258 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:183
|
1259 |
+
msgid "If you want to blacklist redirect url params. One pattern per line."
|
1260 |
+
msgstr ""
|
1261 |
+
"Als je omleidings-URL parameters op de zwarte lijst wilt zetten. Eén patroon "
|
1262 |
+
"per regel."
|
1263 |
+
|
1264 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:188
|
1265 |
+
msgid "Support login restrictions"
|
1266 |
+
msgstr "Ondersteunende inlog-beperkingen"
|
1267 |
+
|
1268 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:198
|
1269 |
+
#, php-format
|
1270 |
+
msgid "Please visit to our %1$s to check what plugins are supported!"
|
1271 |
+
msgstr "Bezoek onze %1$s om te controleren welke plugins worden ondersteund!"
|
1272 |
+
|
1273 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:203
|
1274 |
+
msgid "Display avatars in \"All media items\""
|
1275 |
+
msgstr "Weergeven profielfoto's in \"Alle media-items\""
|
1276 |
+
|
1277 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:213
|
1278 |
+
msgid ""
|
1279 |
+
"Enabling this option can speed up loading images in Media Library - Grid "
|
1280 |
+
"view!"
|
1281 |
+
msgstr ""
|
1282 |
+
"Door deze optie in te schakelen kan het laden van afbeeldingen in de "
|
1283 |
+
"mediabibliotheek worden versneld - Rasterweergave!"
|
1284 |
+
|
1285 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:218
|
1286 |
+
msgid "Membership"
|
1287 |
+
msgstr "Lidmaatschap"
|
1288 |
+
|
1289 |
+
#: nextend-facebook-connect/admin/templates/settings/general.php:231
|
1290 |
+
msgid "Allow registration with Social login."
|
1291 |
+
msgstr "Registratie toestaan met Social login."
|
1292 |
+
|
1293 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:27
|
1294 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:18
|
1295 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:33
|
1296 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:45
|
1297 |
+
msgid "Login form button style"
|
1298 |
+
msgstr "Aanmeldingsformulier knopstijl"
|
1299 |
+
|
1300 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:64
|
1301 |
+
msgid "Below and floating"
|
1302 |
+
msgstr "Onder en zwevend"
|
1303 |
+
|
1304 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:83
|
1305 |
+
msgid "Embedded Login form button style"
|
1306 |
+
msgstr "Geïntegreerd Loginformulier knopstijl"
|
1307 |
+
|
1308 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:102
|
1309 |
+
msgid "Embedded Login layout"
|
1310 |
+
msgstr "Geïntegreerd Login layout"
|
1311 |
+
|
1312 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form-pro.php:133
|
1313 |
+
msgid "Embedded login form button alignment"
|
1314 |
+
msgstr "Geïntegreerd inlogformulier knopuitlijning"
|
1315 |
+
|
1316 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form.php:22
|
1317 |
+
#: nextend-facebook-connect/includes/userData.php:134
|
1318 |
+
msgid "Registration Form"
|
1319 |
+
msgstr "Registratieformulier"
|
1320 |
+
|
1321 |
+
#: nextend-facebook-connect/admin/templates/settings/login-form.php:36
|
1322 |
+
msgid "Embedded login form"
|
1323 |
+
msgstr "Geïntegreerd inlogformulier"
|
1324 |
+
|
1325 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:69
|
1326 |
+
msgid "Sign Up form"
|
1327 |
+
msgstr "Aanmeldingsformulier"
|
1328 |
+
|
1329 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:74
|
1330 |
+
msgid "No Connect button in Sign Up form"
|
1331 |
+
msgstr "Geen Verbindingsknop in het aanmeldingsformulier"
|
1332 |
+
|
1333 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:77
|
1334 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:26
|
1335 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:92
|
1336 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:46
|
1337 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:51
|
1338 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:104
|
1339 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:109
|
1340 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:162
|
1341 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:167
|
1342 |
+
msgid "Connect button on"
|
1343 |
+
msgstr "Verbindingsknop op"
|
1344 |
+
|
1345 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:84
|
1346 |
+
msgid "Sign Up form button style"
|
1347 |
+
msgstr "Aanmeldingsformulier knopstijl"
|
1348 |
+
|
1349 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:103
|
1350 |
+
msgid "Sign Up layout"
|
1351 |
+
msgstr "Aanmelding layout"
|
1352 |
+
|
1353 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:135
|
1354 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:150
|
1355 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:212
|
1356 |
+
msgid "Account details"
|
1357 |
+
msgstr "Accountgegevens"
|
1358 |
+
|
1359 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:140
|
1360 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:155
|
1361 |
+
msgid "No link buttons"
|
1362 |
+
msgstr "Geen koppelknoppen"
|
1363 |
+
|
1364 |
+
#: nextend-facebook-connect/admin/templates/settings/memberpress.php:143
|
1365 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:158
|
1366 |
+
msgid "Link buttons after account details"
|
1367 |
+
msgstr "Koppelknoppen na accountgegevens"
|
1368 |
+
|
1369 |
+
#: nextend-facebook-connect/admin/templates/settings/privacy.php:6
|
1370 |
+
#: nextend-facebook-connect/nextend-social-login.php:140
|
1371 |
+
msgid ""
|
1372 |
+
"By clicking Register, you accept our <a href=\"#privacy_policy_url\" target="
|
1373 |
+
"\"_blank\">Privacy Policy</a>"
|
1374 |
+
msgstr ""
|
1375 |
+
"Door op Registreren te klikken, accepteer je onze <a href="
|
1376 |
+
"\"#privacy_policy_url\" target=\"_blank\">Privacybeleid</a>"
|
1377 |
+
|
1378 |
+
#: nextend-facebook-connect/admin/templates/settings/privacy.php:59
|
1379 |
+
msgid "Store"
|
1380 |
+
msgstr "Winkel"
|
1381 |
+
|
1382 |
+
#: nextend-facebook-connect/admin/templates/settings/privacy.php:65
|
1383 |
+
msgid "First and last name"
|
1384 |
+
msgstr "Voor- en achternaam"
|
1385 |
+
|
1386 |
+
#: nextend-facebook-connect/admin/templates/settings/privacy.php:68
|
1387 |
+
msgid "When not enabled, username will be randomly generated."
|
1388 |
+
msgstr ""
|
1389 |
+
"Indien niet ingeschakeld, wordt de gebruikersnaam willekeurig gegenereerd."
|
1390 |
+
|
1391 |
+
#: nextend-facebook-connect/admin/templates/settings/privacy.php:78
|
1392 |
+
#: nextend-social-login-pro/class-provider-extension.php:320
|
1393 |
+
msgid "Email"
|
1394 |
+
msgstr "E-mail"
|
1395 |
+
|
1396 |
+
#: nextend-facebook-connect/admin/templates/settings/privacy.php:81
|
1397 |
+
msgid "When not enabled, email will be empty."
|
1398 |
+
msgstr "Indien niet ingeschakeld, zal e-mail leeg zijn."
|
1399 |
+
|
1400 |
+
#: nextend-facebook-connect/admin/templates/settings/privacy.php:91
|
1401 |
+
#: nextend-facebook-connect/includes/avatar.php:59
|
1402 |
+
msgid "Avatar"
|
1403 |
+
msgstr "Profielfoto"
|
1404 |
+
|
1405 |
+
#: nextend-facebook-connect/admin/templates/settings/privacy.php:102
|
1406 |
+
#: nextend-facebook-connect/includes/provider.php:1040
|
1407 |
+
msgid "Access token"
|
1408 |
+
msgstr "Toegangstoken"
|
1409 |
+
|
1410 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:23
|
1411 |
+
msgid "No Connect button in Login form"
|
1412 |
+
msgstr "Geen Verbindingsknop in inlogformulier"
|
1413 |
+
|
1414 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:89
|
1415 |
+
msgid "No Connect button in Register form"
|
1416 |
+
msgstr "Geen Verbindingsknop in het Registratieformulier"
|
1417 |
+
|
1418 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:99
|
1419 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:96
|
1420 |
+
msgid "Register form button style"
|
1421 |
+
msgstr "Registratieformulier knopstijl"
|
1422 |
+
|
1423 |
+
#: nextend-facebook-connect/admin/templates/settings/ultimate-member.php:118
|
1424 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:115
|
1425 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:116
|
1426 |
+
msgid "Register layout"
|
1427 |
+
msgstr "Registratie layout"
|
1428 |
+
|
1429 |
+
#: nextend-facebook-connect/admin/templates/settings/userpro.php:31
|
1430 |
+
msgid "Register Form"
|
1431 |
+
msgstr "Registratieformulier"
|
1432 |
+
|
1433 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:43
|
1434 |
+
msgid "No Connect button in login form"
|
1435 |
+
msgstr "Geen Verbindingsknop in inlogformulier"
|
1436 |
+
|
1437 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:101
|
1438 |
+
msgid "No Connect button in register form"
|
1439 |
+
msgstr "Geen Verbindingsknop in registratieformulier"
|
1440 |
+
|
1441 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:154
|
1442 |
+
msgid "Billing form"
|
1443 |
+
msgstr "Factureringsformulier"
|
1444 |
+
|
1445 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:159
|
1446 |
+
msgid "No Connect button in billing form"
|
1447 |
+
msgstr "Geen Verbindingsknop in het factureringsformulier"
|
1448 |
+
|
1449 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:174
|
1450 |
+
msgid "Billing layout"
|
1451 |
+
msgstr "Facturering layout"
|
1452 |
+
|
1453 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:217
|
1454 |
+
msgid "No Connect buttons in account details form"
|
1455 |
+
msgstr "Geen Verbindingsknop in het accountgegevens formulier"
|
1456 |
+
|
1457 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:220
|
1458 |
+
#: nextend-facebook-connect/admin/templates/settings/woocommerce.php:225
|
1459 |
+
msgid "Link buttons on"
|
1460 |
+
msgstr "Koppelknoppen op"
|
1461 |
+
|
1462 |
+
#: nextend-facebook-connect/admin/templates/test-connection.php:41
|
1463 |
+
#, php-format
|
1464 |
+
msgid "Network connection successful: %1$s"
|
1465 |
+
msgstr "Netwerkverbinding succesvol: %1$s"
|
1466 |
+
|
1467 |
+
#: nextend-facebook-connect/admin/templates/test-connection.php:47
|
1468 |
+
#, php-format
|
1469 |
+
msgid "Network connection failed: %1$s"
|
1470 |
+
msgstr "Netwerkverbinding mislukt: %1$s"
|
1471 |
+
|
1472 |
+
#: nextend-facebook-connect/admin/templates/test-connection.php:50
|
1473 |
+
msgid ""
|
1474 |
+
"Please contact with your hosting provider to resolve the network issue "
|
1475 |
+
"between your server and the provider."
|
1476 |
+
msgstr ""
|
1477 |
+
"Neem contact op met je hostingprovider om het netwerkprobleem tussen je "
|
1478 |
+
"server en de provider op te lossen."
|
1479 |
+
|
1480 |
+
#: nextend-facebook-connect/includes/avatar.php:60
|
1481 |
+
msgid "Manage Avatar"
|
1482 |
+
msgstr "Profielfoto beheren"
|
1483 |
+
|
1484 |
+
#: nextend-facebook-connect/includes/avatar.php:61
|
1485 |
+
#, php-format
|
1486 |
+
msgid "Avatar <span class=\"count\">(%s)</span>"
|
1487 |
+
msgid_plural "Avatar <span class=\"count\">(%s)</span>"
|
1488 |
+
msgstr[0] "Profielfoto <span class=\"count\">(%s)</span>"
|
1489 |
+
msgstr[1] "Profielfoto <span class=\"count\">(%s)</span>"
|
1490 |
+
|
1491 |
+
#. translators: Login screen title. 1: Login screen name, 2: Network or site name
|
1492 |
+
#: nextend-facebook-connect/includes/compat-wp-login.php:42
|
1493 |
+
#, php-format
|
1494 |
+
msgid "%1$s ‹ %2$s — WordPress"
|
1495 |
+
msgstr "%1$s ‹ %2$s — WordPress"
|
1496 |
+
|
1497 |
+
#: nextend-facebook-connect/includes/compat-wp-login.php:97
|
1498 |
+
msgid "https://wordpress.org/"
|
1499 |
+
msgstr "https://nl.wordpress.org/"
|
1500 |
+
|
1501 |
+
#: nextend-facebook-connect/includes/compat-wp-login.php:98
|
1502 |
+
msgid "Powered by WordPress"
|
1503 |
+
msgstr "Mogelijk gemaakt door WordPress"
|
1504 |
+
|
1505 |
+
#. translators: %s: site title
|
1506 |
+
#: nextend-facebook-connect/includes/compat-wp-login.php:234
|
1507 |
+
#, php-format
|
1508 |
+
msgctxt "site"
|
1509 |
+
msgid "← Back to %s"
|
1510 |
+
msgstr "← Terug naar %s"
|
1511 |
+
|
1512 |
+
#: nextend-facebook-connect/includes/provider-admin.php:196
|
1513 |
+
msgid "Your configuration needs to be verified"
|
1514 |
+
msgstr "Je configuratie moet worden geverifieerd"
|
1515 |
+
|
1516 |
+
#: nextend-facebook-connect/includes/provider-admin.php:197
|
1517 |
+
msgid ""
|
1518 |
+
"Before you can start letting your users register with your app it needs to "
|
1519 |
+
"be tested. This test makes sure that no users will have troubles with the "
|
1520 |
+
"login and registration process. <br> If you see error message in the popup "
|
1521 |
+
"check the copied ID and secret or the app itself. Otherwise your settings "
|
1522 |
+
"are fine."
|
1523 |
+
msgstr ""
|
1524 |
+
"Voordat je kunt beginnen met het registreren van je gebruikers bij je app "
|
1525 |
+
"moet het eerst getest worden. Deze test zorgt ervoor dat geen enkele "
|
1526 |
+
"gebruiker problemen heeft met het inlog- en registratieproces. <br> Als je "
|
1527 |
+
"een foutmelding ziet in de popup, controleer dan de gekopieerde ID en het "
|
1528 |
+
"geheim of de app zelf. Anders zijn je instellingen in orde."
|
1529 |
+
|
1530 |
+
#: nextend-facebook-connect/includes/provider-admin.php:203
|
1531 |
+
msgid "Please save your changes to verify settings."
|
1532 |
+
msgstr "Sla je wijzigingen op om de instellingen te controleren."
|
1533 |
+
|
1534 |
+
#: nextend-facebook-connect/includes/provider-admin.php:211
|
1535 |
+
msgid "Works Fine"
|
1536 |
+
msgstr "Werkt Prima"
|
1537 |
+
|
1538 |
+
#: nextend-facebook-connect/includes/provider-admin.php:225
|
1539 |
+
#, php-format
|
1540 |
+
msgid ""
|
1541 |
+
"This provider is currently disabled, which means that users can’t register "
|
1542 |
+
"or login via their %s account."
|
1543 |
+
msgstr ""
|
1544 |
+
"Deze provider is momenteel uitgeschakeld, wat betekent dat gebruikers zich "
|
1545 |
+
"niet kunnen registreren of inloggen via hun %s account."
|
1546 |
+
|
1547 |
+
#: nextend-facebook-connect/includes/provider-admin.php:228
|
1548 |
+
#, php-format
|
1549 |
+
msgid ""
|
1550 |
+
"This provider works fine, but you can test it again. If you don’t want to "
|
1551 |
+
"let users register or login with %s anymore you can disable it."
|
1552 |
+
msgstr ""
|
1553 |
+
"Deze provider werkt prima, maar je kunt deze opnieuw testen. Als je "
|
1554 |
+
"gebruikers niet meer wilt laten registreren of inloggen met %s kun je deze "
|
1555 |
+
"uitschakelen."
|
1556 |
+
|
1557 |
+
#: nextend-facebook-connect/includes/provider-admin.php:231
|
1558 |
+
#, php-format
|
1559 |
+
msgid ""
|
1560 |
+
"This provider is currently enabled, which means that users can register or "
|
1561 |
+
"login via their %s account."
|
1562 |
+
msgstr ""
|
1563 |
+
"Deze provider is momenteel ingeschakeld, wat betekent dat gebruikers zich "
|
1564 |
+
"kunnen registreren of inloggen via hun %s account."
|
1565 |
+
|
1566 |
+
#: nextend-facebook-connect/includes/provider-admin.php:239
|
1567 |
+
msgid "Verify Settings Again"
|
1568 |
+
msgstr "Controleer Instellingen Nogmaals"
|
1569 |
+
|
1570 |
+
#: nextend-facebook-connect/includes/provider-admin.php:240
|
1571 |
+
msgid "Please save your changes before verifying settings."
|
1572 |
+
msgstr "Sla je wijzigingen op voordat je de instellingen controleert."
|
1573 |
+
|
1574 |
+
#: nextend-facebook-connect/includes/provider.php:347
|
1575 |
+
#: nextend-facebook-connect/includes/provider.php:666
|
1576 |
+
#: nextend-facebook-connect/includes/provider.php:671
|
1577 |
+
msgid "Authentication successful"
|
1578 |
+
msgstr "Authenticatie geslaagd"
|
1579 |
+
|
1580 |
+
#: nextend-facebook-connect/includes/provider.php:608
|
1581 |
+
#: nextend-facebook-connect/includes/user.php:123
|
1582 |
+
msgid "Authentication error"
|
1583 |
+
msgstr "Authenticatiefout"
|
1584 |
+
|
1585 |
+
#: nextend-facebook-connect/includes/provider.php:623
|
1586 |
+
msgid "Unlink successful."
|
1587 |
+
msgstr "Ontkoppeling succesvol."
|
1588 |
+
|
1589 |
+
#: nextend-facebook-connect/includes/provider.php:625
|
1590 |
+
msgid "Unlink is not allowed!"
|
1591 |
+
msgstr "Ontkoppelen is niet toegestaan!"
|
1592 |
+
|
1593 |
+
#: nextend-facebook-connect/includes/provider.php:829
|
1594 |
+
#: nextend-facebook-connect/includes/provider.php:836
|
1595 |
+
msgid "The test was successful"
|
1596 |
+
msgstr "De test was succesvol"
|
1597 |
+
|
1598 |
+
#: nextend-facebook-connect/includes/provider.php:882
|
1599 |
+
msgid "Authentication failed"
|
1600 |
+
msgstr "Authenticatie mislukt"
|
1601 |
+
|
1602 |
+
#: nextend-facebook-connect/includes/provider.php:1032
|
1603 |
+
msgid "Identifier"
|
1604 |
+
msgstr "Identificatie"
|
1605 |
+
|
1606 |
+
#: nextend-facebook-connect/includes/provider.php:1048
|
1607 |
+
msgid "Profile picture"
|
1608 |
+
msgstr "Profielfoto"
|
1609 |
+
|
1610 |
+
#: nextend-facebook-connect/includes/user.php:69
|
1611 |
+
#, php-format
|
1612 |
+
msgid ""
|
1613 |
+
"Your %1$s account is successfully linked with your account. Now you can sign "
|
1614 |
+
"in with %2$s easily."
|
1615 |
+
msgstr ""
|
1616 |
+
"Je %1$s account is succesvol gekoppeld aan je account. Je kunt je nu "
|
1617 |
+
"gemakkelijk aanmelden met %2$s."
|
1618 |
+
|
1619 |
+
#: nextend-facebook-connect/includes/user.php:72
|
1620 |
+
#, php-format
|
1621 |
+
msgid ""
|
1622 |
+
"You have already linked a(n) %s account. Please unlink the current and then "
|
1623 |
+
"you can link other %s account."
|
1624 |
+
msgstr ""
|
1625 |
+
"Je hebt al een %s account gekoppeld. Ontkoppel de huidige en dan kun je "
|
1626 |
+
"andere %s account koppelen."
|
1627 |
+
|
1628 |
+
#: nextend-facebook-connect/includes/user.php:77
|
1629 |
+
#, php-format
|
1630 |
+
msgid "This %s account is already linked to other user."
|
1631 |
+
msgstr "Dit %s account is al gekoppeld aan een andere gebruiker."
|
1632 |
+
|
1633 |
+
#: nextend-facebook-connect/includes/user.php:118
|
1634 |
+
msgid "User registration is currently not allowed."
|
1635 |
+
msgstr "Gebruikersregistratie is momenteel niet toegestaan."
|
1636 |
+
|
1637 |
+
#: nextend-facebook-connect/includes/userData.php:134
|
1638 |
+
msgid "Register For This Site!"
|
1639 |
+
msgstr "Registreer Voor Deze Site!"
|
1640 |
+
|
1641 |
+
#. translators: %2$s: PHP version
|
1642 |
+
#: nextend-facebook-connect/nextend-facebook-connect.php:34
|
1643 |
+
#, php-format
|
1644 |
+
msgid "%1$s requires PHP version %2$s+, plugin is currently NOT ACTIVE."
|
1645 |
+
msgstr "%1$s vereist PHP versie %2$s+, plugin is momenteel NIET ACTIEF."
|
1646 |
+
|
1647 |
+
#. translators: %2$s: WordPress version
|
1648 |
+
#: nextend-facebook-connect/nextend-facebook-connect.php:41
|
1649 |
+
#, php-format
|
1650 |
+
msgid ""
|
1651 |
+
"%1$s requires WordPress version %2$s+. Because you are using an earlier "
|
1652 |
+
"version, the plugin is currently NOT ACTIVE."
|
1653 |
+
msgstr ""
|
1654 |
+
"%1$s vereist WordPress versie %2$s+. Omdat je een eerdere versie gebruikt, "
|
1655 |
+
"is de plugin momenteel NIET ACTIEF."
|
1656 |
+
|
1657 |
+
#: nextend-facebook-connect/nextend-social-login.php:53
|
1658 |
+
#: nextend-facebook-connect/nextend-social-login.php:60
|
1659 |
+
#, php-format
|
1660 |
+
msgid "Please update %1$s to version %2$s or newer."
|
1661 |
+
msgstr "Gelieve %1$s bij te werken naar versie %2$s of nieuwer."
|
1662 |
+
|
1663 |
+
#: nextend-facebook-connect/nextend-social-login.php:53
|
1664 |
+
#: nextend-facebook-connect/nextend-social-login.php:60
|
1665 |
+
msgid "Update now!"
|
1666 |
+
msgstr "Update nu!"
|
1667 |
+
|
1668 |
+
#: nextend-facebook-connect/nextend-social-login.php:715
|
1669 |
+
#: nextend-facebook-connect/nextend-social-login.php:1080
|
1670 |
+
msgid "Social Login"
|
1671 |
+
msgstr "Social Login"
|
1672 |
+
|
1673 |
+
#: nextend-facebook-connect/nextend-social-login.php:1061
|
1674 |
+
msgid "Social Accounts"
|
1675 |
+
msgstr "Social Accounts"
|
1676 |
+
|
1677 |
+
#: nextend-facebook-connect/providers/facebook/admin/fix-redirect-uri.php:8
|
1678 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:22
|
1679 |
+
#: nextend-facebook-connect/providers/google/admin/fix-redirect-uri.php:8
|
1680 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:16
|
1681 |
+
#: nextend-facebook-connect/providers/twitter/admin/fix-redirect-uri.php:8
|
1682 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:16
|
1683 |
+
#: nextend-social-login-pro/providers/amazon/admin/fix-redirect-uri.php:8
|
1684 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:22
|
1685 |
+
#: nextend-social-login-pro/providers/disqus/admin/fix-redirect-uri.php:8
|
1686 |
+
#: nextend-social-login-pro/providers/disqus/admin/getting-started.php:15
|
1687 |
+
#: nextend-social-login-pro/providers/linkedin/admin/fix-redirect-uri.php:8
|
1688 |
+
#: nextend-social-login-pro/providers/linkedin/admin/getting-started.php:15
|
1689 |
+
#: nextend-social-login-pro/providers/paypal/admin/fix-redirect-uri.php:8
|
1690 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:15
|
1691 |
+
#: nextend-social-login-pro/providers/vk/admin/fix-redirect-uri.php:8
|
1692 |
+
#: nextend-social-login-pro/providers/vk/admin/getting-started.php:15
|
1693 |
+
#: nextend-social-login-pro/providers/wordpress/admin/fix-redirect-uri.php:8
|
1694 |
+
#: nextend-social-login-pro/providers/wordpress/admin/getting-started.php:15
|
1695 |
+
#: nextend-social-login-pro/providers/yahoo/admin/fix-redirect-uri.php:8
|
1696 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:16
|
1697 |
+
#, php-format
|
1698 |
+
msgid "Navigate to %s"
|
1699 |
+
msgstr "Navigeer naar %s"
|
1700 |
+
|
1701 |
+
#: nextend-facebook-connect/providers/facebook/admin/fix-redirect-uri.php:9
|
1702 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:23
|
1703 |
+
#: nextend-facebook-connect/providers/google/admin/fix-redirect-uri.php:9
|
1704 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:17
|
1705 |
+
#: nextend-facebook-connect/providers/twitter/admin/fix-redirect-uri.php:9
|
1706 |
+
#: nextend-social-login-pro/providers/amazon/admin/fix-redirect-uri.php:9
|
1707 |
+
#: nextend-social-login-pro/providers/linkedin/admin/fix-redirect-uri.php:9
|
1708 |
+
#: nextend-social-login-pro/providers/linkedin/admin/getting-started.php:16
|
1709 |
+
#: nextend-social-login-pro/providers/vk/admin/fix-redirect-uri.php:9
|
1710 |
+
#: nextend-social-login-pro/providers/yahoo/admin/fix-redirect-uri.php:9
|
1711 |
+
#, php-format
|
1712 |
+
msgid "Log in with your %s credentials if you are not logged in"
|
1713 |
+
msgstr "Log in met je %s inloggegevens als je niet ingelogd bent"
|
1714 |
+
|
1715 |
+
#: nextend-facebook-connect/providers/facebook/admin/fix-redirect-uri.php:10
|
1716 |
+
#, php-format
|
1717 |
+
msgid "Click on the App with App ID: %s"
|
1718 |
+
msgstr "Klik op de App met App ID: %s"
|
1719 |
+
|
1720 |
+
#: nextend-facebook-connect/providers/facebook/admin/fix-redirect-uri.php:11
|
1721 |
+
msgid "In the left sidebar, click on \"Facebook Login/Settings\""
|
1722 |
+
msgstr "Klik in de linkerbalk op \"Facebook Login/Instellingen\""
|
1723 |
+
|
1724 |
+
#: nextend-facebook-connect/providers/facebook/admin/fix-redirect-uri.php:12
|
1725 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:32
|
1726 |
+
#, php-format
|
1727 |
+
msgid ""
|
1728 |
+
"Add the following URL to the \"Valid OAuth redirect URIs\" field: <b>%s</b>"
|
1729 |
+
msgstr ""
|
1730 |
+
"Voeg de volgende URL toe aan het veld \"Geldige OAuth omleidings-URI's\": <b>"
|
1731 |
+
"%s</b>"
|
1732 |
+
|
1733 |
+
#: nextend-facebook-connect/providers/facebook/admin/fix-redirect-uri.php:13
|
1734 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:30
|
1735 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:33
|
1736 |
+
msgid "Click on \"Save Changes\""
|
1737 |
+
msgstr "Klik op \"Wijzigingen Opslaan\""
|
1738 |
+
|
1739 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:11
|
1740 |
+
#: nextend-facebook-connect/providers/facebook/admin/settings.php:13
|
1741 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:11
|
1742 |
+
#, php-format
|
1743 |
+
msgid ""
|
1744 |
+
"%1$s allows HTTPS OAuth Redirects only. You must move your site to HTTPS in "
|
1745 |
+
"order to allow login with %1$s."
|
1746 |
+
msgstr ""
|
1747 |
+
"%1$s staat alleen HTTPS OAuth Omleidingen toe. Je moet je site verplaatsen "
|
1748 |
+
"naar HTTPS om in te kunnen loggen met %1$s."
|
1749 |
+
|
1750 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:12
|
1751 |
+
#: nextend-facebook-connect/providers/facebook/admin/settings.php:14
|
1752 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:12
|
1753 |
+
msgid "How to get SSL for my WordPress site?"
|
1754 |
+
msgstr "Hoe krijg ik SSL voor mijn WordPress site?"
|
1755 |
+
|
1756 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:17
|
1757 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:11
|
1758 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:11
|
1759 |
+
#: nextend-social-login-pro/providers/linkedin/admin/getting-started.php:10
|
1760 |
+
#: nextend-social-login-pro/providers/vk/admin/getting-started.php:10
|
1761 |
+
#, php-format
|
1762 |
+
msgid ""
|
1763 |
+
"To allow your visitors to log in with their %1$s account, first you must "
|
1764 |
+
"create a %1$s App. The following guide will help you through the %1$s App "
|
1765 |
+
"creation process. After you have created your %1$s App, head over to "
|
1766 |
+
"\"Settings\" and configure the given \"%2$s\" and \"%3$s\" according to your "
|
1767 |
+
"%1$s App."
|
1768 |
+
msgstr ""
|
1769 |
+
"Om je bezoekers in te laten loggen met hun %1$s account, moet je eerst een "
|
1770 |
+
"%1$s App aanmaken. De volgende gids helpt je door het %1$s App "
|
1771 |
+
"creatieproces. Nadat je je %1$s App heeft aangemaakt, ga je naar "
|
1772 |
+
"\"Instellingen\" en configureer je de gegeven \"%2$s\" en \"%3$s\" volgens "
|
1773 |
+
"je %1$s App."
|
1774 |
+
|
1775 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:19
|
1776 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:13
|
1777 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:13
|
1778 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:19
|
1779 |
+
#: nextend-social-login-pro/providers/disqus/admin/getting-started.php:12
|
1780 |
+
#: nextend-social-login-pro/providers/linkedin/admin/getting-started.php:12
|
1781 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:12
|
1782 |
+
#: nextend-social-login-pro/providers/vk/admin/getting-started.php:12
|
1783 |
+
#: nextend-social-login-pro/providers/wordpress/admin/getting-started.php:12
|
1784 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:13
|
1785 |
+
#, php-format
|
1786 |
+
msgctxt "App creation"
|
1787 |
+
msgid "Create %s"
|
1788 |
+
msgstr "Maak %s"
|
1789 |
+
|
1790 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:24
|
1791 |
+
msgid "Click on the \"Add a New App\" button"
|
1792 |
+
msgstr "Klik op de knop \"Een nieuwe app toevoegen\""
|
1793 |
+
|
1794 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:25
|
1795 |
+
#, php-format
|
1796 |
+
msgid ""
|
1797 |
+
"Fill \"Display Name\" and \"Contact Email\". The specified \"Display Name\" "
|
1798 |
+
"will appear on your %s!"
|
1799 |
+
msgstr ""
|
1800 |
+
"Vul \"Schermnaam\" en \"E-mail\" in. De opgegeven \"Schermnaam\" zal "
|
1801 |
+
"verschijnen op je %s!"
|
1802 |
+
|
1803 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:26
|
1804 |
+
msgid "Click on blue \"Create App ID\" button"
|
1805 |
+
msgstr "Klik op de blauwe knop \"Maak App ID aan\""
|
1806 |
+
|
1807 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:27
|
1808 |
+
msgid ""
|
1809 |
+
"Select \"Integrate Facebook Login\" at the Select a Scenario page, then "
|
1810 |
+
"click Confirm."
|
1811 |
+
msgstr ""
|
1812 |
+
"Selecteer \"Integreer Facebook Login\" op de Selecteer een Scenario pagina "
|
1813 |
+
"en klik vervolgens op Bevestigen."
|
1814 |
+
|
1815 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:28
|
1816 |
+
msgid "Enter your domain name to the App Domains"
|
1817 |
+
msgstr "Voer je domeinnaam in bij de App Domeinen"
|
1818 |
+
|
1819 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:29
|
1820 |
+
msgid ""
|
1821 |
+
"Fill up the \"Privacy Policy URL\". Provide a publicly available and easily "
|
1822 |
+
"accessible privacy policy that explains what data you are collecting and how "
|
1823 |
+
"you will use that data."
|
1824 |
+
msgstr ""
|
1825 |
+
"Vul de \"Privacy Policy URL\" in. Zorg voor een openbaar beschikbaar en "
|
1826 |
+
"gemakkelijk toegankelijk privacybeleid waarin wordt uitgelegd welke gegevens "
|
1827 |
+
"je verzamelt en hoe je deze gegevens zult gebruiken."
|
1828 |
+
|
1829 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:31
|
1830 |
+
msgid ""
|
1831 |
+
"In the left sidebar under the Products section, click on \"Facebook Login\" "
|
1832 |
+
"and select Settings"
|
1833 |
+
msgstr ""
|
1834 |
+
"Klik in de linkerzijbalk onder de Producten-sectie op \"Facebook Login\" en "
|
1835 |
+
"selecteer Instellingen"
|
1836 |
+
|
1837 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:34
|
1838 |
+
msgid ""
|
1839 |
+
"In the top of the left sidebar, click on \"Settings\" and select \"Basic\""
|
1840 |
+
msgstr ""
|
1841 |
+
"Klik bovenaan de linker zijbalk op \"Instellingen\" en selecteer \"Basis\""
|
1842 |
+
|
1843 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:35
|
1844 |
+
msgid ""
|
1845 |
+
"Here you can see your \"APP ID\" and you can see your \"App secret\" if you "
|
1846 |
+
"click on the \"Show\" button. These will be needed in plugin's settings."
|
1847 |
+
msgstr ""
|
1848 |
+
"Hier kun je je \"APP ID\" zien en je \"App geheim\" als je op de knop "
|
1849 |
+
"\"Weergeven\" klikt. Deze zullen nodig zijn in de instellingen van de plugin."
|
1850 |
+
|
1851 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:36
|
1852 |
+
msgid ""
|
1853 |
+
"Your application is currently private ( Status: In Development ), which "
|
1854 |
+
"means that only you can log in with it. In the top bar click on the \"OFF\" "
|
1855 |
+
"switcher and select a category for your App."
|
1856 |
+
msgstr ""
|
1857 |
+
"Je applicatie is momenteel privé (Status: In Ontwikkeling), wat betekent dat "
|
1858 |
+
"alleen jij ermee kunt inloggen. Klik in de bovenste balk op de \"OFF\" "
|
1859 |
+
"schakelaar en selecteer een categorie voor je App."
|
1860 |
+
|
1861 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:37
|
1862 |
+
msgid "By clicking \"Confirm\", the Status of your App will go Live."
|
1863 |
+
msgstr "Door op \"Bevestigen\" te klikken, wordt de Status van je app Live."
|
1864 |
+
|
1865 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:41
|
1866 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:36
|
1867 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:32
|
1868 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:37
|
1869 |
+
#: nextend-social-login-pro/providers/disqus/admin/getting-started.php:30
|
1870 |
+
#: nextend-social-login-pro/providers/linkedin/admin/getting-started.php:28
|
1871 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:34
|
1872 |
+
#: nextend-social-login-pro/providers/vk/admin/getting-started.php:31
|
1873 |
+
#: nextend-social-login-pro/providers/wordpress/admin/getting-started.php:30
|
1874 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:39
|
1875 |
+
#, php-format
|
1876 |
+
msgid "I am done setting up my %s"
|
1877 |
+
msgstr "Ik ben klaar met het instellen van mijn %s"
|
1878 |
+
|
1879 |
+
#: nextend-facebook-connect/providers/facebook/admin/settings.php:33
|
1880 |
+
msgid "App ID"
|
1881 |
+
msgstr "App ID"
|
1882 |
+
|
1883 |
+
#: nextend-facebook-connect/providers/facebook/admin/settings.php:34
|
1884 |
+
#: nextend-facebook-connect/providers/facebook/admin/settings.php:46
|
1885 |
+
#: nextend-facebook-connect/providers/google/admin/settings.php:28
|
1886 |
+
#: nextend-facebook-connect/providers/google/admin/settings.php:41
|
1887 |
+
#: nextend-facebook-connect/providers/twitter/admin/settings.php:28
|
1888 |
+
#: nextend-social-login-pro/providers/amazon/admin/settings.php:27
|
1889 |
+
#: nextend-social-login-pro/providers/amazon/admin/settings.php:39
|
1890 |
+
#: nextend-social-login-pro/providers/disqus/admin/settings.php:27
|
1891 |
+
#: nextend-social-login-pro/providers/disqus/admin/settings.php:39
|
1892 |
+
#: nextend-social-login-pro/providers/linkedin/admin/settings.php:27
|
1893 |
+
#: nextend-social-login-pro/providers/linkedin/admin/settings.php:39
|
1894 |
+
#: nextend-social-login-pro/providers/paypal/admin/settings.php:27
|
1895 |
+
#: nextend-social-login-pro/providers/paypal/admin/settings.php:39
|
1896 |
+
#: nextend-social-login-pro/providers/vk/admin/settings.php:27
|
1897 |
+
#: nextend-social-login-pro/providers/vk/admin/settings.php:39
|
1898 |
+
#: nextend-social-login-pro/providers/wordpress/admin/settings.php:27
|
1899 |
+
#: nextend-social-login-pro/providers/wordpress/admin/settings.php:39
|
1900 |
+
#: nextend-social-login-pro/providers/yahoo/admin/settings.php:27
|
1901 |
+
#: nextend-social-login-pro/providers/yahoo/admin/settings.php:39
|
1902 |
+
msgid "Required"
|
1903 |
+
msgstr "Verplicht"
|
1904 |
+
|
1905 |
+
#: nextend-facebook-connect/providers/facebook/admin/settings.php:39
|
1906 |
+
#: nextend-facebook-connect/providers/google/admin/settings.php:35
|
1907 |
+
#: nextend-facebook-connect/providers/twitter/admin/settings.php:33
|
1908 |
+
#: nextend-social-login-pro/providers/amazon/admin/settings.php:33
|
1909 |
+
#: nextend-social-login-pro/providers/disqus/admin/settings.php:33
|
1910 |
+
#: nextend-social-login-pro/providers/linkedin/admin/settings.php:33
|
1911 |
+
#: nextend-social-login-pro/providers/paypal/admin/settings.php:33
|
1912 |
+
#: nextend-social-login-pro/providers/vk/admin/settings.php:33
|
1913 |
+
#: nextend-social-login-pro/providers/wordpress/admin/settings.php:33
|
1914 |
+
#: nextend-social-login-pro/providers/yahoo/admin/settings.php:33
|
1915 |
+
#, php-format
|
1916 |
+
msgid ""
|
1917 |
+
"If you are not sure what is your %1$s, please head over to <a href=\"%2$s"
|
1918 |
+
"\">Getting Started</a>"
|
1919 |
+
msgstr ""
|
1920 |
+
"Als je niet zeker weet wat je %1$s is, ga dan naar <a href=\"%2$s\">Aan de "
|
1921 |
+
"slag</a>"
|
1922 |
+
|
1923 |
+
#: nextend-facebook-connect/providers/facebook/admin/settings.php:45
|
1924 |
+
msgid "App Secret"
|
1925 |
+
msgstr "App Geheim"
|
1926 |
+
|
1927 |
+
#: nextend-facebook-connect/providers/facebook/facebook.php:77
|
1928 |
+
msgid "Continue with <b>Facebook</b>"
|
1929 |
+
msgstr "Doorgaan met <b>Facebook</b>"
|
1930 |
+
|
1931 |
+
#: nextend-facebook-connect/providers/facebook/facebook.php:78
|
1932 |
+
msgid "Link account with <b>Facebook</b>"
|
1933 |
+
msgstr "Koppel met <b>Facebook</b>"
|
1934 |
+
|
1935 |
+
#: nextend-facebook-connect/providers/facebook/facebook.php:79
|
1936 |
+
msgid "Unlink account from <b>Facebook</b>"
|
1937 |
+
msgstr "Ontkoppel van <b>Facebook</b>"
|
1938 |
+
|
1939 |
+
#: nextend-facebook-connect/providers/facebook/facebook.php:133
|
1940 |
+
#: nextend-facebook-connect/providers/google/google.php:155
|
1941 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:93
|
1942 |
+
#: nextend-social-login-pro/providers/amazon/amazon.php:63
|
1943 |
+
#: nextend-social-login-pro/providers/disqus/disqus.php:110
|
1944 |
+
#: nextend-social-login-pro/providers/linkedin/linkedin.php:62
|
1945 |
+
#: nextend-social-login-pro/providers/paypal/paypal.php:88
|
1946 |
+
#: nextend-social-login-pro/providers/vk/vk.php:60
|
1947 |
+
#: nextend-social-login-pro/providers/wordpress/wordpress.php:97
|
1948 |
+
#: nextend-social-login-pro/providers/yahoo/yahoo.php:87
|
1949 |
+
#, php-format
|
1950 |
+
msgid ""
|
1951 |
+
"The %1$s entered did not appear to be a valid. Please enter a valid %2$s."
|
1952 |
+
msgstr "Het ingevoerde %1$s bleek niet geldig te zijn. Vul een geldig %2$s in."
|
1953 |
+
|
1954 |
+
#: nextend-facebook-connect/providers/facebook/facebook.php:246
|
1955 |
+
#: nextend-social-login-pro/providers/paypal/paypal.php:168
|
1956 |
+
#, php-format
|
1957 |
+
msgid "Required scope: %1$s"
|
1958 |
+
msgstr "Vereiste scope: %1$s"
|
1959 |
+
|
1960 |
+
#: nextend-facebook-connect/providers/google/admin/buttons.php:2
|
1961 |
+
msgid "Button skin"
|
1962 |
+
msgstr "Knop skin"
|
1963 |
+
|
1964 |
+
#: nextend-facebook-connect/providers/google/admin/buttons.php:8
|
1965 |
+
msgid "Uniform"
|
1966 |
+
msgstr "Uniform"
|
1967 |
+
|
1968 |
+
#: nextend-facebook-connect/providers/google/admin/buttons.php:14
|
1969 |
+
msgid "Light"
|
1970 |
+
msgstr "Licht"
|
1971 |
+
|
1972 |
+
#: nextend-facebook-connect/providers/google/admin/buttons.php:20
|
1973 |
+
msgid "Dark"
|
1974 |
+
msgstr "Donker"
|
1975 |
+
|
1976 |
+
#: nextend-facebook-connect/providers/google/admin/fix-redirect-uri.php:10
|
1977 |
+
msgid "Click on the \"Credentials\" in the left hand menu"
|
1978 |
+
msgstr "Klik op de \"Inloggegevens\" in het linker menu"
|
1979 |
+
|
1980 |
+
#: nextend-facebook-connect/providers/google/admin/fix-redirect-uri.php:11
|
1981 |
+
#, php-format
|
1982 |
+
msgid "Click on OAuth 2.0 client ID: %s"
|
1983 |
+
msgstr "Klik op OAuth 2.0 client ID: %s"
|
1984 |
+
|
1985 |
+
#: nextend-facebook-connect/providers/google/admin/fix-redirect-uri.php:12
|
1986 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:30
|
1987 |
+
#, php-format
|
1988 |
+
msgid ""
|
1989 |
+
"Add the following URL to the \"Authorised redirect URIs\" field: <b>%s</b>"
|
1990 |
+
msgstr ""
|
1991 |
+
"Voeg de volgende URL toe aan het veld \"Geautoriseerde omleidings-URIs\": <b>"
|
1992 |
+
"%s</b>"
|
1993 |
+
|
1994 |
+
#: nextend-facebook-connect/providers/google/admin/fix-redirect-uri.php:13
|
1995 |
+
#: nextend-facebook-connect/providers/twitter/admin/fix-redirect-uri.php:13
|
1996 |
+
#: nextend-social-login-pro/providers/amazon/admin/fix-redirect-uri.php:14
|
1997 |
+
#: nextend-social-login-pro/providers/paypal/admin/fix-redirect-uri.php:15
|
1998 |
+
msgid "Click on \"Save\""
|
1999 |
+
msgstr "Klik op \"Opslaan\""
|
2000 |
+
|
2001 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:18
|
2002 |
+
msgid ""
|
2003 |
+
"If you don't have a project yet, you'll need to create one. You can do this "
|
2004 |
+
"by clicking on the blue \"Create project\" button on the right side! ( If "
|
2005 |
+
"you already have a project, click on the name of your project in the "
|
2006 |
+
"dashboard instead, which will bring up a modal and click New Project. )"
|
2007 |
+
msgstr ""
|
2008 |
+
"Als je nog geen project hebt, moet je er een maken. Je kunt dit doen door op "
|
2009 |
+
"de blauwe knop \"Maak project\" aan de rechterkant te klikken! (Als je al "
|
2010 |
+
"een project hebt, klik dan op de naam van je project in plaats daarvan in "
|
2011 |
+
"het dashboard, die een modal zal weergeven en klik op Nieuw Project. )"
|
2012 |
+
|
2013 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:19
|
2014 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:24
|
2015 |
+
msgid "Click the Create button."
|
2016 |
+
msgstr "Klik op de knop Maken."
|
2017 |
+
|
2018 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:20
|
2019 |
+
msgid "Name your project and then click on the Create button again"
|
2020 |
+
msgstr "Geef je project een naam en klik dan opnieuw op de knop Aanmaken"
|
2021 |
+
|
2022 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:21
|
2023 |
+
msgid "Once you have a project, you'll end up in the dashboard."
|
2024 |
+
msgstr "Als je eenmaal een project hebt, kom je in het dashboard terecht."
|
2025 |
+
|
2026 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:22
|
2027 |
+
msgid ""
|
2028 |
+
"Click on the \"Credentials\" in the left hand menu to create new API "
|
2029 |
+
"credentials"
|
2030 |
+
msgstr ""
|
2031 |
+
"Klik op de \"Inloggegevens\" in het linker menu om nieuwe API-inloggegevens "
|
2032 |
+
"aan te maken"
|
2033 |
+
|
2034 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:23
|
2035 |
+
msgid "Select the OAuth consent screen!"
|
2036 |
+
msgstr "Selecteer het OAuth toestemmingsscherm!"
|
2037 |
+
|
2038 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:24
|
2039 |
+
msgid ""
|
2040 |
+
"Enter a name for your App under the \"Application name\" field, which will "
|
2041 |
+
"appear as the name of the app asking for consent."
|
2042 |
+
msgstr ""
|
2043 |
+
"Voer een naam in voor je App in het veld \"Toepassingsnaam\", die zal "
|
2044 |
+
"verschijnen als de naam van de app die om toestemming vraagt."
|
2045 |
+
|
2046 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:25
|
2047 |
+
#, php-format
|
2048 |
+
msgid ""
|
2049 |
+
"Fill the \"Authorized domains\" field with your domain name probably: <b>%s</"
|
2050 |
+
"b> without subdomains!"
|
2051 |
+
msgstr ""
|
2052 |
+
"Vul het veld \"Geautoriseerde domeinen\" in met je domeinnaam "
|
2053 |
+
"waarschijnlijk: <b>%s</b> zonder subdomeinen!"
|
2054 |
+
|
2055 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:26
|
2056 |
+
msgid "Press \"Save\" and you will be redirected back to Credentials screen."
|
2057 |
+
msgstr "Druk op \"Opslaan\" en je wordt terug omgeleid naar het inlogscherm."
|
2058 |
+
|
2059 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:27
|
2060 |
+
msgid ""
|
2061 |
+
"Click the Create credentials button and select \"OAuth client ID\" from the "
|
2062 |
+
"dropdown."
|
2063 |
+
msgstr ""
|
2064 |
+
"Klik op de knop Creëer inloggegevens en selecteer \"OAuth client ID\" in de "
|
2065 |
+
"dropdown."
|
2066 |
+
|
2067 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:28
|
2068 |
+
msgid "Your application type should be \"Web application\""
|
2069 |
+
msgstr "Je applicatie-type moet \"Web-applicatie\" zijn"
|
2070 |
+
|
2071 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:29
|
2072 |
+
msgid "Name your application"
|
2073 |
+
msgstr "Geef je applicatie een naam"
|
2074 |
+
|
2075 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:31
|
2076 |
+
msgid "Click on the Create button"
|
2077 |
+
msgstr "Klik op de knop Aanmaken"
|
2078 |
+
|
2079 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:32
|
2080 |
+
msgid ""
|
2081 |
+
"A modal should pop up with your credentials. If that doesn't happen, go to "
|
2082 |
+
"the Credentials in the left hand menu and select your app by clicking on its "
|
2083 |
+
"name and you'll be able to copy-paste the Client ID and Client Secret from "
|
2084 |
+
"there."
|
2085 |
+
msgstr ""
|
2086 |
+
"Een modal moet opduiken met je inloggegevens. Als dat niet gebeurt, ga dan "
|
2087 |
+
"naar de Inloggegevens in het linkermenu en selecteer je app door op de naam "
|
2088 |
+
"te klikken en je kunt van daaruit de Client ID en Client Geheim kopiëren en "
|
2089 |
+
"plakken."
|
2090 |
+
|
2091 |
+
#: nextend-facebook-connect/providers/google/admin/settings.php:27
|
2092 |
+
#: nextend-social-login-pro/providers/amazon/admin/settings.php:26
|
2093 |
+
#: nextend-social-login-pro/providers/linkedin/admin/settings.php:26
|
2094 |
+
#: nextend-social-login-pro/providers/paypal/admin/settings.php:26
|
2095 |
+
#: nextend-social-login-pro/providers/wordpress/admin/settings.php:26
|
2096 |
+
#: nextend-social-login-pro/providers/yahoo/admin/settings.php:26
|
2097 |
+
msgid "Client ID"
|
2098 |
+
msgstr "Client ID"
|
2099 |
+
|
2100 |
+
#: nextend-facebook-connect/providers/google/admin/settings.php:40
|
2101 |
+
#: nextend-social-login-pro/providers/amazon/admin/settings.php:38
|
2102 |
+
#: nextend-social-login-pro/providers/linkedin/admin/settings.php:38
|
2103 |
+
#: nextend-social-login-pro/providers/wordpress/admin/settings.php:38
|
2104 |
+
#: nextend-social-login-pro/providers/yahoo/admin/settings.php:38
|
2105 |
+
msgid "Client Secret"
|
2106 |
+
msgstr "Client Geheim"
|
2107 |
+
|
2108 |
+
#: nextend-facebook-connect/providers/google/google.php:103
|
2109 |
+
msgid "Continue with <b>Google</b>"
|
2110 |
+
msgstr "Doorgaan met <b>Google</b>"
|
2111 |
+
|
2112 |
+
#: nextend-facebook-connect/providers/google/google.php:104
|
2113 |
+
msgid "Link account with <b>Google</b>"
|
2114 |
+
msgstr "Koppel met <b>Google</b>"
|
2115 |
+
|
2116 |
+
#: nextend-facebook-connect/providers/google/google.php:105
|
2117 |
+
msgid "Unlink account from <b>Google</b>"
|
2118 |
+
msgstr "Ontkoppel van <b>Google</b>"
|
2119 |
+
|
2120 |
+
#: nextend-facebook-connect/providers/google/google.php:275
|
2121 |
+
#, php-format
|
2122 |
+
msgid "Required API: %1$s"
|
2123 |
+
msgstr "Vereiste API: %1$s"
|
2124 |
+
|
2125 |
+
#: nextend-facebook-connect/providers/twitter/admin/fix-redirect-uri.php:10
|
2126 |
+
msgid "Find your App and click on the Details button"
|
2127 |
+
msgstr "Vind jew app en klik op de knop Details"
|
2128 |
+
|
2129 |
+
#: nextend-facebook-connect/providers/twitter/admin/fix-redirect-uri.php:11
|
2130 |
+
msgid ""
|
2131 |
+
"The Edit button can be found on the App details tab. Click on it and select "
|
2132 |
+
"Edit details"
|
2133 |
+
msgstr ""
|
2134 |
+
"De knop Bewerken is te vinden op het tabblad App details. Klik erop en "
|
2135 |
+
"selecteer Bewerken details"
|
2136 |
+
|
2137 |
+
#: nextend-facebook-connect/providers/twitter/admin/fix-redirect-uri.php:12
|
2138 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:22
|
2139 |
+
#, php-format
|
2140 |
+
msgid "Add the following URL to the \"Callback URLs\" field: <b>%s</b>"
|
2141 |
+
msgstr "Voeg de volgende URL toe aan het veld \"Callback URL's\": <b>%s</b>"
|
2142 |
+
|
2143 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:17
|
2144 |
+
#, php-format
|
2145 |
+
msgid "Log in with your %s credentials if you are not logged in yet"
|
2146 |
+
msgstr "Log in met je %s inloggegevens als je nog niet ingelogd bent"
|
2147 |
+
|
2148 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:18
|
2149 |
+
msgid ""
|
2150 |
+
"If you don't have a developer account yet, please apply one by filling all "
|
2151 |
+
"the required details! This is required for the next steps!"
|
2152 |
+
msgstr ""
|
2153 |
+
"Als je nog geen ontwikkelaarsaccount heeft, kun je je aanmelden door alle "
|
2154 |
+
"benodigde gegevens in te vullen! Dit is vereist voor de volgende stappen!"
|
2155 |
+
|
2156 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:19
|
2157 |
+
#, php-format
|
2158 |
+
msgid ""
|
2159 |
+
"Once your developer account is complete, navigate back to %s if you aren't "
|
2160 |
+
"already there!"
|
2161 |
+
msgstr ""
|
2162 |
+
"Zodra je ontwikkelaarsaccount is voltooid, navigeer terug naar %s als je er "
|
2163 |
+
"nog niet bent!"
|
2164 |
+
|
2165 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:20
|
2166 |
+
#, php-format
|
2167 |
+
msgid ""
|
2168 |
+
"Fill the App name, Application description fields. Then enter your site's "
|
2169 |
+
"URL to the Website URL field: <b>%s</b>"
|
2170 |
+
msgstr ""
|
2171 |
+
"Vul de App-naam, Applicatiebeschrijving velden in. Voer vervolgens de URL "
|
2172 |
+
"van je site in bij het Website URL veld: <b>%s</b>"
|
2173 |
+
|
2174 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:21
|
2175 |
+
msgid "Tick the checkbox next to Enable Sign in with Twitter!"
|
2176 |
+
msgstr "Vink het selectievakje aan naast Inschakelen Inloggen met Twitter!"
|
2177 |
+
|
2178 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:23
|
2179 |
+
msgid ""
|
2180 |
+
"Fill the “Terms of Service URL\", \"Privacy policy URL\" and \"Tell us how "
|
2181 |
+
"this app will be used” fields!"
|
2182 |
+
msgstr ""
|
2183 |
+
"Vul de velden \"Servicevoorwaarden-URL\", \"Privacy policy URL\" en \"Vertel "
|
2184 |
+
"ons hoe deze app zal worden gebruikt\" in!"
|
2185 |
+
|
2186 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:25
|
2187 |
+
msgid "Read the Developer Terms and click the Create button again!"
|
2188 |
+
msgstr "Lees de Developer Terms en klik opnieuw op de knop Maken!"
|
2189 |
+
|
2190 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:26
|
2191 |
+
msgid "Select the Permissions tab and click Edit."
|
2192 |
+
msgstr "Selecteer het tabblad Machtigingen en klik op Bewerken."
|
2193 |
+
|
2194 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:27
|
2195 |
+
msgid ""
|
2196 |
+
"Tick the Request email address from users under the Additional permissions "
|
2197 |
+
"section and click Save."
|
2198 |
+
msgstr ""
|
2199 |
+
"Vink het e-mailadres voor het aanvragen van gebruikers aan in het de sectie "
|
2200 |
+
"Extra rechten en klik op Opslaan."
|
2201 |
+
|
2202 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:28
|
2203 |
+
msgid "Go to the Keys and tokens tab and find the API key and API secret key"
|
2204 |
+
msgstr ""
|
2205 |
+
"Ga naar het tabblad Sleutels en tokens en zoek de API-sleutel en geheime API-"
|
2206 |
+
"sleutel"
|
2207 |
+
|
2208 |
+
#: nextend-facebook-connect/providers/twitter/admin/settings.php:27
|
2209 |
+
#: nextend-social-login-pro/providers/disqus/admin/settings.php:26
|
2210 |
+
msgid "API Key"
|
2211 |
+
msgstr "API Sleutel"
|
2212 |
+
|
2213 |
+
#: nextend-facebook-connect/providers/twitter/admin/settings.php:38
|
2214 |
+
msgid "API secret key"
|
2215 |
+
msgstr "API geheime sleutel"
|
2216 |
+
|
2217 |
+
#: nextend-facebook-connect/providers/twitter/admin/settings.php:57
|
2218 |
+
msgid "Profile image size"
|
2219 |
+
msgstr "Profielafbeelding grootte"
|
2220 |
+
|
2221 |
+
#: nextend-facebook-connect/providers/twitter/admin/settings.php:71
|
2222 |
+
msgid "Original"
|
2223 |
+
msgstr "Origineel"
|
2224 |
+
|
2225 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:67
|
2226 |
+
msgid "Continue with <b>Twitter</b>"
|
2227 |
+
msgstr "Doorgaan met <b>Twitter</b>"
|
2228 |
+
|
2229 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:68
|
2230 |
+
msgid "Link account with <b>Twitter</b>"
|
2231 |
+
msgstr "Koppel met <b>Twitter</b>"
|
2232 |
+
|
2233 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:69
|
2234 |
+
msgid "Unlink account from <b>Twitter</b>"
|
2235 |
+
msgstr "Ontkoppel van <b>Twitter</b>"
|
2236 |
+
|
2237 |
+
#: nextend-facebook-connect/widget.php:10
|
2238 |
+
#, php-format
|
2239 |
+
msgid "%s Buttons"
|
2240 |
+
msgstr "%s Knoppen"
|
2241 |
+
|
2242 |
+
#: nextend-facebook-connect/widget.php:30
|
2243 |
+
msgid "Title:"
|
2244 |
+
msgstr "Titel:"
|
2245 |
+
|
2246 |
+
#: nextend-facebook-connect/widget.php:38
|
2247 |
+
msgid "Button style:"
|
2248 |
+
msgstr "Knop stijl:"
|
2249 |
+
|
2250 |
+
#: nextend-facebook-connect/widget.php:53
|
2251 |
+
msgid "Button align:"
|
2252 |
+
msgstr "Knop uitlijning:"
|
2253 |
+
|
2254 |
+
#: nextend-facebook-connect/widget.php:85
|
2255 |
+
msgid "Show link buttons"
|
2256 |
+
msgstr "Toon koppel-knoppen"
|
2257 |
+
|
2258 |
+
#: nextend-facebook-connect/widget.php:94
|
2259 |
+
msgid "Show unlink buttons"
|
2260 |
+
msgstr "Toon ontkoppel-knoppen"
|
2261 |
+
|
2262 |
+
#: nextend-social-login-pro/class-provider-extension.php:115
|
2263 |
+
msgid "Social login is not allowed with this role!"
|
2264 |
+
msgstr "Social login is niet toegestaan bij deze rol!"
|
2265 |
+
|
2266 |
+
#: nextend-social-login-pro/class-provider-extension.php:211
|
2267 |
+
#: nextend-social-login-pro/class-provider-extension.php:214
|
2268 |
+
#: nextend-social-login-pro/class-provider-extension.php:220
|
2269 |
+
#: nextend-social-login-pro/class-provider-extension.php:227
|
2270 |
+
#: nextend-social-login-pro/class-provider-extension.php:298
|
2271 |
+
#: nextend-social-login-pro/class-provider-extension.php:301
|
2272 |
+
#: nextend-social-login-pro/class-provider-extension.php:305
|
2273 |
+
msgid "ERROR"
|
2274 |
+
msgstr "FOUT"
|
2275 |
+
|
2276 |
+
#: nextend-social-login-pro/class-provider-extension.php:211
|
2277 |
+
msgid "Please enter a username."
|
2278 |
+
msgstr "Vul gebruikersnaam in."
|
2279 |
+
|
2280 |
+
#: nextend-social-login-pro/class-provider-extension.php:214
|
2281 |
+
msgid ""
|
2282 |
+
"This username is invalid because it uses illegal characters. Please enter a "
|
2283 |
+
"valid username."
|
2284 |
+
msgstr ""
|
2285 |
+
"Deze gebruikersnaam is ongeldig omdat hij illegale tekens gebruikt. Vul een "
|
2286 |
+
"geldige gebruikersnaam in."
|
2287 |
+
|
2288 |
+
#: nextend-social-login-pro/class-provider-extension.php:220
|
2289 |
+
msgid "This username is already registered. Please choose another one."
|
2290 |
+
msgstr "Deze gebruikersnaam is al in gebruik. Kies een andere."
|
2291 |
+
|
2292 |
+
#: nextend-social-login-pro/class-provider-extension.php:227
|
2293 |
+
msgid "Sorry, that username is not allowed."
|
2294 |
+
msgstr "Sorry, deze gebruikersnaam is niet toegestaan."
|
2295 |
+
|
2296 |
+
#: nextend-social-login-pro/class-provider-extension.php:245
|
2297 |
+
msgid "Username"
|
2298 |
+
msgstr "Gebruikersnaam"
|
2299 |
+
|
2300 |
+
#: nextend-social-login-pro/class-provider-extension.php:298
|
2301 |
+
msgid "Please enter an email address."
|
2302 |
+
msgstr "Gelieve een emailadres op te geven."
|
2303 |
+
|
2304 |
+
#: nextend-social-login-pro/class-provider-extension.php:301
|
2305 |
+
msgid "The email address isn’t correct."
|
2306 |
+
msgstr "Het e-mailadres is niet juist."
|
2307 |
+
|
2308 |
+
#: nextend-social-login-pro/class-provider-extension.php:305
|
2309 |
+
msgid "This email is already registered, please choose another one."
|
2310 |
+
msgstr "Dit e-mailadres is al geregistreerd. Kies een andere."
|
2311 |
+
|
2312 |
+
#: nextend-social-login-pro/class-provider-extension.php:325
|
2313 |
+
msgid "Registration confirmation will be emailed to you."
|
2314 |
+
msgstr "Een bevestiging van de registratie wordt naar je gemaild."
|
2315 |
+
|
2316 |
+
#: nextend-social-login-pro/class-provider-extension.php:376
|
2317 |
+
msgid "<strong>ERROR</strong>: Please enter a password."
|
2318 |
+
msgstr "<strong>FOUT</strong>: Voer een wachtwoord in."
|
2319 |
+
|
2320 |
+
#: nextend-social-login-pro/class-provider-extension.php:382
|
2321 |
+
msgid "<strong>ERROR</strong>: Passwords may not contain the character \"\\\"."
|
2322 |
+
msgstr ""
|
2323 |
+
"<strong>FOUT</strong>: Wachtwoorden mogen niet het teken \"\\\" bevatten."
|
2324 |
+
|
2325 |
+
#: nextend-social-login-pro/class-provider-extension.php:388
|
2326 |
+
msgid ""
|
2327 |
+
"<strong>ERROR</strong>: Please enter the same password in both password "
|
2328 |
+
"fields."
|
2329 |
+
msgstr ""
|
2330 |
+
"<strong>FOUT</strong>: Voer hetzelfde wachtwoord in beide wachtwoordvelden "
|
2331 |
+
"in."
|
2332 |
+
|
2333 |
+
#: nextend-social-login-pro/class-provider-extension.php:405
|
2334 |
+
msgid "Password"
|
2335 |
+
msgstr "Wachtwoord"
|
2336 |
+
|
2337 |
+
#: nextend-social-login-pro/class-provider-extension.php:415
|
2338 |
+
msgid "Strength indicator"
|
2339 |
+
msgstr "Sterkte-indicator"
|
2340 |
+
|
2341 |
+
#: nextend-social-login-pro/class-provider-extension.php:420
|
2342 |
+
msgid "Confirm use of weak password"
|
2343 |
+
msgstr "Bevestig het gebruik van een zwak wachtwoord"
|
2344 |
+
|
2345 |
+
#: nextend-social-login-pro/class-provider-extension.php:426
|
2346 |
+
msgid "Confirm password"
|
2347 |
+
msgstr "Bevestig wachtwoord"
|
2348 |
+
|
2349 |
+
#: nextend-social-login-pro/class-provider-extension.php:438
|
2350 |
+
#, php-format
|
2351 |
+
msgid ""
|
2352 |
+
"This email is already registered, please login in to your account to link "
|
2353 |
+
"with %1$s."
|
2354 |
+
msgstr ""
|
2355 |
+
"Dit e-mailadres is al geregistreerd, log in op je account om te koppelen met "
|
2356 |
+
"%1$s."
|
2357 |
+
|
2358 |
+
#: nextend-social-login-pro/nextend-social-login-pro.php:51
|
2359 |
+
#, php-format
|
2360 |
+
msgid "Please install and activate %1$s to use the %2$s"
|
2361 |
+
msgstr "Installeer en activeer %1$s om de %2$s te gebruiken"
|
2362 |
+
|
2363 |
+
#: nextend-social-login-pro/nextend-social-login-pro.php:65
|
2364 |
+
msgid "Network Activate"
|
2365 |
+
msgstr "Netwerk Activeren"
|
2366 |
+
|
2367 |
+
#: nextend-social-login-pro/nextend-social-login-pro.php:77
|
2368 |
+
msgid "Install now!"
|
2369 |
+
msgstr "Installeer nu!"
|
2370 |
+
|
2371 |
+
#: nextend-social-login-pro/provider-extensions/facebook.php:74
|
2372 |
+
#, php-format
|
2373 |
+
msgid ""
|
2374 |
+
"The Facebook Sync data needs an approved %1$s and your App must use the "
|
2375 |
+
"latest %2$s version!"
|
2376 |
+
msgstr ""
|
2377 |
+
"De Facebook Sync data heeft een goedgekeurd %1$s nodig en je App moet de "
|
2378 |
+
"laatste %2$s versie gebruiken!"
|
2379 |
+
|
2380 |
+
#: nextend-social-login-pro/provider-extensions/google.php:176
|
2381 |
+
#, php-format
|
2382 |
+
msgid ""
|
2383 |
+
"Most of these information can only be retrieved, when the field is marked as "
|
2384 |
+
"Public on the user's %s page!"
|
2385 |
+
msgstr ""
|
2386 |
+
"De meeste van deze informatie kan alleen worden opgehaald, wanneer het veld "
|
2387 |
+
"als openbaar is gemarkeerd op de %s pagina van de gebruiker!"
|
2388 |
+
|
2389 |
+
#: nextend-social-login-pro/providers/amazon/admin/fix-redirect-uri.php:10
|
2390 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:24
|
2391 |
+
#, php-format
|
2392 |
+
msgid "Visit %s"
|
2393 |
+
msgstr "Bezoek %s"
|
2394 |
+
|
2395 |
+
#: nextend-social-login-pro/providers/amazon/admin/fix-redirect-uri.php:11
|
2396 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:28
|
2397 |
+
msgid ""
|
2398 |
+
"On the right side, under \"Manage\", hover over the gear icon and select "
|
2399 |
+
"\"Web Settings\" option."
|
2400 |
+
msgstr ""
|
2401 |
+
"Aan de rechterkant, onder \"Beheer\", ga met de muis over het "
|
2402 |
+
"tandwielpictogram en selecteer de optie \"Webinstellingen\"."
|
2403 |
+
|
2404 |
+
#: nextend-social-login-pro/providers/amazon/admin/fix-redirect-uri.php:12
|
2405 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:29
|
2406 |
+
msgid "Click \"Edit\"."
|
2407 |
+
msgstr "Klik op \"Bewerken\"."
|
2408 |
+
|
2409 |
+
#: nextend-social-login-pro/providers/amazon/admin/fix-redirect-uri.php:13
|
2410 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:31
|
2411 |
+
#, php-format
|
2412 |
+
msgid "Add the following URL to the \"Allowed Return URLs\" field <b>%s</b> "
|
2413 |
+
msgstr ""
|
2414 |
+
"Voeg de volgende URL toe aan het veld \"Toegestane Return URLs\" <b>%s</b> "
|
2415 |
+
|
2416 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:17
|
2417 |
+
#: nextend-social-login-pro/providers/disqus/admin/getting-started.php:10
|
2418 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:10
|
2419 |
+
#: nextend-social-login-pro/providers/wordpress/admin/getting-started.php:10
|
2420 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:10
|
2421 |
+
#, php-format
|
2422 |
+
msgid ""
|
2423 |
+
"To allow your visitors to log in with their %1$s account, first you must "
|
2424 |
+
"create an %1$s App. The following guide will help you through the %1$s App "
|
2425 |
+
"creation process. After you have created your %1$s App, head over to "
|
2426 |
+
"\"Settings\" and configure the given \"%2$s\" and \"%3$s\" according to your "
|
2427 |
+
"%1$s App."
|
2428 |
+
msgstr ""
|
2429 |
+
"Om je bezoekers in te laten loggen met hun %1$s account, moet je eerst een "
|
2430 |
+
"%1$s App aanmaken. De volgende gids helpt je door het %1$s App "
|
2431 |
+
"creatieproces. Nadat je je %1$s App heeft aangemaakt, ga je naar "
|
2432 |
+
"\"Instellingen\" en configureer je de gegevens \"%2$s\" en \"%3$s\" volgens "
|
2433 |
+
"je %1$s App."
|
2434 |
+
|
2435 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:23
|
2436 |
+
#: nextend-social-login-pro/providers/disqus/admin/fix-redirect-uri.php:9
|
2437 |
+
#: nextend-social-login-pro/providers/disqus/admin/getting-started.php:16
|
2438 |
+
#: nextend-social-login-pro/providers/paypal/admin/fix-redirect-uri.php:9
|
2439 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:16
|
2440 |
+
#: nextend-social-login-pro/providers/vk/admin/getting-started.php:16
|
2441 |
+
#: nextend-social-login-pro/providers/wordpress/admin/fix-redirect-uri.php:9
|
2442 |
+
#: nextend-social-login-pro/providers/wordpress/admin/getting-started.php:16
|
2443 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:17
|
2444 |
+
#, php-format
|
2445 |
+
msgid "Log in with your %s credentials if you are not logged in."
|
2446 |
+
msgstr "Log in met je %s inloggegevens als je niet ingelogd bent."
|
2447 |
+
|
2448 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:25
|
2449 |
+
msgid ""
|
2450 |
+
"If you don't have a Security Profile yet, you'll need to create one. You can "
|
2451 |
+
"do this by clicking on the orange \"Create a New Security Profile\" button "
|
2452 |
+
"on the left side."
|
2453 |
+
msgstr ""
|
2454 |
+
"Als je nog geen Beveiligingsprofiel hebt, moet je er een aanmaken. Je kunt "
|
2455 |
+
"dit doen door op de oranje knop \"Maak een Nieuw Veiligheidsprofiel\" aan de "
|
2456 |
+
"linkerkant te klikken."
|
2457 |
+
|
2458 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:26
|
2459 |
+
msgid ""
|
2460 |
+
"Fill \"Security Profile Name\", \"Security Profile Description\" and "
|
2461 |
+
"\"Consent Privacy Notice URL\"."
|
2462 |
+
msgstr ""
|
2463 |
+
"Vul \"Naam Beveiligingsprofiel\", \"Beschrijving Beveiligingsprofiel\" en "
|
2464 |
+
"\"Toestemming privacyverklaring URL\" in."
|
2465 |
+
|
2466 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:27
|
2467 |
+
msgid "Once you filled all the required fields, click \"Save\"."
|
2468 |
+
msgstr "Zodra je alle verplichte velden hebt ingevuld, klik je op \"Opslaan\"."
|
2469 |
+
|
2470 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:30
|
2471 |
+
#, php-format
|
2472 |
+
msgid ""
|
2473 |
+
"Fill \"Allowed Origins\" with the url of your homepage, probably: <b>%s</b>"
|
2474 |
+
msgstr ""
|
2475 |
+
"Vul \"Toegestane Oorsprong\" in met de url van je homepage, waarschijnlijk: "
|
2476 |
+
"<b>%s</b>"
|
2477 |
+
|
2478 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:32
|
2479 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:29
|
2480 |
+
msgid "When all fields are filled, click \"Save\"."
|
2481 |
+
msgstr "Wanneer alle velden zijn ingevuld, klik je op \"Opslaan\"."
|
2482 |
+
|
2483 |
+
#: nextend-social-login-pro/providers/amazon/admin/getting-started.php:33
|
2484 |
+
msgid ""
|
2485 |
+
"Find the necessary \"Client ID\" and \"Client Secret\" at the middle of the "
|
2486 |
+
"page, under the \"Web Settings\" tab."
|
2487 |
+
msgstr ""
|
2488 |
+
"Vind de benodigde \"Client ID\" en \"Client Geheim\" in het midden van de "
|
2489 |
+
"pagina, onder het tabblad \"Web Instelling\"."
|
2490 |
+
|
2491 |
+
#: nextend-social-login-pro/providers/amazon/amazon.php:37
|
2492 |
+
msgid "Continue with <b>Amazon</b>"
|
2493 |
+
msgstr "Doorgaan met <b>Amazonië</b>"
|
2494 |
+
|
2495 |
+
#: nextend-social-login-pro/providers/amazon/amazon.php:38
|
2496 |
+
msgid "Link account with <b>Amazon</b>"
|
2497 |
+
msgstr "Koppel met <b>Amazon</b>"
|
2498 |
+
|
2499 |
+
#: nextend-social-login-pro/providers/amazon/amazon.php:39
|
2500 |
+
msgid "Unlink account from <b>Amazon</b>"
|
2501 |
+
msgstr "Ontkoppel van <b>Amazon</b>"
|
2502 |
+
|
2503 |
+
#: nextend-social-login-pro/providers/disqus/admin/fix-redirect-uri.php:10
|
2504 |
+
#: nextend-social-login-pro/providers/paypal/admin/fix-redirect-uri.php:11
|
2505 |
+
#: nextend-social-login-pro/providers/wordpress/admin/fix-redirect-uri.php:10
|
2506 |
+
#, php-format
|
2507 |
+
msgid "Click on the name of your %s App."
|
2508 |
+
msgstr "Klik op de naam van je %s App."
|
2509 |
+
|
2510 |
+
#: nextend-social-login-pro/providers/disqus/admin/fix-redirect-uri.php:12
|
2511 |
+
msgid ""
|
2512 |
+
"Select the \"Settings\" tab and scroll down to the Authentication section!"
|
2513 |
+
msgstr ""
|
2514 |
+
"Selecteer het tabblad \"Instellingen\" en scroll naar beneden naar de sectie "
|
2515 |
+
"Authenticatie!"
|
2516 |
+
|
2517 |
+
#: nextend-social-login-pro/providers/disqus/admin/fix-redirect-uri.php:13
|
2518 |
+
#: nextend-social-login-pro/providers/disqus/admin/getting-started.php:23
|
2519 |
+
#, php-format
|
2520 |
+
msgid "Add the following URL to the \"Callback URL\" field <b>%s</b> "
|
2521 |
+
msgstr "Voeg de volgende URL toe aan het \"Callback URL\" veld <b>%s</b> "
|
2522 |
+
|
2523 |
+
#: nextend-social-login-pro/providers/disqus/admin/fix-redirect-uri.php:14
|
2524 |
+
msgid "Click on the \"Save Changes\" button."
|
2525 |
+
msgstr "Klik op de knop \"Wijzigingen Opslaan\"."
|
2526 |
+
|
2527 |
+
#: nextend-social-login-pro/providers/disqus/admin/getting-started.php:17
|
2528 |
+
msgid ""
|
2529 |
+
"Click on the link \"registering an application\" under the Applications tab."
|
2530 |
+
msgstr ""
|
2531 |
+
"Klik op de link \"aanvraag registreren\" onder het tabblad \"Applicaties\"."
|
2532 |
+
|
2533 |
+
#: nextend-social-login-pro/providers/disqus/admin/getting-started.php:18
|
2534 |
+
msgid "Enter a \"Label\" and \"Description\" for your App."
|
2535 |
+
msgstr "Voer een \"Label\" en \"Beschrijving\" in voor je App."
|
2536 |
+
|
2537 |
+
#: nextend-social-login-pro/providers/disqus/admin/getting-started.php:19
|
2538 |
+
#, php-format
|
2539 |
+
msgid "Fill \"Website\" with the url of your homepage, probably: <b>%s</b>"
|
2540 |
+
msgstr ""
|
2541 |
+
"Vul \"Website\" in met de url van je homepage, waarschijnlijk: <b>%s</b>"
|
2542 |
+
|
2543 |
+
#: nextend-social-login-pro/providers/disqus/admin/getting-started.php:20
|
2544 |
+
msgid ""
|
2545 |
+
"Complete the Human test and click the \"Register my application\" button."
|
2546 |
+
msgstr ""
|
2547 |
+
"Voltooi de Menselijke test en klik op de knop \"Registreer mijn aanvraag\"."
|
2548 |
+
|
2549 |
+
#: nextend-social-login-pro/providers/disqus/admin/getting-started.php:21
|
2550 |
+
#, php-format
|
2551 |
+
msgid "Fill the \"Domains\" field with your domain name like: <b>%s</b>"
|
2552 |
+
msgstr "Vul het veld \"Domeinen\" in met je domeinnaam zoals: <b>%s</b>"
|
2553 |
+
|
2554 |
+
#: nextend-social-login-pro/providers/disqus/admin/getting-started.php:22
|
2555 |
+
msgid ""
|
2556 |
+
"Select \"Read only\" at Default Access under the Authentication section."
|
2557 |
+
msgstr ""
|
2558 |
+
"Selecteer \"Alleen lezen\" bij Standaard toegang onder de sectie "
|
2559 |
+
"Authenticatie."
|
2560 |
+
|
2561 |
+
#: nextend-social-login-pro/providers/disqus/admin/getting-started.php:24
|
2562 |
+
msgid "Click the \"Save Changes\" button!"
|
2563 |
+
msgstr "Klik op de knop \"Wijzigingen Opslaan\"!"
|
2564 |
+
|
2565 |
+
#: nextend-social-login-pro/providers/disqus/admin/getting-started.php:25
|
2566 |
+
msgid "Navigate to the \"Details\" tab of your Application!"
|
2567 |
+
msgstr "Navigeer naar het tabblad \"Details\" van je Applicatie!"
|
2568 |
+
|
2569 |
+
#: nextend-social-login-pro/providers/disqus/admin/getting-started.php:26
|
2570 |
+
msgid ""
|
2571 |
+
"Here you can see your \"API Key\" and \"API Secret:\". These will be needed "
|
2572 |
+
"in the plugin's settings."
|
2573 |
+
msgstr ""
|
2574 |
+
"Hier kun je je \"API Sleutel\" en \"API Geheim:\" zien. Deze zijn nodig in "
|
2575 |
+
"de instellingen van de plugin."
|
2576 |
+
|
2577 |
+
#: nextend-social-login-pro/providers/disqus/admin/settings.php:38
|
2578 |
+
msgid "API Secret"
|
2579 |
+
msgstr "API Geheim"
|
2580 |
+
|
2581 |
+
#: nextend-social-login-pro/providers/disqus/disqus.php:84
|
2582 |
+
msgid "Continue with <b>Disqus</b>"
|
2583 |
+
msgstr "Doorgaan met <b>Disqus</b>"
|
2584 |
+
|
2585 |
+
#: nextend-social-login-pro/providers/disqus/disqus.php:85
|
2586 |
+
msgid "Link account with <b>Disqus</b>"
|
2587 |
+
msgstr "Koppel met <b>Disqus</b>"
|
2588 |
+
|
2589 |
+
#: nextend-social-login-pro/providers/disqus/disqus.php:86
|
2590 |
+
msgid "Unlink account from <b>Disqus</b>"
|
2591 |
+
msgstr "Ontkoppel van <b>Disqus</b>"
|
2592 |
+
|
2593 |
+
#: nextend-social-login-pro/providers/linkedin/admin/fix-redirect-uri.php:10
|
2594 |
+
msgid "Click on the App"
|
2595 |
+
msgstr "Klik op de App"
|
2596 |
+
|
2597 |
+
#: nextend-social-login-pro/providers/linkedin/admin/fix-redirect-uri.php:11
|
2598 |
+
#, php-format
|
2599 |
+
msgid ""
|
2600 |
+
"Add the following URL to the \"Authorized Redirect URLs:\" field: <b>%s</b>"
|
2601 |
+
msgstr ""
|
2602 |
+
"Voeg de volgende URL toe aan het veld \"Geautoriseerde omleidings-URLs:\": "
|
2603 |
+
"<b>%s</b>"
|
2604 |
+
|
2605 |
+
#: nextend-social-login-pro/providers/linkedin/admin/fix-redirect-uri.php:12
|
2606 |
+
#: nextend-social-login-pro/providers/linkedin/admin/getting-started.php:23
|
2607 |
+
#: nextend-social-login-pro/providers/vk/admin/fix-redirect-uri.php:13
|
2608 |
+
msgid "Hit update to save the changes"
|
2609 |
+
msgstr "Klik op update om de wijzigingen op te slaan"
|
2610 |
+
|
2611 |
+
#: nextend-social-login-pro/providers/linkedin/admin/getting-started.php:17
|
2612 |
+
msgid "Locate the \"Create app\" button and click on it."
|
2613 |
+
msgstr "Zoek de knop \"App maken\" op en klik erop."
|
2614 |
+
|
2615 |
+
#: nextend-social-login-pro/providers/linkedin/admin/getting-started.php:18
|
2616 |
+
msgid "Enter the name of your App to the \"App name\" field."
|
2617 |
+
msgstr "Voer de naam van je App in het veld \"App name\" in."
|
2618 |
+
|
2619 |
+
#: nextend-social-login-pro/providers/linkedin/admin/getting-started.php:19
|
2620 |
+
msgid "Fill all the \"App information\" related fields!"
|
2621 |
+
msgstr "Vul alle \"App informatie\" gerelateerde velden in!"
|
2622 |
+
|
2623 |
+
#: nextend-social-login-pro/providers/linkedin/admin/getting-started.php:20
|
2624 |
+
msgid ""
|
2625 |
+
"Read and agree the \"API Terms of Use\" then click the \"Create App\" button!"
|
2626 |
+
msgstr ""
|
2627 |
+
"Lees en accordeer de \"API Gebruiksvoorwaarden\" en klik dan op de knop "
|
2628 |
+
"\"Maak App\"!"
|
2629 |
+
|
2630 |
+
#: nextend-social-login-pro/providers/linkedin/admin/getting-started.php:21
|
2631 |
+
msgid "You will end up in the App setting area. Click on the Auth tab."
|
2632 |
+
msgstr ""
|
2633 |
+
"Je komt dan in de sectie App instellingen terecht. Klik op het tabblad Auth."
|
2634 |
+
|
2635 |
+
#: nextend-social-login-pro/providers/linkedin/admin/getting-started.php:22
|
2636 |
+
#, php-format
|
2637 |
+
msgid ""
|
2638 |
+
"Find \"OAuth 2.0 settings\" section and add the following URL to the "
|
2639 |
+
"\"Redirect URLs:\" field: <b>%s</b>"
|
2640 |
+
msgstr ""
|
2641 |
+
"Zoek de sectie \"OAuth 2.0-instellingen\" en voeg de volgende URL toe aan "
|
2642 |
+
"het veld \"Omleidings-URLs:\": <b>%s</b>"
|
2643 |
+
|
2644 |
+
#: nextend-social-login-pro/providers/linkedin/admin/getting-started.php:24
|
2645 |
+
msgid ""
|
2646 |
+
"Find the necessary \"Client ID\" and \"Client Secret\" under the Application "
|
2647 |
+
"credentials section, on the Auth tab."
|
2648 |
+
msgstr ""
|
2649 |
+
"Zoek de benodigde \"Client ID\" en \"Client Geheim\" onder de sectie "
|
2650 |
+
"Applicatie inloggegevens, op het tabblad Auth."
|
2651 |
+
|
2652 |
+
#: nextend-social-login-pro/providers/linkedin/linkedin.php:36
|
2653 |
+
msgid "Continue with <b>LinkedIn</b>"
|
2654 |
+
msgstr "Doorgaan met <b>LinkedIn</b>"
|
2655 |
+
|
2656 |
+
#: nextend-social-login-pro/providers/linkedin/linkedin.php:37
|
2657 |
+
msgid "Link account with <b>LinkedIn</b>"
|
2658 |
+
msgstr "Koppel met <b>LinkedIn</b>"
|
2659 |
+
|
2660 |
+
#: nextend-social-login-pro/providers/linkedin/linkedin.php:38
|
2661 |
+
msgid "Unlink account from <b>LinkedIn</b>"
|
2662 |
+
msgstr "Ontkoppel van <b>LinkedIn</b>"
|
2663 |
+
|
2664 |
+
#: nextend-social-login-pro/providers/paypal/admin/fix-redirect-uri.php:10
|
2665 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:17
|
2666 |
+
msgid "Scroll down to \"REST API apps\"."
|
2667 |
+
msgstr "Scroll naar beneden naar \"REST API apps\"."
|
2668 |
+
|
2669 |
+
#: nextend-social-login-pro/providers/paypal/admin/fix-redirect-uri.php:12
|
2670 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:20
|
2671 |
+
msgid "Select the \"Live\" option on the top-right side. "
|
2672 |
+
msgstr "Selecteer de optie \"Live\" rechterboven. "
|
2673 |
+
|
2674 |
+
#: nextend-social-login-pro/providers/paypal/admin/fix-redirect-uri.php:13
|
2675 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:21
|
2676 |
+
msgid ""
|
2677 |
+
"Scroll down to \"LIVE APP SETTINGS\", search the \"Live Return URL\" heading "
|
2678 |
+
"and click \"Show\"."
|
2679 |
+
msgstr ""
|
2680 |
+
"Scroll naar beneden naar \"LIVE APP INSTELLINGEN\", zoek in de rubriek "
|
2681 |
+
"\"Live Return URL\" en klik op \"Weergeven\"."
|
2682 |
+
|
2683 |
+
#: nextend-social-login-pro/providers/paypal/admin/fix-redirect-uri.php:14
|
2684 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:22
|
2685 |
+
#, php-format
|
2686 |
+
msgid "Add the following URL to the \"Live Return URL\" field <b>%s</b> "
|
2687 |
+
msgstr "Voeg de volgende URL toe aan het \"Live Return URL\" veld <b>%s</b> "
|
2688 |
+
|
2689 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:18
|
2690 |
+
msgid "Click the \"Create App\" button."
|
2691 |
+
msgstr "Klik op de knop \"Maak App\"."
|
2692 |
+
|
2693 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:19
|
2694 |
+
msgid "Fill the \"App Name\" field and click \"Create App\" button."
|
2695 |
+
msgstr "Vul het veld \"App Naam\" in en klik op de knop \"Maak App\"."
|
2696 |
+
|
2697 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:23
|
2698 |
+
msgid ""
|
2699 |
+
"Scroll down to \"App feature options\" section and tick \"Log In with PayPal"
|
2700 |
+
"\"."
|
2701 |
+
msgstr ""
|
2702 |
+
"Scroll naar beneden naar de sectie \"App functieopties\" en vink \"Aanmelden "
|
2703 |
+
"met PayPal\" aan."
|
2704 |
+
|
2705 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:24
|
2706 |
+
msgid ""
|
2707 |
+
"Click \"Advanced Options\" which can be found at the end of text after "
|
2708 |
+
"\"Connect with PayPal (formerly Log In with PayPal)\"."
|
2709 |
+
msgstr ""
|
2710 |
+
"Klik op \"Geavanceerde Opties\" die je kunt vinden aan het einde van de "
|
2711 |
+
"tekst na \"Verbinding maken met PayPal (voorheen ingelogd met PayPal)\"."
|
2712 |
+
|
2713 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:25
|
2714 |
+
msgid "Tick \"Full name\"."
|
2715 |
+
msgstr "Vink \"Volledige naam\" aan."
|
2716 |
+
|
2717 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:26
|
2718 |
+
msgid ""
|
2719 |
+
"\"Email address\" now requires an App Review by PayPal. To get the email "
|
2720 |
+
"address as well, please submit your App for a review after your App "
|
2721 |
+
"configuration is finished. Once the App review is succesfull, you need to "
|
2722 |
+
"pick \"Email address\" here to retrieve the email of the user. Until then "
|
2723 |
+
"make sure the Email scope is not \"Enabled\" in our PayPal Settings tab."
|
2724 |
+
msgstr ""
|
2725 |
+
"\"E-mailadres\" vereist nu een App Review door PayPal. Om ook het e-"
|
2726 |
+
"mailadres te verkrijgen, dient je je App in voor een beoordeling nadat de "
|
2727 |
+
"configuratie van je App is voltooid. Zodra de App review succesvol is, moet "
|
2728 |
+
"je hier \"E-mailadres\" kiezen om de e-mail van de gebruiker op te halen. "
|
2729 |
+
"Zorg er tot dan voor dat de e-mailscope niet is \"Ingeschakeld\" in ons "
|
2730 |
+
"PayPal-instellingen-tabblad."
|
2731 |
+
|
2732 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:28
|
2733 |
+
msgid "Fill \"Privacy policy URL\" and \"User agreement URL\"."
|
2734 |
+
msgstr "Vul \"Privacy policy URL\" en \"User agreement URL\" in."
|
2735 |
+
|
2736 |
+
#: nextend-social-login-pro/providers/paypal/admin/getting-started.php:30
|
2737 |
+
msgid ""
|
2738 |
+
"Scroll up to \"LIVE API CREDENTIALS\" section and find the necessary "
|
2739 |
+
"\"Client ID\" and \"Secret\"! ( Make sure you are in \"Live\" mode and not "
|
2740 |
+
"\"Sandbox\". )"
|
2741 |
+
msgstr ""
|
2742 |
+
"Scroll naar de sectie \"LIVE API CREDENTIALS\" en zoek de nodige \"Client ID"
|
2743 |
+
"\" en \"Geheim\"! ( Zorg ervoor dat je in \"Live\" modus bent en niet in "
|
2744 |
+
"\"Sandbox\". )"
|
2745 |
+
|
2746 |
+
#: nextend-social-login-pro/providers/paypal/admin/settings.php:38
|
2747 |
+
msgid "Secret"
|
2748 |
+
msgstr "Geheim"
|
2749 |
+
|
2750 |
+
#: nextend-social-login-pro/providers/paypal/admin/settings.php:45
|
2751 |
+
msgid "Email scope"
|
2752 |
+
msgstr "E-mail scope"
|
2753 |
+
|
2754 |
+
#: nextend-social-login-pro/providers/paypal/admin/settings.php:54
|
2755 |
+
msgid "Disable, when you have no rights for email address."
|
2756 |
+
msgstr "Uitschakelen, wanneer je geen rechten hebt voor e-mailadres."
|
2757 |
+
|
2758 |
+
#: nextend-social-login-pro/providers/paypal/paypal.php:62
|
2759 |
+
msgid "Continue with <b>PayPal</b>"
|
2760 |
+
msgstr "Doorgaan met <b>PayPal</b>"
|
2761 |
+
|
2762 |
+
#: nextend-social-login-pro/providers/paypal/paypal.php:63
|
2763 |
+
msgid "Link account with <b>PayPal</b>"
|
2764 |
+
msgstr "Koppel met <b>PayPal</b>"
|
2765 |
+
|
2766 |
+
#: nextend-social-login-pro/providers/paypal/paypal.php:64
|
2767 |
+
msgid "Unlink account from <b>PayPal</b>"
|
2768 |
+
msgstr "Ontkoppel van <b>PayPal</b>"
|
2769 |
+
|
2770 |
+
#: nextend-social-login-pro/providers/vk/admin/fix-redirect-uri.php:10
|
2771 |
+
msgid "Click on the Manage button at the App"
|
2772 |
+
msgstr "Klik op de knop Beheer bij de App"
|
2773 |
+
|
2774 |
+
#: nextend-social-login-pro/providers/vk/admin/fix-redirect-uri.php:11
|
2775 |
+
msgid "Go to the Settings menu"
|
2776 |
+
msgstr "Ga naar het menu Instellingen"
|
2777 |
+
|
2778 |
+
#: nextend-social-login-pro/providers/vk/admin/fix-redirect-uri.php:12
|
2779 |
+
#, php-format
|
2780 |
+
msgid ""
|
2781 |
+
"Add the following URL to the \"Authorized redirect URI:\" field: <b>%s</b>"
|
2782 |
+
msgstr ""
|
2783 |
+
"Voeg de volgende URL toe aan het veld \"Geautoriseerde omleidings-URI:\": <b>"
|
2784 |
+
"%s</b>"
|
2785 |
+
|
2786 |
+
#: nextend-social-login-pro/providers/vk/admin/getting-started.php:17
|
2787 |
+
msgid "Locate the blue \"Create application\" button and click on it."
|
2788 |
+
msgstr "Zoek de blauwe knop \"Maak applicatie\" en klik erop."
|
2789 |
+
|
2790 |
+
#: nextend-social-login-pro/providers/vk/admin/getting-started.php:18
|
2791 |
+
msgid "Enter the title of your app and select \"Website\"."
|
2792 |
+
msgstr "Voer de titel van je app in en selecteer \"Website\"."
|
2793 |
+
|
2794 |
+
#: nextend-social-login-pro/providers/vk/admin/getting-started.php:19
|
2795 |
+
#, php-format
|
2796 |
+
msgid ""
|
2797 |
+
"Fill \"Site address\" with the url of your homepage, probably: <b>%s</b>"
|
2798 |
+
msgstr ""
|
2799 |
+
"Vul \"Siteadres\" in met de url van je homepage, waarschijnlijk: <b>%s</b>"
|
2800 |
+
|
2801 |
+
#: nextend-social-login-pro/providers/vk/admin/getting-started.php:20
|
2802 |
+
#, php-format
|
2803 |
+
msgid "Fill the \"Base domain\" field with your domain, probably: <b>%s</b>"
|
2804 |
+
msgstr ""
|
2805 |
+
"Vul het veld \"Basisdomein\" in met je domein, waarschijnlijk: <b>%s</b>"
|
2806 |
+
|
2807 |
+
#: nextend-social-login-pro/providers/vk/admin/getting-started.php:21
|
2808 |
+
msgid "When all fields are filled, create you app."
|
2809 |
+
msgstr "Wanneer alle velden zijn ingevuld, maak je je app aan."
|
2810 |
+
|
2811 |
+
#: nextend-social-login-pro/providers/vk/admin/getting-started.php:22
|
2812 |
+
msgid ""
|
2813 |
+
"You'll be sent a confirmation code via SMS which you need to type to be able "
|
2814 |
+
"to create the app."
|
2815 |
+
msgstr ""
|
2816 |
+
"Je ontvangt een bevestigingscode via SMS die je moet invoeren om de app te "
|
2817 |
+
"kunnen maken."
|
2818 |
+
|
2819 |
+
#: nextend-social-login-pro/providers/vk/admin/getting-started.php:23
|
2820 |
+
msgid "Fill the form for your app and upload an app icon then hit Save."
|
2821 |
+
msgstr ""
|
2822 |
+
"Vul het formulier in voor je app en upload een app-icoontje en klik "
|
2823 |
+
"vervolgens op Opslaan."
|
2824 |
+
|
2825 |
+
#: nextend-social-login-pro/providers/vk/admin/getting-started.php:24
|
2826 |
+
msgid "Pick Settings at the left-hand menu "
|
2827 |
+
msgstr "Kies Instellingen in het linker menu "
|
2828 |
+
|
2829 |
+
#: nextend-social-login-pro/providers/vk/admin/getting-started.php:25
|
2830 |
+
#, php-format
|
2831 |
+
msgid ""
|
2832 |
+
"Add the following URL to the \"Authorized redirect URI\" field <b>%s</b> "
|
2833 |
+
msgstr ""
|
2834 |
+
"Voeg de volgende URL toe aan het veld \"Geautoriseerde omleidings-URI\" <b>"
|
2835 |
+
"%s</b>\" "
|
2836 |
+
|
2837 |
+
#: nextend-social-login-pro/providers/vk/admin/getting-started.php:26
|
2838 |
+
msgid "Save your app"
|
2839 |
+
msgstr "Bewaar je app"
|
2840 |
+
|
2841 |
+
#: nextend-social-login-pro/providers/vk/admin/getting-started.php:27
|
2842 |
+
msgid ""
|
2843 |
+
"Find the necessary Application ID and Secure key at the top of the Settings "
|
2844 |
+
"page where you just hit the save button."
|
2845 |
+
msgstr ""
|
2846 |
+
"Vind de benodigde Applicatie-ID en Secure sleutel bovenaan de Instellingen-"
|
2847 |
+
"pagina waar je zojuist op de Opslaan knop hebt gedrukt."
|
2848 |
+
|
2849 |
+
#: nextend-social-login-pro/providers/vk/admin/settings.php:26
|
2850 |
+
msgid "Application ID"
|
2851 |
+
msgstr "Applicatie-ID"
|
2852 |
+
|
2853 |
+
#: nextend-social-login-pro/providers/vk/admin/settings.php:38
|
2854 |
+
msgid "Secure key"
|
2855 |
+
msgstr "Beveiligde sleutel"
|
2856 |
+
|
2857 |
+
#: nextend-social-login-pro/providers/vk/vk.php:34
|
2858 |
+
msgid "Continue with <b>VK</b>"
|
2859 |
+
msgstr "Doorgaan met <b>VK</b>"
|
2860 |
+
|
2861 |
+
#: nextend-social-login-pro/providers/vk/vk.php:35
|
2862 |
+
msgid "Link account with <b>VK</b>"
|
2863 |
+
msgstr "Koppel met <b>VK</b>"
|
2864 |
+
|
2865 |
+
#: nextend-social-login-pro/providers/vk/vk.php:36
|
2866 |
+
msgid "Unlink account from <b>VK</b>"
|
2867 |
+
msgstr "Ontkoppel van <b>VK</b>"
|
2868 |
+
|
2869 |
+
#: nextend-social-login-pro/providers/wordpress/admin/fix-redirect-uri.php:12
|
2870 |
+
msgid "Click \"Manage Settings\" under the Tools section!"
|
2871 |
+
msgstr "Klik op \"Instellingen Beheren\" onder de sectie \"Gereedschappen\"!"
|
2872 |
+
|
2873 |
+
#: nextend-social-login-pro/providers/wordpress/admin/fix-redirect-uri.php:13
|
2874 |
+
#: nextend-social-login-pro/providers/wordpress/admin/getting-started.php:20
|
2875 |
+
#, php-format
|
2876 |
+
msgid "Add the following URL to the \"Redirect URLs\" field <b>%s</b> "
|
2877 |
+
msgstr "Voeg de volgende URL toe aan het veld \"Omleidings-URLs\" <b>%s</b> "
|
2878 |
+
|
2879 |
+
#: nextend-social-login-pro/providers/wordpress/admin/fix-redirect-uri.php:14
|
2880 |
+
msgid "Click on \"Update\""
|
2881 |
+
msgstr "Klik op \"Bijwerken\""
|
2882 |
+
|
2883 |
+
#: nextend-social-login-pro/providers/wordpress/admin/getting-started.php:17
|
2884 |
+
msgid "Click on the \"Create New Application\" button."
|
2885 |
+
msgstr "Klik op de knop \"Nieuwe Applicatie Maken\"."
|
2886 |
+
|
2887 |
+
#: nextend-social-login-pro/providers/wordpress/admin/getting-started.php:18
|
2888 |
+
msgid "Enter a \"Name\" and \"Description\" for your App."
|
2889 |
+
msgstr "Voer een \"Naam\" en \"Beschrijving\" in voor je app."
|
2890 |
+
|
2891 |
+
#: nextend-social-login-pro/providers/wordpress/admin/getting-started.php:19
|
2892 |
+
#, php-format
|
2893 |
+
msgid "Fill \"Website URL\" with the url of your homepage, probably: <b>%s</b>"
|
2894 |
+
msgstr ""
|
2895 |
+
"Vul \"Website URL\" in met de url van je homepage, waarschijnlijk: <b>%s</b>"
|
2896 |
+
|
2897 |
+
#: nextend-social-login-pro/providers/wordpress/admin/getting-started.php:21
|
2898 |
+
msgid "You can leave the \"Javascript Origins\" field blank!"
|
2899 |
+
msgstr "Je kunt het veld \"Javascript Origins\" leeg laten!"
|
2900 |
+
|
2901 |
+
#: nextend-social-login-pro/providers/wordpress/admin/getting-started.php:22
|
2902 |
+
msgid "Complete the human verification test."
|
2903 |
+
msgstr "Voltooi de menselijke verificatietest."
|
2904 |
+
|
2905 |
+
#: nextend-social-login-pro/providers/wordpress/admin/getting-started.php:23
|
2906 |
+
msgid "At the \"Type\" make sure \"Web\" is selected!"
|
2907 |
+
msgstr "Zorg er bij \"Type\" \"Web\" is geselecteerd!"
|
2908 |
+
|
2909 |
+
#: nextend-social-login-pro/providers/wordpress/admin/getting-started.php:24
|
2910 |
+
msgid "Click the \"Create\" button!"
|
2911 |
+
msgstr "Klik op de \"Maak\"-knop!"
|
2912 |
+
|
2913 |
+
#: nextend-social-login-pro/providers/wordpress/admin/getting-started.php:25
|
2914 |
+
msgid ""
|
2915 |
+
"Click the name of your App either in the Breadcrumb navigation or next to "
|
2916 |
+
"Editing!"
|
2917 |
+
msgstr ""
|
2918 |
+
"Klik op de naam van je App in de broodkruimel-navigatie of naast Bewerken!"
|
2919 |
+
|
2920 |
+
#: nextend-social-login-pro/providers/wordpress/admin/getting-started.php:26
|
2921 |
+
msgid ""
|
2922 |
+
"Here you can see your \"Client ID\" and \"Client Secret\". These will be "
|
2923 |
+
"needed in the plugin's settings."
|
2924 |
+
msgstr ""
|
2925 |
+
"Hier kun je je \"Client ID\" en \"Client Geheim\" zien. Deze zijn nodig in "
|
2926 |
+
"de instellingen van de plugin."
|
2927 |
+
|
2928 |
+
#: nextend-social-login-pro/providers/wordpress/wordpress.php:71
|
2929 |
+
msgid "Continue with <b>WordPress.com</b>"
|
2930 |
+
msgstr "Doorgaan met <b>WordPress.com</b>"
|
2931 |
+
|
2932 |
+
#: nextend-social-login-pro/providers/wordpress/wordpress.php:72
|
2933 |
+
msgid "Link account with <b>WordPress.com</b>"
|
2934 |
+
msgstr "Koppel met <b>WordPress.com</b>"
|
2935 |
+
|
2936 |
+
#: nextend-social-login-pro/providers/wordpress/wordpress.php:73
|
2937 |
+
msgid "Unlink account from <b>WordPress.com</b>"
|
2938 |
+
msgstr "Ontkoppel van <b>WordPress.com</b>"
|
2939 |
+
|
2940 |
+
#: nextend-social-login-pro/providers/yahoo/admin/fix-redirect-uri.php:10
|
2941 |
+
msgid "Click on the App which has its credentials associated with the plugin."
|
2942 |
+
msgstr "Klik op de App met de inloggegevens die aan de plugin zijn gekoppeld."
|
2943 |
+
|
2944 |
+
#: nextend-social-login-pro/providers/yahoo/admin/fix-redirect-uri.php:11
|
2945 |
+
#, php-format
|
2946 |
+
msgid ""
|
2947 |
+
"Check if the saved \"Callback Domain\" matches with your domain: <b>%s</b>"
|
2948 |
+
msgstr ""
|
2949 |
+
"Controleer of het opgeslagen \"Callback Domein\" overeenkomt met je domein: "
|
2950 |
+
"<b>%s</b>"
|
2951 |
+
|
2952 |
+
#: nextend-social-login-pro/providers/yahoo/admin/fix-redirect-uri.php:12
|
2953 |
+
#, php-format
|
2954 |
+
msgid ""
|
2955 |
+
"If the Callback Domain matches with your domain, then your don't have "
|
2956 |
+
"anything else to do with this %s app."
|
2957 |
+
msgstr ""
|
2958 |
+
"Als het Callback Domein overeenkomt met je domein, dan heb je niets anders "
|
2959 |
+
"te maken met deze %s app."
|
2960 |
+
|
2961 |
+
#: nextend-social-login-pro/providers/yahoo/admin/fix-redirect-uri.php:13
|
2962 |
+
#, php-format
|
2963 |
+
msgid ""
|
2964 |
+
"The Callback Domain of %1$s apps can not be modified. So if the Callback "
|
2965 |
+
"Domain differs from your domain, you need to create a new app as you see in "
|
2966 |
+
"the Getting Started section of the %1$s provider."
|
2967 |
+
msgstr ""
|
2968 |
+
"Het Callback Domein van %1$s apps kunnen niet worden gewijzigd. Dus als het "
|
2969 |
+
"Callback Domein verschilt van je domein, moet je een nieuwe app maken zoals "
|
2970 |
+
"je ziet in het Aan de slag gedeelte van de %1$s provider."
|
2971 |
+
|
2972 |
+
#: nextend-social-login-pro/providers/yahoo/admin/fix-redirect-uri.php:14
|
2973 |
+
msgid ""
|
2974 |
+
"Replace your old \"Client ID\" and \"Client Secret\" with the one of the new "
|
2975 |
+
"app!"
|
2976 |
+
msgstr ""
|
2977 |
+
"Vervang je oude \"Client ID\" en \"Client Geheim\" door die van de nieuwe "
|
2978 |
+
"app!"
|
2979 |
+
|
2980 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:18
|
2981 |
+
msgid "Click on the \"Create an App\" button on the top right corner."
|
2982 |
+
msgstr "Klik op de knop \"Maak een App\" in de rechterbovenhoek."
|
2983 |
+
|
2984 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:19
|
2985 |
+
msgid ""
|
2986 |
+
"Fill the \"Application Name\" and select \"Web Application\" at "
|
2987 |
+
"\"Application Type\"."
|
2988 |
+
msgstr ""
|
2989 |
+
"Vul de \"Applicatie Naam\" in en selecteer \"Web Applicatie\" bij "
|
2990 |
+
"\"Applicatie Type\"."
|
2991 |
+
|
2992 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:20
|
2993 |
+
msgid "Enter a \"Description\" for your app!"
|
2994 |
+
msgstr "Vul een \"Beschrijving\" in voor je app!"
|
2995 |
+
|
2996 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:21
|
2997 |
+
#, php-format
|
2998 |
+
msgid "Enter the URL of your site to the \"Home Page URL\" field: <b>%s</b>"
|
2999 |
+
msgstr "Voer de URL van je site in het veld \"Home Page URL\" in: <b>%s</b>"
|
3000 |
+
|
3001 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:22
|
3002 |
+
#, php-format
|
3003 |
+
msgid ""
|
3004 |
+
"Fill the \"Callback Domain\" field with your domain name probably: <b>%s</b> "
|
3005 |
+
msgstr ""
|
3006 |
+
"Vul het \"Callback Domein\" veld in met je domeinnaam waarschijnlijk: <b>%s</"
|
3007 |
+
"b> "
|
3008 |
+
|
3009 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:24
|
3010 |
+
msgid ""
|
3011 |
+
"<i>The value of the \"Callback Domain\" field can not be modified. If it "
|
3012 |
+
"would be necessary, you must create a new App!</i>"
|
3013 |
+
msgstr ""
|
3014 |
+
"<i>De waarde van het veld \"Callback Domein\" kan niet worden gewijzigd. Als "
|
3015 |
+
"het nodig is, moet je een nieuwe App maken!</i>"
|
3016 |
+
|
3017 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:27
|
3018 |
+
msgid ""
|
3019 |
+
"Under the \"API Permissions you should select \"Profiles (Social "
|
3020 |
+
"Directory)\" with either \"Read Public\" or \"Read/Write Public and Private"
|
3021 |
+
"\"."
|
3022 |
+
msgstr ""
|
3023 |
+
"Onder de \"API Machtigingen\" moet je \"Profielen (Social Directory)\" "
|
3024 |
+
"selecteren met ofwel \"Lees Openbaar \" of \"Lees/Schrijf Openbaar en Privé"
|
3025 |
+
"\"."
|
3026 |
+
|
3027 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:29
|
3028 |
+
msgid ""
|
3029 |
+
"<u>Read Public:</u> retrieves only the basic fields, email address is not "
|
3030 |
+
"included!"
|
3031 |
+
msgstr ""
|
3032 |
+
"<u>Lees Openbaar:</u> haalt alleen de basisvelden op, e-mailadres is niet "
|
3033 |
+
"inbegrepen!"
|
3034 |
+
|
3035 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:30
|
3036 |
+
msgid ""
|
3037 |
+
"<u>Read/Write Public and Private:</u> retrieves some extra fields, email "
|
3038 |
+
"address included!"
|
3039 |
+
msgstr ""
|
3040 |
+
"<u>Lezen/Schrijven Openbaar en Privé:</u> haalt enkele extra velden op, "
|
3041 |
+
"inclusief e-mailadres!"
|
3042 |
+
|
3043 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:31
|
3044 |
+
msgid ""
|
3045 |
+
"<i>To modify these values in the future, you must create a new App! Also you "
|
3046 |
+
"will need to select the \"API Permission\" on our Setting tab according to "
|
3047 |
+
"the selected value!</i>"
|
3048 |
+
msgstr ""
|
3049 |
+
"<i>Om deze waarden in de toekomst aan te passen, moet je een nieuwe App "
|
3050 |
+
"maken! Ook moet je de \"API Permissies\" selecteren op ons tabblad "
|
3051 |
+
"\"Instellingen\" op basis van de geselecteerde waarde!</i>"
|
3052 |
+
|
3053 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:34
|
3054 |
+
msgid "Click \"Create App\"."
|
3055 |
+
msgstr "Klik op \"Maak App\"."
|
3056 |
+
|
3057 |
+
#: nextend-social-login-pro/providers/yahoo/admin/getting-started.php:35
|
3058 |
+
msgid ""
|
3059 |
+
"On the top of the page, you will find the necessary \"Client ID\" and "
|
3060 |
+
"\"Client Secret\"! These will be needed in the plugin's settings."
|
3061 |
+
msgstr ""
|
3062 |
+
"Bovenaan de pagina vind je de nodige \"Client ID\" en \"Client Geheim\"! "
|
3063 |
+
"Deze zijn nodig in de instellingen van de plugin."
|
3064 |
+
|
3065 |
+
#: nextend-social-login-pro/providers/yahoo/admin/settings.php:47
|
3066 |
+
msgid "API Permission"
|
3067 |
+
msgstr "API-toestemming"
|
3068 |
+
|
3069 |
+
#: nextend-social-login-pro/providers/yahoo/admin/settings.php:52
|
3070 |
+
msgid "Read Public"
|
3071 |
+
msgstr "Lees Openbaar"
|
3072 |
+
|
3073 |
+
#: nextend-social-login-pro/providers/yahoo/admin/settings.php:55
|
3074 |
+
msgid "Read/Write Public and Private"
|
3075 |
+
msgstr "Lezen/schrijven Openbaar en Privé"
|
3076 |
+
|
3077 |
+
#: nextend-social-login-pro/providers/yahoo/admin/settings.php:56
|
3078 |
+
msgid ""
|
3079 |
+
"Email address is private, so you need \"Read/Write Public and Private\" "
|
3080 |
+
"permission if you want to access it.<br><b>Important note:</b> During the "
|
3081 |
+
"APP configuration, you will also need to select the API Permissions for "
|
3082 |
+
"Profiles (Social Directory) according to the chosen value."
|
3083 |
+
msgstr ""
|
3084 |
+
"E-mailadres is privé, dus je hebt \"Lees/Schijf Openbaar en Privé\" "
|
3085 |
+
"toestemming nodig als je er toegang toe wilt krijgen.<br><b> Belangrijke "
|
3086 |
+
"opmerking:</b> Gedurende de APP-configuratie moet je ook de API-machtigingen "
|
3087 |
+
"voor profielen (Social Directory) selecteren op basis van de gekozen waarde."
|
3088 |
+
|
3089 |
+
#: nextend-social-login-pro/providers/yahoo/yahoo.php:61
|
3090 |
+
msgid "Continue with <b>Yahoo</b>"
|
3091 |
+
msgstr "Doorgaan met <b>Yahoo</b>"
|
3092 |
+
|
3093 |
+
#: nextend-social-login-pro/providers/yahoo/yahoo.php:62
|
3094 |
+
msgid "Link account with <b>Yahoo</b>"
|
3095 |
+
msgstr "Koppel met <b>Yahoo</b>"
|
3096 |
+
|
3097 |
+
#: nextend-social-login-pro/providers/yahoo/yahoo.php:63
|
3098 |
+
msgid "Unlink account from <b>Yahoo</b>"
|
3099 |
+
msgstr "Ontkoppel van <b>Yahoo</b>"
|
3100 |
+
|
3101 |
+
#: nextend-social-login-pro/providers/yahoo/yahoo.php:239
|
3102 |
+
#, php-format
|
3103 |
+
msgid "Required permission: %1$s"
|
3104 |
+
msgstr "Vereiste toestemming: %1$s"
|
3105 |
+
|
3106 |
+
#: nextend-social-login-pro/template-parts/buddypress/login/above-separator.php:10
|
3107 |
+
#: nextend-social-login-pro/template-parts/buddypress/login/below-separator.php:10
|
3108 |
+
#: nextend-social-login-pro/template-parts/embedded-login/above-separator.php:10
|
3109 |
+
#: nextend-social-login-pro/template-parts/embedded-login/below-separator.php:10
|
3110 |
+
#: nextend-social-login-pro/template-parts/login/above-separator.php:11
|
3111 |
+
#: nextend-social-login-pro/template-parts/login/below-separator.php:8
|
3112 |
+
#: nextend-social-login-pro/template-parts/memberpress/login/above-separator.php:10
|
3113 |
+
#: nextend-social-login-pro/template-parts/memberpress/login/below-separator.php:10
|
3114 |
+
#: nextend-social-login-pro/template-parts/memberpress/sign-up/above-separator.php:10
|
3115 |
+
#: nextend-social-login-pro/template-parts/memberpress/sign-up/below-separator.php:10
|
3116 |
+
#: nextend-social-login-pro/template-parts/ultimate-member/login/above-separator.php:10
|
3117 |
+
#: nextend-social-login-pro/template-parts/ultimate-member/login/below-separator.php:10
|
3118 |
+
#: nextend-social-login-pro/template-parts/ultimate-member/register/above-separator.php:10
|
3119 |
+
#: nextend-social-login-pro/template-parts/ultimate-member/register/below-separator.php:10
|
3120 |
+
#: nextend-social-login-pro/template-parts/userpro/login/above-separator.php:10
|
3121 |
+
#: nextend-social-login-pro/template-parts/userpro/login/below-separator.php:10
|
3122 |
+
#: nextend-social-login-pro/template-parts/userpro/register/above-separator.php:10
|
3123 |
+
#: nextend-social-login-pro/template-parts/userpro/register/below-separator.php:10
|
3124 |
+
#: nextend-social-login-pro/template-parts/woocommerce/billing/above-separator.php:11
|
3125 |
+
#: nextend-social-login-pro/template-parts/woocommerce/billing/below-separator.php:11
|
3126 |
+
#: nextend-social-login-pro/template-parts/woocommerce/login/above-separator.php:10
|
3127 |
+
#: nextend-social-login-pro/template-parts/woocommerce/login/below-separator.php:10
|
3128 |
+
#: nextend-social-login-pro/template-parts/woocommerce/register/above-separator.php:10
|
3129 |
+
#: nextend-social-login-pro/template-parts/woocommerce/register/below-separator.php:10
|
3130 |
+
msgid "OR"
|
3131 |
+
msgstr "OF"
|
3132 |
+
|
3133 |
+
#: nextend-social-login-pro/template-parts/memberpress/account-home.php:1
|
3134 |
+
#: nextend-social-login-pro/template-parts/ultimate-member/account-home.php:1
|
3135 |
+
#: nextend-social-login-pro/template-parts/woocommerce/edit-account-after.php:1
|
3136 |
+
#: nextend-social-login-pro/template-parts/woocommerce/edit-account-before.php:1
|
3137 |
+
msgid "Social accounts"
|
3138 |
+
msgstr "Social accounts"
|
licence.txt
CHANGED
@@ -1,339 +1,339 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
281 |
-
|
282 |
-
How to Apply These Terms to Your New Programs
|
283 |
-
|
284 |
-
If you develop a new program, and you want it to be of the greatest
|
285 |
-
possible use to the public, the best way to achieve this is to make it
|
286 |
-
free software which everyone can redistribute and change under these terms.
|
287 |
-
|
288 |
-
To do so, attach the following notices to the program. It is safest
|
289 |
-
to attach them to the start of each source file to most effectively
|
290 |
-
convey the exclusion of warranty; and each file should have at least
|
291 |
-
the "copyright" line and a pointer to where the full notice is found.
|
292 |
-
|
293 |
-
<one line to give the program's name and a brief idea of what it does.>
|
294 |
-
Copyright (C) <year> <name of author>
|
295 |
-
|
296 |
-
This program is free software; you can redistribute it and/or modify
|
297 |
-
it under the terms of the GNU General Public License as published by
|
298 |
-
the Free Software Foundation; either version 2 of the License, or
|
299 |
-
(at your option) any later version.
|
300 |
-
|
301 |
-
This program is distributed in the hope that it will be useful,
|
302 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
303 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
304 |
-
GNU General Public License for more details.
|
305 |
-
|
306 |
-
You should have received a copy of the GNU General Public License along
|
307 |
-
with this program; if not, write to the Free Software Foundation, Inc.,
|
308 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
309 |
-
|
310 |
-
Also add information on how to contact you by electronic and paper mail.
|
311 |
-
|
312 |
-
If the program is interactive, make it output a short notice like this
|
313 |
-
when it starts in an interactive mode:
|
314 |
-
|
315 |
-
Gnomovision version 69, Copyright (C) year name of author
|
316 |
-
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
317 |
-
This is free software, and you are welcome to redistribute it
|
318 |
-
under certain conditions; type `show c' for details.
|
319 |
-
|
320 |
-
The hypothetical commands `show w' and `show c' should show the appropriate
|
321 |
-
parts of the General Public License. Of course, the commands you use may
|
322 |
-
be called something other than `show w' and `show c'; they could even be
|
323 |
-
mouse-clicks or menu items--whatever suits your program.
|
324 |
-
|
325 |
-
You should also get your employer (if you work as a programmer) or your
|
326 |
-
school, if any, to sign a "copyright disclaimer" for the program, if
|
327 |
-
necessary. Here is a sample; alter the names:
|
328 |
-
|
329 |
-
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
330 |
-
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
331 |
-
|
332 |
-
<signature of Ty Coon>, 1 April 1989
|
333 |
-
Ty Coon, President of Vice
|
334 |
-
|
335 |
-
This General Public License does not permit incorporating your program into
|
336 |
-
proprietary programs. If your program is a subroutine library, you may
|
337 |
-
consider it more useful to permit linking proprietary applications with the
|
338 |
-
library. If this is what you want to do, use the GNU Lesser General
|
339 |
-
Public License instead of this License.
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 2, June 1991
|
3 |
+
|
4 |
+
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
+
Everyone is permitted to copy and distribute verbatim copies
|
7 |
+
of this license document, but changing it is not allowed.
|
8 |
+
|
9 |
+
Preamble
|
10 |
+
|
11 |
+
The licenses for most software are designed to take away your
|
12 |
+
freedom to share and change it. By contrast, the GNU General Public
|
13 |
+
License is intended to guarantee your freedom to share and change free
|
14 |
+
software--to make sure the software is free for all its users. This
|
15 |
+
General Public License applies to most of the Free Software
|
16 |
+
Foundation's software and to any other program whose authors commit to
|
17 |
+
using it. (Some other Free Software Foundation software is covered by
|
18 |
+
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
+
your programs, too.
|
20 |
+
|
21 |
+
When we speak of free software, we are referring to freedom, not
|
22 |
+
price. Our General Public Licenses are designed to make sure that you
|
23 |
+
have the freedom to distribute copies of free software (and charge for
|
24 |
+
this service if you wish), that you receive source code or can get it
|
25 |
+
if you want it, that you can change the software or use pieces of it
|
26 |
+
in new free programs; and that you know you can do these things.
|
27 |
+
|
28 |
+
To protect your rights, we need to make restrictions that forbid
|
29 |
+
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
+
These restrictions translate to certain responsibilities for you if you
|
31 |
+
distribute copies of the software, or if you modify it.
|
32 |
+
|
33 |
+
For example, if you distribute copies of such a program, whether
|
34 |
+
gratis or for a fee, you must give the recipients all the rights that
|
35 |
+
you have. You must make sure that they, too, receive or can get the
|
36 |
+
source code. And you must show them these terms so they know their
|
37 |
+
rights.
|
38 |
+
|
39 |
+
We protect your rights with two steps: (1) copyright the software, and
|
40 |
+
(2) offer you this license which gives you legal permission to copy,
|
41 |
+
distribute and/or modify the software.
|
42 |
+
|
43 |
+
Also, for each author's protection and ours, we want to make certain
|
44 |
+
that everyone understands that there is no warranty for this free
|
45 |
+
software. If the software is modified by someone else and passed on, we
|
46 |
+
want its recipients to know that what they have is not the original, so
|
47 |
+
that any problems introduced by others will not reflect on the original
|
48 |
+
authors' reputations.
|
49 |
+
|
50 |
+
Finally, any free program is threatened constantly by software
|
51 |
+
patents. We wish to avoid the danger that redistributors of a free
|
52 |
+
program will individually obtain patent licenses, in effect making the
|
53 |
+
program proprietary. To prevent this, we have made it clear that any
|
54 |
+
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
+
|
56 |
+
The precise terms and conditions for copying, distribution and
|
57 |
+
modification follow.
|
58 |
+
|
59 |
+
GNU GENERAL PUBLIC LICENSE
|
60 |
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
+
|
62 |
+
0. This License applies to any program or other work which contains
|
63 |
+
a notice placed by the copyright holder saying it may be distributed
|
64 |
+
under the terms of this General Public License. The "Program", below,
|
65 |
+
refers to any such program or work, and a "work based on the Program"
|
66 |
+
means either the Program or any derivative work under copyright law:
|
67 |
+
that is to say, a work containing the Program or a portion of it,
|
68 |
+
either verbatim or with modifications and/or translated into another
|
69 |
+
language. (Hereinafter, translation is included without limitation in
|
70 |
+
the term "modification".) Each licensee is addressed as "you".
|
71 |
+
|
72 |
+
Activities other than copying, distribution and modification are not
|
73 |
+
covered by this License; they are outside its scope. The act of
|
74 |
+
running the Program is not restricted, and the output from the Program
|
75 |
+
is covered only if its contents constitute a work based on the
|
76 |
+
Program (independent of having been made by running the Program).
|
77 |
+
Whether that is true depends on what the Program does.
|
78 |
+
|
79 |
+
1. You may copy and distribute verbatim copies of the Program's
|
80 |
+
source code as you receive it, in any medium, provided that you
|
81 |
+
conspicuously and appropriately publish on each copy an appropriate
|
82 |
+
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
+
notices that refer to this License and to the absence of any warranty;
|
84 |
+
and give any other recipients of the Program a copy of this License
|
85 |
+
along with the Program.
|
86 |
+
|
87 |
+
You may charge a fee for the physical act of transferring a copy, and
|
88 |
+
you may at your option offer warranty protection in exchange for a fee.
|
89 |
+
|
90 |
+
2. You may modify your copy or copies of the Program or any portion
|
91 |
+
of it, thus forming a work based on the Program, and copy and
|
92 |
+
distribute such modifications or work under the terms of Section 1
|
93 |
+
above, provided that you also meet all of these conditions:
|
94 |
+
|
95 |
+
a) You must cause the modified files to carry prominent notices
|
96 |
+
stating that you changed the files and the date of any change.
|
97 |
+
|
98 |
+
b) You must cause any work that you distribute or publish, that in
|
99 |
+
whole or in part contains or is derived from the Program or any
|
100 |
+
part thereof, to be licensed as a whole at no charge to all third
|
101 |
+
parties under the terms of this License.
|
102 |
+
|
103 |
+
c) If the modified program normally reads commands interactively
|
104 |
+
when run, you must cause it, when started running for such
|
105 |
+
interactive use in the most ordinary way, to print or display an
|
106 |
+
announcement including an appropriate copyright notice and a
|
107 |
+
notice that there is no warranty (or else, saying that you provide
|
108 |
+
a warranty) and that users may redistribute the program under
|
109 |
+
these conditions, and telling the user how to view a copy of this
|
110 |
+
License. (Exception: if the Program itself is interactive but
|
111 |
+
does not normally print such an announcement, your work based on
|
112 |
+
the Program is not required to print an announcement.)
|
113 |
+
|
114 |
+
These requirements apply to the modified work as a whole. If
|
115 |
+
identifiable sections of that work are not derived from the Program,
|
116 |
+
and can be reasonably considered independent and separate works in
|
117 |
+
themselves, then this License, and its terms, do not apply to those
|
118 |
+
sections when you distribute them as separate works. But when you
|
119 |
+
distribute the same sections as part of a whole which is a work based
|
120 |
+
on the Program, the distribution of the whole must be on the terms of
|
121 |
+
this License, whose permissions for other licensees extend to the
|
122 |
+
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
+
|
124 |
+
Thus, it is not the intent of this section to claim rights or contest
|
125 |
+
your rights to work written entirely by you; rather, the intent is to
|
126 |
+
exercise the right to control the distribution of derivative or
|
127 |
+
collective works based on the Program.
|
128 |
+
|
129 |
+
In addition, mere aggregation of another work not based on the Program
|
130 |
+
with the Program (or with a work based on the Program) on a volume of
|
131 |
+
a storage or distribution medium does not bring the other work under
|
132 |
+
the scope of this License.
|
133 |
+
|
134 |
+
3. You may copy and distribute the Program (or a work based on it,
|
135 |
+
under Section 2) in object code or executable form under the terms of
|
136 |
+
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
+
|
138 |
+
a) Accompany it with the complete corresponding machine-readable
|
139 |
+
source code, which must be distributed under the terms of Sections
|
140 |
+
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
+
|
142 |
+
b) Accompany it with a written offer, valid for at least three
|
143 |
+
years, to give any third party, for a charge no more than your
|
144 |
+
cost of physically performing source distribution, a complete
|
145 |
+
machine-readable copy of the corresponding source code, to be
|
146 |
+
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
+
customarily used for software interchange; or,
|
148 |
+
|
149 |
+
c) Accompany it with the information you received as to the offer
|
150 |
+
to distribute corresponding source code. (This alternative is
|
151 |
+
allowed only for noncommercial distribution and only if you
|
152 |
+
received the program in object code or executable form with such
|
153 |
+
an offer, in accord with Subsection b above.)
|
154 |
+
|
155 |
+
The source code for a work means the preferred form of the work for
|
156 |
+
making modifications to it. For an executable work, complete source
|
157 |
+
code means all the source code for all modules it contains, plus any
|
158 |
+
associated interface definition files, plus the scripts used to
|
159 |
+
control compilation and installation of the executable. However, as a
|
160 |
+
special exception, the source code distributed need not include
|
161 |
+
anything that is normally distributed (in either source or binary
|
162 |
+
form) with the major components (compiler, kernel, and so on) of the
|
163 |
+
operating system on which the executable runs, unless that component
|
164 |
+
itself accompanies the executable.
|
165 |
+
|
166 |
+
If distribution of executable or object code is made by offering
|
167 |
+
access to copy from a designated place, then offering equivalent
|
168 |
+
access to copy the source code from the same place counts as
|
169 |
+
distribution of the source code, even though third parties are not
|
170 |
+
compelled to copy the source along with the object code.
|
171 |
+
|
172 |
+
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
+
except as expressly provided under this License. Any attempt
|
174 |
+
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
+
void, and will automatically terminate your rights under this License.
|
176 |
+
However, parties who have received copies, or rights, from you under
|
177 |
+
this License will not have their licenses terminated so long as such
|
178 |
+
parties remain in full compliance.
|
179 |
+
|
180 |
+
5. You are not required to accept this License, since you have not
|
181 |
+
signed it. However, nothing else grants you permission to modify or
|
182 |
+
distribute the Program or its derivative works. These actions are
|
183 |
+
prohibited by law if you do not accept this License. Therefore, by
|
184 |
+
modifying or distributing the Program (or any work based on the
|
185 |
+
Program), you indicate your acceptance of this License to do so, and
|
186 |
+
all its terms and conditions for copying, distributing or modifying
|
187 |
+
the Program or works based on it.
|
188 |
+
|
189 |
+
6. Each time you redistribute the Program (or any work based on the
|
190 |
+
Program), the recipient automatically receives a license from the
|
191 |
+
original licensor to copy, distribute or modify the Program subject to
|
192 |
+
these terms and conditions. You may not impose any further
|
193 |
+
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
+
You are not responsible for enforcing compliance by third parties to
|
195 |
+
this License.
|
196 |
+
|
197 |
+
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
+
infringement or for any other reason (not limited to patent issues),
|
199 |
+
conditions are imposed on you (whether by court order, agreement or
|
200 |
+
otherwise) that contradict the conditions of this License, they do not
|
201 |
+
excuse you from the conditions of this License. If you cannot
|
202 |
+
distribute so as to satisfy simultaneously your obligations under this
|
203 |
+
License and any other pertinent obligations, then as a consequence you
|
204 |
+
may not distribute the Program at all. For example, if a patent
|
205 |
+
license would not permit royalty-free redistribution of the Program by
|
206 |
+
all those who receive copies directly or indirectly through you, then
|
207 |
+
the only way you could satisfy both it and this License would be to
|
208 |
+
refrain entirely from distribution of the Program.
|
209 |
+
|
210 |
+
If any portion of this section is held invalid or unenforceable under
|
211 |
+
any particular circumstance, the balance of the section is intended to
|
212 |
+
apply and the section as a whole is intended to apply in other
|
213 |
+
circumstances.
|
214 |
+
|
215 |
+
It is not the purpose of this section to induce you to infringe any
|
216 |
+
patents or other property right claims or to contest validity of any
|
217 |
+
such claims; this section has the sole purpose of protecting the
|
218 |
+
integrity of the free software distribution system, which is
|
219 |
+
implemented by public license practices. Many people have made
|
220 |
+
generous contributions to the wide range of software distributed
|
221 |
+
through that system in reliance on consistent application of that
|
222 |
+
system; it is up to the author/donor to decide if he or she is willing
|
223 |
+
to distribute software through any other system and a licensee cannot
|
224 |
+
impose that choice.
|
225 |
+
|
226 |
+
This section is intended to make thoroughly clear what is believed to
|
227 |
+
be a consequence of the rest of this License.
|
228 |
+
|
229 |
+
8. If the distribution and/or use of the Program is restricted in
|
230 |
+
certain countries either by patents or by copyrighted interfaces, the
|
231 |
+
original copyright holder who places the Program under this License
|
232 |
+
may add an explicit geographical distribution limitation excluding
|
233 |
+
those countries, so that distribution is permitted only in or among
|
234 |
+
countries not thus excluded. In such case, this License incorporates
|
235 |
+
the limitation as if written in the body of this License.
|
236 |
+
|
237 |
+
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
+
of the General Public License from time to time. Such new versions will
|
239 |
+
be similar in spirit to the present version, but may differ in detail to
|
240 |
+
address new problems or concerns.
|
241 |
+
|
242 |
+
Each version is given a distinguishing version number. If the Program
|
243 |
+
specifies a version number of this License which applies to it and "any
|
244 |
+
later version", you have the option of following the terms and conditions
|
245 |
+
either of that version or of any later version published by the Free
|
246 |
+
Software Foundation. If the Program does not specify a version number of
|
247 |
+
this License, you may choose any version ever published by the Free Software
|
248 |
+
Foundation.
|
249 |
+
|
250 |
+
10. If you wish to incorporate parts of the Program into other free
|
251 |
+
programs whose distribution conditions are different, write to the author
|
252 |
+
to ask for permission. For software which is copyrighted by the Free
|
253 |
+
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
+
make exceptions for this. Our decision will be guided by the two goals
|
255 |
+
of preserving the free status of all derivatives of our free software and
|
256 |
+
of promoting the sharing and reuse of software generally.
|
257 |
+
|
258 |
+
NO WARRANTY
|
259 |
+
|
260 |
+
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
+
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
+
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
+
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
+
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
+
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
+
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
+
REPAIR OR CORRECTION.
|
269 |
+
|
270 |
+
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
+
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
+
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
+
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
+
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
+
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
+
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
+
POSSIBILITY OF SUCH DAMAGES.
|
279 |
+
|
280 |
+
END OF TERMS AND CONDITIONS
|
281 |
+
|
282 |
+
How to Apply These Terms to Your New Programs
|
283 |
+
|
284 |
+
If you develop a new program, and you want it to be of the greatest
|
285 |
+
possible use to the public, the best way to achieve this is to make it
|
286 |
+
free software which everyone can redistribute and change under these terms.
|
287 |
+
|
288 |
+
To do so, attach the following notices to the program. It is safest
|
289 |
+
to attach them to the start of each source file to most effectively
|
290 |
+
convey the exclusion of warranty; and each file should have at least
|
291 |
+
the "copyright" line and a pointer to where the full notice is found.
|
292 |
+
|
293 |
+
<one line to give the program's name and a brief idea of what it does.>
|
294 |
+
Copyright (C) <year> <name of author>
|
295 |
+
|
296 |
+
This program is free software; you can redistribute it and/or modify
|
297 |
+
it under the terms of the GNU General Public License as published by
|
298 |
+
the Free Software Foundation; either version 2 of the License, or
|
299 |
+
(at your option) any later version.
|
300 |
+
|
301 |
+
This program is distributed in the hope that it will be useful,
|
302 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
303 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
304 |
+
GNU General Public License for more details.
|
305 |
+
|
306 |
+
You should have received a copy of the GNU General Public License along
|
307 |
+
with this program; if not, write to the Free Software Foundation, Inc.,
|
308 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
309 |
+
|
310 |
+
Also add information on how to contact you by electronic and paper mail.
|
311 |
+
|
312 |
+
If the program is interactive, make it output a short notice like this
|
313 |
+
when it starts in an interactive mode:
|
314 |
+
|
315 |
+
Gnomovision version 69, Copyright (C) year name of author
|
316 |
+
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
317 |
+
This is free software, and you are welcome to redistribute it
|
318 |
+
under certain conditions; type `show c' for details.
|
319 |
+
|
320 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
321 |
+
parts of the General Public License. Of course, the commands you use may
|
322 |
+
be called something other than `show w' and `show c'; they could even be
|
323 |
+
mouse-clicks or menu items--whatever suits your program.
|
324 |
+
|
325 |
+
You should also get your employer (if you work as a programmer) or your
|
326 |
+
school, if any, to sign a "copyright disclaimer" for the program, if
|
327 |
+
necessary. Here is a sample; alter the names:
|
328 |
+
|
329 |
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
330 |
+
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
331 |
+
|
332 |
+
<signature of Ty Coon>, 1 April 1989
|
333 |
+
Ty Coon, President of Vice
|
334 |
+
|
335 |
+
This General Public License does not permit incorporating your program into
|
336 |
+
proprietary programs. If your program is a subroutine library, you may
|
337 |
+
consider it more useful to permit linking proprietary applications with the
|
338 |
+
library. If this is what you want to do, use the GNU Lesser General
|
339 |
+
Public License instead of this License.
|
nextend-facebook-connect.php
CHANGED
@@ -1,44 +1,44 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
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
|
10 |
-
Domain Path: /languages
|
11 |
-
*/
|
12 |
-
|
13 |
-
if (!defined('NSL_PATH_FILE')) {
|
14 |
-
define('NSL_PATH_FILE', __FILE__);
|
15 |
-
}
|
16 |
-
|
17 |
-
if (!defined('NSL_PATH')) {
|
18 |
-
define('NSL_PATH', dirname(NSL_PATH_FILE));
|
19 |
-
}
|
20 |
-
if (!defined('NSL_PLUGIN_BASENAME')) {
|
21 |
-
define('NSL_PLUGIN_BASENAME', plugin_basename(NSL_PATH_FILE));
|
22 |
-
}
|
23 |
-
|
24 |
-
if (!version_compare(PHP_VERSION, '
|
25 |
-
add_action('admin_notices', 'nsl_fail_php_version');
|
26 |
-
} elseif (!version_compare(get_bloginfo('version'), '4.6', '>=')) {
|
27 |
-
add_action('admin_notices', 'nsl_fail_wp_version');
|
28 |
-
} else {
|
29 |
-
require_once(NSL_PATH . '/nextend-social-login.php');
|
30 |
-
}
|
31 |
-
|
32 |
-
function nsl_fail_php_version() {
|
33 |
-
/* translators: %2$s: PHP version */
|
34 |
-
$message = sprintf(esc_html__('%1$s requires PHP version %2$s+, plugin is currently NOT ACTIVE.', 'nextend-facebook-connect'), 'Nextend Social Login', '
|
35 |
-
$html_message = sprintf('<div class="error">%s</div>', wpautop($message));
|
36 |
-
echo wp_kses_post($html_message);
|
37 |
-
}
|
38 |
-
|
39 |
-
function nsl_fail_wp_version() {
|
40 |
-
/* translators: %2$s: WordPress version */
|
41 |
-
$message = sprintf(esc_html__('%1$s requires WordPress version %2$s+. Because you are using an earlier version, the plugin is currently NOT ACTIVE.', 'nextend-facebook-connect'), 'Nextend Social Login', '4.6');
|
42 |
-
$html_message = sprintf('<div class="error">%s</div>', wpautop($message));
|
43 |
-
echo wp_kses_post($html_message);
|
44 |
}
|
1 |
+
<?php
|
2 |
+
/*
|
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.21
|
7 |
+
Author: Nextendweb
|
8 |
+
License: GPL2
|
9 |
+
Text Domain: nextend-facebook-connect
|
10 |
+
Domain Path: /languages
|
11 |
+
*/
|
12 |
+
|
13 |
+
if (!defined('NSL_PATH_FILE')) {
|
14 |
+
define('NSL_PATH_FILE', __FILE__);
|
15 |
+
}
|
16 |
+
|
17 |
+
if (!defined('NSL_PATH')) {
|
18 |
+
define('NSL_PATH', dirname(NSL_PATH_FILE));
|
19 |
+
}
|
20 |
+
if (!defined('NSL_PLUGIN_BASENAME')) {
|
21 |
+
define('NSL_PLUGIN_BASENAME', plugin_basename(NSL_PATH_FILE));
|
22 |
+
}
|
23 |
+
|
24 |
+
if (!version_compare(PHP_VERSION, '7.0', '>=')) {
|
25 |
+
add_action('admin_notices', 'nsl_fail_php_version');
|
26 |
+
} elseif (!version_compare(get_bloginfo('version'), '4.6', '>=')) {
|
27 |
+
add_action('admin_notices', 'nsl_fail_wp_version');
|
28 |
+
} else {
|
29 |
+
require_once(NSL_PATH . '/nextend-social-login.php');
|
30 |
+
}
|
31 |
+
|
32 |
+
function nsl_fail_php_version() {
|
33 |
+
/* translators: %2$s: PHP version */
|
34 |
+
$message = sprintf(esc_html__('%1$s requires PHP version %2$s+, plugin is currently NOT ACTIVE.', 'nextend-facebook-connect'), 'Nextend Social Login', '7.0');
|
35 |
+
$html_message = sprintf('<div class="error">%s</div>', wpautop($message));
|
36 |
+
echo wp_kses_post($html_message);
|
37 |
+
}
|
38 |
+
|
39 |
+
function nsl_fail_wp_version() {
|
40 |
+
/* translators: %2$s: WordPress version */
|
41 |
+
$message = sprintf(esc_html__('%1$s requires WordPress version %2$s+. Because you are using an earlier version, the plugin is currently NOT ACTIVE.', 'nextend-facebook-connect'), 'Nextend Social Login', '4.6');
|
42 |
+
$html_message = sprintf('<div class="error">%s</div>', wpautop($message));
|
43 |
+
echo wp_kses_post($html_message);
|
44 |
}
|
nextend-social-login.php
CHANGED
@@ -1,1169 +1,1228 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
require_once
|
7 |
-
|
8 |
-
|
9 |
-
require_once dirname(__FILE__) . '/NSL/
|
10 |
-
|
11 |
-
|
12 |
-
require_once(
|
13 |
-
|
14 |
-
|
15 |
-
require_once(NSL_PATH . '/
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
'
|
91 |
-
'
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
private static $
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
add_action('
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
'
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
'
|
142 |
-
'
|
143 |
-
'
|
144 |
-
'
|
145 |
-
'
|
146 |
-
'
|
147 |
-
'
|
148 |
-
'
|
149 |
-
'
|
150 |
-
'
|
151 |
-
'
|
152 |
-
'
|
153 |
-
'
|
154 |
-
'
|
155 |
-
'
|
156 |
-
'
|
157 |
-
'
|
158 |
-
'
|
159 |
-
'
|
160 |
-
'
|
161 |
-
'
|
162 |
-
'
|
163 |
-
'
|
164 |
-
'
|
165 |
-
'
|
166 |
-
'
|
167 |
-
'
|
168 |
-
'
|
169 |
-
'
|
170 |
-
'
|
171 |
-
'
|
172 |
-
'
|
173 |
-
|
174 |
-
'
|
175 |
-
'
|
176 |
-
|
177 |
-
'
|
178 |
-
'
|
179 |
-
'
|
180 |
-
'
|
181 |
-
'
|
182 |
-
'
|
183 |
-
|
184 |
-
'
|
185 |
-
'
|
186 |
-
|
187 |
-
'
|
188 |
-
'
|
189 |
-
'
|
190 |
-
'
|
191 |
-
'
|
192 |
-
'
|
193 |
-
'
|
194 |
-
'
|
195 |
-
'
|
196 |
-
'
|
197 |
-
|
198 |
-
'
|
199 |
-
'
|
200 |
-
|
201 |
-
'
|
202 |
-
'
|
203 |
-
'
|
204 |
-
'
|
205 |
-
|
206 |
-
'
|
207 |
-
'
|
208 |
-
|
209 |
-
'
|
210 |
-
'
|
211 |
-
'
|
212 |
-
'
|
213 |
-
'
|
214 |
-
|
215 |
-
'
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
add_action('
|
293 |
-
|
294 |
-
add_action('
|
295 |
-
|
296 |
-
|
297 |
-
add_action('
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
add_action('
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
/*
|
338 |
-
|
339 |
-
|
340 |
-
add_action('
|
341 |
-
|
342 |
-
|
343 |
-
add_action('
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
}
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
}
|
420 |
-
|
421 |
-
public static function
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
}
|
454 |
-
|
455 |
-
public static function
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
public static function
|
474 |
-
if (
|
475 |
-
if ($
|
476 |
-
|
477 |
-
}
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
if ($
|
482 |
-
|
483 |
-
}
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
if (
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
self
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
if (
|
612 |
-
$
|
613 |
-
}
|
614 |
-
|
615 |
-
$
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
}
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
return
|
663 |
-
}
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
}
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
if (
|
844 |
-
$
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
$
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
//
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
$
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
}
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
}
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
'
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
$
|
1140 |
-
$
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use NSL\Notices;
|
4 |
+
use NSL\Persistent\Persistent;
|
5 |
+
|
6 |
+
require_once(NSL_PATH . '/includes/exceptions.php');
|
7 |
+
|
8 |
+
require_once dirname(__FILE__) . '/NSL/Persistent/Persistent.php';
|
9 |
+
require_once dirname(__FILE__) . '/NSL/Notices.php';
|
10 |
+
require_once dirname(__FILE__) . '/NSL/REST.php';
|
11 |
+
|
12 |
+
require_once dirname(__FILE__) . '/NSL/GDPR.php';
|
13 |
+
|
14 |
+
require_once(NSL_PATH . '/class-settings.php');
|
15 |
+
require_once(NSL_PATH . '/includes/provider.php');
|
16 |
+
require_once(NSL_PATH . '/admin/admin.php');
|
17 |
+
|
18 |
+
require_once(NSL_PATH . '/compat.php');
|
19 |
+
|
20 |
+
class NextendSocialLogin {
|
21 |
+
|
22 |
+
public static $version = '3.0.21';
|
23 |
+
|
24 |
+
public static $nslPROMinVersion = '3.0.21';
|
25 |
+
|
26 |
+
public static $proxyPage = false;
|
27 |
+
|
28 |
+
public static function checkVersion() {
|
29 |
+
|
30 |
+
if (version_compare(self::$version, NextendSocialLoginPRO::$nslMinVersion, '<')) {
|
31 |
+
if (did_action('init')) {
|
32 |
+
NextendSocialLogin::noticeUpdateFree();
|
33 |
+
} else {
|
34 |
+
add_action('init', 'NextendSocialLogin::noticeUpdateFree');
|
35 |
+
}
|
36 |
+
|
37 |
+
return false;
|
38 |
+
}
|
39 |
+
if (version_compare(NextendSocialLoginPRO::$version, self::$nslPROMinVersion, '<')) {
|
40 |
+
if (did_action('init')) {
|
41 |
+
NextendSocialLogin::noticeUpdatePro();
|
42 |
+
} else {
|
43 |
+
add_action('init', 'NextendSocialLogin::noticeUpdatePro');
|
44 |
+
}
|
45 |
+
|
46 |
+
return false;
|
47 |
+
}
|
48 |
+
|
49 |
+
return true;
|
50 |
+
}
|
51 |
+
|
52 |
+
|
53 |
+
public static function noticeUpdateFree() {
|
54 |
+
if (is_admin() && current_user_can('manage_options')) {
|
55 |
+
$file = 'nextend-facebook-connect/nextend-facebook-connect.php';
|
56 |
+
Notices::addError(sprintf(__('Please update %1$s to version %2$s or newer.', 'nextend-facebook-connect'), "Nextend Social Login", NextendSocialLoginPRO::$nslMinVersion) . ' <a href="' . esc_url(wp_nonce_url(admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file)) . '">' . __('Update now!', 'nextend-facebook-connect') . '</a>');
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
public static function noticeUpdatePro() {
|
61 |
+
if (is_admin() && current_user_can('manage_options')) {
|
62 |
+
$file = 'nextend-social-login-pro/nextend-social-login-pro.php';
|
63 |
+
Notices::addError(sprintf(__('Please update %1$s to version %2$s or newer.', 'nextend-facebook-connect'), "Nextend Social Login Pro Addon", self::$nslPROMinVersion) . ' <a href="' . esc_url(wp_nonce_url(admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file)) . '">' . __('Update now!', 'nextend-facebook-connect') . '</a>');
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
/** @var NextendSocialLoginSettings */
|
68 |
+
public static $settings;
|
69 |
+
|
70 |
+
private static $styles = array(
|
71 |
+
'default' => array(
|
72 |
+
'container' => 'nsl-container-block',
|
73 |
+
'align' => array(
|
74 |
+
'left',
|
75 |
+
'right',
|
76 |
+
'center',
|
77 |
+
)
|
78 |
+
),
|
79 |
+
'icon' => array(
|
80 |
+
'container' => 'nsl-container-inline',
|
81 |
+
'align' => array(
|
82 |
+
'left',
|
83 |
+
'right',
|
84 |
+
'center',
|
85 |
+
)
|
86 |
+
),
|
87 |
+
'grid' => array(
|
88 |
+
'container' => 'nsl-container-grid',
|
89 |
+
'align' => array(
|
90 |
+
'left',
|
91 |
+
'right',
|
92 |
+
'center',
|
93 |
+
'space-around',
|
94 |
+
'space-between',
|
95 |
+
)
|
96 |
+
)
|
97 |
+
);
|
98 |
+
|
99 |
+
public static $providersPath;
|
100 |
+
|
101 |
+
/**
|
102 |
+
* @var NextendSocialProviderDummy[]
|
103 |
+
*/
|
104 |
+
public static $providers = array();
|
105 |
+
|
106 |
+
/**
|
107 |
+
* @var NextendSocialProvider[]
|
108 |
+
*/
|
109 |
+
public static $allowedProviders = array();
|
110 |
+
|
111 |
+
/**
|
112 |
+
* @var NextendSocialProvider[]
|
113 |
+
*/
|
114 |
+
public static $enabledProviders = array();
|
115 |
+
|
116 |
+
private static $ordering = array();
|
117 |
+
|
118 |
+
private static $loginHeadAdded = false;
|
119 |
+
private static $loginMainButtonsAdded = false;
|
120 |
+
public static $counter = 1;
|
121 |
+
|
122 |
+
public static $WPLoginCurrentView = '';
|
123 |
+
|
124 |
+
public static $WPLoginCurrentFlow = 'login';
|
125 |
+
|
126 |
+
public static function init() {
|
127 |
+
add_action('plugins_loaded', 'NextendSocialLogin::plugins_loaded');
|
128 |
+
register_activation_hook(NSL_PATH_FILE, 'NextendSocialLogin::install');
|
129 |
+
|
130 |
+
add_action('delete_user', 'NextendSocialLogin::delete_user');
|
131 |
+
|
132 |
+
self::$settings = new NextendSocialLoginSettings('nextend_social_login', array(
|
133 |
+
'enabled' => array(),
|
134 |
+
'register-flow-page' => '',
|
135 |
+
'proxy-page' => '',
|
136 |
+
'ordering' => array(
|
137 |
+
'facebook',
|
138 |
+
'google',
|
139 |
+
'twitter'
|
140 |
+
),
|
141 |
+
'licenses' => array(),
|
142 |
+
'terms_show' => 0,
|
143 |
+
'terms' => __('By clicking Register, you accept our <a href="#privacy_policy_url" target="_blank">Privacy Policy</a>', 'nextend-facebook-connect'),
|
144 |
+
'store_name' => 1,
|
145 |
+
'store_email' => 1,
|
146 |
+
'avatar_store' => 1,
|
147 |
+
'store_access_token' => 1,
|
148 |
+
'redirect_prevent_external' => 0,
|
149 |
+
'redirect' => '',
|
150 |
+
'redirect_reg' => '',
|
151 |
+
'default_redirect' => '',
|
152 |
+
'default_redirect_reg' => '',
|
153 |
+
'blacklisted_urls' => '',
|
154 |
+
'target' => 'prefer-popup',
|
155 |
+
'allow_register' => -1,
|
156 |
+
'allow_unlink' => 1,
|
157 |
+
'show_login_form' => 'show',
|
158 |
+
'login_form_button_align' => 'left',
|
159 |
+
'show_registration_form' => 'show',
|
160 |
+
'login_form_button_style' => 'default',
|
161 |
+
'login_form_layout' => 'below',
|
162 |
+
'show_embedded_login_form' => 'show',
|
163 |
+
'embedded_login_form_button_align' => 'left',
|
164 |
+
'embedded_login_form_button_style' => 'default',
|
165 |
+
'embedded_login_form_layout' => 'below',
|
166 |
+
'comment_login_button' => 'show',
|
167 |
+
'comment_button_align' => 'left',
|
168 |
+
'comment_button_style' => 'default',
|
169 |
+
'buddypress_register_button' => 'bp_before_account_details_fields',
|
170 |
+
'buddypress_register_button_align' => 'left',
|
171 |
+
'buddypress_register_button_style' => 'default',
|
172 |
+
'buddypress_login' => 'show',
|
173 |
+
'buddypress_login_form_layout' => 'default',
|
174 |
+
'buddypress_login_button_style' => 'default',
|
175 |
+
'buddypress_sidebar_login' => 'show',
|
176 |
+
|
177 |
+
'woocommerce_login' => 'after',
|
178 |
+
'woocommerce_login_form_layout' => 'default',
|
179 |
+
'woocommerce_register' => 'after',
|
180 |
+
'woocommerce_register_form_layout' => 'default',
|
181 |
+
'woocommerce_billing' => 'before',
|
182 |
+
'woocommerce_billing_form_layout' => 'default',
|
183 |
+
'woocoommerce_form_button_style' => 'default',
|
184 |
+
'woocoommerce_form_button_align' => 'left',
|
185 |
+
'woocommerce_account_details' => 'before',
|
186 |
+
|
187 |
+
'memberpress_form_button_align' => 'left',
|
188 |
+
'memberpress_login_form_button_style' => 'default',
|
189 |
+
'memberpress_login_form_layout' => 'below-separator',
|
190 |
+
'memberpress_signup' => 'before',
|
191 |
+
'memberpress_signup_form_button_style' => 'default',
|
192 |
+
'memberpress_signup_form_layout' => 'below-separator',
|
193 |
+
'memberpress_account_details' => 'after',
|
194 |
+
'registration_notification_notify' => '0',
|
195 |
+
'debug' => '0',
|
196 |
+
'login_restriction' => '0',
|
197 |
+
'avatars_in_all_media' => '0',
|
198 |
+
'review_state' => -1,
|
199 |
+
'woocommerce_dismissed' => 0,
|
200 |
+
|
201 |
+
'userpro_show_login_form' => 'show',
|
202 |
+
'userpro_show_register_form' => 'show',
|
203 |
+
'userpro_form_button_align' => 'left',
|
204 |
+
'userpro_login_form_button_style' => 'default',
|
205 |
+
'userpro_register_form_button_style' => 'default',
|
206 |
+
'userpro_login_form_layout' => 'below',
|
207 |
+
'userpro_register_form_layout' => 'below',
|
208 |
+
|
209 |
+
'ultimatemember_form_button_align' => 'left',
|
210 |
+
'ultimatemember_login' => 'after',
|
211 |
+
'ultimatemember_login_form_button_style' => 'default',
|
212 |
+
'ultimatemember_login_form_layout' => 'below-separator',
|
213 |
+
'ultimatemember_register' => 'after',
|
214 |
+
'ultimatemember_register_form_button_style' => 'default',
|
215 |
+
'ultimatemember_register_form_layout' => 'below-separator',
|
216 |
+
'ultimatemember_account_details' => 'after',
|
217 |
+
|
218 |
+
'admin_bar_roles' => array(),
|
219 |
+
));
|
220 |
+
|
221 |
+
add_action('itsec_initialized', 'NextendSocialLogin::disable_better_wp_security_block_long_urls', -1);
|
222 |
+
|
223 |
+
add_action('bp_loaded', 'NextendSocialLogin::buddypress_loaded');
|
224 |
+
}
|
225 |
+
|
226 |
+
public static function plugins_loaded() {
|
227 |
+
|
228 |
+
NextendSocialLoginAdmin::init();
|
229 |
+
|
230 |
+
$lastVersion = get_option('nsl-version');
|
231 |
+
if ($lastVersion != self::$version) {
|
232 |
+
NextendSocialLogin::install();
|
233 |
+
|
234 |
+
if (empty($lastVersion) || version_compare($lastVersion, '3.0.14', '<=')) {
|
235 |
+
$old_license_status = NextendSocialLogin::$settings->get('license_key_ok');
|
236 |
+
|
237 |
+
if ($old_license_status) {
|
238 |
+
$domain = NextendSocialLogin::$settings->get('authorized_domain');
|
239 |
+
if (empty($domain)) {
|
240 |
+
$domain = self::getDomain();
|
241 |
+
}
|
242 |
+
NextendSocialLogin::$settings->set('licenses', array(
|
243 |
+
array(
|
244 |
+
'license_key' => NextendSocialLogin::$settings->get('license_key'),
|
245 |
+
'domain' => $domain
|
246 |
+
)
|
247 |
+
));
|
248 |
+
}
|
249 |
+
}
|
250 |
+
|
251 |
+
update_option('nsl-version', self::$version, true);
|
252 |
+
wp_redirect(set_url_scheme('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));
|
253 |
+
exit;
|
254 |
+
} else if (isset($_REQUEST['repairnsl']) && current_user_can('manage_options') && check_admin_referer('repairnsl')) {
|
255 |
+
self::install();
|
256 |
+
wp_redirect(admin_url('admin.php?page=nextend-social-login'));
|
257 |
+
exit;
|
258 |
+
}
|
259 |
+
|
260 |
+
do_action('nsl_start');
|
261 |
+
|
262 |
+
load_plugin_textdomain('nextend-facebook-connect', false, basename(dirname(__FILE__)) . '/languages/');
|
263 |
+
|
264 |
+
Notices::init();
|
265 |
+
|
266 |
+
self::$providersPath = NSL_PATH . '/providers/';
|
267 |
+
|
268 |
+
$providers = array_diff(scandir(self::$providersPath), array(
|
269 |
+
'..',
|
270 |
+
'.'
|
271 |
+
));
|
272 |
+
|
273 |
+
foreach ($providers AS $provider) {
|
274 |
+
if (file_exists(self::$providersPath . $provider . '/' . $provider . '.php')) {
|
275 |
+
require_once(self::$providersPath . $provider . '/' . $provider . '.php');
|
276 |
+
}
|
277 |
+
}
|
278 |
+
|
279 |
+
do_action('nsl_add_providers');
|
280 |
+
|
281 |
+
self::$ordering = array_flip(self::$settings->get('ordering'));
|
282 |
+
uksort(self::$providers, 'NextendSocialLogin::sortProviders');
|
283 |
+
uksort(self::$allowedProviders, 'NextendSocialLogin::sortProviders');
|
284 |
+
uksort(self::$enabledProviders, 'NextendSocialLogin::sortProviders');
|
285 |
+
|
286 |
+
do_action('nsl_providers_loaded');
|
287 |
+
|
288 |
+
if (NextendSocialLogin::$settings->get('allow_register') != 1) {
|
289 |
+
add_filter('nsl_is_register_allowed', 'NextendSocialLogin::is_register_allowed');
|
290 |
+
}
|
291 |
+
|
292 |
+
add_action('login_form_login', 'NextendSocialLogin::login_form_login');
|
293 |
+
add_action('login_form_register', 'NextendSocialLogin::login_form_register');
|
294 |
+
add_action('login_form_link', 'NextendSocialLogin::login_form_link');
|
295 |
+
add_action('bp_core_screen_signup', 'NextendSocialLogin::bp_login_form_register');
|
296 |
+
|
297 |
+
add_action('login_form_unlink', 'NextendSocialLogin::login_form_unlink');
|
298 |
+
|
299 |
+
|
300 |
+
add_action('template_redirect', 'NextendSocialLogin::alternate_login_page_template_redirect');
|
301 |
+
|
302 |
+
add_action('parse_request', 'NextendSocialLogin::editProfileRedirect');
|
303 |
+
|
304 |
+
//check if jQuery is loaded
|
305 |
+
add_action('wp_print_scripts', 'NextendSocialLogin::checkJqueryLoaded');
|
306 |
+
|
307 |
+
if (count(self::$enabledProviders) > 0) {
|
308 |
+
|
309 |
+
if (self::$settings->get('show_login_form') == 'hide') {
|
310 |
+
add_action('login_form_login', 'NextendSocialLogin::removeLoginFormAssets');
|
311 |
+
} else {
|
312 |
+
add_action('login_form', 'NextendSocialLogin::addLoginFormButtons');
|
313 |
+
add_action('login_form_login', 'NextendSocialLogin::jQuery');
|
314 |
+
}
|
315 |
+
|
316 |
+
if (NextendSocialLogin::$settings->get('show_registration_form') == 'hide') {
|
317 |
+
add_action('login_form_register', 'NextendSocialLogin::removeLoginFormAssets');
|
318 |
+
} else {
|
319 |
+
add_action('register_form', 'NextendSocialLogin::addLoginFormButtons');
|
320 |
+
add_action('login_form_register', 'NextendSocialLogin::jQuery');
|
321 |
+
}
|
322 |
+
|
323 |
+
if (NextendSocialLogin::$settings->get('show_embedded_login_form') != 'hide') {
|
324 |
+
add_filter('login_form_bottom', 'NextendSocialLogin::filterAddEmbeddedLoginFormButtons');
|
325 |
+
}
|
326 |
+
|
327 |
+
//some themes trigger both the bp_sidebar_login_form action and the login_form action.
|
328 |
+
switch (NextendSocialLogin::$settings->get('buddypress_sidebar_login')) {
|
329 |
+
case 'show':
|
330 |
+
add_action('bp_sidebar_login_form', 'NextendSocialLogin::addLoginButtons');
|
331 |
+
break;
|
332 |
+
}
|
333 |
+
|
334 |
+
add_action('profile_personal_options', 'NextendSocialLogin::addLinkAndUnlinkButtons');
|
335 |
+
|
336 |
+
|
337 |
+
/*
|
338 |
+
* Shopkeeper theme fix. Remove normal login form hooks while WooCommerce registration/login form rendering
|
339 |
+
*/
|
340 |
+
add_action('woocommerce_login_form_start', 'NextendSocialLogin::remove_action_login_form_buttons');
|
341 |
+
add_action('woocommerce_login_form_end', 'NextendSocialLogin::add_action_login_form_buttons');
|
342 |
+
|
343 |
+
add_action('woocommerce_register_form_start', 'NextendSocialLogin::remove_action_login_form_buttons');
|
344 |
+
add_action('woocommerce_register_form_end', 'NextendSocialLogin::add_action_login_form_buttons');
|
345 |
+
/* End of fix */
|
346 |
+
|
347 |
+
|
348 |
+
add_action('wp_head', 'NextendSocialLogin::styles', 100);
|
349 |
+
|
350 |
+
add_action('admin_head', 'NextendSocialLogin::styles', 100);
|
351 |
+
add_action('login_head', 'NextendSocialLogin::loginHead', 100);
|
352 |
+
|
353 |
+
add_action('wp_print_footer_scripts', 'NextendSocialLogin::scripts', 100);
|
354 |
+
add_action('login_footer', 'NextendSocialLogin::scripts', 100);
|
355 |
+
|
356 |
+
require_once dirname(__FILE__) . '/includes/avatar.php';
|
357 |
+
|
358 |
+
add_shortcode('nextend_social_login', 'NextendSocialLogin::shortcode');
|
359 |
+
}
|
360 |
+
|
361 |
+
add_action('admin_print_footer_scripts', 'NextendSocialLogin::scripts', 100);
|
362 |
+
|
363 |
+
require_once(NSL_PATH . '/widget.php');
|
364 |
+
|
365 |
+
do_action('nsl_init');
|
366 |
+
|
367 |
+
/**
|
368 |
+
* Fix for Hide my WP plugin @see https://codecanyon.net/item/hide-my-wp-amazing-security-plugin-for-wordpress/4177158
|
369 |
+
*/
|
370 |
+
if (class_exists('HideMyWP', false)) {
|
371 |
+
if (!empty($_REQUEST['loginSocial'])) {
|
372 |
+
global $HideMyWP;
|
373 |
+
$loginPath = '/wp-login.php';
|
374 |
+
if (is_object($HideMyWP) && substr($_SERVER['PHP_SELF'], -1 * strlen($loginPath))) {
|
375 |
+
$login_query = $HideMyWP->opt('login_query');
|
376 |
+
if (!$login_query) {
|
377 |
+
$login_query = 'hide_my_wp';
|
378 |
+
}
|
379 |
+
$_GET[$login_query] = $HideMyWP->opt('admin_key');
|
380 |
+
}
|
381 |
+
}
|
382 |
+
}
|
383 |
+
|
384 |
+
if (!empty($_REQUEST['loginSocial'])) {
|
385 |
+
|
386 |
+
// Fix for all-in-one-wp-security-and-firewall
|
387 |
+
if (empty($_GET['action'])) {
|
388 |
+
$_GET['action'] = 'nsl-login';
|
389 |
+
}
|
390 |
+
|
391 |
+
// Fix for wps-hide-login
|
392 |
+
if (empty($_REQUEST['action'])) {
|
393 |
+
$_REQUEST['action'] = 'nsl-login';
|
394 |
+
}
|
395 |
+
|
396 |
+
// Fix for Social Rabbit as it catch our code response from Facebook
|
397 |
+
if (class_exists('\SR\Utils\Scheduled', true)) {
|
398 |
+
add_action('init', 'NextendSocialLogin::fixSocialRabbit', 0);
|
399 |
+
}
|
400 |
+
|
401 |
+
// Fix for Dokan https://wedevs.com/dokan/
|
402 |
+
if (function_exists('dokan_redirect_to_register')) {
|
403 |
+
remove_action('login_init', 'dokan_redirect_to_register', 10);
|
404 |
+
}
|
405 |
+
|
406 |
+
// Fix for Jetpack SSO
|
407 |
+
add_filter('jetpack_sso_bypass_login_forward_wpcom', '__return_false');
|
408 |
+
}
|
409 |
+
}
|
410 |
+
|
411 |
+
public static function fixSocialRabbit() {
|
412 |
+
remove_action('init', '\SR\Utils\Scheduled::init', 10);
|
413 |
+
}
|
414 |
+
|
415 |
+
public static function removeLoginFormAssets() {
|
416 |
+
remove_action('login_head', 'NextendSocialLogin::loginHead', 100);
|
417 |
+
remove_action('wp_print_footer_scripts', 'NextendSocialLogin::scripts', 100);
|
418 |
+
remove_action('login_footer', 'NextendSocialLogin::scripts', 100);
|
419 |
+
}
|
420 |
+
|
421 |
+
public static function styles() {
|
422 |
+
|
423 |
+
$stylesheet = self::get_template_part('style.css');
|
424 |
+
if (!empty($stylesheet) && file_exists($stylesheet)) {
|
425 |
+
echo '<style type="text/css">' . file_get_contents($stylesheet) . '</style>';
|
426 |
+
}
|
427 |
+
}
|
428 |
+
|
429 |
+
public static function checkJqueryLoaded() {
|
430 |
+
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>';
|
431 |
+
}
|
432 |
+
|
433 |
+
public static function loginHead() {
|
434 |
+
self::styles();
|
435 |
+
|
436 |
+
$template = self::get_template_part('login/' . sanitize_file_name(self::$settings->get('login_form_layout')) . '.php');
|
437 |
+
if (!empty($template) && file_exists($template)) {
|
438 |
+
require($template);
|
439 |
+
}
|
440 |
+
|
441 |
+
self::$loginHeadAdded = true;
|
442 |
+
}
|
443 |
+
|
444 |
+
public static function scripts() {
|
445 |
+
static $once = null;
|
446 |
+
if ($once === null) {
|
447 |
+
$scripts = NSL_PATH . '/js/nsl.js';
|
448 |
+
if (file_exists($scripts)) {
|
449 |
+
echo '<script type="text/javascript">(function (undefined) {var _targetWindow =' . wp_json_encode(self::$settings->get('target')) . ";\n" . file_get_contents($scripts) . '})();</script>';
|
450 |
+
}
|
451 |
+
$once = true;
|
452 |
+
}
|
453 |
+
}
|
454 |
+
|
455 |
+
public static function install() {
|
456 |
+
/** @var $wpdb WPDB */ global $wpdb;
|
457 |
+
$table_name = $wpdb->prefix . "social_users";
|
458 |
+
$charset_collate = $wpdb->get_charset_collate();
|
459 |
+
|
460 |
+
$sql = "CREATE TABLE " . $table_name . " (
|
461 |
+
`ID` int(11) NOT NULL,
|
462 |
+
`type` varchar(20) NOT NULL,
|
463 |
+
`identifier` varchar(100) NOT NULL,
|
464 |
+
`register_date` datetime NOT NULL default '0000-00-00 00:00:00',
|
465 |
+
`login_date` datetime NOT NULL default '0000-00-00 00:00:00',
|
466 |
+
`link_date` datetime NOT NULL default '0000-00-00 00:00:00',
|
467 |
+
KEY `ID` (`ID`,`type`)
|
468 |
+
) " . $charset_collate . ";";
|
469 |
+
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
|
470 |
+
dbDelta($sql);
|
471 |
+
}
|
472 |
+
|
473 |
+
public static function sortProviders($a, $b) {
|
474 |
+
if (isset(self::$ordering[$a]) && isset(self::$ordering[$b])) {
|
475 |
+
if (self::$ordering[$a] < self::$ordering[$b]) {
|
476 |
+
return -1;
|
477 |
+
}
|
478 |
+
|
479 |
+
return 1;
|
480 |
+
}
|
481 |
+
if (isset(self::$ordering[$a])) {
|
482 |
+
return -1;
|
483 |
+
}
|
484 |
+
|
485 |
+
return 1;
|
486 |
+
}
|
487 |
+
|
488 |
+
/**
|
489 |
+
* @param $provider NextendSocialProviderDummy
|
490 |
+
*/
|
491 |
+
public static function addProvider($provider) {
|
492 |
+
if (in_array($provider->getId(), self::$settings->get('enabled'))) {
|
493 |
+
if ($provider->isTested() && $provider->enable()) {
|
494 |
+
self::$enabledProviders[$provider->getId()] = $provider;
|
495 |
+
}
|
496 |
+
}
|
497 |
+
self::$providers[$provider->getId()] = $provider;
|
498 |
+
|
499 |
+
if ($provider instanceof NextendSocialProvider) {
|
500 |
+
self::$allowedProviders[$provider->getId()] = $provider;
|
501 |
+
}
|
502 |
+
}
|
503 |
+
|
504 |
+
public static function enableProvider($providerID) {
|
505 |
+
if (isset(self::$providers[$providerID])) {
|
506 |
+
$enabled = self::$settings->get('enabled');
|
507 |
+
$enabled[] = self::$providers[$providerID]->getId();
|
508 |
+
$enabled = array_unique($enabled);
|
509 |
+
|
510 |
+
self::$settings->update(array(
|
511 |
+
'enabled' => $enabled
|
512 |
+
));
|
513 |
+
}
|
514 |
+
}
|
515 |
+
|
516 |
+
public static function disableProvider($providerID) {
|
517 |
+
if (isset(self::$providers[$providerID])) {
|
518 |
+
|
519 |
+
$enabled = array_diff(self::$settings->get('enabled'), array(self::$providers[$providerID]->getId()));
|
520 |
+
|
521 |
+
self::$settings->update(array(
|
522 |
+
'enabled' => $enabled
|
523 |
+
));
|
524 |
+
}
|
525 |
+
}
|
526 |
+
|
527 |
+
public static function isProviderEnabled($providerID) {
|
528 |
+
return isset(self::$enabledProviders[$providerID]);
|
529 |
+
}
|
530 |
+
|
531 |
+
public static function alternate_login_page_template_redirect() {
|
532 |
+
|
533 |
+
$isAlternatePage = ((self::getProxyPage() !== false && is_page(self::getProxyPage())) || (self::getRegisterFlowPage() !== false && is_page(self::getRegisterFlowPage())));
|
534 |
+
if ($isAlternatePage) {
|
535 |
+
nocache_headers();
|
536 |
+
|
537 |
+
if (!empty($_REQUEST['loginSocial']) || (isset($_GET['interim_login']) && $_GET['interim_login'] === 'nsl')) {
|
538 |
+
|
539 |
+
$action = isset($_GET['action']) ? $_GET['action'] : 'login';
|
540 |
+
if (!in_array($action, array(
|
541 |
+
'login',
|
542 |
+
'register',
|
543 |
+
'link',
|
544 |
+
'unlink'
|
545 |
+
))) {
|
546 |
+
$action = 'login';
|
547 |
+
}
|
548 |
+
switch ($action) {
|
549 |
+
case 'login':
|
550 |
+
NextendSocialLogin::login_form_login();
|
551 |
+
break;
|
552 |
+
case 'register':
|
553 |
+
NextendSocialLogin::login_form_register();
|
554 |
+
break;
|
555 |
+
case 'link':
|
556 |
+
NextendSocialLogin::login_form_link();
|
557 |
+
break;
|
558 |
+
case 'unlink':
|
559 |
+
NextendSocialLogin::login_form_unlink();
|
560 |
+
break;
|
561 |
+
}
|
562 |
+
} else {
|
563 |
+
if (!is_front_page() && !is_home()) {
|
564 |
+
wp_redirect(home_url());
|
565 |
+
exit;
|
566 |
+
}
|
567 |
+
}
|
568 |
+
}
|
569 |
+
}
|
570 |
+
|
571 |
+
public static function login_form_login() {
|
572 |
+
self::$WPLoginCurrentView = 'login';
|
573 |
+
self::login_init();
|
574 |
+
}
|
575 |
+
|
576 |
+
public static function login_form_register() {
|
577 |
+
self::$WPLoginCurrentView = 'register';
|
578 |
+
self::login_init();
|
579 |
+
}
|
580 |
+
|
581 |
+
public static function bp_login_form_register() {
|
582 |
+
self::$WPLoginCurrentView = 'register-bp';
|
583 |
+
self::login_init();
|
584 |
+
}
|
585 |
+
|
586 |
+
public static function login_form_link() {
|
587 |
+
self::$WPLoginCurrentView = 'link';
|
588 |
+
self::login_init();
|
589 |
+
}
|
590 |
+
|
591 |
+
public static function login_form_unlink() {
|
592 |
+
self::$WPLoginCurrentView = 'unlink';
|
593 |
+
self::login_init();
|
594 |
+
}
|
595 |
+
|
596 |
+
public static function login_init() {
|
597 |
+
|
598 |
+
add_filter('wp_login_errors', 'NextendSocialLogin::wp_login_errors');
|
599 |
+
|
600 |
+
if (isset($_GET['interim_login']) && $_GET['interim_login'] === 'nsl' && is_user_logged_in()) {
|
601 |
+
self::onInterimLoginSuccess();
|
602 |
+
|
603 |
+
}
|
604 |
+
|
605 |
+
if (isset($_REQUEST['loginFacebook']) && $_REQUEST['loginFacebook'] == '1') {
|
606 |
+
$_REQUEST['loginSocial'] = 'facebook';
|
607 |
+
}
|
608 |
+
if (isset($_REQUEST['loginGoogle']) && $_REQUEST['loginGoogle'] == '1') {
|
609 |
+
$_REQUEST['loginSocial'] = 'google';
|
610 |
+
}
|
611 |
+
if (isset($_REQUEST['loginTwitter']) && $_REQUEST['loginTwitter'] == '1') {
|
612 |
+
$_REQUEST['loginTwitter'] = 'twitter';
|
613 |
+
}
|
614 |
+
|
615 |
+
if (isset($_REQUEST['loginSocial']) && is_string($_REQUEST['loginSocial']) && isset(self::$providers[$_REQUEST['loginSocial']]) && (self::$providers[$_REQUEST['loginSocial']]->isEnabled() || self::$providers[$_REQUEST['loginSocial']]->isTest())) {
|
616 |
+
|
617 |
+
nocache_headers();
|
618 |
+
|
619 |
+
self::$providers[$_REQUEST['loginSocial']]->connect();
|
620 |
+
}
|
621 |
+
}
|
622 |
+
|
623 |
+
private static function onInterimLoginSuccess() {
|
624 |
+
require_once(NSL_PATH . '/admin/interim.php');
|
625 |
+
}
|
626 |
+
|
627 |
+
public static function wp_login_errors($errors) {
|
628 |
+
|
629 |
+
if (empty($errors)) {
|
630 |
+
$errors = new WP_Error();
|
631 |
+
}
|
632 |
+
|
633 |
+
$errorMessages = Notices::getErrors();
|
634 |
+
if ($errorMessages !== false) {
|
635 |
+
foreach ($errorMessages AS $errorMessage) {
|
636 |
+
$errors->add('error', $errorMessage);
|
637 |
+
}
|
638 |
+
}
|
639 |
+
|
640 |
+
return $errors;
|
641 |
+
}
|
642 |
+
|
643 |
+
public static function editProfileRedirect() {
|
644 |
+
global $wp;
|
645 |
+
|
646 |
+
if (isset($wp->query_vars['editProfileRedirect'])) {
|
647 |
+
if (function_exists('bp_loggedin_user_domain')) {
|
648 |
+
header('LOCATION: ' . bp_loggedin_user_domain() . 'profile/edit/group/1/');
|
649 |
+
} else {
|
650 |
+
header('LOCATION: ' . self_admin_url('profile.php'));
|
651 |
+
}
|
652 |
+
exit;
|
653 |
+
}
|
654 |
+
}
|
655 |
+
|
656 |
+
public static function jQuery() {
|
657 |
+
wp_enqueue_script('jquery');
|
658 |
+
}
|
659 |
+
|
660 |
+
public static function filterAddEmbeddedLoginFormButtons($ret) {
|
661 |
+
|
662 |
+
return $ret . self::getEmbeddedLoginForm();
|
663 |
+
}
|
664 |
+
|
665 |
+
private static function getEmbeddedLoginForm() {
|
666 |
+
ob_start();
|
667 |
+
self::styles();
|
668 |
+
|
669 |
+
$index = self::$counter++;
|
670 |
+
|
671 |
+
$containerID = 'nsl-custom-login-form-' . $index;
|
672 |
+
|
673 |
+
echo '<div id="' . $containerID . '">' . self::renderButtonsWithContainer(self::$settings->get('embedded_login_form_button_style'), false, false, false, self::$settings->get('embedded_login_form_button_align')) . '</div>';
|
674 |
+
|
675 |
+
$template = self::get_template_part('embedded-login/' . sanitize_file_name(self::$settings->get('embedded_login_form_layout')) . '.php');
|
676 |
+
if (!empty($template) && file_exists($template)) {
|
677 |
+
include($template);
|
678 |
+
}
|
679 |
+
|
680 |
+
return ob_get_clean();
|
681 |
+
}
|
682 |
+
|
683 |
+
public static function addLoginFormButtons() {
|
684 |
+
echo self::getRenderedLoginButtons();
|
685 |
+
}
|
686 |
+
|
687 |
+
public static function addLoginButtons() {
|
688 |
+
echo self::getRenderedLoginButtons();
|
689 |
+
}
|
690 |
+
|
691 |
+
public static function remove_action_login_form_buttons() {
|
692 |
+
remove_action('login_form', 'NextendSocialLogin::addLoginFormButtons');
|
693 |
+
remove_action('register_form', 'NextendSocialLogin::addLoginFormButtons');
|
694 |
+
}
|
695 |
+
|
696 |
+
public static function add_action_login_form_buttons() {
|
697 |
+
add_action('login_form', 'NextendSocialLogin::addLoginFormButtons');
|
698 |
+
add_action('register_form', 'NextendSocialLogin::addLoginFormButtons');
|
699 |
+
}
|
700 |
+
|
701 |
+
private static function getRenderedLoginButtons() {
|
702 |
+
if (!self::$loginHeadAdded || self::$loginMainButtonsAdded) {
|
703 |
+
|
704 |
+
return self::getEmbeddedLoginForm();
|
705 |
+
}
|
706 |
+
|
707 |
+
self::$loginMainButtonsAdded = true;
|
708 |
+
|
709 |
+
$ret = '<div id="nsl-custom-login-form-main">';
|
710 |
+
$ret .= self::renderButtonsWithContainer(self::$settings->get('login_form_button_style'), false, false, false, self::$settings->get('login_form_button_align'));
|
711 |
+
$ret .= '</div>';
|
712 |
+
|
713 |
+
|
714 |
+
return $ret;
|
715 |
+
}
|
716 |
+
|
717 |
+
public static function addLinkAndUnlinkButtons() {
|
718 |
+
echo self::renderLinkAndUnlinkButtons();
|
719 |
+
}
|
720 |
+
|
721 |
+
/**
|
722 |
+
* @param bool|false|string $heading
|
723 |
+
* @param bool $link
|
724 |
+
* @param bool $unlink
|
725 |
+
* @param string $align
|
726 |
+
* @param array|string $providers
|
727 |
+
*
|
728 |
+
* @return string
|
729 |
+
*/
|
730 |
+
public static function renderLinkAndUnlinkButtons($heading = '', $link = true, $unlink = true, $align = "left", $providers = false) {
|
731 |
+
if (count(self::$enabledProviders)) {
|
732 |
+
$buttons = '';
|
733 |
+
if ($heading !== false) {
|
734 |
+
if (empty($heading)) {
|
735 |
+
$heading = __('Social Login', 'nextend-facebook-connect');
|
736 |
+
}
|
737 |
+
$buttons = '<h2>' . $heading . '</h2>';
|
738 |
+
}
|
739 |
+
|
740 |
+
|
741 |
+
if ($unlink) {
|
742 |
+
//Filter to disable unlinking social accounts
|
743 |
+
$isUnlinkAllowed = apply_filters('nsl_allow_unlink', true);
|
744 |
+
if (!$isUnlinkAllowed) {
|
745 |
+
$unlink = false;
|
746 |
+
}
|
747 |
+
}
|
748 |
+
|
749 |
+
|
750 |
+
$enabledProviders = false;
|
751 |
+
if (is_array($providers)) {
|
752 |
+
$enabledProviders = array();
|
753 |
+
foreach ($providers AS $provider) {
|
754 |
+
if ($provider && isset(self::$enabledProviders[$provider->getId()])) {
|
755 |
+
$enabledProviders[$provider->getId()] = $provider;
|
756 |
+
}
|
757 |
+
}
|
758 |
+
}
|
759 |
+
if ($enabledProviders === false) {
|
760 |
+
$enabledProviders = self::$enabledProviders;
|
761 |
+
}
|
762 |
+
|
763 |
+
if (count($enabledProviders)) {
|
764 |
+
$buttons = '';
|
765 |
+
foreach ($enabledProviders AS $provider) {
|
766 |
+
if ($provider->isCurrentUserConnected()) {
|
767 |
+
if ($unlink) {
|
768 |
+
$buttons .= $provider->getUnLinkButton();
|
769 |
+
}
|
770 |
+
} else {
|
771 |
+
if ($link) {
|
772 |
+
$buttons .= $provider->getLinkButton();
|
773 |
+
}
|
774 |
+
}
|
775 |
+
}
|
776 |
+
|
777 |
+
$buttons = '<div class="nsl-container-buttons">' . $buttons . '</div>';
|
778 |
+
|
779 |
+
return '<div class="nsl-container ' . self::$styles['default']['container'] . '" data-align="' . esc_attr($align) . '">' . $buttons . '</div>';
|
780 |
+
|
781 |
+
}
|
782 |
+
}
|
783 |
+
|
784 |
+
return '';
|
785 |
+
}
|
786 |
+
|
787 |
+
/**
|
788 |
+
* @param $user_id
|
789 |
+
*
|
790 |
+
* @return bool
|
791 |
+
* @deprecated
|
792 |
+
*
|
793 |
+
*/
|
794 |
+
public static function getAvatar($user_id) {
|
795 |
+
foreach (self::$enabledProviders AS $provider) {
|
796 |
+
$avatar = $provider->getAvatar($user_id);
|
797 |
+
if ($avatar !== false) {
|
798 |
+
return $avatar;
|
799 |
+
}
|
800 |
+
}
|
801 |
+
|
802 |
+
return false;
|
803 |
+
}
|
804 |
+
|
805 |
+
public static function shortcode($atts) {
|
806 |
+
if (!is_array($atts)) {
|
807 |
+
$atts = array();
|
808 |
+
}
|
809 |
+
|
810 |
+
$atts = array_merge(array(
|
811 |
+
'provider' => false,
|
812 |
+
'login' => 1,
|
813 |
+
'link' => 0,
|
814 |
+
'unlink' => 0,
|
815 |
+
'heading' => false,
|
816 |
+
'align' => 'left',
|
817 |
+
), $atts);
|
818 |
+
|
819 |
+
$providers = false;
|
820 |
+
$providerID = $atts['provider'] === false ? false : $atts['provider'];
|
821 |
+
if ($providerID !== false && isset(self::$enabledProviders[$providerID])) {
|
822 |
+
$providers = array(self::$enabledProviders[$providerID]);
|
823 |
+
}
|
824 |
+
|
825 |
+
if (!is_user_logged_in()) {
|
826 |
+
|
827 |
+
if (filter_var($atts['login'], FILTER_VALIDATE_BOOLEAN) === false) {
|
828 |
+
return '';
|
829 |
+
}
|
830 |
+
|
831 |
+
$atts = array_merge(array(
|
832 |
+
'style' => 'default',
|
833 |
+
'redirect' => false,
|
834 |
+
'trackerdata' => false
|
835 |
+
), $atts);
|
836 |
+
|
837 |
+
return self::renderButtonsWithContainerAndTitle($atts['heading'], $atts['style'], $providers, $atts['redirect'], $atts['trackerdata'], $atts['align']);
|
838 |
+
}
|
839 |
+
|
840 |
+
$link = filter_var($atts['link'], FILTER_VALIDATE_BOOLEAN);
|
841 |
+
$unlink = filter_var($atts['unlink'], FILTER_VALIDATE_BOOLEAN);
|
842 |
+
|
843 |
+
if ($link || $unlink) {
|
844 |
+
return self::renderLinkAndUnlinkButtons($atts['heading'], $link, $unlink, $atts['align'], $providers);
|
845 |
+
}
|
846 |
+
|
847 |
+
return '';
|
848 |
+
}
|
849 |
+
|
850 |
+
/**
|
851 |
+
* @param string $style
|
852 |
+
* @param bool|NextendSocialProvider[] $providers
|
853 |
+
* @param bool|string $redirect_to
|
854 |
+
* @param bool $trackerData
|
855 |
+
* @param string $align
|
856 |
+
*
|
857 |
+
* @return string
|
858 |
+
*/
|
859 |
+
public static function renderButtonsWithContainer($style = 'default', $providers = false, $redirect_to = false, $trackerData = false, $align = "left") {
|
860 |
+
return self::renderButtonsWithContainerAndTitle(false, $style, $providers, $redirect_to, $trackerData, $align);
|
861 |
+
}
|
862 |
+
|
863 |
+
private static function renderButtonsWithContainerAndTitle($heading = false, $style = 'default', $providers = false, $redirect_to = false, $trackerData = false, $align = "left") {
|
864 |
+
|
865 |
+
if (!isset(self::$styles[$style])) {
|
866 |
+
$style = 'default';
|
867 |
+
}
|
868 |
+
|
869 |
+
if (!in_array($align, self::$styles[$style]['align'])) {
|
870 |
+
$align = 'left';
|
871 |
+
}
|
872 |
+
|
873 |
+
|
874 |
+
$enabledProviders = false;
|
875 |
+
if (is_array($providers)) {
|
876 |
+
$enabledProviders = array();
|
877 |
+
foreach ($providers AS $provider) {
|
878 |
+
if ($provider && isset(self::$enabledProviders[$provider->getId()])) {
|
879 |
+
$enabledProviders[$provider->getId()] = $provider;
|
880 |
+
}
|
881 |
+
}
|
882 |
+
}
|
883 |
+
if ($enabledProviders === false) {
|
884 |
+
$enabledProviders = self::$enabledProviders;
|
885 |
+
}
|
886 |
+
|
887 |
+
if (count($enabledProviders)) {
|
888 |
+
$buttons = '';
|
889 |
+
foreach ($enabledProviders AS $provider) {
|
890 |
+
$buttons .= $provider->getConnectButton($style, $redirect_to, $trackerData);
|
891 |
+
}
|
892 |
+
|
893 |
+
if (!empty($heading)) {
|
894 |
+
$heading = '<h2>' . $heading . '</h2>';
|
895 |
+
} else {
|
896 |
+
$heading = '';
|
897 |
+
}
|
898 |
+
|
899 |
+
$buttons = '<div class="nsl-container-buttons">' . $buttons . '</div>';
|
900 |
+
|
901 |
+
$ret = '<div class="nsl-container ' . self::$styles[$style]['container'] . '" data-align="' . esc_attr($align) . '">' . $heading . $buttons . '</div>';
|
902 |
+
if (defined('DOING_AJAX') && DOING_AJAX) {
|
903 |
+
$id = md5(uniqid('nsl-ajax-'));
|
904 |
+
$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>';
|
905 |
+
}
|
906 |
+
|
907 |
+
return $ret;
|
908 |
+
}
|
909 |
+
|
910 |
+
return '';
|
911 |
+
}
|
912 |
+
|
913 |
+
|
914 |
+
public static function getCurrentPageURL() {
|
915 |
+
|
916 |
+
if (defined('DOING_AJAX') && DOING_AJAX) {
|
917 |
+
return '';
|
918 |
+
}
|
919 |
+
|
920 |
+
$currentUrl = set_url_scheme('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
|
921 |
+
|
922 |
+
if (!self::isAllowedRedirectUrl($currentUrl)) {
|
923 |
+
return false;
|
924 |
+
}
|
925 |
+
|
926 |
+
return $currentUrl;
|
927 |
+
}
|
928 |
+
|
929 |
+
public static function getLoginUrl($scheme = null) {
|
930 |
+
static $alternateLoginPage = null;
|
931 |
+
if ($alternateLoginPage === null) {
|
932 |
+
$proxyPage = self::getProxyPage();
|
933 |
+
if ($proxyPage !== false) {
|
934 |
+
$alternateLoginPage = get_permalink($proxyPage);
|
935 |
+
}
|
936 |
+
if (empty($alternateLoginPage)) {
|
937 |
+
$alternateLoginPage = false;
|
938 |
+
}
|
939 |
+
}
|
940 |
+
|
941 |
+
if ($alternateLoginPage !== false) {
|
942 |
+
return $alternateLoginPage;
|
943 |
+
}
|
944 |
+
|
945 |
+
return site_url('wp-login.php', $scheme);
|
946 |
+
}
|
947 |
+
|
948 |
+
public static function getRegisterUrl() {
|
949 |
+
|
950 |
+
return wp_registration_url();
|
951 |
+
}
|
952 |
+
|
953 |
+
public static function isAllowedRedirectUrl($url) {
|
954 |
+
$loginUrl = self::getLoginUrl();
|
955 |
+
|
956 |
+
// If the currentUrl is the loginUrl, then we should not return it for redirects
|
957 |
+
if (strpos($url, $loginUrl) === 0) {
|
958 |
+
return false;
|
959 |
+
}
|
960 |
+
|
961 |
+
$loginUrl2 = site_url('wp-login.php');
|
962 |
+
|
963 |
+
// If the currentUrl is the loginUrl, then we should not return it for redirects
|
964 |
+
if ($loginUrl2 !== $loginUrl && strpos($url, $loginUrl2) === 0) {
|
965 |
+
return false;
|
966 |
+
}
|
967 |
+
|
968 |
+
$registerUrl = wp_registration_url();
|
969 |
+
// If the currentUrl is the registerUrl, then we should not return it for redirects
|
970 |
+
if (strpos($url, $registerUrl) === 0) {
|
971 |
+
return false;
|
972 |
+
}
|
973 |
+
|
974 |
+
$blacklistedUrls = NextendSocialLogin::$settings->get('blacklisted_urls');
|
975 |
+
if (!empty($blacklistedUrls)) {
|
976 |
+
$blackListedUrlArray = preg_split('/\r\n|\r|\n/', $blacklistedUrls);
|
977 |
+
// If the currentUrl is blacklisted, then we should not return it for redirects
|
978 |
+
foreach ($blackListedUrlArray as $blackListedUrl) {
|
979 |
+
//If the url contains the blackListedUrl returns false
|
980 |
+
if (strpos($url, $blackListedUrl) !== false) {
|
981 |
+
return false;
|
982 |
+
}
|
983 |
+
}
|
984 |
+
}
|
985 |
+
|
986 |
+
|
987 |
+
return true;
|
988 |
+
}
|
989 |
+
|
990 |
+
public static function get_template_part($file_name, $name = null) {
|
991 |
+
// Execute code for this part
|
992 |
+
do_action('get_template_part_' . $file_name, $file_name, $name);
|
993 |
+
|
994 |
+
// Setup possible parts
|
995 |
+
$templates = array();
|
996 |
+
$templates[] = $file_name;
|
997 |
+
|
998 |
+
// Allow template parts to be filtered
|
999 |
+
$templates = apply_filters('nsl_get_template_part', $templates, $file_name, $name);
|
1000 |
+
|
1001 |
+
// Return the part that is found
|
1002 |
+
return self::locate_template($templates);
|
1003 |
+
}
|
1004 |
+
|
1005 |
+
public static function locate_template($template_names) {
|
1006 |
+
// No file found yet
|
1007 |
+
$located = false;
|
1008 |
+
|
1009 |
+
// Try to find a template file
|
1010 |
+
foreach ((array)$template_names as $template_name) {
|
1011 |
+
|
1012 |
+
// Continue if template is empty
|
1013 |
+
if (empty($template_name)) {
|
1014 |
+
continue;
|
1015 |
+
}
|
1016 |
+
|
1017 |
+
// Trim off any slashes from the template name
|
1018 |
+
$template_name = ltrim($template_name, '/');
|
1019 |
+
// Check child theme first
|
1020 |
+
if (file_exists(trailingslashit(get_stylesheet_directory()) . 'nsl/' . $template_name)) {
|
1021 |
+
$located = trailingslashit(get_stylesheet_directory()) . 'nsl/' . $template_name;
|
1022 |
+
break;
|
1023 |
+
|
1024 |
+
// Check parent theme next
|
1025 |
+
} else if (file_exists(trailingslashit(get_template_directory()) . 'nsl/' . $template_name)) {
|
1026 |
+
$located = trailingslashit(get_template_directory()) . 'nsl/' . $template_name;
|
1027 |
+
break;
|
1028 |
+
|
1029 |
+
// Check theme compatibility last
|
1030 |
+
} else if (file_exists(trailingslashit(self::get_templates_dir()) . $template_name)) {
|
1031 |
+
$located = trailingslashit(self::get_templates_dir()) . $template_name;
|
1032 |
+
break;
|
1033 |
+
} else if (defined('NSL_PRO_PATH') && file_exists(trailingslashit(NSL_PRO_PATH) . 'template-parts/' . $template_name)) {
|
1034 |
+
$located = trailingslashit(NSL_PRO_PATH) . 'template-parts/' . $template_name;
|
1035 |
+
break;
|
1036 |
+
}
|
1037 |
+
}
|
1038 |
+
|
1039 |
+
return $located;
|
1040 |
+
}
|
1041 |
+
|
1042 |
+
public static function get_templates_dir() {
|
1043 |
+
return NSL_PATH . '/template-parts';
|
1044 |
+
}
|
1045 |
+
|
1046 |
+
public static function delete_user($user_id) {
|
1047 |
+
/** @var $wpdb WPDB */ global $wpdb, $blog_id;
|
1048 |
+
|
1049 |
+
$wpdb->delete($wpdb->prefix . 'social_users', array(
|
1050 |
+
'ID' => $user_id
|
1051 |
+
), array(
|
1052 |
+
'%d'
|
1053 |
+
));
|
1054 |
+
|
1055 |
+
$attachment_id = get_user_meta($user_id, $wpdb->get_blog_prefix($blog_id) . 'user_avatar', true);
|
1056 |
+
if (wp_attachment_is_image($attachment_id)) {
|
1057 |
+
wp_delete_attachment($attachment_id, true);
|
1058 |
+
}
|
1059 |
+
|
1060 |
+
}
|
1061 |
+
|
1062 |
+
public static function disable_better_wp_security_block_long_urls() {
|
1063 |
+
if (class_exists('ITSEC_System_Tweaks', false)) {
|
1064 |
+
remove_action('itsec_initialized', array(
|
1065 |
+
ITSEC_System_Tweaks::get_instance(),
|
1066 |
+
'block_long_urls'
|
1067 |
+
));
|
1068 |
+
}
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
public static function buddypress_loaded() {
|
1072 |
+
add_action('bp_settings_setup_nav', 'NextendSocialLogin::bp_settings_setup_nav');
|
1073 |
+
}
|
1074 |
+
|
1075 |
+
public static function bp_settings_setup_nav() {
|
1076 |
+
|
1077 |
+
if (!bp_is_active('settings')) {
|
1078 |
+
return;
|
1079 |
+
}
|
1080 |
+
|
1081 |
+
// Determine user to use.
|
1082 |
+
if (bp_loggedin_user_domain()) {
|
1083 |
+
$user_domain = bp_loggedin_user_domain();
|
1084 |
+
} else {
|
1085 |
+
return;
|
1086 |
+
}
|
1087 |
+
|
1088 |
+
// Get the settings slug.
|
1089 |
+
$settings_slug = bp_get_settings_slug();
|
1090 |
+
|
1091 |
+
bp_core_new_subnav_item(array(
|
1092 |
+
'name' => __('Social Accounts', 'nextend-facebook-connect'),
|
1093 |
+
'slug' => 'social',
|
1094 |
+
'parent_url' => trailingslashit($user_domain . $settings_slug),
|
1095 |
+
'parent_slug' => $settings_slug,
|
1096 |
+
'screen_function' => 'NextendSocialLogin::bp_display_account_link',
|
1097 |
+
'position' => 30,
|
1098 |
+
'user_has_access' => bp_core_can_edit_settings()
|
1099 |
+
), 'members');
|
1100 |
+
|
1101 |
+
}
|
1102 |
+
|
1103 |
+
public static function bp_display_account_link() {
|
1104 |
+
|
1105 |
+
add_action('bp_template_title', 'NextendSocialLogin::bp_template_title');
|
1106 |
+
add_action('bp_template_content', 'NextendSocialLogin::bp_template_content');
|
1107 |
+
bp_core_load_template(apply_filters('bp_core_template_plugin', 'members/single/plugins'));
|
1108 |
+
}
|
1109 |
+
|
1110 |
+
public static function bp_template_title() {
|
1111 |
+
_e('Social Login', 'nextend-facebook-connect');
|
1112 |
+
}
|
1113 |
+
|
1114 |
+
public static function bp_template_content() {
|
1115 |
+
echo self::renderLinkAndUnlinkButtons(false);
|
1116 |
+
}
|
1117 |
+
|
1118 |
+
public static function getTrackerData() {
|
1119 |
+
return Persistent::get('trackerdata');
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
public static function getDomain() {
|
1123 |
+
return preg_replace('/^www\./', '', parse_url(site_url(), PHP_URL_HOST));
|
1124 |
+
}
|
1125 |
+
|
1126 |
+
public static function getRegisterFlowPage() {
|
1127 |
+
static $registerFlowPage = null;
|
1128 |
+
if ($registerFlowPage === null) {
|
1129 |
+
$registerFlowPage = intval(self::$settings->get('register-flow-page'));
|
1130 |
+
if (empty($registerFlowPage) || get_post($registerFlowPage) === null) {
|
1131 |
+
$registerFlowPage = false;
|
1132 |
+
}
|
1133 |
+
}
|
1134 |
+
|
1135 |
+
return $registerFlowPage;
|
1136 |
+
}
|
1137 |
+
|
1138 |
+
public static function getProxyPage() {
|
1139 |
+
static $proxyPage = null;
|
1140 |
+
if ($proxyPage === null) {
|
1141 |
+
$proxyPage = intval(self::$settings->get('proxy-page'));
|
1142 |
+
if (empty($proxyPage) || get_post($proxyPage) === null) {
|
1143 |
+
$proxyPage = false;
|
1144 |
+
}
|
1145 |
+
}
|
1146 |
+
|
1147 |
+
return $proxyPage;
|
1148 |
+
}
|
1149 |
+
|
1150 |
+
public static function getFreePagesForRegisterFlow($pages) {
|
1151 |
+
|
1152 |
+
$availablePages = array();
|
1153 |
+
foreach ($pages as $page) {
|
1154 |
+
$post_states = array();
|
1155 |
+
$post_states = apply_filters('display_post_states', $post_states, $page);
|
1156 |
+
if (NextendSocialLogin::getRegisterFlowPage() === $page->ID || !$post_states) {
|
1157 |
+
$availablePages[] = $page;
|
1158 |
+
}
|
1159 |
+
}
|
1160 |
+
|
1161 |
+
return $availablePages;
|
1162 |
+
}
|
1163 |
+
|
1164 |
+
public static function getFreePagesForOauthProxyPage($pages) {
|
1165 |
+
|
1166 |
+
$availablePages = array();
|
1167 |
+
foreach ($pages as $page) {
|
1168 |
+
$post_states = array();
|
1169 |
+
$post_states = apply_filters('display_post_states', $post_states, $page);
|
1170 |
+
if (NextendSocialLogin::getProxyPage() === $page->ID || !$post_states) {
|
1171 |
+
$availablePages[] = $page;
|
1172 |
+
}
|
1173 |
+
}
|
1174 |
+
|
1175 |
+
return $availablePages;
|
1176 |
+
}
|
1177 |
+
|
1178 |
+
public static function is_register_allowed($isAllowed) {
|
1179 |
+
$allow_register = NextendSocialLogin::$settings->get('allow_register');
|
1180 |
+
switch ($allow_register) {
|
1181 |
+
//WordPress default membership
|
1182 |
+
case -1:
|
1183 |
+
if (get_option('users_can_register')) {
|
1184 |
+
return true;
|
1185 |
+
}
|
1186 |
+
break;
|
1187 |
+
}
|
1188 |
+
|
1189 |
+
return false;
|
1190 |
+
}
|
1191 |
+
|
1192 |
+
public static function hasLicense($strict = true) {
|
1193 |
+
return self::getLicense($strict) !== false;
|
1194 |
+
}
|
1195 |
+
|
1196 |
+
public static function getLicense($strict = true) {
|
1197 |
+
$licenses = NextendSocialLogin::$settings->get('licenses');
|
1198 |
+
$currentDomain = '.' . NextendSocialLogin::getDomain();
|
1199 |
+
$currentDomainLength = strlen($currentDomain);
|
1200 |
+
|
1201 |
+
for ($i = 0; $i < count($licenses); $i++) {
|
1202 |
+
$authorizedDomain = '.' . preg_replace('/^www\./', '', $licenses[$i]['domain']);
|
1203 |
+
$authorizedDomainLength = strlen($authorizedDomain);
|
1204 |
+
|
1205 |
+
if ($authorizedDomain === $currentDomain || strrpos($currentDomain, $authorizedDomain) === $currentDomainLength - $authorizedDomainLength) {
|
1206 |
+
return $licenses[$i];
|
1207 |
+
}
|
1208 |
+
|
1209 |
+
if (strrpos($currentDomain, $authorizedDomain) === $currentDomainLength - $authorizedDomainLength) {
|
1210 |
+
return $licenses[$i];
|
1211 |
+
}
|
1212 |
+
|
1213 |
+
if (strrpos($authorizedDomain, $currentDomain) === $authorizedDomainLength - $currentDomainLength) {
|
1214 |
+
return $licenses[$i];
|
1215 |
+
}
|
1216 |
+
}
|
1217 |
+
|
1218 |
+
if (!$strict && !empty($licenses)) {
|
1219 |
+
return $licenses[0];
|
1220 |
+
}
|
1221 |
+
|
1222 |
+
return false;
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
|
1226 |
+
}
|
1227 |
+
|
1228 |
+
NextendSocialLogin::init();
|
providers/amazon/amazon.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class NextendSocialProviderAmazon extends NextendSocialProviderDummy {
|
4 |
-
|
5 |
-
protected $color = '#2f292b';
|
6 |
-
|
7 |
-
public function __construct() {
|
8 |
-
$this->id = 'amazon';
|
9 |
-
$this->label = 'Amazon';
|
10 |
-
$this->path = dirname(__FILE__);
|
11 |
-
}
|
12 |
-
}
|
13 |
-
|
14 |
NextendSocialLogin::addProvider(new NextendSocialProviderAmazon());
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class NextendSocialProviderAmazon extends NextendSocialProviderDummy {
|
4 |
+
|
5 |
+
protected $color = '#2f292b';
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
$this->id = 'amazon';
|
9 |
+
$this->label = 'Amazon';
|
10 |
+
$this->path = dirname(__FILE__);
|
11 |
+
}
|
12 |
+
}
|
13 |
+
|
14 |
NextendSocialLogin::addProvider(new NextendSocialProviderAmazon());
|
providers/apple/apple.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class NextendSocialProviderApple extends NextendSocialProviderDummy {
|
4 |
+
|
5 |
+
protected $color = '#000000';
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
$this->id = 'apple';
|
9 |
+
$this->label = 'Apple';
|
10 |
+
$this->path = dirname(__FILE__);
|
11 |
+
}
|
12 |
+
}
|
13 |
+
|
14 |
+
NextendSocialLogin::addProvider(new NextendSocialProviderApple());
|
providers/apple/apple.png
ADDED
Binary file
|
providers/disqus/disqus.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class NextendSocialProviderDisqus extends NextendSocialProviderDummy {
|
4 |
-
|
5 |
-
protected $color = '#2e9fff';
|
6 |
-
|
7 |
-
public function __construct() {
|
8 |
-
$this->id = 'disqus';
|
9 |
-
$this->label = 'Disqus';
|
10 |
-
$this->path = dirname(__FILE__);
|
11 |
-
}
|
12 |
-
}
|
13 |
-
|
14 |
NextendSocialLogin::addProvider(new NextendSocialProviderDisqus());
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class NextendSocialProviderDisqus extends NextendSocialProviderDummy {
|
4 |
+
|
5 |
+
protected $color = '#2e9fff';
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
$this->id = 'disqus';
|
9 |
+
$this->label = 'Disqus';
|
10 |
+
$this->path = dirname(__FILE__);
|
11 |
+
}
|
12 |
+
}
|
13 |
+
|
14 |
NextendSocialLogin::addProvider(new NextendSocialProviderDisqus());
|
providers/facebook/admin/fix-redirect-uri.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die();
|
3 |
-
/** @var $this NextendSocialProviderAdmin */
|
4 |
-
|
5 |
-
$provider = $this->getProvider();
|
6 |
-
?>
|
7 |
-
<ol>
|
8 |
-
<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>
|
9 |
-
<li><?php printf(__('Log in with your %s credenti
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|