Social Login - Version 5.0

Version Description

  • Social Network "Battle.net" added
  • Social Link Hooks/Nonce added
  • WooCommerce Actions added
  • Login/Registration URL filters added
  • Cache bug fixed
  • WooCommerce Social Login Twice on Register Form
  • Some minor bugs fixed
Download this release

Release Info

Developer ClaudeSchlesser
Plugin Icon 128x128 Social Login
Version 5.0
Comparing to
See all releases

Code changes from version 4.6 to 5.0

assets/css/admin.css CHANGED
@@ -264,4 +264,20 @@
264
 
265
  .oa_social_login_provider_instagram {
266
  background-position: -1186px -1px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  }
264
 
265
  .oa_social_login_provider_instagram {
266
  background-position: -1186px -1px;
267
+ }
268
+
269
+ .oa_social_login_provider_battlenet {
270
+ background-position: -1223px -1px;
271
+ }
272
+
273
+ .oa_social_login_provider_dribbble {
274
+ background-position: -1260px -1px;
275
+ }
276
+
277
+ .oa_social_login_provider_pinterest {
278
+ background-position: -1297px -1px;
279
+ }
280
+
281
+ .oa_social_login_provider_pixelpin {
282
+ background-position: -1334px -1px;
283
  }
assets/css/site.css CHANGED
@@ -1,103 +1,104 @@
1
  #oa_social_login_overlay {
2
- background-color: transparent;
3
- background-image: url("../img/overlay.png");
4
- background-position: 0 0;
5
- background-repeat: repeat;
6
- height: 100%;
7
- left: 0;
8
- overflow: auto;
9
- position: fixed;
10
- text-align: center;
11
- top: 0;
12
- width: 100%;
13
- z-index: 999995;
14
  }
15
 
16
  #oa_social_login_modal {
17
- left: 50%;
18
- margin-left: -200px;
19
- position: fixed;
20
- text-align: left;
21
- top: 25%;
22
- width: 400px;
23
- z-index: 999996;
24
  }
25
 
26
  .oa_social_login_modal_outer {
27
- -moz-border-radius: 4px;
28
- -webkit-border-radius: 4px;
29
- border-radius: 4px;
30
- overflow: auto;
31
- background: #eee;
32
- z-index: 999998;
33
  }
34
 
35
  .oa_social_login_modal_inner {
36
- overflow: auto;
37
- background: #ffffff;
38
- margin: 5px;
39
- padding: 0;
40
- z-index: 999997;
41
  }
42
 
43
  .oa_social_login_modal_inner input.oa_social_login_confirm_text {
44
- margin: 0;
45
- width: 96%;
 
46
  }
47
 
48
- .oa_social_login_buttons {
49
- text-align: center;
50
- margin-top: 10px;
51
  }
52
 
53
- .oa_social_login_modal_inner input.oa_social_login_button_confirm {
54
- width: 75%;
55
- float: left;
56
- font-size: 13px;
57
- color: #000;
58
  }
59
 
60
- .oa_social_login_modal_inner input.oa_social_login_button_cancel {
61
- width: 20%;
62
- float: right;
63
- font-size: 13px;
64
  }
65
 
66
  .oa_social_login_modal_notice {
67
- background-color: #FFEF8F;
68
- color: #222;
69
- font-size: 12px;
70
- padding: 10px 15px;
71
- text-align: justify;
72
- border: 1px solid #F9DD34;
73
- margin: 10px 15px 0 15px;
74
- border-radius: 5px;
75
- line-height: 16px;
76
  }
77
 
78
  .oa_social_login_modal_body {
79
- padding: 10px 20px;
 
 
 
 
 
 
80
  }
81
 
82
  .oa_social_login_modal_title {
83
- color: #222;
84
- background-color: #eee;
85
- padding: 5px 0 8px;
86
- border-bottom: 1px solid #ccc;
87
- font-size: 16px;
88
- text-align: center;
89
  }
90
 
91
  .oa_social_login_modal_subtitle {
92
- color: #55;
93
- font-size: 14px;
94
- font-weight: bold;
95
- margin: 5px 0;
96
  }
97
 
98
  .oa_social_login_modal_error {
99
- color: red;
100
- font-size: 12px;
101
- font-weight: bold;
102
- margin: 5px 0 20px;
103
  }
1
  #oa_social_login_overlay {
2
+ background-color: transparent;
3
+ background-image: url("../img/overlay.png");
4
+ background-position: 0 0;
5
+ background-repeat: repeat;
6
+ height: 100%;
7
+ left: 0;
8
+ overflow: auto;
9
+ position: fixed;
10
+ text-align: center;
11
+ top: 0;
12
+ width: 100%;
13
+ z-index: 999995;
14
  }
15
 
16
  #oa_social_login_modal {
17
+ left: 50%;
18
+ margin-left: -200px;
19
+ position: fixed;
20
+ text-align: left;
21
+ top: 25%;
22
+ width: 450px;
23
+ z-index: 999996;
24
  }
25
 
26
  .oa_social_login_modal_outer {
27
+ border-radius: 4px;
28
+ overflow: auto;
29
+ background-color: #eee;
30
+ z-index: 999998;
31
+ box-shadow: 10px 10px 12px -11px rgba(0,0,0,0.75);
 
32
  }
33
 
34
  .oa_social_login_modal_inner {
35
+ overflow: auto;
36
+ background: #fff;
37
+ margin: 5px;
38
+ padding: 0;
39
+ z-index: 999997;
40
  }
41
 
42
  .oa_social_login_modal_inner input.oa_social_login_confirm_text {
43
+ margin: 0;
44
+ width: 96%;
45
+ color: #000;
46
  }
47
 
48
+ .oa_social_login_input {
49
+ text-align: center;
 
50
  }
51
 
52
+ .oa_social_login_buttons {
53
+ text-align: center;
54
+ margin-top: 10px;
 
 
55
  }
56
 
57
+ .oa_social_login_button {
58
+ font-size: 13px;
 
 
59
  }
60
 
61
  .oa_social_login_modal_notice {
62
+ background-color: #FFEF8F;
63
+ color: #222;
64
+ font-size: 12px;
65
+ padding: 10px 15px;
66
+ text-align: justify;
67
+ border: 1px solid #F9DD34;
68
+ margin: 10px 15px 0 15px;
69
+ border-radius: 5px;
70
+ line-height: 16px;
71
  }
72
 
73
  .oa_social_login_modal_body {
74
+ padding: 10px 20px;
75
+ }
76
+
77
+ .oa_social_login_modal_body fieldset {
78
+ border:0 none;
79
+ margin:0 ;
80
+ padding: 0;
81
  }
82
 
83
  .oa_social_login_modal_title {
84
+ color: #222;
85
+ background-color: #eee;
86
+ padding: 5px 0 8px;
87
+ border-bottom: 1px solid #ccc;
88
+ font-size: 16px;
89
+ text-align: center;
90
  }
91
 
92
  .oa_social_login_modal_subtitle {
93
+ color: #55;
94
+ font-size: 14px;
95
+ font-weight: bold;
96
+ margin: 5px 0;
97
  }
98
 
99
  .oa_social_login_modal_error {
100
+ color: red;
101
+ font-size: 12px;
102
+ font-weight: bold;
103
+ margin: 5px 0 20px;
104
  }
assets/img/provider_sprite_35_35.png CHANGED
Binary file
assets/js/admin.js CHANGED
@@ -16,7 +16,6 @@ jQuery(document).ready(function($) {
16
  message_container.html(objectL10n.oa_admin_js_1);
17
 
18
  jQuery.post(ajaxurl,data, function(response) {
19
-
20
  /* CURL/FSOCKOPEN Radio Boxs */
21
  var radio_curl = jQuery("#oa_social_login_api_connection_handler_curl");
22
  var radio_fsockopen = jQuery("#oa_social_login_api_connection_handler_fsockopen");
@@ -125,8 +124,7 @@ jQuery(document).ready(function($) {
125
  message_container.removeClass('success_message error_message').addClass('working_message');
126
  message_container.html(objectL10n.oa_admin_js_1);
127
 
128
- jQuery.post(ajaxurl,data, function(response) {
129
-
130
  if (response == 'error_selected_handler_faulty'){
131
  is_success = false;
132
  message_string = objectL10n.oa_admin_js_116;
16
  message_container.html(objectL10n.oa_admin_js_1);
17
 
18
  jQuery.post(ajaxurl,data, function(response) {
 
19
  /* CURL/FSOCKOPEN Radio Boxs */
20
  var radio_curl = jQuery("#oa_social_login_api_connection_handler_curl");
21
  var radio_fsockopen = jQuery("#oa_social_login_api_connection_handler_fsockopen");
124
  message_container.removeClass('success_message error_message').addClass('working_message');
125
  message_container.html(objectL10n.oa_admin_js_1);
126
 
127
+ jQuery.post(ajaxurl,data, function(response) {
 
128
  if (response == 'error_selected_handler_faulty'){
129
  is_success = false;
130
  message_string = objectL10n.oa_admin_js_116;
includes/admin.php CHANGED
@@ -606,12 +606,12 @@ function oa_display_social_login_setup ()
606
  <?php _e ('Get Started!', 'oa_social_login'); ?>
607
  </div>
608
  <p>
609
- <?php printf (__ ('To be able to use this plugin you first of all need to create a free account at %s and setup a Site.', 'oa_social_login'), '<a href="https://app.oneall.com/signup/" target="_blank">http://www.oneall.com</a>'); ?>
610
  <?php _e ('After having created your account and setup your Site, please enter the Site settings in the form below.', 'oa_social_login'); ?>
611
  <?php _e ("Don't worry the setup takes only a couple of minutes!", 'oa_social_login'); ?>
612
  </p>
613
  <p>
614
- <a class="button-secondary" href="https://app.oneall.com/signup/" target="_blank"><strong><?php _e ('Click here to setup your free account', 'oa_social_login'); ?></strong></a>
615
  </p>
616
  <h3>
617
  <?php printf (__ ('You are in good company! This plugin is used on more than %s websites!', 'oa_social_login'), '250,000'); ?>
@@ -828,7 +828,7 @@ function oa_display_social_login_setup ()
828
  </label>
829
  </td>
830
  <td class="cell_provider_label">
831
- <input type="checkbox" id="oneall_social_login_provider_<?php echo $key; ?>" name="oa_social_login_settings[providers][<?php echo $key; ?>]" value="1" <?php checked ('1', $settings ['providers'] [$key]); ?> />
832
  <label for="oneall_social_login_provider_<?php echo $key; ?>"><?php echo htmlspecialchars ($provider_data ['name']); ?> </label>
833
  <?php
834
  if (in_array ($key, array ('vkontakte', 'mailru', 'odnoklassniki')))
606
  <?php _e ('Get Started!', 'oa_social_login'); ?>
607
  </div>
608
  <p>
609
+ <?php printf (__ ('To be able to use this plugin you first of all need to create a free account at %s and setup a Site.', 'oa_social_login'), '<a href="https://app.oneall.com/signup/wp" target="_blank">http://www.oneall.com</a>'); ?>
610
  <?php _e ('After having created your account and setup your Site, please enter the Site settings in the form below.', 'oa_social_login'); ?>
611
  <?php _e ("Don't worry the setup takes only a couple of minutes!", 'oa_social_login'); ?>
612
  </p>
613
  <p>
614
+ <a class="button-secondary" href="https://app.oneall.com/signup/wp" target="_blank"><strong><?php _e ('Click here to setup your free account', 'oa_social_login'); ?></strong></a>
615
  </p>
616
  <h3>
617
  <?php printf (__ ('You are in good company! This plugin is used on more than %s websites!', 'oa_social_login'), '250,000'); ?>
828
  </label>
829
  </td>
830
  <td class="cell_provider_label">
831
+ <input type="checkbox" id="oneall_social_login_provider_<?php echo $key; ?>" name="oa_social_login_settings[providers][<?php echo $key; ?>]" value="1" <?php checked ('1', ((isset ($settings ['providers']) && !empty ($settings ['providers'] [$key])) ? $settings ['providers'] [$key] : 0)); ?> />
832
  <label for="oneall_social_login_provider_<?php echo $key; ?>"><?php echo htmlspecialchars ($provider_data ['name']); ?> </label>
833
  <?php
834
  if (in_array ($key, array ('vkontakte', 'mailru', 'odnoklassniki')))
includes/communication.php CHANGED
@@ -274,6 +274,9 @@ function oa_social_login_callback ()
274
  wp_cache_delete ($user_id, 'users');
275
  wp_cache_delete ($user_login, 'userlogins');
276
 
 
 
 
277
  //Social Login Hook
278
  do_action ('oa_social_login_action_after_user_insert', $user_data, $identity);
279
  }
@@ -470,13 +473,22 @@ function oa_social_login_callback ()
470
  $redirect_to = home_url ();
471
  }
472
 
473
- //Filter for redirection urls
474
  if ($new_registration === true)
475
  {
 
 
 
 
476
  $redirect_to = apply_filters ('oa_social_login_filter_registration_redirect_url', $redirect_to, $user_data);
477
  }
 
478
  else
479
  {
 
 
 
 
480
  $redirect_to = apply_filters ('oa_social_login_filter_login_redirect_url', $redirect_to, $user_data);
481
  }
482
 
274
  wp_cache_delete ($user_id, 'users');
275
  wp_cache_delete ($user_login, 'userlogins');
276
 
277
+ //WordPress hook
278
+ do_action ('user_register', $user_id);
279
+
280
  //Social Login Hook
281
  do_action ('oa_social_login_action_after_user_insert', $user_data, $identity);
282
  }
473
  $redirect_to = home_url ();
474
  }
475
 
476
+ // New User (Registration)
477
  if ($new_registration === true)
478
  {
479
+ // Apply the WordPress filters
480
+ $redirect_to = apply_filters ('registration_redirect', $redirect_to);
481
+
482
+ // Apply our filters
483
  $redirect_to = apply_filters ('oa_social_login_filter_registration_redirect_url', $redirect_to, $user_data);
484
  }
485
+ // Existing User (Login)
486
  else
487
  {
488
+ // Apply the WordPress filters
489
+ $redirect_to = apply_filters ('login_redirect', $redirect_to, (! empty ($_GET ['redirect_to']) ? $_GET ['redirect_to'] : ''), $user_data);
490
+
491
+ // Apply our filters
492
  $redirect_to = apply_filters ('oa_social_login_filter_login_redirect_url', $redirect_to, $user_data);
493
  }
494
 
includes/settings.php CHANGED
@@ -1,86 +1,97 @@
1
- <?php
2
-
3
  /**
4
  * Available Providers
5
- */
6
-
7
- $oa_social_login_providers = array(
8
- 'amazon' => array(
9
- 'name' => 'Amazon',
10
- ),
11
- 'blogger' => array(
12
- 'name' => 'Blogger',
13
- ),
14
- 'disqus' => array(
15
- 'name' => 'Disqus',
16
- ),
17
- 'facebook' => array(
18
- 'name' => 'Facebook',
19
- ),
20
- 'foursquare' => array(
21
- 'name' => 'Foursquare',
22
- ),
23
- 'github' => array(
24
- 'name' => 'Github.com',
25
- ),
26
- 'google' => array(
27
- 'name' => 'Google',
28
- ),
29
- 'instagram' => array(
30
- 'name' => 'Instagram',
31
- ),
32
- 'linkedin' => array(
33
- 'name' => 'LinkedIn',
34
- ),
35
- 'livejournal' => array(
36
- 'name' => 'LiveJournal',
37
- ),
38
- 'mailru' => array(
39
- 'name' => 'Mail.ru',
40
- ),
41
- 'odnoklassniki' => array(
42
- 'name' => 'Odnoklassniki',
43
- ),
44
- 'openid' => array(
45
- 'name' => 'OpenID',
46
- ),
47
- 'paypal' => array(
48
- 'name' => 'PayPal',
49
- ),
50
- 'reddit' => array(
51
- 'name' => 'Reddit',
52
- ),
53
- 'skyrock' => array(
54
- 'name' => 'Skyrock.com',
55
- ),
56
- 'stackexchange' => array(
57
- 'name' => 'StackExchange',
58
- ),
59
- 'steam' => array(
60
- 'name' => 'Steam',
61
- ),
62
- 'twitch' => array(
63
- 'name' => 'Twitch.tv',
64
- ),
65
- 'twitter' => array(
66
- 'name' => 'Twitter',
67
- ),
68
- 'vimeo' => array(
69
- 'name' => 'Vimeo',
70
- ),
71
- 'vkontakte' => array(
72
- 'name' => 'VKontakte',
73
- ),
74
- 'windowslive' => array(
75
- 'name' => 'Windows Live',
76
- ),
77
- 'wordpress' => array(
78
- 'name' => 'WordPress.com',
79
- ),
80
- 'yahoo' => array(
81
- 'name' => 'Yahoo',
82
- ),
83
- 'youtube' => array(
84
- 'name' => 'YouTube',
85
- )
 
 
 
 
 
 
 
 
 
 
 
86
  );
1
+ <?php
2
+
3
  /**
4
  * Available Providers
5
+ */
6
+ $oa_social_login_providers = array(
7
+ 'amazon' => array(
8
+ 'name' => 'Amazon'
9
+ ),
10
+ 'battlenet' => array(
11
+ 'name' => 'Battle.net'
12
+ ),
13
+ 'blogger' => array(
14
+ 'name' => 'Blogger'
15
+ ),
16
+ 'disqus' => array(
17
+ 'name' => 'Disqus'
18
+ ),
19
+ 'dribbble' => array(
20
+ 'name' => 'Dribbble'
21
+ ),
22
+ 'facebook' => array(
23
+ 'name' => 'Facebook'
24
+ ),
25
+ 'foursquare' => array(
26
+ 'name' => 'Foursquare'
27
+ ),
28
+ 'github' => array(
29
+ 'name' => 'Github.com'
30
+ ),
31
+ 'google' => array(
32
+ 'name' => 'Google'
33
+ ),
34
+ 'instagram' => array(
35
+ 'name' => 'Instagram'
36
+ ),
37
+ 'linkedin' => array(
38
+ 'name' => 'LinkedIn'
39
+ ),
40
+ 'livejournal' => array(
41
+ 'name' => 'LiveJournal'
42
+ ),
43
+ 'mailru' => array(
44
+ 'name' => 'Mail.ru'
45
+ ),
46
+ 'odnoklassniki' => array(
47
+ 'name' => 'Odnoklassniki'
48
+ ),
49
+ 'openid' => array(
50
+ 'name' => 'OpenID'
51
+ ),
52
+ 'paypal' => array(
53
+ 'name' => 'PayPal'
54
+ ),
55
+ 'pinterest' => array(
56
+ 'name' => 'Pinterest'
57
+ ),
58
+ 'pixelpin' => array(
59
+ 'name' => 'PixelPin'
60
+ ),
61
+ 'reddit' => array(
62
+ 'name' => 'Reddit'
63
+ ),
64
+ 'skyrock' => array(
65
+ 'name' => 'Skyrock.com'
66
+ ),
67
+ 'stackexchange' => array(
68
+ 'name' => 'StackExchange'
69
+ ),
70
+ 'steam' => array(
71
+ 'name' => 'Steam'
72
+ ),
73
+ 'twitch' => array(
74
+ 'name' => 'Twitch.tv'
75
+ ),
76
+ 'twitter' => array(
77
+ 'name' => 'Twitter'
78
+ ),
79
+ 'vimeo' => array(
80
+ 'name' => 'Vimeo'
81
+ ),
82
+ 'vkontakte' => array(
83
+ 'name' => 'VKontakte'
84
+ ),
85
+ 'windowslive' => array(
86
+ 'name' => 'Windows Live'
87
+ ),
88
+ 'wordpress' => array(
89
+ 'name' => 'WordPress.com'
90
+ ),
91
+ 'yahoo' => array(
92
+ 'name' => 'Yahoo'
93
+ ),
94
+ 'youtube' => array(
95
+ 'name' => 'YouTube'
96
+ )
97
  );
includes/user_interface.php CHANGED
@@ -32,7 +32,7 @@ function oa_social_login_add_javascripts ()
32
  $output = array ();
33
  $output [] = '';
34
  $output [] = " <!-- OneAll.com / Social Login for WordPress / v" . constant ('OA_SOCIAL_LOGIN_VERSION') . " -->";
35
- $output [] = '<script type="text/javascript">';
36
  $output [] = " (function() {";
37
  $output [] = " var oa = document.createElement('script'); oa.type = 'text/javascript';";
38
  $output [] = " oa.async = true; oa.src = '" . $oneall_js_library . "';";
@@ -151,6 +151,9 @@ function oa_social_login_render_link_form ($source, $user)
151
  //Link identity
152
  if ($data->plugin->data->action == 'link_identity')
153
  {
 
 
 
154
  // The user already has a user_token
155
  if (is_numeric ($userid_by_token))
156
  {
@@ -196,7 +199,7 @@ function oa_social_login_render_link_form ($source, $user)
196
  else
197
  {
198
  $success_message = sprintf (__ ('You have successfully linked your %s account.', 'oa_social_login'), $data->user->identity->source->name);
199
-
200
  //Clean Cache
201
  wp_cache_delete ($userid, 'users');
202
 
@@ -210,10 +213,16 @@ function oa_social_login_render_link_form ($source, $user)
210
  update_user_meta ($userid, 'oa_social_login_user_thumbnail', $data->user->identity->thumbnailUrl);
211
  }
212
  }
 
 
 
213
  }
214
  //UnLink identity
215
  elseif ($data->plugin->data->action == 'unlink_identity')
216
  {
 
 
 
217
  // The user already has a user_token
218
  if (is_numeric ($userid_by_token))
219
  {
@@ -288,6 +297,9 @@ function oa_social_login_render_link_form ($source, $user)
288
  {
289
  //Nothing to do
290
  }
 
 
 
291
  }
292
  }
293
  }
@@ -306,11 +318,11 @@ function oa_social_login_render_link_form ($source, $user)
306
  //Callback URI
307
  $callback_uri = oa_social_login_get_current_url ();
308
  $callback_uri .= (strlen (parse_url ($callback_uri, PHP_URL_QUERY)) == 0 ? '?' : '&') . 'oa_social_login_source=' . $source . '#oa_social_link';
309
-
 
310
  //Setup Social Container
311
  $containerid = 'oneall_social_login_providers_' . mt_rand (99999, 9999999);
312
 
313
-
314
  //Setup Social Link
315
  $social_link = array ();
316
  $social_link [] = '<div class="oneall_social_link">';
@@ -460,7 +472,7 @@ function oa_social_login_shortcode_test ($args, $content = null)
460
  return do_shortcode ($content);
461
  }
462
  }
463
- elseif ($attr ['is_social_login_user'] == 'false')
464
  {
465
  if (!$is_social_login_user)
466
  {
@@ -624,7 +636,6 @@ function oa_social_login_custom_avatar ($avatar, $mixed, $size, $default, $alt =
624
  $user_picture = (!empty ($user_meta_thumbnail) ? $user_meta_thumbnail : $user_meta_picture);
625
  }
626
 
627
-
628
  //Avatar found?
629
  if ($user_picture !== false AND strlen (trim ($user_picture)) > 0)
630
  {
@@ -716,6 +727,12 @@ add_action ('after_signup_form', 'oa_social_login_render_login_form_registration
716
  //BuddyPress Registration
717
  add_action ('bp_before_account_details_fields', 'oa_social_login_render_login_form_registration');
718
 
 
 
 
 
 
 
719
 
720
  /**
721
  * Display the provider grid for login
@@ -744,6 +761,9 @@ add_action ('va_after_admin_bar_login_form', 'oa_social_login_render_login_form_
744
  //Sidebar Login
745
  add_action ('sidebar_login_widget_logged_out_content_end', 'oa_social_login_render_login_form_login');
746
 
 
 
 
747
 
748
  /**
749
  * Display the provider grid for login - with a specific callback_uri
@@ -767,8 +787,14 @@ function oa_social_login_render_login_form_wp_login ()
767
 
768
  //Add our query argument
769
  $args ['callback_uri'] = add_query_arg (array ('oa_social_login_source' => 'login'), $args ['callback_uri']);
 
 
 
 
 
 
770
 
771
- //Allow others to customize the callback uri
772
  $args ['callback_uri'] = apply_filters ('oa_social_login_filter_wp_login_callback_uri', $args ['callback_uri']);
773
  }
774
 
@@ -794,23 +820,33 @@ function oa_social_login_render_login_form_wp_registration ()
794
  //Display buttons if option not set or enabled
795
  if (!isset ($settings ['plugin_display_in_registration_form']) OR !empty ($settings ['plugin_display_in_registration_form']))
796
  {
797
- //Additional arguments for the icon builder
798
- $args = array ();
799
-
800
- //Only on the registration page
801
- if (strpos (oa_social_login_get_current_url (), 'wp-login.php') !== false)
802
- {
803
- //This is the default WordPress registration url
804
- $args ['callback_uri'] = site_url ('wp-login.php?action=register', 'login_post');
805
-
806
- //Add our query argument
807
- $args ['callback_uri'] = add_query_arg (array ('oa_social_login_source' => 'registration'), $args ['callback_uri']);
808
-
809
- //Others may use this hook
810
- $args ['callback_uri'] = apply_filters ('oa_social_login_filter_wp_registration_callback_uri', $args ['callback_uri']);
811
- }
812
-
813
- echo oa_social_login_render_login_form ('registration', $args);
 
 
 
 
 
 
 
 
 
 
814
  }
815
  }
816
  }
@@ -1108,7 +1144,7 @@ function oa_social_login_request_email ()
1108
  </div>
1109
  <form method="post" action="">
1110
  <fieldset>
1111
- <div>
1112
  <input type="text" name="oa_social_login_email" class="oa_social_login_confirm_text" value="<?php echo (!empty ($_POST ['oa_social_login_email']) ? oa_social_login_esc_attr ($_POST ['oa_social_login_email']) : ''); ?>" />
1113
  <input type="hidden" name="oa_social_login_action" value="confirm_email" size="30" />
1114
  </div>
@@ -1116,8 +1152,8 @@ function oa_social_login_request_email ()
1116
  <?php echo $message; ?>
1117
  </div>
1118
  <div class="oa_social_login_buttons">
1119
- <input class="oa_social_login_button_confirm" type="submit" value="<?php _e ('Confirm', 'oa_social_login'); ?>" />
1120
- <input class="oa_social_login_button_cancel" type="button" value="<?php _e ('Cancel', 'oa_social_login'); ?>" onclick="window.location.href='<?php echo esc_url (wp_logout_url (oa_social_login_get_current_url ())); ?>'" />
1121
  </div>
1122
  </fieldset>
1123
  </form>
32
  $output = array ();
33
  $output [] = '';
34
  $output [] = " <!-- OneAll.com / Social Login for WordPress / v" . constant ('OA_SOCIAL_LOGIN_VERSION') . " -->";
35
+ $output [] = '<script data-cfasync="false" type="text/javascript">';
36
  $output [] = " (function() {";
37
  $output [] = " var oa = document.createElement('script'); oa.type = 'text/javascript';";
38
  $output [] = " oa.async = true; oa.src = '" . $oneall_js_library . "';";
151
  //Link identity
152
  if ($data->plugin->data->action == 'link_identity')
153
  {
154
+ //Hook for other plugins
155
+ do_action ('oa_social_login_action_before_user_link', $user->data, $data->user->identity, $userid_by_token);
156
+
157
  // The user already has a user_token
158
  if (is_numeric ($userid_by_token))
159
  {
199
  else
200
  {
201
  $success_message = sprintf (__ ('You have successfully linked your %s account.', 'oa_social_login'), $data->user->identity->source->name);
202
+
203
  //Clean Cache
204
  wp_cache_delete ($userid, 'users');
205
 
213
  update_user_meta ($userid, 'oa_social_login_user_thumbnail', $data->user->identity->thumbnailUrl);
214
  }
215
  }
216
+
217
+ //Hook for other plugins
218
+ do_action ('oa_social_login_action_after_user_link', $user->data, $data->user->identity, $userid_by_token);
219
  }
220
  //UnLink identity
221
  elseif ($data->plugin->data->action == 'unlink_identity')
222
  {
223
+ //Hook for other plugins
224
+ do_action ('oa_social_login_action_before_user_unlink', $user->data, $data->user->identity, $userid_by_token);
225
+
226
  // The user already has a user_token
227
  if (is_numeric ($userid_by_token))
228
  {
297
  {
298
  //Nothing to do
299
  }
300
+
301
+ //Hook for other plugins
302
+ do_action ('oa_social_login_action_after_user_unlink', $user->data, $data->user->identity, $userid_by_token);
303
  }
304
  }
305
  }
318
  //Callback URI
319
  $callback_uri = oa_social_login_get_current_url ();
320
  $callback_uri .= (strlen (parse_url ($callback_uri, PHP_URL_QUERY)) == 0 ? '?' : '&') . 'oa_social_login_source=' . $source . '#oa_social_link';
321
+ $callback_uri = wp_nonce_url($callback_uri, 'update-user_' . $userid);
322
+
323
  //Setup Social Container
324
  $containerid = 'oneall_social_login_providers_' . mt_rand (99999, 9999999);
325
 
 
326
  //Setup Social Link
327
  $social_link = array ();
328
  $social_link [] = '<div class="oneall_social_link">';
472
  return do_shortcode ($content);
473
  }
474
  }
475
+ elseif ($args ['is_social_login_user'] == 'false')
476
  {
477
  if (!$is_social_login_user)
478
  {
636
  $user_picture = (!empty ($user_meta_thumbnail) ? $user_meta_thumbnail : $user_meta_picture);
637
  }
638
 
 
639
  //Avatar found?
640
  if ($user_picture !== false AND strlen (trim ($user_picture)) > 0)
641
  {
727
  //BuddyPress Registration
728
  add_action ('bp_before_account_details_fields', 'oa_social_login_render_login_form_registration');
729
 
730
+ //WooCommerce Registration
731
+ add_action ('woocommerce_register_form_end', 'oa_social_login_render_login_form_registration');
732
+
733
+ //WooCommerce Checkout
734
+ add_action ('woocommerce_before_checkout_form', 'oa_social_login_render_custom_form_login');
735
+
736
 
737
  /**
738
  * Display the provider grid for login
761
  //Sidebar Login
762
  add_action ('sidebar_login_widget_logged_out_content_end', 'oa_social_login_render_login_form_login');
763
 
764
+ //WooCommerce Login
765
+ add_action ('woocommerce_login_form_end', 'oa_social_login_render_login_form_login');
766
+
767
 
768
  /**
769
  * Display the provider grid for login - with a specific callback_uri
787
 
788
  //Add our query argument
789
  $args ['callback_uri'] = add_query_arg (array ('oa_social_login_source' => 'login'), $args ['callback_uri']);
790
+
791
+ //Add redirect_to
792
+ if ( ! empty ($_REQUEST['redirect_to']))
793
+ {
794
+ $args ['callback_uri'] = add_query_arg (array ('redirect_to' => urlencode ($_REQUEST['redirect_to'])), $args ['callback_uri']);
795
+ }
796
 
797
+ //Hook to customize the callback uri
798
  $args ['callback_uri'] = apply_filters ('oa_social_login_filter_wp_login_callback_uri', $args ['callback_uri']);
799
  }
800
 
820
  //Display buttons if option not set or enabled
821
  if (!isset ($settings ['plugin_display_in_registration_form']) OR !empty ($settings ['plugin_display_in_registration_form']))
822
  {
823
+ // Bugfix for Social Login being displayed twice on the WooCommerce Registration Form
824
+ if ( ! did_action ('woocommerce_register_form'))
825
+ {
826
+ //Additional arguments for the icon builder
827
+ $args = array ();
828
+
829
+ //Only on the registration page
830
+ if (strpos (oa_social_login_get_current_url (), 'wp-login.php') !== false)
831
+ {
832
+ //This is the default WordPress registration url
833
+ $args ['callback_uri'] = site_url ('wp-login.php?action=register', 'login_post');
834
+
835
+ //Add our query argument
836
+ $args ['callback_uri'] = add_query_arg (array ('oa_social_login_source' => 'registration'), $args ['callback_uri']);
837
+
838
+ //Add redirect_to
839
+ if ( ! empty ($_REQUEST['redirect_to']))
840
+ {
841
+ $args ['callback_uri'] = add_query_arg (array ('redirect_to' => urlencode ($_REQUEST['redirect_to'])), $args ['callback_uri']);
842
+ }
843
+
844
+ //Hook to customize the callback uri
845
+ $args ['callback_uri'] = apply_filters ('oa_social_login_filter_wp_registration_callback_uri', $args ['callback_uri']);
846
+ }
847
+
848
+ echo oa_social_login_render_login_form ('registration', $args);
849
+ }
850
  }
851
  }
852
  }
1144
  </div>
1145
  <form method="post" action="">
1146
  <fieldset>
1147
+ <div class="oa_social_login_input">
1148
  <input type="text" name="oa_social_login_email" class="oa_social_login_confirm_text" value="<?php echo (!empty ($_POST ['oa_social_login_email']) ? oa_social_login_esc_attr ($_POST ['oa_social_login_email']) : ''); ?>" />
1149
  <input type="hidden" name="oa_social_login_action" value="confirm_email" size="30" />
1150
  </div>
1152
  <?php echo $message; ?>
1153
  </div>
1154
  <div class="oa_social_login_buttons">
1155
+ <input class="oa_social_login_button" id="oa_social_login_button_confirm" type="submit" value="<?php _e ('Confirm', 'oa_social_login'); ?>" />
1156
+ <input class="oa_social_login_button" id="oa_social_login_button_cancel" type="button" value="<?php _e ('Cancel', 'oa_social_login'); ?>" onclick="window.location.href='<?php echo esc_url (wp_logout_url (oa_social_login_get_current_url ())); ?>'" />
1157
  </div>
1158
  </fieldset>
1159
  </form>
includes/widget.php CHANGED
@@ -10,7 +10,7 @@ class oa_social_login_widget extends WP_Widget
10
  */
11
  public function __construct ()
12
  {
13
- parent::WP_Widget ('oa_social_login', 'Social Login', array (
14
  'description' => __ ('Allow your visitors to login and register with social networks like Twitter, Facebook, LinkedIn, Hyves, Google and Yahoo.', 'oa_social_login')
15
  ));
16
  }
10
  */
11
  public function __construct ()
12
  {
13
+ parent::__construct ('oa_social_login', 'Social Login', array (
14
  'description' => __ ('Allow your visitors to login and register with social networks like Twitter, Facebook, LinkedIn, Hyves, Google and Yahoo.', 'oa_social_login')
15
  ));
16
  }
oa-social-login.php CHANGED
@@ -3,15 +3,15 @@
3
  Plugin Name: Social Login
4
  Plugin URI: http://www.oneall.com/
5
  Description: Allow your visitors to <strong>comment, login and register with 25+ social networks</strong> like Twitter, Facebook, LinkedIn, Instagram, Вконтакте, Google or Yahoo.
6
- Version: 4.6
7
- Author: OneAll
8
  Author URI: http://www.oneall.com/
9
  License: GPL2
10
  */
11
 
12
  define ('OA_SOCIAL_LOGIN_PLUGIN_URL', plugins_url () . '/' . basename (dirname (__FILE__)));
13
  define ('OA_SOCIAL_LOGIN_BASE_PATH', dirname (plugin_basename (__FILE__)));
14
- define ('OA_SOCIAL_LOGIN_VERSION', '4.6');
15
 
16
  /**
17
  * Check technical requirements before activating the plugin (Wordpress 3.0 or newer required)
3
  Plugin Name: Social Login
4
  Plugin URI: http://www.oneall.com/
5
  Description: Allow your visitors to <strong>comment, login and register with 25+ social networks</strong> like Twitter, Facebook, LinkedIn, Instagram, Вконтакте, Google or Yahoo.
6
+ Version: 5.0
7
+ Author: Claude Schlesser
8
  Author URI: http://www.oneall.com/
9
  License: GPL2
10
  */
11
 
12
  define ('OA_SOCIAL_LOGIN_PLUGIN_URL', plugins_url () . '/' . basename (dirname (__FILE__)));
13
  define ('OA_SOCIAL_LOGIN_BASE_PATH', dirname (plugin_basename (__FILE__)));
14
+ define ('OA_SOCIAL_LOGIN_VERSION', '5.0');
15
 
16
  /**
17
  * Check technical requirements before activating the plugin (Wordpress 3.0 or newer required)
readme.txt CHANGED
@@ -1,16 +1,16 @@
1
  === Social Login ===
2
  Contributors: ClaudeSchlesser
3
- Tags: social login, social connect, facebook, linkedin, livejournal, google, yahoo, twitter, openid, paypal, google, instagram, widget, plugin, social network login, comments
4
  Requires at least: 3.0
5
- Tested up to: 4.2
6
- Stable tag: 4.6
7
 
8
- Allow your visitors to comment and login with 25+ social networks like Facebook, Twitter, Instagram, LinkedIn, Paypal, OpenID, VKontakte, Google, Yahoo ...
9
 
10
  == Description ==
11
 
12
  Social Login is a professionally developed and free Wordpress (BuddyPress compatible) plugin that allows your visitors to comment,
13
- login and register with 25+ Social Networks like for example Facebook, Twitter, Google, LinkedIn, PayPal, LiveJournal, Instagram, Вконтакте and Yahoo.<br /><br />
14
  <strong>Make your blog social!</strong><br />
15
 
16
  <strong>Choose where to add the Social Login Plugin:</strong>
@@ -27,11 +27,13 @@ login and register with 25+ Social Networks like for example Facebook, Twitter,
27
  <li>A login widget that you can easily attach to your sidebar is provided</li>
28
  </ul>
29
 
30
- <strong>Select the Social Networks/Providers:</strong>
31
  <ul>
32
  <li>Amazon</li>
 
33
  <li>Blogger</li>
34
  <li>Disqus</li>
 
35
  <li>Facebook</li>
36
  <li>Foursquare</li>
37
  <li>Github.com</li>
@@ -43,6 +45,8 @@ login and register with 25+ Social Networks like for example Facebook, Twitter,
43
  <li>Odnoklassniki</li>
44
  <li>OpenID</li>
45
  <li>PayPal</li>
 
 
46
  <li>Reddit</li>
47
  <li>Skyrock.com</li>
48
  <li>StackExchange</li>
@@ -61,9 +65,9 @@ login and register with 25+ Social Networks like for example Facebook, Twitter,
61
  <strong>Increase your wordpress/buddypress user engagement in a few simple steps with the Social Login Plugin!</strong>
62
  Our users love it! Check out the <a href="http://wordpress.org/extend/plugins/oa-social-login/other_notes/">testimonials</a>!<br />
63
 
64
- The Social Login Plugin is maintained by <a href="http://www.oneall.com">OneAll</a>, a technology company offering a set of web-delivered
65
  tools and services for establishing and optimizing a site's connection with social networks and identity providers such as Facebook, Twitter,
66
- Google, Yahoo!, LinkedIn, Paypal, Hyves amongst others.
67
 
68
  == Installation ==
69
 
@@ -79,7 +83,6 @@ API calls.
79
 
80
  In order to enable the plugin you must connect with the OneAll API and create a free account at https://app.oneall.com
81
 
82
-
83
  == Frequently Asked Questions ==
84
 
85
  = Do I have to add template tags to my theme? =
@@ -87,11 +90,11 @@ In order to enable the plugin you must connect with the OneAll API and create a
87
  You should not have to change your templates.
88
  The Social Login seamlessly integrates into your blog by using predefined hooks.
89
 
90
- = Does Social Login can be embedded through a shortcode? =
91
 
92
  The Social Login shortcode `[oa_social_login]` can be used in any page or post within your blog.
93
- The shortcode will automatically be replaced by the icons of the chosen
94
- social network providers.
95
 
96
  = I have a custom template and the plugin is not displayed correctly =
97
 
@@ -105,7 +108,7 @@ Do not hesitate to contact us if you need further assistance.
105
 
106
  = My users cannot login or leave comment with VKontakte (Вконтакте) =
107
 
108
- Per default WordPress does not allow to use special characters in usernames.
109
  If you encounter any problems with users having cyrillic characters in their
110
  usernames, please consider installing the following plugin to fix the problem:
111
  <a href="http://wordpress.org/extend/plugins/wordpress-special-characters-in-usernames/">Wordpress Special Characters In Usernames</a>
@@ -119,7 +122,7 @@ It should work out of the box.
119
  = Where can I report bugs, leave my feedback and get support? =
120
 
121
  Our team answers your questions at:<br />
122
- http://www.oneall.com/company/contact-us/
123
 
124
  The plugin documentation is available at:<br />
125
  http://docs.oneall.com/plugins/guide/social-login-wordpress/
@@ -134,6 +137,15 @@ http://docs.oneall.com/plugins/guide/social-login-wordpress/
134
 
135
  == Changelog ==
136
 
 
 
 
 
 
 
 
 
 
137
  = 4.6 =
138
  * Asynchronous JavaScript
139
  * Social Network "Instagram" added
@@ -299,6 +311,10 @@ http://docs.oneall.com/plugins/guide/social-login-wordpress/
299
 
300
  <strong>Used by thousands of users around the world!</strong>
301
 
 
 
 
 
302
  <em>Loving the service, seen a massive increase in painless signups to my blog. Thanks!</em>
303
  <strong>Richard B.</strong>
304
 
1
  === Social Login ===
2
  Contributors: ClaudeSchlesser
3
+ Tags: social login, social connect, facebook, linkedin, livejournal, google, yahoo, twitter, openid, pinterest, paypal, google, instagram, widget, plugin, social network login, comments
4
  Requires at least: 3.0
5
+ Tested up to: 4.5
6
+ Stable tag: 5.0
7
 
8
+ Allow your visitors to comment and login with social networks like Twitter, Facebook, Paypal, LinkedIn, Instagram, OpenID, VKontakte, Google, Pinterest
9
 
10
  == Description ==
11
 
12
  Social Login is a professionally developed and free Wordpress (BuddyPress compatible) plugin that allows your visitors to comment,
13
+ login and register with 30+ Social Networks like for example Facebook, Twitter, Google, LinkedIn, PayPal, LiveJournal, Instagram, Вконтакте and Yahoo.<br /><br />
14
  <strong>Make your blog social!</strong><br />
15
 
16
  <strong>Choose where to add the Social Login Plugin:</strong>
27
  <li>A login widget that you can easily attach to your sidebar is provided</li>
28
  </ul>
29
 
30
+ <strong>30+ Social Networks Availabe!</strong>
31
  <ul>
32
  <li>Amazon</li>
33
+ <li>Battle.net</li>
34
  <li>Blogger</li>
35
  <li>Disqus</li>
36
+ <li>Dribbble</li>
37
  <li>Facebook</li>
38
  <li>Foursquare</li>
39
  <li>Github.com</li>
45
  <li>Odnoklassniki</li>
46
  <li>OpenID</li>
47
  <li>PayPal</li>
48
+ <li>Pinterest</li>
49
+ <li>PixelPin</li>
50
  <li>Reddit</li>
51
  <li>Skyrock.com</li>
52
  <li>StackExchange</li>
65
  <strong>Increase your wordpress/buddypress user engagement in a few simple steps with the Social Login Plugin!</strong>
66
  Our users love it! Check out the <a href="http://wordpress.org/extend/plugins/oa-social-login/other_notes/">testimonials</a>!<br />
67
 
68
+ Social Login is maintained by <a href="http://www.oneall.com">OneAll</a>, a technology company offering a set of web-delivered
69
  tools and services for establishing and optimizing a site's connection with social networks and identity providers such as Facebook, Twitter,
70
+ Google, Yahoo!, LinkedIn, Paypal, Instagram amongst others.
71
 
72
  == Installation ==
73
 
83
 
84
  In order to enable the plugin you must connect with the OneAll API and create a free account at https://app.oneall.com
85
 
 
86
  == Frequently Asked Questions ==
87
 
88
  = Do I have to add template tags to my theme? =
90
  You should not have to change your templates.
91
  The Social Login seamlessly integrates into your blog by using predefined hooks.
92
 
93
+ = Can Social Login be embedded through a shortcode? =
94
 
95
  The Social Login shortcode `[oa_social_login]` can be used in any page or post within your blog.
96
+ The shortcode will automatically be replaced by the icons of the social networks that you have
97
+ enabled in the Social Login settings in your WordPress administration area.
98
 
99
  = I have a custom template and the plugin is not displayed correctly =
100
 
108
 
109
  = My users cannot login or leave comment with VKontakte (Вконтакте) =
110
 
111
+ Per default WordPress does not allow the use of special characters in usernames.
112
  If you encounter any problems with users having cyrillic characters in their
113
  usernames, please consider installing the following plugin to fix the problem:
114
  <a href="http://wordpress.org/extend/plugins/wordpress-special-characters-in-usernames/">Wordpress Special Characters In Usernames</a>
122
  = Where can I report bugs, leave my feedback and get support? =
123
 
124
  Our team answers your questions at:<br />
125
+ http://support.oneall.com/forums/
126
 
127
  The plugin documentation is available at:<br />
128
  http://docs.oneall.com/plugins/guide/social-login-wordpress/
137
 
138
  == Changelog ==
139
 
140
+ = 5.0 =
141
+ * Social Network "Battle.net" added
142
+ * Social Link Hooks/Nonce added
143
+ * WooCommerce Actions added
144
+ * Login/Registration URL filters added
145
+ * Cache bug fixed
146
+ * WooCommerce Social Login Twice on Register Form
147
+ * Some minor bugs fixed
148
+
149
  = 4.6 =
150
  * Asynchronous JavaScript
151
  * Social Network "Instagram" added
311
 
312
  <strong>Used by thousands of users around the world!</strong>
313
 
314
+ <em>The plugin in is one of the best I've seen so far. Extremely easy to implement and run. The support is great too.
315
+ No concerns on my side. Keep it up!</em>
316
+ <strong>livia</strong>
317
+
318
  <em>Loving the service, seen a massive increase in painless signups to my blog. Thanks!</em>
319
  <strong>Richard B.</strong>
320