Version Description
- Added fallback username prefix
- Fixed avatar for Google, Twitter and LinkedIn providers
- Fixed avatars on retina screen
- Optimized registration process
- Fixed Shopkeeper theme conflict
- WP HTTP api replaced the native cURL
- Twitter provider client optimization, removed force_login param, added email permission
- Removed mb_strlen, so "PHP Multibyte String" not required anymore
- Fixed rare case when the redirect to last state url was missing
- Added WebView support (Google buttons are hidden in WebView as Google does not allow to use)
- Fixed rare case when user can stuck in legacy mode while importing provider.
Download this release
Release Info
Developer | nextendweb |
Plugin | Nextend Social Login and Register (Facebook, Google, Twitter) |
Version | 3.0.3 |
Comparing to | |
See all releases |
Code changes from version 3.0.2 to 3.0.3
- admin/admin.php +40 -40
- admin/images/stars-big.png +0 -0
- admin/images/stars-small.png +0 -0
- admin/style.css +131 -0
- admin/templates-provider/settings-other.php +26 -0
- admin/templates-provider/settings-pro.php +1 -1
- admin/templates/global-settings-pro.php +55 -1
- admin/templates/pro.php +1 -1
- admin/templates/providers.php +9 -2
- admin/templates/review.php +86 -0
- includes/curl/ArrayUtil.php +0 -73
- includes/curl/CaseInsensitiveArray.php +0 -218
- includes/curl/Curl.php +0 -1648
- includes/curl/Decoder.php +0 -50
- includes/curl/StrUtil.php +0 -18
- includes/curl/Url.php +0 -169
- includes/oauth2.php +52 -23
- includes/provider.php +71 -56
- js/nsl.js +159 -1
- languages/nextend-facebook-connect-hu_HU.mo +0 -0
- languages/nextend-facebook-connect-hu_HU.po +248 -165
- languages/nextend-facebook-connect.mo +0 -0
- languages/nextend-facebook-connect.po +545 -442
- nextend-facebook-connect.php +1 -1
- nextend-social-login.php +98 -35
- providers/facebook/admin/getting-started.php +1 -1
- providers/facebook/admin/settings.php +3 -15
- providers/facebook/facebook-client.php +30 -14
- providers/facebook/facebook.php +6 -6
- providers/google/admin/settings.php +3 -15
- providers/google/google-client.php +5 -32
- providers/google/google.php +5 -6
- providers/twitter/admin/settings.php +3 -15
- providers/twitter/sdk/tmhOAuth.php +0 -919
- providers/twitter/twitter-client.php +246 -58
- providers/twitter/twitter.php +19 -8
- readme.txt +20 -5
admin/admin.php
CHANGED
@@ -14,6 +14,8 @@ class NextendSocialLoginAdmin {
|
|
14 |
|
15 |
add_filter('nsl_update_settings_validate_nextend_social_login', 'NextendSocialLoginAdmin::validateSettings', 10, 2);
|
16 |
|
|
|
|
|
17 |
require_once dirname(__FILE__) . '/notices.php';
|
18 |
NextendSocialLoginAdminNotices::init();
|
19 |
}
|
@@ -36,7 +38,7 @@ class NextendSocialLoginAdmin {
|
|
36 |
}
|
37 |
|
38 |
public static function admin_css() {
|
39 |
-
wp_enqueue_style('nsl-admin-stylesheet', plugins_url('/style.css', NSL_ADMIN_PATH));
|
40 |
}
|
41 |
|
42 |
public static function display_admin() {
|
@@ -129,21 +131,6 @@ class NextendSocialLoginAdmin {
|
|
129 |
|
130 |
add_action('admin_enqueue_scripts', 'NextendSocialLoginAdmin::admin_enqueue_scripts');
|
131 |
|
132 |
-
if (!function_exists('curl_init')) {
|
133 |
-
add_settings_error('nextend-social', 'settings_updated', printf(__('%s needs the CURL PHP extension.', 'nextend-facebook-connect'), 'Nextend Social Login') . ' ' . __('Please contact your server administrator and ask for solution!', 'nextend-facebook-connect'), 'error');
|
134 |
-
} else {
|
135 |
-
$version = curl_version();
|
136 |
-
$ssl_supported = ($version['features'] & CURL_VERSION_SSL);
|
137 |
-
if (!$ssl_supported) {
|
138 |
-
add_settings_error('nextend-social', 'settings_updated', __('Https protocol is not supported or disabled in CURL.', 'nextend-facebook-connect') . ' ' . __('Please contact your server administrator and ask for solution!', 'nextend-facebook-connect'), 'error');
|
139 |
-
|
140 |
-
ob_start();
|
141 |
-
var_dump($version);
|
142 |
-
$curlDebugHTML = ob_get_clean();
|
143 |
-
add_settings_error('nextend-social', 'settings_updated', '<h2>CURL debug</h2>' . $curlDebugHTML, 'error');
|
144 |
-
}
|
145 |
-
}
|
146 |
-
|
147 |
if (!function_exists('json_decode')) {
|
148 |
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');
|
149 |
}
|
@@ -266,8 +253,7 @@ class NextendSocialLoginAdmin {
|
|
266 |
}
|
267 |
break;
|
268 |
case 'license_key':
|
269 |
-
$value
|
270 |
-
$newData[$key] = $value;
|
271 |
if ($value != NextendSocialLogin::$settings->get('license_key')) {
|
272 |
$newData['license_key_ok'] = '0';
|
273 |
|
@@ -275,6 +261,7 @@ class NextendSocialLoginAdmin {
|
|
275 |
try {
|
276 |
$response = self::apiCall('test-license', array('license_key' => $value));
|
277 |
if ($response === 'OK') {
|
|
|
278 |
$newData['license_key_ok'] = '1';
|
279 |
}
|
280 |
} catch (Exception $e) {
|
@@ -283,6 +270,9 @@ class NextendSocialLoginAdmin {
|
|
283 |
}
|
284 |
}
|
285 |
break;
|
|
|
|
|
|
|
286 |
}
|
287 |
}
|
288 |
|
@@ -342,42 +332,38 @@ class NextendSocialLoginAdmin {
|
|
342 |
*/
|
343 |
public static function apiCall($action, $args = array()) {
|
344 |
|
345 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
|
347 |
-
$
|
348 |
|
|
|
349 |
|
350 |
-
|
|
|
351 |
|
352 |
-
|
353 |
if (isset($response['message'])) {
|
354 |
$message = 'Nextend Social Login Pro Addon: ' . $response['message'];
|
355 |
|
356 |
NextendSocialLoginAdminNotices::addError($message);
|
357 |
|
358 |
return new WP_Error('error', $message);
|
359 |
-
} else {
|
360 |
-
throw new Exception('Nextend Social Login Pro Addon: ' . $curl->errorCode . ': ' . $curl->errorMessage);
|
361 |
}
|
362 |
-
}
|
363 |
-
|
364 |
-
return $response;
|
365 |
-
}
|
366 |
|
367 |
-
|
368 |
-
$args = array_merge(array(
|
369 |
-
'platform' => 'wordpress',
|
370 |
-
'domain' => parse_url(site_url(), PHP_URL_HOST),
|
371 |
-
'license_key' => NextendSocialLogin::$settings->get('license_key')
|
372 |
-
), $args);
|
373 |
-
|
374 |
-
foreach ($args AS $key => $value) {
|
375 |
-
if (is_string($value)) {
|
376 |
-
$args[$key] = urlencode($value);
|
377 |
-
}
|
378 |
}
|
379 |
|
380 |
-
|
|
|
|
|
381 |
}
|
382 |
|
383 |
public static function showProBox() {
|
@@ -413,4 +399,18 @@ class NextendSocialLoginAdmin {
|
|
413 |
'utm_medium' => 'nsl-wordpress-' . (apply_filters('nsl-pro', false) ? 'pro' : 'free')
|
414 |
), $url);
|
415 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
416 |
}
|
14 |
|
15 |
add_filter('nsl_update_settings_validate_nextend_social_login', 'NextendSocialLoginAdmin::validateSettings', 10, 2);
|
16 |
|
17 |
+
add_action('wp_ajax_nsl_save_review_state', 'NextendSocialLoginAdmin::save_review_state');
|
18 |
+
|
19 |
require_once dirname(__FILE__) . '/notices.php';
|
20 |
NextendSocialLoginAdminNotices::init();
|
21 |
}
|
38 |
}
|
39 |
|
40 |
public static function admin_css() {
|
41 |
+
wp_enqueue_style('nsl-admin-stylesheet', plugins_url('/style.css?nsl-ver=' . urlencode(NextendSocialLogin::$version), NSL_ADMIN_PATH));
|
42 |
}
|
43 |
|
44 |
public static function display_admin() {
|
131 |
|
132 |
add_action('admin_enqueue_scripts', 'NextendSocialLoginAdmin::admin_enqueue_scripts');
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
if (!function_exists('json_decode')) {
|
135 |
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');
|
136 |
}
|
253 |
}
|
254 |
break;
|
255 |
case 'license_key':
|
256 |
+
$value = trim(sanitize_text_field($value));
|
|
|
257 |
if ($value != NextendSocialLogin::$settings->get('license_key')) {
|
258 |
$newData['license_key_ok'] = '0';
|
259 |
|
261 |
try {
|
262 |
$response = self::apiCall('test-license', array('license_key' => $value));
|
263 |
if ($response === 'OK') {
|
264 |
+
$newData[$key] = $value;
|
265 |
$newData['license_key_ok'] = '1';
|
266 |
}
|
267 |
} catch (Exception $e) {
|
270 |
}
|
271 |
}
|
272 |
break;
|
273 |
+
case 'review_state':
|
274 |
+
$newData['review_state'] = intval($value);
|
275 |
+
break;
|
276 |
}
|
277 |
}
|
278 |
|
332 |
*/
|
333 |
public static function apiCall($action, $args = array()) {
|
334 |
|
335 |
+
$http_args = array(
|
336 |
+
'timeout' => 15,
|
337 |
+
'user-agent' => 'WordPress',
|
338 |
+
'body' => array_merge(array(
|
339 |
+
'platform' => 'wordpress',
|
340 |
+
'domain' => parse_url(site_url(), PHP_URL_HOST),
|
341 |
+
'license_key' => NextendSocialLogin::$settings->get('license_key')
|
342 |
+
), $args)
|
343 |
+
);
|
344 |
|
345 |
+
$request = wp_remote_get(self::getEndpoint($action), $http_args);
|
346 |
|
347 |
+
if (is_wp_error($request)) {
|
348 |
|
349 |
+
throw new Exception($request->get_error_message());
|
350 |
+
} else if (wp_remote_retrieve_response_code($request) !== 200) {
|
351 |
|
352 |
+
$response = json_decode(wp_remote_retrieve_body($request), true);
|
353 |
if (isset($response['message'])) {
|
354 |
$message = 'Nextend Social Login Pro Addon: ' . $response['message'];
|
355 |
|
356 |
NextendSocialLoginAdminNotices::addError($message);
|
357 |
|
358 |
return new WP_Error('error', $message);
|
|
|
|
|
359 |
}
|
|
|
|
|
|
|
|
|
360 |
|
361 |
+
throw new Exception(sprintf(__('Unexpected response: %s', 'nextend-facebook-connect'), wp_remote_retrieve_body($request)));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
}
|
363 |
|
364 |
+
$response = json_decode(wp_remote_retrieve_body($request), true);
|
365 |
+
|
366 |
+
return $response;
|
367 |
}
|
368 |
|
369 |
public static function showProBox() {
|
399 |
'utm_medium' => 'nsl-wordpress-' . (apply_filters('nsl-pro', false) ? 'pro' : 'free')
|
400 |
), $url);
|
401 |
}
|
402 |
+
|
403 |
+
public static function save_review_state() {
|
404 |
+
check_ajax_referer('nsl_save_review_state');
|
405 |
+
if (isset($_POST['review_state'])) {
|
406 |
+
$review_state = intval($_POST['review_state']);
|
407 |
+
if ($review_state > 0) {
|
408 |
+
|
409 |
+
NextendSocialLogin::$settings->update(array(
|
410 |
+
'review_state' => $review_state
|
411 |
+
));
|
412 |
+
}
|
413 |
+
}
|
414 |
+
wp_die();
|
415 |
+
}
|
416 |
}
|
admin/images/stars-big.png
ADDED
Binary file
|
admin/images/stars-small.png
ADDED
Binary file
|
admin/style.css
CHANGED
@@ -328,4 +328,135 @@ input[type="radio"] ~ img {
|
|
328 |
input[type="radio"]:checked ~ img {
|
329 |
box-shadow: 0 0 0 3px #00a0d2;
|
330 |
border-radius: 3px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
}
|
328 |
input[type="radio"]:checked ~ img {
|
329 |
box-shadow: 0 0 0 3px #00a0d2;
|
330 |
border-radius: 3px;
|
331 |
+
}
|
332 |
+
|
333 |
+
.nsl-box-review {
|
334 |
+
position: relative;
|
335 |
+
float: left;
|
336 |
+
width: 340px;
|
337 |
+
height: 220px;
|
338 |
+
margin: 15px;
|
339 |
+
text-align: center;
|
340 |
+
background: #fff;
|
341 |
+
border-radius: 5px;
|
342 |
+
}
|
343 |
+
|
344 |
+
.nsl-box-review-bigstar {
|
345 |
+
width: 170px;
|
346 |
+
height: 105px;
|
347 |
+
margin: 20px auto 0;
|
348 |
+
background-image: url('images/stars-big.png');
|
349 |
+
}
|
350 |
+
|
351 |
+
[data-stars="1"] .nsl-box-review-bigstar {
|
352 |
+
background-position: 0 -105px;
|
353 |
+
}
|
354 |
+
|
355 |
+
[data-stars="2"] .nsl-box-review-bigstar {
|
356 |
+
background-position: 0 -210px;
|
357 |
+
}
|
358 |
+
|
359 |
+
[data-stars="3"] .nsl-box-review-bigstar {
|
360 |
+
background-position: 0 -315px;
|
361 |
+
}
|
362 |
+
|
363 |
+
[data-stars="4"] .nsl-box-review-bigstar {
|
364 |
+
background-position: 0 -420px;
|
365 |
+
}
|
366 |
+
|
367 |
+
[data-stars="5"] .nsl-box-review-bigstar {
|
368 |
+
background-position: 0 -525px;
|
369 |
+
}
|
370 |
+
|
371 |
+
.nsl-box-review-label {
|
372 |
+
color: #7b8898;
|
373 |
+
font-size: 15px;
|
374 |
+
line-height: 22px;
|
375 |
+
height: 22px;
|
376 |
+
overflow: hidden;
|
377 |
+
display: none;
|
378 |
+
}
|
379 |
+
|
380 |
+
[data-stars="0"] .nsl-box-review-label[data-star="0"],
|
381 |
+
[data-stars="1"] .nsl-box-review-label[data-star="1"],
|
382 |
+
[data-stars="2"] .nsl-box-review-label[data-star="2"],
|
383 |
+
[data-stars="3"] .nsl-box-review-label[data-star="3"],
|
384 |
+
[data-stars="4"] .nsl-box-review-label[data-star="4"],
|
385 |
+
[data-stars="5"] .nsl-box-review-label[data-star="5"] {
|
386 |
+
display: block;
|
387 |
+
}
|
388 |
+
|
389 |
+
.nsl-box-review-stars-container {
|
390 |
+
width: 170px;
|
391 |
+
height: 34px;
|
392 |
+
margin: 0 auto;
|
393 |
+
}
|
394 |
+
|
395 |
+
.nsl-box-review-star {
|
396 |
+
cursor: pointer;
|
397 |
+
transition: transform 0.4s;
|
398 |
+
vertical-align: top;
|
399 |
+
float: left;
|
400 |
+
width: 34px;
|
401 |
+
height: 34px;
|
402 |
+
background-image: url('images/stars-small.png');
|
403 |
+
}
|
404 |
+
|
405 |
+
[data-stars="1"] .nsl-box-review-star[data-star="1"],
|
406 |
+
[data-stars="2"] .nsl-box-review-star[data-star="1"],
|
407 |
+
[data-stars="2"] .nsl-box-review-star[data-star="2"],
|
408 |
+
[data-stars="3"] .nsl-box-review-star[data-star="1"],
|
409 |
+
[data-stars="3"] .nsl-box-review-star[data-star="2"],
|
410 |
+
[data-stars="3"] .nsl-box-review-star[data-star="3"],
|
411 |
+
[data-stars="4"] .nsl-box-review-star[data-star="1"],
|
412 |
+
[data-stars="4"] .nsl-box-review-star[data-star="2"],
|
413 |
+
[data-stars="4"] .nsl-box-review-star[data-star="3"],
|
414 |
+
[data-stars="4"] .nsl-box-review-star[data-star="4"],
|
415 |
+
[data-stars="5"] .nsl-box-review-star[data-star="1"],
|
416 |
+
[data-stars="5"] .nsl-box-review-star[data-star="2"],
|
417 |
+
[data-stars="5"] .nsl-box-review-star[data-star="3"],
|
418 |
+
[data-stars="5"] .nsl-box-review-star[data-star="4"],
|
419 |
+
[data-stars="5"] .nsl-box-review-star[data-star="5"] {
|
420 |
+
background-position: 0 -34px;
|
421 |
+
transform: scale(1.3);
|
422 |
+
}
|
423 |
+
|
424 |
+
.nsl-box-review-star-5 {
|
425 |
+
position: relative;
|
426 |
+
display: flex;
|
427 |
+
flex-flow: column;
|
428 |
+
border: 3px solid #f9cb4f;
|
429 |
+
justify-content: center;
|
430 |
+
box-sizing: border-box;
|
431 |
+
padding: 0 30px;
|
432 |
+
}
|
433 |
+
|
434 |
+
.nsl-box-review-star-5 h3 {
|
435 |
+
margin: 0 0 10px;
|
436 |
+
}
|
437 |
+
|
438 |
+
.nsl-box-review-star-5-description {
|
439 |
+
margin: 0 0 20px;
|
440 |
+
}
|
441 |
+
|
442 |
+
.nsl-box-review-star-5 .nsl-box-review-star-5-close {
|
443 |
+
display: none;
|
444 |
+
position: absolute;
|
445 |
+
right: 10px;
|
446 |
+
top: 10px;
|
447 |
+
color: #23282d;
|
448 |
+
cursor: pointer;
|
449 |
+
}
|
450 |
+
|
451 |
+
.nsl-box-review-star-5:HOVER .nsl-box-review-star-5-close {
|
452 |
+
display: block;
|
453 |
+
}
|
454 |
+
|
455 |
+
.nsl-box-review-star-5 .nsl-box-review-star-5-close:before {
|
456 |
+
content: "\f158";
|
457 |
+
font: 400 16px/1 dashicons;
|
458 |
+
speak: none;
|
459 |
+
vertical-align: middle;
|
460 |
+
-webkit-font-smoothing: antialiased;
|
461 |
+
-moz-osx-font-smoothing: grayscale;
|
462 |
}
|
admin/templates-provider/settings-other.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die();
|
3 |
+
/** @var $this NextendSocialProvider */
|
4 |
+
|
5 |
+
$settings = $this->settings;
|
6 |
+
?>
|
7 |
+
|
8 |
+
<hr/>
|
9 |
+
<h2><?php _e('Other settings', 'nextend-facebook-connect'); ?></h2>
|
10 |
+
<table class="form-table">
|
11 |
+
<tbody>
|
12 |
+
<tr>
|
13 |
+
<th scope="row"><label
|
14 |
+
for="user_prefix"><?php _e('Username prefix on register', 'nextend-facebook-connect'); ?></label></th>
|
15 |
+
<td><input name="user_prefix" type="text" id="user_prefix"
|
16 |
+
value="<?php echo esc_attr($settings->get('user_prefix')); ?>" class="regular-text"></td>
|
17 |
+
</tr>
|
18 |
+
<tr>
|
19 |
+
<th scope="row"><label
|
20 |
+
for="user_fallback"><?php _e('Fallback username prefix on register', 'nextend-facebook-connect'); ?></label></th>
|
21 |
+
<td><input name="user_fallback" type="text" id="user_fallback"
|
22 |
+
value="<?php echo esc_attr($settings->get('user_fallback')); ?>" class="regular-text">
|
23 |
+
<p class="description" id="tagline-user_fallback"><?php _e('Used when username is invalid', 'nextend-facebook-connect'); ?></p></td>
|
24 |
+
</tr>
|
25 |
+
</tbody>
|
26 |
+
</table>
|
admin/templates-provider/settings-pro.php
CHANGED
@@ -20,7 +20,7 @@ if (!$isPRO) {
|
|
20 |
NextendSocialLoginAdmin::showProBox();
|
21 |
?>
|
22 |
<input type="hidden" name="tested" id="tested" value="<?php echo esc_attr($settings->get('tested')); ?>"/>
|
23 |
-
<table class="form-table" <?php if (
|
24 |
<tbody>
|
25 |
<tr>
|
26 |
<th scope="row"><?php _e('Ask E-mail on registration', 'nextend-facebook-connect'); ?></th>
|
20 |
NextendSocialLoginAdmin::showProBox();
|
21 |
?>
|
22 |
<input type="hidden" name="tested" id="tested" value="<?php echo esc_attr($settings->get('tested')); ?>"/>
|
23 |
+
<table class="form-table" <?php if (!$isPRO): ?> style="opacity:0.5;"<?php endif; ?>>
|
24 |
<tbody>
|
25 |
<tr>
|
26 |
<th scope="row"><?php _e('Ask E-mail on registration', 'nextend-facebook-connect'); ?></th>
|
admin/templates/global-settings-pro.php
CHANGED
@@ -17,8 +17,38 @@ $settings = NextendSocialLogin::$settings;
|
|
17 |
<?php
|
18 |
NextendSocialLoginAdmin::showProBox();
|
19 |
?>
|
20 |
-
<table class="form-table" <?php if (
|
21 |
<tbody>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
<tr>
|
23 |
<th scope="row"><?php _e('Login form button style', 'nextend-facebook-connect'); ?></th>
|
24 |
<td>
|
@@ -201,6 +231,30 @@ NextendSocialLoginAdmin::showProBox();
|
|
201 |
</fieldset>
|
202 |
</td>
|
203 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
</tbody>
|
205 |
</table>
|
206 |
|
17 |
<?php
|
18 |
NextendSocialLoginAdmin::showProBox();
|
19 |
?>
|
20 |
+
<table class="form-table" <?php if (!$isPRO): ?> style="opacity:0.5;"<?php endif; ?>>
|
21 |
<tbody>
|
22 |
+
<tr>
|
23 |
+
<th scope="row"><?php _e('Login form', 'nextend-facebook-connect'); ?></th>
|
24 |
+
<td>
|
25 |
+
<fieldset>
|
26 |
+
<legend class="screen-reader-text">
|
27 |
+
<span><?php _e('Show buttons on Login form', 'nextend-facebook-connect'); ?></span></legend>
|
28 |
+
<label><input type="radio" name="show_login_form"
|
29 |
+
value="show" <?php if ($settings->get('show_login_form') == 'show') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
30 |
+
<span><?php _e('Show login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
31 |
+
<label><input type="radio" name="show_login_form"
|
32 |
+
value="hide" <?php if ($settings->get('show_login_form') == 'hide') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
33 |
+
<span><?php _e('Hide login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
34 |
+
</fieldset>
|
35 |
+
</td>
|
36 |
+
</tr>
|
37 |
+
<tr>
|
38 |
+
<th scope="row"><?php _e('Registration form', 'nextend-facebook-connect'); ?></th>
|
39 |
+
<td>
|
40 |
+
<fieldset>
|
41 |
+
<legend class="screen-reader-text">
|
42 |
+
<span><?php _e('Registration form', 'nextend-facebook-connect'); ?></span></legend>
|
43 |
+
<label><input type="radio" name="show_registration_form"
|
44 |
+
value="show" <?php if ($settings->get('show_registration_form') == 'show') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
45 |
+
<span><?php _e('Show login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
46 |
+
<label><input type="radio" name="show_registration_form"
|
47 |
+
value="hide" <?php if ($settings->get('show_registration_form') == 'hide') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
48 |
+
<span><?php _e('Hide login buttons', 'nextend-facebook-connect'); ?></span></label><br>
|
49 |
+
</fieldset>
|
50 |
+
</td>
|
51 |
+
</tr>
|
52 |
<tr>
|
53 |
<th scope="row"><?php _e('Login form button style', 'nextend-facebook-connect'); ?></th>
|
54 |
<td>
|
231 |
</fieldset>
|
232 |
</td>
|
233 |
</tr>
|
234 |
+
<tr>
|
235 |
+
<th scope="row"><?php _e('Registration notification sent to', 'nextend-facebook-connect'); ?></th>
|
236 |
+
<td>
|
237 |
+
<fieldset>
|
238 |
+
<legend class="screen-reader-text">
|
239 |
+
<span><?php _e('Registration notification sent to', 'nextend-facebook-connect'); ?></span></legend>
|
240 |
+
<label><input type="radio" name="registration_notification_notify"
|
241 |
+
value="0" <?php if ($settings->get('registration_notification_notify') == '0') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
242 |
+
<span><?php _e('WordPress default', 'nextend-facebook-connect'); ?></span></label><br>
|
243 |
+
<label><input type="radio" name="registration_notification_notify"
|
244 |
+
value="nobody" <?php if ($settings->get('registration_notification_notify') == 'nobody') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
245 |
+
<span><?php _e('Nobody', 'nextend-facebook-connect'); ?></span></label><br>
|
246 |
+
<label><input type="radio" name="registration_notification_notify"
|
247 |
+
value="user" <?php if ($settings->get('registration_notification_notify') == 'user') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
248 |
+
<span><?php _e('User', 'nextend-facebook-connect'); ?></span></label><br>
|
249 |
+
<label><input type="radio" name="registration_notification_notify"
|
250 |
+
value="admin" <?php if ($settings->get('registration_notification_notify') == 'admin') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
251 |
+
<span><?php _e('Admin', 'nextend-facebook-connect'); ?></span></label><br>
|
252 |
+
<label><input type="radio" name="registration_notification_notify"
|
253 |
+
value="both" <?php if ($settings->get('registration_notification_notify') == 'both') : ?> checked="checked" <?php endif; ?><?php echo $attr; ?>>
|
254 |
+
<span><?php _e('User and Admin', 'nextend-facebook-connect'); ?></span></label><br>
|
255 |
+
</fieldset>
|
256 |
+
</td>
|
257 |
+
</tr>
|
258 |
</tbody>
|
259 |
</table>
|
260 |
|
admin/templates/pro.php
CHANGED
@@ -6,7 +6,7 @@ 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
|
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'); ?>"
|
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'); ?>"
|
admin/templates/providers.php
CHANGED
@@ -4,7 +4,13 @@ wp_enqueue_script('jquery-ui-sortable');
|
|
4 |
|
5 |
<div class="nsl-dashboard-providers-container">
|
6 |
<div class="nsl-dashboard-providers">
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
<?php
|
9 |
$state = $provider->getState();
|
10 |
?>
|
@@ -118,9 +124,10 @@ wp_enqueue_script('jquery-ui-sortable');
|
|
118 |
successMessage = <?php echo wp_json_encode(__('Order Saved', 'nextend-facebook-connect')); ?>;
|
119 |
$('.nsl-dashboard-providers').sortable({
|
120 |
handle: '.nsl-dashboard-provider-sortable-handle',
|
|
|
121 |
tolerance: 'pointer',
|
122 |
stop: function (event, ui) {
|
123 |
-
var $providers = $('.nsl-dashboard-providers >
|
124 |
providerList = [];
|
125 |
for (var i = 0; i < $providers.length; i++) {
|
126 |
providerList.push($providers.eq(i).data('provider'));
|
4 |
|
5 |
<div class="nsl-dashboard-providers-container">
|
6 |
<div class="nsl-dashboard-providers">
|
7 |
+
<?php
|
8 |
+
if (count(NextendSocialLogin::$enabledProviders) > 0) {
|
9 |
+
include_once(dirname(__FILE__) . '/review.php');
|
10 |
+
}
|
11 |
+
?>
|
12 |
+
|
13 |
+
<?php foreach (NextendSocialLogin::$providers AS $provider): ?>
|
14 |
<?php
|
15 |
$state = $provider->getState();
|
16 |
?>
|
124 |
successMessage = <?php echo wp_json_encode(__('Order Saved', 'nextend-facebook-connect')); ?>;
|
125 |
$('.nsl-dashboard-providers').sortable({
|
126 |
handle: '.nsl-dashboard-provider-sortable-handle',
|
127 |
+
items: ' > .nsl-dashboard-provider',
|
128 |
tolerance: 'pointer',
|
129 |
stop: function (event, ui) {
|
130 |
+
var $providers = $('.nsl-dashboard-providers > .nsl-dashboard-provider'),
|
131 |
providerList = [];
|
132 |
for (var i = 0; i < $providers.length; i++) {
|
133 |
providerList.push($providers.eq(i).data('provider'));
|
admin/templates/review.php
ADDED
@@ -0,0 +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 |
+
<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>
|
includes/curl/ArrayUtil.php
DELETED
@@ -1,73 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class NSLArrayUtil {
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Is Array Assoc
|
7 |
-
*
|
8 |
-
* @access public
|
9 |
-
*
|
10 |
-
* @param $array
|
11 |
-
*
|
12 |
-
* @return boolean
|
13 |
-
*/
|
14 |
-
public static function is_array_assoc($array) {
|
15 |
-
return (bool)count(array_filter(array_keys($array), 'is_string'));
|
16 |
-
}
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Is Array Multidim
|
20 |
-
*
|
21 |
-
* @access public
|
22 |
-
*
|
23 |
-
* @param $array
|
24 |
-
*
|
25 |
-
* @return boolean
|
26 |
-
*/
|
27 |
-
public static function is_array_multidim($array) {
|
28 |
-
if (!is_array($array)) {
|
29 |
-
return false;
|
30 |
-
}
|
31 |
-
|
32 |
-
return (bool)count(array_filter($array, 'is_array'));
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Array Flatten Multidim
|
37 |
-
*
|
38 |
-
* @access public
|
39 |
-
*
|
40 |
-
* @param $array
|
41 |
-
* @param $prefix
|
42 |
-
*
|
43 |
-
* @return array
|
44 |
-
*/
|
45 |
-
public static function array_flatten_multidim($array, $prefix = false) {
|
46 |
-
$return = array();
|
47 |
-
if (is_array($array) || is_object($array)) {
|
48 |
-
if (empty($array)) {
|
49 |
-
$return[$prefix] = '';
|
50 |
-
} else {
|
51 |
-
foreach ($array as $key => $value) {
|
52 |
-
if (is_scalar($value)) {
|
53 |
-
if ($prefix) {
|
54 |
-
$return[$prefix . '[' . $key . ']'] = $value;
|
55 |
-
} else {
|
56 |
-
$return[$key] = $value;
|
57 |
-
}
|
58 |
-
} else {
|
59 |
-
if ($value instanceof \CURLFile) {
|
60 |
-
$return[$key] = $value;
|
61 |
-
} else {
|
62 |
-
$return = array_merge($return, self::array_flatten_multidim($value, $prefix ? $prefix . '[' . $key . ']' : $key));
|
63 |
-
}
|
64 |
-
}
|
65 |
-
}
|
66 |
-
}
|
67 |
-
} elseif ($array === null) {
|
68 |
-
$return[$prefix] = $array;
|
69 |
-
}
|
70 |
-
|
71 |
-
return $return;
|
72 |
-
}
|
73 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/curl/CaseInsensitiveArray.php
DELETED
@@ -1,218 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class NSLCaseInsensitiveArray implements \ArrayAccess, \Countable, \Iterator {
|
4 |
-
|
5 |
-
/**
|
6 |
-
* @var mixed[] Data storage with lower-case keys
|
7 |
-
* @see offsetSet()
|
8 |
-
* @see offsetExists()
|
9 |
-
* @see offsetUnset()
|
10 |
-
* @see offsetGet()
|
11 |
-
* @see count()
|
12 |
-
* @see current()
|
13 |
-
* @see next()
|
14 |
-
* @see key()
|
15 |
-
*/
|
16 |
-
private $data = array();
|
17 |
-
|
18 |
-
/**
|
19 |
-
* @var string[] Case-Sensitive keys.
|
20 |
-
* @see offsetSet()
|
21 |
-
* @see offsetUnset()
|
22 |
-
* @see key()
|
23 |
-
*/
|
24 |
-
private $keys = array();
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Construct
|
28 |
-
*
|
29 |
-
* Allow creating either an empty Array, or convert an existing Array to a
|
30 |
-
* Case-Insensitive Array. (Caution: Data may be lost when converting Case-
|
31 |
-
* Sensitive Arrays to Case-Insensitive Arrays)
|
32 |
-
*
|
33 |
-
* @param mixed[] $initial (optional) Existing Array to convert.
|
34 |
-
*
|
35 |
-
* @access public
|
36 |
-
*/
|
37 |
-
public function __construct(array $initial = null) {
|
38 |
-
if ($initial !== null) {
|
39 |
-
foreach ($initial as $key => $value) {
|
40 |
-
$this->offsetSet($key, $value);
|
41 |
-
}
|
42 |
-
}
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Offset Set
|
47 |
-
*
|
48 |
-
* Set data at a specified Offset. Converts the offset to lower-case, and
|
49 |
-
* stores the Case-Sensitive Offset and the Data at the lower-case indexes
|
50 |
-
* in $this->keys and @this->data.
|
51 |
-
*
|
52 |
-
* @see https://secure.php.net/manual/en/arrayaccess.offseteset.php
|
53 |
-
*
|
54 |
-
* @param string $offset The offset to store the data at (case-insensitive).
|
55 |
-
* @param mixed $value The data to store at the specified offset.
|
56 |
-
*
|
57 |
-
* @return void
|
58 |
-
*
|
59 |
-
* @access public
|
60 |
-
*/
|
61 |
-
public function offsetSet($offset, $value) {
|
62 |
-
if ($offset === null) {
|
63 |
-
$this->data[] = $value;
|
64 |
-
} else {
|
65 |
-
$offsetlower = strtolower($offset);
|
66 |
-
$this->data[$offsetlower] = $value;
|
67 |
-
$this->keys[$offsetlower] = $offset;
|
68 |
-
}
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Offset Exists
|
73 |
-
*
|
74 |
-
* Checks if the Offset exists in data storage. The index is looked up with
|
75 |
-
* the lower-case version of the provided offset.
|
76 |
-
*
|
77 |
-
* @see https://secure.php.net/manual/en/arrayaccess.offsetexists.php
|
78 |
-
*
|
79 |
-
* @param string $offset Offset to check
|
80 |
-
*
|
81 |
-
* @return bool If the offset exists.
|
82 |
-
*
|
83 |
-
* @access public
|
84 |
-
*/
|
85 |
-
public function offsetExists($offset) {
|
86 |
-
return (bool)array_key_exists(strtolower($offset), $this->data);
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Offset Unset
|
91 |
-
*
|
92 |
-
* Unsets the specified offset. Converts the provided offset to lowercase,
|
93 |
-
* and unsets the Case-Sensitive Key, as well as the stored data.
|
94 |
-
*
|
95 |
-
* @see https://secure.php.net/manual/en/arrayaccess.offsetunset.php
|
96 |
-
*
|
97 |
-
* @param string $offset The offset to unset.
|
98 |
-
*
|
99 |
-
* @return void
|
100 |
-
*
|
101 |
-
* @access public
|
102 |
-
*/
|
103 |
-
public function offsetUnset($offset) {
|
104 |
-
$offsetlower = strtolower($offset);
|
105 |
-
unset($this->data[$offsetlower]);
|
106 |
-
unset($this->keys[$offsetlower]);
|
107 |
-
}
|
108 |
-
|
109 |
-
/**
|
110 |
-
* Offset Get
|
111 |
-
*
|
112 |
-
* Return the stored data at the provided offset. The offset is converted to
|
113 |
-
* lowercase and the lookup is done on the Data store directly.
|
114 |
-
*
|
115 |
-
* @see https://secure.php.net/manual/en/arrayaccess.offsetget.php
|
116 |
-
*
|
117 |
-
* @param string $offset Offset to lookup.
|
118 |
-
*
|
119 |
-
* @return mixed The data stored at the offset.
|
120 |
-
*
|
121 |
-
* @access public
|
122 |
-
*/
|
123 |
-
public function offsetGet($offset) {
|
124 |
-
$offsetlower = strtolower($offset);
|
125 |
-
|
126 |
-
return isset($this->data[$offsetlower]) ? $this->data[$offsetlower] : null;
|
127 |
-
}
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Count
|
131 |
-
*
|
132 |
-
* @see https://secure.php.net/manual/en/countable.count.php
|
133 |
-
*
|
134 |
-
* @param void
|
135 |
-
*
|
136 |
-
* @return int The number of elements stored in the Array.
|
137 |
-
*
|
138 |
-
* @access public
|
139 |
-
*/
|
140 |
-
public function count() {
|
141 |
-
return (int)count($this->data);
|
142 |
-
}
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Current
|
146 |
-
*
|
147 |
-
* @see https://secure.php.net/manual/en/iterator.current.php
|
148 |
-
*
|
149 |
-
* @param void
|
150 |
-
*
|
151 |
-
* @return mixed Data at the current position.
|
152 |
-
*
|
153 |
-
* @access public
|
154 |
-
*/
|
155 |
-
public function current() {
|
156 |
-
return current($this->data);
|
157 |
-
}
|
158 |
-
|
159 |
-
/**
|
160 |
-
* Next
|
161 |
-
*
|
162 |
-
* @see https://secure.php.net/manual/en/iterator.next.php
|
163 |
-
*
|
164 |
-
* @param void
|
165 |
-
*
|
166 |
-
* @return void
|
167 |
-
*
|
168 |
-
* @access public
|
169 |
-
*/
|
170 |
-
public function next() {
|
171 |
-
next($this->data);
|
172 |
-
}
|
173 |
-
|
174 |
-
/**
|
175 |
-
* Key
|
176 |
-
*
|
177 |
-
* @see https://secure.php.net/manual/en/iterator.key.php
|
178 |
-
*
|
179 |
-
* @param void
|
180 |
-
*
|
181 |
-
* @return mixed Case-Sensitive key at current position.
|
182 |
-
*
|
183 |
-
* @access public
|
184 |
-
*/
|
185 |
-
public function key() {
|
186 |
-
$key = key($this->data);
|
187 |
-
|
188 |
-
return isset($this->keys[$key]) ? $this->keys[$key] : $key;
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* Valid
|
193 |
-
*
|
194 |
-
* @see https://secure.php.net/manual/en/iterator.valid.php
|
195 |
-
*
|
196 |
-
* @return bool If the current position is valid.
|
197 |
-
*
|
198 |
-
* @access public
|
199 |
-
*/
|
200 |
-
public function valid() {
|
201 |
-
return (bool)!(key($this->data) === null);
|
202 |
-
}
|
203 |
-
|
204 |
-
/**
|
205 |
-
* Rewind
|
206 |
-
*
|
207 |
-
* @see https://secure.php.net/manual/en/iterator.rewind.php
|
208 |
-
*
|
209 |
-
* @param void
|
210 |
-
*
|
211 |
-
* @return void
|
212 |
-
*
|
213 |
-
* @access public
|
214 |
-
*/
|
215 |
-
public function rewind() {
|
216 |
-
reset($this->data);
|
217 |
-
}
|
218 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/curl/Curl.php
DELETED
@@ -1,1648 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once dirname(__FILE__) . '/CaseInsensitiveArray.php';
|
4 |
-
require_once dirname(__FILE__) . '/ArrayUtil.php';
|
5 |
-
require_once dirname(__FILE__) . '/Decoder.php';
|
6 |
-
require_once dirname(__FILE__) . '/Url.php';
|
7 |
-
|
8 |
-
class NSLCurl {
|
9 |
-
|
10 |
-
const VERSION = '8.0.0';
|
11 |
-
const DEFAULT_TIMEOUT = 30;
|
12 |
-
|
13 |
-
public $curl;
|
14 |
-
public $id = null;
|
15 |
-
|
16 |
-
public $error = false;
|
17 |
-
public $errorCode = 0;
|
18 |
-
public $errorMessage = null;
|
19 |
-
|
20 |
-
public $curlError = false;
|
21 |
-
public $curlErrorCode = 0;
|
22 |
-
public $curlErrorMessage = null;
|
23 |
-
|
24 |
-
public $httpError = false;
|
25 |
-
public $httpStatusCode = 0;
|
26 |
-
public $httpErrorMessage = null;
|
27 |
-
|
28 |
-
public $url = null;
|
29 |
-
public $requestHeaders = null;
|
30 |
-
public $responseHeaders = null;
|
31 |
-
public $rawResponseHeaders = '';
|
32 |
-
public $responseCookies = array();
|
33 |
-
public $response = null;
|
34 |
-
public $rawResponse = null;
|
35 |
-
|
36 |
-
public $beforeSendFunction = null;
|
37 |
-
public $downloadCompleteFunction = null;
|
38 |
-
public $successFunction = null;
|
39 |
-
public $errorFunction = null;
|
40 |
-
public $completeFunction = null;
|
41 |
-
public $fileHandle = null;
|
42 |
-
|
43 |
-
public $attempts = 0;
|
44 |
-
public $retries = 0;
|
45 |
-
public $isChildOfMultiCurl = false;
|
46 |
-
public $remainingRetries = 0;
|
47 |
-
public $retryDecider = null;
|
48 |
-
|
49 |
-
private $cookies = array();
|
50 |
-
private $headers = array();
|
51 |
-
private $options = array();
|
52 |
-
|
53 |
-
private $jsonDecoder = 'NSLDecoder::decodeJson';
|
54 |
-
private $jsonDecoderArgs = array(true);
|
55 |
-
private $jsonPattern = '/^(?:application|text)\/(?:[a-z]+(?:[\.-][0-9a-z]+){0,}[\+\.]|x-)?json(?:-[a-z]+)?/i';
|
56 |
-
private $xmlDecoder = 'NSLDecoder::decodeXml';
|
57 |
-
private $xmlPattern = '~^(?:text/|application/(?:atom\+|rss\+)?)xml~i';
|
58 |
-
private $defaultDecoder = null;
|
59 |
-
|
60 |
-
public static $RFC2616 = array(
|
61 |
-
// RFC 2616: "any CHAR except CTLs or separators".
|
62 |
-
// CHAR = <any US-ASCII character (octets 0 - 127)>
|
63 |
-
// CTL = <any US-ASCII control character
|
64 |
-
// (octets 0 - 31) and DEL (127)>
|
65 |
-
// separators = "(" | ")" | "<" | ">" | "@"
|
66 |
-
// | "," | ";" | ":" | "\" | <">
|
67 |
-
// | "/" | "[" | "]" | "?" | "="
|
68 |
-
// | "{" | "}" | SP | HT
|
69 |
-
// SP = <US-ASCII SP, space (32)>
|
70 |
-
// HT = <US-ASCII HT, horizontal-tab (9)>
|
71 |
-
// <"> = <US-ASCII double-quote mark (34)>
|
72 |
-
'!',
|
73 |
-
'#',
|
74 |
-
'$',
|
75 |
-
'%',
|
76 |
-
'&',
|
77 |
-
"'",
|
78 |
-
'*',
|
79 |
-
'+',
|
80 |
-
'-',
|
81 |
-
'.',
|
82 |
-
'0',
|
83 |
-
'1',
|
84 |
-
'2',
|
85 |
-
'3',
|
86 |
-
'4',
|
87 |
-
'5',
|
88 |
-
'6',
|
89 |
-
'7',
|
90 |
-
'8',
|
91 |
-
'9',
|
92 |
-
'A',
|
93 |
-
'B',
|
94 |
-
'C',
|
95 |
-
'D',
|
96 |
-
'E',
|
97 |
-
'F',
|
98 |
-
'G',
|
99 |
-
'H',
|
100 |
-
'I',
|
101 |
-
'J',
|
102 |
-
'K',
|
103 |
-
'L',
|
104 |
-
'M',
|
105 |
-
'N',
|
106 |
-
'O',
|
107 |
-
'P',
|
108 |
-
'Q',
|
109 |
-
'R',
|
110 |
-
'S',
|
111 |
-
'T',
|
112 |
-
'U',
|
113 |
-
'V',
|
114 |
-
'W',
|
115 |
-
'X',
|
116 |
-
'Y',
|
117 |
-
'Z',
|
118 |
-
'^',
|
119 |
-
'_',
|
120 |
-
'`',
|
121 |
-
'a',
|
122 |
-
'b',
|
123 |
-
'c',
|
124 |
-
'd',
|
125 |
-
'e',
|
126 |
-
'f',
|
127 |
-
'g',
|
128 |
-
'h',
|
129 |
-
'i',
|
130 |
-
'j',
|
131 |
-
'k',
|
132 |
-
'l',
|
133 |
-
'm',
|
134 |
-
'n',
|
135 |
-
'o',
|
136 |
-
'p',
|
137 |
-
'q',
|
138 |
-
'r',
|
139 |
-
's',
|
140 |
-
't',
|
141 |
-
'u',
|
142 |
-
'v',
|
143 |
-
'w',
|
144 |
-
'x',
|
145 |
-
'y',
|
146 |
-
'z',
|
147 |
-
'|',
|
148 |
-
'~',
|
149 |
-
);
|
150 |
-
public static $RFC6265 = array(
|
151 |
-
// RFC 6265: "US-ASCII characters excluding CTLs, whitespace DQUOTE, comma, semicolon, and backslash".
|
152 |
-
// %x21
|
153 |
-
'!',
|
154 |
-
// %x23-2B
|
155 |
-
'#',
|
156 |
-
'$',
|
157 |
-
'%',
|
158 |
-
'&',
|
159 |
-
"'",
|
160 |
-
'(',
|
161 |
-
')',
|
162 |
-
'*',
|
163 |
-
'+',
|
164 |
-
// %x2D-3A
|
165 |
-
'-',
|
166 |
-
'.',
|
167 |
-
'/',
|
168 |
-
'0',
|
169 |
-
'1',
|
170 |
-
'2',
|
171 |
-
'3',
|
172 |
-
'4',
|
173 |
-
'5',
|
174 |
-
'6',
|
175 |
-
'7',
|
176 |
-
'8',
|
177 |
-
'9',
|
178 |
-
':',
|
179 |
-
// %x3C-5B
|
180 |
-
'<',
|
181 |
-
'=',
|
182 |
-
'>',
|
183 |
-
'?',
|
184 |
-
'@',
|
185 |
-
'A',
|
186 |
-
'B',
|
187 |
-
'C',
|
188 |
-
'D',
|
189 |
-
'E',
|
190 |
-
'F',
|
191 |
-
'G',
|
192 |
-
'H',
|
193 |
-
'I',
|
194 |
-
'J',
|
195 |
-
'K',
|
196 |
-
'L',
|
197 |
-
'M',
|
198 |
-
'N',
|
199 |
-
'O',
|
200 |
-
'P',
|
201 |
-
'Q',
|
202 |
-
'R',
|
203 |
-
'S',
|
204 |
-
'T',
|
205 |
-
'U',
|
206 |
-
'V',
|
207 |
-
'W',
|
208 |
-
'X',
|
209 |
-
'Y',
|
210 |
-
'Z',
|
211 |
-
'[',
|
212 |
-
// %x5D-7E
|
213 |
-
']',
|
214 |
-
'^',
|
215 |
-
'_',
|
216 |
-
'`',
|
217 |
-
'a',
|
218 |
-
'b',
|
219 |
-
'c',
|
220 |
-
'd',
|
221 |
-
'e',
|
222 |
-
'f',
|
223 |
-
'g',
|
224 |
-
'h',
|
225 |
-
'i',
|
226 |
-
'j',
|
227 |
-
'k',
|
228 |
-
'l',
|
229 |
-
'm',
|
230 |
-
'n',
|
231 |
-
'o',
|
232 |
-
'p',
|
233 |
-
'q',
|
234 |
-
'r',
|
235 |
-
's',
|
236 |
-
't',
|
237 |
-
'u',
|
238 |
-
'v',
|
239 |
-
'w',
|
240 |
-
'x',
|
241 |
-
'y',
|
242 |
-
'z',
|
243 |
-
'{',
|
244 |
-
'|',
|
245 |
-
'}',
|
246 |
-
'~',
|
247 |
-
);
|
248 |
-
|
249 |
-
private static $deferredProperties = array(
|
250 |
-
'effectiveUrl',
|
251 |
-
'rfc2616',
|
252 |
-
'rfc6265',
|
253 |
-
'totalTime',
|
254 |
-
);
|
255 |
-
|
256 |
-
/**
|
257 |
-
* Construct
|
258 |
-
*
|
259 |
-
* @access public
|
260 |
-
*
|
261 |
-
* @param $base_url
|
262 |
-
*/
|
263 |
-
public function __construct($base_url = null) {
|
264 |
-
|
265 |
-
$this->curl = curl_init();
|
266 |
-
$this->id = uniqid('', true);
|
267 |
-
$this->setDefaultUserAgent();
|
268 |
-
$this->setDefaultTimeout();
|
269 |
-
$this->setOpt(CURLINFO_HEADER_OUT, true);
|
270 |
-
|
271 |
-
// Create a placeholder to temporarily store the header callback data.
|
272 |
-
$header_callback_data = new stdClass();
|
273 |
-
$header_callback_data->rawResponseHeaders = '';
|
274 |
-
$header_callback_data->responseCookies = array();
|
275 |
-
$this->headerCallbackData = $header_callback_data;
|
276 |
-
$this->setOpt(CURLOPT_HEADERFUNCTION, $this->createHeaderCallback($header_callback_data));
|
277 |
-
|
278 |
-
$this->setOpt(CURLOPT_RETURNTRANSFER, true);
|
279 |
-
$this->headers = new NSLCaseInsensitiveArray();
|
280 |
-
$this->setUrl($base_url);
|
281 |
-
}
|
282 |
-
|
283 |
-
/**
|
284 |
-
* Before Send
|
285 |
-
*
|
286 |
-
* @access public
|
287 |
-
*
|
288 |
-
* @param $callback
|
289 |
-
*/
|
290 |
-
public function beforeSend($callback) {
|
291 |
-
$this->beforeSendFunction = $callback;
|
292 |
-
}
|
293 |
-
|
294 |
-
/**
|
295 |
-
* Build Post Data
|
296 |
-
*
|
297 |
-
* @access public
|
298 |
-
*
|
299 |
-
* @param $data
|
300 |
-
*
|
301 |
-
* @return array|string
|
302 |
-
*/
|
303 |
-
public function buildPostData($data) {
|
304 |
-
$binary_data = false;
|
305 |
-
if (is_array($data)) {
|
306 |
-
// Return JSON-encoded string when the request's content-type is JSON.
|
307 |
-
if (isset($this->headers['Content-Type']) && preg_match($this->jsonPattern, $this->headers['Content-Type'])) {
|
308 |
-
$json_str = wp_json_encode($data);
|
309 |
-
if (!($json_str === false)) {
|
310 |
-
$data = $json_str;
|
311 |
-
}
|
312 |
-
} else {
|
313 |
-
// Manually build a single-dimensional array from a multi-dimensional array as using curl_setopt($ch,
|
314 |
-
// CURLOPT_POSTFIELDS, $data) doesn't correctly handle multi-dimensional arrays when files are
|
315 |
-
// referenced.
|
316 |
-
if (NSLArrayUtil::is_array_multidim($data)) {
|
317 |
-
$data = NSLArrayUtil::array_flatten_multidim($data);
|
318 |
-
}
|
319 |
-
|
320 |
-
// Modify array values to ensure any referenced files are properly handled depending on the support of
|
321 |
-
// the @filename API or CURLFile usage. This also fixes the warning "curl_setopt(): The usage of the
|
322 |
-
// @filename API for file uploading is deprecated. Please use the CURLFile class instead". Ignore
|
323 |
-
// non-file values prefixed with the @ character.
|
324 |
-
foreach ($data as $key => $value) {
|
325 |
-
if (is_string($value) && strpos($value, '@') === 0 && is_file(substr($value, 1))) {
|
326 |
-
$binary_data = true;
|
327 |
-
if (class_exists('CURLFile')) {
|
328 |
-
$data[$key] = new CURLFile(substr($value, 1));
|
329 |
-
}
|
330 |
-
} elseif ($value instanceof CURLFile) {
|
331 |
-
$binary_data = true;
|
332 |
-
}
|
333 |
-
}
|
334 |
-
}
|
335 |
-
}
|
336 |
-
|
337 |
-
if (!$binary_data && (is_array($data) || is_object($data))) {
|
338 |
-
$data = http_build_query($data, '', '&');
|
339 |
-
}
|
340 |
-
|
341 |
-
return $data;
|
342 |
-
}
|
343 |
-
|
344 |
-
/**
|
345 |
-
* Call
|
346 |
-
*
|
347 |
-
* @access public
|
348 |
-
*/
|
349 |
-
public function call() {
|
350 |
-
$args = func_get_args();
|
351 |
-
$function = array_shift($args);
|
352 |
-
if (is_callable($function)) {
|
353 |
-
array_unshift($args, $this);
|
354 |
-
call_user_func_array($function, $args);
|
355 |
-
}
|
356 |
-
}
|
357 |
-
|
358 |
-
/**
|
359 |
-
* Close
|
360 |
-
*
|
361 |
-
* @access public
|
362 |
-
*/
|
363 |
-
public function close() {
|
364 |
-
if (is_resource($this->curl)) {
|
365 |
-
curl_close($this->curl);
|
366 |
-
}
|
367 |
-
$this->options = null;
|
368 |
-
$this->jsonDecoder = null;
|
369 |
-
$this->jsonDecoderArgs = null;
|
370 |
-
$this->xmlDecoder = null;
|
371 |
-
$this->defaultDecoder = null;
|
372 |
-
}
|
373 |
-
|
374 |
-
/**
|
375 |
-
* Complete
|
376 |
-
*
|
377 |
-
* @access public
|
378 |
-
*
|
379 |
-
* @param $callback
|
380 |
-
*/
|
381 |
-
public function complete($callback) {
|
382 |
-
$this->completeFunction = $callback;
|
383 |
-
}
|
384 |
-
|
385 |
-
/**
|
386 |
-
* Progress
|
387 |
-
*
|
388 |
-
* @access public
|
389 |
-
*
|
390 |
-
* @param $callback
|
391 |
-
*/
|
392 |
-
public function progress($callback) {
|
393 |
-
$this->setOpt(CURLOPT_PROGRESSFUNCTION, $callback);
|
394 |
-
$this->setOpt(CURLOPT_NOPROGRESS, false);
|
395 |
-
}
|
396 |
-
|
397 |
-
/**
|
398 |
-
* Delete
|
399 |
-
*
|
400 |
-
* @access public
|
401 |
-
*
|
402 |
-
* @param $url
|
403 |
-
* @param $query_parameters
|
404 |
-
* @param $data
|
405 |
-
*
|
406 |
-
* @return mixed
|
407 |
-
*/
|
408 |
-
public function delete($url, $query_parameters = array(), $data = array()) {
|
409 |
-
if (is_array($url)) {
|
410 |
-
$data = $query_parameters;
|
411 |
-
$query_parameters = $url;
|
412 |
-
$url = (string)$this->url;
|
413 |
-
}
|
414 |
-
|
415 |
-
$this->setUrl($url, $query_parameters);
|
416 |
-
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'DELETE');
|
417 |
-
$this->setOpt(CURLOPT_POSTFIELDS, $this->buildPostData($data));
|
418 |
-
|
419 |
-
return $this->exec();
|
420 |
-
}
|
421 |
-
|
422 |
-
/**
|
423 |
-
* Download
|
424 |
-
*
|
425 |
-
* @access public
|
426 |
-
*
|
427 |
-
* @param $url
|
428 |
-
* @param $mixed_filename
|
429 |
-
*
|
430 |
-
* @return boolean
|
431 |
-
*/
|
432 |
-
public function download($url, $mixed_filename) {
|
433 |
-
if (is_callable($mixed_filename)) {
|
434 |
-
$this->downloadCompleteFunction = $mixed_filename;
|
435 |
-
$this->fileHandle = tmpfile();
|
436 |
-
} else {
|
437 |
-
$filename = $mixed_filename;
|
438 |
-
|
439 |
-
// Use a temporary file when downloading. Not using a temporary file can cause an error when an existing
|
440 |
-
// file has already fully completed downloading and a new download is started with the same destination save
|
441 |
-
// path. The download request will include header "Range: bytes=$filesize-" which is syntactically valid,
|
442 |
-
// but unsatisfiable.
|
443 |
-
$download_filename = $filename . '.pccdownload';
|
444 |
-
|
445 |
-
$mode = 'wb';
|
446 |
-
// Attempt to resume download only when a temporary download file exists and is not empty.
|
447 |
-
if (file_exists($download_filename) && $filesize = filesize($download_filename)) {
|
448 |
-
$mode = 'ab';
|
449 |
-
$first_byte_position = $filesize;
|
450 |
-
$range = $first_byte_position . '-';
|
451 |
-
$this->setOpt(CURLOPT_RANGE, $range);
|
452 |
-
}
|
453 |
-
$this->fileHandle = fopen($download_filename, $mode);
|
454 |
-
|
455 |
-
// Move the downloaded temporary file to the destination save path.
|
456 |
-
$this->downloadCompleteFunction = function ($instance, $fh) use ($download_filename, $filename) {
|
457 |
-
// Close the open file handle before renaming the file.
|
458 |
-
if (is_resource($fh)) {
|
459 |
-
fclose($fh);
|
460 |
-
}
|
461 |
-
|
462 |
-
rename($download_filename, $filename);
|
463 |
-
};
|
464 |
-
}
|
465 |
-
|
466 |
-
$this->setOpt(CURLOPT_FILE, $this->fileHandle);
|
467 |
-
$this->get($url);
|
468 |
-
|
469 |
-
return !$this->error;
|
470 |
-
}
|
471 |
-
|
472 |
-
/**
|
473 |
-
* Error
|
474 |
-
*
|
475 |
-
* @access public
|
476 |
-
*
|
477 |
-
* @param $callback
|
478 |
-
*/
|
479 |
-
public function error($callback) {
|
480 |
-
$this->errorFunction = $callback;
|
481 |
-
}
|
482 |
-
|
483 |
-
/**
|
484 |
-
* Exec
|
485 |
-
*
|
486 |
-
* @access public
|
487 |
-
*
|
488 |
-
* @param $ch
|
489 |
-
*
|
490 |
-
* @return mixed Returns the value provided by parseResponse.
|
491 |
-
*/
|
492 |
-
public function exec($ch = null) {
|
493 |
-
$this->attempts += 1;
|
494 |
-
|
495 |
-
if ($ch === null) {
|
496 |
-
$this->responseCookies = array();
|
497 |
-
$this->call($this->beforeSendFunction);
|
498 |
-
$this->rawResponse = curl_exec($this->curl);
|
499 |
-
$this->curlErrorCode = curl_errno($this->curl);
|
500 |
-
$this->curlErrorMessage = curl_error($this->curl);
|
501 |
-
} else {
|
502 |
-
$this->rawResponse = curl_multi_getcontent($ch);
|
503 |
-
$this->curlErrorMessage = curl_error($ch);
|
504 |
-
}
|
505 |
-
$this->curlError = !($this->curlErrorCode === 0);
|
506 |
-
|
507 |
-
// Transfer the header callback data and release the temporary store to avoid memory leak.
|
508 |
-
$this->rawResponseHeaders = $this->headerCallbackData->rawResponseHeaders;
|
509 |
-
$this->responseCookies = $this->headerCallbackData->responseCookies;
|
510 |
-
$this->headerCallbackData->rawResponseHeaders = null;
|
511 |
-
$this->headerCallbackData->responseCookies = null;
|
512 |
-
|
513 |
-
// Include additional error code information in error message when possible.
|
514 |
-
if ($this->curlError && function_exists('curl_strerror')) {
|
515 |
-
$this->curlErrorMessage = curl_strerror($this->curlErrorCode) . (empty($this->curlErrorMessage) ? '' : ': ' . $this->curlErrorMessage);
|
516 |
-
}
|
517 |
-
|
518 |
-
$this->httpStatusCode = $this->getInfo(CURLINFO_HTTP_CODE);
|
519 |
-
$this->httpError = in_array(floor($this->httpStatusCode / 100), array(
|
520 |
-
4,
|
521 |
-
5
|
522 |
-
));
|
523 |
-
$this->error = $this->curlError || $this->httpError;
|
524 |
-
$this->errorCode = $this->error ? ($this->curlError ? $this->curlErrorCode : $this->httpStatusCode) : 0;
|
525 |
-
|
526 |
-
// NOTE: CURLINFO_HEADER_OUT set to true is required for requestHeaders
|
527 |
-
// to not be empty (e.g. $curl->setOpt(CURLINFO_HEADER_OUT, true);).
|
528 |
-
if ($this->getOpt(CURLINFO_HEADER_OUT) === true) {
|
529 |
-
$this->requestHeaders = $this->parseRequestHeaders($this->getInfo(CURLINFO_HEADER_OUT));
|
530 |
-
}
|
531 |
-
$this->responseHeaders = $this->parseResponseHeaders($this->rawResponseHeaders);
|
532 |
-
$this->response = $this->parseResponse($this->responseHeaders, $this->rawResponse);
|
533 |
-
|
534 |
-
$this->httpErrorMessage = '';
|
535 |
-
if ($this->error) {
|
536 |
-
if (isset($this->responseHeaders['Status-Line'])) {
|
537 |
-
$this->httpErrorMessage = $this->responseHeaders['Status-Line'];
|
538 |
-
}
|
539 |
-
}
|
540 |
-
$this->errorMessage = $this->curlError ? $this->curlErrorMessage : $this->httpErrorMessage;
|
541 |
-
|
542 |
-
// Reset select deferred properties so that they may be recalculated.
|
543 |
-
unset($this->effectiveUrl);
|
544 |
-
unset($this->totalTime);
|
545 |
-
|
546 |
-
// Reset content-length possibly set from a PUT or SEARCH request.
|
547 |
-
$this->unsetHeader('Content-Length');
|
548 |
-
|
549 |
-
// Reset nobody setting possibly set from a HEAD request.
|
550 |
-
$this->setOpt(CURLOPT_NOBODY, false);
|
551 |
-
|
552 |
-
// Allow multicurl to attempt retry as needed.
|
553 |
-
if ($this->isChildOfMultiCurl) {
|
554 |
-
return;
|
555 |
-
}
|
556 |
-
|
557 |
-
if ($this->attemptRetry()) {
|
558 |
-
return $this->exec($ch);
|
559 |
-
}
|
560 |
-
|
561 |
-
$this->execDone();
|
562 |
-
|
563 |
-
return $this->response;
|
564 |
-
}
|
565 |
-
|
566 |
-
public function execDone() {
|
567 |
-
if ($this->error) {
|
568 |
-
$this->call($this->errorFunction);
|
569 |
-
} else {
|
570 |
-
$this->call($this->successFunction);
|
571 |
-
}
|
572 |
-
|
573 |
-
$this->call($this->completeFunction);
|
574 |
-
|
575 |
-
// Close open file handles and reset the curl instance.
|
576 |
-
if (!($this->fileHandle === null)) {
|
577 |
-
$this->downloadComplete($this->fileHandle);
|
578 |
-
}
|
579 |
-
}
|
580 |
-
|
581 |
-
/**
|
582 |
-
* Get
|
583 |
-
*
|
584 |
-
* @access public
|
585 |
-
*
|
586 |
-
* @param $url
|
587 |
-
* @param $data
|
588 |
-
*
|
589 |
-
* @return mixed Returns the value provided by exec.
|
590 |
-
*/
|
591 |
-
public function get($url, $data = array()) {
|
592 |
-
if (is_array($url)) {
|
593 |
-
$data = $url;
|
594 |
-
$url = (string)$this->url;
|
595 |
-
}
|
596 |
-
$this->setUrl($url, $data);
|
597 |
-
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'GET');
|
598 |
-
$this->setOpt(CURLOPT_HTTPGET, true);
|
599 |
-
$this->setOpt(CURLOPT_USERAGENT, 'WordPress');
|
600 |
-
|
601 |
-
return $this->exec();
|
602 |
-
}
|
603 |
-
|
604 |
-
/**
|
605 |
-
* Get Info
|
606 |
-
*
|
607 |
-
* @access public
|
608 |
-
*
|
609 |
-
* @param $opt
|
610 |
-
*
|
611 |
-
* @return mixed
|
612 |
-
*/
|
613 |
-
public function getInfo($opt = null) {
|
614 |
-
$args = array();
|
615 |
-
$args[] = $this->curl;
|
616 |
-
|
617 |
-
if (func_num_args()) {
|
618 |
-
$args[] = $opt;
|
619 |
-
}
|
620 |
-
|
621 |
-
return call_user_func_array('curl_getinfo', $args);
|
622 |
-
}
|
623 |
-
|
624 |
-
/**
|
625 |
-
* Get Opt
|
626 |
-
*
|
627 |
-
* @access public
|
628 |
-
*
|
629 |
-
* @param $option
|
630 |
-
*
|
631 |
-
* @return mixed
|
632 |
-
*/
|
633 |
-
public function getOpt($option) {
|
634 |
-
return isset($this->options[$option]) ? $this->options[$option] : null;
|
635 |
-
}
|
636 |
-
|
637 |
-
/**
|
638 |
-
* Head
|
639 |
-
*
|
640 |
-
* @access public
|
641 |
-
*
|
642 |
-
* @param $url
|
643 |
-
* @param $data
|
644 |
-
*
|
645 |
-
* @return mixed
|
646 |
-
*/
|
647 |
-
public function head($url, $data = array()) {
|
648 |
-
if (is_array($url)) {
|
649 |
-
$data = $url;
|
650 |
-
$url = (string)$this->url;
|
651 |
-
}
|
652 |
-
$this->setUrl($url, $data);
|
653 |
-
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'HEAD');
|
654 |
-
$this->setOpt(CURLOPT_NOBODY, true);
|
655 |
-
|
656 |
-
return $this->exec();
|
657 |
-
}
|
658 |
-
|
659 |
-
/**
|
660 |
-
* Options
|
661 |
-
*
|
662 |
-
* @access public
|
663 |
-
*
|
664 |
-
* @param $url
|
665 |
-
* @param $data
|
666 |
-
*
|
667 |
-
* @return mixed
|
668 |
-
*/
|
669 |
-
public function options($url, $data = array()) {
|
670 |
-
if (is_array($url)) {
|
671 |
-
$data = $url;
|
672 |
-
$url = (string)$this->url;
|
673 |
-
}
|
674 |
-
$this->setUrl($url, $data);
|
675 |
-
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'OPTIONS');
|
676 |
-
|
677 |
-
return $this->exec();
|
678 |
-
}
|
679 |
-
|
680 |
-
/**
|
681 |
-
* Patch
|
682 |
-
*
|
683 |
-
* @access public
|
684 |
-
*
|
685 |
-
* @param $url
|
686 |
-
* @param $data
|
687 |
-
*
|
688 |
-
* @return mixed
|
689 |
-
*/
|
690 |
-
public function patch($url, $data = array()) {
|
691 |
-
if (is_array($url)) {
|
692 |
-
$data = $url;
|
693 |
-
$url = (string)$this->url;
|
694 |
-
}
|
695 |
-
|
696 |
-
if (is_array($data) && empty($data)) {
|
697 |
-
$this->removeHeader('Content-Length');
|
698 |
-
}
|
699 |
-
|
700 |
-
$this->setUrl($url);
|
701 |
-
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'PATCH');
|
702 |
-
$this->setOpt(CURLOPT_POSTFIELDS, $this->buildPostData($data));
|
703 |
-
|
704 |
-
return $this->exec();
|
705 |
-
}
|
706 |
-
|
707 |
-
/**
|
708 |
-
* Post
|
709 |
-
*
|
710 |
-
* @access public
|
711 |
-
*
|
712 |
-
* @param $url
|
713 |
-
* @param $data
|
714 |
-
* @param $follow_303_with_post
|
715 |
-
* If true, will cause 303 redirections to be followed using a POST request (default: false).
|
716 |
-
* Notes:
|
717 |
-
* - Redirections are only followed if the CURLOPT_FOLLOWLOCATION option is set to true.
|
718 |
-
* - According to the HTTP specs (see [1]), a 303 redirection should be followed using
|
719 |
-
* the GET method. 301 and 302 must not.
|
720 |
-
* - In order to force a 303 redirection to be performed using the same method, the
|
721 |
-
* underlying cURL object must be set in a special state (the CURLOPT_CURSTOMREQUEST
|
722 |
-
* option must be set to the method to use after the redirection). Due to a limitation
|
723 |
-
* of the cURL extension of PHP < 5.5.11 ([2], [3]) and of HHVM, it is not possible
|
724 |
-
* to reset this option. Using these PHP engines, it is therefore impossible to
|
725 |
-
* restore this behavior on an existing php-curl-class Curl object.
|
726 |
-
*
|
727 |
-
* @return mixed
|
728 |
-
*
|
729 |
-
* [1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2
|
730 |
-
* [2] https://github.com/php/php-src/pull/531
|
731 |
-
* [3] http://php.net/ChangeLog-5.php#5.5.11
|
732 |
-
*/
|
733 |
-
public function post($url, $data = array(), $follow_303_with_post = false) {
|
734 |
-
if (is_array($url)) {
|
735 |
-
$follow_303_with_post = (bool)$data;
|
736 |
-
$data = $url;
|
737 |
-
$url = (string)$this->url;
|
738 |
-
}
|
739 |
-
|
740 |
-
$this->setUrl($url);
|
741 |
-
|
742 |
-
if ($follow_303_with_post) {
|
743 |
-
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'POST');
|
744 |
-
} else {
|
745 |
-
if (isset($this->options[CURLOPT_CUSTOMREQUEST])) {
|
746 |
-
if ((version_compare(PHP_VERSION, '5.5.11') < 0) || defined('HHVM_VERSION')) {
|
747 |
-
trigger_error('Due to technical limitations of PHP <= 5.5.11 and HHVM, it is not possible to ' . 'perform a post-redirect-get request using a php-curl-class Curl object that ' . 'has already been used to perform other types of requests. Either use a new ' . 'php-curl-class Curl object or upgrade your PHP engine.', E_USER_ERROR);
|
748 |
-
} else {
|
749 |
-
$this->setOpt(CURLOPT_CUSTOMREQUEST, null);
|
750 |
-
}
|
751 |
-
}
|
752 |
-
}
|
753 |
-
|
754 |
-
$this->setOpt(CURLOPT_POST, true);
|
755 |
-
$this->setOpt(CURLOPT_POSTFIELDS, $this->buildPostData($data));
|
756 |
-
$this->setOpt(CURLOPT_USERAGENT, 'WordPress');
|
757 |
-
|
758 |
-
return $this->exec();
|
759 |
-
}
|
760 |
-
|
761 |
-
/**
|
762 |
-
* Put
|
763 |
-
*
|
764 |
-
* @access public
|
765 |
-
*
|
766 |
-
* @param $url
|
767 |
-
* @param $data
|
768 |
-
*
|
769 |
-
* @return mixed
|
770 |
-
*/
|
771 |
-
public function put($url, $data = array()) {
|
772 |
-
if (is_array($url)) {
|
773 |
-
$data = $url;
|
774 |
-
$url = (string)$this->url;
|
775 |
-
}
|
776 |
-
$this->setUrl($url);
|
777 |
-
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'PUT');
|
778 |
-
$put_data = $this->buildPostData($data);
|
779 |
-
if (empty($this->options[CURLOPT_INFILE]) && empty($this->options[CURLOPT_INFILESIZE])) {
|
780 |
-
if (is_string($put_data)) {
|
781 |
-
$this->setHeader('Content-Length', strlen($put_data));
|
782 |
-
}
|
783 |
-
}
|
784 |
-
if (!empty($put_data)) {
|
785 |
-
$this->setOpt(CURLOPT_POSTFIELDS, $put_data);
|
786 |
-
}
|
787 |
-
|
788 |
-
return $this->exec();
|
789 |
-
}
|
790 |
-
|
791 |
-
/**
|
792 |
-
* Search
|
793 |
-
*
|
794 |
-
* @access public
|
795 |
-
*
|
796 |
-
* @param $url
|
797 |
-
* @param $data
|
798 |
-
*
|
799 |
-
* @return mixed
|
800 |
-
*/
|
801 |
-
public function search($url, $data = array()) {
|
802 |
-
if (is_array($url)) {
|
803 |
-
$data = $url;
|
804 |
-
$url = (string)$this->url;
|
805 |
-
}
|
806 |
-
$this->setUrl($url);
|
807 |
-
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'SEARCH');
|
808 |
-
$put_data = $this->buildPostData($data);
|
809 |
-
if (empty($this->options[CURLOPT_INFILE]) && empty($this->options[CURLOPT_INFILESIZE])) {
|
810 |
-
if (is_string($put_data)) {
|
811 |
-
$this->setHeader('Content-Length', strlen($put_data));
|
812 |
-
}
|
813 |
-
}
|
814 |
-
if (!empty($put_data)) {
|
815 |
-
$this->setOpt(CURLOPT_POSTFIELDS, $put_data);
|
816 |
-
}
|
817 |
-
|
818 |
-
return $this->exec();
|
819 |
-
}
|
820 |
-
|
821 |
-
/**
|
822 |
-
* Set Basic Authentication
|
823 |
-
*
|
824 |
-
* @access public
|
825 |
-
*
|
826 |
-
* @param $username
|
827 |
-
* @param $password
|
828 |
-
*/
|
829 |
-
public function setBasicAuthentication($username, $password = '') {
|
830 |
-
$this->setOpt(CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
|
831 |
-
$this->setOpt(CURLOPT_USERPWD, $username . ':' . $password);
|
832 |
-
}
|
833 |
-
|
834 |
-
/**
|
835 |
-
* Set Digest Authentication
|
836 |
-
*
|
837 |
-
* @access public
|
838 |
-
*
|
839 |
-
* @param $username
|
840 |
-
* @param $password
|
841 |
-
*/
|
842 |
-
public function setDigestAuthentication($username, $password = '') {
|
843 |
-
$this->setOpt(CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
|
844 |
-
$this->setOpt(CURLOPT_USERPWD, $username . ':' . $password);
|
845 |
-
}
|
846 |
-
|
847 |
-
/**
|
848 |
-
* Set Cookie
|
849 |
-
*
|
850 |
-
* @access public
|
851 |
-
*
|
852 |
-
* @param $key
|
853 |
-
* @param $value
|
854 |
-
*/
|
855 |
-
public function setCookie($key, $value) {
|
856 |
-
$this->setEncodedCookie($key, $value);
|
857 |
-
$this->buildCookies();
|
858 |
-
}
|
859 |
-
|
860 |
-
/**
|
861 |
-
* Set Cookies
|
862 |
-
*
|
863 |
-
* @access public
|
864 |
-
*
|
865 |
-
* @param $cookies
|
866 |
-
*/
|
867 |
-
public function setCookies($cookies) {
|
868 |
-
foreach ($cookies as $key => $value) {
|
869 |
-
$this->setEncodedCookie($key, $value);
|
870 |
-
}
|
871 |
-
$this->buildCookies();
|
872 |
-
}
|
873 |
-
|
874 |
-
/**
|
875 |
-
* Get Cookie
|
876 |
-
*
|
877 |
-
* @access public
|
878 |
-
*
|
879 |
-
* @param $key
|
880 |
-
*
|
881 |
-
* @return mixed
|
882 |
-
*/
|
883 |
-
public function getCookie($key) {
|
884 |
-
return $this->getResponseCookie($key);
|
885 |
-
}
|
886 |
-
|
887 |
-
/**
|
888 |
-
* Get Response Cookie
|
889 |
-
*
|
890 |
-
* @access public
|
891 |
-
*
|
892 |
-
* @param $key
|
893 |
-
*
|
894 |
-
* @return mixed
|
895 |
-
*/
|
896 |
-
public function getResponseCookie($key) {
|
897 |
-
return isset($this->responseCookies[$key]) ? $this->responseCookies[$key] : null;
|
898 |
-
}
|
899 |
-
|
900 |
-
/**
|
901 |
-
* Get Response Cookies
|
902 |
-
*
|
903 |
-
* @access public
|
904 |
-
*
|
905 |
-
* @return array
|
906 |
-
*/
|
907 |
-
public function getResponseCookies() {
|
908 |
-
return $this->responseCookies;
|
909 |
-
}
|
910 |
-
|
911 |
-
/**
|
912 |
-
* Set Max Filesize
|
913 |
-
*
|
914 |
-
* @access public
|
915 |
-
*
|
916 |
-
* @param $bytes
|
917 |
-
*/
|
918 |
-
public function setMaxFilesize($bytes) {
|
919 |
-
// Make compatible with PHP version both before and after 5.5.0. PHP 5.5.0 added the cURL resource as the first
|
920 |
-
// argument to the CURLOPT_PROGRESSFUNCTION callback.
|
921 |
-
$gte_v550 = version_compare(PHP_VERSION, '5.5.0') >= 0;
|
922 |
-
if ($gte_v550) {
|
923 |
-
$callback = function ($resource, $download_size, $downloaded, $upload_size, $uploaded) use ($bytes) {
|
924 |
-
// Abort the transfer when $downloaded bytes exceeds maximum $bytes by returning a non-zero value.
|
925 |
-
return $downloaded > $bytes ? 1 : 0;
|
926 |
-
};
|
927 |
-
} else {
|
928 |
-
$callback = function ($download_size, $downloaded, $upload_size, $uploaded) use ($bytes) {
|
929 |
-
return $downloaded > $bytes ? 1 : 0;
|
930 |
-
};
|
931 |
-
}
|
932 |
-
|
933 |
-
$this->progress($callback);
|
934 |
-
}
|
935 |
-
|
936 |
-
/**
|
937 |
-
* Set Port
|
938 |
-
*
|
939 |
-
* @access public
|
940 |
-
*
|
941 |
-
* @param $port
|
942 |
-
*/
|
943 |
-
public function setPort($port) {
|
944 |
-
$this->setOpt(CURLOPT_PORT, intval($port));
|
945 |
-
}
|
946 |
-
|
947 |
-
/**
|
948 |
-
* Set Connect Timeout
|
949 |
-
*
|
950 |
-
* @access public
|
951 |
-
*
|
952 |
-
* @param $seconds
|
953 |
-
*/
|
954 |
-
public function setConnectTimeout($seconds) {
|
955 |
-
$this->setOpt(CURLOPT_CONNECTTIMEOUT, $seconds);
|
956 |
-
}
|
957 |
-
|
958 |
-
/**
|
959 |
-
* Set Cookie String
|
960 |
-
*
|
961 |
-
* @access public
|
962 |
-
*
|
963 |
-
* @param $string
|
964 |
-
*
|
965 |
-
* @return bool
|
966 |
-
*/
|
967 |
-
public function setCookieString($string) {
|
968 |
-
return $this->setOpt(CURLOPT_COOKIE, $string);
|
969 |
-
}
|
970 |
-
|
971 |
-
/**
|
972 |
-
* Set Cookie File
|
973 |
-
*
|
974 |
-
* @access public
|
975 |
-
*
|
976 |
-
* @param $cookie_file
|
977 |
-
*
|
978 |
-
* @return boolean
|
979 |
-
*/
|
980 |
-
public function setCookieFile($cookie_file) {
|
981 |
-
return $this->setOpt(CURLOPT_COOKIEFILE, $cookie_file);
|
982 |
-
}
|
983 |
-
|
984 |
-
/**
|
985 |
-
* Set Cookie Jar
|
986 |
-
*
|
987 |
-
* @access public
|
988 |
-
*
|
989 |
-
* @param $cookie_jar
|
990 |
-
*
|
991 |
-
* @return boolean
|
992 |
-
*/
|
993 |
-
public function setCookieJar($cookie_jar) {
|
994 |
-
return $this->setOpt(CURLOPT_COOKIEJAR, $cookie_jar);
|
995 |
-
}
|
996 |
-
|
997 |
-
/**
|
998 |
-
* Set Default JSON Decoder
|
999 |
-
*
|
1000 |
-
* @access public
|
1001 |
-
*
|
1002 |
-
* @param $assoc
|
1003 |
-
* @param $depth
|
1004 |
-
* @param $options
|
1005 |
-
*/
|
1006 |
-
public function setDefaultJsonDecoder() {
|
1007 |
-
$this->jsonDecoder = 'NSLDecoder::decodeJson';
|
1008 |
-
$this->jsonDecoderArgs = func_get_args();
|
1009 |
-
}
|
1010 |
-
|
1011 |
-
/**
|
1012 |
-
* Set Default XML Decoder
|
1013 |
-
*
|
1014 |
-
* @access public
|
1015 |
-
*/
|
1016 |
-
public function setDefaultXmlDecoder() {
|
1017 |
-
$this->xmlDecoder = 'NSLDecoder::decodeXml';
|
1018 |
-
}
|
1019 |
-
|
1020 |
-
/**
|
1021 |
-
* Set Default Decoder
|
1022 |
-
*
|
1023 |
-
* @access public
|
1024 |
-
*
|
1025 |
-
* @param $mixed boolean|callable|string
|
1026 |
-
*/
|
1027 |
-
public function setDefaultDecoder($mixed = 'json') {
|
1028 |
-
if ($mixed === false) {
|
1029 |
-
$this->defaultDecoder = false;
|
1030 |
-
} elseif (is_callable($mixed)) {
|
1031 |
-
$this->defaultDecoder = $mixed;
|
1032 |
-
} else {
|
1033 |
-
if ($mixed === 'json') {
|
1034 |
-
$this->defaultDecoder = $this->jsonDecoder;
|
1035 |
-
} elseif ($mixed === 'xml') {
|
1036 |
-
$this->defaultDecoder = $this->xmlDecoder;
|
1037 |
-
}
|
1038 |
-
}
|
1039 |
-
}
|
1040 |
-
|
1041 |
-
/**
|
1042 |
-
* Set Default Timeout
|
1043 |
-
*
|
1044 |
-
* @access public
|
1045 |
-
*/
|
1046 |
-
public function setDefaultTimeout() {
|
1047 |
-
$this->setTimeout(self::DEFAULT_TIMEOUT);
|
1048 |
-
}
|
1049 |
-
|
1050 |
-
/**
|
1051 |
-
* Set Default User Agent
|
1052 |
-
*
|
1053 |
-
* @access public
|
1054 |
-
*/
|
1055 |
-
public function setDefaultUserAgent() {
|
1056 |
-
$user_agent = 'PHP-Curl-Class/' . self::VERSION . ' (+https://github.com/php-curl-class/php-curl-class)';
|
1057 |
-
$user_agent .= ' PHP/' . PHP_VERSION;
|
1058 |
-
$curl_version = curl_version();
|
1059 |
-
$user_agent .= ' curl/' . $curl_version['version'];
|
1060 |
-
$this->setUserAgent($user_agent);
|
1061 |
-
}
|
1062 |
-
|
1063 |
-
/**
|
1064 |
-
* Set Header
|
1065 |
-
*
|
1066 |
-
* Add extra header to include in the request.
|
1067 |
-
*
|
1068 |
-
* @access public
|
1069 |
-
*
|
1070 |
-
* @param $key
|
1071 |
-
* @param $value
|
1072 |
-
*/
|
1073 |
-
public function setHeader($key, $value) {
|
1074 |
-
$this->headers[$key] = $value;
|
1075 |
-
$headers = array();
|
1076 |
-
foreach ($this->headers as $key => $value) {
|
1077 |
-
$headers[] = $key . ': ' . $value;
|
1078 |
-
}
|
1079 |
-
$this->setOpt(CURLOPT_HTTPHEADER, $headers);
|
1080 |
-
}
|
1081 |
-
|
1082 |
-
/**
|
1083 |
-
* Set Headers
|
1084 |
-
*
|
1085 |
-
* Add extra headers to include in the request.
|
1086 |
-
*
|
1087 |
-
* @access public
|
1088 |
-
*
|
1089 |
-
* @param $headers
|
1090 |
-
*/
|
1091 |
-
public function setHeaders($headers) {
|
1092 |
-
foreach ($headers as $key => $value) {
|
1093 |
-
$this->headers[$key] = $value;
|
1094 |
-
}
|
1095 |
-
|
1096 |
-
$headers = array();
|
1097 |
-
foreach ($this->headers as $key => $value) {
|
1098 |
-
$headers[] = $key . ': ' . $value;
|
1099 |
-
}
|
1100 |
-
$this->setOpt(CURLOPT_HTTPHEADER, $headers);
|
1101 |
-
}
|
1102 |
-
|
1103 |
-
/**
|
1104 |
-
* Set JSON Decoder
|
1105 |
-
*
|
1106 |
-
* @access public
|
1107 |
-
*
|
1108 |
-
* @param $mixed boolean|callable
|
1109 |
-
*/
|
1110 |
-
public function setJsonDecoder($mixed) {
|
1111 |
-
if ($mixed === false) {
|
1112 |
-
$this->jsonDecoder = false;
|
1113 |
-
$this->jsonDecoderArgs = array();
|
1114 |
-
} elseif (is_callable($mixed)) {
|
1115 |
-
$this->jsonDecoder = $mixed;
|
1116 |
-
$this->jsonDecoderArgs = array();
|
1117 |
-
}
|
1118 |
-
}
|
1119 |
-
|
1120 |
-
/**
|
1121 |
-
* Set XML Decoder
|
1122 |
-
*
|
1123 |
-
* @access public
|
1124 |
-
*
|
1125 |
-
* @param $mixed boolean|callable
|
1126 |
-
*/
|
1127 |
-
public function setXmlDecoder($mixed) {
|
1128 |
-
if ($mixed === false) {
|
1129 |
-
$this->xmlDecoder = false;
|
1130 |
-
} elseif (is_callable($mixed)) {
|
1131 |
-
$this->xmlDecoder = $mixed;
|
1132 |
-
}
|
1133 |
-
}
|
1134 |
-
|
1135 |
-
/**
|
1136 |
-
* Set Opt
|
1137 |
-
*
|
1138 |
-
* @access public
|
1139 |
-
*
|
1140 |
-
* @param $option
|
1141 |
-
* @param $value
|
1142 |
-
*
|
1143 |
-
* @return boolean
|
1144 |
-
*/
|
1145 |
-
public function setOpt($option, $value) {
|
1146 |
-
$required_options = array(
|
1147 |
-
CURLOPT_RETURNTRANSFER => 'CURLOPT_RETURNTRANSFER',
|
1148 |
-
);
|
1149 |
-
|
1150 |
-
if (in_array($option, array_keys($required_options), true) && !($value === true)) {
|
1151 |
-
trigger_error($required_options[$option] . ' is a required option', E_USER_WARNING);
|
1152 |
-
}
|
1153 |
-
|
1154 |
-
$success = curl_setopt($this->curl, $option, $value);
|
1155 |
-
if ($success) {
|
1156 |
-
$this->options[$option] = $value;
|
1157 |
-
}
|
1158 |
-
|
1159 |
-
return $success;
|
1160 |
-
}
|
1161 |
-
|
1162 |
-
/**
|
1163 |
-
* Set Opts
|
1164 |
-
*
|
1165 |
-
* @access public
|
1166 |
-
*
|
1167 |
-
* @param $options
|
1168 |
-
*
|
1169 |
-
* @return boolean
|
1170 |
-
* Returns true if all options were successfully set. If an option could not be successfully set, false is
|
1171 |
-
* immediately returned, ignoring any future options in the options array. Similar to curl_setopt_array().
|
1172 |
-
*/
|
1173 |
-
public function setOpts($options) {
|
1174 |
-
foreach ($options as $option => $value) {
|
1175 |
-
if (!$this->setOpt($option, $value)) {
|
1176 |
-
return false;
|
1177 |
-
}
|
1178 |
-
}
|
1179 |
-
|
1180 |
-
return true;
|
1181 |
-
}
|
1182 |
-
|
1183 |
-
/**
|
1184 |
-
* Set Referer
|
1185 |
-
*
|
1186 |
-
* @access public
|
1187 |
-
*
|
1188 |
-
* @param $referer
|
1189 |
-
*/
|
1190 |
-
public function setReferer($referer) {
|
1191 |
-
$this->setReferrer($referer);
|
1192 |
-
}
|
1193 |
-
|
1194 |
-
/**
|
1195 |
-
* Set Referrer
|
1196 |
-
*
|
1197 |
-
* @access public
|
1198 |
-
*
|
1199 |
-
* @param $referrer
|
1200 |
-
*/
|
1201 |
-
public function setReferrer($referrer) {
|
1202 |
-
$this->setOpt(CURLOPT_REFERER, $referrer);
|
1203 |
-
}
|
1204 |
-
|
1205 |
-
/**
|
1206 |
-
* Set Retry
|
1207 |
-
*
|
1208 |
-
* Number of retries to attempt or decider callable. Maximum number of
|
1209 |
-
* attempts is $maximum_number_of_retries + 1.
|
1210 |
-
*
|
1211 |
-
* @access public
|
1212 |
-
*
|
1213 |
-
* @param $mixed
|
1214 |
-
*/
|
1215 |
-
public function setRetry($mixed) {
|
1216 |
-
if (is_callable($mixed)) {
|
1217 |
-
$this->retryDecider = $mixed;
|
1218 |
-
} elseif (is_int($mixed)) {
|
1219 |
-
$maximum_number_of_retries = $mixed;
|
1220 |
-
$this->remainingRetries = $maximum_number_of_retries;
|
1221 |
-
}
|
1222 |
-
}
|
1223 |
-
|
1224 |
-
/**
|
1225 |
-
* Set Timeout
|
1226 |
-
*
|
1227 |
-
* @access public
|
1228 |
-
*
|
1229 |
-
* @param $seconds
|
1230 |
-
*/
|
1231 |
-
public function setTimeout($seconds) {
|
1232 |
-
$this->setOpt(CURLOPT_TIMEOUT, $seconds);
|
1233 |
-
}
|
1234 |
-
|
1235 |
-
/**
|
1236 |
-
* Set Url
|
1237 |
-
*
|
1238 |
-
* @access public
|
1239 |
-
*
|
1240 |
-
* @param $url
|
1241 |
-
* @param $mixed_data
|
1242 |
-
*/
|
1243 |
-
public function setUrl($url, $mixed_data = '') {
|
1244 |
-
$built_url = $this->buildUrl($url, $mixed_data);
|
1245 |
-
|
1246 |
-
if ($this->url === null) {
|
1247 |
-
$this->url = (string)new NSLUrl($built_url);
|
1248 |
-
} else {
|
1249 |
-
$this->url = (string)new NSLUrl($this->url, $built_url);
|
1250 |
-
}
|
1251 |
-
|
1252 |
-
$this->setOpt(CURLOPT_URL, $this->url);
|
1253 |
-
}
|
1254 |
-
|
1255 |
-
/**
|
1256 |
-
* Set User Agent
|
1257 |
-
*
|
1258 |
-
* @access public
|
1259 |
-
*
|
1260 |
-
* @param $user_agent
|
1261 |
-
*/
|
1262 |
-
public function setUserAgent($user_agent) {
|
1263 |
-
$this->setOpt(CURLOPT_USERAGENT, $user_agent);
|
1264 |
-
}
|
1265 |
-
|
1266 |
-
/**
|
1267 |
-
* Attempt Retry
|
1268 |
-
*
|
1269 |
-
* @access public
|
1270 |
-
*/
|
1271 |
-
public function attemptRetry() {
|
1272 |
-
$attempt_retry = false;
|
1273 |
-
if ($this->error) {
|
1274 |
-
if ($this->retryDecider === null) {
|
1275 |
-
$attempt_retry = $this->remainingRetries >= 1;
|
1276 |
-
} else {
|
1277 |
-
$attempt_retry = call_user_func($this->retryDecider, $this);
|
1278 |
-
}
|
1279 |
-
if ($attempt_retry) {
|
1280 |
-
$this->retries += 1;
|
1281 |
-
if ($this->remainingRetries) {
|
1282 |
-
$this->remainingRetries -= 1;
|
1283 |
-
}
|
1284 |
-
}
|
1285 |
-
}
|
1286 |
-
|
1287 |
-
return $attempt_retry;
|
1288 |
-
}
|
1289 |
-
|
1290 |
-
/**
|
1291 |
-
* Success
|
1292 |
-
*
|
1293 |
-
* @access public
|
1294 |
-
*
|
1295 |
-
* @param $callback
|
1296 |
-
*/
|
1297 |
-
public function success($callback) {
|
1298 |
-
$this->successFunction = $callback;
|
1299 |
-
}
|
1300 |
-
|
1301 |
-
/**
|
1302 |
-
* Unset Header
|
1303 |
-
*
|
1304 |
-
* Remove extra header previously set using NSLCurl::setHeader().
|
1305 |
-
*
|
1306 |
-
* @access public
|
1307 |
-
*
|
1308 |
-
* @param $key
|
1309 |
-
*/
|
1310 |
-
public function unsetHeader($key) {
|
1311 |
-
unset($this->headers[$key]);
|
1312 |
-
$headers = array();
|
1313 |
-
foreach ($this->headers as $key => $value) {
|
1314 |
-
$headers[] = $key . ': ' . $value;
|
1315 |
-
}
|
1316 |
-
$this->setOpt(CURLOPT_HTTPHEADER, $headers);
|
1317 |
-
}
|
1318 |
-
|
1319 |
-
/**
|
1320 |
-
* Remove Header
|
1321 |
-
*
|
1322 |
-
* Remove an internal header from the request.
|
1323 |
-
* Using `curl -H "Host:" ...' is equivalent to $curl->removeHeader('Host');.
|
1324 |
-
*
|
1325 |
-
* @access public
|
1326 |
-
*
|
1327 |
-
* @param $key
|
1328 |
-
*/
|
1329 |
-
public function removeHeader($key) {
|
1330 |
-
$this->setHeader($key, '');
|
1331 |
-
}
|
1332 |
-
|
1333 |
-
/**
|
1334 |
-
* Verbose
|
1335 |
-
*
|
1336 |
-
* @access public
|
1337 |
-
*
|
1338 |
-
* @param bool $on
|
1339 |
-
* @param resource $output
|
1340 |
-
*/
|
1341 |
-
public function verbose($on = true, $output = STDERR) {
|
1342 |
-
// Turn off CURLINFO_HEADER_OUT for verbose to work. This has the side
|
1343 |
-
// effect of causing NSLCurl::requestHeaders to be empty.
|
1344 |
-
if ($on) {
|
1345 |
-
$this->setOpt(CURLINFO_HEADER_OUT, false);
|
1346 |
-
}
|
1347 |
-
$this->setOpt(CURLOPT_VERBOSE, $on);
|
1348 |
-
$this->setOpt(CURLOPT_STDERR, $output);
|
1349 |
-
}
|
1350 |
-
|
1351 |
-
/**
|
1352 |
-
* Destruct
|
1353 |
-
*
|
1354 |
-
* @access public
|
1355 |
-
*/
|
1356 |
-
public function __destruct() {
|
1357 |
-
$this->close();
|
1358 |
-
}
|
1359 |
-
|
1360 |
-
public function __get($name) {
|
1361 |
-
$return = null;
|
1362 |
-
if (in_array($name, self::$deferredProperties) && is_callable(array(
|
1363 |
-
$this,
|
1364 |
-
$getter = '__get_' . $name
|
1365 |
-
))) {
|
1366 |
-
$return = $this->$name = $this->$getter();
|
1367 |
-
}
|
1368 |
-
|
1369 |
-
return $return;
|
1370 |
-
}
|
1371 |
-
|
1372 |
-
/**
|
1373 |
-
* Get Effective Url
|
1374 |
-
*
|
1375 |
-
* @access private
|
1376 |
-
*/
|
1377 |
-
private function __get_effectiveUrl() {
|
1378 |
-
return $this->getInfo(CURLINFO_EFFECTIVE_URL);
|
1379 |
-
}
|
1380 |
-
|
1381 |
-
/**
|
1382 |
-
* Get RFC 2616
|
1383 |
-
*
|
1384 |
-
* @access private
|
1385 |
-
*/
|
1386 |
-
private function __get_rfc2616() {
|
1387 |
-
return array_fill_keys(self::$RFC2616, true);
|
1388 |
-
}
|
1389 |
-
|
1390 |
-
/**
|
1391 |
-
* Get RFC 6265
|
1392 |
-
*
|
1393 |
-
* @access private
|
1394 |
-
*/
|
1395 |
-
private function __get_rfc6265() {
|
1396 |
-
return array_fill_keys(self::$RFC6265, true);
|
1397 |
-
}
|
1398 |
-
|
1399 |
-
/**
|
1400 |
-
* Get Total Time
|
1401 |
-
*
|
1402 |
-
* @access private
|
1403 |
-
*/
|
1404 |
-
private function __get_totalTime() {
|
1405 |
-
return $this->getInfo(CURLINFO_TOTAL_TIME);
|
1406 |
-
}
|
1407 |
-
|
1408 |
-
/**
|
1409 |
-
* Build Cookies
|
1410 |
-
*
|
1411 |
-
* @access private
|
1412 |
-
*/
|
1413 |
-
private function buildCookies() {
|
1414 |
-
// Avoid using http_build_query() as unnecessary encoding is performed.
|
1415 |
-
// http_build_query($this->cookies, '', '; ');
|
1416 |
-
$this->setOpt(CURLOPT_COOKIE, implode('; ', array_map(function ($k, $v) {
|
1417 |
-
return $k . '=' . $v;
|
1418 |
-
}, array_keys($this->cookies), array_values($this->cookies))));
|
1419 |
-
}
|
1420 |
-
|
1421 |
-
/**
|
1422 |
-
* Build Url
|
1423 |
-
*
|
1424 |
-
* @access private
|
1425 |
-
*
|
1426 |
-
* @param $url
|
1427 |
-
* @param $mixed_data
|
1428 |
-
*
|
1429 |
-
* @return string
|
1430 |
-
*/
|
1431 |
-
private function buildUrl($url, $mixed_data = '') {
|
1432 |
-
$query_string = '';
|
1433 |
-
if (!empty($mixed_data)) {
|
1434 |
-
$query_mark = strpos($url, '?') > 0 ? '&' : '?';
|
1435 |
-
if (is_string($mixed_data)) {
|
1436 |
-
$query_string .= $query_mark . $mixed_data;
|
1437 |
-
} elseif (is_array($mixed_data)) {
|
1438 |
-
$query_string .= $query_mark . http_build_query($mixed_data, '', '&');
|
1439 |
-
}
|
1440 |
-
}
|
1441 |
-
|
1442 |
-
return $url . $query_string;
|
1443 |
-
}
|
1444 |
-
|
1445 |
-
/**
|
1446 |
-
* Create Header Callback
|
1447 |
-
*
|
1448 |
-
* @access private
|
1449 |
-
*
|
1450 |
-
* @param $header_callback_data
|
1451 |
-
*
|
1452 |
-
* @return callable
|
1453 |
-
*/
|
1454 |
-
private function createHeaderCallback($header_callback_data) {
|
1455 |
-
return function ($ch, $header) use ($header_callback_data) {
|
1456 |
-
if (preg_match('/^Set-Cookie:\s*([^=]+)=([^;]+)/mi', $header, $cookie) === 1) {
|
1457 |
-
$header_callback_data->responseCookies[$cookie[1]] = trim($cookie[2], " \n\r\t\0\x0B");
|
1458 |
-
}
|
1459 |
-
$header_callback_data->rawResponseHeaders .= $header;
|
1460 |
-
|
1461 |
-
return strlen($header);
|
1462 |
-
};
|
1463 |
-
}
|
1464 |
-
|
1465 |
-
/**
|
1466 |
-
* Download Complete
|
1467 |
-
*
|
1468 |
-
* @access private
|
1469 |
-
*
|
1470 |
-
* @param $fh
|
1471 |
-
*/
|
1472 |
-
private function downloadComplete($fh) {
|
1473 |
-
if (!$this->error && $this->downloadCompleteFunction) {
|
1474 |
-
rewind($fh);
|
1475 |
-
$this->call($this->downloadCompleteFunction, $fh);
|
1476 |
-
$this->downloadCompleteFunction = null;
|
1477 |
-
}
|
1478 |
-
|
1479 |
-
if (is_resource($fh)) {
|
1480 |
-
fclose($fh);
|
1481 |
-
}
|
1482 |
-
|
1483 |
-
// Fix "PHP Notice: Use of undefined constant STDOUT" when reading the
|
1484 |
-
// PHP script from stdin. Using null causes "Warning: curl_setopt():
|
1485 |
-
// supplied argument is not a valid File-Handle resource".
|
1486 |
-
if (!defined('STDOUT')) {
|
1487 |
-
define('STDOUT', fopen('php://stdout', 'w'));
|
1488 |
-
}
|
1489 |
-
|
1490 |
-
// Reset CURLOPT_FILE with STDOUT to avoid: "curl_exec(): CURLOPT_FILE
|
1491 |
-
// resource has gone away, resetting to default".
|
1492 |
-
$this->setOpt(CURLOPT_FILE, STDOUT);
|
1493 |
-
|
1494 |
-
// Reset CURLOPT_RETURNTRANSFER to tell cURL to return subsequent
|
1495 |
-
// responses as the return value of curl_exec(). Without this,
|
1496 |
-
// curl_exec() will revert to returning boolean values.
|
1497 |
-
$this->setOpt(CURLOPT_RETURNTRANSFER, true);
|
1498 |
-
}
|
1499 |
-
|
1500 |
-
/**
|
1501 |
-
* Parse Headers
|
1502 |
-
*
|
1503 |
-
* @access private
|
1504 |
-
*
|
1505 |
-
* @param $raw_headers
|
1506 |
-
*
|
1507 |
-
* @return array
|
1508 |
-
*/
|
1509 |
-
private function parseHeaders($raw_headers) {
|
1510 |
-
$raw_headers = preg_split('/\r\n/', $raw_headers, null, PREG_SPLIT_NO_EMPTY);
|
1511 |
-
$http_headers = new NSLCaseInsensitiveArray();
|
1512 |
-
|
1513 |
-
$raw_headers_count = count($raw_headers);
|
1514 |
-
for ($i = 1; $i < $raw_headers_count; $i++) {
|
1515 |
-
if (strpos($raw_headers[$i], ':') !== false) {
|
1516 |
-
list($key, $value) = explode(':', $raw_headers[$i], 2);
|
1517 |
-
$key = trim($key);
|
1518 |
-
$value = trim($value);
|
1519 |
-
// Use isset() as array_key_exists() and ArrayAccess are not compatible.
|
1520 |
-
if (isset($http_headers[$key])) {
|
1521 |
-
$http_headers[$key] .= ',' . $value;
|
1522 |
-
} else {
|
1523 |
-
$http_headers[$key] = $value;
|
1524 |
-
}
|
1525 |
-
}
|
1526 |
-
}
|
1527 |
-
|
1528 |
-
return array(
|
1529 |
-
isset($raw_headers['0']) ? $raw_headers['0'] : '',
|
1530 |
-
$http_headers
|
1531 |
-
);
|
1532 |
-
}
|
1533 |
-
|
1534 |
-
/**
|
1535 |
-
* Parse Request Headers
|
1536 |
-
*
|
1537 |
-
* @access private
|
1538 |
-
*
|
1539 |
-
* @param $raw_headers
|
1540 |
-
*
|
1541 |
-
* @return NSLCaseInsensitiveArray
|
1542 |
-
*/
|
1543 |
-
private function parseRequestHeaders($raw_headers) {
|
1544 |
-
$request_headers = new NSLCaseInsensitiveArray();
|
1545 |
-
list($first_line, $headers) = $this->parseHeaders($raw_headers);
|
1546 |
-
$request_headers['Request-Line'] = $first_line;
|
1547 |
-
foreach ($headers as $key => $value) {
|
1548 |
-
$request_headers[$key] = $value;
|
1549 |
-
}
|
1550 |
-
|
1551 |
-
return $request_headers;
|
1552 |
-
}
|
1553 |
-
|
1554 |
-
/**
|
1555 |
-
* Parse Response
|
1556 |
-
*
|
1557 |
-
* @access private
|
1558 |
-
*
|
1559 |
-
* @param $response_headers
|
1560 |
-
* @param $raw_response
|
1561 |
-
*
|
1562 |
-
* @return mixed
|
1563 |
-
* Provided the content-type is determined to be json or xml:
|
1564 |
-
* Returns stdClass object when the default json decoder is used and the content-type is json.
|
1565 |
-
* Returns SimpleXMLElement object when the default xml decoder is used and the content-type is xml.
|
1566 |
-
*/
|
1567 |
-
private function parseResponse($response_headers, $raw_response) {
|
1568 |
-
$response = $raw_response;
|
1569 |
-
if (isset($response_headers['Content-Type'])) {
|
1570 |
-
if (preg_match($this->jsonPattern, $response_headers['Content-Type'])) {
|
1571 |
-
if ($this->jsonDecoder) {
|
1572 |
-
$args = $this->jsonDecoderArgs;
|
1573 |
-
array_unshift($args, $response);
|
1574 |
-
$response = call_user_func_array($this->jsonDecoder, $args);
|
1575 |
-
}
|
1576 |
-
} elseif (preg_match($this->xmlPattern, $response_headers['Content-Type'])) {
|
1577 |
-
if ($this->xmlDecoder) {
|
1578 |
-
$response = call_user_func($this->xmlDecoder, $response);
|
1579 |
-
}
|
1580 |
-
} else {
|
1581 |
-
if ($this->defaultDecoder) {
|
1582 |
-
$response = call_user_func($this->defaultDecoder, $response);
|
1583 |
-
}
|
1584 |
-
}
|
1585 |
-
}
|
1586 |
-
|
1587 |
-
return $response;
|
1588 |
-
}
|
1589 |
-
|
1590 |
-
/**
|
1591 |
-
* Parse Response Headers
|
1592 |
-
*
|
1593 |
-
* @access private
|
1594 |
-
*
|
1595 |
-
* @param $raw_response_headers
|
1596 |
-
*
|
1597 |
-
* @return NSLCaseInsensitiveArray
|
1598 |
-
*/
|
1599 |
-
private function parseResponseHeaders($raw_response_headers) {
|
1600 |
-
$response_header_array = explode("\r\n\r\n", $raw_response_headers);
|
1601 |
-
$response_header = '';
|
1602 |
-
for ($i = count($response_header_array) - 1; $i >= 0; $i--) {
|
1603 |
-
if (stripos($response_header_array[$i], 'HTTP/') === 0) {
|
1604 |
-
$response_header = $response_header_array[$i];
|
1605 |
-
break;
|
1606 |
-
}
|
1607 |
-
}
|
1608 |
-
|
1609 |
-
$response_headers = new NSLCaseInsensitiveArray();
|
1610 |
-
list($first_line, $headers) = $this->parseHeaders($response_header);
|
1611 |
-
$response_headers['Status-Line'] = $first_line;
|
1612 |
-
foreach ($headers as $key => $value) {
|
1613 |
-
$response_headers[$key] = $value;
|
1614 |
-
}
|
1615 |
-
|
1616 |
-
return $response_headers;
|
1617 |
-
}
|
1618 |
-
|
1619 |
-
/**
|
1620 |
-
* Set Encoded Cookie
|
1621 |
-
*
|
1622 |
-
* @access private
|
1623 |
-
*
|
1624 |
-
* @param $key
|
1625 |
-
* @param $value
|
1626 |
-
*/
|
1627 |
-
private function setEncodedCookie($key, $value) {
|
1628 |
-
$name_chars = array();
|
1629 |
-
foreach (str_split($key) as $name_char) {
|
1630 |
-
if (isset($this->rfc2616[$name_char])) {
|
1631 |
-
$name_chars[] = $name_char;
|
1632 |
-
} else {
|
1633 |
-
$name_chars[] = rawurlencode($name_char);
|
1634 |
-
}
|
1635 |
-
}
|
1636 |
-
|
1637 |
-
$value_chars = array();
|
1638 |
-
foreach (str_split($value) as $value_char) {
|
1639 |
-
if (isset($this->rfc6265[$value_char])) {
|
1640 |
-
$value_chars[] = $value_char;
|
1641 |
-
} else {
|
1642 |
-
$value_chars[] = rawurlencode($value_char);
|
1643 |
-
}
|
1644 |
-
}
|
1645 |
-
|
1646 |
-
$this->cookies[implode('', $name_chars)] = implode('', $value_chars);
|
1647 |
-
}
|
1648 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/curl/Decoder.php
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class NSLDecoder {
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Decode JSON
|
7 |
-
*
|
8 |
-
* @access public
|
9 |
-
*
|
10 |
-
* @param $json
|
11 |
-
* @param $assoc
|
12 |
-
* @param $depth
|
13 |
-
* @param $options
|
14 |
-
*
|
15 |
-
* @return array|stdClass
|
16 |
-
*/
|
17 |
-
public static function decodeJson() {
|
18 |
-
$args = func_get_args();
|
19 |
-
|
20 |
-
// Call json_decode() without the $options parameter in PHP
|
21 |
-
// versions less than 5.4.0 as the $options parameter was added in
|
22 |
-
// PHP version 5.4.0.
|
23 |
-
if (version_compare(PHP_VERSION, '5.4.0', '<')) {
|
24 |
-
$args = array_slice($args, 0, 3);
|
25 |
-
}
|
26 |
-
|
27 |
-
$response = call_user_func_array('json_decode', $args);
|
28 |
-
if ($response === null) {
|
29 |
-
$response = $args['0'];
|
30 |
-
}
|
31 |
-
|
32 |
-
return $response;
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Decode XML
|
37 |
-
*
|
38 |
-
* @access public
|
39 |
-
*
|
40 |
-
* @param $response
|
41 |
-
*/
|
42 |
-
public static function decodeXml($response) {
|
43 |
-
$xml_obj = @simplexml_load_string($response);
|
44 |
-
if (!($xml_obj === false)) {
|
45 |
-
$response = $xml_obj;
|
46 |
-
}
|
47 |
-
|
48 |
-
return $response;
|
49 |
-
}
|
50 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/curl/StrUtil.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class NSLStrUtil {
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Return true when $haystack starts with $needle.
|
7 |
-
*
|
8 |
-
* @access public
|
9 |
-
*
|
10 |
-
* @param $haystack
|
11 |
-
* @param $needle
|
12 |
-
*
|
13 |
-
* @return bool
|
14 |
-
*/
|
15 |
-
public static function startsWith($haystack, $needle) {
|
16 |
-
return mb_substr($haystack, 0, mb_strlen($needle)) === $needle;
|
17 |
-
}
|
18 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/curl/Url.php
DELETED
@@ -1,169 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once dirname(__FILE__) . '/StrUtil.php';
|
4 |
-
|
5 |
-
class NSLUrl {
|
6 |
-
|
7 |
-
private $baseUrl = null;
|
8 |
-
private $relativeUrl = null;
|
9 |
-
|
10 |
-
public function __construct($base_url, $relative_url = null) {
|
11 |
-
$this->baseUrl = $base_url;
|
12 |
-
$this->relativeUrl = $relative_url;
|
13 |
-
}
|
14 |
-
|
15 |
-
public function __toString() {
|
16 |
-
return $this->absolutizeUrl();
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Remove dot segments.
|
21 |
-
*
|
22 |
-
* Interpret and remove the special "." and ".." path segments from a referenced path.
|
23 |
-
*/
|
24 |
-
public static function removeDotSegments($input) {
|
25 |
-
// 1. The input buffer is initialized with the now-appended path
|
26 |
-
// components and the output buffer is initialized to the empty
|
27 |
-
// string.
|
28 |
-
$output = '';
|
29 |
-
|
30 |
-
// 2. While the input buffer is not empty, loop as follows:
|
31 |
-
while (!empty($input)) {
|
32 |
-
// A. If the input buffer begins with a prefix of "../" or "./",
|
33 |
-
// then remove that prefix from the input buffer; otherwise,
|
34 |
-
if (NSLStrUtil::startsWith($input, '../')) {
|
35 |
-
$input = substr($input, 3);
|
36 |
-
} elseif (NSLStrUtil::startsWith($input, './')) {
|
37 |
-
$input = substr($input, 2);
|
38 |
-
|
39 |
-
// B. if the input buffer begins with a prefix of "/./" or "/.",
|
40 |
-
// where "." is a complete path segment, then replace that
|
41 |
-
// prefix with "/" in the input buffer; otherwise,
|
42 |
-
} elseif (NSLStrUtil::startsWith($input, '/./')) {
|
43 |
-
$input = substr($input, 2);
|
44 |
-
} elseif ($input === '/.') {
|
45 |
-
$input = '/';
|
46 |
-
|
47 |
-
// C. if the input buffer begins with a prefix of "/../" or "/..",
|
48 |
-
// where ".." is a complete path segment, then replace that
|
49 |
-
// prefix with "/" in the input buffer and remove the last
|
50 |
-
// segment and its preceding "/" (if any) from the output
|
51 |
-
// buffer; otherwise,
|
52 |
-
} elseif (NSLStrUtil::startsWith($input, '/../')) {
|
53 |
-
$input = substr($input, 3);
|
54 |
-
$output = substr_replace($output, '', mb_strrpos($output, '/'));
|
55 |
-
} elseif ($input === '/..') {
|
56 |
-
$input = '/';
|
57 |
-
$output = substr_replace($output, '', mb_strrpos($output, '/'));
|
58 |
-
|
59 |
-
// D. if the input buffer consists only of "." or "..", then remove
|
60 |
-
// that from the input buffer; otherwise,
|
61 |
-
} elseif ($input === '.' || $input === '..') {
|
62 |
-
$input = '';
|
63 |
-
|
64 |
-
// E. move the first path segment in the input buffer to the end of
|
65 |
-
// the output buffer, including the initial "/" character (if
|
66 |
-
// any) and any subsequent characters up to, but not including,
|
67 |
-
// the next "/" character or the end of the input buffer.
|
68 |
-
} elseif (!(($pos = mb_strpos($input, '/', 1)) === false)) {
|
69 |
-
$output .= substr($input, 0, $pos);
|
70 |
-
$input = substr_replace($input, '', 0, $pos);
|
71 |
-
} else {
|
72 |
-
$output .= $input;
|
73 |
-
$input = '';
|
74 |
-
}
|
75 |
-
}
|
76 |
-
|
77 |
-
// 3. Finally, the output buffer is returned as the result of
|
78 |
-
// remove_dot_segments.
|
79 |
-
return $output . $input;
|
80 |
-
}
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Absolutize url.
|
84 |
-
*
|
85 |
-
* Combine the base and relative url into an absolute url.
|
86 |
-
*/
|
87 |
-
private function absolutizeUrl() {
|
88 |
-
$b = $this->parseUrl($this->baseUrl);
|
89 |
-
|
90 |
-
if (!($this->relativeUrl === null)) {
|
91 |
-
$r = $this->parseUrl($this->relativeUrl);
|
92 |
-
|
93 |
-
// Copy relative parts to base url.
|
94 |
-
if (isset($r['scheme'])) {
|
95 |
-
$b['scheme'] = $r['scheme'];
|
96 |
-
}
|
97 |
-
if (isset($r['host'])) {
|
98 |
-
$b['host'] = $r['host'];
|
99 |
-
}
|
100 |
-
if (isset($r['port'])) {
|
101 |
-
$b['port'] = $r['port'];
|
102 |
-
}
|
103 |
-
if (isset($r['user'])) {
|
104 |
-
$b['user'] = $r['user'];
|
105 |
-
}
|
106 |
-
if (isset($r['pass'])) {
|
107 |
-
$b['pass'] = $r['pass'];
|
108 |
-
}
|
109 |
-
|
110 |
-
if (!isset($r['path']) || $r['path'] === '') {
|
111 |
-
$r['path'] = '/';
|
112 |
-
}
|
113 |
-
// Merge relative url with base when relative url's path doesn't start with a slash.
|
114 |
-
if (!(NSLStrUtil::startsWith($r['path'], '/'))) {
|
115 |
-
$base = mb_strrchr($b['path'], '/', true);
|
116 |
-
if ($base === false) {
|
117 |
-
$base = '';
|
118 |
-
}
|
119 |
-
$r['path'] = $base . '/' . $r['path'];
|
120 |
-
}
|
121 |
-
$b['path'] = $r['path'];
|
122 |
-
$b['path'] = $this->removeDotSegments($b['path']);
|
123 |
-
|
124 |
-
if (isset($r['query'])) {
|
125 |
-
$b['query'] = $r['query'];
|
126 |
-
}
|
127 |
-
if (isset($r['fragment'])) {
|
128 |
-
$b['fragment'] = $r['fragment'];
|
129 |
-
}
|
130 |
-
}
|
131 |
-
|
132 |
-
if (!isset($b['path'])) {
|
133 |
-
$b['path'] = '/';
|
134 |
-
}
|
135 |
-
|
136 |
-
$absolutized_url = $this->unparseUrl($b);
|
137 |
-
|
138 |
-
return $absolutized_url;
|
139 |
-
}
|
140 |
-
|
141 |
-
/**
|
142 |
-
* Parse url.
|
143 |
-
*
|
144 |
-
* Parse url into components of a URI as specified by RFC 3986.
|
145 |
-
*/
|
146 |
-
private function parseUrl($url) {
|
147 |
-
return parse_url($url);
|
148 |
-
}
|
149 |
-
|
150 |
-
/**
|
151 |
-
* Unparse url.
|
152 |
-
*
|
153 |
-
* Combine url components into a url.
|
154 |
-
*/
|
155 |
-
private function unparseUrl($parsed_url) {
|
156 |
-
$scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : '';
|
157 |
-
$host = isset($parsed_url['host']) ? $parsed_url['host'] : '';
|
158 |
-
$port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : '';
|
159 |
-
$user = isset($parsed_url['user']) ? $parsed_url['user'] : '';
|
160 |
-
$pass = isset($parsed_url['pass']) ? ':' . $parsed_url['pass'] : '';
|
161 |
-
$pass = ($user || $pass) ? $pass . '@' : '';
|
162 |
-
$path = isset($parsed_url['path']) ? $parsed_url['path'] : '';
|
163 |
-
$query = isset($parsed_url['query']) ? '?' . $parsed_url['query'] : '';
|
164 |
-
$fragment = isset($parsed_url['fragment']) ? '#' . $parsed_url['fragment'] : '';
|
165 |
-
$unparsed_url = $scheme . $user . $pass . $host . $port . $path . $query . $fragment;
|
166 |
-
|
167 |
-
return $unparsed_url;
|
168 |
-
}
|
169 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/oauth2.php
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
require_once NSL_PATH . '/includes/curl/Curl.php';
|
4 |
require_once NSL_PATH . '/includes/auth.php';
|
5 |
|
6 |
|
@@ -76,27 +75,42 @@ abstract class NextendSocialOauth2 extends NextendSocialAuth {
|
|
76 |
return implode(' ', $scopes);
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
79 |
public function authenticate() {
|
80 |
if (isset($_GET['code'])) {
|
81 |
if (!$this->validateState()) {
|
82 |
throw new Exception('Unable to validate CSRF state');
|
83 |
}
|
84 |
|
85 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
-
|
88 |
-
'grant_type' => 'authorization_code',
|
89 |
-
'code' => $_GET['code'],
|
90 |
-
'redirect_uri' => $this->redirect_uri,
|
91 |
-
'client_id' => $this->client_id,
|
92 |
-
'client_secret' => $this->client_secret
|
93 |
-
));
|
94 |
|
95 |
-
|
|
|
96 |
|
97 |
-
$this->errorFromResponse($
|
|
|
|
|
|
|
98 |
|
99 |
-
|
|
|
100 |
}
|
101 |
|
102 |
$accessTokenData['created'] = time();
|
@@ -109,6 +123,11 @@ abstract class NextendSocialOauth2 extends NextendSocialAuth {
|
|
109 |
return false;
|
110 |
}
|
111 |
|
|
|
|
|
|
|
|
|
|
|
112 |
protected function errorFromResponse($response) {
|
113 |
if (isset($response['error'])) {
|
114 |
throw new Exception($response['error'] . ': ' . $response['error_description']);
|
@@ -177,7 +196,7 @@ abstract class NextendSocialOauth2 extends NextendSocialAuth {
|
|
177 |
|
178 |
private function randomStr($length, $keyspace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') {
|
179 |
$str = '';
|
180 |
-
$max =
|
181 |
for ($i = 0; $i < $length; ++$i) {
|
182 |
$str .= $keyspace[random_int(0, $max)];
|
183 |
}
|
@@ -193,20 +212,30 @@ abstract class NextendSocialOauth2 extends NextendSocialAuth {
|
|
193 |
* @throws Exception
|
194 |
*/
|
195 |
public function get($path, $data = array()) {
|
196 |
-
$curl = new NSLCurl();
|
197 |
|
198 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
|
200 |
-
$
|
201 |
|
202 |
-
|
203 |
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
|
|
|
|
|
|
|
|
210 |
}
|
211 |
|
212 |
return $result;
|
1 |
<?php
|
2 |
|
|
|
3 |
require_once NSL_PATH . '/includes/auth.php';
|
4 |
|
5 |
|
75 |
return implode(' ', $scopes);
|
76 |
}
|
77 |
|
78 |
+
/**
|
79 |
+
* @return bool|false|string
|
80 |
+
* @throws Exception
|
81 |
+
*/
|
82 |
public function authenticate() {
|
83 |
if (isset($_GET['code'])) {
|
84 |
if (!$this->validateState()) {
|
85 |
throw new Exception('Unable to validate CSRF state');
|
86 |
}
|
87 |
|
88 |
+
$http_args = array(
|
89 |
+
'timeout' => 15,
|
90 |
+
'user-agent' => 'WordPress',
|
91 |
+
'body' => array(
|
92 |
+
'grant_type' => 'authorization_code',
|
93 |
+
'code' => $_GET['code'],
|
94 |
+
'redirect_uri' => $this->redirect_uri,
|
95 |
+
'client_id' => $this->client_id,
|
96 |
+
'client_secret' => $this->client_secret
|
97 |
+
)
|
98 |
+
);
|
99 |
+
|
100 |
+
$request = wp_remote_post($this->endpointAccessToken, $http_args);
|
101 |
|
102 |
+
if (is_wp_error($request)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
|
104 |
+
throw new Exception($request->get_error_message());
|
105 |
+
} else if (wp_remote_retrieve_response_code($request) !== 200) {
|
106 |
|
107 |
+
$this->errorFromResponse(json_decode(wp_remote_retrieve_body($request), true));
|
108 |
+
}
|
109 |
+
|
110 |
+
$accessTokenData = json_decode(wp_remote_retrieve_body($request), true);
|
111 |
|
112 |
+
if (!is_array($accessTokenData)) {
|
113 |
+
throw new Exception(sprintf(__('Unexpected response: %s', 'nextend-facebook-connect'), wp_remote_retrieve_body($request)));
|
114 |
}
|
115 |
|
116 |
$accessTokenData['created'] = time();
|
123 |
return false;
|
124 |
}
|
125 |
|
126 |
+
/**
|
127 |
+
* @param $response
|
128 |
+
*
|
129 |
+
* @throws Exception
|
130 |
+
*/
|
131 |
protected function errorFromResponse($response) {
|
132 |
if (isset($response['error'])) {
|
133 |
throw new Exception($response['error'] . ': ' . $response['error_description']);
|
196 |
|
197 |
private function randomStr($length, $keyspace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') {
|
198 |
$str = '';
|
199 |
+
$max = strlen($keyspace) - 1;
|
200 |
for ($i = 0; $i < $length; ++$i) {
|
201 |
$str .= $keyspace[random_int(0, $max)];
|
202 |
}
|
212 |
* @throws Exception
|
213 |
*/
|
214 |
public function get($path, $data = array()) {
|
|
|
215 |
|
216 |
+
$http_args = array(
|
217 |
+
'timeout' => 15,
|
218 |
+
'user-agent' => 'WordPress',
|
219 |
+
'headers' => array(
|
220 |
+
'Authorization' => 'Bearer ' . $this->access_token_data['access_token']
|
221 |
+
),
|
222 |
+
'body' => array_merge($this->defaultRestParams, $data)
|
223 |
+
);
|
224 |
|
225 |
+
$request = wp_remote_get($this->endpointRestAPI . $path, $http_args);
|
226 |
|
227 |
+
if (is_wp_error($request)) {
|
228 |
|
229 |
+
throw new Exception($request->get_error_message());
|
230 |
+
} else if (wp_remote_retrieve_response_code($request) !== 200) {
|
231 |
+
|
232 |
+
$this->errorFromResponse(json_decode(wp_remote_retrieve_body($request), true));
|
233 |
+
}
|
234 |
+
|
235 |
+
$result = json_decode(wp_remote_retrieve_body($request), true);
|
236 |
+
|
237 |
+
if (!is_array($result)) {
|
238 |
+
throw new Exception(sprintf(__('Unexpected response: %s', 'nextend-facebook-connect'), wp_remote_retrieve_body($request)));
|
239 |
}
|
240 |
|
241 |
return $result;
|
includes/provider.php
CHANGED
@@ -18,6 +18,8 @@ abstract class NextendSocialProvider extends NextendSocialProviderDummy {
|
|
18 |
|
19 |
protected $svg = '';
|
20 |
|
|
|
|
|
21 |
public function __construct($defaultSettings) {
|
22 |
|
23 |
if (empty($this->dbID)) {
|
@@ -33,7 +35,9 @@ abstract class NextendSocialProvider extends NextendSocialProviderDummy {
|
|
33 |
'custom_icon_button' => '',
|
34 |
'login_label' => '',
|
35 |
'link_label' => '',
|
36 |
-
'unlink_label' => ''
|
|
|
|
|
37 |
), array(
|
38 |
'ask_email' => 'when-empty',
|
39 |
'ask_user' => 'never',
|
@@ -102,6 +106,10 @@ abstract class NextendSocialProvider extends NextendSocialProviderDummy {
|
|
102 |
include(NSL_PATH . '/admin/templates/footer.php');
|
103 |
}
|
104 |
|
|
|
|
|
|
|
|
|
105 |
public function renderProSettings() {
|
106 |
include(NSL_PATH . '/admin/templates-provider/settings-pro.php');
|
107 |
}
|
@@ -178,6 +186,10 @@ abstract class NextendSocialProvider extends NextendSocialProviderDummy {
|
|
178 |
case 'unlink_label':
|
179 |
$newData[$key] = wp_kses_post($value);
|
180 |
break;
|
|
|
|
|
|
|
|
|
181 |
case 'settings_saved':
|
182 |
$newData[$key] = intval($value) ? 1 : 0;
|
183 |
break;
|
@@ -360,7 +372,7 @@ abstract class NextendSocialProvider extends NextendSocialProviderDummy {
|
|
360 |
|
361 |
$this->saveUserData($current_user->ID, 'access_token', $accessToken);
|
362 |
|
363 |
-
NextendSocialLoginAdminNotices::addSuccess(sprintf(__('Your %s account is successfully linked with your account. Now you can sign in with %s easily.', 'nextend-facebook-connect'), $this->getLabel(), $this->getLabel()));
|
364 |
|
365 |
} else if ($current_user->ID != $ID) {
|
366 |
|
@@ -606,16 +618,7 @@ abstract class NextendSocialProvider extends NextendSocialProviderDummy {
|
|
606 |
}
|
607 |
if ($user_id === false) { // Real register
|
608 |
|
609 |
-
|
610 |
-
$this,
|
611 |
-
'registerComplete'
|
612 |
-
));
|
613 |
-
|
614 |
-
$user_id = $this->register($providerUserID, $email, $this->getAuthUserData('name'), $this->getAuthUserData('first_name'), $this->getAuthUserData('last_name'));
|
615 |
-
if ($user_id) {
|
616 |
-
$this->login($user_id, $accessToken);
|
617 |
-
}
|
618 |
-
|
619 |
|
620 |
} else if ($this->autoLink($user_id, $providerUserID)) {
|
621 |
$this->login($user_id, $accessToken);
|
@@ -632,25 +635,23 @@ abstract class NextendSocialProvider extends NextendSocialProviderDummy {
|
|
632 |
public function syncProfile($user_id, $provider, $access_token) {
|
633 |
}
|
634 |
|
635 |
-
protected function register($providerID, $email, $name = '', $first_name = '', $last_name = '') {
|
636 |
|
637 |
$username = strtolower($first_name . $last_name);
|
638 |
if (empty($username)) {
|
639 |
$username = strtolower($name);
|
640 |
}
|
641 |
-
if (empty($username)) {
|
642 |
-
$username = str_replace(array(
|
643 |
-
'@',
|
644 |
-
'.'
|
645 |
-
), '', strtolower($email));
|
646 |
-
}
|
647 |
|
648 |
-
$sanitized_user_login = sanitize_user($this->settings->get('user_prefix') . $username);
|
649 |
-
if (!validate_username($sanitized_user_login)) {
|
650 |
-
|
|
|
|
|
|
|
651 |
}
|
652 |
$default_user_name = $sanitized_user_login;
|
653 |
-
|
|
|
654 |
while (username_exists($sanitized_user_login)) {
|
655 |
$sanitized_user_login = $default_user_name . $i;
|
656 |
$i++;
|
@@ -668,49 +669,62 @@ abstract class NextendSocialProvider extends NextendSocialProviderDummy {
|
|
668 |
}
|
669 |
|
670 |
$user_pass = wp_generate_password(12, false);
|
671 |
-
$user_id = wp_create_user($userData['username'], $user_pass, $userData['email']);
|
672 |
-
if (!is_wp_error($user_id)) {
|
673 |
|
674 |
-
|
675 |
-
if (!empty($name)) {
|
676 |
-
$user_data['display_name'] = $name;
|
677 |
-
}
|
678 |
-
if (!empty($first_name)) {
|
679 |
-
$user_data['first_name'] = $first_name;
|
680 |
-
if (class_exists('WooCommerce', false)) {
|
681 |
-
add_user_meta($user_id, 'billing_first_name', $first_name);
|
682 |
-
}
|
683 |
-
}
|
684 |
-
if (!empty($last_name)) {
|
685 |
-
$user_data['last_name'] = $last_name;
|
686 |
-
if (class_exists('WooCommerce', false)) {
|
687 |
-
add_user_meta($user_id, 'billing_last_name', $last_name);
|
688 |
-
}
|
689 |
-
}
|
690 |
-
if (!empty($user_data)) {
|
691 |
-
$user_data['ID'] = $user_id;
|
692 |
-
wp_update_user($user_data);
|
693 |
-
}
|
694 |
|
695 |
-
|
|
|
|
|
|
|
696 |
|
697 |
-
|
|
|
|
|
|
|
698 |
|
699 |
-
|
700 |
-
do_action('nsl_' . $this->getId() . '_register_new_user', $user_id, $this);
|
701 |
|
702 |
-
|
|
|
|
|
703 |
|
704 |
-
|
705 |
|
706 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
707 |
}
|
708 |
|
709 |
-
|
710 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
711 |
|
712 |
-
public function registerComplete() {
|
713 |
$this->deleteLoginPersistentData();
|
|
|
|
|
|
|
|
|
714 |
}
|
715 |
|
716 |
protected function autoLink($user_id, $providerUserID) {
|
@@ -789,6 +803,7 @@ abstract class NextendSocialProvider extends NextendSocialProviderDummy {
|
|
789 |
header('HTTP/1.0 401 Unauthorized');
|
790 |
echo "Error: " . $e->getMessage() . "\n";
|
791 |
} else {
|
|
|
792 |
$url = $this->getLastLocationRedirectTo();
|
793 |
?>
|
794 |
<!doctype html>
|
@@ -822,7 +837,7 @@ abstract class NextendSocialProvider extends NextendSocialProviderDummy {
|
|
822 |
}
|
823 |
|
824 |
protected function getUserData($user_id, $key) {
|
825 |
-
return get_user_meta($user_id, $key, true);
|
826 |
}
|
827 |
|
828 |
public function getAccessToken($user_id) {
|
18 |
|
19 |
protected $svg = '';
|
20 |
|
21 |
+
private $registrationContext = array();
|
22 |
+
|
23 |
public function __construct($defaultSettings) {
|
24 |
|
25 |
if (empty($this->dbID)) {
|
35 |
'custom_icon_button' => '',
|
36 |
'login_label' => '',
|
37 |
'link_label' => '',
|
38 |
+
'unlink_label' => '',
|
39 |
+
'user_prefix' => '',
|
40 |
+
'user_fallback' => ''
|
41 |
), array(
|
42 |
'ask_email' => 'when-empty',
|
43 |
'ask_user' => 'never',
|
106 |
include(NSL_PATH . '/admin/templates/footer.php');
|
107 |
}
|
108 |
|
109 |
+
public function renderOtherSettings() {
|
110 |
+
include(NSL_PATH . '/admin/templates-provider/settings-other.php');
|
111 |
+
}
|
112 |
+
|
113 |
public function renderProSettings() {
|
114 |
include(NSL_PATH . '/admin/templates-provider/settings-pro.php');
|
115 |
}
|
186 |
case 'unlink_label':
|
187 |
$newData[$key] = wp_kses_post($value);
|
188 |
break;
|
189 |
+
case 'user_prefix':
|
190 |
+
case 'user_fallback':
|
191 |
+
$newData[$key] = preg_replace("/[^A-Za-z0-9\-_ ]/", '', $value);
|
192 |
+
break;
|
193 |
case 'settings_saved':
|
194 |
$newData[$key] = intval($value) ? 1 : 0;
|
195 |
break;
|
372 |
|
373 |
$this->saveUserData($current_user->ID, 'access_token', $accessToken);
|
374 |
|
375 |
+
NextendSocialLoginAdminNotices::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->getLabel(), $this->getLabel()));
|
376 |
|
377 |
} else if ($current_user->ID != $ID) {
|
378 |
|
618 |
}
|
619 |
if ($user_id === false) { // Real register
|
620 |
|
621 |
+
$this->register($providerUserID, $accessToken, $email, $this->getAuthUserData('name'), $this->getAuthUserData('first_name'), $this->getAuthUserData('last_name'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
622 |
|
623 |
} else if ($this->autoLink($user_id, $providerUserID)) {
|
624 |
$this->login($user_id, $accessToken);
|
635 |
public function syncProfile($user_id, $provider, $access_token) {
|
636 |
}
|
637 |
|
638 |
+
protected function register($providerID, $access_token, $email, $name = '', $first_name = '', $last_name = '') {
|
639 |
|
640 |
$username = strtolower($first_name . $last_name);
|
641 |
if (empty($username)) {
|
642 |
$username = strtolower($name);
|
643 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
644 |
|
645 |
+
$sanitized_user_login = sanitize_user($this->settings->get('user_prefix') . $username, true);
|
646 |
+
if (empty($username) || !validate_username($sanitized_user_login)) {
|
647 |
+
|
648 |
+
//@TODO If username is not valid, we should as the user to enter custom username with Pro Addon
|
649 |
+
|
650 |
+
$sanitized_user_login = sanitize_user($this->settings->get('user_fallback') . $providerID, true);
|
651 |
}
|
652 |
$default_user_name = $sanitized_user_login;
|
653 |
+
|
654 |
+
$i = 1;
|
655 |
while (username_exists($sanitized_user_login)) {
|
656 |
$sanitized_user_login = $default_user_name . $i;
|
657 |
$i++;
|
669 |
}
|
670 |
|
671 |
$user_pass = wp_generate_password(12, false);
|
|
|
|
|
672 |
|
673 |
+
do_action('nsl_pre_register_new_user', $userData, $this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
674 |
|
675 |
+
add_action('user_register', array(
|
676 |
+
$this,
|
677 |
+
'registerComplete'
|
678 |
+
), -1);
|
679 |
|
680 |
+
$this->registrationContext['name'] = $name;
|
681 |
+
$this->registrationContext['first_name'] = $first_name;
|
682 |
+
$this->registrationContext['last_name'] = $last_name;
|
683 |
+
$this->registrationContext['access_token'] = $access_token;
|
684 |
|
685 |
+
wp_create_user($userData['username'], $user_pass, $userData['email']);
|
|
|
686 |
|
687 |
+
//registerComplete will log in user and redirects. If we reach here, the user creation failed.
|
688 |
+
return false;
|
689 |
+
}
|
690 |
|
691 |
+
public function registerComplete($user_id) {
|
692 |
|
693 |
+
$user_data = array();
|
694 |
+
if (!empty($this->registrationContext['name'])) {
|
695 |
+
$user_data['display_name'] = $this->registrationContext['name'];
|
696 |
+
}
|
697 |
+
if (!empty($this->registrationContext['first_name'])) {
|
698 |
+
$user_data['first_name'] = $this->registrationContext['first_name'];
|
699 |
+
if (class_exists('WooCommerce', false)) {
|
700 |
+
add_user_meta($user_id, 'billing_first_name', $this->registrationContext['first_name']);
|
701 |
+
}
|
702 |
+
}
|
703 |
+
if (!empty($this->registrationContext['last_name'])) {
|
704 |
+
$user_data['last_name'] = $this->registrationContext['last_name'];
|
705 |
+
if (class_exists('WooCommerce', false)) {
|
706 |
+
add_user_meta($user_id, 'billing_last_name', $this->registrationContext['last_name']);
|
707 |
+
}
|
708 |
+
}
|
709 |
+
if (!empty($user_data)) {
|
710 |
+
$user_data['ID'] = $user_id;
|
711 |
+
wp_update_user($user_data);
|
712 |
}
|
713 |
|
714 |
+
update_user_option($user_id, 'default_password_nag', true, true);
|
715 |
+
|
716 |
+
$this->linkUserToProviderIdentifier($user_id, $this->getAuthUserData('id'));
|
717 |
+
|
718 |
+
do_action('nsl_register_new_user', $user_id, $this);
|
719 |
+
do_action('nsl_' . $this->getId() . '_register_new_user', $user_id, $this);
|
720 |
+
|
721 |
+
$this->updateRedirectOnRegister();
|
722 |
|
|
|
723 |
$this->deleteLoginPersistentData();
|
724 |
+
|
725 |
+
do_action('register_new_user', $user_id);
|
726 |
+
|
727 |
+
$this->login($user_id, $this->registrationContext['access_token']);
|
728 |
}
|
729 |
|
730 |
protected function autoLink($user_id, $providerUserID) {
|
803 |
header('HTTP/1.0 401 Unauthorized');
|
804 |
echo "Error: " . $e->getMessage() . "\n";
|
805 |
} else {
|
806 |
+
//@TODO we might need to make difference between user cancelled auth and error and redirect the user based on that.
|
807 |
$url = $this->getLastLocationRedirectTo();
|
808 |
?>
|
809 |
<!doctype html>
|
837 |
}
|
838 |
|
839 |
protected function getUserData($user_id, $key) {
|
840 |
+
return get_user_meta($user_id, $this->id . '_' . $key, true);
|
841 |
}
|
842 |
|
843 |
public function getAccessToken($user_id) {
|
js/nsl.js
CHANGED
@@ -36,6 +36,158 @@
|
|
36 |
return newWindow;
|
37 |
};
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
if (jQuery !== undefined) {
|
40 |
(function ($) {
|
41 |
$('a[data-plugin="nsl"][data-action="connect"],a[data-plugin="nsl"][data-action="link"]').on('click', function (e) {
|
@@ -53,13 +205,19 @@
|
|
53 |
href += 'redirect=' + encodeURIComponent(redirectTo) + '&';
|
54 |
}
|
55 |
|
56 |
-
if (NSLPopupCenter(href + 'display=popup', 'nsl-social-connect', $target.data('popupwidth'), $target.data('popupheight'))) {
|
57 |
e.preventDefault();
|
58 |
} else {
|
59 |
window.location = href;
|
60 |
e.preventDefault();
|
61 |
}
|
62 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
})(jQuery);
|
64 |
}
|
65 |
})();
|
36 |
return newWindow;
|
37 |
};
|
38 |
|
39 |
+
var isWebView = null;
|
40 |
+
|
41 |
+
function checkWebView() {
|
42 |
+
if (isWebView === null) {
|
43 |
+
//Based on UserAgent.js {@link https://github.com/uupaa/UserAgent.js}
|
44 |
+
function _detectOS(ua) {
|
45 |
+
switch (true) {
|
46 |
+
case /Android/.test(ua):
|
47 |
+
return "Android";
|
48 |
+
case /iPhone|iPad|iPod/.test(ua):
|
49 |
+
return "iOS";
|
50 |
+
case /Windows/.test(ua):
|
51 |
+
return "Windows";
|
52 |
+
case /Mac OS X/.test(ua):
|
53 |
+
return "Mac";
|
54 |
+
case /CrOS/.test(ua):
|
55 |
+
return "Chrome OS";
|
56 |
+
case /Firefox/.test(ua):
|
57 |
+
return "Firefox OS";
|
58 |
+
}
|
59 |
+
return "";
|
60 |
+
}
|
61 |
+
|
62 |
+
function _detectBrowser(ua) {
|
63 |
+
var android = /Android/.test(ua);
|
64 |
+
|
65 |
+
switch (true) {
|
66 |
+
case /CriOS/.test(ua):
|
67 |
+
return "Chrome for iOS"; // https://developer.chrome.com/multidevice/user-agent
|
68 |
+
case /Edge/.test(ua):
|
69 |
+
return "Edge";
|
70 |
+
case android && /Silk\//.test(ua):
|
71 |
+
return "Silk"; // Kidle Silk browser
|
72 |
+
case /Chrome/.test(ua):
|
73 |
+
return "Chrome";
|
74 |
+
case /Firefox/.test(ua):
|
75 |
+
return "Firefox";
|
76 |
+
case android:
|
77 |
+
return "AOSP"; // AOSP stock browser
|
78 |
+
case /MSIE|Trident/.test(ua):
|
79 |
+
return "IE";
|
80 |
+
case /Safari\//.test(ua):
|
81 |
+
return "Safari";
|
82 |
+
case /AppleWebKit/.test(ua):
|
83 |
+
return "WebKit";
|
84 |
+
}
|
85 |
+
return "";
|
86 |
+
}
|
87 |
+
|
88 |
+
function _detectBrowserVersion(ua, browser) {
|
89 |
+
switch (browser) {
|
90 |
+
case "Chrome for iOS":
|
91 |
+
return _getVersion(ua, "CriOS/");
|
92 |
+
case "Edge":
|
93 |
+
return _getVersion(ua, "Edge/");
|
94 |
+
case "Chrome":
|
95 |
+
return _getVersion(ua, "Chrome/");
|
96 |
+
case "Firefox":
|
97 |
+
return _getVersion(ua, "Firefox/");
|
98 |
+
case "Silk":
|
99 |
+
return _getVersion(ua, "Silk/");
|
100 |
+
case "AOSP":
|
101 |
+
return _getVersion(ua, "Version/");
|
102 |
+
case "IE":
|
103 |
+
return /IEMobile/.test(ua) ? _getVersion(ua, "IEMobile/") :
|
104 |
+
/MSIE/.test(ua) ? _getVersion(ua, "MSIE ") // IE 10
|
105 |
+
:
|
106 |
+
_getVersion(ua, "rv:"); // IE 11
|
107 |
+
case "Safari":
|
108 |
+
return _getVersion(ua, "Version/");
|
109 |
+
case "WebKit":
|
110 |
+
return _getVersion(ua, "WebKit/");
|
111 |
+
}
|
112 |
+
return "0.0.0";
|
113 |
+
}
|
114 |
+
|
115 |
+
function _getVersion(ua, token) {
|
116 |
+
try {
|
117 |
+
return _normalizeSemverString(ua.split(token)[1].trim().split(/[^\w\.]/)[0]);
|
118 |
+
} catch (o_O) {
|
119 |
+
// ignore
|
120 |
+
}
|
121 |
+
return "0.0.0";
|
122 |
+
}
|
123 |
+
|
124 |
+
function _normalizeSemverString(version) {
|
125 |
+
var ary = version.split(/[\._]/);
|
126 |
+
return (parseInt(ary[0], 10) || 0) + "." +
|
127 |
+
(parseInt(ary[1], 10) || 0) + "." +
|
128 |
+
(parseInt(ary[2], 10) || 0);
|
129 |
+
}
|
130 |
+
|
131 |
+
function _isWebView(ua, os, browser, version, options) {
|
132 |
+
switch (os + browser) {
|
133 |
+
case "iOSSafari":
|
134 |
+
return false;
|
135 |
+
case "iOSWebKit":
|
136 |
+
return _isWebView_iOS(options);
|
137 |
+
case "AndroidAOSP":
|
138 |
+
return false; // can not accurately detect
|
139 |
+
case "AndroidChrome":
|
140 |
+
return parseFloat(version) >= 42 ? /; wv/.test(ua) : /\d{2}\.0\.0/.test(version) ? true : _isWebView_Android(options);
|
141 |
+
}
|
142 |
+
return false;
|
143 |
+
}
|
144 |
+
|
145 |
+
function _isWebView_iOS(options) { // @arg Object - { WEB_VIEW }
|
146 |
+
// @ret Boolean
|
147 |
+
// Chrome 15++, Safari 5.1++, IE11, Edge, Firefox10++
|
148 |
+
// Android 5.0 ChromeWebView 30: webkitFullscreenEnabled === false
|
149 |
+
// Android 5.0 ChromeWebView 33: webkitFullscreenEnabled === false
|
150 |
+
// Android 5.0 ChromeWebView 36: webkitFullscreenEnabled === false
|
151 |
+
// Android 5.0 ChromeWebView 37: webkitFullscreenEnabled === false
|
152 |
+
// Android 5.0 ChromeWebView 40: webkitFullscreenEnabled === false
|
153 |
+
// Android 5.0 ChromeWebView 42: webkitFullscreenEnabled === ?
|
154 |
+
// Android 5.0 ChromeWebView 44: webkitFullscreenEnabled === true
|
155 |
+
var document = (window["document"] || {});
|
156 |
+
|
157 |
+
if ("WEB_VIEW" in options) {
|
158 |
+
return options["WEB_VIEW"];
|
159 |
+
}
|
160 |
+
return !("fullscreenEnabled" in document || "webkitFullscreenEnabled" in document || false);
|
161 |
+
}
|
162 |
+
|
163 |
+
function _isWebView_Android(options) {
|
164 |
+
// Chrome 8++
|
165 |
+
// Android 5.0 ChromeWebView 30: webkitRequestFileSystem === false
|
166 |
+
// Android 5.0 ChromeWebView 33: webkitRequestFileSystem === false
|
167 |
+
// Android 5.0 ChromeWebView 36: webkitRequestFileSystem === false
|
168 |
+
// Android 5.0 ChromeWebView 37: webkitRequestFileSystem === false
|
169 |
+
// Android 5.0 ChromeWebView 40: webkitRequestFileSystem === false
|
170 |
+
// Android 5.0 ChromeWebView 42: webkitRequestFileSystem === false
|
171 |
+
// Android 5.0 ChromeWebView 44: webkitRequestFileSystem === false
|
172 |
+
if ("WEB_VIEW" in options) {
|
173 |
+
return options["WEB_VIEW"];
|
174 |
+
}
|
175 |
+
return !("requestFileSystem" in window || "webkitRequestFileSystem" in window || false);
|
176 |
+
}
|
177 |
+
|
178 |
+
var options = {};
|
179 |
+
var nav = window.navigator || {};
|
180 |
+
var ua = nav.userAgent || "";
|
181 |
+
var os = _detectOS(ua);
|
182 |
+
var browser = _detectBrowser(ua);
|
183 |
+
var browserVersion = _detectBrowserVersion(ua, browser);
|
184 |
+
|
185 |
+
isWebView = _isWebView(ua, os, browser, browserVersion, options);
|
186 |
+
}
|
187 |
+
|
188 |
+
return isWebView;
|
189 |
+
}
|
190 |
+
|
191 |
if (jQuery !== undefined) {
|
192 |
(function ($) {
|
193 |
$('a[data-plugin="nsl"][data-action="connect"],a[data-plugin="nsl"][data-action="link"]').on('click', function (e) {
|
205 |
href += 'redirect=' + encodeURIComponent(redirectTo) + '&';
|
206 |
}
|
207 |
|
208 |
+
if (!checkWebView() && NSLPopupCenter(href + 'display=popup', 'nsl-social-connect', $target.data('popupwidth'), $target.data('popupheight'))) {
|
209 |
e.preventDefault();
|
210 |
} else {
|
211 |
window.location = href;
|
212 |
e.preventDefault();
|
213 |
}
|
214 |
});
|
215 |
+
|
216 |
+
var googleLoginButton = $('a[data-plugin="nsl"][data-provider="google"]');
|
217 |
+
if (googleLoginButton.length && checkWebView()) {
|
218 |
+
googleLoginButton.remove();
|
219 |
+
}
|
220 |
+
|
221 |
})(jQuery);
|
222 |
}
|
223 |
})();
|
languages/nextend-facebook-connect-hu_HU.mo
CHANGED
Binary file
|
languages/nextend-facebook-connect-hu_HU.po
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"Project-Id-Version:
|
4 |
-
"POT-Creation-Date: 2018-02-
|
5 |
-
"PO-Revision-Date: 2018-02-
|
6 |
"Last-Translator: \n"
|
7 |
-
"Language-Team: \n"
|
8 |
"Language: hu\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
@@ -82,7 +82,7 @@ msgstr "Alapbeállítás visszaállítása"
|
|
82 |
|
83 |
#: nextend-facebook-connect-new/admin/templates-provider/buttons.php:82
|
84 |
msgid "Link label"
|
85 |
-
msgstr "Profil
|
86 |
|
87 |
#: nextend-facebook-connect-new/admin/templates-provider/buttons.php:94
|
88 |
msgid "Unlink label"
|
@@ -108,7 +108,7 @@ msgstr "Ikon gomb"
|
|
108 |
|
109 |
#: nextend-facebook-connect-new/admin/templates-provider/buttons.php:167
|
110 |
#: nextend-facebook-connect-new/admin/templates-provider/settings-pro.php:122
|
111 |
-
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:
|
112 |
#: nextend-facebook-connect-new/admin/templates/global-settings.php:103
|
113 |
#: nextend-facebook-connect-new/providers/facebook/admin/settings.php:48
|
114 |
#: nextend-facebook-connect-new/providers/google/admin/settings.php:47
|
@@ -133,6 +133,22 @@ msgstr "Gombok"
|
|
133 |
msgid "Usage"
|
134 |
msgstr "Használat"
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
#: nextend-facebook-connect-new/admin/templates-provider/settings-pro.php:16
|
137 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:14
|
138 |
msgid "PRO settings"
|
@@ -173,7 +189,7 @@ msgstr "Fiók csatlakoztatása, ha regisztráció esetén már létezik a fiók"
|
|
173 |
#: nextend-facebook-connect-new/admin/templates-provider/settings-pro.php:67
|
174 |
#: nextend-facebook-connect-new/admin/templates/global-settings.php:50
|
175 |
#: nextend-facebook-connect-new/admin/templates/providers.php:33
|
176 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
177 |
msgid "Disabled"
|
178 |
msgstr "Kikapcsolva"
|
179 |
|
@@ -203,7 +219,7 @@ msgstr ""
|
|
203 |
|
204 |
#: nextend-facebook-connect-new/admin/templates-provider/usage.php:21
|
205 |
msgid "Simple link"
|
206 |
-
msgstr ""
|
207 |
|
208 |
#: nextend-facebook-connect-new/admin/templates-provider/usage.php:24
|
209 |
msgid "Click here to login or register"
|
@@ -211,16 +227,16 @@ msgstr "Kattints ide a belépéshez vagy a regisztrációhoz"
|
|
211 |
|
212 |
#: nextend-facebook-connect-new/admin/templates-provider/usage.php:29
|
213 |
msgid "Image button"
|
214 |
-
msgstr ""
|
215 |
|
216 |
#: nextend-facebook-connect-new/admin/templates-provider/usage.php:32
|
217 |
msgid "Image url"
|
218 |
-
msgstr ""
|
219 |
|
220 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:23
|
221 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:27
|
222 |
msgid "Login form button style"
|
223 |
-
msgstr ""
|
224 |
|
225 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:37
|
226 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:113
|
@@ -232,7 +248,7 @@ msgstr "Imon"
|
|
232 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:44
|
233 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:48
|
234 |
msgid "Login layout"
|
235 |
-
msgstr ""
|
236 |
|
237 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:52
|
238 |
msgid "Below"
|
@@ -271,6 +287,8 @@ msgstr "Elrejt"
|
|
271 |
#, php-format
|
272 |
msgid "You need to turn on the ' %1$s > %2$s > %3$s ' for this feature to work"
|
273 |
msgstr ""
|
|
|
|
|
274 |
|
275 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:95
|
276 |
msgid "Discussion"
|
@@ -288,11 +306,11 @@ msgstr "Gomb stílusa a kommenteknél"
|
|
288 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:120
|
289 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:124
|
290 |
msgid "WooCommerce login form"
|
291 |
-
msgstr ""
|
292 |
|
293 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:127
|
294 |
msgid "No Connect button in login form"
|
295 |
-
msgstr ""
|
296 |
|
297 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:130
|
298 |
msgid "Connect button before login form"
|
@@ -314,11 +332,11 @@ msgstr "Belépés gomb a belépési űrlap után"
|
|
314 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:143
|
315 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:147
|
316 |
msgid "WooCommerce billing form"
|
317 |
-
msgstr ""
|
318 |
|
319 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:150
|
320 |
msgid "No Connect button in billing form"
|
321 |
-
msgstr ""
|
322 |
|
323 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:153
|
324 |
msgid "Connect button before billing form"
|
@@ -331,19 +349,44 @@ msgstr "Belépés gomb a számlázási űrlapon"
|
|
331 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:165
|
332 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:169
|
333 |
msgid "WooCommerce account details"
|
334 |
-
msgstr ""
|
335 |
|
336 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:172
|
337 |
msgid "Link buttons before account details"
|
338 |
-
msgstr ""
|
339 |
|
340 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:177
|
341 |
msgid "Link buttons after account details"
|
342 |
-
msgstr ""
|
343 |
|
344 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:184
|
345 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:188
|
346 |
msgid "WooCommerce button style"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
msgstr ""
|
348 |
|
349 |
#: nextend-facebook-connect-new/admin/templates/global-settings.php:43
|
@@ -353,7 +396,7 @@ msgstr "Debug mód"
|
|
353 |
|
354 |
#: nextend-facebook-connect-new/admin/templates/global-settings.php:53
|
355 |
#: nextend-facebook-connect-new/admin/templates/providers.php:36
|
356 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
357 |
msgid "Enabled"
|
358 |
msgstr "Bekapcsolva"
|
359 |
|
@@ -364,7 +407,7 @@ msgstr "Fix átirányítási link belépésnél"
|
|
364 |
#: nextend-facebook-connect-new/admin/templates/global-settings.php:72
|
365 |
#: nextend-facebook-connect-new/admin/templates/global-settings.php:93
|
366 |
msgid "Use custom"
|
367 |
-
msgstr ""
|
368 |
|
369 |
#: nextend-facebook-connect-new/admin/templates/global-settings.php:80
|
370 |
msgid "Fixed redirect url for register"
|
@@ -385,7 +428,7 @@ msgstr "Pro Kiegészítő"
|
|
385 |
|
386 |
#: nextend-facebook-connect-new/admin/templates/menu.php:6
|
387 |
msgid "Providers"
|
388 |
-
msgstr ""
|
389 |
|
390 |
#: nextend-facebook-connect-new/admin/templates/menu.php:8
|
391 |
msgid "Global Settings"
|
@@ -400,6 +443,9 @@ msgid ""
|
|
400 |
"You don’t have sufficient permissions to install and activate plugins. "
|
401 |
"Please contact your site’s administrator!"
|
402 |
msgstr ""
|
|
|
|
|
|
|
403 |
|
404 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:22
|
405 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:32
|
@@ -412,6 +458,8 @@ msgid ""
|
|
412 |
"Pro Addon is installed but not activated. To be able to use the Pro "
|
413 |
"features, you need to activate it."
|
414 |
msgstr ""
|
|
|
|
|
415 |
|
416 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:37
|
417 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:215
|
@@ -421,12 +469,14 @@ msgstr "Pro kiegészítő deaktiválása"
|
|
421 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:48
|
422 |
#: nextend-facebook-connect-new/admin/templates/pro.php:43
|
423 |
msgid "Pro Addon is not installed"
|
424 |
-
msgstr ""
|
425 |
|
426 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:50
|
427 |
msgid ""
|
428 |
"To access the Pro features, you need to install and activate the Pro Addon."
|
429 |
msgstr ""
|
|
|
|
|
430 |
|
431 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:59
|
432 |
#, php-format
|
@@ -436,7 +486,7 @@ msgstr ""
|
|
436 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:60
|
437 |
#: nextend-facebook-connect-new/admin/templates/pro.php:47
|
438 |
msgid "Install Pro Addon"
|
439 |
-
msgstr ""
|
440 |
|
441 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:94
|
442 |
msgid "Activating..."
|
@@ -459,33 +509,40 @@ msgstr "Aktiválás"
|
|
459 |
|
460 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:189
|
461 |
msgid "License key"
|
462 |
-
msgstr ""
|
463 |
|
464 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:206
|
465 |
msgid "Pro Addon is installed and activated"
|
466 |
-
msgstr ""
|
467 |
|
468 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:208
|
469 |
msgid ""
|
470 |
"You installed and activated the Pro Addon. If you don’t want to use it "
|
471 |
"anymore, you can deauthorize using the button below."
|
472 |
msgstr ""
|
|
|
|
|
473 |
|
474 |
#: nextend-facebook-connect-new/admin/templates/pro.php:8
|
475 |
msgid "Get Pro Addon to unlock more features"
|
476 |
msgstr "Vásárold meg a Pro Kiegészítőt, hogy még több funkcióhoz juss"
|
477 |
|
478 |
#: nextend-facebook-connect-new/admin/templates/pro.php:9
|
|
|
479 |
msgid ""
|
480 |
-
"The features below are available in
|
481 |
-
"
|
482 |
msgstr ""
|
|
|
|
|
483 |
|
484 |
#: nextend-facebook-connect-new/admin/templates/pro.php:10
|
485 |
msgid ""
|
486 |
"If you already have a license, you can Authorize your Pro Addon. Otherwise "
|
487 |
"you can purchase it using the button below."
|
488 |
msgstr ""
|
|
|
|
|
489 |
|
490 |
#: nextend-facebook-connect-new/admin/templates/pro.php:14
|
491 |
msgid "Buy Pro Addon"
|
@@ -497,7 +554,7 @@ msgstr "Pro Kiegészítő aktiválása"
|
|
497 |
|
498 |
#: nextend-facebook-connect-new/admin/templates/pro.php:25
|
499 |
msgid "Pro Addon is not activated"
|
500 |
-
msgstr ""
|
501 |
|
502 |
#: nextend-facebook-connect-new/admin/templates/pro.php:26
|
503 |
#: nextend-facebook-connect-new/admin/templates/pro.php:44
|
@@ -512,7 +569,7 @@ msgstr "Nem elérhető"
|
|
512 |
|
513 |
#: nextend-facebook-connect-new/admin/templates/providers.php:27
|
514 |
msgid "Not Configured"
|
515 |
-
msgstr ""
|
516 |
|
517 |
#: nextend-facebook-connect-new/admin/templates/providers.php:30
|
518 |
msgid "Not Tested"
|
@@ -520,7 +577,7 @@ msgstr "Nincs Tesztelve"
|
|
520 |
|
521 |
#: nextend-facebook-connect-new/admin/templates/providers.php:39
|
522 |
msgid "Legacy"
|
523 |
-
msgstr ""
|
524 |
|
525 |
#: nextend-facebook-connect-new/admin/templates/providers.php:51
|
526 |
msgid "Upgrade Now"
|
@@ -528,75 +585,79 @@ msgstr ""
|
|
528 |
|
529 |
#: nextend-facebook-connect-new/admin/templates/providers.php:66
|
530 |
msgid "Test to Enable"
|
531 |
-
msgstr ""
|
532 |
|
533 |
#: nextend-facebook-connect-new/admin/templates/providers.php:74
|
534 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
535 |
msgid "Enable"
|
536 |
msgstr "Bekapcsolás"
|
537 |
|
538 |
#: nextend-facebook-connect-new/admin/templates/providers.php:86
|
539 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
540 |
msgid "Disable"
|
541 |
msgstr "Kikapcsolás"
|
542 |
|
543 |
#: nextend-facebook-connect-new/admin/templates/providers.php:97
|
544 |
msgid "Import"
|
545 |
-
msgstr ""
|
546 |
|
547 |
#: nextend-facebook-connect-new/admin/templates/providers.php:116
|
548 |
msgid "Saving..."
|
549 |
-
msgstr ""
|
550 |
|
551 |
#: nextend-facebook-connect-new/admin/templates/providers.php:117
|
552 |
msgid "Saving failed"
|
553 |
-
msgstr ""
|
554 |
|
555 |
#: nextend-facebook-connect-new/admin/templates/providers.php:118
|
556 |
msgid "Order Saved"
|
557 |
-
msgstr ""
|
558 |
|
559 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
560 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
561 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
562 |
msgid "Authentication successful"
|
563 |
msgstr "Hitelesítés sikeres"
|
564 |
|
565 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
566 |
#, php-format
|
567 |
msgid ""
|
568 |
-
"Your %s account is successfully linked with your account. Now you can sign "
|
569 |
-
"in with %s easily."
|
570 |
msgstr ""
|
|
|
|
|
571 |
|
572 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
573 |
#, php-format
|
574 |
msgid ""
|
575 |
"This %s account is already linked with other account. Linking process failed!"
|
576 |
msgstr ""
|
|
|
|
|
577 |
|
578 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
579 |
msgid "Authentication error"
|
580 |
msgstr "Hitelesítési hiba"
|
581 |
|
582 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
583 |
msgid "Unlink successful."
|
584 |
-
msgstr ""
|
585 |
|
586 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
587 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
588 |
msgid "The test was successful"
|
589 |
-
msgstr ""
|
590 |
|
591 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
592 |
msgid "Authentication failed"
|
593 |
msgstr "Hitelesítés sikertelen"
|
594 |
|
595 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
596 |
msgid "Your configuration needs testing"
|
597 |
-
msgstr ""
|
598 |
|
599 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
600 |
msgid ""
|
601 |
"Before you can start letting your users register with your app it needs to "
|
602 |
"be tested. This test makes sure that no users will have troubles with the "
|
@@ -610,41 +671,48 @@ msgstr ""
|
|
610 |
"felugró ablakban, nézd meg az appodat vagy a kimásolt hitelesítő adatokat. "
|
611 |
"Ha nincs hibaüzenet, az azt jelenti, hogy minden rendben van."
|
612 |
|
613 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
614 |
msgid "Test the Configuration"
|
615 |
-
msgstr ""
|
616 |
|
617 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
618 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
619 |
msgid "Please save your changes before testing."
|
620 |
msgstr ""
|
621 |
|
622 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
623 |
msgid "Works Fine"
|
624 |
msgstr "Megfelelően Működik"
|
625 |
|
626 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
627 |
#, php-format
|
628 |
msgid ""
|
629 |
"This provider is currently disabled, which means that users can’t register "
|
630 |
"or login via their %s account."
|
631 |
msgstr ""
|
|
|
|
|
632 |
|
633 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
634 |
#, php-format
|
635 |
msgid ""
|
636 |
"This provider works fine, but you can test it again. If you don’t want to "
|
637 |
"let users register or login with %s anymore you can disable it."
|
638 |
msgstr ""
|
|
|
|
|
|
|
639 |
|
640 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
641 |
#, php-format
|
642 |
msgid ""
|
643 |
"This provider is currently enabled, which means that users can register or "
|
644 |
"login via their %s account."
|
645 |
msgstr ""
|
|
|
|
|
646 |
|
647 |
-
#: nextend-facebook-connect-new/includes/provider.php:
|
648 |
msgid "Test Again"
|
649 |
msgstr "Teszteld Újra"
|
650 |
|
@@ -660,7 +728,7 @@ msgstr ""
|
|
660 |
"%4$s vagy újabb). Kérlek frissítd a legújabb verzióra! A Pro Kiegészítő "
|
661 |
"kikapcsolva."
|
662 |
|
663 |
-
#: nextend-facebook-connect-new/nextend-social-login.php:
|
664 |
#, php-format
|
665 |
msgid ""
|
666 |
"%s took the place of Nextend Google Connect. You can delete Nextend Google "
|
@@ -669,7 +737,7 @@ msgstr ""
|
|
669 |
"%s átvette a Nextend Google Connect helyét. Letörölheted a Nextend Google "
|
670 |
"Connect plguint, mivel már nincs rá szükség."
|
671 |
|
672 |
-
#: nextend-facebook-connect-new/nextend-social-login.php:
|
673 |
#, php-format
|
674 |
msgid ""
|
675 |
"%s took the place of Nextend Twitter Connect. You can delete Nextend Twitter "
|
@@ -678,17 +746,18 @@ msgstr ""
|
|
678 |
"%s átvette a Nextend Twitter Connect helyét. Letörölheted a Nextend Twitter "
|
679 |
"Connect plguint, mivel már nincs rá szükség."
|
680 |
|
681 |
-
#: nextend-facebook-connect-new/nextend-social-login.php:
|
682 |
msgid "You have logged in successfully."
|
683 |
msgstr ""
|
684 |
|
685 |
-
#: nextend-facebook-connect-new/nextend-social-login.php:
|
686 |
msgid "Social Login"
|
687 |
-
msgstr ""
|
688 |
|
689 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:7
|
690 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:9
|
691 |
#: nextend-facebook-connect-new/providers/twitter/admin/getting-started.php:9
|
|
|
692 |
#, php-format
|
693 |
msgid ""
|
694 |
"To allow your visitors to log in with their %1$s account, first you must "
|
@@ -697,6 +766,11 @@ msgid ""
|
|
697 |
"\"Settings\" and configure the given \"%2$s\" and \"%3$s\" according to your "
|
698 |
"%1$s App."
|
699 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
700 |
|
701 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:9
|
702 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:11
|
@@ -713,7 +787,7 @@ msgstr "%s létrehozása"
|
|
713 |
#: nextend-social-connect-pro-new/providers/linkedin/admin/getting-started.php:13
|
714 |
#, php-format
|
715 |
msgid "Navigate to %s"
|
716 |
-
msgstr ""
|
717 |
|
718 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:13
|
719 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:15
|
@@ -721,7 +795,7 @@ msgstr ""
|
|
721 |
#: nextend-social-connect-pro-new/providers/linkedin/admin/getting-started.php:14
|
722 |
#, php-format
|
723 |
msgid "Log in with your %s credentials if you are not logged in"
|
724 |
-
msgstr ""
|
725 |
|
726 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:14
|
727 |
msgid "Click on the \"Add a New App\" button"
|
@@ -742,6 +816,8 @@ msgid ""
|
|
742 |
"Move your mouse over Facebook Login and click on the appearing \"Set Up\" "
|
743 |
"button"
|
744 |
msgstr ""
|
|
|
|
|
745 |
|
746 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:18
|
747 |
msgid "Choose Web"
|
@@ -760,7 +836,7 @@ msgstr "Kattints a \"Save\" gombra"
|
|
760 |
|
761 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:21
|
762 |
msgid "In the left sidebar, click on \"Facebook Login\""
|
763 |
-
msgstr ""
|
764 |
|
765 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:22
|
766 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:24
|
@@ -776,13 +852,15 @@ msgstr "Kattints a \"Save Changes\"-re"
|
|
776 |
|
777 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:24
|
778 |
msgid "In the top of the left sidebar, click on \"Settings\""
|
779 |
-
msgstr ""
|
780 |
|
781 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:25
|
782 |
msgid ""
|
783 |
"Here you can see your \"APP ID\" and you can see your \"App secret\" if you "
|
784 |
"click on the \"Show\" button. These will be needed in plugin's settings."
|
785 |
msgstr ""
|
|
|
|
|
786 |
|
787 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:26
|
788 |
msgid "Enter your domain name to the App Domains"
|
@@ -799,14 +877,20 @@ msgstr ""
|
|
799 |
"információkat gyűjtesz és mihez kezdesz velük."
|
800 |
|
801 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:28
|
802 |
-
|
803 |
-
|
|
|
|
|
|
|
804 |
|
805 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:29
|
806 |
msgid ""
|
807 |
"Your application is currently private, which means that only you can log in "
|
808 |
"with it. In the left sidebar choose \"App Review\" and make your App public"
|
809 |
msgstr ""
|
|
|
|
|
|
|
810 |
|
811 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:33
|
812 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:30
|
@@ -818,7 +902,7 @@ msgstr "Befejeztem a %s appom elkészítését"
|
|
818 |
|
819 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:7
|
820 |
msgid "Import Facebook configuration"
|
821 |
-
msgstr ""
|
822 |
|
823 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:8
|
824 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:8
|
@@ -830,7 +914,7 @@ msgstr "Mielőtt tovább lépnél, olvasd el az alábbi figyelmeztetéseket."
|
|
830 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:10
|
831 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:10
|
832 |
msgid "Important steps before the import"
|
833 |
-
msgstr ""
|
834 |
|
835 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:11
|
836 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:11
|
@@ -838,67 +922,64 @@ msgstr ""
|
|
838 |
msgid ""
|
839 |
"Make sure that the redirect URI for your app is correct before proceeding."
|
840 |
msgstr ""
|
|
|
|
|
841 |
|
842 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:13
|
843 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:13
|
844 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:13
|
845 |
#, php-format
|
846 |
msgid "Visit %s."
|
847 |
-
msgstr ""
|
848 |
|
849 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:14
|
850 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:14
|
851 |
msgid "Select your app."
|
852 |
-
msgstr ""
|
853 |
|
854 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:15
|
855 |
msgid ""
|
856 |
"Go to the Settings menu which you can find below the Facebook Login in the "
|
857 |
"left menu."
|
858 |
msgstr ""
|
|
|
859 |
|
860 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:16
|
861 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:16
|
862 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:16
|
863 |
#, php-format
|
864 |
msgid "Make sure that the \"%1$s\" field contains %2$s"
|
865 |
-
msgstr ""
|
866 |
-
|
867 |
-
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:17
|
868 |
-
#: nextend-facebook-connect-new/providers/google/admin/import.php:17
|
869 |
-
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:17
|
870 |
-
msgid "Save your changes."
|
871 |
-
msgstr ""
|
872 |
|
873 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:20
|
874 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:20
|
875 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:20
|
876 |
msgid "The following settings will be imported:"
|
877 |
-
msgstr ""
|
878 |
|
879 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:22
|
880 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:22
|
881 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:22
|
882 |
msgid "Your old API configurations"
|
883 |
-
msgstr ""
|
884 |
|
885 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:23
|
886 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:23
|
887 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:23
|
888 |
msgid "The user prefix you set"
|
889 |
-
msgstr ""
|
890 |
|
891 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:26
|
892 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:26
|
893 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:26
|
894 |
msgid "Create a backup of the old settings"
|
895 |
-
msgstr ""
|
896 |
|
897 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:29
|
898 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:29
|
899 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:29
|
900 |
msgid "Other changes"
|
901 |
-
msgstr ""
|
902 |
|
903 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:31
|
904 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:31
|
@@ -908,6 +989,10 @@ msgid ""
|
|
908 |
"won't be imported from the previous version. Visit \"Nextend Social Login > "
|
909 |
"Global settings\" to set the new redirect URIs."
|
910 |
msgstr ""
|
|
|
|
|
|
|
|
|
911 |
|
912 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:32
|
913 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:32
|
@@ -916,6 +1001,9 @@ msgid ""
|
|
916 |
"The login button's layout will be changed to a new, more modern look. If you "
|
917 |
"used any custom buttons that won't be imported."
|
918 |
msgstr ""
|
|
|
|
|
|
|
919 |
|
920 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:33
|
921 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:33
|
@@ -925,6 +1013,9 @@ msgid ""
|
|
925 |
"used any custom codes where you used these old functions, you need to remove "
|
926 |
"them."
|
927 |
msgstr ""
|
|
|
|
|
|
|
928 |
|
929 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:35
|
930 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:35
|
@@ -941,7 +1032,7 @@ msgstr ""
|
|
941 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:42
|
942 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:43
|
943 |
msgid "Import Configuration"
|
944 |
-
msgstr ""
|
945 |
|
946 |
#: nextend-facebook-connect-new/providers/facebook/admin/settings.php:26
|
947 |
msgid "App ID"
|
@@ -955,7 +1046,7 @@ msgstr "App ID"
|
|
955 |
#: nextend-social-connect-pro-new/providers/linkedin/admin/settings.php:25
|
956 |
#: nextend-social-connect-pro-new/providers/linkedin/admin/settings.php:37
|
957 |
msgid "Required"
|
958 |
-
msgstr ""
|
959 |
|
960 |
#: nextend-facebook-connect-new/providers/facebook/admin/settings.php:32
|
961 |
#: nextend-facebook-connect-new/providers/google/admin/settings.php:33
|
@@ -963,61 +1054,54 @@ msgstr ""
|
|
963 |
#: nextend-social-connect-pro-new/providers/linkedin/admin/settings.php:31
|
964 |
#, php-format
|
965 |
msgid ""
|
966 |
-
"If you are not sure what is your %s, please head over to <a href=\"%s"
|
967 |
"\">Getting Started</a>"
|
968 |
msgstr ""
|
|
|
|
|
969 |
|
970 |
#: nextend-facebook-connect-new/providers/facebook/admin/settings.php:38
|
971 |
msgid "App Secret"
|
972 |
msgstr "App Secret"
|
973 |
|
974 |
-
#: nextend-facebook-connect-new/providers/facebook/
|
975 |
-
#: nextend-facebook-connect-new/providers/google/admin/settings.php:51
|
976 |
-
#: nextend-facebook-connect-new/providers/twitter/admin/settings.php:50
|
977 |
-
#: nextend-social-connect-pro-new/providers/linkedin/admin/settings.php:49
|
978 |
-
msgid "Other settings"
|
979 |
-
msgstr ""
|
980 |
-
|
981 |
-
#: nextend-facebook-connect-new/providers/facebook/admin/settings.php:57
|
982 |
-
#: nextend-facebook-connect-new/providers/google/admin/settings.php:56
|
983 |
-
#: nextend-facebook-connect-new/providers/twitter/admin/settings.php:55
|
984 |
-
#: nextend-social-connect-pro-new/providers/linkedin/admin/settings.php:54
|
985 |
-
msgid "Username prefix on register"
|
986 |
-
msgstr ""
|
987 |
-
|
988 |
-
#: nextend-facebook-connect-new/providers/facebook/facebook.php:50
|
989 |
msgid "Continue with <b>Facebook</b>"
|
990 |
msgstr "Folytatás a <b>Facebookkal</b>"
|
991 |
|
992 |
-
#: nextend-facebook-connect-new/providers/facebook/facebook.php:
|
993 |
msgid "Link account with <b>Facebook</b>"
|
994 |
-
msgstr ""
|
995 |
|
996 |
-
#: nextend-facebook-connect-new/providers/facebook/facebook.php:
|
997 |
msgid "Unlink account from <b>Facebook</b>"
|
998 |
-
msgstr ""
|
999 |
|
1000 |
-
#: nextend-facebook-connect-new/providers/facebook/facebook.php:
|
1001 |
-
#: nextend-facebook-connect-new/providers/google/google.php:
|
1002 |
-
#: nextend-facebook-connect-new/providers/twitter/twitter.php:
|
1003 |
-
#: nextend-social-connect-pro-new/providers/linkedin/linkedin.php:
|
1004 |
#, php-format
|
1005 |
-
msgid "
|
|
|
1006 |
msgstr ""
|
|
|
|
|
1007 |
|
1008 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:16
|
1009 |
msgid ""
|
1010 |
"If you don't have a project yet, you'll need to create one. You can do this "
|
1011 |
"by clicking on the blue \"Create project\" button on the right side"
|
1012 |
msgstr ""
|
|
|
|
|
1013 |
|
1014 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:17
|
1015 |
msgid "Name your project and then click on the Create button"
|
1016 |
-
msgstr ""
|
1017 |
|
1018 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:18
|
1019 |
msgid "Once you have a project, you'll end up in the dashboard."
|
1020 |
-
msgstr ""
|
1021 |
|
1022 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:19
|
1023 |
msgid ""
|
@@ -1032,6 +1116,8 @@ msgid ""
|
|
1032 |
"Go to the OAuth consent screen tab and enter a product name and provide the "
|
1033 |
"Privacy Policy URL, then click on the save button."
|
1034 |
msgstr ""
|
|
|
|
|
1035 |
|
1036 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:21
|
1037 |
msgid ""
|
@@ -1045,11 +1131,11 @@ msgstr ""
|
|
1045 |
|
1046 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:22
|
1047 |
msgid "Your application type should be \"Web application\""
|
1048 |
-
msgstr ""
|
1049 |
|
1050 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:23
|
1051 |
msgid "Name your application"
|
1052 |
-
msgstr ""
|
1053 |
|
1054 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:25
|
1055 |
msgid "Click on the Create button"
|
@@ -1068,11 +1154,11 @@ msgstr ""
|
|
1068 |
|
1069 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:7
|
1070 |
msgid "Import Google configuration"
|
1071 |
-
msgstr ""
|
1072 |
|
1073 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:14
|
1074 |
msgid "If you have more projects, select the one where your app is."
|
1075 |
-
msgstr ""
|
1076 |
|
1077 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:15
|
1078 |
msgid "Click on Credentials at the left-hand menu then select your app."
|
@@ -1090,17 +1176,17 @@ msgstr "Client ID"
|
|
1090 |
msgid "Client Secret"
|
1091 |
msgstr "Client Secret"
|
1092 |
|
1093 |
-
#: nextend-facebook-connect-new/providers/google/google.php:
|
1094 |
msgid "Continue with <b>Google</b>"
|
1095 |
msgstr "Folytatás a <b>Google-el</b>"
|
1096 |
|
1097 |
-
#: nextend-facebook-connect-new/providers/google/google.php:
|
1098 |
msgid "Link account with <b>Google</b>"
|
1099 |
-
msgstr ""
|
1100 |
|
1101 |
-
#: nextend-facebook-connect-new/providers/google/google.php:
|
1102 |
msgid "Unlink account from <b>Google</b>"
|
1103 |
-
msgstr ""
|
1104 |
|
1105 |
#: nextend-facebook-connect-new/providers/twitter/admin/getting-started.php:16
|
1106 |
msgid "Click on the \"Create New App\" button"
|
@@ -1136,14 +1222,16 @@ msgstr ""
|
|
1136 |
msgid ""
|
1137 |
"Go to the Keys and Access Tokens tab and find the Consumer Key and Secret"
|
1138 |
msgstr ""
|
|
|
|
|
1139 |
|
1140 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:7
|
1141 |
msgid "Import Twitter configuration"
|
1142 |
-
msgstr ""
|
1143 |
|
1144 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:15
|
1145 |
msgid "Go to the Settings tab."
|
1146 |
-
msgstr ""
|
1147 |
|
1148 |
#: nextend-facebook-connect-new/providers/twitter/admin/settings.php:25
|
1149 |
msgid "Consumer Key"
|
@@ -1153,21 +1241,21 @@ msgstr "Consumer Key"
|
|
1153 |
msgid "Consumer Secret"
|
1154 |
msgstr "Consumer Secret"
|
1155 |
|
1156 |
-
#: nextend-facebook-connect-new/providers/twitter/twitter.php:
|
1157 |
msgid "Continue with <b>Twitter</b>"
|
1158 |
msgstr "Folytatás a <b>Twitterrel</b>"
|
1159 |
|
1160 |
-
#: nextend-facebook-connect-new/providers/twitter/twitter.php:
|
1161 |
msgid "Link account with <b>Twitter</b>"
|
1162 |
-
msgstr ""
|
1163 |
|
1164 |
-
#: nextend-facebook-connect-new/providers/twitter/twitter.php:
|
1165 |
msgid "Unlink account from <b>Twitter</b>"
|
1166 |
-
msgstr ""
|
1167 |
|
1168 |
-
#: nextend-facebook-connect-new/providers/twitter/twitter.php:
|
1169 |
-
#: nextend-facebook-connect-new/providers/twitter/twitter.php:
|
1170 |
-
#: nextend-facebook-connect-new/providers/twitter/twitter.php:
|
1171 |
#: nextend-social-connect-pro-new/class-provider-extension.php:142
|
1172 |
#: nextend-social-connect-pro-new/class-provider-extension.php:144
|
1173 |
#: nextend-social-connect-pro-new/class-provider-extension.php:147
|
@@ -1178,42 +1266,42 @@ msgstr ""
|
|
1178 |
msgid "ERROR"
|
1179 |
msgstr "HIBA"
|
1180 |
|
1181 |
-
#: nextend-facebook-connect-new/providers/twitter/twitter.php:
|
1182 |
#: nextend-social-connect-pro-new/class-provider-extension.php:166
|
1183 |
msgid "Please enter an email address."
|
1184 |
msgstr ""
|
1185 |
|
1186 |
-
#: nextend-facebook-connect-new/providers/twitter/twitter.php:
|
1187 |
#: nextend-social-connect-pro-new/class-provider-extension.php:168
|
1188 |
msgid "The email address isn’t correct."
|
1189 |
msgstr ""
|
1190 |
|
1191 |
-
#: nextend-facebook-connect-new/providers/twitter/twitter.php:
|
1192 |
#: nextend-social-connect-pro-new/class-provider-extension.php:171
|
1193 |
msgid "This email is already registered, please choose another one."
|
1194 |
msgstr ""
|
1195 |
|
1196 |
-
#: nextend-facebook-connect-new/providers/twitter/twitter.php:
|
1197 |
#: nextend-social-connect-pro-new/class-provider-extension.php:183
|
1198 |
msgid "Registration Form"
|
1199 |
msgstr ""
|
1200 |
|
1201 |
-
#: nextend-facebook-connect-new/providers/twitter/twitter.php:
|
1202 |
#: nextend-social-connect-pro-new/class-provider-extension.php:183
|
1203 |
msgid "Register For This Site!"
|
1204 |
msgstr ""
|
1205 |
|
1206 |
-
#: nextend-facebook-connect-new/providers/twitter/twitter.php:
|
1207 |
#: nextend-social-connect-pro-new/class-provider-extension.php:197
|
1208 |
msgid "Email"
|
1209 |
msgstr "Email"
|
1210 |
|
1211 |
-
#: nextend-facebook-connect-new/providers/twitter/twitter.php:
|
1212 |
#: nextend-social-connect-pro-new/class-provider-extension.php:202
|
1213 |
msgid "Registration confirmation will be emailed to you."
|
1214 |
msgstr ""
|
1215 |
|
1216 |
-
#: nextend-facebook-connect-new/providers/twitter/twitter.php:
|
1217 |
#: nextend-social-connect-pro-new/class-provider-extension.php:206
|
1218 |
msgid "Register"
|
1219 |
msgstr ""
|
@@ -1234,6 +1322,8 @@ msgstr "Gomb stílus:"
|
|
1234 |
#: nextend-social-connect-pro-new/class-provider-extension.php:78
|
1235 |
msgid "Social login is not allowed with this role!"
|
1236 |
msgstr ""
|
|
|
|
|
1237 |
|
1238 |
#: nextend-social-connect-pro-new/class-provider-extension.php:142
|
1239 |
msgid "Please enter a username."
|
@@ -1263,18 +1353,9 @@ msgid ""
|
|
1263 |
"with Facebook."
|
1264 |
msgstr ""
|
1265 |
|
1266 |
-
#: nextend-social-connect-pro-new/providers/linkedin/admin/getting-started.php:8
|
1267 |
-
#, php-format
|
1268 |
-
msgid ""
|
1269 |
-
"To allow your visitors to log in with their %1$s account, first you must "
|
1270 |
-
"create a %1$s App. The following guide will help you through the %1$s App "
|
1271 |
-
"creation process. After you created your %1$s App, head over to \"Settings\" "
|
1272 |
-
"and configure the given \"%2$s\" and \"%3$s\" according to your %1$s App."
|
1273 |
-
msgstr ""
|
1274 |
-
|
1275 |
#: nextend-social-connect-pro-new/providers/linkedin/admin/getting-started.php:15
|
1276 |
msgid "Locate the yellow \"Create application\" button and click on it."
|
1277 |
-
msgstr ""
|
1278 |
|
1279 |
#: nextend-social-connect-pro-new/providers/linkedin/admin/getting-started.php:16
|
1280 |
msgid "Fill the fields marked with *"
|
@@ -1309,32 +1390,34 @@ msgid ""
|
|
1309 |
"You probably want to enable the \"r_emailaddress\" under the Default "
|
1310 |
"Application Permissions"
|
1311 |
msgstr ""
|
|
|
|
|
1312 |
|
1313 |
#: nextend-social-connect-pro-new/providers/linkedin/admin/getting-started.php:23
|
1314 |
msgid "Hit update to save the changes"
|
1315 |
-
msgstr ""
|
1316 |
|
1317 |
-
#: nextend-social-connect-pro-new/providers/linkedin/linkedin.php:
|
1318 |
msgid "Continue with <b>LinkedIn</b>"
|
1319 |
msgstr "Folytatás a <b>LinkedInnel</b>"
|
1320 |
|
1321 |
-
#: nextend-social-connect-pro-new/providers/linkedin/linkedin.php:
|
1322 |
msgid "Link account with <b>LinkedIn</b>"
|
1323 |
-
msgstr ""
|
1324 |
|
1325 |
-
#: nextend-social-connect-pro-new/providers/linkedin/linkedin.php:
|
1326 |
msgid "Unlink account from <b>LinkedIn</b>"
|
1327 |
-
msgstr ""
|
1328 |
|
1329 |
#: nextend-social-connect-pro-new/template-parts/login-layout-above-separator.php:9
|
1330 |
#: nextend-social-connect-pro-new/template-parts/login-layout-below-separator.php:9
|
1331 |
msgid "OR"
|
1332 |
-
msgstr ""
|
1333 |
|
1334 |
#: nextend-social-connect-pro-new/template-parts/woocommerce-edit-account-after.php:1
|
1335 |
#: nextend-social-connect-pro-new/template-parts/woocommerce-edit-account-before.php:1
|
1336 |
msgid "Social accounts"
|
1337 |
-
msgstr ""
|
1338 |
|
1339 |
#~ msgctxt "App creation"
|
1340 |
#~ msgid "Create %"
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
+
"Project-Id-Version: nextend-facebook-connect\n"
|
4 |
+
"POT-Creation-Date: 2018-02-27 18:12+0100\n"
|
5 |
+
"PO-Revision-Date: 2018-02-27 18:12+0100\n"
|
6 |
"Last-Translator: \n"
|
7 |
+
"Language-Team: nextend\n"
|
8 |
"Language: hu\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
82 |
|
83 |
#: nextend-facebook-connect-new/admin/templates-provider/buttons.php:82
|
84 |
msgid "Link label"
|
85 |
+
msgstr "Profil összekapcsolás felirat"
|
86 |
|
87 |
#: nextend-facebook-connect-new/admin/templates-provider/buttons.php:94
|
88 |
msgid "Unlink label"
|
108 |
|
109 |
#: nextend-facebook-connect-new/admin/templates-provider/buttons.php:167
|
110 |
#: nextend-facebook-connect-new/admin/templates-provider/settings-pro.php:122
|
111 |
+
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:232
|
112 |
#: nextend-facebook-connect-new/admin/templates/global-settings.php:103
|
113 |
#: nextend-facebook-connect-new/providers/facebook/admin/settings.php:48
|
114 |
#: nextend-facebook-connect-new/providers/google/admin/settings.php:47
|
133 |
msgid "Usage"
|
134 |
msgstr "Használat"
|
135 |
|
136 |
+
#: nextend-facebook-connect-new/admin/templates-provider/settings-other.php:9
|
137 |
+
msgid "Other settings"
|
138 |
+
msgstr "Egyéb beállítások"
|
139 |
+
|
140 |
+
#: nextend-facebook-connect-new/admin/templates-provider/settings-other.php:14
|
141 |
+
msgid "Username prefix on register"
|
142 |
+
msgstr "Felhasználónév előtag regisztrációkor"
|
143 |
+
|
144 |
+
#: nextend-facebook-connect-new/admin/templates-provider/settings-other.php:20
|
145 |
+
msgid "Fallback username prefix on register"
|
146 |
+
msgstr ""
|
147 |
+
|
148 |
+
#: nextend-facebook-connect-new/admin/templates-provider/settings-other.php:23
|
149 |
+
msgid "Used when username is invalid"
|
150 |
+
msgstr ""
|
151 |
+
|
152 |
#: nextend-facebook-connect-new/admin/templates-provider/settings-pro.php:16
|
153 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:14
|
154 |
msgid "PRO settings"
|
189 |
#: nextend-facebook-connect-new/admin/templates-provider/settings-pro.php:67
|
190 |
#: nextend-facebook-connect-new/admin/templates/global-settings.php:50
|
191 |
#: nextend-facebook-connect-new/admin/templates/providers.php:33
|
192 |
+
#: nextend-facebook-connect-new/includes/provider.php:900
|
193 |
msgid "Disabled"
|
194 |
msgstr "Kikapcsolva"
|
195 |
|
219 |
|
220 |
#: nextend-facebook-connect-new/admin/templates-provider/usage.php:21
|
221 |
msgid "Simple link"
|
222 |
+
msgstr "Egyszerű link"
|
223 |
|
224 |
#: nextend-facebook-connect-new/admin/templates-provider/usage.php:24
|
225 |
msgid "Click here to login or register"
|
227 |
|
228 |
#: nextend-facebook-connect-new/admin/templates-provider/usage.php:29
|
229 |
msgid "Image button"
|
230 |
+
msgstr "Gomb képpel"
|
231 |
|
232 |
#: nextend-facebook-connect-new/admin/templates-provider/usage.php:32
|
233 |
msgid "Image url"
|
234 |
+
msgstr "Kép URL"
|
235 |
|
236 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:23
|
237 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:27
|
238 |
msgid "Login form button style"
|
239 |
+
msgstr "Login gomb stílusa"
|
240 |
|
241 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:37
|
242 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:113
|
248 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:44
|
249 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:48
|
250 |
msgid "Login layout"
|
251 |
+
msgstr "Login elrendezése"
|
252 |
|
253 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:52
|
254 |
msgid "Below"
|
287 |
#, php-format
|
288 |
msgid "You need to turn on the ' %1$s > %2$s > %3$s ' for this feature to work"
|
289 |
msgstr ""
|
290 |
+
"Ahhoz, hogy ez a funkció működjön, be kell kapcsolnod a ' %1$s > %2$s > %3$s "
|
291 |
+
"'-t."
|
292 |
|
293 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:95
|
294 |
msgid "Discussion"
|
306 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:120
|
307 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:124
|
308 |
msgid "WooCommerce login form"
|
309 |
+
msgstr "WooCommerce belépési űrlap"
|
310 |
|
311 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:127
|
312 |
msgid "No Connect button in login form"
|
313 |
+
msgstr "Ne legyen összekapcsoló gomb a belépő űrlapnál"
|
314 |
|
315 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:130
|
316 |
msgid "Connect button before login form"
|
332 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:143
|
333 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:147
|
334 |
msgid "WooCommerce billing form"
|
335 |
+
msgstr "WooCommerce számlázási űrlap"
|
336 |
|
337 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:150
|
338 |
msgid "No Connect button in billing form"
|
339 |
+
msgstr "Ne legyen összekapcsoló gomb a számlázási űrlapnál"
|
340 |
|
341 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:153
|
342 |
msgid "Connect button before billing form"
|
349 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:165
|
350 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:169
|
351 |
msgid "WooCommerce account details"
|
352 |
+
msgstr "WooCommerce fiók részletes beállítások"
|
353 |
|
354 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:172
|
355 |
msgid "Link buttons before account details"
|
356 |
+
msgstr "Összekapcsoló gombok a profil részletes beállításai előtt"
|
357 |
|
358 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:177
|
359 |
msgid "Link buttons after account details"
|
360 |
+
msgstr "Összekapcsoló gombok a profil részletes beállításai után"
|
361 |
|
362 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:184
|
363 |
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:188
|
364 |
msgid "WooCommerce button style"
|
365 |
+
msgstr "WooCommerce gomb stílusa"
|
366 |
+
|
367 |
+
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:205
|
368 |
+
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:209
|
369 |
+
msgid "Registration notification sent to"
|
370 |
+
msgstr ""
|
371 |
+
|
372 |
+
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:212
|
373 |
+
msgid "WordPress default"
|
374 |
+
msgstr ""
|
375 |
+
|
376 |
+
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:215
|
377 |
+
msgid "Nobody"
|
378 |
+
msgstr ""
|
379 |
+
|
380 |
+
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:218
|
381 |
+
msgid "User"
|
382 |
+
msgstr ""
|
383 |
+
|
384 |
+
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:221
|
385 |
+
msgid "Admin"
|
386 |
+
msgstr ""
|
387 |
+
|
388 |
+
#: nextend-facebook-connect-new/admin/templates/global-settings-pro.php:224
|
389 |
+
msgid "User and Admin"
|
390 |
msgstr ""
|
391 |
|
392 |
#: nextend-facebook-connect-new/admin/templates/global-settings.php:43
|
396 |
|
397 |
#: nextend-facebook-connect-new/admin/templates/global-settings.php:53
|
398 |
#: nextend-facebook-connect-new/admin/templates/providers.php:36
|
399 |
+
#: nextend-facebook-connect-new/includes/provider.php:903
|
400 |
msgid "Enabled"
|
401 |
msgstr "Bekapcsolva"
|
402 |
|
407 |
#: nextend-facebook-connect-new/admin/templates/global-settings.php:72
|
408 |
#: nextend-facebook-connect-new/admin/templates/global-settings.php:93
|
409 |
msgid "Use custom"
|
410 |
+
msgstr "Egyedi gomb használata"
|
411 |
|
412 |
#: nextend-facebook-connect-new/admin/templates/global-settings.php:80
|
413 |
msgid "Fixed redirect url for register"
|
428 |
|
429 |
#: nextend-facebook-connect-new/admin/templates/menu.php:6
|
430 |
msgid "Providers"
|
431 |
+
msgstr "Providerek"
|
432 |
|
433 |
#: nextend-facebook-connect-new/admin/templates/menu.php:8
|
434 |
msgid "Global Settings"
|
443 |
"You don’t have sufficient permissions to install and activate plugins. "
|
444 |
"Please contact your site’s administrator!"
|
445 |
msgstr ""
|
446 |
+
"Nincs megfelelő jogosultságod ahhoz, hogy telepíts és bekapcsolj pluginokat. "
|
447 |
+
"Lépj kapcsolatba az oldalad adminisztrátorával a további teendőkkel "
|
448 |
+
"kapcsolatban!"
|
449 |
|
450 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:22
|
451 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:32
|
458 |
"Pro Addon is installed but not activated. To be able to use the Pro "
|
459 |
"features, you need to activate it."
|
460 |
msgstr ""
|
461 |
+
"A Pro Kiegészítő telepítve van, de nincs aktiválva. Ahhoz, hogy használjasd "
|
462 |
+
"a Pro funkciókat aktiválnod kell a Pro Kiegészítőt."
|
463 |
|
464 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:37
|
465 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:215
|
469 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:48
|
470 |
#: nextend-facebook-connect-new/admin/templates/pro.php:43
|
471 |
msgid "Pro Addon is not installed"
|
472 |
+
msgstr "A Pro Kiegészítő nincs telepítve"
|
473 |
|
474 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:50
|
475 |
msgid ""
|
476 |
"To access the Pro features, you need to install and activate the Pro Addon."
|
477 |
msgstr ""
|
478 |
+
"Ahhoz, hogy hozzáférj a Pro funkciókhoz fel kell telepítened és aktiválnod "
|
479 |
+
"kell a Pro Kiegészítőt."
|
480 |
|
481 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:59
|
482 |
#, php-format
|
486 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:60
|
487 |
#: nextend-facebook-connect-new/admin/templates/pro.php:47
|
488 |
msgid "Install Pro Addon"
|
489 |
+
msgstr "Pro Kiegészítő telepítése"
|
490 |
|
491 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:94
|
492 |
msgid "Activating..."
|
509 |
|
510 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:189
|
511 |
msgid "License key"
|
512 |
+
msgstr "Licensz kulcs"
|
513 |
|
514 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:206
|
515 |
msgid "Pro Addon is installed and activated"
|
516 |
+
msgstr "A Pro Kiegészítő telepítve és aktiválva"
|
517 |
|
518 |
#: nextend-facebook-connect-new/admin/templates/pro-addon.php:208
|
519 |
msgid ""
|
520 |
"You installed and activated the Pro Addon. If you don’t want to use it "
|
521 |
"anymore, you can deauthorize using the button below."
|
522 |
msgstr ""
|
523 |
+
"A Pro Kiegészítő fel van telepítve és aktiválva van. Ha nem akarod tovább "
|
524 |
+
"használni, visszavonhatod az aktiválást a lenti gombra kattintva."
|
525 |
|
526 |
#: nextend-facebook-connect-new/admin/templates/pro.php:8
|
527 |
msgid "Get Pro Addon to unlock more features"
|
528 |
msgstr "Vásárold meg a Pro Kiegészítőt, hogy még több funkcióhoz juss"
|
529 |
|
530 |
#: nextend-facebook-connect-new/admin/templates/pro.php:9
|
531 |
+
#, php-format
|
532 |
msgid ""
|
533 |
+
"The features below are available in %s Pro Addon. Get it today and tweak the "
|
534 |
+
"awesome settings."
|
535 |
msgstr ""
|
536 |
+
"Az alábbi funkciók a %s Pro Kiegészítőben érhetőek el. Vásárold meg még ma, "
|
537 |
+
"hogy hozzáférj a fantasztikus új beállításokhoz."
|
538 |
|
539 |
#: nextend-facebook-connect-new/admin/templates/pro.php:10
|
540 |
msgid ""
|
541 |
"If you already have a license, you can Authorize your Pro Addon. Otherwise "
|
542 |
"you can purchase it using the button below."
|
543 |
msgstr ""
|
544 |
+
"Ha már van licenszed engedélyezheted a Pro Kiegészítődet. Ha nincs licenszed "
|
545 |
+
"vásárolhatsz a lenti gombra kattintva. "
|
546 |
|
547 |
#: nextend-facebook-connect-new/admin/templates/pro.php:14
|
548 |
msgid "Buy Pro Addon"
|
554 |
|
555 |
#: nextend-facebook-connect-new/admin/templates/pro.php:25
|
556 |
msgid "Pro Addon is not activated"
|
557 |
+
msgstr "A Pro Kiegészítő nincs aktiválva"
|
558 |
|
559 |
#: nextend-facebook-connect-new/admin/templates/pro.php:26
|
560 |
#: nextend-facebook-connect-new/admin/templates/pro.php:44
|
569 |
|
570 |
#: nextend-facebook-connect-new/admin/templates/providers.php:27
|
571 |
msgid "Not Configured"
|
572 |
+
msgstr "Nincs beállítva"
|
573 |
|
574 |
#: nextend-facebook-connect-new/admin/templates/providers.php:30
|
575 |
msgid "Not Tested"
|
577 |
|
578 |
#: nextend-facebook-connect-new/admin/templates/providers.php:39
|
579 |
msgid "Legacy"
|
580 |
+
msgstr "Örökölt"
|
581 |
|
582 |
#: nextend-facebook-connect-new/admin/templates/providers.php:51
|
583 |
msgid "Upgrade Now"
|
585 |
|
586 |
#: nextend-facebook-connect-new/admin/templates/providers.php:66
|
587 |
msgid "Test to Enable"
|
588 |
+
msgstr "Tesztelés az Engedélyezéshez"
|
589 |
|
590 |
#: nextend-facebook-connect-new/admin/templates/providers.php:74
|
591 |
+
#: nextend-facebook-connect-new/includes/provider.php:932
|
592 |
msgid "Enable"
|
593 |
msgstr "Bekapcsolás"
|
594 |
|
595 |
#: nextend-facebook-connect-new/admin/templates/providers.php:86
|
596 |
+
#: nextend-facebook-connect-new/includes/provider.php:940
|
597 |
msgid "Disable"
|
598 |
msgstr "Kikapcsolás"
|
599 |
|
600 |
#: nextend-facebook-connect-new/admin/templates/providers.php:97
|
601 |
msgid "Import"
|
602 |
+
msgstr "Importálás"
|
603 |
|
604 |
#: nextend-facebook-connect-new/admin/templates/providers.php:116
|
605 |
msgid "Saving..."
|
606 |
+
msgstr "Mentés..."
|
607 |
|
608 |
#: nextend-facebook-connect-new/admin/templates/providers.php:117
|
609 |
msgid "Saving failed"
|
610 |
+
msgstr "A mentés nem sikerült"
|
611 |
|
612 |
#: nextend-facebook-connect-new/admin/templates/providers.php:118
|
613 |
msgid "Order Saved"
|
614 |
+
msgstr "Sorrend elmentve"
|
615 |
|
616 |
+
#: nextend-facebook-connect-new/includes/provider.php:325
|
617 |
+
#: nextend-facebook-connect-new/includes/provider.php:544
|
618 |
+
#: nextend-facebook-connect-new/includes/provider.php:555
|
619 |
msgid "Authentication successful"
|
620 |
msgstr "Hitelesítés sikeres"
|
621 |
|
622 |
+
#: nextend-facebook-connect-new/includes/provider.php:373
|
623 |
#, php-format
|
624 |
msgid ""
|
625 |
+
"Your %1$s account is successfully linked with your account. Now you can sign "
|
626 |
+
"in with %2$s easily."
|
627 |
msgstr ""
|
628 |
+
"A(z) %1$s fiók sikeresen össze lett kapcsolva a fiókoddal. Már könnyedén be "
|
629 |
+
"tudsz lépni a %2$s fiókoddal is."
|
630 |
|
631 |
+
#: nextend-facebook-connect-new/includes/provider.php:377
|
632 |
#, php-format
|
633 |
msgid ""
|
634 |
"This %s account is already linked with other account. Linking process failed!"
|
635 |
msgstr ""
|
636 |
+
"Az %s fiók már haszálva van egy másik közösségi fiókkal. Az összekapcsolási "
|
637 |
+
"folyamat sikertelen!"
|
638 |
|
639 |
+
#: nextend-facebook-connect-new/includes/provider.php:483
|
640 |
msgid "Authentication error"
|
641 |
msgstr "Hitelesítési hiba"
|
642 |
|
643 |
+
#: nextend-facebook-connect-new/includes/provider.php:492
|
644 |
msgid "Unlink successful."
|
645 |
+
msgstr "Szétkapcsolás sikeres"
|
646 |
|
647 |
+
#: nextend-facebook-connect-new/includes/provider.php:762
|
648 |
+
#: nextend-facebook-connect-new/includes/provider.php:769
|
649 |
msgid "The test was successful"
|
650 |
+
msgstr "A teszt sikeres volt"
|
651 |
|
652 |
+
#: nextend-facebook-connect-new/includes/provider.php:810
|
653 |
msgid "Authentication failed"
|
654 |
msgstr "Hitelesítés sikertelen"
|
655 |
|
656 |
+
#: nextend-facebook-connect-new/includes/provider.php:881
|
657 |
msgid "Your configuration needs testing"
|
658 |
+
msgstr "A konfigurációt le kell tesztelni"
|
659 |
|
660 |
+
#: nextend-facebook-connect-new/includes/provider.php:882
|
661 |
msgid ""
|
662 |
"Before you can start letting your users register with your app it needs to "
|
663 |
"be tested. This test makes sure that no users will have troubles with the "
|
671 |
"felugró ablakban, nézd meg az appodat vagy a kimásolt hitelesítő adatokat. "
|
672 |
"Ha nincs hibaüzenet, az azt jelenti, hogy minden rendben van."
|
673 |
|
674 |
+
#: nextend-facebook-connect-new/includes/provider.php:887
|
675 |
msgid "Test the Configuration"
|
676 |
+
msgstr "Teszteld le a Konfigurációt"
|
677 |
|
678 |
+
#: nextend-facebook-connect-new/includes/provider.php:888
|
679 |
+
#: nextend-facebook-connect-new/includes/provider.php:925
|
680 |
msgid "Please save your changes before testing."
|
681 |
msgstr ""
|
682 |
|
683 |
+
#: nextend-facebook-connect-new/includes/provider.php:896
|
684 |
msgid "Works Fine"
|
685 |
msgstr "Megfelelően Működik"
|
686 |
|
687 |
+
#: nextend-facebook-connect-new/includes/provider.php:910
|
688 |
#, php-format
|
689 |
msgid ""
|
690 |
"This provider is currently disabled, which means that users can’t register "
|
691 |
"or login via their %s account."
|
692 |
msgstr ""
|
693 |
+
"Ez a provider jelenleg nincs bekapcsolva, ami azt jelenti, hogy a "
|
694 |
+
"felhasználók nem tudnak regisztrálni vagy belépni a %s fiókjukkal."
|
695 |
|
696 |
+
#: nextend-facebook-connect-new/includes/provider.php:913
|
697 |
#, php-format
|
698 |
msgid ""
|
699 |
"This provider works fine, but you can test it again. If you don’t want to "
|
700 |
"let users register or login with %s anymore you can disable it."
|
701 |
msgstr ""
|
702 |
+
"A provider megfelelően működik, de újra letesztelheted. Ha nem a "
|
703 |
+
"továbbiakban nem akarod, hogy regisztráljanak vagy belépjenek a %s "
|
704 |
+
"fiókjukkal kikapcsolhatod a providertt."
|
705 |
|
706 |
+
#: nextend-facebook-connect-new/includes/provider.php:916
|
707 |
#, php-format
|
708 |
msgid ""
|
709 |
"This provider is currently enabled, which means that users can register or "
|
710 |
"login via their %s account."
|
711 |
msgstr ""
|
712 |
+
"Ez a provider jelenleg be vankapcsolva, ami azt jelenti, hogy a felhasználók "
|
713 |
+
"regisztrálhatnak és beléphetnek a %s fiókjukkal."
|
714 |
|
715 |
+
#: nextend-facebook-connect-new/includes/provider.php:924
|
716 |
msgid "Test Again"
|
717 |
msgstr "Teszteld Újra"
|
718 |
|
728 |
"%4$s vagy újabb). Kérlek frissítd a legújabb verzióra! A Pro Kiegészítő "
|
729 |
"kikapcsolva."
|
730 |
|
731 |
+
#: nextend-facebook-connect-new/nextend-social-login.php:260
|
732 |
#, php-format
|
733 |
msgid ""
|
734 |
"%s took the place of Nextend Google Connect. You can delete Nextend Google "
|
737 |
"%s átvette a Nextend Google Connect helyét. Letörölheted a Nextend Google "
|
738 |
"Connect plguint, mivel már nincs rá szükség."
|
739 |
|
740 |
+
#: nextend-facebook-connect-new/nextend-social-login.php:271
|
741 |
#, php-format
|
742 |
msgid ""
|
743 |
"%s took the place of Nextend Twitter Connect. You can delete Nextend Twitter "
|
746 |
"%s átvette a Nextend Twitter Connect helyét. Letörölheted a Nextend Twitter "
|
747 |
"Connect plguint, mivel már nincs rá szükség."
|
748 |
|
749 |
+
#: nextend-facebook-connect-new/nextend-social-login.php:364
|
750 |
msgid "You have logged in successfully."
|
751 |
msgstr ""
|
752 |
|
753 |
+
#: nextend-facebook-connect-new/nextend-social-login.php:441
|
754 |
msgid "Social Login"
|
755 |
+
msgstr "Közösségi belépés"
|
756 |
|
757 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:7
|
758 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:9
|
759 |
#: nextend-facebook-connect-new/providers/twitter/admin/getting-started.php:9
|
760 |
+
#: nextend-social-connect-pro-new/providers/linkedin/admin/getting-started.php:8
|
761 |
#, php-format
|
762 |
msgid ""
|
763 |
"To allow your visitors to log in with their %1$s account, first you must "
|
766 |
"\"Settings\" and configure the given \"%2$s\" and \"%3$s\" according to your "
|
767 |
"%1$s App."
|
768 |
msgstr ""
|
769 |
+
"Ahhoz. hogy a felhasználók beléphessenek a %1$s fiókjukkal, először létre "
|
770 |
+
"kell hoznod egy %1$s Appot. Az alábbi útmutató végig vezet a %1$s App "
|
771 |
+
"létrehozás folyamatán. Miután a(z) %1$s fiókod elkészült, menj a "
|
772 |
+
"\"Beállítások\" fülre és állítsd be a \"%2$s\"-t és \"%3$s\"-t a %1$s Appod "
|
773 |
+
"alapján."
|
774 |
|
775 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:9
|
776 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:11
|
787 |
#: nextend-social-connect-pro-new/providers/linkedin/admin/getting-started.php:13
|
788 |
#, php-format
|
789 |
msgid "Navigate to %s"
|
790 |
+
msgstr "Látogasd meg ezt az oldalt: %s"
|
791 |
|
792 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:13
|
793 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:15
|
795 |
#: nextend-social-connect-pro-new/providers/linkedin/admin/getting-started.php:14
|
796 |
#, php-format
|
797 |
msgid "Log in with your %s credentials if you are not logged in"
|
798 |
+
msgstr "Lépj be a %s fiókoddal ha még nem vagy belépve."
|
799 |
|
800 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:14
|
801 |
msgid "Click on the \"Add a New App\" button"
|
816 |
"Move your mouse over Facebook Login and click on the appearing \"Set Up\" "
|
817 |
"button"
|
818 |
msgstr ""
|
819 |
+
"Vidd a kurzort a \"Facebook Login\" doboz fölé és kattints a megjelenő \"Set "
|
820 |
+
"Up\" gombra."
|
821 |
|
822 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:18
|
823 |
msgid "Choose Web"
|
836 |
|
837 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:21
|
838 |
msgid "In the left sidebar, click on \"Facebook Login\""
|
839 |
+
msgstr "A bal oldali menüben kattints a \"Facebook Login\" feliratra"
|
840 |
|
841 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:22
|
842 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:24
|
852 |
|
853 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:24
|
854 |
msgid "In the top of the left sidebar, click on \"Settings\""
|
855 |
+
msgstr "A bal oldali menü tetején kattints a \"Settings\"-re"
|
856 |
|
857 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:25
|
858 |
msgid ""
|
859 |
"Here you can see your \"APP ID\" and you can see your \"App secret\" if you "
|
860 |
"click on the \"Show\" button. These will be needed in plugin's settings."
|
861 |
msgstr ""
|
862 |
+
"Itt találod az \"App ID\"-t és az \"App Secret\"-et, ha a \"Show\" gombra "
|
863 |
+
"kattintasz. Ezekre lesz szükséged a plugin beállításainál."
|
864 |
|
865 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:26
|
866 |
msgid "Enter your domain name to the App Domains"
|
877 |
"információkat gyűjtesz és mihez kezdesz velük."
|
878 |
|
879 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:28
|
880 |
+
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:17
|
881 |
+
#: nextend-facebook-connect-new/providers/google/admin/import.php:17
|
882 |
+
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:17
|
883 |
+
msgid "Save your changes."
|
884 |
+
msgstr "Mentsd el a módosításaidat."
|
885 |
|
886 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:29
|
887 |
msgid ""
|
888 |
"Your application is currently private, which means that only you can log in "
|
889 |
"with it. In the left sidebar choose \"App Review\" and make your App public"
|
890 |
msgstr ""
|
891 |
+
"Az applikációd jelenleg privát, ami azt jelenti, hogy csak te tudsz belépni "
|
892 |
+
"vele. A bal oldali menüben válaszd az \"App Review\" gombot és tedd "
|
893 |
+
"nyilvánossá az Appodat."
|
894 |
|
895 |
#: nextend-facebook-connect-new/providers/facebook/admin/getting-started.php:33
|
896 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:30
|
902 |
|
903 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:7
|
904 |
msgid "Import Facebook configuration"
|
905 |
+
msgstr "Facebook konfiguráció importálása"
|
906 |
|
907 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:8
|
908 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:8
|
914 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:10
|
915 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:10
|
916 |
msgid "Important steps before the import"
|
917 |
+
msgstr "Fontos lépések az importálás megkezdése előtt"
|
918 |
|
919 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:11
|
920 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:11
|
922 |
msgid ""
|
923 |
"Make sure that the redirect URI for your app is correct before proceeding."
|
924 |
msgstr ""
|
925 |
+
"A továbblépés előtt győződj meg róla, hogy a \"Redirect URI\" az appodnál "
|
926 |
+
"helyesen van beállítva."
|
927 |
|
928 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:13
|
929 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:13
|
930 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:13
|
931 |
#, php-format
|
932 |
msgid "Visit %s."
|
933 |
+
msgstr "Látogass el ide: %s."
|
934 |
|
935 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:14
|
936 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:14
|
937 |
msgid "Select your app."
|
938 |
+
msgstr "Válaszd ki az appodat."
|
939 |
|
940 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:15
|
941 |
msgid ""
|
942 |
"Go to the Settings menu which you can find below the Facebook Login in the "
|
943 |
"left menu."
|
944 |
msgstr ""
|
945 |
+
"Menj a \"Settings\" menübe a \"Facebook Login\" alatt a bal oldali menüben."
|
946 |
|
947 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:16
|
948 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:16
|
949 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:16
|
950 |
#, php-format
|
951 |
msgid "Make sure that the \"%1$s\" field contains %2$s"
|
952 |
+
msgstr "Győződj meg róla, hogy a \"%1$s\" mező tartalmazza: %2$s"
|
|
|
|
|
|
|
|
|
|
|
|
|
953 |
|
954 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:20
|
955 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:20
|
956 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:20
|
957 |
msgid "The following settings will be imported:"
|
958 |
+
msgstr "Az alábbi beállítások kerülnek importálásra:"
|
959 |
|
960 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:22
|
961 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:22
|
962 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:22
|
963 |
msgid "Your old API configurations"
|
964 |
+
msgstr "A régi API beállításaid"
|
965 |
|
966 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:23
|
967 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:23
|
968 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:23
|
969 |
msgid "The user prefix you set"
|
970 |
+
msgstr "A beállított felhasználónév előtag"
|
971 |
|
972 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:26
|
973 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:26
|
974 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:26
|
975 |
msgid "Create a backup of the old settings"
|
976 |
+
msgstr "Készíts biztonsági mentést a régi beállításokról"
|
977 |
|
978 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:29
|
979 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:29
|
980 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:29
|
981 |
msgid "Other changes"
|
982 |
+
msgstr "Egyéb változások"
|
983 |
|
984 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:31
|
985 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:31
|
989 |
"won't be imported from the previous version. Visit \"Nextend Social Login > "
|
990 |
"Global settings\" to set the new redirect URIs."
|
991 |
msgstr ""
|
992 |
+
"Az átirányítási link már mindegyik providerre egyszerre érvényes, ezért ez a "
|
993 |
+
"beállítás nem lesz importálva a régi verzióból. Látogass el a \"Nextend "
|
994 |
+
"Social Login > Általános beállítások\" fülre az új átirányítási link "
|
995 |
+
"beállításához."
|
996 |
|
997 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:32
|
998 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:32
|
1001 |
"The login button's layout will be changed to a new, more modern look. If you "
|
1002 |
"used any custom buttons that won't be imported."
|
1003 |
msgstr ""
|
1004 |
+
"A belépés gomb kinézete változni fog egy újabb, modernebb változatra. Ha "
|
1005 |
+
"valamilyen egyedi gombot használtál azok a beállítások nem kerülnek "
|
1006 |
+
"importálásra."
|
1007 |
|
1008 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:33
|
1009 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:33
|
1013 |
"used any custom codes where you used these old functions, you need to remove "
|
1014 |
"them."
|
1015 |
msgstr ""
|
1016 |
+
"Az előző verzió PHP függvényei nem érhetőek el a továbbiakban. Ez azt "
|
1017 |
+
"jelenti, hogy ha bármilyen egyedi kódban használtad őket el kell távolítanod "
|
1018 |
+
"a kódot."
|
1019 |
|
1020 |
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:35
|
1021 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:35
|
1032 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:42
|
1033 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:43
|
1034 |
msgid "Import Configuration"
|
1035 |
+
msgstr "Konfiguráció Importálása"
|
1036 |
|
1037 |
#: nextend-facebook-connect-new/providers/facebook/admin/settings.php:26
|
1038 |
msgid "App ID"
|
1046 |
#: nextend-social-connect-pro-new/providers/linkedin/admin/settings.php:25
|
1047 |
#: nextend-social-connect-pro-new/providers/linkedin/admin/settings.php:37
|
1048 |
msgid "Required"
|
1049 |
+
msgstr "Kötelező"
|
1050 |
|
1051 |
#: nextend-facebook-connect-new/providers/facebook/admin/settings.php:32
|
1052 |
#: nextend-facebook-connect-new/providers/google/admin/settings.php:33
|
1054 |
#: nextend-social-connect-pro-new/providers/linkedin/admin/settings.php:31
|
1055 |
#, php-format
|
1056 |
msgid ""
|
1057 |
+
"If you are not sure what is your %1$s, please head over to <a href=\"%2$s"
|
1058 |
"\">Getting Started</a>"
|
1059 |
msgstr ""
|
1060 |
+
"Ha nem vagy benne biztos, hogy mit kell írnod a(z) %1$s mezőbe, menj vissza "
|
1061 |
+
"az <a href=\"%2$s\">Első lépések</a> fülre."
|
1062 |
|
1063 |
#: nextend-facebook-connect-new/providers/facebook/admin/settings.php:38
|
1064 |
msgid "App Secret"
|
1065 |
msgstr "App Secret"
|
1066 |
|
1067 |
+
#: nextend-facebook-connect-new/providers/facebook/facebook.php:49
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1068 |
msgid "Continue with <b>Facebook</b>"
|
1069 |
msgstr "Folytatás a <b>Facebookkal</b>"
|
1070 |
|
1071 |
+
#: nextend-facebook-connect-new/providers/facebook/facebook.php:50
|
1072 |
msgid "Link account with <b>Facebook</b>"
|
1073 |
+
msgstr "Fiók összekapcsolása a <b>Facebook</b>-kal"
|
1074 |
|
1075 |
+
#: nextend-facebook-connect-new/providers/facebook/facebook.php:51
|
1076 |
msgid "Unlink account from <b>Facebook</b>"
|
1077 |
+
msgstr "Szétkapcsolás <b>Facebook</b>-kal"
|
1078 |
|
1079 |
+
#: nextend-facebook-connect-new/providers/facebook/facebook.php:109
|
1080 |
+
#: nextend-facebook-connect-new/providers/google/google.php:71
|
1081 |
+
#: nextend-facebook-connect-new/providers/twitter/twitter.php:72
|
1082 |
+
#: nextend-social-connect-pro-new/providers/linkedin/linkedin.php:68
|
1083 |
#, php-format
|
1084 |
+
msgid ""
|
1085 |
+
"The %1$s entered did not appear to be a valid. Please enter a valid %2$s."
|
1086 |
msgstr ""
|
1087 |
+
"A megadott %1$s nem tűnik helyesnek. Győződj meg róla, hogy a beírt %2$s "
|
1088 |
+
"helyes."
|
1089 |
|
1090 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:16
|
1091 |
msgid ""
|
1092 |
"If you don't have a project yet, you'll need to create one. You can do this "
|
1093 |
"by clicking on the blue \"Create project\" button on the right side"
|
1094 |
msgstr ""
|
1095 |
+
"Ha még nincs projected, újat kell készítened. Ezt megteheted a kék \"Create "
|
1096 |
+
"project\" gombra kattintva a jobb oldalon."
|
1097 |
|
1098 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:17
|
1099 |
msgid "Name your project and then click on the Create button"
|
1100 |
+
msgstr "Adj nevet a projektnek és kattints a \"Create\" gombra"
|
1101 |
|
1102 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:18
|
1103 |
msgid "Once you have a project, you'll end up in the dashboard."
|
1104 |
+
msgstr "Ha van már projekted át leszel irányítva az irányítópultra"
|
1105 |
|
1106 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:19
|
1107 |
msgid ""
|
1116 |
"Go to the OAuth consent screen tab and enter a product name and provide the "
|
1117 |
"Privacy Policy URL, then click on the save button."
|
1118 |
msgstr ""
|
1119 |
+
"Menj az \"OAuth consent screen\" fülre. Írd be a termék nevét és írd be a "
|
1120 |
+
"linket az Adatvédelmi Irányelvek oldalad linkjét. Kattints a Save gombra."
|
1121 |
|
1122 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:21
|
1123 |
msgid ""
|
1131 |
|
1132 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:22
|
1133 |
msgid "Your application type should be \"Web application\""
|
1134 |
+
msgstr "Az applikációd típusa legyen \"Web application\""
|
1135 |
|
1136 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:23
|
1137 |
msgid "Name your application"
|
1138 |
+
msgstr "Adj nevet az alkalmazásodnak"
|
1139 |
|
1140 |
#: nextend-facebook-connect-new/providers/google/admin/getting-started.php:25
|
1141 |
msgid "Click on the Create button"
|
1154 |
|
1155 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:7
|
1156 |
msgid "Import Google configuration"
|
1157 |
+
msgstr "Google konfiguráció importálása"
|
1158 |
|
1159 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:14
|
1160 |
msgid "If you have more projects, select the one where your app is."
|
1161 |
+
msgstr "Ha több projekted van, válaszd ki azt, amelyikben az appod van."
|
1162 |
|
1163 |
#: nextend-facebook-connect-new/providers/google/admin/import.php:15
|
1164 |
msgid "Click on Credentials at the left-hand menu then select your app."
|
1176 |
msgid "Client Secret"
|
1177 |
msgstr "Client Secret"
|
1178 |
|
1179 |
+
#: nextend-facebook-connect-new/providers/google/google.php:38
|
1180 |
msgid "Continue with <b>Google</b>"
|
1181 |
msgstr "Folytatás a <b>Google-el</b>"
|
1182 |
|
1183 |
+
#: nextend-facebook-connect-new/providers/google/google.php:39
|
1184 |
msgid "Link account with <b>Google</b>"
|
1185 |
+
msgstr "Fiók összekapcsolása a <b>Google</b>-lel"
|
1186 |
|
1187 |
+
#: nextend-facebook-connect-new/providers/google/google.php:40
|
1188 |
msgid "Unlink account from <b>Google</b>"
|
1189 |
+
msgstr "Szétkapcsolás <b>Google</b>-lel"
|
1190 |
|
1191 |
#: nextend-facebook-connect-new/providers/twitter/admin/getting-started.php:16
|
1192 |
msgid "Click on the \"Create New App\" button"
|
1222 |
msgid ""
|
1223 |
"Go to the Keys and Access Tokens tab and find the Consumer Key and Secret"
|
1224 |
msgstr ""
|
1225 |
+
"Menj a \"Keys and Access Tokens\" fülre ahol megtalálod a \"Consumer Key\"-t "
|
1226 |
+
"és \"Secret\"-et"
|
1227 |
|
1228 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:7
|
1229 |
msgid "Import Twitter configuration"
|
1230 |
+
msgstr "Twitter konfiguráció importálása"
|
1231 |
|
1232 |
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:15
|
1233 |
msgid "Go to the Settings tab."
|
1234 |
+
msgstr "Menj a \"Settings\" fülre."
|
1235 |
|
1236 |
#: nextend-facebook-connect-new/providers/twitter/admin/settings.php:25
|
1237 |
msgid "Consumer Key"
|
1241 |
msgid "Consumer Secret"
|
1242 |
msgstr "Consumer Secret"
|
1243 |
|
1244 |
+
#: nextend-facebook-connect-new/providers/twitter/twitter.php:39
|
1245 |
msgid "Continue with <b>Twitter</b>"
|
1246 |
msgstr "Folytatás a <b>Twitterrel</b>"
|
1247 |
|
1248 |
+
#: nextend-facebook-connect-new/providers/twitter/twitter.php:40
|
1249 |
msgid "Link account with <b>Twitter</b>"
|
1250 |
+
msgstr "Fiók összekapcsolása a <b>Twitter</b>-rel"
|
1251 |
|
1252 |
+
#: nextend-facebook-connect-new/providers/twitter/twitter.php:41
|
1253 |
msgid "Unlink account from <b>Twitter</b>"
|
1254 |
+
msgstr "Szétkapcsolás <b>Twitter</b>-rel"
|
1255 |
|
1256 |
+
#: nextend-facebook-connect-new/providers/twitter/twitter.php:154
|
1257 |
+
#: nextend-facebook-connect-new/providers/twitter/twitter.php:156
|
1258 |
+
#: nextend-facebook-connect-new/providers/twitter/twitter.php:159
|
1259 |
#: nextend-social-connect-pro-new/class-provider-extension.php:142
|
1260 |
#: nextend-social-connect-pro-new/class-provider-extension.php:144
|
1261 |
#: nextend-social-connect-pro-new/class-provider-extension.php:147
|
1266 |
msgid "ERROR"
|
1267 |
msgstr "HIBA"
|
1268 |
|
1269 |
+
#: nextend-facebook-connect-new/providers/twitter/twitter.php:154
|
1270 |
#: nextend-social-connect-pro-new/class-provider-extension.php:166
|
1271 |
msgid "Please enter an email address."
|
1272 |
msgstr ""
|
1273 |
|
1274 |
+
#: nextend-facebook-connect-new/providers/twitter/twitter.php:156
|
1275 |
#: nextend-social-connect-pro-new/class-provider-extension.php:168
|
1276 |
msgid "The email address isn’t correct."
|
1277 |
msgstr ""
|
1278 |
|
1279 |
+
#: nextend-facebook-connect-new/providers/twitter/twitter.php:159
|
1280 |
#: nextend-social-connect-pro-new/class-provider-extension.php:171
|
1281 |
msgid "This email is already registered, please choose another one."
|
1282 |
msgstr ""
|
1283 |
|
1284 |
+
#: nextend-facebook-connect-new/providers/twitter/twitter.php:168
|
1285 |
#: nextend-social-connect-pro-new/class-provider-extension.php:183
|
1286 |
msgid "Registration Form"
|
1287 |
msgstr ""
|
1288 |
|
1289 |
+
#: nextend-facebook-connect-new/providers/twitter/twitter.php:168
|
1290 |
#: nextend-social-connect-pro-new/class-provider-extension.php:183
|
1291 |
msgid "Register For This Site!"
|
1292 |
msgstr ""
|
1293 |
|
1294 |
+
#: nextend-facebook-connect-new/providers/twitter/twitter.php:174
|
1295 |
#: nextend-social-connect-pro-new/class-provider-extension.php:197
|
1296 |
msgid "Email"
|
1297 |
msgstr "Email"
|
1298 |
|
1299 |
+
#: nextend-facebook-connect-new/providers/twitter/twitter.php:178
|
1300 |
#: nextend-social-connect-pro-new/class-provider-extension.php:202
|
1301 |
msgid "Registration confirmation will be emailed to you."
|
1302 |
msgstr ""
|
1303 |
|
1304 |
+
#: nextend-facebook-connect-new/providers/twitter/twitter.php:182
|
1305 |
#: nextend-social-connect-pro-new/class-provider-extension.php:206
|
1306 |
msgid "Register"
|
1307 |
msgstr ""
|
1322 |
#: nextend-social-connect-pro-new/class-provider-extension.php:78
|
1323 |
msgid "Social login is not allowed with this role!"
|
1324 |
msgstr ""
|
1325 |
+
"A közösségi fiókkal való belépés nem engedélyezett erre a felhasználói "
|
1326 |
+
"szintre."
|
1327 |
|
1328 |
#: nextend-social-connect-pro-new/class-provider-extension.php:142
|
1329 |
msgid "Please enter a username."
|
1353 |
"with Facebook."
|
1354 |
msgstr ""
|
1355 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1356 |
#: nextend-social-connect-pro-new/providers/linkedin/admin/getting-started.php:15
|
1357 |
msgid "Locate the yellow \"Create application\" button and click on it."
|
1358 |
+
msgstr "Keresd meg a sárga \"Create application\" gombot és kattints rá."
|
1359 |
|
1360 |
#: nextend-social-connect-pro-new/providers/linkedin/admin/getting-started.php:16
|
1361 |
msgid "Fill the fields marked with *"
|
1390 |
"You probably want to enable the \"r_emailaddress\" under the Default "
|
1391 |
"Application Permissions"
|
1392 |
msgstr ""
|
1393 |
+
"Valószínűleg be kell kapcsolnod a \"r_emailaddress\"-t a \"Default "
|
1394 |
+
"Application Permissions\" alatt"
|
1395 |
|
1396 |
#: nextend-social-connect-pro-new/providers/linkedin/admin/getting-started.php:23
|
1397 |
msgid "Hit update to save the changes"
|
1398 |
+
msgstr "Kattints az \"update\" gombra és mentsd el a beállításaidat."
|
1399 |
|
1400 |
+
#: nextend-social-connect-pro-new/providers/linkedin/linkedin.php:34
|
1401 |
msgid "Continue with <b>LinkedIn</b>"
|
1402 |
msgstr "Folytatás a <b>LinkedInnel</b>"
|
1403 |
|
1404 |
+
#: nextend-social-connect-pro-new/providers/linkedin/linkedin.php:35
|
1405 |
msgid "Link account with <b>LinkedIn</b>"
|
1406 |
+
msgstr "Fiók összekapcsolása a <b>LinkedIn</b>-nel"
|
1407 |
|
1408 |
+
#: nextend-social-connect-pro-new/providers/linkedin/linkedin.php:36
|
1409 |
msgid "Unlink account from <b>LinkedIn</b>"
|
1410 |
+
msgstr "Szétkapcsolás <b>LinkedIn</b>-nel"
|
1411 |
|
1412 |
#: nextend-social-connect-pro-new/template-parts/login-layout-above-separator.php:9
|
1413 |
#: nextend-social-connect-pro-new/template-parts/login-layout-below-separator.php:9
|
1414 |
msgid "OR"
|
1415 |
+
msgstr "VAGY"
|
1416 |
|
1417 |
#: nextend-social-connect-pro-new/template-parts/woocommerce-edit-account-after.php:1
|
1418 |
#: nextend-social-connect-pro-new/template-parts/woocommerce-edit-account-before.php:1
|
1419 |
msgid "Social accounts"
|
1420 |
+
msgstr "Közösségi fiókok"
|
1421 |
|
1422 |
#~ msgctxt "App creation"
|
1423 |
#~ msgid "Create %"
|
languages/nextend-facebook-connect.mo
CHANGED
Binary file
|
languages/nextend-facebook-connect.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: ss3\n"
|
4 |
-
"POT-Creation-Date: 2018-
|
5 |
-
"PO-Revision-Date: 2018-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: hu\n"
|
@@ -17,8 +17,8 @@ msgstr ""
|
|
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-SearchPath-0: nextend-social-
|
21 |
-
"X-Poedit-SearchPath-1: nextend-facebook-connect
|
22 |
"X-Poedit-SearchPathExcluded-0: nextend-facebook-connect-new/providers/"
|
23 |
"twitter/compat\n"
|
24 |
"X-Poedit-SearchPathExcluded-1: nextend-facebook-connect-new/providers/google/"
|
@@ -26,576 +26,639 @@ msgstr ""
|
|
26 |
"X-Poedit-SearchPathExcluded-2: nextend-facebook-connect-new/providers/"
|
27 |
"facebook/compat\n"
|
28 |
|
29 |
-
#: nextend-facebook-connect
|
30 |
#, php-format
|
31 |
-
msgid "%s needs
|
32 |
msgstr ""
|
33 |
|
34 |
-
#: nextend-facebook-connect
|
35 |
-
#: nextend-facebook-connect-new/admin/admin.php:138
|
36 |
-
#: nextend-facebook-connect-new/admin/admin.php:148
|
37 |
msgid "Please contact your server administrator and ask for solution!"
|
38 |
msgstr ""
|
39 |
|
40 |
-
#: nextend-facebook-connect
|
41 |
-
|
42 |
-
msgstr ""
|
43 |
-
|
44 |
-
#: nextend-facebook-connect-new/admin/admin.php:148
|
45 |
-
#, php-format
|
46 |
-
msgid "%s needs json_decode function."
|
47 |
-
msgstr ""
|
48 |
-
|
49 |
-
#: nextend-facebook-connect-new/admin/admin.php:166
|
50 |
-
#: nextend-facebook-connect-new/admin/admin.php:206
|
51 |
msgid "Settings saved."
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: nextend-facebook-connect
|
55 |
msgid "The authorization was successful"
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: nextend-facebook-connect
|
59 |
msgid "Deauthorize completed."
|
60 |
msgstr ""
|
61 |
|
62 |
-
#: nextend-facebook-connect
|
63 |
-
#: nextend-facebook-connect
|
64 |
-
#: nextend-facebook-connect
|
65 |
-
#: nextend-facebook-connect
|
66 |
-
#: nextend-facebook-connect
|
67 |
msgid "Settings"
|
68 |
msgstr ""
|
69 |
|
70 |
-
#: nextend-facebook-connect
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
msgid "Login label"
|
72 |
msgstr ""
|
73 |
|
74 |
-
#: nextend-facebook-connect
|
75 |
-
#: nextend-facebook-connect
|
76 |
-
#: nextend-facebook-connect
|
77 |
-
#: nextend-facebook-connect
|
78 |
-
#: nextend-facebook-connect
|
79 |
msgid "Reset to default"
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: nextend-facebook-connect
|
83 |
msgid "Link label"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: nextend-facebook-connect
|
87 |
msgid "Unlink label"
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: nextend-facebook-connect
|
91 |
msgid "Default button"
|
92 |
msgstr ""
|
93 |
|
94 |
-
#: nextend-facebook-connect
|
95 |
-
#: nextend-facebook-connect
|
96 |
msgid "Use custom button"
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: nextend-facebook-connect
|
100 |
#, php-format
|
101 |
msgid "Use the %s in your custom button's code to make the label show up."
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: nextend-facebook-connect
|
105 |
msgid "Icon button"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: nextend-facebook-connect
|
109 |
-
#: nextend-facebook-connect
|
110 |
-
#: nextend-facebook-connect
|
111 |
-
#: nextend-facebook-connect
|
112 |
-
#: nextend-facebook-connect
|
113 |
-
#: nextend-facebook-connect
|
114 |
-
#: nextend-facebook-connect
|
115 |
-
#: nextend-social-
|
116 |
msgid "Save Changes"
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: nextend-facebook-connect
|
120 |
-
#: nextend-facebook-connect
|
121 |
-
#: nextend-facebook-connect
|
122 |
-
#: nextend-facebook-connect
|
123 |
-
#: nextend-social-
|
124 |
msgid "Getting Started"
|
125 |
msgstr ""
|
126 |
|
127 |
-
#: nextend-facebook-connect
|
128 |
msgid "Buttons"
|
129 |
msgstr ""
|
130 |
|
131 |
-
#: nextend-facebook-connect
|
132 |
msgid "Usage"
|
133 |
msgstr ""
|
134 |
|
135 |
-
#: nextend-facebook-connect
|
136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
msgid "PRO settings"
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: nextend-facebook-connect
|
141 |
-
#: nextend-facebook-connect
|
142 |
msgid "Ask E-mail on registration"
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: nextend-facebook-connect
|
146 |
msgid "Never"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: nextend-facebook-connect
|
150 |
msgid "When email is not provided or empty"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: nextend-facebook-connect
|
154 |
-
#: nextend-facebook-connect
|
155 |
msgid "Always"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: nextend-facebook-connect
|
159 |
-
#: nextend-facebook-connect
|
160 |
msgid "Ask Username on registration"
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: nextend-facebook-connect
|
164 |
msgid "Never, generate automatically"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: nextend-facebook-connect
|
168 |
-
#: nextend-facebook-connect
|
169 |
msgid "Automatically connect the existing account upon registration"
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: nextend-facebook-connect
|
173 |
-
#: nextend-facebook-connect
|
174 |
-
#: nextend-facebook-connect
|
175 |
-
#: nextend-facebook-connect
|
176 |
msgid "Disabled"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: nextend-facebook-connect
|
180 |
msgid "Automatic, based on email address"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: nextend-facebook-connect
|
184 |
msgid "Disable login for the selected roles"
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: nextend-facebook-connect
|
188 |
msgid "Default roles for user who registered with this provider"
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: nextend-facebook-connect
|
192 |
-
#: nextend-facebook-connect
|
193 |
-
#: nextend-facebook-connect
|
194 |
-
#: nextend-facebook-connect
|
195 |
-
#: nextend-facebook-connect
|
196 |
msgid "Default"
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: nextend-facebook-connect
|
200 |
msgid "Shortcode"
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: nextend-facebook-connect
|
204 |
msgid "Simple link"
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: nextend-facebook-connect
|
208 |
msgid "Click here to login or register"
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: nextend-facebook-connect
|
212 |
msgid "Image button"
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: nextend-facebook-connect
|
216 |
msgid "Image url"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: nextend-facebook-connect
|
220 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
msgid "Login form button style"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: nextend-facebook-connect
|
225 |
-
#: nextend-facebook-connect
|
226 |
-
#: nextend-facebook-connect
|
227 |
-
#: nextend-facebook-connect
|
228 |
msgid "Icon"
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: nextend-facebook-connect
|
232 |
-
#: nextend-facebook-connect
|
233 |
msgid "Login layout"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: nextend-facebook-connect
|
237 |
msgid "Below"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: nextend-facebook-connect
|
241 |
msgid "Below with separator"
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: nextend-facebook-connect
|
245 |
msgid "Below and floating"
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: nextend-facebook-connect
|
249 |
msgid "Above"
|
250 |
msgstr ""
|
251 |
|
252 |
-
#: nextend-facebook-connect
|
253 |
msgid "Above with separator"
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: nextend-facebook-connect
|
257 |
-
#: nextend-facebook-connect
|
258 |
msgid "Comment login button"
|
259 |
msgstr ""
|
260 |
|
261 |
-
#: nextend-facebook-connect
|
262 |
msgid "Show"
|
263 |
msgstr ""
|
264 |
|
265 |
-
#: nextend-facebook-connect
|
266 |
msgid "Hide"
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: nextend-facebook-connect
|
270 |
#, php-format
|
271 |
msgid "You need to turn on the ' %1$s > %2$s > %3$s ' for this feature to work"
|
272 |
msgstr ""
|
273 |
|
274 |
-
#: nextend-facebook-connect
|
275 |
msgid "Discussion"
|
276 |
msgstr ""
|
277 |
|
278 |
-
#: nextend-facebook-connect
|
279 |
msgid "Users must be registered and logged in to comment"
|
280 |
msgstr ""
|
281 |
|
282 |
-
#: nextend-facebook-connect
|
283 |
-
#: nextend-facebook-connect
|
284 |
msgid "Comment button style"
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: nextend-facebook-connect
|
288 |
-
#: nextend-facebook-connect
|
289 |
msgid "WooCommerce login form"
|
290 |
msgstr ""
|
291 |
|
292 |
-
#: nextend-facebook-connect
|
293 |
msgid "No Connect button in login form"
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: nextend-facebook-connect
|
297 |
msgid "Connect button before login form"
|
298 |
msgstr ""
|
299 |
|
300 |
-
#: nextend-facebook-connect
|
301 |
-
#: nextend-facebook-connect
|
302 |
-
#: nextend-facebook-connect
|
303 |
-
#: nextend-facebook-connect
|
304 |
-
#: nextend-facebook-connect
|
305 |
-
#: nextend-facebook-connect
|
306 |
msgid "Action:"
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: nextend-facebook-connect
|
310 |
msgid "Connect button after login form"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: nextend-facebook-connect
|
314 |
-
#: nextend-facebook-connect
|
315 |
msgid "WooCommerce billing form"
|
316 |
msgstr ""
|
317 |
|
318 |
-
#: nextend-facebook-connect
|
319 |
msgid "No Connect button in billing form"
|
320 |
msgstr ""
|
321 |
|
322 |
-
#: nextend-facebook-connect
|
323 |
msgid "Connect button before billing form"
|
324 |
msgstr ""
|
325 |
|
326 |
-
#: nextend-facebook-connect
|
327 |
msgid "Connect button after billing form"
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: nextend-facebook-connect
|
331 |
-
#: nextend-facebook-connect
|
332 |
msgid "WooCommerce account details"
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: nextend-facebook-connect
|
336 |
msgid "Link buttons before account details"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: nextend-facebook-connect
|
340 |
msgid "Link buttons after account details"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: nextend-facebook-connect
|
344 |
-
#: nextend-facebook-connect
|
345 |
msgid "WooCommerce button style"
|
346 |
msgstr ""
|
347 |
|
348 |
-
#: nextend-facebook-connect
|
349 |
-
#: nextend-facebook-connect
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
msgid "Debug mode"
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: nextend-facebook-connect
|
354 |
-
#: nextend-facebook-connect
|
355 |
-
#: nextend-facebook-connect
|
356 |
msgid "Enabled"
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: nextend-facebook-connect
|
360 |
msgid "Fixed redirect url for login"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: nextend-facebook-connect
|
364 |
-
#: nextend-facebook-connect
|
365 |
msgid "Use custom"
|
366 |
msgstr ""
|
367 |
|
368 |
-
#: nextend-facebook-connect
|
369 |
msgid "Fixed redirect url for register"
|
370 |
msgstr ""
|
371 |
|
372 |
-
#: nextend-facebook-connect
|
373 |
msgid "Docs"
|
374 |
msgstr ""
|
375 |
|
376 |
-
#: nextend-facebook-connect
|
377 |
msgid "Support"
|
378 |
msgstr ""
|
379 |
|
380 |
-
#: nextend-facebook-connect
|
381 |
-
#: nextend-facebook-connect
|
382 |
msgid "Pro Addon"
|
383 |
msgstr ""
|
384 |
|
385 |
-
#: nextend-facebook-connect
|
386 |
msgid "Providers"
|
387 |
msgstr ""
|
388 |
|
389 |
-
#: nextend-facebook-connect
|
390 |
msgid "Global Settings"
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: nextend-facebook-connect
|
394 |
msgid "Error"
|
395 |
msgstr ""
|
396 |
|
397 |
-
#: nextend-facebook-connect
|
398 |
msgid ""
|
399 |
"You don’t have sufficient permissions to install and activate plugins. "
|
400 |
"Please contact your site’s administrator!"
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: nextend-facebook-connect
|
404 |
-
#: nextend-facebook-connect
|
405 |
-
#: nextend-facebook-connect
|
406 |
msgid "Activate Pro Addon"
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: nextend-facebook-connect
|
410 |
msgid ""
|
411 |
"Pro Addon is installed but not activated. To be able to use the Pro "
|
412 |
"features, you need to activate it."
|
413 |
msgstr ""
|
414 |
|
415 |
-
#: nextend-facebook-connect
|
416 |
-
#: nextend-facebook-connect
|
417 |
msgid "Deauthorize Pro Addon"
|
418 |
msgstr ""
|
419 |
|
420 |
-
#: nextend-facebook-connect
|
421 |
-
#: nextend-facebook-connect
|
422 |
msgid "Pro Addon is not installed"
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: nextend-facebook-connect
|
426 |
msgid ""
|
427 |
"To access the Pro features, you need to install and activate the Pro Addon."
|
428 |
msgstr ""
|
429 |
|
430 |
-
#: nextend-facebook-connect
|
431 |
#, php-format
|
432 |
msgid "Install %s now"
|
433 |
msgstr ""
|
434 |
|
435 |
-
#: nextend-facebook-connect
|
436 |
-
#: nextend-facebook-connect
|
437 |
msgid "Install Pro Addon"
|
438 |
msgstr ""
|
439 |
|
440 |
-
#: nextend-facebook-connect
|
441 |
msgid "Activating..."
|
442 |
msgstr ""
|
443 |
|
444 |
-
#: nextend-facebook-connect
|
445 |
msgid "Authorize your Pro Addon"
|
446 |
msgstr ""
|
447 |
|
448 |
-
#: nextend-facebook-connect
|
449 |
msgid ""
|
450 |
"To be able to use the Pro features, you need to authorize Nextend Social "
|
451 |
"Connect Pro Addon. You can do this by clicking on the Authorize button below "
|
452 |
"then select the related purchase."
|
453 |
msgstr ""
|
454 |
|
455 |
-
#: nextend-facebook-connect
|
456 |
msgid "Authorize"
|
457 |
msgstr ""
|
458 |
|
459 |
-
#: nextend-facebook-connect
|
460 |
msgid "License key"
|
461 |
msgstr ""
|
462 |
|
463 |
-
#: nextend-facebook-connect
|
464 |
msgid "Pro Addon is installed and activated"
|
465 |
msgstr ""
|
466 |
|
467 |
-
#: nextend-facebook-connect
|
468 |
msgid ""
|
469 |
"You installed and activated the Pro Addon. If you don’t want to use it "
|
470 |
"anymore, you can deauthorize using the button below."
|
471 |
msgstr ""
|
472 |
|
473 |
-
#: nextend-facebook-connect
|
474 |
msgid "Get Pro Addon to unlock more features"
|
475 |
msgstr ""
|
476 |
|
477 |
-
#: nextend-facebook-connect
|
|
|
478 |
msgid ""
|
479 |
-
"The features below are available in
|
480 |
-
"
|
481 |
msgstr ""
|
482 |
|
483 |
-
#: nextend-facebook-connect
|
484 |
msgid ""
|
485 |
"If you already have a license, you can Authorize your Pro Addon. Otherwise "
|
486 |
"you can purchase it using the button below."
|
487 |
msgstr ""
|
488 |
|
489 |
-
#: nextend-facebook-connect
|
490 |
msgid "Buy Pro Addon"
|
491 |
msgstr ""
|
492 |
|
493 |
-
#: nextend-facebook-connect
|
494 |
msgid "Authorize Pro Addon"
|
495 |
msgstr ""
|
496 |
|
497 |
-
#: nextend-facebook-connect
|
498 |
msgid "Pro Addon is not activated"
|
499 |
msgstr ""
|
500 |
|
501 |
-
#: nextend-facebook-connect
|
502 |
-
#: nextend-facebook-connect
|
503 |
msgid ""
|
504 |
"To be able to use the Pro features, you need to install and activate the "
|
505 |
"Nextend Social Connect Pro Addon."
|
506 |
msgstr ""
|
507 |
|
508 |
-
#: nextend-facebook-connect
|
509 |
msgid "Not Available"
|
510 |
msgstr ""
|
511 |
|
512 |
-
#: nextend-facebook-connect
|
513 |
msgid "Not Configured"
|
514 |
msgstr ""
|
515 |
|
516 |
-
#: nextend-facebook-connect
|
517 |
msgid "Not Tested"
|
518 |
msgstr ""
|
519 |
|
520 |
-
#: nextend-facebook-connect
|
521 |
msgid "Legacy"
|
522 |
msgstr ""
|
523 |
|
524 |
-
#: nextend-facebook-connect
|
525 |
msgid "Upgrade Now"
|
526 |
msgstr ""
|
527 |
|
528 |
-
#: nextend-facebook-connect
|
529 |
msgid "Test to Enable"
|
530 |
msgstr ""
|
531 |
|
532 |
-
#: nextend-facebook-connect
|
533 |
-
#: nextend-facebook-connect
|
534 |
msgid "Enable"
|
535 |
msgstr ""
|
536 |
|
537 |
-
#: nextend-facebook-connect
|
538 |
-
#: nextend-facebook-connect
|
539 |
msgid "Disable"
|
540 |
msgstr ""
|
541 |
|
542 |
-
#: nextend-facebook-connect
|
543 |
msgid "Import"
|
544 |
msgstr ""
|
545 |
|
546 |
-
#: nextend-facebook-connect
|
547 |
msgid "Saving..."
|
548 |
msgstr ""
|
549 |
|
550 |
-
#: nextend-facebook-connect
|
551 |
msgid "Saving failed"
|
552 |
msgstr ""
|
553 |
|
554 |
-
#: nextend-facebook-connect
|
555 |
msgid "Order Saved"
|
556 |
msgstr ""
|
557 |
|
558 |
-
#: nextend-facebook-connect
|
559 |
-
#: nextend-facebook-connect
|
560 |
-
#: nextend-facebook-connect
|
561 |
msgid "Authentication successful"
|
562 |
msgstr ""
|
563 |
|
564 |
-
#: nextend-facebook-connect
|
565 |
#, php-format
|
566 |
msgid ""
|
567 |
-
"Your %s account is successfully linked with your account. Now you can sign "
|
568 |
-
"in with %s easily."
|
569 |
msgstr ""
|
570 |
|
571 |
-
#: nextend-facebook-connect
|
572 |
#, php-format
|
573 |
msgid ""
|
574 |
"This %s account is already linked with other account. Linking process failed!"
|
575 |
msgstr ""
|
576 |
|
577 |
-
#: nextend-facebook-connect
|
578 |
msgid "Authentication error"
|
579 |
msgstr ""
|
580 |
|
581 |
-
#: nextend-facebook-connect
|
582 |
msgid "Unlink successful."
|
583 |
msgstr ""
|
584 |
|
585 |
-
#: nextend-facebook-connect
|
586 |
-
#: nextend-facebook-connect
|
587 |
msgid "The test was successful"
|
588 |
msgstr ""
|
589 |
|
590 |
-
#: nextend-facebook-connect
|
591 |
msgid "Authentication failed"
|
592 |
msgstr ""
|
593 |
|
594 |
-
#: nextend-facebook-connect
|
595 |
msgid "Your configuration needs testing"
|
596 |
msgstr ""
|
597 |
|
598 |
-
#: nextend-facebook-connect
|
599 |
msgid ""
|
600 |
"Before you can start letting your users register with your app it needs to "
|
601 |
"be tested. This test makes sure that no users will have troubles with the "
|
@@ -604,45 +667,45 @@ msgid ""
|
|
604 |
"are fine."
|
605 |
msgstr ""
|
606 |
|
607 |
-
#: nextend-facebook-connect
|
608 |
msgid "Test the Configuration"
|
609 |
msgstr ""
|
610 |
|
611 |
-
#: nextend-facebook-connect
|
612 |
-
#: nextend-facebook-connect
|
613 |
msgid "Please save your changes before testing."
|
614 |
msgstr ""
|
615 |
|
616 |
-
#: nextend-facebook-connect
|
617 |
msgid "Works Fine"
|
618 |
msgstr ""
|
619 |
|
620 |
-
#: nextend-facebook-connect
|
621 |
#, php-format
|
622 |
msgid ""
|
623 |
"This provider is currently disabled, which means that users can’t register "
|
624 |
"or login via their %s account."
|
625 |
msgstr ""
|
626 |
|
627 |
-
#: nextend-facebook-connect
|
628 |
#, php-format
|
629 |
msgid ""
|
630 |
"This provider works fine, but you can test it again. If you don’t want to "
|
631 |
"let users register or login with %s anymore you can disable it."
|
632 |
msgstr ""
|
633 |
|
634 |
-
#: nextend-facebook-connect
|
635 |
#, php-format
|
636 |
msgid ""
|
637 |
"This provider is currently enabled, which means that users can register or "
|
638 |
"login via their %s account."
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: nextend-facebook-connect
|
642 |
msgid "Test Again"
|
643 |
msgstr ""
|
644 |
|
645 |
-
#: nextend-facebook-connect
|
646 |
#, php-format
|
647 |
msgid ""
|
648 |
"%5$s plugin (version: %1$s, required: %2$s or newer) is not compatible with "
|
@@ -650,31 +713,32 @@ msgid ""
|
|
650 |
"the latest version! PRO addon disabled."
|
651 |
msgstr ""
|
652 |
|
653 |
-
#: nextend-facebook-connect
|
654 |
#, php-format
|
655 |
msgid ""
|
656 |
"%s took the place of Nextend Google Connect. You can delete Nextend Google "
|
657 |
"Connect as it is not needed anymore."
|
658 |
msgstr ""
|
659 |
|
660 |
-
#: nextend-facebook-connect
|
661 |
#, php-format
|
662 |
msgid ""
|
663 |
"%s took the place of Nextend Twitter Connect. You can delete Nextend Twitter "
|
664 |
"Connect as it is not needed anymore."
|
665 |
msgstr ""
|
666 |
|
667 |
-
#: nextend-facebook-connect
|
668 |
msgid "You have logged in successfully."
|
669 |
msgstr ""
|
670 |
|
671 |
-
#: nextend-facebook-connect
|
672 |
msgid "Social Login"
|
673 |
msgstr ""
|
674 |
|
675 |
-
#: nextend-facebook-connect
|
676 |
-
#: nextend-facebook-connect
|
677 |
-
#: nextend-facebook-connect
|
|
|
678 |
#, php-format
|
679 |
msgid ""
|
680 |
"To allow your visitors to log in with their %1$s account, first you must "
|
@@ -684,348 +748,344 @@ msgid ""
|
|
684 |
"%1$s App."
|
685 |
msgstr ""
|
686 |
|
687 |
-
#: nextend-facebook-connect
|
688 |
-
#: nextend-facebook-connect
|
689 |
-
#: nextend-facebook-connect
|
690 |
-
#: nextend-social-
|
691 |
#, php-format
|
692 |
msgctxt "App creation"
|
693 |
msgid "Create %s"
|
694 |
msgstr ""
|
695 |
|
696 |
-
#: nextend-facebook-connect
|
697 |
-
#: nextend-facebook-connect
|
698 |
-
#: nextend-facebook-connect
|
699 |
-
#: nextend-social-
|
700 |
#, php-format
|
701 |
msgid "Navigate to %s"
|
702 |
msgstr ""
|
703 |
|
704 |
-
#: nextend-facebook-connect
|
705 |
-
#: nextend-facebook-connect
|
706 |
-
#: nextend-facebook-connect
|
707 |
-
#: nextend-social-
|
708 |
#, php-format
|
709 |
msgid "Log in with your %s credentials if you are not logged in"
|
710 |
msgstr ""
|
711 |
|
712 |
-
#: nextend-facebook-connect
|
713 |
msgid "Click on the \"Add a New App\" button"
|
714 |
msgstr ""
|
715 |
|
716 |
-
#: nextend-facebook-connect
|
717 |
msgid "Fill \"Display Name\" and \"Contact Email\""
|
718 |
msgstr ""
|
719 |
|
720 |
-
#: nextend-facebook-connect
|
721 |
msgid "Click on blue \"Create App ID\" button"
|
722 |
msgstr ""
|
723 |
|
724 |
-
#: nextend-facebook-connect
|
725 |
msgid ""
|
726 |
"Move your mouse over Facebook Login and click on the appearing \"Set Up\" "
|
727 |
"button"
|
728 |
msgstr ""
|
729 |
|
730 |
-
#: nextend-facebook-connect
|
731 |
msgid "Choose Web"
|
732 |
msgstr ""
|
733 |
|
734 |
-
#: nextend-facebook-connect
|
735 |
#, php-format
|
736 |
msgid "Fill \"Site URL\" with the url of your homepage, probably: <b>%s</b>"
|
737 |
msgstr ""
|
738 |
|
739 |
-
#: nextend-facebook-connect
|
740 |
msgid "Click on \"Save\""
|
741 |
msgstr ""
|
742 |
|
743 |
-
#: nextend-facebook-connect
|
744 |
msgid "In the left sidebar, click on \"Facebook Login\""
|
745 |
msgstr ""
|
746 |
|
747 |
-
#: nextend-facebook-connect
|
748 |
-
#: nextend-facebook-connect
|
749 |
#, php-format
|
750 |
msgid ""
|
751 |
"Add the following URL to the \"Valid OAuth redirect URIs\" field: <b>%s</b>"
|
752 |
msgstr ""
|
753 |
|
754 |
-
#: nextend-facebook-connect
|
755 |
msgid "Click on \"Save Changes\""
|
756 |
msgstr ""
|
757 |
|
758 |
-
#: nextend-facebook-connect
|
759 |
msgid "In the top of the left sidebar, click on \"Settings\""
|
760 |
msgstr ""
|
761 |
|
762 |
-
#: nextend-facebook-connect
|
763 |
msgid ""
|
764 |
"Here you can see your \"APP ID\" and you can see your \"App secret\" if you "
|
765 |
"click on the \"Show\" button. These will be needed in plugin's settings."
|
766 |
msgstr ""
|
767 |
|
768 |
-
#: nextend-facebook-connect
|
769 |
msgid "Enter your domain name to the App Domains"
|
770 |
msgstr ""
|
771 |
|
772 |
-
#: nextend-facebook-connect
|
773 |
msgid ""
|
774 |
"Fill up the \"Privacy Policy URL\". Provide a publicly available and easily "
|
775 |
"accessible privacy policy that explains what data you are collecting and how "
|
776 |
"you will use that data."
|
777 |
msgstr ""
|
778 |
|
779 |
-
#: nextend-facebook-connect
|
780 |
-
|
|
|
|
|
|
|
781 |
msgstr ""
|
782 |
|
783 |
-
#: nextend-facebook-connect
|
784 |
msgid ""
|
785 |
"Your application is currently private, which means that only you can log in "
|
786 |
"with it. In the left sidebar choose \"App Review\" and make your App public"
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: nextend-facebook-connect
|
790 |
-
#: nextend-facebook-connect
|
791 |
-
#: nextend-facebook-connect
|
792 |
-
#: nextend-social-
|
793 |
#, php-format
|
794 |
msgid "I am done setting up my %s"
|
795 |
msgstr ""
|
796 |
|
797 |
-
#: nextend-facebook-connect
|
798 |
msgid "Import Facebook configuration"
|
799 |
msgstr ""
|
800 |
|
801 |
-
#: nextend-facebook-connect
|
802 |
-
#: nextend-facebook-connect
|
803 |
-
#: nextend-facebook-connect
|
804 |
msgid "Be sure to read the following notices before you proceed."
|
805 |
msgstr ""
|
806 |
|
807 |
-
#: nextend-facebook-connect
|
808 |
-
#: nextend-facebook-connect
|
809 |
-
#: nextend-facebook-connect
|
810 |
msgid "Important steps before the import"
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: nextend-facebook-connect
|
814 |
-
#: nextend-facebook-connect
|
815 |
-
#: nextend-facebook-connect
|
816 |
msgid ""
|
817 |
"Make sure that the redirect URI for your app is correct before proceeding."
|
818 |
msgstr ""
|
819 |
|
820 |
-
#: nextend-facebook-connect
|
821 |
-
#: nextend-facebook-connect
|
822 |
-
#: nextend-facebook-connect
|
823 |
#, php-format
|
824 |
msgid "Visit %s."
|
825 |
msgstr ""
|
826 |
|
827 |
-
#: nextend-facebook-connect
|
828 |
-
#: nextend-facebook-connect
|
829 |
msgid "Select your app."
|
830 |
msgstr ""
|
831 |
|
832 |
-
#: nextend-facebook-connect
|
833 |
msgid ""
|
834 |
"Go to the Settings menu which you can find below the Facebook Login in the "
|
835 |
"left menu."
|
836 |
msgstr ""
|
837 |
|
838 |
-
#: nextend-facebook-connect
|
839 |
-
#: nextend-facebook-connect
|
840 |
-
#: nextend-facebook-connect
|
841 |
#, php-format
|
842 |
msgid "Make sure that the \"%1$s\" field contains %2$s"
|
843 |
msgstr ""
|
844 |
|
845 |
-
#: nextend-facebook-connect
|
846 |
-
#: nextend-facebook-connect
|
847 |
-
#: nextend-facebook-connect
|
848 |
-
msgid "Save your changes."
|
849 |
-
msgstr ""
|
850 |
-
|
851 |
-
#: nextend-facebook-connect-new/providers/facebook/admin/import.php:20
|
852 |
-
#: nextend-facebook-connect-new/providers/google/admin/import.php:20
|
853 |
-
#: nextend-facebook-connect-new/providers/twitter/admin/import.php:20
|
854 |
msgid "The following settings will be imported:"
|
855 |
msgstr ""
|
856 |
|
857 |
-
#: nextend-facebook-connect
|
858 |
-
#: nextend-facebook-connect
|
859 |
-
#: nextend-facebook-connect
|
860 |
msgid "Your old API configurations"
|
861 |
msgstr ""
|
862 |
|
863 |
-
#: nextend-facebook-connect
|
864 |
-
#: nextend-facebook-connect
|
865 |
-
#: nextend-facebook-connect
|
866 |
msgid "The user prefix you set"
|
867 |
msgstr ""
|
868 |
|
869 |
-
#: nextend-facebook-connect
|
870 |
-
#: nextend-facebook-connect
|
871 |
-
#: nextend-facebook-connect
|
872 |
msgid "Create a backup of the old settings"
|
873 |
msgstr ""
|
874 |
|
875 |
-
#: nextend-facebook-connect
|
876 |
-
#: nextend-facebook-connect
|
877 |
-
#: nextend-facebook-connect
|
878 |
msgid "Other changes"
|
879 |
msgstr ""
|
880 |
|
881 |
-
#: nextend-facebook-connect
|
882 |
-
#: nextend-facebook-connect
|
883 |
-
#: nextend-facebook-connect
|
884 |
msgid ""
|
885 |
"The custom redirect URI is now handled globally for all providers, so it "
|
886 |
"won't be imported from the previous version. Visit \"Nextend Social Login > "
|
887 |
"Global settings\" to set the new redirect URIs."
|
888 |
msgstr ""
|
889 |
|
890 |
-
#: nextend-facebook-connect
|
891 |
-
#: nextend-facebook-connect
|
892 |
-
#: nextend-facebook-connect
|
893 |
msgid ""
|
894 |
"The login button's layout will be changed to a new, more modern look. If you "
|
895 |
"used any custom buttons that won't be imported."
|
896 |
msgstr ""
|
897 |
|
898 |
-
#: nextend-facebook-connect
|
899 |
-
#: nextend-facebook-connect
|
900 |
-
#: nextend-facebook-connect
|
901 |
msgid ""
|
902 |
"The old version's PHP functions are not available anymore. This means if you "
|
903 |
"used any custom codes where you used these old functions, you need to remove "
|
904 |
"them."
|
905 |
msgstr ""
|
906 |
|
907 |
-
#: nextend-facebook-connect
|
908 |
-
#: nextend-facebook-connect
|
909 |
-
#: nextend-facebook-connect
|
910 |
msgid ""
|
911 |
"After the importing process finishes, you will need to <b>test</b> your app "
|
912 |
"and <b>enable</b> the provider. You can do both in the next screen."
|
913 |
msgstr ""
|
914 |
|
915 |
-
#: nextend-facebook-connect
|
916 |
-
#: nextend-facebook-connect
|
917 |
-
#: nextend-facebook-connect
|
918 |
msgid "Import Configuration"
|
919 |
msgstr ""
|
920 |
|
921 |
-
#: nextend-facebook-connect
|
922 |
msgid "App ID"
|
923 |
msgstr ""
|
924 |
|
925 |
-
#: nextend-facebook-connect
|
926 |
-
#: nextend-facebook-connect
|
927 |
-
#: nextend-facebook-connect
|
928 |
-
#: nextend-facebook-connect
|
929 |
-
#: nextend-facebook-connect
|
930 |
-
#: nextend-social-
|
931 |
-
#: nextend-social-
|
932 |
msgid "Required"
|
933 |
msgstr ""
|
934 |
|
935 |
-
#: nextend-facebook-connect
|
936 |
-
#: nextend-facebook-connect
|
937 |
-
#: nextend-facebook-connect
|
938 |
-
#: nextend-social-
|
939 |
#, php-format
|
940 |
msgid ""
|
941 |
-
"If you are not sure what is your %s, please head over to <a href=\"%s"
|
942 |
"\">Getting Started</a>"
|
943 |
msgstr ""
|
944 |
|
945 |
-
#: nextend-facebook-connect
|
946 |
msgid "App Secret"
|
947 |
msgstr ""
|
948 |
|
949 |
-
#: nextend-facebook-connect
|
950 |
-
#: nextend-facebook-connect
|
951 |
-
#: nextend-facebook-connect
|
952 |
-
#: nextend-social-
|
953 |
-
|
|
|
954 |
msgstr ""
|
955 |
|
956 |
-
#: nextend-facebook-connect
|
957 |
-
|
958 |
-
#: nextend-facebook-connect-new/providers/twitter/admin/settings.php:55
|
959 |
-
#: nextend-social-connect-pro-new/providers/linkedin/admin/settings.php:54
|
960 |
-
msgid "Username prefix on register"
|
961 |
msgstr ""
|
962 |
|
963 |
-
#: nextend-facebook-connect
|
964 |
msgid "Continue with <b>Facebook</b>"
|
965 |
msgstr ""
|
966 |
|
967 |
-
#: nextend-facebook-connect
|
968 |
msgid "Link account with <b>Facebook</b>"
|
969 |
msgstr ""
|
970 |
|
971 |
-
#: nextend-facebook-connect
|
972 |
msgid "Unlink account from <b>Facebook</b>"
|
973 |
msgstr ""
|
974 |
|
975 |
-
#: nextend-facebook-connect
|
976 |
-
#: nextend-facebook-connect
|
977 |
-
#: nextend-facebook-connect
|
978 |
-
#: nextend-social-
|
979 |
#, php-format
|
980 |
-
msgid "
|
|
|
981 |
msgstr ""
|
982 |
|
983 |
-
#: nextend-facebook-connect
|
984 |
msgid ""
|
985 |
"If you don't have a project yet, you'll need to create one. You can do this "
|
986 |
"by clicking on the blue \"Create project\" button on the right side"
|
987 |
msgstr ""
|
988 |
|
989 |
-
#: nextend-facebook-connect
|
990 |
msgid "Name your project and then click on the Create button"
|
991 |
msgstr ""
|
992 |
|
993 |
-
#: nextend-facebook-connect
|
994 |
msgid "Once you have a project, you'll end up in the dashboard."
|
995 |
msgstr ""
|
996 |
|
997 |
-
#: nextend-facebook-connect
|
998 |
msgid ""
|
999 |
"Click on the \"Credentials\" in the left hand menu to create new API "
|
1000 |
"credentials"
|
1001 |
msgstr ""
|
1002 |
|
1003 |
-
#: nextend-facebook-connect
|
1004 |
msgid ""
|
1005 |
"Go to the OAuth consent screen tab and enter a product name and provide the "
|
1006 |
"Privacy Policy URL, then click on the save button."
|
1007 |
msgstr ""
|
1008 |
|
1009 |
-
#: nextend-facebook-connect
|
1010 |
msgid ""
|
1011 |
"Go back to the Credentials tab and locate the small box at the middle. Click "
|
1012 |
"on the blue \"Create credentials\" button. Chose the \"OAuth client ID\" "
|
1013 |
"from the dropdown list."
|
1014 |
msgstr ""
|
1015 |
|
1016 |
-
#: nextend-facebook-connect
|
1017 |
msgid "Your application type should be \"Web application\""
|
1018 |
msgstr ""
|
1019 |
|
1020 |
-
#: nextend-facebook-connect
|
1021 |
msgid "Name your application"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
-
#: nextend-facebook-connect
|
1025 |
msgid "Click on the Create button"
|
1026 |
msgstr ""
|
1027 |
|
1028 |
-
#: nextend-facebook-connect
|
1029 |
msgid ""
|
1030 |
"A modal should pop up with your credentials. If that doesn't happen, go to "
|
1031 |
"the Credentials in the left hand menu and select your app by clicking on its "
|
@@ -1033,261 +1093,304 @@ msgid ""
|
|
1033 |
"there."
|
1034 |
msgstr ""
|
1035 |
|
1036 |
-
#: nextend-facebook-connect
|
1037 |
msgid "Import Google configuration"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
-
#: nextend-facebook-connect
|
1041 |
msgid "If you have more projects, select the one where your app is."
|
1042 |
msgstr ""
|
1043 |
|
1044 |
-
#: nextend-facebook-connect
|
1045 |
msgid "Click on Credentials at the left-hand menu then select your app."
|
1046 |
msgstr ""
|
1047 |
|
1048 |
-
#: nextend-facebook-connect
|
1049 |
-
#: nextend-social-
|
1050 |
msgid "Client ID"
|
1051 |
msgstr ""
|
1052 |
|
1053 |
-
#: nextend-facebook-connect
|
1054 |
-
#: nextend-social-
|
1055 |
msgid "Client Secret"
|
1056 |
msgstr ""
|
1057 |
|
1058 |
-
#: nextend-facebook-connect
|
|
|
|
|
|
|
|
|
1059 |
msgid "Continue with <b>Google</b>"
|
1060 |
msgstr ""
|
1061 |
|
1062 |
-
#: nextend-facebook-connect
|
1063 |
msgid "Link account with <b>Google</b>"
|
1064 |
msgstr ""
|
1065 |
|
1066 |
-
#: nextend-facebook-connect
|
1067 |
msgid "Unlink account from <b>Google</b>"
|
1068 |
msgstr ""
|
1069 |
|
1070 |
-
#: nextend-facebook-connect
|
1071 |
msgid "Click on the \"Create New App\" button"
|
1072 |
msgstr ""
|
1073 |
|
1074 |
-
#: nextend-facebook-connect
|
1075 |
#, php-format
|
1076 |
msgid ""
|
1077 |
"Fill the name and description fields. Then enter your site's URL to the "
|
1078 |
"Website field: <b>%s</b>"
|
1079 |
msgstr ""
|
1080 |
|
1081 |
-
#: nextend-facebook-connect
|
1082 |
#, php-format
|
1083 |
msgid "Add the following URL to the \"Callback URL\" field: <b>%s</b>"
|
1084 |
msgstr ""
|
1085 |
|
1086 |
-
#: nextend-facebook-connect
|
1087 |
msgid "Accept the Twitter Developer Agreement"
|
1088 |
msgstr ""
|
1089 |
|
1090 |
-
#: nextend-facebook-connect
|
1091 |
msgid ""
|
1092 |
"Create your application by clicking on the Create your Twitter application "
|
1093 |
"button"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
-
#: nextend-facebook-connect
|
1097 |
msgid ""
|
1098 |
"Go to the Keys and Access Tokens tab and find the Consumer Key and Secret"
|
1099 |
msgstr ""
|
1100 |
|
1101 |
-
#: nextend-facebook-connect
|
1102 |
msgid "Import Twitter configuration"
|
1103 |
msgstr ""
|
1104 |
|
1105 |
-
#: nextend-facebook-connect
|
1106 |
msgid "Go to the Settings tab."
|
1107 |
msgstr ""
|
1108 |
|
1109 |
-
#: nextend-facebook-connect
|
1110 |
msgid "Consumer Key"
|
1111 |
msgstr ""
|
1112 |
|
1113 |
-
#: nextend-facebook-connect
|
1114 |
msgid "Consumer Secret"
|
1115 |
msgstr ""
|
1116 |
|
1117 |
-
#: nextend-facebook-connect
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1118 |
msgid "Continue with <b>Twitter</b>"
|
1119 |
msgstr ""
|
1120 |
|
1121 |
-
#: nextend-facebook-connect
|
1122 |
msgid "Link account with <b>Twitter</b>"
|
1123 |
msgstr ""
|
1124 |
|
1125 |
-
#: nextend-facebook-connect
|
1126 |
msgid "Unlink account from <b>Twitter</b>"
|
1127 |
msgstr ""
|
1128 |
|
1129 |
-
#: nextend-facebook-connect
|
1130 |
-
#: nextend-facebook-connect
|
1131 |
-
#: nextend-facebook-connect
|
1132 |
-
#: nextend-social-
|
1133 |
-
#: nextend-social-
|
1134 |
-
#: nextend-social-
|
1135 |
-
#: nextend-social-
|
1136 |
-
#: nextend-social-
|
1137 |
-
#: nextend-social-
|
1138 |
-
#: nextend-social-
|
1139 |
msgid "ERROR"
|
1140 |
msgstr ""
|
1141 |
|
1142 |
-
#: nextend-facebook-connect
|
1143 |
-
#: nextend-social-
|
1144 |
msgid "Please enter an email address."
|
1145 |
msgstr ""
|
1146 |
|
1147 |
-
#: nextend-facebook-connect
|
1148 |
-
#: nextend-social-
|
1149 |
msgid "The email address isn’t correct."
|
1150 |
msgstr ""
|
1151 |
|
1152 |
-
#: nextend-facebook-connect
|
1153 |
-
#: nextend-social-
|
1154 |
msgid "This email is already registered, please choose another one."
|
1155 |
msgstr ""
|
1156 |
|
1157 |
-
#: nextend-facebook-connect
|
1158 |
-
#: nextend-social-
|
1159 |
-
msgid "Registration Form"
|
1160 |
-
msgstr ""
|
1161 |
-
|
1162 |
-
#: nextend-facebook-connect-new/providers/twitter/twitter.php:167
|
1163 |
-
#: nextend-social-connect-pro-new/class-provider-extension.php:183
|
1164 |
msgid "Register For This Site!"
|
1165 |
msgstr ""
|
1166 |
|
1167 |
-
#: nextend-facebook-connect
|
1168 |
-
#: nextend-social-
|
1169 |
msgid "Email"
|
1170 |
msgstr ""
|
1171 |
|
1172 |
-
#: nextend-facebook-connect
|
1173 |
-
#: nextend-social-
|
1174 |
msgid "Registration confirmation will be emailed to you."
|
1175 |
msgstr ""
|
1176 |
|
1177 |
-
#: nextend-facebook-connect
|
1178 |
-
#: nextend-social-connect-pro-new/class-provider-extension.php:206
|
1179 |
-
msgid "Register"
|
1180 |
-
msgstr ""
|
1181 |
-
|
1182 |
-
#: nextend-facebook-connect-new/widget.php:10
|
1183 |
#, php-format
|
1184 |
msgid "%s Buttons"
|
1185 |
msgstr ""
|
1186 |
|
1187 |
-
#: nextend-facebook-connect
|
1188 |
msgid "Title:"
|
1189 |
msgstr ""
|
1190 |
|
1191 |
-
#: nextend-facebook-connect
|
1192 |
msgid "Button style:"
|
1193 |
msgstr ""
|
1194 |
|
1195 |
-
#: nextend-social-
|
1196 |
msgid "Social login is not allowed with this role!"
|
1197 |
msgstr ""
|
1198 |
|
1199 |
-
#: nextend-social-
|
1200 |
msgid "Please enter a username."
|
1201 |
msgstr ""
|
1202 |
|
1203 |
-
#: nextend-social-
|
1204 |
msgid ""
|
1205 |
"This username is invalid because it uses illegal characters. Please enter a "
|
1206 |
"valid username."
|
1207 |
msgstr ""
|
1208 |
|
1209 |
-
#: nextend-social-
|
1210 |
msgid "This username is already registered. Please choose another one."
|
1211 |
msgstr ""
|
1212 |
|
1213 |
-
#: nextend-social-
|
1214 |
msgid "Sorry, that username is not allowed."
|
1215 |
msgstr ""
|
1216 |
|
1217 |
-
#: nextend-social-
|
1218 |
msgid "Username"
|
1219 |
msgstr ""
|
1220 |
|
1221 |
-
#: nextend-social-
|
1222 |
msgid ""
|
1223 |
"This email is already registered, please login in to your account to link "
|
1224 |
"with Facebook."
|
1225 |
msgstr ""
|
1226 |
|
1227 |
-
#: nextend-social-
|
1228 |
-
#, php-format
|
1229 |
-
msgid ""
|
1230 |
-
"To allow your visitors to log in with their %1$s account, first you must "
|
1231 |
-
"create a %1$s App. The following guide will help you through the %1$s App "
|
1232 |
-
"creation process. After you created your %1$s App, head over to \"Settings\" "
|
1233 |
-
"and configure the given \"%2$s\" and \"%3$s\" according to your %1$s App."
|
1234 |
-
msgstr ""
|
1235 |
-
|
1236 |
-
#: nextend-social-connect-pro-new/providers/linkedin/admin/getting-started.php:15
|
1237 |
msgid "Locate the yellow \"Create application\" button and click on it."
|
1238 |
msgstr ""
|
1239 |
|
1240 |
-
#: nextend-social-
|
1241 |
msgid "Fill the fields marked with *"
|
1242 |
msgstr ""
|
1243 |
|
1244 |
-
#: nextend-social-
|
1245 |
#, php-format
|
1246 |
msgid "Fill \"Website URL\" with the url of your homepage, probably: <b>%s</b>"
|
1247 |
msgstr ""
|
1248 |
|
1249 |
-
#: nextend-social-
|
1250 |
msgid "Accept the Terms of use and hit Submit"
|
1251 |
msgstr ""
|
1252 |
|
1253 |
-
#: nextend-social-
|
1254 |
msgid "Find the necessary Authentication Keys under the Authentication menu"
|
1255 |
msgstr ""
|
1256 |
|
1257 |
-
#: nextend-social-
|
1258 |
#, php-format
|
1259 |
msgid ""
|
1260 |
"Add the following URL to the \"Authorized Redirect URLs:\" field: <b>%s</b>"
|
1261 |
msgstr ""
|
1262 |
|
1263 |
-
#: nextend-social-
|
1264 |
msgid ""
|
1265 |
"You probably want to enable the \"r_emailaddress\" under the Default "
|
1266 |
"Application Permissions"
|
1267 |
msgstr ""
|
1268 |
|
1269 |
-
#: nextend-social-
|
1270 |
msgid "Hit update to save the changes"
|
1271 |
msgstr ""
|
1272 |
|
1273 |
-
#: nextend-social-
|
1274 |
msgid "Continue with <b>LinkedIn</b>"
|
1275 |
msgstr ""
|
1276 |
|
1277 |
-
#: nextend-social-
|
1278 |
msgid "Link account with <b>LinkedIn</b>"
|
1279 |
msgstr ""
|
1280 |
|
1281 |
-
#: nextend-social-
|
1282 |
msgid "Unlink account from <b>LinkedIn</b>"
|
1283 |
msgstr ""
|
1284 |
|
1285 |
-
#: nextend-social-
|
1286 |
-
#: nextend-social-
|
1287 |
-
msgid "OR"
|
1288 |
-
msgstr ""
|
1289 |
-
|
1290 |
-
#: nextend-social-connect-pro-new/template-parts/woocommerce-edit-account-after.php:1
|
1291 |
-
#: nextend-social-connect-pro-new/template-parts/woocommerce-edit-account-before.php:1
|
1292 |
msgid "Social accounts"
|
1293 |
msgstr ""
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: ss3\n"
|
4 |
+
"POT-Creation-Date: 2018-03-01 15:22+0100\n"
|
5 |
+
"PO-Revision-Date: 2018-03-01 15:23+0100\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: hu\n"
|
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-SearchPath-0: nextend-social-login-pro-new\n"
|
21 |
+
"X-Poedit-SearchPath-1: nextend-facebook-connect\n"
|
22 |
"X-Poedit-SearchPathExcluded-0: nextend-facebook-connect-new/providers/"
|
23 |
"twitter/compat\n"
|
24 |
"X-Poedit-SearchPathExcluded-1: nextend-facebook-connect-new/providers/google/"
|
26 |
"X-Poedit-SearchPathExcluded-2: nextend-facebook-connect-new/providers/"
|
27 |
"facebook/compat\n"
|
28 |
|
29 |
+
#: nextend-facebook-connect/admin/admin.php:133
|
30 |
#, php-format
|
31 |
+
msgid "%s needs json_decode function."
|
32 |
msgstr ""
|
33 |
|
34 |
+
#: nextend-facebook-connect/admin/admin.php:133
|
|
|
|
|
35 |
msgid "Please contact your server administrator and ask for solution!"
|
36 |
msgstr ""
|
37 |
|
38 |
+
#: nextend-facebook-connect/admin/admin.php:151
|
39 |
+
#: nextend-facebook-connect/admin/admin.php:191
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
msgid "Settings saved."
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: nextend-facebook-connect/admin/admin.php:159
|
44 |
msgid "The authorization was successful"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: nextend-facebook-connect/admin/admin.php:170
|
48 |
msgid "Deauthorize completed."
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: nextend-facebook-connect/admin/admin.php:282
|
52 |
+
#: nextend-facebook-connect/admin/templates-provider/menu.php:10
|
53 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:125
|
54 |
+
#: nextend-facebook-connect/admin/templates/providers.php:78
|
55 |
+
#: nextend-facebook-connect/admin/templates/providers.php:90
|
56 |
msgid "Settings"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: nextend-facebook-connect/admin/admin.php:356
|
60 |
+
#: nextend-facebook-connect/includes/oauth2.php:113
|
61 |
+
#: nextend-facebook-connect/includes/oauth2.php:238
|
62 |
+
#: nextend-facebook-connect/providers/facebook/facebook-client.php:70
|
63 |
+
#: nextend-facebook-connect/providers/twitter/twitter-client.php:150
|
64 |
+
#, php-format
|
65 |
+
msgid "Unexpected response: %s"
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:72
|
69 |
msgid "Login label"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:77
|
73 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:88
|
74 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:99
|
75 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:128
|
76 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:158
|
77 |
msgid "Reset to default"
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:82
|
81 |
msgid "Link label"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:94
|
85 |
msgid "Unlink label"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:105
|
89 |
msgid "Default button"
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:121
|
93 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:151
|
94 |
msgid "Use custom button"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:128
|
98 |
#, php-format
|
99 |
msgid "Use the %s in your custom button's code to make the label show up."
|
100 |
msgstr ""
|
101 |
|
102 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:136
|
103 |
msgid "Icon button"
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: nextend-facebook-connect/admin/templates-provider/buttons.php:167
|
107 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:122
|
108 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:262
|
109 |
+
#: nextend-facebook-connect/admin/templates/global-settings.php:103
|
110 |
+
#: nextend-facebook-connect/providers/facebook/admin/settings.php:48
|
111 |
+
#: nextend-facebook-connect/providers/google/admin/settings.php:47
|
112 |
+
#: nextend-facebook-connect/providers/twitter/admin/settings.php:46
|
113 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/settings.php:45
|
114 |
msgid "Save Changes"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: nextend-facebook-connect/admin/templates-provider/menu.php:8
|
118 |
+
#: nextend-facebook-connect/admin/templates/providers.php:58
|
119 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:7
|
120 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:7
|
121 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/getting-started.php:6
|
122 |
msgid "Getting Started"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: nextend-facebook-connect/admin/templates-provider/menu.php:12
|
126 |
msgid "Buttons"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: nextend-facebook-connect/admin/templates-provider/menu.php:14
|
130 |
msgid "Usage"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-other.php:9
|
134 |
+
msgid "Other settings"
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-other.php:14
|
138 |
+
msgid "Username prefix on register"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-other.php:20
|
142 |
+
msgid "Fallback username prefix on register"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-other.php:23
|
146 |
+
msgid "Used when username is invalid"
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:16
|
150 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:14
|
151 |
msgid "PRO settings"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:26
|
155 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:30
|
156 |
msgid "Ask E-mail on registration"
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:33
|
160 |
msgid "Never"
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:36
|
164 |
msgid "When email is not provided or empty"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:39
|
168 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:54
|
169 |
msgid "Always"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:44
|
173 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:48
|
174 |
msgid "Ask Username on registration"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:51
|
178 |
msgid "Never, generate automatically"
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:59
|
182 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:63
|
183 |
msgid "Automatically connect the existing account upon registration"
|
184 |
msgstr ""
|
185 |
|
186 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:67
|
187 |
+
#: nextend-facebook-connect/admin/templates/global-settings.php:50
|
188 |
+
#: nextend-facebook-connect/admin/templates/providers.php:33
|
189 |
+
#: nextend-facebook-connect/includes/provider.php:903
|
190 |
msgid "Disabled"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:70
|
194 |
msgid "Automatic, based on email address"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:75
|
198 |
msgid "Disable login for the selected roles"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:95
|
202 |
msgid "Default roles for user who registered with this provider"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: nextend-facebook-connect/admin/templates-provider/settings-pro.php:103
|
206 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:61
|
207 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:137
|
208 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:222
|
209 |
+
#: nextend-facebook-connect/widget.php:34
|
210 |
msgid "Default"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: nextend-facebook-connect/admin/templates-provider/usage.php:7
|
214 |
msgid "Shortcode"
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: nextend-facebook-connect/admin/templates-provider/usage.php:21
|
218 |
msgid "Simple link"
|
219 |
msgstr ""
|
220 |
|
221 |
+
#: nextend-facebook-connect/admin/templates-provider/usage.php:24
|
222 |
msgid "Click here to login or register"
|
223 |
msgstr ""
|
224 |
|
225 |
+
#: nextend-facebook-connect/admin/templates-provider/usage.php:29
|
226 |
msgid "Image button"
|
227 |
msgstr ""
|
228 |
|
229 |
+
#: nextend-facebook-connect/admin/templates-provider/usage.php:32
|
230 |
msgid "Image url"
|
231 |
msgstr ""
|
232 |
|
233 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:23
|
234 |
+
msgid "Login form"
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:27
|
238 |
+
msgid "Show buttons on Login form"
|
239 |
+
msgstr ""
|
240 |
+
|
241 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:30
|
242 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:45
|
243 |
+
msgid "Show login buttons"
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:33
|
247 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:48
|
248 |
+
msgid "Hide login buttons"
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:38
|
252 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:42
|
253 |
+
msgid "Registration form"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:53
|
257 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:57
|
258 |
msgid "Login form button style"
|
259 |
msgstr ""
|
260 |
|
261 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:67
|
262 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:143
|
263 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:228
|
264 |
+
#: nextend-facebook-connect/widget.php:39
|
265 |
msgid "Icon"
|
266 |
msgstr ""
|
267 |
|
268 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:74
|
269 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:78
|
270 |
msgid "Login layout"
|
271 |
msgstr ""
|
272 |
|
273 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:82
|
274 |
msgid "Below"
|
275 |
msgstr ""
|
276 |
|
277 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:88
|
278 |
msgid "Below with separator"
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:94
|
282 |
msgid "Below and floating"
|
283 |
msgstr ""
|
284 |
|
285 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:100
|
286 |
msgid "Above"
|
287 |
msgstr ""
|
288 |
|
289 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:106
|
290 |
msgid "Above with separator"
|
291 |
msgstr ""
|
292 |
|
293 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:113
|
294 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:117
|
295 |
msgid "Comment login button"
|
296 |
msgstr ""
|
297 |
|
298 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:120
|
299 |
msgid "Show"
|
300 |
msgstr ""
|
301 |
|
302 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:123
|
303 |
msgid "Hide"
|
304 |
msgstr ""
|
305 |
|
306 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:125
|
307 |
#, php-format
|
308 |
msgid "You need to turn on the ' %1$s > %2$s > %3$s ' for this feature to work"
|
309 |
msgstr ""
|
310 |
|
311 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:125
|
312 |
msgid "Discussion"
|
313 |
msgstr ""
|
314 |
|
315 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:125
|
316 |
msgid "Users must be registered and logged in to comment"
|
317 |
msgstr ""
|
318 |
|
319 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:129
|
320 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:133
|
321 |
msgid "Comment button style"
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:150
|
325 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:154
|
326 |
msgid "WooCommerce login form"
|
327 |
msgstr ""
|
328 |
|
329 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:157
|
330 |
msgid "No Connect button in login form"
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:160
|
334 |
msgid "Connect button before login form"
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:161
|
338 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:166
|
339 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:184
|
340 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:189
|
341 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:203
|
342 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:208
|
343 |
msgid "Action:"
|
344 |
msgstr ""
|
345 |
|
346 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:165
|
347 |
msgid "Connect button after login form"
|
348 |
msgstr ""
|
349 |
|
350 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:173
|
351 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:177
|
352 |
msgid "WooCommerce billing form"
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:180
|
356 |
msgid "No Connect button in billing form"
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:183
|
360 |
msgid "Connect button before billing form"
|
361 |
msgstr ""
|
362 |
|
363 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:188
|
364 |
msgid "Connect button after billing form"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:195
|
368 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:199
|
369 |
msgid "WooCommerce account details"
|
370 |
msgstr ""
|
371 |
|
372 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:202
|
373 |
msgid "Link buttons before account details"
|
374 |
msgstr ""
|
375 |
|
376 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:207
|
377 |
msgid "Link buttons after account details"
|
378 |
msgstr ""
|
379 |
|
380 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:214
|
381 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:218
|
382 |
msgid "WooCommerce button style"
|
383 |
msgstr ""
|
384 |
|
385 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:235
|
386 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:239
|
387 |
+
msgid "Registration notification sent to"
|
388 |
+
msgstr ""
|
389 |
+
|
390 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:242
|
391 |
+
msgid "WordPress default"
|
392 |
+
msgstr ""
|
393 |
+
|
394 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:245
|
395 |
+
msgid "Nobody"
|
396 |
+
msgstr ""
|
397 |
+
|
398 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:248
|
399 |
+
msgid "User"
|
400 |
+
msgstr ""
|
401 |
+
|
402 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:251
|
403 |
+
msgid "Admin"
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
+
#: nextend-facebook-connect/admin/templates/global-settings-pro.php:254
|
407 |
+
msgid "User and Admin"
|
408 |
+
msgstr ""
|
409 |
+
|
410 |
+
#: nextend-facebook-connect/admin/templates/global-settings.php:43
|
411 |
+
#: nextend-facebook-connect/admin/templates/global-settings.php:47
|
412 |
msgid "Debug mode"
|
413 |
msgstr ""
|
414 |
|
415 |
+
#: nextend-facebook-connect/admin/templates/global-settings.php:53
|
416 |
+
#: nextend-facebook-connect/admin/templates/providers.php:36
|
417 |
+
#: nextend-facebook-connect/includes/provider.php:906
|
418 |
msgid "Enabled"
|
419 |
msgstr ""
|
420 |
|
421 |
+
#: nextend-facebook-connect/admin/templates/global-settings.php:59
|
422 |
msgid "Fixed redirect url for login"
|
423 |
msgstr ""
|
424 |
|
425 |
+
#: nextend-facebook-connect/admin/templates/global-settings.php:72
|
426 |
+
#: nextend-facebook-connect/admin/templates/global-settings.php:93
|
427 |
msgid "Use custom"
|
428 |
msgstr ""
|
429 |
|
430 |
+
#: nextend-facebook-connect/admin/templates/global-settings.php:80
|
431 |
msgid "Fixed redirect url for register"
|
432 |
msgstr ""
|
433 |
|
434 |
+
#: nextend-facebook-connect/admin/templates/header.php:14
|
435 |
msgid "Docs"
|
436 |
msgstr ""
|
437 |
|
438 |
+
#: nextend-facebook-connect/admin/templates/header.php:17
|
439 |
msgid "Support"
|
440 |
msgstr ""
|
441 |
|
442 |
+
#: nextend-facebook-connect/admin/templates/header.php:20
|
443 |
+
#: nextend-facebook-connect/admin/templates/menu.php:12
|
444 |
msgid "Pro Addon"
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: nextend-facebook-connect/admin/templates/menu.php:6
|
448 |
msgid "Providers"
|
449 |
msgstr ""
|
450 |
|
451 |
+
#: nextend-facebook-connect/admin/templates/menu.php:8
|
452 |
msgid "Global Settings"
|
453 |
msgstr ""
|
454 |
|
455 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:13
|
456 |
msgid "Error"
|
457 |
msgstr ""
|
458 |
|
459 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:14
|
460 |
msgid ""
|
461 |
"You don’t have sufficient permissions to install and activate plugins. "
|
462 |
"Please contact your site’s administrator!"
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:22
|
466 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:32
|
467 |
+
#: nextend-facebook-connect/admin/templates/pro.php:34
|
468 |
msgid "Activate Pro Addon"
|
469 |
msgstr ""
|
470 |
|
471 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:23
|
472 |
msgid ""
|
473 |
"Pro Addon is installed but not activated. To be able to use the Pro "
|
474 |
"features, you need to activate it."
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:37
|
478 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:215
|
479 |
msgid "Deauthorize Pro Addon"
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:48
|
483 |
+
#: nextend-facebook-connect/admin/templates/pro.php:43
|
484 |
msgid "Pro Addon is not installed"
|
485 |
msgstr ""
|
486 |
|
487 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:50
|
488 |
msgid ""
|
489 |
"To access the Pro features, you need to install and activate the Pro Addon."
|
490 |
msgstr ""
|
491 |
|
492 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:59
|
493 |
#, php-format
|
494 |
msgid "Install %s now"
|
495 |
msgstr ""
|
496 |
|
497 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:60
|
498 |
+
#: nextend-facebook-connect/admin/templates/pro.php:47
|
499 |
msgid "Install Pro Addon"
|
500 |
msgstr ""
|
501 |
|
502 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:94
|
503 |
msgid "Activating..."
|
504 |
msgstr ""
|
505 |
|
506 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:126
|
507 |
msgid "Authorize your Pro Addon"
|
508 |
msgstr ""
|
509 |
|
510 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:127
|
511 |
msgid ""
|
512 |
"To be able to use the Pro features, you need to authorize Nextend Social "
|
513 |
"Connect Pro Addon. You can do this by clicking on the Authorize button below "
|
514 |
"then select the related purchase."
|
515 |
msgstr ""
|
516 |
|
517 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:132
|
518 |
msgid "Authorize"
|
519 |
msgstr ""
|
520 |
|
521 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:189
|
522 |
msgid "License key"
|
523 |
msgstr ""
|
524 |
|
525 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:206
|
526 |
msgid "Pro Addon is installed and activated"
|
527 |
msgstr ""
|
528 |
|
529 |
+
#: nextend-facebook-connect/admin/templates/pro-addon.php:208
|
530 |
msgid ""
|
531 |
"You installed and activated the Pro Addon. If you don’t want to use it "
|
532 |
"anymore, you can deauthorize using the button below."
|
533 |
msgstr ""
|
534 |
|
535 |
+
#: nextend-facebook-connect/admin/templates/pro.php:8
|
536 |
msgid "Get Pro Addon to unlock more features"
|
537 |
msgstr ""
|
538 |
|
539 |
+
#: nextend-facebook-connect/admin/templates/pro.php:9
|
540 |
+
#, php-format
|
541 |
msgid ""
|
542 |
+
"The features below are available in %s Pro Addon. Get it today and tweak the "
|
543 |
+
"awesome settings."
|
544 |
msgstr ""
|
545 |
|
546 |
+
#: nextend-facebook-connect/admin/templates/pro.php:10
|
547 |
msgid ""
|
548 |
"If you already have a license, you can Authorize your Pro Addon. Otherwise "
|
549 |
"you can purchase it using the button below."
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: nextend-facebook-connect/admin/templates/pro.php:14
|
553 |
msgid "Buy Pro Addon"
|
554 |
msgstr ""
|
555 |
|
556 |
+
#: nextend-facebook-connect/admin/templates/pro.php:16
|
557 |
msgid "Authorize Pro Addon"
|
558 |
msgstr ""
|
559 |
|
560 |
+
#: nextend-facebook-connect/admin/templates/pro.php:25
|
561 |
msgid "Pro Addon is not activated"
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: nextend-facebook-connect/admin/templates/pro.php:26
|
565 |
+
#: nextend-facebook-connect/admin/templates/pro.php:44
|
566 |
msgid ""
|
567 |
"To be able to use the Pro features, you need to install and activate the "
|
568 |
"Nextend Social Connect Pro Addon."
|
569 |
msgstr ""
|
570 |
|
571 |
+
#: nextend-facebook-connect/admin/templates/providers.php:24
|
572 |
msgid "Not Available"
|
573 |
msgstr ""
|
574 |
|
575 |
+
#: nextend-facebook-connect/admin/templates/providers.php:27
|
576 |
msgid "Not Configured"
|
577 |
msgstr ""
|
578 |
|
579 |
+
#: nextend-facebook-connect/admin/templates/providers.php:30
|
580 |
msgid "Not Tested"
|
581 |
msgstr ""
|
582 |
|
583 |
+
#: nextend-facebook-connect/admin/templates/providers.php:39
|
584 |
msgid "Legacy"
|
585 |
msgstr ""
|
586 |
|
587 |
+
#: nextend-facebook-connect/admin/templates/providers.php:51
|
588 |
msgid "Upgrade Now"
|
589 |
msgstr ""
|
590 |
|
591 |
+
#: nextend-facebook-connect/admin/templates/providers.php:66
|
592 |
msgid "Test to Enable"
|
593 |
msgstr ""
|
594 |
|
595 |
+
#: nextend-facebook-connect/admin/templates/providers.php:74
|
596 |
+
#: nextend-facebook-connect/includes/provider.php:935
|
597 |
msgid "Enable"
|
598 |
msgstr ""
|
599 |
|
600 |
+
#: nextend-facebook-connect/admin/templates/providers.php:86
|
601 |
+
#: nextend-facebook-connect/includes/provider.php:943
|
602 |
msgid "Disable"
|
603 |
msgstr ""
|
604 |
|
605 |
+
#: nextend-facebook-connect/admin/templates/providers.php:97
|
606 |
msgid "Import"
|
607 |
msgstr ""
|
608 |
|
609 |
+
#: nextend-facebook-connect/admin/templates/providers.php:116
|
610 |
msgid "Saving..."
|
611 |
msgstr ""
|
612 |
|
613 |
+
#: nextend-facebook-connect/admin/templates/providers.php:117
|
614 |
msgid "Saving failed"
|
615 |
msgstr ""
|
616 |
|
617 |
+
#: nextend-facebook-connect/admin/templates/providers.php:118
|
618 |
msgid "Order Saved"
|
619 |
msgstr ""
|
620 |
|
621 |
+
#: nextend-facebook-connect/includes/provider.php:327
|
622 |
+
#: nextend-facebook-connect/includes/provider.php:546
|
623 |
+
#: nextend-facebook-connect/includes/provider.php:557
|
624 |
msgid "Authentication successful"
|
625 |
msgstr ""
|
626 |
|
627 |
+
#: nextend-facebook-connect/includes/provider.php:375
|
628 |
#, php-format
|
629 |
msgid ""
|
630 |
+
"Your %1$s account is successfully linked with your account. Now you can sign "
|
631 |
+
"in with %2$s easily."
|
632 |
msgstr ""
|
633 |
|
634 |
+
#: nextend-facebook-connect/includes/provider.php:379
|
635 |
#, php-format
|
636 |
msgid ""
|
637 |
"This %s account is already linked with other account. Linking process failed!"
|
638 |
msgstr ""
|
639 |
|
640 |
+
#: nextend-facebook-connect/includes/provider.php:485
|
641 |
msgid "Authentication error"
|
642 |
msgstr ""
|
643 |
|
644 |
+
#: nextend-facebook-connect/includes/provider.php:494
|
645 |
msgid "Unlink successful."
|
646 |
msgstr ""
|
647 |
|
648 |
+
#: nextend-facebook-connect/includes/provider.php:765
|
649 |
+
#: nextend-facebook-connect/includes/provider.php:772
|
650 |
msgid "The test was successful"
|
651 |
msgstr ""
|
652 |
|
653 |
+
#: nextend-facebook-connect/includes/provider.php:813
|
654 |
msgid "Authentication failed"
|
655 |
msgstr ""
|
656 |
|
657 |
+
#: nextend-facebook-connect/includes/provider.php:884
|
658 |
msgid "Your configuration needs testing"
|
659 |
msgstr ""
|
660 |
|
661 |
+
#: nextend-facebook-connect/includes/provider.php:885
|
662 |
msgid ""
|
663 |
"Before you can start letting your users register with your app it needs to "
|
664 |
"be tested. This test makes sure that no users will have troubles with the "
|
667 |
"are fine."
|
668 |
msgstr ""
|
669 |
|
670 |
+
#: nextend-facebook-connect/includes/provider.php:890
|
671 |
msgid "Test the Configuration"
|
672 |
msgstr ""
|
673 |
|
674 |
+
#: nextend-facebook-connect/includes/provider.php:891
|
675 |
+
#: nextend-facebook-connect/includes/provider.php:928
|
676 |
msgid "Please save your changes before testing."
|
677 |
msgstr ""
|
678 |
|
679 |
+
#: nextend-facebook-connect/includes/provider.php:899
|
680 |
msgid "Works Fine"
|
681 |
msgstr ""
|
682 |
|
683 |
+
#: nextend-facebook-connect/includes/provider.php:913
|
684 |
#, php-format
|
685 |
msgid ""
|
686 |
"This provider is currently disabled, which means that users can’t register "
|
687 |
"or login via their %s account."
|
688 |
msgstr ""
|
689 |
|
690 |
+
#: nextend-facebook-connect/includes/provider.php:916
|
691 |
#, php-format
|
692 |
msgid ""
|
693 |
"This provider works fine, but you can test it again. If you don’t want to "
|
694 |
"let users register or login with %s anymore you can disable it."
|
695 |
msgstr ""
|
696 |
|
697 |
+
#: nextend-facebook-connect/includes/provider.php:919
|
698 |
#, php-format
|
699 |
msgid ""
|
700 |
"This provider is currently enabled, which means that users can register or "
|
701 |
"login via their %s account."
|
702 |
msgstr ""
|
703 |
|
704 |
+
#: nextend-facebook-connect/includes/provider.php:927
|
705 |
msgid "Test Again"
|
706 |
msgstr ""
|
707 |
|
708 |
+
#: nextend-facebook-connect/nextend-social-login.php:19
|
709 |
#, php-format
|
710 |
msgid ""
|
711 |
"%5$s plugin (version: %1$s, required: %2$s or newer) is not compatible with "
|
713 |
"the latest version! PRO addon disabled."
|
714 |
msgstr ""
|
715 |
|
716 |
+
#: nextend-facebook-connect/nextend-social-login.php:275
|
717 |
#, php-format
|
718 |
msgid ""
|
719 |
"%s took the place of Nextend Google Connect. You can delete Nextend Google "
|
720 |
"Connect as it is not needed anymore."
|
721 |
msgstr ""
|
722 |
|
723 |
+
#: nextend-facebook-connect/nextend-social-login.php:286
|
724 |
#, php-format
|
725 |
msgid ""
|
726 |
"%s took the place of Nextend Twitter Connect. You can delete Nextend Twitter "
|
727 |
"Connect as it is not needed anymore."
|
728 |
msgstr ""
|
729 |
|
730 |
+
#: nextend-facebook-connect/nextend-social-login.php:379
|
731 |
msgid "You have logged in successfully."
|
732 |
msgstr ""
|
733 |
|
734 |
+
#: nextend-facebook-connect/nextend-social-login.php:466
|
735 |
msgid "Social Login"
|
736 |
msgstr ""
|
737 |
|
738 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:7
|
739 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:9
|
740 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:9
|
741 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/getting-started.php:8
|
742 |
#, php-format
|
743 |
msgid ""
|
744 |
"To allow your visitors to log in with their %1$s account, first you must "
|
748 |
"%1$s App."
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:9
|
752 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:11
|
753 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:11
|
754 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/getting-started.php:10
|
755 |
#, php-format
|
756 |
msgctxt "App creation"
|
757 |
msgid "Create %s"
|
758 |
msgstr ""
|
759 |
|
760 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:12
|
761 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:14
|
762 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:14
|
763 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/getting-started.php:13
|
764 |
#, php-format
|
765 |
msgid "Navigate to %s"
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:13
|
769 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:15
|
770 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:15
|
771 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/getting-started.php:14
|
772 |
#, php-format
|
773 |
msgid "Log in with your %s credentials if you are not logged in"
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:14
|
777 |
msgid "Click on the \"Add a New App\" button"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:15
|
781 |
msgid "Fill \"Display Name\" and \"Contact Email\""
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:16
|
785 |
msgid "Click on blue \"Create App ID\" button"
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:17
|
789 |
msgid ""
|
790 |
"Move your mouse over Facebook Login and click on the appearing \"Set Up\" "
|
791 |
"button"
|
792 |
msgstr ""
|
793 |
|
794 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:18
|
795 |
msgid "Choose Web"
|
796 |
msgstr ""
|
797 |
|
798 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:19
|
799 |
#, php-format
|
800 |
msgid "Fill \"Site URL\" with the url of your homepage, probably: <b>%s</b>"
|
801 |
msgstr ""
|
802 |
|
803 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:20
|
804 |
msgid "Click on \"Save\""
|
805 |
msgstr ""
|
806 |
|
807 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:21
|
808 |
msgid "In the left sidebar, click on \"Facebook Login\""
|
809 |
msgstr ""
|
810 |
|
811 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:22
|
812 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:24
|
813 |
#, php-format
|
814 |
msgid ""
|
815 |
"Add the following URL to the \"Valid OAuth redirect URIs\" field: <b>%s</b>"
|
816 |
msgstr ""
|
817 |
|
818 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:23
|
819 |
msgid "Click on \"Save Changes\""
|
820 |
msgstr ""
|
821 |
|
822 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:24
|
823 |
msgid "In the top of the left sidebar, click on \"Settings\""
|
824 |
msgstr ""
|
825 |
|
826 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:25
|
827 |
msgid ""
|
828 |
"Here you can see your \"APP ID\" and you can see your \"App secret\" if you "
|
829 |
"click on the \"Show\" button. These will be needed in plugin's settings."
|
830 |
msgstr ""
|
831 |
|
832 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:26
|
833 |
msgid "Enter your domain name to the App Domains"
|
834 |
msgstr ""
|
835 |
|
836 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:27
|
837 |
msgid ""
|
838 |
"Fill up the \"Privacy Policy URL\". Provide a publicly available and easily "
|
839 |
"accessible privacy policy that explains what data you are collecting and how "
|
840 |
"you will use that data."
|
841 |
msgstr ""
|
842 |
|
843 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:28
|
844 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:17
|
845 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:17
|
846 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:17
|
847 |
+
msgid "Save your changes."
|
848 |
msgstr ""
|
849 |
|
850 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:29
|
851 |
msgid ""
|
852 |
"Your application is currently private, which means that only you can log in "
|
853 |
"with it. In the left sidebar choose \"App Review\" and make your App public"
|
854 |
msgstr ""
|
855 |
|
856 |
+
#: nextend-facebook-connect/providers/facebook/admin/getting-started.php:33
|
857 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:30
|
858 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:25
|
859 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/getting-started.php:27
|
860 |
#, php-format
|
861 |
msgid "I am done setting up my %s"
|
862 |
msgstr ""
|
863 |
|
864 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:7
|
865 |
msgid "Import Facebook configuration"
|
866 |
msgstr ""
|
867 |
|
868 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:8
|
869 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:8
|
870 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:8
|
871 |
msgid "Be sure to read the following notices before you proceed."
|
872 |
msgstr ""
|
873 |
|
874 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:10
|
875 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:10
|
876 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:10
|
877 |
msgid "Important steps before the import"
|
878 |
msgstr ""
|
879 |
|
880 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:11
|
881 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:11
|
882 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:11
|
883 |
msgid ""
|
884 |
"Make sure that the redirect URI for your app is correct before proceeding."
|
885 |
msgstr ""
|
886 |
|
887 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:13
|
888 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:13
|
889 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:13
|
890 |
#, php-format
|
891 |
msgid "Visit %s."
|
892 |
msgstr ""
|
893 |
|
894 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:14
|
895 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:14
|
896 |
msgid "Select your app."
|
897 |
msgstr ""
|
898 |
|
899 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:15
|
900 |
msgid ""
|
901 |
"Go to the Settings menu which you can find below the Facebook Login in the "
|
902 |
"left menu."
|
903 |
msgstr ""
|
904 |
|
905 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:16
|
906 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:16
|
907 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:16
|
908 |
#, php-format
|
909 |
msgid "Make sure that the \"%1$s\" field contains %2$s"
|
910 |
msgstr ""
|
911 |
|
912 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:20
|
913 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:20
|
914 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:20
|
|
|
|
|
|
|
|
|
|
|
|
|
915 |
msgid "The following settings will be imported:"
|
916 |
msgstr ""
|
917 |
|
918 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:22
|
919 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:22
|
920 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:22
|
921 |
msgid "Your old API configurations"
|
922 |
msgstr ""
|
923 |
|
924 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:23
|
925 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:23
|
926 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:23
|
927 |
msgid "The user prefix you set"
|
928 |
msgstr ""
|
929 |
|
930 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:26
|
931 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:26
|
932 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:26
|
933 |
msgid "Create a backup of the old settings"
|
934 |
msgstr ""
|
935 |
|
936 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:29
|
937 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:29
|
938 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:29
|
939 |
msgid "Other changes"
|
940 |
msgstr ""
|
941 |
|
942 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:31
|
943 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:31
|
944 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:31
|
945 |
msgid ""
|
946 |
"The custom redirect URI is now handled globally for all providers, so it "
|
947 |
"won't be imported from the previous version. Visit \"Nextend Social Login > "
|
948 |
"Global settings\" to set the new redirect URIs."
|
949 |
msgstr ""
|
950 |
|
951 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:32
|
952 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:32
|
953 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:32
|
954 |
msgid ""
|
955 |
"The login button's layout will be changed to a new, more modern look. If you "
|
956 |
"used any custom buttons that won't be imported."
|
957 |
msgstr ""
|
958 |
|
959 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:33
|
960 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:33
|
961 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:33
|
962 |
msgid ""
|
963 |
"The old version's PHP functions are not available anymore. This means if you "
|
964 |
"used any custom codes where you used these old functions, you need to remove "
|
965 |
"them."
|
966 |
msgstr ""
|
967 |
|
968 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:35
|
969 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:35
|
970 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:35
|
971 |
msgid ""
|
972 |
"After the importing process finishes, you will need to <b>test</b> your app "
|
973 |
"and <b>enable</b> the provider. You can do both in the next screen."
|
974 |
msgstr ""
|
975 |
|
976 |
+
#: nextend-facebook-connect/providers/facebook/admin/import.php:42
|
977 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:42
|
978 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:43
|
979 |
msgid "Import Configuration"
|
980 |
msgstr ""
|
981 |
|
982 |
+
#: nextend-facebook-connect/providers/facebook/admin/settings.php:26
|
983 |
msgid "App ID"
|
984 |
msgstr ""
|
985 |
|
986 |
+
#: nextend-facebook-connect/providers/facebook/admin/settings.php:27
|
987 |
+
#: nextend-facebook-connect/providers/facebook/admin/settings.php:39
|
988 |
+
#: nextend-facebook-connect/providers/google/admin/settings.php:26
|
989 |
+
#: nextend-facebook-connect/providers/google/admin/settings.php:39
|
990 |
+
#: nextend-facebook-connect/providers/twitter/admin/settings.php:26
|
991 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/settings.php:25
|
992 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/settings.php:37
|
993 |
msgid "Required"
|
994 |
msgstr ""
|
995 |
|
996 |
+
#: nextend-facebook-connect/providers/facebook/admin/settings.php:32
|
997 |
+
#: nextend-facebook-connect/providers/google/admin/settings.php:33
|
998 |
+
#: nextend-facebook-connect/providers/twitter/admin/settings.php:31
|
999 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/settings.php:31
|
1000 |
#, php-format
|
1001 |
msgid ""
|
1002 |
+
"If you are not sure what is your %1$s, please head over to <a href=\"%2$s"
|
1003 |
"\">Getting Started</a>"
|
1004 |
msgstr ""
|
1005 |
|
1006 |
+
#: nextend-facebook-connect/providers/facebook/admin/settings.php:38
|
1007 |
msgid "App Secret"
|
1008 |
msgstr ""
|
1009 |
|
1010 |
+
#: nextend-facebook-connect/providers/facebook/compat/nextend-facebook-connect.php:430
|
1011 |
+
#: nextend-facebook-connect/providers/google/compat/nextend-google-connect.php:352
|
1012 |
+
#: nextend-facebook-connect/providers/twitter/compat/nextend-twitter-connect.php:414
|
1013 |
+
#: nextend-social-login-pro-new/template-parts/login-layout-above-separator.php:9
|
1014 |
+
#: nextend-social-login-pro-new/template-parts/login-layout-below-separator.php:9
|
1015 |
+
msgid "OR"
|
1016 |
msgstr ""
|
1017 |
|
1018 |
+
#: nextend-facebook-connect/providers/facebook/compat/nextend-facebook-settings.php:312
|
1019 |
+
msgid "Nextend FB Connect"
|
|
|
|
|
|
|
1020 |
msgstr ""
|
1021 |
|
1022 |
+
#: nextend-facebook-connect/providers/facebook/facebook.php:49
|
1023 |
msgid "Continue with <b>Facebook</b>"
|
1024 |
msgstr ""
|
1025 |
|
1026 |
+
#: nextend-facebook-connect/providers/facebook/facebook.php:50
|
1027 |
msgid "Link account with <b>Facebook</b>"
|
1028 |
msgstr ""
|
1029 |
|
1030 |
+
#: nextend-facebook-connect/providers/facebook/facebook.php:51
|
1031 |
msgid "Unlink account from <b>Facebook</b>"
|
1032 |
msgstr ""
|
1033 |
|
1034 |
+
#: nextend-facebook-connect/providers/facebook/facebook.php:109
|
1035 |
+
#: nextend-facebook-connect/providers/google/google.php:71
|
1036 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:72
|
1037 |
+
#: nextend-social-login-pro-new/providers/linkedin/linkedin.php:68
|
1038 |
#, php-format
|
1039 |
+
msgid ""
|
1040 |
+
"The %1$s entered did not appear to be a valid. Please enter a valid %2$s."
|
1041 |
msgstr ""
|
1042 |
|
1043 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:16
|
1044 |
msgid ""
|
1045 |
"If you don't have a project yet, you'll need to create one. You can do this "
|
1046 |
"by clicking on the blue \"Create project\" button on the right side"
|
1047 |
msgstr ""
|
1048 |
|
1049 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:17
|
1050 |
msgid "Name your project and then click on the Create button"
|
1051 |
msgstr ""
|
1052 |
|
1053 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:18
|
1054 |
msgid "Once you have a project, you'll end up in the dashboard."
|
1055 |
msgstr ""
|
1056 |
|
1057 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:19
|
1058 |
msgid ""
|
1059 |
"Click on the \"Credentials\" in the left hand menu to create new API "
|
1060 |
"credentials"
|
1061 |
msgstr ""
|
1062 |
|
1063 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:20
|
1064 |
msgid ""
|
1065 |
"Go to the OAuth consent screen tab and enter a product name and provide the "
|
1066 |
"Privacy Policy URL, then click on the save button."
|
1067 |
msgstr ""
|
1068 |
|
1069 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:21
|
1070 |
msgid ""
|
1071 |
"Go back to the Credentials tab and locate the small box at the middle. Click "
|
1072 |
"on the blue \"Create credentials\" button. Chose the \"OAuth client ID\" "
|
1073 |
"from the dropdown list."
|
1074 |
msgstr ""
|
1075 |
|
1076 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:22
|
1077 |
msgid "Your application type should be \"Web application\""
|
1078 |
msgstr ""
|
1079 |
|
1080 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:23
|
1081 |
msgid "Name your application"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:25
|
1085 |
msgid "Click on the Create button"
|
1086 |
msgstr ""
|
1087 |
|
1088 |
+
#: nextend-facebook-connect/providers/google/admin/getting-started.php:26
|
1089 |
msgid ""
|
1090 |
"A modal should pop up with your credentials. If that doesn't happen, go to "
|
1091 |
"the Credentials in the left hand menu and select your app by clicking on its "
|
1093 |
"there."
|
1094 |
msgstr ""
|
1095 |
|
1096 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:7
|
1097 |
msgid "Import Google configuration"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:14
|
1101 |
msgid "If you have more projects, select the one where your app is."
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: nextend-facebook-connect/providers/google/admin/import.php:15
|
1105 |
msgid "Click on Credentials at the left-hand menu then select your app."
|
1106 |
msgstr ""
|
1107 |
|
1108 |
+
#: nextend-facebook-connect/providers/google/admin/settings.php:25
|
1109 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/settings.php:24
|
1110 |
msgid "Client ID"
|
1111 |
msgstr ""
|
1112 |
|
1113 |
+
#: nextend-facebook-connect/providers/google/admin/settings.php:38
|
1114 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/settings.php:36
|
1115 |
msgid "Client Secret"
|
1116 |
msgstr ""
|
1117 |
|
1118 |
+
#: nextend-facebook-connect/providers/google/compat/nextend-google-settings.php:307
|
1119 |
+
msgid "Nextend Google Connect"
|
1120 |
+
msgstr ""
|
1121 |
+
|
1122 |
+
#: nextend-facebook-connect/providers/google/google.php:38
|
1123 |
msgid "Continue with <b>Google</b>"
|
1124 |
msgstr ""
|
1125 |
|
1126 |
+
#: nextend-facebook-connect/providers/google/google.php:39
|
1127 |
msgid "Link account with <b>Google</b>"
|
1128 |
msgstr ""
|
1129 |
|
1130 |
+
#: nextend-facebook-connect/providers/google/google.php:40
|
1131 |
msgid "Unlink account from <b>Google</b>"
|
1132 |
msgstr ""
|
1133 |
|
1134 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:16
|
1135 |
msgid "Click on the \"Create New App\" button"
|
1136 |
msgstr ""
|
1137 |
|
1138 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:17
|
1139 |
#, php-format
|
1140 |
msgid ""
|
1141 |
"Fill the name and description fields. Then enter your site's URL to the "
|
1142 |
"Website field: <b>%s</b>"
|
1143 |
msgstr ""
|
1144 |
|
1145 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:18
|
1146 |
#, php-format
|
1147 |
msgid "Add the following URL to the \"Callback URL\" field: <b>%s</b>"
|
1148 |
msgstr ""
|
1149 |
|
1150 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:19
|
1151 |
msgid "Accept the Twitter Developer Agreement"
|
1152 |
msgstr ""
|
1153 |
|
1154 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:20
|
1155 |
msgid ""
|
1156 |
"Create your application by clicking on the Create your Twitter application "
|
1157 |
"button"
|
1158 |
msgstr ""
|
1159 |
|
1160 |
+
#: nextend-facebook-connect/providers/twitter/admin/getting-started.php:21
|
1161 |
msgid ""
|
1162 |
"Go to the Keys and Access Tokens tab and find the Consumer Key and Secret"
|
1163 |
msgstr ""
|
1164 |
|
1165 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:7
|
1166 |
msgid "Import Twitter configuration"
|
1167 |
msgstr ""
|
1168 |
|
1169 |
+
#: nextend-facebook-connect/providers/twitter/admin/import.php:15
|
1170 |
msgid "Go to the Settings tab."
|
1171 |
msgstr ""
|
1172 |
|
1173 |
+
#: nextend-facebook-connect/providers/twitter/admin/settings.php:25
|
1174 |
msgid "Consumer Key"
|
1175 |
msgstr ""
|
1176 |
|
1177 |
+
#: nextend-facebook-connect/providers/twitter/admin/settings.php:36
|
1178 |
msgid "Consumer Secret"
|
1179 |
msgstr ""
|
1180 |
|
1181 |
+
#: nextend-facebook-connect/providers/twitter/compat/nextend-twitter-connect.php:314
|
1182 |
+
msgid "<strong>ERROR</strong>: Please type your e-mail address."
|
1183 |
+
msgstr ""
|
1184 |
+
|
1185 |
+
#: nextend-facebook-connect/providers/twitter/compat/nextend-twitter-connect.php:316
|
1186 |
+
msgid "<strong>ERROR</strong>: The email address isn’t correct."
|
1187 |
+
msgstr ""
|
1188 |
+
|
1189 |
+
#: nextend-facebook-connect/providers/twitter/compat/nextend-twitter-connect.php:319
|
1190 |
+
msgid ""
|
1191 |
+
"<strong>ERROR</strong>: This email is already registered, please choose "
|
1192 |
+
"another one."
|
1193 |
+
msgstr ""
|
1194 |
+
|
1195 |
+
#: nextend-facebook-connect/providers/twitter/compat/nextend-twitter-connect.php:326
|
1196 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:175
|
1197 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:183
|
1198 |
+
msgid "Registration Form"
|
1199 |
+
msgstr ""
|
1200 |
+
|
1201 |
+
#: nextend-facebook-connect/providers/twitter/compat/nextend-twitter-connect.php:326
|
1202 |
+
msgid "Please enter your email address to register!"
|
1203 |
+
msgstr ""
|
1204 |
+
|
1205 |
+
#: nextend-facebook-connect/providers/twitter/compat/nextend-twitter-connect.php:331
|
1206 |
+
msgid "E-mail"
|
1207 |
+
msgstr ""
|
1208 |
+
|
1209 |
+
#: nextend-facebook-connect/providers/twitter/compat/nextend-twitter-connect.php:335
|
1210 |
+
msgid "A password will be e-mailed to you."
|
1211 |
+
msgstr ""
|
1212 |
+
|
1213 |
+
#: nextend-facebook-connect/providers/twitter/compat/nextend-twitter-connect.php:338
|
1214 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:189
|
1215 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:206
|
1216 |
+
msgid "Register"
|
1217 |
+
msgstr ""
|
1218 |
+
|
1219 |
+
#: nextend-facebook-connect/providers/twitter/compat/nextend-twitter-connect.php:672
|
1220 |
+
msgid "http://wordpress.org/"
|
1221 |
+
msgstr ""
|
1222 |
+
|
1223 |
+
#: nextend-facebook-connect/providers/twitter/compat/nextend-twitter-connect.php:673
|
1224 |
+
msgid "Powered by WordPress"
|
1225 |
+
msgstr ""
|
1226 |
+
|
1227 |
+
#: nextend-facebook-connect/providers/twitter/compat/nextend-twitter-connect.php:749
|
1228 |
+
msgid "Are you lost?"
|
1229 |
+
msgstr ""
|
1230 |
+
|
1231 |
+
#: nextend-facebook-connect/providers/twitter/compat/nextend-twitter-connect.php:749
|
1232 |
+
#, php-format
|
1233 |
+
msgid "← Back to %s"
|
1234 |
+
msgstr ""
|
1235 |
+
|
1236 |
+
#: nextend-facebook-connect/providers/twitter/compat/nextend-twitter-settings.php:117
|
1237 |
+
msgid "Check the realted <b>blog post</b>!"
|
1238 |
+
msgstr ""
|
1239 |
+
|
1240 |
+
#: nextend-facebook-connect/providers/twitter/compat/nextend-twitter-settings.php:287
|
1241 |
+
msgid "Nextend Twitter Connect"
|
1242 |
+
msgstr ""
|
1243 |
+
|
1244 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:39
|
1245 |
msgid "Continue with <b>Twitter</b>"
|
1246 |
msgstr ""
|
1247 |
|
1248 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:40
|
1249 |
msgid "Link account with <b>Twitter</b>"
|
1250 |
msgstr ""
|
1251 |
|
1252 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:41
|
1253 |
msgid "Unlink account from <b>Twitter</b>"
|
1254 |
msgstr ""
|
1255 |
|
1256 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:161
|
1257 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:163
|
1258 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:166
|
1259 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:142
|
1260 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:144
|
1261 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:147
|
1262 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:153
|
1263 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:166
|
1264 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:168
|
1265 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:171
|
1266 |
msgid "ERROR"
|
1267 |
msgstr ""
|
1268 |
|
1269 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:161
|
1270 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:166
|
1271 |
msgid "Please enter an email address."
|
1272 |
msgstr ""
|
1273 |
|
1274 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:163
|
1275 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:168
|
1276 |
msgid "The email address isn’t correct."
|
1277 |
msgstr ""
|
1278 |
|
1279 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:166
|
1280 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:171
|
1281 |
msgid "This email is already registered, please choose another one."
|
1282 |
msgstr ""
|
1283 |
|
1284 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:175
|
1285 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:183
|
|
|
|
|
|
|
|
|
|
|
1286 |
msgid "Register For This Site!"
|
1287 |
msgstr ""
|
1288 |
|
1289 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:181
|
1290 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:197
|
1291 |
msgid "Email"
|
1292 |
msgstr ""
|
1293 |
|
1294 |
+
#: nextend-facebook-connect/providers/twitter/twitter.php:185
|
1295 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:202
|
1296 |
msgid "Registration confirmation will be emailed to you."
|
1297 |
msgstr ""
|
1298 |
|
1299 |
+
#: nextend-facebook-connect/widget.php:10
|
|
|
|
|
|
|
|
|
|
|
1300 |
#, php-format
|
1301 |
msgid "%s Buttons"
|
1302 |
msgstr ""
|
1303 |
|
1304 |
+
#: nextend-facebook-connect/widget.php:22
|
1305 |
msgid "Title:"
|
1306 |
msgstr ""
|
1307 |
|
1308 |
+
#: nextend-facebook-connect/widget.php:30
|
1309 |
msgid "Button style:"
|
1310 |
msgstr ""
|
1311 |
|
1312 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:78
|
1313 |
msgid "Social login is not allowed with this role!"
|
1314 |
msgstr ""
|
1315 |
|
1316 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:142
|
1317 |
msgid "Please enter a username."
|
1318 |
msgstr ""
|
1319 |
|
1320 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:144
|
1321 |
msgid ""
|
1322 |
"This username is invalid because it uses illegal characters. Please enter a "
|
1323 |
"valid username."
|
1324 |
msgstr ""
|
1325 |
|
1326 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:147
|
1327 |
msgid "This username is already registered. Please choose another one."
|
1328 |
msgstr ""
|
1329 |
|
1330 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:153
|
1331 |
msgid "Sorry, that username is not allowed."
|
1332 |
msgstr ""
|
1333 |
|
1334 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:190
|
1335 |
msgid "Username"
|
1336 |
msgstr ""
|
1337 |
|
1338 |
+
#: nextend-social-login-pro-new/class-provider-extension.php:218
|
1339 |
msgid ""
|
1340 |
"This email is already registered, please login in to your account to link "
|
1341 |
"with Facebook."
|
1342 |
msgstr ""
|
1343 |
|
1344 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/getting-started.php:15
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1345 |
msgid "Locate the yellow \"Create application\" button and click on it."
|
1346 |
msgstr ""
|
1347 |
|
1348 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/getting-started.php:16
|
1349 |
msgid "Fill the fields marked with *"
|
1350 |
msgstr ""
|
1351 |
|
1352 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/getting-started.php:17
|
1353 |
#, php-format
|
1354 |
msgid "Fill \"Website URL\" with the url of your homepage, probably: <b>%s</b>"
|
1355 |
msgstr ""
|
1356 |
|
1357 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/getting-started.php:19
|
1358 |
msgid "Accept the Terms of use and hit Submit"
|
1359 |
msgstr ""
|
1360 |
|
1361 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/getting-started.php:20
|
1362 |
msgid "Find the necessary Authentication Keys under the Authentication menu"
|
1363 |
msgstr ""
|
1364 |
|
1365 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/getting-started.php:21
|
1366 |
#, php-format
|
1367 |
msgid ""
|
1368 |
"Add the following URL to the \"Authorized Redirect URLs:\" field: <b>%s</b>"
|
1369 |
msgstr ""
|
1370 |
|
1371 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/getting-started.php:22
|
1372 |
msgid ""
|
1373 |
"You probably want to enable the \"r_emailaddress\" under the Default "
|
1374 |
"Application Permissions"
|
1375 |
msgstr ""
|
1376 |
|
1377 |
+
#: nextend-social-login-pro-new/providers/linkedin/admin/getting-started.php:23
|
1378 |
msgid "Hit update to save the changes"
|
1379 |
msgstr ""
|
1380 |
|
1381 |
+
#: nextend-social-login-pro-new/providers/linkedin/linkedin.php:34
|
1382 |
msgid "Continue with <b>LinkedIn</b>"
|
1383 |
msgstr ""
|
1384 |
|
1385 |
+
#: nextend-social-login-pro-new/providers/linkedin/linkedin.php:35
|
1386 |
msgid "Link account with <b>LinkedIn</b>"
|
1387 |
msgstr ""
|
1388 |
|
1389 |
+
#: nextend-social-login-pro-new/providers/linkedin/linkedin.php:36
|
1390 |
msgid "Unlink account from <b>LinkedIn</b>"
|
1391 |
msgstr ""
|
1392 |
|
1393 |
+
#: nextend-social-login-pro-new/template-parts/woocommerce-edit-account-after.php:1
|
1394 |
+
#: nextend-social-login-pro-new/template-parts/woocommerce-edit-account-before.php:1
|
|
|
|
|
|
|
|
|
|
|
1395 |
msgid "Social accounts"
|
1396 |
msgstr ""
|
nextend-facebook-connect.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Nextend Social Login
|
4 |
Plugin URI: https://nextendweb.com/
|
5 |
Description: Nextend Social Login displays social login buttons for Facebook, Google and Twitter.
|
6 |
-
Version: 3.0.
|
7 |
Author: Nextendweb
|
8 |
License: GPL2
|
9 |
Text Domain: nextend-facebook-connect
|
3 |
Plugin Name: Nextend Social Login
|
4 |
Plugin URI: https://nextendweb.com/
|
5 |
Description: Nextend Social Login displays social login buttons for Facebook, Google and Twitter.
|
6 |
+
Version: 3.0.3
|
7 |
Author: Nextendweb
|
8 |
License: GPL2
|
9 |
Text Domain: nextend-facebook-connect
|
nextend-social-login.php
CHANGED
@@ -9,9 +9,9 @@ require_once(NSL_PATH . '/compat.php');
|
|
9 |
|
10 |
class NextendSocialLogin {
|
11 |
|
12 |
-
public static $version = '3.0.
|
13 |
|
14 |
-
public static $nslPROMinVersion = '3.0.
|
15 |
|
16 |
public static function checkVersion() {
|
17 |
if (version_compare(self::$version, NextendSocialLoginPRO::$nslMinVersion, '<') || version_compare(NextendSocialLoginPRO::$version, self::$nslPROMinVersion, '<')) {
|
@@ -64,25 +64,29 @@ class NextendSocialLogin {
|
|
64 |
add_action('delete_user', 'NextendSocialLogin::delete_user');
|
65 |
|
66 |
self::$settings = new NextendSocialLoginSettings('nextend_social_login', array(
|
67 |
-
'enabled'
|
68 |
-
'ordering'
|
69 |
'facebook',
|
70 |
'google',
|
71 |
'twitter'
|
72 |
),
|
73 |
-
'license_key'
|
74 |
-
'license_key_ok'
|
75 |
-
'redirect'
|
76 |
-
'redirect_reg'
|
77 |
-
'
|
78 |
-
'
|
79 |
-
'
|
80 |
-
'
|
81 |
-
'
|
82 |
-
'
|
83 |
-
'
|
84 |
-
'
|
85 |
-
'
|
|
|
|
|
|
|
|
|
86 |
));
|
87 |
}
|
88 |
|
@@ -127,7 +131,6 @@ class NextendSocialLogin {
|
|
127 |
|
128 |
if (count(self::$enabledProviders) > 0) {
|
129 |
|
130 |
-
|
131 |
add_action('login_form', 'NextendSocialLogin::addLoginFormButtons');
|
132 |
add_action('register_form', 'NextendSocialLogin::addLoginFormButtons');
|
133 |
add_action('bp_sidebar_login_form', 'NextendSocialLogin::addLoginButtons');
|
@@ -138,6 +141,18 @@ class NextendSocialLogin {
|
|
138 |
add_action('login_form_login', 'NextendSocialLogin::jQuery');
|
139 |
add_action('login_form_register', 'NextendSocialLogin::jQuery');
|
140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
add_action('wp_head', 'NextendSocialLogin::styles', 100);
|
142 |
add_action('admin_head', 'NextendSocialLogin::styles', 100);
|
143 |
add_action('login_head', 'NextendSocialLogin::loginHead', 100);
|
@@ -146,7 +161,7 @@ class NextendSocialLogin {
|
|
146 |
add_action('login_footer', 'NextendSocialLogin::scripts', 100);
|
147 |
|
148 |
|
149 |
-
add_filter('get_avatar', 'NextendSocialLogin::renderAvatar', 5,
|
150 |
add_filter('bp_core_fetch_avatar', 'NextendSocialLogin::renderAvatarBP', 3, 5);
|
151 |
|
152 |
|
@@ -156,6 +171,8 @@ class NextendSocialLogin {
|
|
156 |
add_action('admin_print_footer_scripts', 'NextendSocialLogin::scripts', 100);
|
157 |
|
158 |
require_once(NSL_PATH . '/widget.php');
|
|
|
|
|
159 |
}
|
160 |
|
161 |
public static function styles() {
|
@@ -178,9 +195,13 @@ class NextendSocialLogin {
|
|
178 |
}
|
179 |
|
180 |
public static function scripts() {
|
181 |
-
$
|
182 |
-
if (
|
183 |
-
|
|
|
|
|
|
|
|
|
184 |
}
|
185 |
}
|
186 |
|
@@ -195,7 +216,7 @@ class NextendSocialLogin {
|
|
195 |
|
196 |
$facebookSettings = maybe_unserialize(get_option('nextend_fb_connect'));
|
197 |
|
198 |
-
if (!empty($facebookSettings['fb_appid']) && !empty($facebookSettings['fb_secret'])) {
|
199 |
$providerPath = NSL_PATH . '/providers/facebook/facebook.php';
|
200 |
if (file_exists($providerPath)) {
|
201 |
|
@@ -208,7 +229,7 @@ class NextendSocialLogin {
|
|
208 |
}
|
209 |
if (function_exists('new_google_connect_install')) {
|
210 |
$googleSettings = maybe_unserialize(get_option('nextend_google_connect'));
|
211 |
-
if (!empty($googleSettings['google_client_id']) && !empty($googleSettings['google_client_secret'])) {
|
212 |
$providerPath = NSL_PATH . '/providers/google/google.php';
|
213 |
if (file_exists($providerPath)) {
|
214 |
|
@@ -226,7 +247,7 @@ class NextendSocialLogin {
|
|
226 |
|
227 |
if (function_exists('new_twitter_connect_install')) {
|
228 |
$twitterSettings = maybe_unserialize(get_option('nextend_twitter_connect'));
|
229 |
-
if (!empty($twitterSettings['twitter_consumer_key']) && !empty($twitterSettings['twitter_consumer_secret'])) {
|
230 |
$providerPath = NSL_PATH . '/providers/twitter/twitter.php';
|
231 |
if (file_exists($providerPath)) {
|
232 |
|
@@ -241,6 +262,8 @@ class NextendSocialLogin {
|
|
241 |
NextendSocialLogin::compatDeactivateTwitter();
|
242 |
add_action('activated_plugin', 'NextendSocialLogin::compatDeactivateTwitter');
|
243 |
}
|
|
|
|
|
244 |
}
|
245 |
|
246 |
public static function compatDeactivateGoogle() {
|
@@ -409,18 +432,28 @@ class NextendSocialLogin {
|
|
409 |
}
|
410 |
|
411 |
public static function addLoginButtons() {
|
412 |
-
self::renderLoginButtons(
|
|
|
|
|
|
|
|
|
|
|
413 |
}
|
414 |
|
415 |
-
|
|
|
|
|
|
|
|
|
|
|
416 |
|
417 |
if (!self::$loginHeadAdded) {
|
418 |
$index = self::$counter++;
|
419 |
-
echo '<div id="nsl-custom-login-form-' . $index . '">' . self::renderButtonsWithContainer(self::$settings->get('login_form_button_style'), false
|
420 |
echo '<script type="text/javascript">(function($){$("document").ready(function(){var el = $("#nsl-custom-login-form-' . $index . '");el.appendTo(el.closest("form"))})})(jQuery)</script>';
|
421 |
} else {
|
422 |
|
423 |
-
echo self::renderButtonsWithContainer(self::$settings->get('login_form_button_style'), false
|
424 |
}
|
425 |
|
426 |
}
|
@@ -457,7 +490,7 @@ class NextendSocialLogin {
|
|
457 |
return false;
|
458 |
}
|
459 |
|
460 |
-
public static function renderAvatar($avatar = '', $id_or_email, $size = 96, $default = '', $alt = false) {
|
461 |
|
462 |
$id = 0;
|
463 |
|
@@ -482,13 +515,26 @@ class NextendSocialLogin {
|
|
482 |
return $avatar;
|
483 |
}
|
484 |
|
485 |
-
$
|
486 |
-
if (!$
|
487 |
return $avatar;
|
488 |
}
|
489 |
-
$avatar = preg_replace('/src=("|\').*?("|\')/i', 'src=\'' . $pic . '\'', $avatar);
|
490 |
|
491 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
492 |
}
|
493 |
|
494 |
public static function renderAvatarBP($avatar = '', $params, $id) {
|
@@ -508,6 +554,10 @@ class NextendSocialLogin {
|
|
508 |
public static function shortcode($atts) {
|
509 |
if (!is_user_logged_in()) {
|
510 |
|
|
|
|
|
|
|
|
|
511 |
$atts = array_merge(array(
|
512 |
'style' => 'default',
|
513 |
'provider' => false,
|
@@ -539,6 +589,10 @@ class NextendSocialLogin {
|
|
539 |
$style = 'default';
|
540 |
}
|
541 |
|
|
|
|
|
|
|
|
|
542 |
$enabledProviders = false;
|
543 |
if (is_array($providers)) {
|
544 |
$enabledProviders = array();
|
@@ -566,7 +620,16 @@ class NextendSocialLogin {
|
|
566 |
|
567 |
public static function getCurrentPageURL() {
|
568 |
|
569 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
570 |
}
|
571 |
|
572 |
public static function get_template_part($file_name, $name = null) {
|
9 |
|
10 |
class NextendSocialLogin {
|
11 |
|
12 |
+
public static $version = '3.0.3';
|
13 |
|
14 |
+
public static $nslPROMinVersion = '3.0.3';
|
15 |
|
16 |
public static function checkVersion() {
|
17 |
if (version_compare(self::$version, NextendSocialLoginPRO::$nslMinVersion, '<') || version_compare(NextendSocialLoginPRO::$version, self::$nslPROMinVersion, '<')) {
|
64 |
add_action('delete_user', 'NextendSocialLogin::delete_user');
|
65 |
|
66 |
self::$settings = new NextendSocialLoginSettings('nextend_social_login', array(
|
67 |
+
'enabled' => array(),
|
68 |
+
'ordering' => array(
|
69 |
'facebook',
|
70 |
'google',
|
71 |
'twitter'
|
72 |
),
|
73 |
+
'license_key' => '',
|
74 |
+
'license_key_ok' => '0',
|
75 |
+
'redirect' => '',
|
76 |
+
'redirect_reg' => '',
|
77 |
+
'show_login_form' => 'show',
|
78 |
+
'show_registration_form' => 'show',
|
79 |
+
'login_form_layout' => 'below',
|
80 |
+
'login_form_button_style' => 'default',
|
81 |
+
'comment_login_button' => 'show',
|
82 |
+
'comment_button_style' => 'default',
|
83 |
+
'woocommerce_login' => 'after',
|
84 |
+
'woocommerce_billing' => 'before',
|
85 |
+
'woocoommerce_form_button_style' => 'default',
|
86 |
+
'woocommerce_account_details' => 'before',
|
87 |
+
'registration_notification_notify' => '0',
|
88 |
+
'debug' => '0',
|
89 |
+
'review_state' => -1
|
90 |
));
|
91 |
}
|
92 |
|
131 |
|
132 |
if (count(self::$enabledProviders) > 0) {
|
133 |
|
|
|
134 |
add_action('login_form', 'NextendSocialLogin::addLoginFormButtons');
|
135 |
add_action('register_form', 'NextendSocialLogin::addLoginFormButtons');
|
136 |
add_action('bp_sidebar_login_form', 'NextendSocialLogin::addLoginButtons');
|
141 |
add_action('login_form_login', 'NextendSocialLogin::jQuery');
|
142 |
add_action('login_form_register', 'NextendSocialLogin::jQuery');
|
143 |
|
144 |
+
|
145 |
+
/*
|
146 |
+
* Shopkeeper theme fix. Remove normal login form hooks while WooCommerce registration/login form rendering
|
147 |
+
*/
|
148 |
+
add_action('woocommerce_login_form_start', 'NextendSocialLogin::remove_action_login_form_buttons');
|
149 |
+
add_action('woocommerce_login_form_end', 'NextendSocialLogin::add_action_login_form_buttons');
|
150 |
+
|
151 |
+
add_action('woocommerce_register_form_start', 'NextendSocialLogin::remove_action_login_form_buttons');
|
152 |
+
add_action('woocommerce_register_form_end', 'NextendSocialLogin::add_action_login_form_buttons');
|
153 |
+
/* End of fix */
|
154 |
+
|
155 |
+
|
156 |
add_action('wp_head', 'NextendSocialLogin::styles', 100);
|
157 |
add_action('admin_head', 'NextendSocialLogin::styles', 100);
|
158 |
add_action('login_head', 'NextendSocialLogin::loginHead', 100);
|
161 |
add_action('login_footer', 'NextendSocialLogin::scripts', 100);
|
162 |
|
163 |
|
164 |
+
add_filter('get_avatar', 'NextendSocialLogin::renderAvatar', 5, 6);
|
165 |
add_filter('bp_core_fetch_avatar', 'NextendSocialLogin::renderAvatarBP', 3, 5);
|
166 |
|
167 |
|
171 |
add_action('admin_print_footer_scripts', 'NextendSocialLogin::scripts', 100);
|
172 |
|
173 |
require_once(NSL_PATH . '/widget.php');
|
174 |
+
|
175 |
+
do_action('nsl_init');
|
176 |
}
|
177 |
|
178 |
public static function styles() {
|
195 |
}
|
196 |
|
197 |
public static function scripts() {
|
198 |
+
static $once = null;
|
199 |
+
if ($once === null) {
|
200 |
+
$scripts = NSL_PATH . '/js/nsl.js';
|
201 |
+
if (file_exists($scripts)) {
|
202 |
+
echo '<script type="text/javascript">' . file_get_contents($scripts) . '</script>';
|
203 |
+
}
|
204 |
+
$once = true;
|
205 |
}
|
206 |
}
|
207 |
|
216 |
|
217 |
$facebookSettings = maybe_unserialize(get_option('nextend_fb_connect'));
|
218 |
|
219 |
+
if ($facebookSettings !== false && !empty($facebookSettings['fb_appid']) && !empty($facebookSettings['fb_secret'])) {
|
220 |
$providerPath = NSL_PATH . '/providers/facebook/facebook.php';
|
221 |
if (file_exists($providerPath)) {
|
222 |
|
229 |
}
|
230 |
if (function_exists('new_google_connect_install')) {
|
231 |
$googleSettings = maybe_unserialize(get_option('nextend_google_connect'));
|
232 |
+
if ($googleSettings !== false && !empty($googleSettings['google_client_id']) && !empty($googleSettings['google_client_secret'])) {
|
233 |
$providerPath = NSL_PATH . '/providers/google/google.php';
|
234 |
if (file_exists($providerPath)) {
|
235 |
|
247 |
|
248 |
if (function_exists('new_twitter_connect_install')) {
|
249 |
$twitterSettings = maybe_unserialize(get_option('nextend_twitter_connect'));
|
250 |
+
if ($twitterSettings !== false && !empty($twitterSettings['twitter_consumer_key']) && !empty($twitterSettings['twitter_consumer_secret'])) {
|
251 |
$providerPath = NSL_PATH . '/providers/twitter/twitter.php';
|
252 |
if (file_exists($providerPath)) {
|
253 |
|
262 |
NextendSocialLogin::compatDeactivateTwitter();
|
263 |
add_action('activated_plugin', 'NextendSocialLogin::compatDeactivateTwitter');
|
264 |
}
|
265 |
+
|
266 |
+
update_option('nsl-version', self::$version, true);
|
267 |
}
|
268 |
|
269 |
public static function compatDeactivateGoogle() {
|
432 |
}
|
433 |
|
434 |
public static function addLoginButtons() {
|
435 |
+
self::renderLoginButtons();
|
436 |
+
}
|
437 |
+
|
438 |
+
public static function remove_action_login_form_buttons() {
|
439 |
+
remove_action('login_form', 'NextendSocialLogin::addLoginFormButtons');
|
440 |
+
remove_action('register_form', 'NextendSocialLogin::addLoginFormButtons');
|
441 |
}
|
442 |
|
443 |
+
public static function add_action_login_form_buttons() {
|
444 |
+
add_action('login_form', 'NextendSocialLogin::addLoginFormButtons');
|
445 |
+
add_action('register_form', 'NextendSocialLogin::addLoginFormButtons');
|
446 |
+
}
|
447 |
+
|
448 |
+
private static function renderLoginButtons() {
|
449 |
|
450 |
if (!self::$loginHeadAdded) {
|
451 |
$index = self::$counter++;
|
452 |
+
echo '<div id="nsl-custom-login-form-' . $index . '">' . self::renderButtonsWithContainer(self::$settings->get('login_form_button_style'), false) . '</div>';
|
453 |
echo '<script type="text/javascript">(function($){$("document").ready(function(){var el = $("#nsl-custom-login-form-' . $index . '");el.appendTo(el.closest("form"))})})(jQuery)</script>';
|
454 |
} else {
|
455 |
|
456 |
+
echo self::renderButtonsWithContainer(self::$settings->get('login_form_button_style'), false);
|
457 |
}
|
458 |
|
459 |
}
|
490 |
return false;
|
491 |
}
|
492 |
|
493 |
+
public static function renderAvatar($avatar = '', $id_or_email, $size = 96, $default = '', $alt = false, $args = array()) {
|
494 |
|
495 |
$id = 0;
|
496 |
|
515 |
return $avatar;
|
516 |
}
|
517 |
|
518 |
+
$url = self::getAvatar($id);
|
519 |
+
if (!$url) {
|
520 |
return $avatar;
|
521 |
}
|
|
|
522 |
|
523 |
+
$class = array(
|
524 |
+
'avatar',
|
525 |
+
'avatar-' . (int)$args['size'],
|
526 |
+
'photo'
|
527 |
+
);
|
528 |
+
|
529 |
+
if ($args['class']) {
|
530 |
+
if (is_array($args['class'])) {
|
531 |
+
$class = array_merge($class, $args['class']);
|
532 |
+
} else {
|
533 |
+
$class[] = $args['class'];
|
534 |
+
}
|
535 |
+
}
|
536 |
+
|
537 |
+
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']);
|
538 |
}
|
539 |
|
540 |
public static function renderAvatarBP($avatar = '', $params, $id) {
|
554 |
public static function shortcode($atts) {
|
555 |
if (!is_user_logged_in()) {
|
556 |
|
557 |
+
if (!is_array($atts)) {
|
558 |
+
$atts = array();
|
559 |
+
}
|
560 |
+
|
561 |
$atts = array_merge(array(
|
562 |
'style' => 'default',
|
563 |
'provider' => false,
|
589 |
$style = 'default';
|
590 |
}
|
591 |
|
592 |
+
if ($redirect_to === false) {
|
593 |
+
$redirect_to = NextendSocialLogin::getCurrentPageURL();
|
594 |
+
}
|
595 |
+
|
596 |
$enabledProviders = false;
|
597 |
if (is_array($providers)) {
|
598 |
$enabledProviders = array();
|
620 |
|
621 |
public static function getCurrentPageURL() {
|
622 |
|
623 |
+
$currentUrl = set_url_scheme('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
|
624 |
+
|
625 |
+
$loginUrl = site_url('wp-login.php');
|
626 |
+
|
627 |
+
// If the currentUrl is the loginUrl, then we should not return it for redirects
|
628 |
+
if (strpos($currentUrl, $loginUrl) === 0) {
|
629 |
+
return false;
|
630 |
+
}
|
631 |
+
|
632 |
+
return $currentUrl;
|
633 |
}
|
634 |
|
635 |
public static function get_template_part($file_name, $name = null) {
|
providers/facebook/admin/getting-started.php
CHANGED
@@ -25,7 +25,7 @@ defined('ABSPATH') || die();
|
|
25 |
<li><?php _e('Here you can see your "APP ID" and you can see your "App secret" if you click on the "Show" button. These will be needed in plugin\'s settings.', 'nextend-facebook-connect'); ?></li>
|
26 |
<li><?php _e('Enter your domain name to the App Domains', 'nextend-facebook-connect'); ?></li>
|
27 |
<li><?php _e('Fill up the "Privacy Policy URL". Provide a publicly available and easily accessible privacy policy that explains what data you are collecting and how you will use that data.', 'nextend-facebook-connect'); ?></li>
|
28 |
-
<li><?php _e('Save your changes', 'nextend-facebook-connect'); ?></li>
|
29 |
<li><?php _e('Your application is currently private, which means that only you can log in with it. In the left sidebar choose "App Review" and make your App public', 'nextend-facebook-connect'); ?></li>
|
30 |
</ol>
|
31 |
|
25 |
<li><?php _e('Here you can see your "APP ID" and you can see your "App secret" if you click on the "Show" button. These will be needed in plugin\'s settings.', 'nextend-facebook-connect'); ?></li>
|
26 |
<li><?php _e('Enter your domain name to the App Domains', 'nextend-facebook-connect'); ?></li>
|
27 |
<li><?php _e('Fill up the "Privacy Policy URL". Provide a publicly available and easily accessible privacy policy that explains what data you are collecting and how you will use that data.', 'nextend-facebook-connect'); ?></li>
|
28 |
+
<li><?php _e('Save your changes.', 'nextend-facebook-connect'); ?></li>
|
29 |
<li><?php _e('Your application is currently private, which means that only you can log in with it. In the left sidebar choose "App Review" and make your App public', 'nextend-facebook-connect'); ?></li>
|
30 |
</ol>
|
31 |
|
providers/facebook/admin/settings.php
CHANGED
@@ -29,7 +29,7 @@ $settings = $this->settings;
|
|
29 |
<input name="appid" type="text" id="appid"
|
30 |
value="<?php echo esc_attr($settings->get('appid')); ?>" class="regular-text">
|
31 |
<p class="description"
|
32 |
-
id="tagline-appid"><?php printf(__('If you are not sure what is your %s, please head over to <a href="%s">Getting Started</a>', 'nextend-facebook-connect'), 'App ID', $this->getAdminUrl()); ?></p>
|
33 |
</td>
|
34 |
</tr>
|
35 |
<?php endif; ?>
|
@@ -47,21 +47,9 @@ $settings = $this->settings;
|
|
47 |
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
48 |
value="<?php _e('Save Changes'); ?>"></p>
|
49 |
|
50 |
-
|
51 |
-
<hr/>
|
52 |
-
<h2><?php _e('Other settings', 'nextend-facebook-connect'); ?></h2>
|
53 |
-
<table class="form-table">
|
54 |
-
<tbody>
|
55 |
-
<tr>
|
56 |
-
<th scope="row"><label
|
57 |
-
for="user_prefix"><?php _e('Username prefix on register', 'nextend-facebook-connect'); ?></label></th>
|
58 |
-
<td><input name="user_prefix" type="text" id="user_prefix"
|
59 |
-
value="<?php echo esc_attr($settings->get('user_prefix')); ?>" class="regular-text"></td>
|
60 |
-
</tr>
|
61 |
-
</tbody>
|
62 |
-
</table>
|
63 |
-
|
64 |
<?php
|
|
|
|
|
65 |
$this->renderProSettings();
|
66 |
?>
|
67 |
</form>
|
29 |
<input name="appid" type="text" id="appid"
|
30 |
value="<?php echo esc_attr($settings->get('appid')); ?>" class="regular-text">
|
31 |
<p class="description"
|
32 |
+
id="tagline-appid"><?php printf(__('If you are not sure what is your %1$s, please head over to <a href="%2$s">Getting Started</a>', 'nextend-facebook-connect'), 'App ID', $this->getAdminUrl()); ?></p>
|
33 |
</td>
|
34 |
</tr>
|
35 |
<?php endif; ?>
|
47 |
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
48 |
value="<?php _e('Save Changes'); ?>"></p>
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
<?php
|
51 |
+
$this->renderOtherSettings();
|
52 |
+
|
53 |
$this->renderProSettings();
|
54 |
?>
|
55 |
</form>
|
providers/facebook/facebook-client.php
CHANGED
@@ -12,7 +12,10 @@ class NextendSocialProviderFacebookClient extends NextendSocialOauth2 {
|
|
12 |
'created' => -1
|
13 |
);
|
14 |
|
15 |
-
protected $scopes = array(
|
|
|
|
|
|
|
16 |
|
17 |
public function __construct($providerID, $isTest) {
|
18 |
parent::__construct($providerID);
|
@@ -34,24 +37,37 @@ class NextendSocialProviderFacebookClient extends NextendSocialOauth2 {
|
|
34 |
return $this->access_token_data['created'] + $this->access_token_data['expires_in'] > time() + (60 * 60 * 2);
|
35 |
}
|
36 |
|
|
|
|
|
|
|
|
|
37 |
public function requestLongLivedAccessToken() {
|
38 |
|
39 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
));
|
47 |
|
48 |
-
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
} else {
|
53 |
-
throw new Exception($curl->errorCode . ': ' . $curl->errorMessage);
|
54 |
-
}
|
55 |
}
|
56 |
|
57 |
$accessTokenData['created'] = time();
|
12 |
'created' => -1
|
13 |
);
|
14 |
|
15 |
+
protected $scopes = array(
|
16 |
+
'public_profile',
|
17 |
+
'email'
|
18 |
+
);
|
19 |
|
20 |
public function __construct($providerID, $isTest) {
|
21 |
parent::__construct($providerID);
|
37 |
return $this->access_token_data['created'] + $this->access_token_data['expires_in'] > time() + (60 * 60 * 2);
|
38 |
}
|
39 |
|
40 |
+
/**
|
41 |
+
* @return false|string
|
42 |
+
* @throws Exception
|
43 |
+
*/
|
44 |
public function requestLongLivedAccessToken() {
|
45 |
|
46 |
+
$http_args = array(
|
47 |
+
'timeout' => 15,
|
48 |
+
'user-agent' => 'WordPress',
|
49 |
+
'body' => array(
|
50 |
+
'grant_type' => 'fb_exchange_token',
|
51 |
+
'client_id' => $this->client_id,
|
52 |
+
'client_secret' => $this->client_secret,
|
53 |
+
'fb_exchange_token' => $this->access_token_data['access_token']
|
54 |
+
)
|
55 |
+
);
|
56 |
+
|
57 |
+
$request = wp_remote_get($this->endpointAccessToken, $http_args);
|
58 |
+
|
59 |
+
if (is_wp_error($request)) {
|
60 |
|
61 |
+
throw new Exception($request->get_error_message());
|
62 |
+
} else if (wp_remote_retrieve_response_code($request) !== 200) {
|
63 |
+
|
64 |
+
$this->errorFromResponse(json_decode(wp_remote_retrieve_body($request), true));
|
65 |
+
}
|
|
|
66 |
|
67 |
+
$accessTokenData = json_decode(wp_remote_retrieve_body($request), true);
|
68 |
|
69 |
+
if (!is_array($accessTokenData)) {
|
70 |
+
throw new Exception(sprintf(__('Unexpected response: %s', 'nextend-facebook-connect'), wp_remote_retrieve_body($request)));
|
|
|
|
|
|
|
71 |
}
|
72 |
|
73 |
$accessTokenData['created'] = time();
|
providers/facebook/facebook.php
CHANGED
@@ -34,7 +34,6 @@ class NextendSocialProviderFacebook extends NextendSocialProvider {
|
|
34 |
parent::__construct(array(
|
35 |
'appid' => '',
|
36 |
'secret' => '',
|
37 |
-
'user_prefix' => '',
|
38 |
'login_label' => 'Continue with <b>Facebook</b>',
|
39 |
'link_label' => 'Link account with <b>Facebook</b>',
|
40 |
'unlink_label' => 'Unlink account from <b>Facebook</b>',
|
@@ -107,12 +106,9 @@ class NextendSocialProviderFacebook extends NextendSocialProvider {
|
|
107 |
}
|
108 |
|
109 |
if (empty($newData[$key])) {
|
110 |
-
NextendSocialLoginAdminNotices::addError(sprintf(__('The %s entered did not appear to be a valid. Please enter a valid %s.', 'nextend-facebook-connect'), $this->requiredFields[$key], $this->requiredFields[$key]));
|
111 |
}
|
112 |
break;
|
113 |
-
case 'user_prefix':
|
114 |
-
$newData[$key] = preg_replace("/[^A-Za-z0-9\-_ ]/", '', $value);
|
115 |
-
break;
|
116 |
}
|
117 |
}
|
118 |
|
@@ -139,6 +135,7 @@ class NextendSocialProviderFacebook extends NextendSocialProvider {
|
|
139 |
* @return array
|
140 |
*/
|
141 |
protected function getCurrentUserInfo() {
|
|
|
142 |
return $this->getClient()
|
143 |
->get('/me?fields=id,name,email,first_name,last_name');
|
144 |
}
|
@@ -227,7 +224,10 @@ class NextendSocialProviderFacebook extends NextendSocialProvider {
|
|
227 |
|
228 |
public function import() {
|
229 |
$oldSettings = maybe_unserialize(get_option('nextend_fb_connect'));
|
230 |
-
if (
|
|
|
|
|
|
|
231 |
$newSettings = array(
|
232 |
'appid' => $oldSettings['fb_appid'],
|
233 |
'secret' => $oldSettings['fb_secret']
|
34 |
parent::__construct(array(
|
35 |
'appid' => '',
|
36 |
'secret' => '',
|
|
|
37 |
'login_label' => 'Continue with <b>Facebook</b>',
|
38 |
'link_label' => 'Link account with <b>Facebook</b>',
|
39 |
'unlink_label' => 'Unlink account from <b>Facebook</b>',
|
106 |
}
|
107 |
|
108 |
if (empty($newData[$key])) {
|
109 |
+
NextendSocialLoginAdminNotices::addError(sprintf(__('The %1$s entered did not appear to be a valid. Please enter a valid %2$s.', 'nextend-facebook-connect'), $this->requiredFields[$key], $this->requiredFields[$key]));
|
110 |
}
|
111 |
break;
|
|
|
|
|
|
|
112 |
}
|
113 |
}
|
114 |
|
135 |
* @return array
|
136 |
*/
|
137 |
protected function getCurrentUserInfo() {
|
138 |
+
|
139 |
return $this->getClient()
|
140 |
->get('/me?fields=id,name,email,first_name,last_name');
|
141 |
}
|
224 |
|
225 |
public function import() {
|
226 |
$oldSettings = maybe_unserialize(get_option('nextend_fb_connect'));
|
227 |
+
if ($oldSettings === false) {
|
228 |
+
$newSettings['legacy'] = 0;
|
229 |
+
$this->settings->update($newSettings);
|
230 |
+
} else if (!empty($oldSettings['fb_appid']) && !empty($oldSettings['fb_secret'])) {
|
231 |
$newSettings = array(
|
232 |
'appid' => $oldSettings['fb_appid'],
|
233 |
'secret' => $oldSettings['fb_secret']
|
providers/google/admin/settings.php
CHANGED
@@ -30,7 +30,7 @@ $settings = $this->settings;
|
|
30 |
value="<?php echo esc_attr($settings->get('client_id')); ?>" class="regular-text"
|
31 |
style="width:40em;">
|
32 |
<p class="description"
|
33 |
-
id="tagline-client_id"><?php printf(__('If you are not sure what is your %s, please head over to <a href="%s">Getting Started</a>', 'nextend-facebook-connect'), 'Client ID', $this->getAdminUrl()); ?></p>
|
34 |
</td>
|
35 |
</tr>
|
36 |
<tr>
|
@@ -46,21 +46,9 @@ $settings = $this->settings;
|
|
46 |
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
47 |
value="<?php _e('Save Changes'); ?>"></p>
|
48 |
|
49 |
-
|
50 |
-
<hr/>
|
51 |
-
<h2><?php _e('Other settings', 'nextend-facebook-connect'); ?></h2>
|
52 |
-
<table class="form-table">
|
53 |
-
<tbody>
|
54 |
-
<tr>
|
55 |
-
<th scope="row"><label
|
56 |
-
for="user_prefix"><?php _e('Username prefix on register', 'nextend-facebook-connect'); ?></label></th>
|
57 |
-
<td><input name="user_prefix" type="text" id="user_prefix"
|
58 |
-
value="<?php echo esc_attr($settings->get('user_prefix')); ?>" class="regular-text"></td>
|
59 |
-
</tr>
|
60 |
-
</tbody>
|
61 |
-
</table>
|
62 |
-
|
63 |
<?php
|
|
|
|
|
64 |
$this->renderProSettings();
|
65 |
?>
|
66 |
</form>
|
30 |
value="<?php echo esc_attr($settings->get('client_id')); ?>" class="regular-text"
|
31 |
style="width:40em;">
|
32 |
<p class="description"
|
33 |
+
id="tagline-client_id"><?php printf(__('If you are not sure what is your %1$s, please head over to <a href="%2$s">Getting Started</a>', 'nextend-facebook-connect'), 'Client ID', $this->getAdminUrl()); ?></p>
|
34 |
</td>
|
35 |
</tr>
|
36 |
<tr>
|
46 |
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
47 |
value="<?php _e('Save Changes'); ?>"></p>
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
<?php
|
50 |
+
$this->renderOtherSettings();
|
51 |
+
|
52 |
$this->renderProSettings();
|
53 |
?>
|
54 |
</form>
|
providers/google/google-client.php
CHANGED
@@ -42,38 +42,6 @@ class NextendSocialProviderGoogleClient extends NextendSocialOauth2 {
|
|
42 |
), parent::createAuthUrl());
|
43 |
}
|
44 |
|
45 |
-
public function isAccessTokenLongLived() {
|
46 |
-
|
47 |
-
return $this->access_token_data['created'] + $this->access_token_data['expires_in'] > time() + (60 * 60 * 2);
|
48 |
-
}
|
49 |
-
|
50 |
-
public function requestLongLivedAccessToken() {
|
51 |
-
|
52 |
-
$curl = new NSLCurl();
|
53 |
-
|
54 |
-
$accessTokenData = $curl->get($this->endpointAccessToken, array(
|
55 |
-
'grant_type' => 'fb_exchange_token',
|
56 |
-
'client_id' => $this->client_id,
|
57 |
-
'client_secret' => $this->client_secret,
|
58 |
-
'fb_exchange_token' => $this->access_token_data['access_token']
|
59 |
-
));
|
60 |
-
|
61 |
-
if ($curl->error) {
|
62 |
-
|
63 |
-
if (isset($accessTokenData['error'])) {
|
64 |
-
throw new Exception($accessTokenData['error'] . ': ' . $accessTokenData['error_description']);
|
65 |
-
} else {
|
66 |
-
throw new Exception($curl->errorCode . ': ' . $curl->errorMessage);
|
67 |
-
}
|
68 |
-
}
|
69 |
-
|
70 |
-
$accessTokenData['created'] = time();
|
71 |
-
|
72 |
-
$this->access_token_data = $accessTokenData;
|
73 |
-
|
74 |
-
return wp_json_encode($accessTokenData);
|
75 |
-
}
|
76 |
-
|
77 |
/**
|
78 |
* @param string $approvalPrompt
|
79 |
*/
|
@@ -81,6 +49,11 @@ class NextendSocialProviderGoogleClient extends NextendSocialOauth2 {
|
|
81 |
$this->approvalPrompt = $approvalPrompt;
|
82 |
}
|
83 |
|
|
|
|
|
|
|
|
|
|
|
84 |
protected function errorFromResponse($response) {
|
85 |
if (isset($response['error'])) {
|
86 |
throw new Exception($response['error']);
|
42 |
), parent::createAuthUrl());
|
43 |
}
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
/**
|
46 |
* @param string $approvalPrompt
|
47 |
*/
|
49 |
$this->approvalPrompt = $approvalPrompt;
|
50 |
}
|
51 |
|
52 |
+
/**
|
53 |
+
* @param $response
|
54 |
+
*
|
55 |
+
* @throws Exception
|
56 |
+
*/
|
57 |
protected function errorFromResponse($response) {
|
58 |
if (isset($response['error'])) {
|
59 |
throw new Exception($response['error']);
|
providers/google/google.php
CHANGED
@@ -23,7 +23,6 @@ class NextendSocialProviderGoogle extends NextendSocialProvider {
|
|
23 |
parent::__construct(array(
|
24 |
'client_id' => '',
|
25 |
'client_secret' => '',
|
26 |
-
'user_prefix' => '',
|
27 |
'login_label' => 'Continue with <b>Google</b>',
|
28 |
'link_label' => 'Link account with <b>Google</b>',
|
29 |
'unlink_label' => 'Unlink account from <b>Google</b>',
|
@@ -69,12 +68,9 @@ class NextendSocialProviderGoogle extends NextendSocialProvider {
|
|
69 |
}
|
70 |
|
71 |
if (empty($newData[$key])) {
|
72 |
-
NextendSocialLoginAdminNotices::addError(sprintf(__('The %s entered did not appear to be a valid. Please enter a valid %s.', 'nextend-facebook-connect'), $this->requiredFields[$key], $this->requiredFields[$key]));
|
73 |
}
|
74 |
break;
|
75 |
-
case 'user_prefix':
|
76 |
-
$newData[$key] = preg_replace("/[^A-Za-z0-9\-_ ]/", '', $value);
|
77 |
-
break;
|
78 |
}
|
79 |
}
|
80 |
|
@@ -170,7 +166,10 @@ class NextendSocialProviderGoogle extends NextendSocialProvider {
|
|
170 |
|
171 |
public function import() {
|
172 |
$oldSettings = maybe_unserialize(get_option('nextend_google_connect'));
|
173 |
-
if (
|
|
|
|
|
|
|
174 |
$newSettings = array(
|
175 |
'client_id' => $oldSettings['google_client_id'],
|
176 |
'client_secret' => $oldSettings['google_client_secret']
|
23 |
parent::__construct(array(
|
24 |
'client_id' => '',
|
25 |
'client_secret' => '',
|
|
|
26 |
'login_label' => 'Continue with <b>Google</b>',
|
27 |
'link_label' => 'Link account with <b>Google</b>',
|
28 |
'unlink_label' => 'Unlink account from <b>Google</b>',
|
68 |
}
|
69 |
|
70 |
if (empty($newData[$key])) {
|
71 |
+
NextendSocialLoginAdminNotices::addError(sprintf(__('The %1$s entered did not appear to be a valid. Please enter a valid %2$s.', 'nextend-facebook-connect'), $this->requiredFields[$key], $this->requiredFields[$key]));
|
72 |
}
|
73 |
break;
|
|
|
|
|
|
|
74 |
}
|
75 |
}
|
76 |
|
166 |
|
167 |
public function import() {
|
168 |
$oldSettings = maybe_unserialize(get_option('nextend_google_connect'));
|
169 |
+
if ($oldSettings === false) {
|
170 |
+
$newSettings['legacy'] = 0;
|
171 |
+
$this->settings->update($newSettings);
|
172 |
+
} else if (!empty($oldSettings['google_client_id']) && !empty($oldSettings['google_client_secret'])) {
|
173 |
$newSettings = array(
|
174 |
'client_id' => $oldSettings['google_client_id'],
|
175 |
'client_secret' => $oldSettings['google_client_secret']
|
providers/twitter/admin/settings.php
CHANGED
@@ -28,7 +28,7 @@ $settings = $this->settings;
|
|
28 |
<input name="consumer_key" type="text" id="consumer_key"
|
29 |
value="<?php echo esc_attr($settings->get('consumer_key')); ?>" class="regular-text">
|
30 |
<p class="description"
|
31 |
-
id="tagline-consumer_key"><?php printf(__('If you are not sure what is your %s, please head over to <a href="%s">Getting Started</a>', 'nextend-facebook-connect'), 'Consumer Key', $this->getAdminUrl()); ?></p>
|
32 |
</td>
|
33 |
</tr>
|
34 |
<tr>
|
@@ -45,21 +45,9 @@ $settings = $this->settings;
|
|
45 |
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
46 |
value="<?php _e('Save Changes'); ?>"></p>
|
47 |
|
48 |
-
|
49 |
-
<hr/>
|
50 |
-
<h2><?php _e('Other settings', 'nextend-facebook-connect'); ?></h2>
|
51 |
-
<table class="form-table">
|
52 |
-
<tbody>
|
53 |
-
<tr>
|
54 |
-
<th scope="row"><label
|
55 |
-
for="user_prefix"><?php _e('Username prefix on register', 'nextend-facebook-connect'); ?></label></th>
|
56 |
-
<td><input name="user_prefix" type="text" id="user_prefix"
|
57 |
-
value="<?php echo esc_attr($settings->get('user_prefix')); ?>" class="regular-text"></td>
|
58 |
-
</tr>
|
59 |
-
</tbody>
|
60 |
-
</table>
|
61 |
-
|
62 |
<?php
|
|
|
|
|
63 |
$this->renderProSettings();
|
64 |
?>
|
65 |
</form>
|
28 |
<input name="consumer_key" type="text" id="consumer_key"
|
29 |
value="<?php echo esc_attr($settings->get('consumer_key')); ?>" class="regular-text">
|
30 |
<p class="description"
|
31 |
+
id="tagline-consumer_key"><?php printf(__('If you are not sure what is your %1$s, please head over to <a href="%2$s">Getting Started</a>', 'nextend-facebook-connect'), 'Consumer Key', $this->getAdminUrl()); ?></p>
|
32 |
</td>
|
33 |
</tr>
|
34 |
<tr>
|
45 |
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
|
46 |
value="<?php _e('Save Changes'); ?>"></p>
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
<?php
|
49 |
+
$this->renderOtherSettings();
|
50 |
+
|
51 |
$this->renderProSettings();
|
52 |
?>
|
53 |
</form>
|
providers/twitter/sdk/tmhOAuth.php
DELETED
@@ -1,919 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* tmhOAuth
|
5 |
-
*
|
6 |
-
* An OAuth library written in PHP.
|
7 |
-
* The library supports file uploading using multipart/form as well as general
|
8 |
-
* REST requests. OAuth authentication is sent using an Authorization Header.
|
9 |
-
*
|
10 |
-
* @author themattharris
|
11 |
-
* @version 0.8.4
|
12 |
-
*
|
13 |
-
* 06 Aug 2014
|
14 |
-
*/
|
15 |
-
class NSLTmhOAuth {
|
16 |
-
|
17 |
-
const VERSION = '0.8.4';
|
18 |
-
var $response = array();
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Creates a new tmhOAuth object
|
22 |
-
*
|
23 |
-
* @param string $config , the configuration to use for this request
|
24 |
-
*
|
25 |
-
* @return void
|
26 |
-
*/
|
27 |
-
public function __construct($config = array()) {
|
28 |
-
$this->buffer = null;
|
29 |
-
$this->reconfigure($config);
|
30 |
-
$this->reset_request_settings();
|
31 |
-
$this->set_user_agent();
|
32 |
-
}
|
33 |
-
|
34 |
-
public function reconfigure($config = array()) {
|
35 |
-
$dir = dirname(__FILE__);
|
36 |
-
// default configuration options
|
37 |
-
$this->config = array_merge(array(
|
38 |
-
// leave 'user_agent' blank for default, otherwise set this to
|
39 |
-
// something that clearly identifies your app
|
40 |
-
'user_agent' => '',
|
41 |
-
'host' => 'api.twitter.com',
|
42 |
-
'method' => 'GET',
|
43 |
-
|
44 |
-
'consumer_key' => '',
|
45 |
-
'consumer_secret' => '',
|
46 |
-
'token' => '',
|
47 |
-
'secret' => '',
|
48 |
-
|
49 |
-
// OAuth2 bearer token. This should already be URL encoded
|
50 |
-
'bearer' => '',
|
51 |
-
|
52 |
-
// oauth signing variables that are not dynamic
|
53 |
-
'oauth_version' => '1.0',
|
54 |
-
'oauth_signature_method' => 'HMAC-SHA1',
|
55 |
-
|
56 |
-
// you probably don't want to change any of these curl values
|
57 |
-
'curl_http_version' => CURL_HTTP_VERSION_1_1,
|
58 |
-
'curl_connecttimeout' => 30,
|
59 |
-
'curl_timeout' => 10,
|
60 |
-
|
61 |
-
// for security this should always be set to 2.
|
62 |
-
'curl_ssl_verifyhost' => 2,
|
63 |
-
// for security this should always be set to true.
|
64 |
-
'curl_ssl_verifypeer' => true,
|
65 |
-
// for security this should always be set to true.
|
66 |
-
'use_ssl' => true,
|
67 |
-
|
68 |
-
// you can get the latest cacert.pem from here http://curl.haxx.se/ca/cacert.pem
|
69 |
-
// if you're getting HTTP 0 responses, check cacert.pem exists and is readable
|
70 |
-
// without it curl won't be able to create an SSL connection
|
71 |
-
'curl_cainfo' => $dir . DIRECTORY_SEPARATOR . 'cacert.pem',
|
72 |
-
'curl_capath' => $dir,
|
73 |
-
|
74 |
-
// in some cases (very very odd ones) the SSL version must be set manually.
|
75 |
-
// unless you know why your are changing this, you should leave it as false
|
76 |
-
// to allow PHP to determine the value for this setting itself.
|
77 |
-
'curl_sslversion' => false,
|
78 |
-
|
79 |
-
'curl_followlocation' => false,
|
80 |
-
// whether to follow redirects or not
|
81 |
-
|
82 |
-
// support for proxy servers
|
83 |
-
'curl_proxy' => false,
|
84 |
-
// really you don't want to use this if you are using streaming
|
85 |
-
'curl_proxyuserpwd' => false,
|
86 |
-
// format username:password for proxy, if required
|
87 |
-
'curl_encoding' => '',
|
88 |
-
// leave blank for all supported formats, else use gzip, deflate, identity etc
|
89 |
-
|
90 |
-
// streaming API configuration
|
91 |
-
'is_streaming' => false,
|
92 |
-
'streaming_eol' => "\r\n",
|
93 |
-
'streaming_metrics_interval' => 10,
|
94 |
-
|
95 |
-
// header or querystring. You should always use header!
|
96 |
-
// this is just to help me debug other developers implementations
|
97 |
-
'as_header' => true,
|
98 |
-
'force_nonce' => false,
|
99 |
-
// used for checking signatures. leave as false for auto
|
100 |
-
'force_timestamp' => false,
|
101 |
-
// used for checking signatures. leave as false for auto
|
102 |
-
), $config);
|
103 |
-
}
|
104 |
-
|
105 |
-
private function reset_request_settings($options = array()) {
|
106 |
-
$this->request_settings = array(
|
107 |
-
'params' => array(),
|
108 |
-
'headers' => array(),
|
109 |
-
'with_user' => true,
|
110 |
-
'multipart' => false,
|
111 |
-
);
|
112 |
-
|
113 |
-
if (!empty($options)) {
|
114 |
-
$this->request_settings = array_merge($this->request_settings, $options);
|
115 |
-
}
|
116 |
-
}
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Sets the useragent for PHP to use
|
120 |
-
* If '$this->config['user_agent']' already has a value it is used instead of one
|
121 |
-
* being generated.
|
122 |
-
*
|
123 |
-
* @return void value is stored to the config array class variable
|
124 |
-
*/
|
125 |
-
private function set_user_agent() {
|
126 |
-
if (!empty($this->config['user_agent'])) {
|
127 |
-
return;
|
128 |
-
}
|
129 |
-
|
130 |
-
$ssl = ($this->config['curl_ssl_verifyhost'] && $this->config['curl_ssl_verifypeer'] && $this->config['use_ssl']) ? '+' : '-';
|
131 |
-
$ua = 'tmhOAuth ' . self::VERSION . $ssl . 'SSL - //github.com/themattharris/tmhOAuth';
|
132 |
-
$this->config['user_agent'] = $ua;
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Generates a random OAuth nonce.
|
137 |
-
* If 'force_nonce' is false a nonce will be generated, otherwise the value of '$this->config['force_nonce']' will be used.
|
138 |
-
*
|
139 |
-
* @param string $length how many characters the nonce should be before MD5 hashing. default 12
|
140 |
-
* @param string $include_time whether to include time at the beginning of the nonce. default true
|
141 |
-
*
|
142 |
-
* @return $nonce as a string
|
143 |
-
*/
|
144 |
-
private function nonce($length = 12, $include_time = true) {
|
145 |
-
if ($this->config['force_nonce'] === false) {
|
146 |
-
$prefix = $include_time ? microtime() : '';
|
147 |
-
|
148 |
-
return md5(substr($prefix . uniqid(), 0, $length));
|
149 |
-
} else {
|
150 |
-
return $this->config['force_nonce'];
|
151 |
-
}
|
152 |
-
}
|
153 |
-
|
154 |
-
/**
|
155 |
-
* Generates a timestamp.
|
156 |
-
* If 'force_timestamp' is false a timestamp will be generated, otherwise the value of '$this->config['force_timestamp']' will be used.
|
157 |
-
*
|
158 |
-
* @return $time as a string
|
159 |
-
*/
|
160 |
-
private function timestamp() {
|
161 |
-
if ($this->config['force_timestamp'] === false) {
|
162 |
-
$time = time();
|
163 |
-
} else {
|
164 |
-
$time = $this->config['force_timestamp'];
|
165 |
-
}
|
166 |
-
|
167 |
-
return (string)$time;
|
168 |
-
}
|
169 |
-
|
170 |
-
/**
|
171 |
-
* Encodes the string or array passed in a way compatible with OAuth.
|
172 |
-
* If an array is passed each array value will will be encoded.
|
173 |
-
*
|
174 |
-
* @param mixed $data the scalar or array to encode
|
175 |
-
*
|
176 |
-
* @return $data encoded in a way compatible with OAuth
|
177 |
-
*/
|
178 |
-
private function safe_encode($data) {
|
179 |
-
if (is_array($data)) {
|
180 |
-
return array_map(array(
|
181 |
-
$this,
|
182 |
-
'safe_encode'
|
183 |
-
), $data);
|
184 |
-
} else if (is_scalar($data)) {
|
185 |
-
return str_ireplace(array(
|
186 |
-
'+',
|
187 |
-
'%7E'
|
188 |
-
), array(
|
189 |
-
' ',
|
190 |
-
'~'
|
191 |
-
), rawurlencode($data));
|
192 |
-
} else {
|
193 |
-
return '';
|
194 |
-
}
|
195 |
-
}
|
196 |
-
|
197 |
-
/**
|
198 |
-
* Decodes the string or array from it's URL encoded form
|
199 |
-
* If an array is passed each array value will will be decoded.
|
200 |
-
*
|
201 |
-
* @param mixed $data the scalar or array to decode
|
202 |
-
*
|
203 |
-
* @return string $data decoded from the URL encoded form
|
204 |
-
*/
|
205 |
-
private function safe_decode($data) {
|
206 |
-
if (is_array($data)) {
|
207 |
-
return array_map(array(
|
208 |
-
$this,
|
209 |
-
'safe_decode'
|
210 |
-
), $data);
|
211 |
-
} else if (is_scalar($data)) {
|
212 |
-
return rawurldecode($data);
|
213 |
-
} else {
|
214 |
-
return '';
|
215 |
-
}
|
216 |
-
}
|
217 |
-
|
218 |
-
/**
|
219 |
-
* Prepares OAuth1 signing parameters.
|
220 |
-
*
|
221 |
-
* @return void all required OAuth parameters, safely encoded, are stored to the class variable '$this->request_settings['oauth1_params']'
|
222 |
-
*/
|
223 |
-
private function prepare_oauth1_params() {
|
224 |
-
$defaults = array(
|
225 |
-
'oauth_nonce' => $this->nonce(),
|
226 |
-
'oauth_timestamp' => $this->timestamp(),
|
227 |
-
'oauth_version' => $this->config['oauth_version'],
|
228 |
-
'oauth_consumer_key' => $this->config['consumer_key'],
|
229 |
-
'oauth_signature_method' => $this->config['oauth_signature_method'],
|
230 |
-
);
|
231 |
-
|
232 |
-
// include the user token if it exists
|
233 |
-
if ($oauth_token = $this->token()) {
|
234 |
-
$defaults['oauth_token'] = $oauth_token;
|
235 |
-
}
|
236 |
-
|
237 |
-
$this->request_settings['oauth1_params'] = array();
|
238 |
-
|
239 |
-
// safely encode
|
240 |
-
foreach ($defaults as $k => $v) {
|
241 |
-
$this->request_settings['oauth1_params'][$this->safe_encode($k)] = $this->safe_encode($v);
|
242 |
-
}
|
243 |
-
}
|
244 |
-
|
245 |
-
private function token() {
|
246 |
-
if ($this->request_settings['with_user']) {
|
247 |
-
if (isset($this->config['token']) && !empty($this->config['token'])) {
|
248 |
-
return $this->config['token'];
|
249 |
-
} elseif (isset($this->config['user_token'])) {
|
250 |
-
return $this->config['user_token'];
|
251 |
-
}
|
252 |
-
}
|
253 |
-
|
254 |
-
return '';
|
255 |
-
}
|
256 |
-
|
257 |
-
private function secret() {
|
258 |
-
if ($this->request_settings['with_user']) {
|
259 |
-
if (isset($this->config['secret']) && !empty($this->config['secret'])) {
|
260 |
-
return $this->config['secret'];
|
261 |
-
} elseif (isset($this->config['user_secret'])) {
|
262 |
-
return $this->config['user_secret'];
|
263 |
-
}
|
264 |
-
}
|
265 |
-
|
266 |
-
return '';
|
267 |
-
}
|
268 |
-
|
269 |
-
/**
|
270 |
-
* Extracts and decodes OAuth parameters from the passed string
|
271 |
-
*
|
272 |
-
* @param string $body the response body from an OAuth flow method
|
273 |
-
*
|
274 |
-
* @return array the response body safely decoded to an array of key => values
|
275 |
-
*/
|
276 |
-
public function extract_params($body) {
|
277 |
-
$kvs = explode('&', $body);
|
278 |
-
$decoded = array();
|
279 |
-
foreach ($kvs as $kv) {
|
280 |
-
$kv = explode('=', $kv, 2);
|
281 |
-
$kv[0] = $this->safe_decode($kv[0]);
|
282 |
-
$kv[1] = $this->safe_decode($kv[1]);
|
283 |
-
$decoded[$kv[0]] = $kv[1];
|
284 |
-
}
|
285 |
-
|
286 |
-
return $decoded;
|
287 |
-
}
|
288 |
-
|
289 |
-
/**
|
290 |
-
* Prepares the HTTP method for use in the base string by converting it to
|
291 |
-
* uppercase.
|
292 |
-
*
|
293 |
-
* @return void value is stored to the class variable '$this->request_settings['method']'
|
294 |
-
*/
|
295 |
-
private function prepare_method() {
|
296 |
-
$this->request_settings['method'] = strtoupper($this->request_settings['method']);
|
297 |
-
}
|
298 |
-
|
299 |
-
/**
|
300 |
-
* Prepares the URL for use in the base string by ripping it apart and
|
301 |
-
* reconstructing it.
|
302 |
-
*
|
303 |
-
* Ref: 3.4.1.2
|
304 |
-
*
|
305 |
-
* @return void value is stored to the class array variable '$this->request_settings['url']'
|
306 |
-
*/
|
307 |
-
private function prepare_url() {
|
308 |
-
$parts = parse_url($this->request_settings['url']);
|
309 |
-
|
310 |
-
$port = isset($parts['port']) ? $parts['port'] : false;
|
311 |
-
$scheme = $parts['scheme'];
|
312 |
-
$host = $parts['host'];
|
313 |
-
$path = isset($parts['path']) ? $parts['path'] : false;
|
314 |
-
|
315 |
-
$port or $port = ($scheme == 'https') ? '443' : '80';
|
316 |
-
|
317 |
-
if (($scheme == 'https' && $port != '443') || ($scheme == 'http' && $port != '80')) {
|
318 |
-
$host = "$host:$port";
|
319 |
-
}
|
320 |
-
|
321 |
-
// the scheme and host MUST be lowercase
|
322 |
-
$this->request_settings['url'] = strtolower("$scheme://$host");
|
323 |
-
// but not the path
|
324 |
-
$this->request_settings['url'] .= $path;
|
325 |
-
}
|
326 |
-
|
327 |
-
/**
|
328 |
-
* If the request uses multipart, and the parameter isn't a file path, prepend a space
|
329 |
-
* otherwise return the original value. we chose a space here as twitter whitespace trims from
|
330 |
-
* the beginning of the tweet. we don't use \0 here because it's the character for string
|
331 |
-
* termination.
|
332 |
-
*
|
333 |
-
* @param the parameter value
|
334 |
-
*
|
335 |
-
* @return string the original or modified string, depending on the request and the input parameter
|
336 |
-
*/
|
337 |
-
private function multipart_escape($value) {
|
338 |
-
if (!$this->request_settings['multipart'] || strpos($value, '@') !== 0) {
|
339 |
-
return $value;
|
340 |
-
}
|
341 |
-
|
342 |
-
// see if the parameter is a file.
|
343 |
-
// we split on the semi-colon as it's the delimiter used on media uploads
|
344 |
-
// for fields with semi-colons this will return the original string
|
345 |
-
list($file) = explode(';', substr($value, 1), 2);
|
346 |
-
if (file_exists($file)) {
|
347 |
-
return $value;
|
348 |
-
}
|
349 |
-
|
350 |
-
return " $value";
|
351 |
-
}
|
352 |
-
|
353 |
-
|
354 |
-
/**
|
355 |
-
* Prepares all parameters for the base string and request.
|
356 |
-
* Multipart parameters are ignored as they are not defined in the specification,
|
357 |
-
* all other types of parameter are encoded for compatibility with OAuth.
|
358 |
-
*
|
359 |
-
* @param array $params the parameters for the request
|
360 |
-
*
|
361 |
-
* @return void prepared values are stored in the class array variable '$this->request_settings'
|
362 |
-
*/
|
363 |
-
private function prepare_params() {
|
364 |
-
$doing_oauth1 = false;
|
365 |
-
$this->request_settings['prepared_params'] = array();
|
366 |
-
$prepared = &$this->request_settings['prepared_params'];
|
367 |
-
$prepared_pairs = array();
|
368 |
-
$prepared_pairs_with_oauth = array();
|
369 |
-
|
370 |
-
if (isset($this->request_settings['oauth1_params'])) {
|
371 |
-
$oauth1 = &$this->request_settings['oauth1_params'];
|
372 |
-
$doing_oauth1 = true;
|
373 |
-
$params = array_merge($oauth1, $this->request_settings['params']);
|
374 |
-
|
375 |
-
// Remove oauth_signature if present
|
376 |
-
// Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.")
|
377 |
-
unset($params['oauth_signature']);
|
378 |
-
|
379 |
-
// empty the oauth1 array. we reset these values later in this method
|
380 |
-
$oauth1 = array();
|
381 |
-
} else {
|
382 |
-
$params = $this->request_settings['params'];
|
383 |
-
}
|
384 |
-
|
385 |
-
// Parameters are sorted by name, using lexicographical byte value ordering.
|
386 |
-
// Ref: Spec: 9.1.1 (1)
|
387 |
-
uksort($params, 'strcmp');
|
388 |
-
|
389 |
-
// set this now so we're not doing it on every parameter
|
390 |
-
$supports_curl_file = class_exists('CurlFile', false);
|
391 |
-
|
392 |
-
// encode params unless we're doing multipart
|
393 |
-
foreach ($params as $k => $v) {
|
394 |
-
$k = $this->request_settings['multipart'] ? $k : $this->safe_encode($k);
|
395 |
-
|
396 |
-
if (is_array($v)) {
|
397 |
-
$v = implode(',', $v);
|
398 |
-
}
|
399 |
-
|
400 |
-
// we don't need to do the multipart escaping if we support curlfile
|
401 |
-
if ($supports_curl_file && ($v instanceof CurlFile)) {
|
402 |
-
// leave $v alone
|
403 |
-
} elseif ($this->request_settings['multipart']) {
|
404 |
-
$v = $this->multipart_escape($v);
|
405 |
-
} else {
|
406 |
-
$v = $this->safe_encode($v);
|
407 |
-
}
|
408 |
-
|
409 |
-
// split parameters for the basestring and authorization header, and recreate the oauth1 array
|
410 |
-
if ($doing_oauth1) {
|
411 |
-
// if we're doing multipart, only store the oauth_* params, ignore the users request params
|
412 |
-
if ((strpos($k, 'oauth') === 0) || !$this->request_settings['multipart']) {
|
413 |
-
$prepared_pairs_with_oauth[] = "{$k}={$v}";
|
414 |
-
}
|
415 |
-
|
416 |
-
if (strpos($k, 'oauth') === 0) {
|
417 |
-
$oauth1[$k] = $v;
|
418 |
-
continue;
|
419 |
-
}
|
420 |
-
}
|
421 |
-
$prepared[$k] = $v;
|
422 |
-
|
423 |
-
if (!$this->request_settings['multipart']) {
|
424 |
-
$prepared_pairs[] = "{$k}={$v}";
|
425 |
-
}
|
426 |
-
}
|
427 |
-
|
428 |
-
if ($doing_oauth1) {
|
429 |
-
$this->request_settings['basestring_params'] = implode('&', $prepared_pairs_with_oauth);
|
430 |
-
}
|
431 |
-
|
432 |
-
// setup params for GET/POST/PUT method handling
|
433 |
-
if (!empty($prepared)) {
|
434 |
-
$content = implode('&', $prepared_pairs);
|
435 |
-
|
436 |
-
switch ($this->request_settings['method']) {
|
437 |
-
case 'PUT':
|
438 |
-
// fall through to POST as PUT should be treated the same
|
439 |
-
case 'POST':
|
440 |
-
$this->request_settings['postfields'] = $this->request_settings['multipart'] ? $prepared : $content;
|
441 |
-
break;
|
442 |
-
default:
|
443 |
-
$this->request_settings['querystring'] = $content;
|
444 |
-
break;
|
445 |
-
}
|
446 |
-
}
|
447 |
-
}
|
448 |
-
|
449 |
-
/**
|
450 |
-
* Prepares the OAuth signing key
|
451 |
-
*
|
452 |
-
* @return void prepared signing key is stored in the class variable 'signing_key'
|
453 |
-
*/
|
454 |
-
private function prepare_signing_key() {
|
455 |
-
$left = $this->safe_encode($this->config['consumer_secret']);
|
456 |
-
$right = $this->safe_encode($this->secret());
|
457 |
-
$this->request_settings['signing_key'] = $left . '&' . $right;
|
458 |
-
}
|
459 |
-
|
460 |
-
/**
|
461 |
-
* Prepare the base string.
|
462 |
-
* Ref: Spec: 9.1.3 ("Concatenate Request Elements")
|
463 |
-
*
|
464 |
-
* @return void prepared base string is stored in the class variable 'base_string'
|
465 |
-
*/
|
466 |
-
private function prepare_base_string() {
|
467 |
-
$url = $this->request_settings['url'];
|
468 |
-
|
469 |
-
# if the host header is set we need to rewrite the basestring to use
|
470 |
-
# that, instead of the request host. otherwise the signature won't match
|
471 |
-
# on the server side
|
472 |
-
if (!empty($this->request_settings['headers']['Host'])) {
|
473 |
-
$url = str_ireplace($this->config['host'], $this->request_settings['headers']['Host'], $url);
|
474 |
-
}
|
475 |
-
|
476 |
-
$base = array(
|
477 |
-
$this->request_settings['method'],
|
478 |
-
$url,
|
479 |
-
$this->request_settings['basestring_params']
|
480 |
-
);
|
481 |
-
$this->request_settings['basestring'] = implode('&', $this->safe_encode($base));
|
482 |
-
}
|
483 |
-
|
484 |
-
/**
|
485 |
-
* Signs the OAuth 1 request
|
486 |
-
*
|
487 |
-
* @return void oauth_signature is added to the parameters in the class array variable '$this->request_settings'
|
488 |
-
*/
|
489 |
-
private function prepare_oauth_signature() {
|
490 |
-
$this->request_settings['oauth1_params']['oauth_signature'] = $this->safe_encode(base64_encode(hash_hmac('sha1', $this->request_settings['basestring'], $this->request_settings['signing_key'], true)));
|
491 |
-
}
|
492 |
-
|
493 |
-
/**
|
494 |
-
* Prepares the Authorization header
|
495 |
-
*
|
496 |
-
* @return void prepared authorization header is stored in the class variable headers['Authorization']
|
497 |
-
*/
|
498 |
-
private function prepare_auth_header() {
|
499 |
-
if (!$this->config['as_header']) {
|
500 |
-
return;
|
501 |
-
}
|
502 |
-
|
503 |
-
// oauth1
|
504 |
-
if (isset($this->request_settings['oauth1_params'])) {
|
505 |
-
// sort again as oauth_signature was added post param preparation
|
506 |
-
uksort($this->request_settings['oauth1_params'], 'strcmp');
|
507 |
-
$encoded_quoted_pairs = array();
|
508 |
-
foreach ($this->request_settings['oauth1_params'] as $k => $v) {
|
509 |
-
$encoded_quoted_pairs[] = "{$k}=\"{$v}\"";
|
510 |
-
}
|
511 |
-
$header = 'OAuth ' . implode(', ', $encoded_quoted_pairs);
|
512 |
-
} elseif (!empty($this->config['bearer'])) {
|
513 |
-
$header = 'Bearer ' . $this->config['bearer'];
|
514 |
-
}
|
515 |
-
|
516 |
-
if (isset($header)) {
|
517 |
-
$this->request_settings['headers']['Authorization'] = $header;
|
518 |
-
}
|
519 |
-
}
|
520 |
-
|
521 |
-
/**
|
522 |
-
* Create the bearer token for OAuth2 requests from the consumer_key and consumer_secret.
|
523 |
-
*
|
524 |
-
* @return string the bearer token
|
525 |
-
*/
|
526 |
-
public function bearer_token_credentials() {
|
527 |
-
$credentials = implode(':', array(
|
528 |
-
$this->safe_encode($this->config['consumer_key']),
|
529 |
-
$this->safe_encode($this->config['consumer_secret'])
|
530 |
-
));
|
531 |
-
|
532 |
-
return base64_encode($credentials);
|
533 |
-
}
|
534 |
-
|
535 |
-
/**
|
536 |
-
* Make an HTTP request using this library. This method doesn't return anything.
|
537 |
-
* Instead the response should be inspected directly.
|
538 |
-
*
|
539 |
-
* @param string $method the HTTP method being used. e.g. POST, GET, HEAD etc
|
540 |
-
* @param string $url the request URL without query string parameters
|
541 |
-
* @param array $params the request parameters as an array of key=value pairs. Default empty array
|
542 |
-
* @param string $useauth whether to use authentication when making the request. Default true
|
543 |
-
* @param string $multipart whether this request contains multipart data. Default false
|
544 |
-
* @param array $headers any custom headers to send with the request. Default empty array
|
545 |
-
*
|
546 |
-
* @return int the http response code for the request. 0 is returned if a connection could not be made
|
547 |
-
*/
|
548 |
-
public function request($method, $url, $params = array(), $useauth = true, $multipart = false, $headers = array()) {
|
549 |
-
$options = array(
|
550 |
-
'method' => $method,
|
551 |
-
'url' => $url,
|
552 |
-
'params' => $params,
|
553 |
-
'with_user' => true,
|
554 |
-
'multipart' => $multipart,
|
555 |
-
'headers' => $headers
|
556 |
-
);
|
557 |
-
$options = array_merge($this->default_options(), $options);
|
558 |
-
|
559 |
-
if ($useauth) {
|
560 |
-
return $this->user_request($options);
|
561 |
-
} else {
|
562 |
-
return $this->unauthenticated_request($options);
|
563 |
-
}
|
564 |
-
}
|
565 |
-
|
566 |
-
public function apponly_request($options = array()) {
|
567 |
-
$options = array_merge($this->default_options(), $options, array(
|
568 |
-
'with_user' => false,
|
569 |
-
));
|
570 |
-
$this->reset_request_settings($options);
|
571 |
-
if ($options['without_bearer']) {
|
572 |
-
return $this->oauth1_request();
|
573 |
-
} else {
|
574 |
-
$this->prepare_method();
|
575 |
-
$this->prepare_url();
|
576 |
-
$this->prepare_params();
|
577 |
-
$this->prepare_auth_header();
|
578 |
-
|
579 |
-
return $this->curlit();
|
580 |
-
}
|
581 |
-
}
|
582 |
-
|
583 |
-
public function user_request($options = array()) {
|
584 |
-
$options = array_merge($this->default_options(), $options, array(
|
585 |
-
'with_user' => true,
|
586 |
-
));
|
587 |
-
$this->reset_request_settings($options);
|
588 |
-
|
589 |
-
return $this->oauth1_request();
|
590 |
-
}
|
591 |
-
|
592 |
-
public function unauthenticated_request($options = array()) {
|
593 |
-
$options = array_merge($this->default_options(), $options, array(
|
594 |
-
'with_user' => false,
|
595 |
-
));
|
596 |
-
$this->reset_request_settings($options);
|
597 |
-
$this->prepare_method();
|
598 |
-
$this->prepare_url();
|
599 |
-
$this->prepare_params();
|
600 |
-
|
601 |
-
return $this->curlit();
|
602 |
-
}
|
603 |
-
|
604 |
-
/**
|
605 |
-
* Signs the request and adds the OAuth signature. This runs all the request
|
606 |
-
* parameter preparation methods.
|
607 |
-
*
|
608 |
-
* @param string $method the HTTP method being used. e.g. POST, GET, HEAD etc
|
609 |
-
* @param string $url the request URL without query string parameters
|
610 |
-
* @param array $params the request parameters as an array of key=value pairs
|
611 |
-
* @param boolean $with_user whether to include the user credentials when making the request.
|
612 |
-
*
|
613 |
-
* @return int the http response code for the request. 0 is returned if a connection could not be made
|
614 |
-
*/
|
615 |
-
private function oauth1_request() {
|
616 |
-
$this->prepare_oauth1_params();
|
617 |
-
$this->prepare_method();
|
618 |
-
$this->prepare_url();
|
619 |
-
$this->prepare_params();
|
620 |
-
$this->prepare_base_string();
|
621 |
-
$this->prepare_signing_key();
|
622 |
-
$this->prepare_oauth_signature();
|
623 |
-
$this->prepare_auth_header();
|
624 |
-
|
625 |
-
return $this->curlit();
|
626 |
-
}
|
627 |
-
|
628 |
-
private function default_options() {
|
629 |
-
return array(
|
630 |
-
'method' => 'GET',
|
631 |
-
'params' => array(),
|
632 |
-
'with_user' => true,
|
633 |
-
'multipart' => false,
|
634 |
-
'headers' => array(),
|
635 |
-
'without_bearer' => false,
|
636 |
-
);
|
637 |
-
}
|
638 |
-
|
639 |
-
/**
|
640 |
-
* Make a long poll HTTP request using this library. This method is
|
641 |
-
* different to the other request methods as it isn't supposed to disconnect
|
642 |
-
*
|
643 |
-
* Using this method expects a callback which will receive the streaming
|
644 |
-
* responses.
|
645 |
-
*
|
646 |
-
* @param string $method the HTTP method being used. e.g. POST, GET, HEAD etc
|
647 |
-
* @param string $url the request URL without query string parameters
|
648 |
-
* @param array $params the request parameters as an array of key=value pairs
|
649 |
-
* @param string $callback the callback function to stream the buffer to.
|
650 |
-
*
|
651 |
-
* @return bool
|
652 |
-
*/
|
653 |
-
public function streaming_request($method, $url, $params = array(), $callback = '') {
|
654 |
-
if (!empty($callback)) {
|
655 |
-
if (!is_callable($callback)) {
|
656 |
-
return false;
|
657 |
-
}
|
658 |
-
$this->config['streaming_callback'] = $callback;
|
659 |
-
}
|
660 |
-
$this->metrics['start'] = time();
|
661 |
-
$this->metrics['interval_start'] = $this->metrics['start'];
|
662 |
-
$this->metrics['messages'] = 0;
|
663 |
-
$this->metrics['last_messages'] = 0;
|
664 |
-
$this->metrics['bytes'] = 0;
|
665 |
-
$this->metrics['last_bytes'] = 0;
|
666 |
-
$this->config['is_streaming'] = true;
|
667 |
-
$this->request($method, $url, $params);
|
668 |
-
|
669 |
-
return true;
|
670 |
-
}
|
671 |
-
|
672 |
-
/**
|
673 |
-
* Handles the updating of the current Streaming API metrics.
|
674 |
-
*
|
675 |
-
* @return array the metrics for the streaming api connection
|
676 |
-
*/
|
677 |
-
private function update_metrics() {
|
678 |
-
$now = time();
|
679 |
-
if (($this->metrics['interval_start'] + $this->config['streaming_metrics_interval']) > $now) {
|
680 |
-
return null;
|
681 |
-
}
|
682 |
-
|
683 |
-
$this->metrics['mps'] = round(($this->metrics['messages'] - $this->metrics['last_messages']) / $this->config['streaming_metrics_interval'], 2);
|
684 |
-
$this->metrics['bps'] = round(($this->metrics['bytes'] - $this->metrics['last_bytes']) / $this->config['streaming_metrics_interval'], 2);
|
685 |
-
|
686 |
-
$this->metrics['last_bytes'] = $this->metrics['bytes'];
|
687 |
-
$this->metrics['last_messages'] = $this->metrics['messages'];
|
688 |
-
$this->metrics['interval_start'] = $now;
|
689 |
-
|
690 |
-
return $this->metrics;
|
691 |
-
}
|
692 |
-
|
693 |
-
/**
|
694 |
-
* Utility function to create the request URL in the requested format.
|
695 |
-
* If a fully-qualified URI is provided, it will be returned.
|
696 |
-
* Any multi-slashes (except for the protocol) will be replaced with a single slash.
|
697 |
-
*
|
698 |
-
*
|
699 |
-
* @param string $request the API method without extension
|
700 |
-
* @param string $extension the format of the response. Default json. Set to an empty string to exclude the format
|
701 |
-
*
|
702 |
-
* @return string the concatenation of the host, API version, API method and format, or $request if it begins with http
|
703 |
-
*/
|
704 |
-
public function url($request, $extension = 'json') {
|
705 |
-
// remove multi-slashes
|
706 |
-
$request = preg_replace('$([^:])//+$', '$1/', $request);
|
707 |
-
|
708 |
-
if (stripos($request, 'http') === 0 || stripos($request, '//') === 0) {
|
709 |
-
return $request;
|
710 |
-
}
|
711 |
-
|
712 |
-
$extension = strlen($extension) > 0 ? ".$extension" : '';
|
713 |
-
$proto = $this->config['use_ssl'] ? 'https:/' : 'http:/';
|
714 |
-
|
715 |
-
// trim trailing slash
|
716 |
-
$request = ltrim($request, '/');
|
717 |
-
|
718 |
-
$pos = strlen($request) - strlen($extension);
|
719 |
-
if (substr($request, $pos) === $extension) {
|
720 |
-
$request = substr_replace($request, '', $pos);
|
721 |
-
}
|
722 |
-
|
723 |
-
return implode('/', array(
|
724 |
-
$proto,
|
725 |
-
$this->config['host'],
|
726 |
-
$request . $extension
|
727 |
-
));
|
728 |
-
}
|
729 |
-
|
730 |
-
/**
|
731 |
-
* Public access to the private safe decode/encode methods
|
732 |
-
*
|
733 |
-
* @param string $text the text to transform
|
734 |
-
* @param string $mode the transformation mode. either encode or decode
|
735 |
-
*
|
736 |
-
* @return string $text transformed by the given $mode
|
737 |
-
*/
|
738 |
-
public function transformText($text, $mode = 'encode') {
|
739 |
-
return $this->{"safe_$mode"}($text);
|
740 |
-
}
|
741 |
-
|
742 |
-
/**
|
743 |
-
* Utility function to parse the returned curl headers and store them in the
|
744 |
-
* class array variable.
|
745 |
-
*
|
746 |
-
* @param object $ch curl handle
|
747 |
-
* @param string $header the response headers
|
748 |
-
*
|
749 |
-
* @return string the length of the header
|
750 |
-
*/
|
751 |
-
private function curlHeader($ch, $header) {
|
752 |
-
$this->response['raw'] .= $header;
|
753 |
-
|
754 |
-
list($key, $value) = array_pad(explode(':', $header, 2), 2, null);
|
755 |
-
|
756 |
-
$key = trim($key);
|
757 |
-
$value = trim($value);
|
758 |
-
|
759 |
-
if (!isset($this->response['headers'][$key])) {
|
760 |
-
$this->response['headers'][$key] = $value;
|
761 |
-
} else {
|
762 |
-
if (!is_array($this->response['headers'][$key])) {
|
763 |
-
$this->response['headers'][$key] = array($this->response['headers'][$key]);
|
764 |
-
}
|
765 |
-
$this->response['headers'][$key][] = $value;
|
766 |
-
}
|
767 |
-
|
768 |
-
return strlen($header);
|
769 |
-
}
|
770 |
-
|
771 |
-
/**
|
772 |
-
* Utility function to parse the returned curl buffer and store them until
|
773 |
-
* an EOL is found. The buffer for curl is an undefined size so we need
|
774 |
-
* to collect the content until an EOL is found.
|
775 |
-
*
|
776 |
-
* This function calls the previously defined streaming callback method.
|
777 |
-
*
|
778 |
-
* @param object $ch curl handle
|
779 |
-
* @param string $data the current curl buffer
|
780 |
-
*
|
781 |
-
* @return int the length of the data string processed in this function
|
782 |
-
*/
|
783 |
-
private function curlWrite($ch, $data) {
|
784 |
-
$l = strlen($data);
|
785 |
-
if (strpos($data, $this->config['streaming_eol']) === false) {
|
786 |
-
$this->buffer .= $data;
|
787 |
-
|
788 |
-
return $l;
|
789 |
-
}
|
790 |
-
|
791 |
-
$buffered = explode($this->config['streaming_eol'], $data);
|
792 |
-
$content = $this->buffer . $buffered[0];
|
793 |
-
|
794 |
-
$this->metrics['messages']++;
|
795 |
-
$this->metrics['bytes'] += strlen($content);
|
796 |
-
|
797 |
-
if (!is_callable($this->config['streaming_callback'])) {
|
798 |
-
return 0;
|
799 |
-
}
|
800 |
-
|
801 |
-
$metrics = $this->update_metrics();
|
802 |
-
$stop = call_user_func($this->config['streaming_callback'], $content, strlen($content), $metrics);
|
803 |
-
$this->buffer = $buffered[1];
|
804 |
-
if ($stop) {
|
805 |
-
return 0;
|
806 |
-
}
|
807 |
-
|
808 |
-
return $l;
|
809 |
-
}
|
810 |
-
|
811 |
-
/**
|
812 |
-
* Makes a curl request. Takes no parameters as all should have been prepared
|
813 |
-
* by the request method
|
814 |
-
*
|
815 |
-
* the response data is stored in the class variable 'response'
|
816 |
-
*
|
817 |
-
* @return int the http response code for the request. 0 is returned if a connection could not be made
|
818 |
-
*/
|
819 |
-
private function curlit() {
|
820 |
-
$this->response = array(
|
821 |
-
'raw' => ''
|
822 |
-
);
|
823 |
-
|
824 |
-
// configure curl
|
825 |
-
$c = curl_init();
|
826 |
-
|
827 |
-
if ($this->request_settings['method'] == 'GET' && isset($this->request_settings['querystring'])) {
|
828 |
-
$this->request_settings['url'] = $this->request_settings['url'] . '?' . $this->request_settings['querystring'];
|
829 |
-
} elseif ($this->request_settings['method'] == 'POST' || $this->request_settings['method'] == 'PUT') {
|
830 |
-
$postfields = array();
|
831 |
-
if (isset($this->request_settings['postfields'])) {
|
832 |
-
$postfields = $this->request_settings['postfields'];
|
833 |
-
}
|
834 |
-
|
835 |
-
curl_setopt($c, CURLOPT_POSTFIELDS, $postfields);
|
836 |
-
}
|
837 |
-
|
838 |
-
curl_setopt($c, CURLOPT_CUSTOMREQUEST, $this->request_settings['method']);
|
839 |
-
|
840 |
-
curl_setopt_array($c, array(
|
841 |
-
CURLOPT_HTTP_VERSION => $this->config['curl_http_version'],
|
842 |
-
CURLOPT_USERAGENT => $this->config['user_agent'],
|
843 |
-
CURLOPT_CONNECTTIMEOUT => $this->config['curl_connecttimeout'],
|
844 |
-
CURLOPT_TIMEOUT => $this->config['curl_timeout'],
|
845 |
-
CURLOPT_RETURNTRANSFER => true,
|
846 |
-
CURLOPT_SSL_VERIFYPEER => $this->config['curl_ssl_verifypeer'],
|
847 |
-
CURLOPT_SSL_VERIFYHOST => $this->config['curl_ssl_verifyhost'],
|
848 |
-
|
849 |
-
CURLOPT_FOLLOWLOCATION => $this->config['curl_followlocation'],
|
850 |
-
CURLOPT_PROXY => $this->config['curl_proxy'],
|
851 |
-
CURLOPT_ENCODING => $this->config['curl_encoding'],
|
852 |
-
CURLOPT_URL => $this->request_settings['url'],
|
853 |
-
// process the headers
|
854 |
-
CURLOPT_HEADERFUNCTION => array(
|
855 |
-
$this,
|
856 |
-
'curlHeader'
|
857 |
-
),
|
858 |
-
CURLOPT_HEADER => false,
|
859 |
-
CURLINFO_HEADER_OUT => true,
|
860 |
-
));
|
861 |
-
|
862 |
-
if ($this->config['curl_proxyuserpwd'] !== false) {
|
863 |
-
curl_setopt($c, CURLOPT_PROXYUSERPWD, $this->config['curl_proxyuserpwd']);
|
864 |
-
}
|
865 |
-
|
866 |
-
if ($this->config['curl_sslversion'] !== false) {
|
867 |
-
curl_setopt($c, CURLOPT_SSLVERSION, $this->config['curl_sslversion']);
|
868 |
-
}
|
869 |
-
|
870 |
-
if ($this->config['is_streaming']) {
|
871 |
-
// process the body
|
872 |
-
$this->response['content-length'] = 0;
|
873 |
-
curl_setopt($c, CURLOPT_TIMEOUT, 0);
|
874 |
-
curl_setopt($c, CURLOPT_WRITEFUNCTION, array(
|
875 |
-
$this,
|
876 |
-
'curlWrite'
|
877 |
-
));
|
878 |
-
}
|
879 |
-
|
880 |
-
if (!empty($this->request_settings['headers'])) {
|
881 |
-
foreach ($this->request_settings['headers'] as $k => $v) {
|
882 |
-
$headers[] = trim($k . ': ' . $v);
|
883 |
-
}
|
884 |
-
curl_setopt($c, CURLOPT_HTTPHEADER, $headers);
|
885 |
-
}
|
886 |
-
|
887 |
-
if (isset($this->config['block']) && (true === $this->config['block'])) {
|
888 |
-
return 0;
|
889 |
-
}
|
890 |
-
|
891 |
-
// do it!
|
892 |
-
$response = curl_exec($c);
|
893 |
-
|
894 |
-
if (curl_errno($c) == 60) {
|
895 |
-
curl_setopt($c, CURLOPT_CAINFO, N2LIBRARY . '/cacert.pem');
|
896 |
-
$response = curl_exec($c);
|
897 |
-
}
|
898 |
-
|
899 |
-
$code = curl_getinfo($c, CURLINFO_HTTP_CODE);
|
900 |
-
$info = curl_getinfo($c);
|
901 |
-
$error = curl_error($c);
|
902 |
-
$errno = curl_errno($c);
|
903 |
-
curl_close($c);
|
904 |
-
|
905 |
-
// store the response
|
906 |
-
$this->response['code'] = $code;
|
907 |
-
$this->response['response'] = $response;
|
908 |
-
$this->response['info'] = $info;
|
909 |
-
$this->response['error'] = $error;
|
910 |
-
$this->response['errno'] = $errno;
|
911 |
-
|
912 |
-
if (!isset($this->response['raw'])) {
|
913 |
-
$this->response['raw'] = '';
|
914 |
-
}
|
915 |
-
$this->response['raw'] .= $response;
|
916 |
-
|
917 |
-
return $code;
|
918 |
-
}
|
919 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
providers/twitter/twitter-client.php
CHANGED
@@ -3,42 +3,23 @@ require_once NSL_PATH . '/includes/auth.php';
|
|
3 |
|
4 |
class NextendSocialProviderTwitterClient extends NextendSocialAuth {
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
protected $consumer_key = '';
|
7 |
|
8 |
protected $consumer_secret = '';
|
9 |
|
10 |
protected $redirect_uri = '';
|
11 |
|
12 |
-
/**
|
13 |
-
* @var NSLTmhOAuth
|
14 |
-
*/
|
15 |
-
private $client;
|
16 |
-
|
17 |
public function __construct($providerID, $consumer_key, $consumer_secret) {
|
18 |
parent::__construct($providerID);
|
19 |
|
20 |
-
if (!class_exists('NSLTmhOAuth')) {
|
21 |
-
require_once dirname(__FILE__) . '/sdk/tmhOAuth.php';
|
22 |
-
}
|
23 |
-
|
24 |
$this->consumer_key = $consumer_key;
|
25 |
$this->consumer_secret = $consumer_secret;
|
26 |
-
|
27 |
-
$this->client = new NSLTmhOAuth(array(
|
28 |
-
'consumer_key' => $this->consumer_key,
|
29 |
-
'consumer_secret' => $this->consumer_secret
|
30 |
-
));
|
31 |
-
}
|
32 |
-
|
33 |
-
public function setAccessTokenData($access_token_data) {
|
34 |
-
parent::setAccessTokenData($access_token_data);
|
35 |
-
|
36 |
-
$this->client->reconfigure(array(
|
37 |
-
'consumer_key' => $this->consumer_key,
|
38 |
-
'consumer_secret' => $this->consumer_secret,
|
39 |
-
'token' => $this->access_token_data['oauth_token'],
|
40 |
-
'secret' => $this->access_token_data['oauth_token_secret']
|
41 |
-
));
|
42 |
}
|
43 |
|
44 |
/**
|
@@ -48,54 +29,58 @@ class NextendSocialProviderTwitterClient extends NextendSocialAuth {
|
|
48 |
$this->redirect_uri = $redirect_uri;
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
51 |
public function createAuthUrl() {
|
52 |
-
|
|
|
53 |
'oauth_callback' => $this->redirect_uri
|
54 |
));
|
55 |
|
|
|
56 |
|
57 |
-
|
58 |
-
$oauth = $this->client->extract_params($this->client->response['response']);
|
59 |
-
} else {
|
60 |
-
$response = json_decode($this->client->response['response'], true);
|
61 |
-
throw new Exception($response['errors'][0]['message']);
|
62 |
-
}
|
63 |
|
64 |
-
|
|
|
|
|
65 |
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
}
|
68 |
|
69 |
public function hasAuthenticateData() {
|
70 |
return isset($_REQUEST['oauth_token']) && isset($_REQUEST['oauth_verifier']);
|
71 |
}
|
72 |
|
|
|
|
|
|
|
|
|
73 |
public function authenticate() {
|
74 |
$requestToken = maybe_unserialize(NextendSocialLoginPersistentAnonymous::get($this->providerID . '_request_token'));
|
75 |
|
76 |
-
$this->
|
77 |
-
'consumer_key' => $this->consumer_key,
|
78 |
-
'consumer_secret' => $this->consumer_secret,
|
79 |
-
'token' => $requestToken['oauth_token'],
|
80 |
-
'secret' => $requestToken['oauth_token_secret']
|
81 |
-
));
|
82 |
-
|
83 |
-
$code = $this->client->request('POST', $this->client->url('oauth/access_token', ''), array(
|
84 |
'oauth_verifier' => $_GET['oauth_verifier']
|
|
|
|
|
|
|
85 |
));
|
86 |
|
87 |
-
|
88 |
-
$response = json_decode($this->client->response['response'], true);
|
89 |
-
throw new Exception($response['errors'][0]['message']);
|
90 |
-
}
|
91 |
-
|
92 |
-
$user_info = $this->client->extract_params($this->client->response['response']);
|
93 |
|
94 |
$access_token_data = wp_json_encode(array(
|
95 |
-
'oauth_token' => $
|
96 |
-
'oauth_token_secret' => $
|
97 |
-
'user_id' => $
|
98 |
-
'screen_name' => $
|
99 |
));
|
100 |
|
101 |
$this->setAccessTokenData($access_token_data);
|
@@ -103,20 +88,223 @@ class NextendSocialProviderTwitterClient extends NextendSocialAuth {
|
|
103 |
return $access_token_data;
|
104 |
}
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
public function get($path, $data = array()) {
|
107 |
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
111 |
));
|
112 |
|
113 |
-
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
throw new Exception($response['errors'][0]['message']);
|
116 |
}
|
|
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
|
119 |
-
return
|
120 |
}
|
121 |
|
122 |
}
|
3 |
|
4 |
class NextendSocialProviderTwitterClient extends NextendSocialAuth {
|
5 |
|
6 |
+
const VERSION = '1.0';
|
7 |
+
|
8 |
+
const SIGNATURE_METHOD = 'HMAC-SHA1';
|
9 |
+
|
10 |
+
private $endpoint = 'https://api.twitter.com/';
|
11 |
+
|
12 |
protected $consumer_key = '';
|
13 |
|
14 |
protected $consumer_secret = '';
|
15 |
|
16 |
protected $redirect_uri = '';
|
17 |
|
|
|
|
|
|
|
|
|
|
|
18 |
public function __construct($providerID, $consumer_key, $consumer_secret) {
|
19 |
parent::__construct($providerID);
|
20 |
|
|
|
|
|
|
|
|
|
21 |
$this->consumer_key = $consumer_key;
|
22 |
$this->consumer_secret = $consumer_secret;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
|
25 |
/**
|
29 |
$this->redirect_uri = $redirect_uri;
|
30 |
}
|
31 |
|
32 |
+
/**
|
33 |
+
* @return string
|
34 |
+
* @throws Exception
|
35 |
+
*/
|
36 |
public function createAuthUrl() {
|
37 |
+
|
38 |
+
$response = $this->oauthRequest($this->endpoint . 'oauth/request_token', 'POST', array(), array(
|
39 |
'oauth_callback' => $this->redirect_uri
|
40 |
));
|
41 |
|
42 |
+
$oauthTokenData = $this->extract_params($response);
|
43 |
|
44 |
+
NextendSocialLoginPersistentAnonymous::set($this->providerID . '_request_token', maybe_serialize($oauthTokenData));
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
+
return $this->endpoint . 'oauth/authenticate?oauth_token=' . $oauthTokenData['oauth_token'] /*. '&force_login=1'*/
|
47 |
+
;
|
48 |
+
}
|
49 |
|
50 |
+
/**
|
51 |
+
* @throws Exception
|
52 |
+
*/
|
53 |
+
public function checkError() {
|
54 |
+
if (isset($_GET['denied'])) {
|
55 |
+
throw new Exception('Authentication cancelled');
|
56 |
+
}
|
57 |
}
|
58 |
|
59 |
public function hasAuthenticateData() {
|
60 |
return isset($_REQUEST['oauth_token']) && isset($_REQUEST['oauth_verifier']);
|
61 |
}
|
62 |
|
63 |
+
/**
|
64 |
+
* @return false|string
|
65 |
+
* @throws Exception
|
66 |
+
*/
|
67 |
public function authenticate() {
|
68 |
$requestToken = maybe_unserialize(NextendSocialLoginPersistentAnonymous::get($this->providerID . '_request_token'));
|
69 |
|
70 |
+
$response = $this->oauthRequest($this->endpoint . 'oauth/access_token', 'POST', array(), array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
'oauth_verifier' => $_GET['oauth_verifier']
|
72 |
+
), array(
|
73 |
+
'token' => $requestToken['oauth_token'],
|
74 |
+
'secret' => $requestToken['oauth_token_secret']
|
75 |
));
|
76 |
|
77 |
+
$accessTokenData = $this->extract_params($response);
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
$access_token_data = wp_json_encode(array(
|
80 |
+
'oauth_token' => $accessTokenData['oauth_token'],
|
81 |
+
'oauth_token_secret' => $accessTokenData['oauth_token_secret'],
|
82 |
+
'user_id' => $accessTokenData['user_id'],
|
83 |
+
'screen_name' => $accessTokenData['screen_name']
|
84 |
));
|
85 |
|
86 |
$this->setAccessTokenData($access_token_data);
|
88 |
return $access_token_data;
|
89 |
}
|
90 |
|
91 |
+
/**
|
92 |
+
* @param $path
|
93 |
+
* @param array $data
|
94 |
+
*
|
95 |
+
* @return array|mixed|object
|
96 |
+
* @throws Exception
|
97 |
+
*/
|
98 |
public function get($path, $data = array()) {
|
99 |
|
100 |
+
$response = $this->oauthRequest($this->endpoint . '1.1/' . $path . '.json', 'GET', $data + array(
|
101 |
+
'user_id' => $this->access_token_data['user_id']
|
102 |
+
), array(), array(
|
103 |
+
'token' => $this->access_token_data['oauth_token'],
|
104 |
+
'secret' => $this->access_token_data['oauth_token_secret']
|
105 |
));
|
106 |
|
107 |
+
return json_decode($response, true);
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* @param $url
|
112 |
+
* @param $method
|
113 |
+
* @param array $_requestData
|
114 |
+
* @param array $_oauthData
|
115 |
+
* @param array $context
|
116 |
+
*
|
117 |
+
* @return string
|
118 |
+
* @throws Exception
|
119 |
+
*/
|
120 |
+
private function oauthRequest($url, $method, $_requestData = array(), $_oauthData = array(), $context = array()) {
|
121 |
+
|
122 |
+
$method = strtoupper($method);
|
123 |
+
|
124 |
+
uksort($_requestData, 'strcmp');
|
125 |
+
|
126 |
+
$headers = array();
|
127 |
+
|
128 |
+
$headers['Authorization'] = $this->getAuthorizationHeader($url, $method, $_requestData, $_oauthData, $context);
|
129 |
+
|
130 |
+
$http_args = array(
|
131 |
+
'timeout' => 15,
|
132 |
+
'user-agent' => 'WordPress',
|
133 |
+
'headers' => $headers,
|
134 |
+
'body' => $_requestData
|
135 |
+
);
|
136 |
+
|
137 |
+
if ($method == 'POST') {
|
138 |
+
$request = wp_remote_post($url, $http_args);
|
139 |
+
} else {
|
140 |
+
$request = wp_remote_get($url, $http_args);
|
141 |
+
}
|
142 |
+
|
143 |
+
if (is_wp_error($request)) {
|
144 |
+
|
145 |
+
throw new Exception($request->get_error_message());
|
146 |
+
} else if (wp_remote_retrieve_response_code($request) !== 200) {
|
147 |
+
|
148 |
+
$this->errorFromResponse(json_decode(wp_remote_retrieve_body($request), true));
|
149 |
+
|
150 |
+
throw new Exception(sprintf(__('Unexpected response: %s', 'nextend-facebook-connect'), wp_remote_retrieve_body($request)));
|
151 |
+
}
|
152 |
+
|
153 |
+
return wp_remote_retrieve_body($request);
|
154 |
+
}
|
155 |
+
|
156 |
+
private function getAuthorizationHeader($url, $method, $_requestData = array(), $_oauthData = array(), $context = array()) {
|
157 |
+
|
158 |
+
$oauthParams = $this->getOauth1Params($context);
|
159 |
+
|
160 |
+
foreach ($_oauthData as $k => $v) {
|
161 |
+
$oauthParams[$this->safe_encode($k)] = $this->safe_encode($v);
|
162 |
+
}
|
163 |
+
|
164 |
+
$params = array_merge($oauthParams, $_requestData);
|
165 |
+
|
166 |
+
unset($params['oauth_signature']);
|
167 |
+
|
168 |
+
uksort($params, 'strcmp');
|
169 |
+
|
170 |
+
$prepared_pairs_with_oauth = array();
|
171 |
+
foreach ($params as $k => $v) {
|
172 |
+
$prepared_pairs_with_oauth[] = "{$k}={$v}";
|
173 |
+
}
|
174 |
+
|
175 |
+
$paramsForSignature = implode('&', $this->safe_encode(array(
|
176 |
+
$method,
|
177 |
+
$url,
|
178 |
+
implode('&', $prepared_pairs_with_oauth)
|
179 |
+
)));
|
180 |
+
|
181 |
+
$left = $this->safe_encode($this->consumer_secret);
|
182 |
+
$right = $this->safe_encode($this->secret($context));
|
183 |
+
$signing_key = $left . '&' . $right;
|
184 |
+
|
185 |
+
$oauthParams['oauth_signature'] = $this->safe_encode(base64_encode(hash_hmac('sha1', $paramsForSignature, $signing_key, true)));
|
186 |
+
|
187 |
+
uksort($oauthParams, 'strcmp');
|
188 |
+
|
189 |
+
$encoded_quoted_pairs = array();
|
190 |
+
foreach ($oauthParams as $k => $v) {
|
191 |
+
$encoded_quoted_pairs[] = "{$k}=\"{$v}\"";
|
192 |
+
}
|
193 |
+
|
194 |
+
return 'OAuth ' . implode(', ', $encoded_quoted_pairs);
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* @param $response
|
199 |
+
*
|
200 |
+
* @throws Exception
|
201 |
+
*/
|
202 |
+
private function errorFromResponse($response) {
|
203 |
+
if (isset($response['errors']) && is_array($response['errors'])) {
|
204 |
throw new Exception($response['errors'][0]['message']);
|
205 |
}
|
206 |
+
}
|
207 |
|
208 |
+
private function safe_encode($data) {
|
209 |
+
if (is_array($data)) {
|
210 |
+
return array_map(array(
|
211 |
+
$this,
|
212 |
+
'safe_encode'
|
213 |
+
), $data);
|
214 |
+
} else if (is_scalar($data)) {
|
215 |
+
return str_ireplace(array(
|
216 |
+
'+',
|
217 |
+
'%7E'
|
218 |
+
), array(
|
219 |
+
' ',
|
220 |
+
'~'
|
221 |
+
), rawurlencode($data));
|
222 |
+
} else {
|
223 |
+
return '';
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
private function safe_decode($data) {
|
228 |
+
if (is_array($data)) {
|
229 |
+
return array_map(array(
|
230 |
+
$this,
|
231 |
+
'safe_decode'
|
232 |
+
), $data);
|
233 |
+
} else if (is_scalar($data)) {
|
234 |
+
return rawurldecode($data);
|
235 |
+
} else {
|
236 |
+
return '';
|
237 |
+
}
|
238 |
+
}
|
239 |
+
|
240 |
+
private function extract_params($body) {
|
241 |
+
$kvs = explode('&', $body);
|
242 |
+
$decoded = array();
|
243 |
+
foreach ($kvs as $kv) {
|
244 |
+
$kv = explode('=', $kv, 2);
|
245 |
+
$kv[0] = $this->safe_decode($kv[0]);
|
246 |
+
$kv[1] = $this->safe_decode($kv[1]);
|
247 |
+
$decoded[$kv[0]] = $kv[1];
|
248 |
+
}
|
249 |
+
|
250 |
+
return $decoded;
|
251 |
+
}
|
252 |
+
|
253 |
+
private function nonce($length = 12, $include_time = true) {
|
254 |
+
$prefix = $include_time ? microtime() : '';
|
255 |
+
|
256 |
+
return md5(substr($prefix . uniqid(), 0, $length));
|
257 |
+
}
|
258 |
+
|
259 |
+
private function timestamp() {
|
260 |
+
$time = time();
|
261 |
+
|
262 |
+
return (string)$time;
|
263 |
+
}
|
264 |
+
|
265 |
+
private function getOauth1Params($data) {
|
266 |
+
|
267 |
+
$defaults = array(
|
268 |
+
'oauth_nonce' => $this->nonce(),
|
269 |
+
'oauth_timestamp' => $this->timestamp(),
|
270 |
+
'oauth_version' => self::VERSION,
|
271 |
+
'oauth_consumer_key' => $this->consumer_key,
|
272 |
+
'oauth_signature_method' => self::SIGNATURE_METHOD,
|
273 |
+
);
|
274 |
+
|
275 |
+
// include the user token if it exists
|
276 |
+
|
277 |
+
if ($oauth_token = $this->token($data)) {
|
278 |
+
$defaults['oauth_token'] = $oauth_token;
|
279 |
+
}
|
280 |
+
|
281 |
+
$encoded = array();
|
282 |
+
foreach ($defaults as $k => $v) {
|
283 |
+
$encoded[$this->safe_encode($k)] = $this->safe_encode($v);
|
284 |
+
}
|
285 |
+
|
286 |
+
return $encoded;
|
287 |
+
}
|
288 |
+
|
289 |
+
private function token($context) {
|
290 |
+
if (isset($context['token']) && !empty($context['token'])) {
|
291 |
+
return $context['token'];
|
292 |
+
} elseif (isset($context['user_token'])) {
|
293 |
+
return $context['user_token'];
|
294 |
+
}
|
295 |
+
|
296 |
+
return '';
|
297 |
+
}
|
298 |
+
|
299 |
+
private function secret($context) {
|
300 |
+
|
301 |
+
if (isset($context['secret']) && !empty($context['secret'])) {
|
302 |
+
return $context['secret'];
|
303 |
+
} elseif (isset($context['user_secret'])) {
|
304 |
+
return $context['user_secret'];
|
305 |
+
}
|
306 |
|
307 |
+
return '';
|
308 |
}
|
309 |
|
310 |
}
|
providers/twitter/twitter.php
CHANGED
@@ -23,7 +23,6 @@ class NextendSocialProviderTwitter extends NextendSocialProvider {
|
|
23 |
parent::__construct(array(
|
24 |
'consumer_key' => '',
|
25 |
'consumer_secret' => '',
|
26 |
-
'user_prefix' => '',
|
27 |
'login_label' => 'Continue with <b>Twitter</b>',
|
28 |
'link_label' => 'Link account with <b>Twitter</b>',
|
29 |
'unlink_label' => 'Unlink account from <b>Twitter</b>',
|
@@ -70,18 +69,18 @@ class NextendSocialProviderTwitter extends NextendSocialProvider {
|
|
70 |
}
|
71 |
|
72 |
if (empty($newData[$key])) {
|
73 |
-
NextendSocialLoginAdminNotices::addError(sprintf(__('The %s entered did not appear to be a valid. Please enter a valid %s.', 'nextend-facebook-connect'), $this->requiredFields[$key], $this->requiredFields[$key]));
|
74 |
}
|
75 |
break;
|
76 |
-
case 'user_prefix':
|
77 |
-
$newData[$key] = preg_replace("/[^A-Za-z0-9\-_ ]/", '', $value);
|
78 |
-
break;
|
79 |
}
|
80 |
}
|
81 |
|
82 |
return $newData;
|
83 |
}
|
84 |
|
|
|
|
|
|
|
85 |
public function getClient() {
|
86 |
if ($this->client === null) {
|
87 |
|
@@ -95,9 +94,18 @@ class NextendSocialProviderTwitter extends NextendSocialProvider {
|
|
95 |
return $this->client;
|
96 |
}
|
97 |
|
|
|
|
|
|
|
|
|
98 |
protected function getCurrentUserInfo() {
|
|
|
99 |
return $this->getClient()
|
100 |
-
->get('
|
|
|
|
|
|
|
|
|
101 |
}
|
102 |
|
103 |
/**
|
@@ -112,7 +120,7 @@ class NextendSocialProviderTwitter extends NextendSocialProvider {
|
|
112 |
case 'id':
|
113 |
return $this->authUserData['id'];
|
114 |
case 'email':
|
115 |
-
return '';
|
116 |
case 'name':
|
117 |
return $this->authUserData['name'];
|
118 |
case 'first_name':
|
@@ -218,7 +226,10 @@ class NextendSocialProviderTwitter extends NextendSocialProvider {
|
|
218 |
|
219 |
public function import() {
|
220 |
$oldSettings = maybe_unserialize(get_option('nextend_twitter_connect'));
|
221 |
-
if (
|
|
|
|
|
|
|
222 |
$newSettings = array(
|
223 |
'consumer_key' => $oldSettings['twitter_consumer_key'],
|
224 |
'consumer_secret' => $oldSettings['twitter_consumer_secret']
|
23 |
parent::__construct(array(
|
24 |
'consumer_key' => '',
|
25 |
'consumer_secret' => '',
|
|
|
26 |
'login_label' => 'Continue with <b>Twitter</b>',
|
27 |
'link_label' => 'Link account with <b>Twitter</b>',
|
28 |
'unlink_label' => 'Unlink account from <b>Twitter</b>',
|
69 |
}
|
70 |
|
71 |
if (empty($newData[$key])) {
|
72 |
+
NextendSocialLoginAdminNotices::addError(sprintf(__('The %1$s entered did not appear to be a valid. Please enter a valid %2$s.', 'nextend-facebook-connect'), $this->requiredFields[$key], $this->requiredFields[$key]));
|
73 |
}
|
74 |
break;
|
|
|
|
|
|
|
75 |
}
|
76 |
}
|
77 |
|
78 |
return $newData;
|
79 |
}
|
80 |
|
81 |
+
/**
|
82 |
+
* @return NextendSocialProviderTwitterClient
|
83 |
+
*/
|
84 |
public function getClient() {
|
85 |
if ($this->client === null) {
|
86 |
|
94 |
return $this->client;
|
95 |
}
|
96 |
|
97 |
+
/**
|
98 |
+
* @return array|mixed|object
|
99 |
+
* @throws Exception
|
100 |
+
*/
|
101 |
protected function getCurrentUserInfo() {
|
102 |
+
|
103 |
return $this->getClient()
|
104 |
+
->get('account/verify_credentials', array(
|
105 |
+
'include_email' => 'true',
|
106 |
+
'include_entities' => 'false',
|
107 |
+
'skip_status' => 'true'
|
108 |
+
));
|
109 |
}
|
110 |
|
111 |
/**
|
120 |
case 'id':
|
121 |
return $this->authUserData['id'];
|
122 |
case 'email':
|
123 |
+
return !empty($this->authUserData['email']) ? $this->authUserData['email'] : '';
|
124 |
case 'name':
|
125 |
return $this->authUserData['name'];
|
126 |
case 'first_name':
|
226 |
|
227 |
public function import() {
|
228 |
$oldSettings = maybe_unserialize(get_option('nextend_twitter_connect'));
|
229 |
+
if ($oldSettings === false) {
|
230 |
+
$newSettings['legacy'] = 0;
|
231 |
+
$this->settings->update($newSettings);
|
232 |
+
} else if (!empty($oldSettings['twitter_consumer_key']) && !empty($oldSettings['twitter_consumer_secret'])) {
|
233 |
$newSettings = array(
|
234 |
'consumer_key' => $oldSettings['twitter_consumer_key'],
|
235 |
'consumer_secret' => $oldSettings['twitter_consumer_secret']
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: social login, facebook, google, twitter, linkedin, register, login, social
|
|
4 |
Donate link: https://www.facebook.com/nextendweb
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 3.0.
|
8 |
Requires PHP: 5.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -62,12 +62,15 @@ After you activated the plugin configure and enable the provider you want to use
|
|
62 |
|
63 |
== Frequently Asked Questions ==
|
64 |
|
65 |
-
= 1.
|
66 |
-
|
|
|
67 |
|
68 |
= 2. Why are random email addresses generated for users registering with their FaceBook account? =
|
69 |
When the user tries to register with their Facebook account Facebook pops up a window where each user can view what kind of access they give for the app. In this modal they can chose not to share their email address. When they're doing so we generate a random email address for them. They can of course change this at their profile.
|
70 |
-
|
|
|
|
|
71 |
|
72 |
= 3. What should I do when I experience any problems? =
|
73 |
[Contact us](https://nextendweb.com/contact-us/) via email and explain the issue you have.
|
@@ -109,11 +112,23 @@ Unfortunately, currently there are no BuddyPress specific settings. However your
|
|
109 |
|
110 |
== Changelog ==
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
= 3.0.2 =
|
113 |
* Fixed upgrade script
|
114 |
|
115 |
= 3.0.1 =
|
116 |
-
* 3.0 is a major update. Please [review the update guide](https://nextendweb.com/nextend-social-login-docs/upgrade-nextend-social-login-3/) guide before upgrading.
|
117 |
* Nextend Facebook Connect renamed to Nextend Social Login and contains Google and Twitter providers too.
|
118 |
* Brand new UI
|
119 |
* Popup login
|
4 |
Donate link: https://www.facebook.com/nextendweb
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 3.0.3
|
8 |
Requires PHP: 5.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
62 |
|
63 |
== Frequently Asked Questions ==
|
64 |
|
65 |
+
= 1. How can I get the email address from the Twitter users? =
|
66 |
+
After you set up your APP go to the Settings tab and enter the URL of your Terms of Service and Privacy Policy page. Then hit the Update your settings button. Then go to the Permissions tab and check the "Request email addresses from users" under "Additional Permissions". [There's a documentation](https://nextendweb.com/nextend-social-login-docs/provider-twitter/#get-email) that explains the process with screenshots.
|
67 |
+
|
68 |
|
69 |
= 2. Why are random email addresses generated for users registering with their FaceBook account? =
|
70 |
When the user tries to register with their Facebook account Facebook pops up a window where each user can view what kind of access they give for the app. In this modal they can chose not to share their email address. When they're doing so we generate a random email address for them. They can of course change this at their profile.
|
71 |
+
If the permission is given to the app, there are still [other factors](https://nextendweb.com/nextend-social-login-docs/provider-facebook/#get-email) which can result Facebook not sending back any email address.
|
72 |
+
|
73 |
+
In the Pro Addon it's possible to ask an email address if it's not returned by Facebook.
|
74 |
|
75 |
= 3. What should I do when I experience any problems? =
|
76 |
[Contact us](https://nextendweb.com/contact-us/) via email and explain the issue you have.
|
112 |
|
113 |
== Changelog ==
|
114 |
|
115 |
+
= 3.0.3 =
|
116 |
+
* Added fallback username prefix
|
117 |
+
* Fixed avatar for Google, Twitter and LinkedIn providers
|
118 |
+
* Fixed avatars on retina screen
|
119 |
+
* Optimized registration process
|
120 |
+
* Fixed Shopkeeper theme conflict
|
121 |
+
* WP HTTP api replaced the native cURL
|
122 |
+
* Twitter provider client optimization, removed force_login param, [added email permission](https://nextendweb.com/nextend-social-login-docs/provider-twitter/#get-email)
|
123 |
+
* Removed mb_strlen, so "PHP Multibyte String" not required anymore
|
124 |
+
* Fixed rare case when the redirect to last state url was missing
|
125 |
+
* Added [WebView support](https://nextendweb.com/nextend-social-login-docs/can-use-nextend-social-login-webview/) (Google buttons are hidden in WebView as Google does not allow to use)
|
126 |
+
* Fixed rare case when user can stuck in legacy mode while importing provider.
|
127 |
+
|
128 |
= 3.0.2 =
|
129 |
* Fixed upgrade script
|
130 |
|
131 |
= 3.0.1 =
|
|
|
132 |
* Nextend Facebook Connect renamed to Nextend Social Login and contains Google and Twitter providers too.
|
133 |
* Brand new UI
|
134 |
* Popup login
|