Version Description
- Hook for BuddyPress Registration added
- Hook for BuddyPress Sidebar added
- Hook for Appthemes Vantage Theme added
- Filter for email addresses of new users added
- Admin page width fixed
- Minor text changes
- Identity Provider "Blogger" added
- Identity Provider "Disqus" added
Download this release
Release Info
Developer | ClaudeSchlesser |
Plugin | Social Login |
Version | 3.7 |
Comparing to | |
See all releases |
Code changes from version 3.6 to 3.7
- assets/css/admin.css +9 -9
- assets/img/provider_sprite_35_35.png +0 -0
- filters.txt +38 -0
- includes/admin.php +8 -8
- includes/communication.php +45 -39
- includes/settings.php +60 -54
- includes/toolbox.php +4 -4
- includes/user_interface.php +26 -23
- includes/widget.php +1 -1
- languages/oa_social_login-de_DE.mo +0 -0
- languages/oa_social_login-de_DE.po +26 -22
- oa-social-login.php +2 -2
- readme.txt +19 -4
assets/css/admin.css
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/* ********************* Page Wrapper */
|
2 |
#oa_social_login_page {
|
3 |
-
width:
|
4 |
}
|
5 |
|
6 |
/* ********************* Boxes */
|
@@ -56,8 +56,7 @@
|
|
56 |
margin: 0 0 25px;
|
57 |
}
|
58 |
|
59 |
-
.oa_social_login_table textarea
|
60 |
-
.oa_social_login_table input {
|
61 |
border-color: #aaa;
|
62 |
}
|
63 |
|
@@ -78,15 +77,13 @@
|
|
78 |
text-decoration: none;
|
79 |
}
|
80 |
|
81 |
-
.oa_social_login_table tr.row_odd
|
82 |
-
.oa_social_login_table tr.row_odd td {
|
83 |
color: #222;
|
84 |
background-color: #ddd;
|
85 |
border-bottom: 1px dotted #BBBBBB;
|
86 |
}
|
87 |
|
88 |
-
.oa_social_login_table tr.row_even
|
89 |
-
.oa_social_login_table tr.row_even td {
|
90 |
color: #333;
|
91 |
background-color: #fff;
|
92 |
border-bottom: 1px dotted #bbb;
|
@@ -107,8 +104,7 @@
|
|
107 |
font-weight: bold;
|
108 |
}
|
109 |
|
110 |
-
.oa_social_login_table tr.row_foot .error_message
|
111 |
-
.oa_social_login_table tr.row_foot .error_message a {
|
112 |
color: red;
|
113 |
font-weight: bold;
|
114 |
}
|
@@ -230,4 +226,8 @@
|
|
230 |
|
231 |
.oa_social_login_provider.oa_social_login_provider_github {
|
232 |
background-position: -927px -1px;
|
|
|
|
|
|
|
|
|
233 |
}
|
1 |
/* ********************* Page Wrapper */
|
2 |
#oa_social_login_page {
|
3 |
+
width: 800px;
|
4 |
}
|
5 |
|
6 |
/* ********************* Boxes */
|
56 |
margin: 0 0 25px;
|
57 |
}
|
58 |
|
59 |
+
.oa_social_login_table textarea,.oa_social_login_table input {
|
|
|
60 |
border-color: #aaa;
|
61 |
}
|
62 |
|
77 |
text-decoration: none;
|
78 |
}
|
79 |
|
80 |
+
.oa_social_login_table tr.row_odd,.oa_social_login_table tr.row_odd td {
|
|
|
81 |
color: #222;
|
82 |
background-color: #ddd;
|
83 |
border-bottom: 1px dotted #BBBBBB;
|
84 |
}
|
85 |
|
86 |
+
.oa_social_login_table tr.row_even,.oa_social_login_table tr.row_even td {
|
|
|
87 |
color: #333;
|
88 |
background-color: #fff;
|
89 |
border-bottom: 1px dotted #bbb;
|
104 |
font-weight: bold;
|
105 |
}
|
106 |
|
107 |
+
.oa_social_login_table tr.row_foot .error_message,.oa_social_login_table tr.row_foot .error_message a {
|
|
|
108 |
color: red;
|
109 |
font-weight: bold;
|
110 |
}
|
226 |
|
227 |
.oa_social_login_provider.oa_social_login_provider_github {
|
228 |
background-position: -927px -1px;
|
229 |
+
}
|
230 |
+
|
231 |
+
.oa_social_login_provider.oa_social_login_provider_disqus {
|
232 |
+
background-position: -964px -1px;
|
233 |
}
|
assets/img/provider_sprite_35_35.png
CHANGED
Binary file
|
filters.txt
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
********************************************************************************
|
2 |
+
* Example for using your own CSS
|
3 |
+
********************************************************************************
|
4 |
+
|
5 |
+
Add this code to the end of the functions.php file of your WordPress theme.
|
6 |
+
By doing so your changes will not be overwritten when you install a new version of Social Login.
|
7 |
+
Replace the URL in the example by an URL to your own CSS Stylesheet
|
8 |
+
|
9 |
+
|
10 |
+
function oa_social_login_set_custom_css($css_theme_uri)
|
11 |
+
{
|
12 |
+
//Added to use custom CSS
|
13 |
+
$css_theme_uri = 'http://public.oneallcdn.com/css/api/socialize/themes/buildin/connect/large-v1.css';
|
14 |
+
|
15 |
+
//Done
|
16 |
+
return $css_theme_uri;
|
17 |
+
}
|
18 |
+
add_filter('oa_social_login_default_css', 'oa_social_login_set_custom_css');
|
19 |
+
add_filter('oa_social_login_widget_css', 'oa_social_login_set_custom_css');
|
20 |
+
|
21 |
+
|
22 |
+
********************************************************************************
|
23 |
+
* Example for restricting access for email addresses of a specific domain
|
24 |
+
********************************************************************************
|
25 |
+
|
26 |
+
Add this code to the end of the functions.php file of your WordPress theme.
|
27 |
+
By doing so your changes will not be overwritten when you install a new version of Social Login.
|
28 |
+
|
29 |
+
function oa_social_login_filter_new_user_email ($user_email)
|
30 |
+
{
|
31 |
+
//Only users with social network accounts having an email address ending in @gmail.com my register
|
32 |
+
if ( ! preg_match ('/@gmail\.com$/i', trim ($user_email)))
|
33 |
+
{
|
34 |
+
return 'disallowed';
|
35 |
+
}
|
36 |
+
return $user_email;
|
37 |
+
}
|
38 |
+
add_filter('oa_social_login_filter_new_user_email', 'oa_social_login_filter_new_user_email');
|
includes/admin.php
CHANGED
@@ -551,8 +551,8 @@ function oa_display_social_login_setup ()
|
|
551 |
{
|
552 |
?>
|
553 |
<p>
|
554 |
-
<?php _e ('Allow your visitors to comment, login and register with
|
555 |
-
<strong><?php _e ('Draw a larger audience and increase user engagement in a few simple steps.', 'oa_social_login'); ?> </strong>
|
556 |
</p>
|
557 |
<div class="oa_social_login_box" id="oa_social_login_box_status">
|
558 |
<div class="oa_social_login_box_title">
|
@@ -561,13 +561,13 @@ function oa_display_social_login_setup ()
|
|
561 |
<p>
|
562 |
<?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>'); ?>
|
563 |
<?php _e ('After having created your account and setup your Site, please enter the Site settings in the form below.', 'oa_social_login'); ?>
|
564 |
-
<?php _e ("Don't worry the setup only
|
565 |
</p>
|
566 |
<p>
|
567 |
<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>
|
568 |
</p>
|
569 |
<h3>
|
570 |
-
<?php printf (__ ('You are in good company! This plugin is used on more than %s websites!', 'oa_social_login'), '
|
571 |
</h3>
|
572 |
</div>
|
573 |
<?php
|
@@ -598,7 +598,7 @@ function oa_display_social_login_setup ()
|
|
598 |
<li><?php printf (__ ('<a target="_blank" href="%s">Follow us on Twitter</a> to stay informed about updates', 'oa_social_login'), 'http://www.twitter.com/oneall'); ?>;</li>
|
599 |
<li><?php printf (__ ('<a target="_blank" href="%s">Read the online documentation</a> for more information about this plugin', 'oa_social_login'), 'http://docs.oneall.com/plugins/guide/social-login-wordpress/'); ?>;</li>
|
600 |
<li><?php printf (__ ('<a target="_blank" href="%s">Contact us</a> if you have feedback or need assistance', 'oa_social_login'), 'http://www.oneall.com/company/contact-us/'); ?>.
|
601 |
-
<li><?php printf (__ ('We also have plugins for <a target="_blank" href="%s">Drupal and Joomla</a> amongst others', 'oa_social_login'), 'http://docs.oneall.com/plugins/'); ?>.
|
602 |
</li>
|
603 |
</ul>
|
604 |
</div>
|
@@ -832,14 +832,14 @@ function oa_display_social_login_settings ()
|
|
832 |
</tr>
|
833 |
<tr class="row_odd">
|
834 |
<td>
|
835 |
-
<strong><?php _e ('Do you want to receive an email
|
836 |
</td>
|
837 |
</tr>
|
838 |
<tr class="row_even">
|
839 |
<td>
|
840 |
<?php $plugin_notify_admin = (!isset ($settings['plugin_notify_admin']) OR $settings['plugin_notify_admin'] == '1'); ?>
|
841 |
-
<input type="radio" name="oa_social_login_settings[plugin_notify_admin]" value="1" <?php echo ($plugin_notify_admin ? 'checked="checked"' : ''); ?> /> <?php _e ('Yes, send me an email
|
842 |
-
<input type="radio" name="oa_social_login_settings[plugin_notify_admin]" value="0" <?php echo (!$plugin_notify_admin ? 'checked="checked"' : ''); ?> /> <?php _e ('No, do not send me
|
843 |
</td>
|
844 |
</tr>
|
845 |
</table>
|
551 |
{
|
552 |
?>
|
553 |
<p>
|
554 |
+
<?php _e ('Allow your visitors to comment, login and register with 20+ Social Networks like for example Twitter, Facebook, LinkedIn, Hyves, VKontakte, Google or Yahoo.', 'oa_social_login'); ?>
|
555 |
+
<strong><?php _e ('Draw a larger audience and increase your user engagement in a few simple steps.', 'oa_social_login'); ?> </strong>
|
556 |
</p>
|
557 |
<div class="oa_social_login_box" id="oa_social_login_box_status">
|
558 |
<div class="oa_social_login_box_title">
|
561 |
<p>
|
562 |
<?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>'); ?>
|
563 |
<?php _e ('After having created your account and setup your Site, please enter the Site settings in the form below.', 'oa_social_login'); ?>
|
564 |
+
<?php _e ("Don't worry the setup takes only a couple of minutes!", 'oa_social_login'); ?>
|
565 |
</p>
|
566 |
<p>
|
567 |
<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>
|
568 |
</p>
|
569 |
<h3>
|
570 |
+
<?php printf (__ ('You are in good company! This plugin is used on more than %s websites!', 'oa_social_login'), '50,000'); ?>
|
571 |
</h3>
|
572 |
</div>
|
573 |
<?php
|
598 |
<li><?php printf (__ ('<a target="_blank" href="%s">Follow us on Twitter</a> to stay informed about updates', 'oa_social_login'), 'http://www.twitter.com/oneall'); ?>;</li>
|
599 |
<li><?php printf (__ ('<a target="_blank" href="%s">Read the online documentation</a> for more information about this plugin', 'oa_social_login'), 'http://docs.oneall.com/plugins/guide/social-login-wordpress/'); ?>;</li>
|
600 |
<li><?php printf (__ ('<a target="_blank" href="%s">Contact us</a> if you have feedback or need assistance', 'oa_social_login'), 'http://www.oneall.com/company/contact-us/'); ?>.
|
601 |
+
<li><?php printf (__ ('We also have turnkey plugins for <a target="_blank" href="%s">Drupal, phpBB and Joomla</a> amongst others', 'oa_social_login'), 'http://docs.oneall.com/plugins/'); ?>.
|
602 |
</li>
|
603 |
</ul>
|
604 |
</div>
|
832 |
</tr>
|
833 |
<tr class="row_odd">
|
834 |
<td>
|
835 |
+
<strong><?php _e ('Do you want to receive an email whenever a new user registers with Social Login ?', 'oa_social_login'); ?></strong>
|
836 |
</td>
|
837 |
</tr>
|
838 |
<tr class="row_even">
|
839 |
<td>
|
840 |
<?php $plugin_notify_admin = (!isset ($settings['plugin_notify_admin']) OR $settings['plugin_notify_admin'] == '1'); ?>
|
841 |
+
<input type="radio" name="oa_social_login_settings[plugin_notify_admin]" value="1" <?php echo ($plugin_notify_admin ? 'checked="checked"' : ''); ?> /> <?php _e ('Yes, send me an email whenever a new user registers with Social Login', 'oa_social_login'); ?> <strong>(<?php _e ('Default', 'oa_social_login') ?>)</strong><br />
|
842 |
+
<input type="radio" name="oa_social_login_settings[plugin_notify_admin]" value="0" <?php echo (!$plugin_notify_admin ? 'checked="checked"' : ''); ?> /> <?php _e ('No, do not send me any emails', 'oa_social_login'); ?>
|
843 |
</td>
|
844 |
</tr>
|
845 |
</table>
|
includes/communication.php
CHANGED
@@ -13,13 +13,13 @@ function oa_social_login_callback ()
|
|
13 |
|
14 |
//API Settings
|
15 |
$api_connection_handler = ((!empty ($settings ['api_connection_handler']) AND $settings ['api_connection_handler'] == 'fsockopen') ? 'fsockopen' : 'curl');
|
16 |
-
$api_connection_use_https = ((!isset ($settings['api_connection_use_https']) OR $settings['api_connection_use_https'] == '1') ? true : false);
|
17 |
|
18 |
$api_subdomain = (!empty ($settings ['api_subdomain']) ? $settings ['api_subdomain'] : '');
|
19 |
$api_key = (!empty ($settings ['api_key']) ? $settings ['api_key'] : '');
|
20 |
$api_secret = (!empty ($settings ['api_secret']) ? $settings ['api_secret'] : '');
|
21 |
|
22 |
-
$api_resource_url = ($api_connection_use_https ? 'https' : 'http').'://' . $api_subdomain . '.api.oneall.com/connections/' . $_POST ['connection_token'] . '.json';
|
23 |
|
24 |
//Get connection details
|
25 |
$result = oa_social_login_do_api_request ($api_connection_handler, $api_resource_url, array ('api_key' => $api_key, 'api_secret' => $api_secret), 15);
|
@@ -168,8 +168,8 @@ function oa_social_login_callback ()
|
|
168 |
update_user_meta ($user_id, 'oa_social_login_user_thumbnail', $user_thumbnail);
|
169 |
}
|
170 |
|
171 |
-
wp_cache_delete($user_id, 'users');
|
172 |
-
wp_cache_delete($user_login, 'userlogins');
|
173 |
}
|
174 |
}
|
175 |
}
|
@@ -198,6 +198,13 @@ function oa_social_login_callback ()
|
|
198 |
while (username_exists ($user_login_tmp));
|
199 |
$user_login = $user_login_tmp;
|
200 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
|
202 |
//Email must be unique
|
203 |
$placeholder_email_used = false;
|
@@ -234,7 +241,7 @@ function oa_social_login_callback ()
|
|
234 |
}
|
235 |
|
236 |
//Email is required
|
237 |
-
if (
|
238 |
{
|
239 |
//We don't have the real email
|
240 |
if ($placeholder_email_used)
|
@@ -244,14 +251,14 @@ function oa_social_login_callback ()
|
|
244 |
}
|
245 |
|
246 |
//Notify Administrator
|
247 |
-
if (
|
248 |
{
|
249 |
-
oa_social_login_user_notification($user_id, $user_identity_provider);
|
250 |
}
|
251 |
|
252 |
-
wp_cache_delete($user_id, 'users');
|
253 |
-
wp_cache_delete($user_login, 'userlogins');
|
254 |
-
do_action('user_register', $user_id);
|
255 |
}
|
256 |
}
|
257 |
|
@@ -260,9 +267,9 @@ function oa_social_login_callback ()
|
|
260 |
if ($user_data !== false)
|
261 |
{
|
262 |
//Setup Cookie
|
263 |
-
wp_clear_auth_cookie();
|
264 |
wp_set_auth_cookie ($user_data->ID, true);
|
265 |
-
do_action('wp_login', $user_data->user_login, $user_data);
|
266 |
|
267 |
//Where did the user come from?
|
268 |
$oa_social_login_source = (!empty ($_REQUEST ['oa_social_login_source']) ? strtolower (trim ($_REQUEST ['oa_social_login_source'])) : '');
|
@@ -275,8 +282,7 @@ function oa_social_login_callback ()
|
|
275 |
{
|
276 |
//*************** Registration ***************
|
277 |
case 'registration':
|
278 |
-
|
279 |
-
//Default redirection
|
280 |
$redirect_to = admin_url ();
|
281 |
|
282 |
//Redirection customized
|
@@ -287,7 +293,7 @@ function oa_social_login_callback ()
|
|
287 |
//Homepage
|
288 |
case 'homepage':
|
289 |
$redirect_to = home_url ();
|
290 |
-
|
291 |
|
292 |
//Custom
|
293 |
case 'custom':
|
@@ -295,21 +301,21 @@ function oa_social_login_callback ()
|
|
295 |
{
|
296 |
$redirect_to = trim ($settings ['plugin_registration_form_redirect_custom_url']);
|
297 |
}
|
298 |
-
|
299 |
|
300 |
//Default/Dashboard
|
301 |
default:
|
302 |
case 'dashboard':
|
303 |
$redirect_to = admin_url ();
|
304 |
-
|
305 |
}
|
306 |
}
|
307 |
-
|
308 |
|
309 |
|
310 |
//*************** Login ***************
|
311 |
case 'login':
|
312 |
-
|
313 |
$redirect_to = home_url ();
|
314 |
|
315 |
//Redirection in URL
|
@@ -328,7 +334,7 @@ function oa_social_login_callback ()
|
|
328 |
//Dashboard
|
329 |
case 'dashboard':
|
330 |
$redirect_to = admin_url ();
|
331 |
-
|
332 |
|
333 |
//Custom
|
334 |
case 'custom':
|
@@ -336,63 +342,63 @@ function oa_social_login_callback ()
|
|
336 |
{
|
337 |
$redirect_to = trim ($settings ['plugin_login_form_redirect_custom_url']);
|
338 |
}
|
339 |
-
|
340 |
|
341 |
//Default/Homepage
|
342 |
default:
|
343 |
case 'homepage':
|
344 |
$redirect_to = home_url ();
|
345 |
-
|
346 |
}
|
347 |
}
|
348 |
}
|
349 |
-
|
350 |
|
351 |
// *************** Comments ***************
|
352 |
case 'comments':
|
353 |
$redirect_to = oa_social_login_get_current_url () . '#comments';
|
354 |
-
|
355 |
|
356 |
//*************** Widget/Shortcode ***************
|
357 |
default:
|
358 |
case 'widget':
|
359 |
case 'shortcode':
|
360 |
-
|
361 |
$opt_key = ($new_registration === true ? 'register' : 'login');
|
362 |
|
363 |
//Default value
|
364 |
$redirect_to = oa_social_login_get_current_url ();
|
365 |
|
366 |
//Redirection customized
|
367 |
-
if (isset ($settings['plugin_shortcode_' . $opt_key . '_redirect']))
|
368 |
{
|
369 |
-
switch (strtolower ($settings['plugin_shortcode_' . $opt_key . '_redirect']))
|
370 |
{
|
371 |
//Current
|
372 |
case 'current':
|
373 |
$redirect_to = oa_social_login_get_current_url ();
|
374 |
-
|
375 |
|
376 |
//Homepage
|
377 |
case 'homepage':
|
378 |
$redirect_to = home_url ();
|
379 |
-
|
380 |
|
381 |
//Dashboard
|
382 |
case 'dashboard':
|
383 |
$redirect_to = admin_url ();
|
384 |
-
|
385 |
|
386 |
//Custom
|
387 |
case 'custom':
|
388 |
-
if (isset ($settings['plugin_shortcode_' . $opt_key . '_redirect_url']) AND strlen (trim ($settings['plugin_shortcode_' . $opt_key . '_redirect_url'])) > 0)
|
389 |
{
|
390 |
-
$redirect_to = trim ($settings['plugin_shortcode_' . $opt_key . '_redirect_url']);
|
391 |
}
|
392 |
-
|
393 |
}
|
394 |
}
|
395 |
-
|
396 |
}
|
397 |
|
398 |
//Check if url set
|
@@ -441,7 +447,7 @@ function oa_social_login_do_api_request ($handler, $url, $options = array (), $t
|
|
441 |
*/
|
442 |
function oa_social_login_check_fsockopen ($secure = true)
|
443 |
{
|
444 |
-
$result = oa_social_login_fsockopen_request (($secure ? 'https' : 'http') .'://www.oneall.com/ping.html');
|
445 |
if (is_object ($result) AND property_exists ($result, 'http_code') AND $result->http_code == 200)
|
446 |
{
|
447 |
if (property_exists ($result, 'http_data'))
|
@@ -461,9 +467,9 @@ function oa_social_login_check_fsockopen ($secure = true)
|
|
461 |
*/
|
462 |
function oa_social_login_check_curl ($secure = true)
|
463 |
{
|
464 |
-
if (in_array ('curl', get_loaded_extensions ()) AND function_exists('curl_exec'))
|
465 |
{
|
466 |
-
$result = oa_social_login_curl_request (($secure ? 'https' : 'http') .'://www.oneall.com/ping.html');
|
467 |
if (is_object ($result) AND property_exists ($result, 'http_code') AND $result->http_code == 200)
|
468 |
{
|
469 |
if (property_exists ($result, 'http_data'))
|
@@ -496,7 +502,7 @@ function oa_social_login_curl_request ($url, $options = array (), $timeout = 10)
|
|
496 |
curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1);
|
497 |
curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, 0);
|
498 |
curl_setopt ($curl, CURLOPT_SSL_VERIFYHOST, 0);
|
499 |
-
curl_setopt ($curl, CURLOPT_USERAGENT, 'SocialLogin '.OA_SOCIAL_LOGIN_VERSION.'WP (+http://www.oneall.com/)');
|
500 |
|
501 |
// BASIC AUTH?
|
502 |
if (isset ($options ['api_key']) AND isset ($options ['api_secret']))
|
@@ -582,7 +588,7 @@ function oa_social_login_fsockopen_request ($url, $options = array (), $timeout
|
|
582 |
//Create HTTP request
|
583 |
$defaults = array (
|
584 |
'Host' => "Host: $host",
|
585 |
-
'User-Agent' => 'User-Agent: SocialLogin '.OA_SOCIAL_LOGIN_VERSION.'WP (+http://www.oneall.com/)'
|
586 |
);
|
587 |
|
588 |
// BASIC AUTH?
|
13 |
|
14 |
//API Settings
|
15 |
$api_connection_handler = ((!empty ($settings ['api_connection_handler']) AND $settings ['api_connection_handler'] == 'fsockopen') ? 'fsockopen' : 'curl');
|
16 |
+
$api_connection_use_https = ((!isset ($settings ['api_connection_use_https']) OR $settings ['api_connection_use_https'] == '1') ? true : false);
|
17 |
|
18 |
$api_subdomain = (!empty ($settings ['api_subdomain']) ? $settings ['api_subdomain'] : '');
|
19 |
$api_key = (!empty ($settings ['api_key']) ? $settings ['api_key'] : '');
|
20 |
$api_secret = (!empty ($settings ['api_secret']) ? $settings ['api_secret'] : '');
|
21 |
|
22 |
+
$api_resource_url = ($api_connection_use_https ? 'https' : 'http') . '://' . $api_subdomain . '.api.oneall.com/connections/' . $_POST ['connection_token'] . '.json';
|
23 |
|
24 |
//Get connection details
|
25 |
$result = oa_social_login_do_api_request ($api_connection_handler, $api_resource_url, array ('api_key' => $api_key, 'api_secret' => $api_secret), 15);
|
168 |
update_user_meta ($user_id, 'oa_social_login_user_thumbnail', $user_thumbnail);
|
169 |
}
|
170 |
|
171 |
+
wp_cache_delete ($user_id, 'users');
|
172 |
+
wp_cache_delete ($user_login, 'userlogins');
|
173 |
}
|
174 |
}
|
175 |
}
|
198 |
while (username_exists ($user_login_tmp));
|
199 |
$user_login = $user_login_tmp;
|
200 |
}
|
201 |
+
|
202 |
+
//Email Restriction
|
203 |
+
$user_email = apply_filters ('oa_social_login_filter_new_user_email', $user_email);
|
204 |
+
if ($user_email === 'disallowed')
|
205 |
+
{
|
206 |
+
trigger_error (__('This Social Network account may not be used to register', 'oa_social_login'), E_USER_ERROR);
|
207 |
+
}
|
208 |
|
209 |
//Email must be unique
|
210 |
$placeholder_email_used = false;
|
241 |
}
|
242 |
|
243 |
//Email is required
|
244 |
+
if (!empty ($settings ['plugin_require_email']))
|
245 |
{
|
246 |
//We don't have the real email
|
247 |
if ($placeholder_email_used)
|
251 |
}
|
252 |
|
253 |
//Notify Administrator
|
254 |
+
if (!empty ($settings ['plugin_notify_admin']))
|
255 |
{
|
256 |
+
oa_social_login_user_notification ($user_id, $user_identity_provider);
|
257 |
}
|
258 |
|
259 |
+
wp_cache_delete ($user_id, 'users');
|
260 |
+
wp_cache_delete ($user_login, 'userlogins');
|
261 |
+
do_action ('user_register', $user_id);
|
262 |
}
|
263 |
}
|
264 |
|
267 |
if ($user_data !== false)
|
268 |
{
|
269 |
//Setup Cookie
|
270 |
+
wp_clear_auth_cookie ();
|
271 |
wp_set_auth_cookie ($user_data->ID, true);
|
272 |
+
do_action ('wp_login', $user_data->user_login, $user_data);
|
273 |
|
274 |
//Where did the user come from?
|
275 |
$oa_social_login_source = (!empty ($_REQUEST ['oa_social_login_source']) ? strtolower (trim ($_REQUEST ['oa_social_login_source'])) : '');
|
282 |
{
|
283 |
//*************** Registration ***************
|
284 |
case 'registration':
|
285 |
+
//Default redirection
|
|
|
286 |
$redirect_to = admin_url ();
|
287 |
|
288 |
//Redirection customized
|
293 |
//Homepage
|
294 |
case 'homepage':
|
295 |
$redirect_to = home_url ();
|
296 |
+
break;
|
297 |
|
298 |
//Custom
|
299 |
case 'custom':
|
301 |
{
|
302 |
$redirect_to = trim ($settings ['plugin_registration_form_redirect_custom_url']);
|
303 |
}
|
304 |
+
break;
|
305 |
|
306 |
//Default/Dashboard
|
307 |
default:
|
308 |
case 'dashboard':
|
309 |
$redirect_to = admin_url ();
|
310 |
+
break;
|
311 |
}
|
312 |
}
|
313 |
+
break;
|
314 |
|
315 |
|
316 |
//*************** Login ***************
|
317 |
case 'login':
|
318 |
+
//Default redirection
|
319 |
$redirect_to = home_url ();
|
320 |
|
321 |
//Redirection in URL
|
334 |
//Dashboard
|
335 |
case 'dashboard':
|
336 |
$redirect_to = admin_url ();
|
337 |
+
break;
|
338 |
|
339 |
//Custom
|
340 |
case 'custom':
|
342 |
{
|
343 |
$redirect_to = trim ($settings ['plugin_login_form_redirect_custom_url']);
|
344 |
}
|
345 |
+
break;
|
346 |
|
347 |
//Default/Homepage
|
348 |
default:
|
349 |
case 'homepage':
|
350 |
$redirect_to = home_url ();
|
351 |
+
break;
|
352 |
}
|
353 |
}
|
354 |
}
|
355 |
+
break;
|
356 |
|
357 |
// *************** Comments ***************
|
358 |
case 'comments':
|
359 |
$redirect_to = oa_social_login_get_current_url () . '#comments';
|
360 |
+
break;
|
361 |
|
362 |
//*************** Widget/Shortcode ***************
|
363 |
default:
|
364 |
case 'widget':
|
365 |
case 'shortcode':
|
366 |
+
// This is a new user
|
367 |
$opt_key = ($new_registration === true ? 'register' : 'login');
|
368 |
|
369 |
//Default value
|
370 |
$redirect_to = oa_social_login_get_current_url ();
|
371 |
|
372 |
//Redirection customized
|
373 |
+
if (isset ($settings ['plugin_shortcode_' . $opt_key . '_redirect']))
|
374 |
{
|
375 |
+
switch (strtolower ($settings ['plugin_shortcode_' . $opt_key . '_redirect']))
|
376 |
{
|
377 |
//Current
|
378 |
case 'current':
|
379 |
$redirect_to = oa_social_login_get_current_url ();
|
380 |
+
break;
|
381 |
|
382 |
//Homepage
|
383 |
case 'homepage':
|
384 |
$redirect_to = home_url ();
|
385 |
+
break;
|
386 |
|
387 |
//Dashboard
|
388 |
case 'dashboard':
|
389 |
$redirect_to = admin_url ();
|
390 |
+
break;
|
391 |
|
392 |
//Custom
|
393 |
case 'custom':
|
394 |
+
if (isset ($settings ['plugin_shortcode_' . $opt_key . '_redirect_url']) AND strlen (trim ($settings ['plugin_shortcode_' . $opt_key . '_redirect_url'])) > 0)
|
395 |
{
|
396 |
+
$redirect_to = trim ($settings ['plugin_shortcode_' . $opt_key . '_redirect_url']);
|
397 |
}
|
398 |
+
break;
|
399 |
}
|
400 |
}
|
401 |
+
break;
|
402 |
}
|
403 |
|
404 |
//Check if url set
|
447 |
*/
|
448 |
function oa_social_login_check_fsockopen ($secure = true)
|
449 |
{
|
450 |
+
$result = oa_social_login_fsockopen_request (($secure ? 'https' : 'http') . '://www.oneall.com/ping.html');
|
451 |
if (is_object ($result) AND property_exists ($result, 'http_code') AND $result->http_code == 200)
|
452 |
{
|
453 |
if (property_exists ($result, 'http_data'))
|
467 |
*/
|
468 |
function oa_social_login_check_curl ($secure = true)
|
469 |
{
|
470 |
+
if (in_array ('curl', get_loaded_extensions ()) AND function_exists ('curl_exec'))
|
471 |
{
|
472 |
+
$result = oa_social_login_curl_request (($secure ? 'https' : 'http') . '://www.oneall.com/ping.html');
|
473 |
if (is_object ($result) AND property_exists ($result, 'http_code') AND $result->http_code == 200)
|
474 |
{
|
475 |
if (property_exists ($result, 'http_data'))
|
502 |
curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1);
|
503 |
curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, 0);
|
504 |
curl_setopt ($curl, CURLOPT_SSL_VERIFYHOST, 0);
|
505 |
+
curl_setopt ($curl, CURLOPT_USERAGENT, 'SocialLogin ' . OA_SOCIAL_LOGIN_VERSION . 'WP (+http://www.oneall.com/)');
|
506 |
|
507 |
// BASIC AUTH?
|
508 |
if (isset ($options ['api_key']) AND isset ($options ['api_secret']))
|
588 |
//Create HTTP request
|
589 |
$defaults = array (
|
590 |
'Host' => "Host: $host",
|
591 |
+
'User-Agent' => 'User-Agent: SocialLogin ' . OA_SOCIAL_LOGIN_VERSION . 'WP (+http://www.oneall.com/)'
|
592 |
);
|
593 |
|
594 |
// BASIC AUTH?
|
includes/settings.php
CHANGED
@@ -4,59 +4,65 @@
|
|
4 |
* Providers that are currently enabled
|
5 |
*/
|
6 |
$oa_social_login_providers = array (
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
);
|
62 |
|
4 |
* Providers that are currently enabled
|
5 |
*/
|
6 |
$oa_social_login_providers = array (
|
7 |
+
'facebook' => array (
|
8 |
+
'name' => 'Facebook'
|
9 |
+
),
|
10 |
+
'twitter' => array (
|
11 |
+
'name' => 'Twitter'
|
12 |
+
),
|
13 |
+
'google' => array (
|
14 |
+
'name' => 'Google'
|
15 |
+
),
|
16 |
+
'linkedin' => array (
|
17 |
+
'name' => 'LinkedIn'
|
18 |
+
),
|
19 |
+
'yahoo' => array (
|
20 |
+
'name' => 'Yahoo'
|
21 |
+
),
|
22 |
+
'github' => array (
|
23 |
+
'name' => 'Github.com'
|
24 |
+
),
|
25 |
+
'foursquare' => array (
|
26 |
+
'name' => 'Foursquare'
|
27 |
+
),
|
28 |
+
'skyrock' => array (
|
29 |
+
'name' => 'Skyrock.com'
|
30 |
+
),
|
31 |
+
'openid' => array (
|
32 |
+
'name' => 'OpenID'
|
33 |
+
),
|
34 |
+
'wordpress' => array (
|
35 |
+
'name' => 'Wordpress.com'
|
36 |
+
),
|
37 |
+
'hyves' => array (
|
38 |
+
'name' => 'Hyves'
|
39 |
+
),
|
40 |
+
'paypal' => array (
|
41 |
+
'name' => 'PayPal'
|
42 |
+
),
|
43 |
+
'livejournal' => array (
|
44 |
+
'name' => 'LiveJournal'
|
45 |
+
),
|
46 |
+
'steam' => array (
|
47 |
+
'name' => 'Steam'
|
48 |
+
),
|
49 |
+
'windowslive' => array (
|
50 |
+
'name' => 'Windows Live'
|
51 |
+
),
|
52 |
+
'blogger' => array (
|
53 |
+
'name' => 'Blogger'
|
54 |
+
),
|
55 |
+
'disqus' => array (
|
56 |
+
'name' => 'Disqus'
|
57 |
+
),
|
58 |
+
'stackexchange' => array (
|
59 |
+
'name' => 'StackExchange'
|
60 |
+
),
|
61 |
+
'vkontakte' => array (
|
62 |
+
'name' => 'VKontakte (Вконтакте)'
|
63 |
+
),
|
64 |
+
'mailru' => array (
|
65 |
+
'name' => 'Mail.ru'
|
66 |
+
)
|
67 |
);
|
68 |
|
includes/toolbox.php
CHANGED
@@ -81,11 +81,11 @@ function oa_social_login_user_notification ($user_id, $user_identity_provider)
|
|
81 |
// in sanitize_option we want to reverse this for the plain text arena of emails.
|
82 |
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
|
83 |
|
84 |
-
$message = sprintf(__('New user registration on your site %s:'), $blogname) . "\r\n\r\n";
|
85 |
-
$message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
|
86 |
-
$message .= sprintf(__('Social Network: %s'), $user_identity_provider) . "\r\n";
|
87 |
|
88 |
-
@wp_mail(get_option('admin_email'), '[Social Login] '.sprintf(__('[%s] New User Registration'), $blogname), $message);
|
89 |
}
|
90 |
|
91 |
|
81 |
// in sanitize_option we want to reverse this for the plain text arena of emails.
|
82 |
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
|
83 |
|
84 |
+
$message = sprintf(__('New user registration on your site %s:', 'oa_social_login'), $blogname) . "\r\n\r\n";
|
85 |
+
$message .= sprintf(__('Username: %s', 'oa_social_login'), $user_login) . "\r\n\r\n";
|
86 |
+
$message .= sprintf(__('Social Network: %s', 'oa_social_login'), $user_identity_provider) . "\r\n";
|
87 |
|
88 |
+
@wp_mail(get_option('admin_email'), '[Social Login] '.sprintf(__('[%s] New User Registration', 'oa_social_login'), $blogname), $message);
|
89 |
}
|
90 |
|
91 |
|
includes/user_interface.php
CHANGED
@@ -74,7 +74,7 @@ function oa_social_login_bp_custom_fetch_avatar($text, $args)
|
|
74 |
$img_height = (! empty ($args['height']) ? 'height="'.$args['height'].'" ' : '');
|
75 |
|
76 |
//Replace
|
77 |
-
$text = preg_replace('#<img[^>]+>#i', '<img src="'.$user_thumbnail.'" '.$img_alt.$img_class.$img_height.$img_width.'/>', $text);
|
78 |
}
|
79 |
}
|
80 |
}
|
@@ -108,9 +108,13 @@ function oa_social_login_custom_avatar ($avatar, $mixed, $size, $default, $alt =
|
|
108 |
//Chosen user
|
109 |
$user_id = null;
|
110 |
|
|
|
|
|
|
|
111 |
//Check if we are in a comment
|
112 |
if (is_object ($comment) AND property_exists ($comment, 'user_id') AND !empty ($comment->user_id))
|
113 |
{
|
|
|
114 |
$user_id = $comment->user_id;
|
115 |
}
|
116 |
//Check if we have an user identifier
|
@@ -118,12 +122,14 @@ function oa_social_login_custom_avatar ($avatar, $mixed, $size, $default, $alt =
|
|
118 |
{
|
119 |
if ($mixed > 0)
|
120 |
{
|
|
|
121 |
$user_id = $mixed;
|
122 |
}
|
123 |
}
|
124 |
//Check if we have an email
|
125 |
elseif (is_string($mixed) && ($user = get_user_by( 'email', $mixed)))
|
126 |
{
|
|
|
127 |
$user_id = $user->ID;
|
128 |
}
|
129 |
//Check if we have an user object
|
@@ -131,6 +137,7 @@ function oa_social_login_custom_avatar ($avatar, $mixed, $size, $default, $alt =
|
|
131 |
{
|
132 |
if (property_exists ($mixed, 'user_id') AND is_numeric ($mixed->user_id))
|
133 |
{
|
|
|
134 |
$user_id = $mixed->user_id;
|
135 |
}
|
136 |
}
|
@@ -142,7 +149,7 @@ function oa_social_login_custom_avatar ($avatar, $mixed, $size, $default, $alt =
|
|
142 |
{
|
143 |
if (strlen (trim ($user_thumbnail)) > 0)
|
144 |
{
|
145 |
-
return '<img alt="'. oa_social_login_esc_attr($alt) .'" src="'.$user_thumbnail.'" class="avatar avatar-social-login avatar-'.$size.' photo" height="'.$size.'" width="'.$size.'" />';
|
146 |
}
|
147 |
}
|
148 |
}
|
@@ -198,9 +205,10 @@ function oa_social_login_render_login_form_comments ()
|
|
198 |
}
|
199 |
}
|
200 |
}
|
|
|
201 |
add_action ('comment_form_top', 'oa_social_login_render_login_form_comments');
|
202 |
|
203 |
-
//
|
204 |
add_action ('thesis_hook_comment_form_top', 'oa_social_login_render_login_form_comments');
|
205 |
|
206 |
|
@@ -222,8 +230,12 @@ function oa_social_login_render_login_form_registration ()
|
|
222 |
}
|
223 |
}
|
224 |
}
|
|
|
225 |
add_action ('register_form', 'oa_social_login_render_login_form_registration');
|
226 |
|
|
|
|
|
|
|
227 |
|
228 |
/**
|
229 |
* Display the provider grid for login
|
@@ -233,17 +245,23 @@ function oa_social_login_render_login_form_login ()
|
|
233 |
//Read settings
|
234 |
$settings = get_option ('oa_social_login_settings');
|
235 |
|
236 |
-
//Display buttons if option not set or enabled
|
237 |
if (!isset ($settings ['plugin_display_in_login_form']) OR $settings ['plugin_display_in_login_form'] == '1')
|
238 |
{
|
239 |
echo oa_social_login_render_login_form ('login');
|
240 |
}
|
241 |
}
|
|
|
242 |
add_action ('login_form', 'oa_social_login_render_login_form_login');
|
243 |
|
244 |
//WordPress Profile Builder
|
245 |
add_action ('wppb_before_login', 'oa_social_login_render_login_form_login');
|
246 |
-
|
|
|
|
|
|
|
|
|
|
|
247 |
|
248 |
|
249 |
/**
|
@@ -270,22 +288,6 @@ function oa_social_login_filter_login_form_custom ($value = 'custom')
|
|
270 |
add_filter ('oa_social_login_custom', 'oa_social_login_filter_login_form_custom');
|
271 |
|
272 |
|
273 |
-
/**
|
274 |
-
* Example for using your own CSS
|
275 |
-
*/
|
276 |
-
|
277 |
-
/*
|
278 |
-
|
279 |
-
function oa_social_login_set_custom_css() {
|
280 |
-
return 'http://public.oneallcdn.com/css/api/socialize/themes/buildin/connect/large-v1.css';
|
281 |
-
}
|
282 |
-
|
283 |
-
add_filter('oa_social_login_default_css', 'oa_social_login_set_custom_css');
|
284 |
-
add_filter('oa_social_login_widget_css', 'oa_social_login_set_custom_css');
|
285 |
-
|
286 |
-
*/
|
287 |
-
|
288 |
-
|
289 |
/**
|
290 |
* Display the provider grid
|
291 |
*/
|
@@ -332,7 +334,7 @@ function oa_social_login_render_login_form ($source, $args = array())
|
|
332 |
//Read widget settings
|
333 |
$widget_settings = (is_array ($args) ? $args : array ());
|
334 |
|
335 |
-
//
|
336 |
$plugin_caption = '';
|
337 |
|
338 |
//Buttons size
|
@@ -381,11 +383,12 @@ function oa_social_login_render_login_form ($source, $args = array())
|
|
381 |
$output [] = ' <script type="text/javascript">';
|
382 |
$output [] = ' oneall.api.plugins.social_login.build("oneall_social_login_providers_' . $rand . '", {';
|
383 |
$output [] = ' "providers": ["' . implode ('","', $providers) . '"], ';
|
|
|
384 |
$output [] = ' "callback_uri": (window.location.href + ((window.location.href.split(\'?\')[1] ? \'&\':\'?\') + "oa_social_login_source=' . $source . '")), ';
|
385 |
$output [] = ' "css_theme_uri": "' . $css_theme_uri . '" ';
|
386 |
$output [] = ' });';
|
387 |
$output [] = ' </script>';
|
388 |
-
$output [] = ' <!--
|
389 |
$output [] = '</div>';
|
390 |
|
391 |
//Done
|
74 |
$img_height = (! empty ($args['height']) ? 'height="'.$args['height'].'" ' : '');
|
75 |
|
76 |
//Replace
|
77 |
+
$text = preg_replace('#<img[^>]+>#i', '<img data-social-login="bp-d1" src="'.$user_thumbnail.'" '.$img_alt.$img_class.$img_height.$img_width.'/>', $text);
|
78 |
}
|
79 |
}
|
80 |
}
|
108 |
//Chosen user
|
109 |
$user_id = null;
|
110 |
|
111 |
+
//Detection
|
112 |
+
$detection = 0;
|
113 |
+
|
114 |
//Check if we are in a comment
|
115 |
if (is_object ($comment) AND property_exists ($comment, 'user_id') AND !empty ($comment->user_id))
|
116 |
{
|
117 |
+
$detection = 1;
|
118 |
$user_id = $comment->user_id;
|
119 |
}
|
120 |
//Check if we have an user identifier
|
122 |
{
|
123 |
if ($mixed > 0)
|
124 |
{
|
125 |
+
$detection = 2;
|
126 |
$user_id = $mixed;
|
127 |
}
|
128 |
}
|
129 |
//Check if we have an email
|
130 |
elseif (is_string($mixed) && ($user = get_user_by( 'email', $mixed)))
|
131 |
{
|
132 |
+
$detection = 3;
|
133 |
$user_id = $user->ID;
|
134 |
}
|
135 |
//Check if we have an user object
|
137 |
{
|
138 |
if (property_exists ($mixed, 'user_id') AND is_numeric ($mixed->user_id))
|
139 |
{
|
140 |
+
$detection = 4;
|
141 |
$user_id = $mixed->user_id;
|
142 |
}
|
143 |
}
|
149 |
{
|
150 |
if (strlen (trim ($user_thumbnail)) > 0)
|
151 |
{
|
152 |
+
return '<img alt="'. oa_social_login_esc_attr($alt) .'" src="'.$user_thumbnail.'" data-social-login="wp-d'.$detection.'" class="avatar avatar-social-login avatar-'.$size.' photo" height="'.$size.'" width="'.$size.'" />';
|
153 |
}
|
154 |
}
|
155 |
}
|
205 |
}
|
206 |
}
|
207 |
}
|
208 |
+
//WordPress Comments
|
209 |
add_action ('comment_form_top', 'oa_social_login_render_login_form_comments');
|
210 |
|
211 |
+
//Appthemes Thesis Theme Comments
|
212 |
add_action ('thesis_hook_comment_form_top', 'oa_social_login_render_login_form_comments');
|
213 |
|
214 |
|
230 |
}
|
231 |
}
|
232 |
}
|
233 |
+
//WordPress Registration
|
234 |
add_action ('register_form', 'oa_social_login_render_login_form_registration');
|
235 |
|
236 |
+
//BuddyPress Registration
|
237 |
+
add_action ('bp_before_account_details_fields', 'oa_social_login_render_login_form_registration');
|
238 |
+
|
239 |
|
240 |
/**
|
241 |
* Display the provider grid for login
|
245 |
//Read settings
|
246 |
$settings = get_option ('oa_social_login_settings');
|
247 |
|
248 |
+
//Display buttons only if option not set or enabled
|
249 |
if (!isset ($settings ['plugin_display_in_login_form']) OR $settings ['plugin_display_in_login_form'] == '1')
|
250 |
{
|
251 |
echo oa_social_login_render_login_form ('login');
|
252 |
}
|
253 |
}
|
254 |
+
//WordPress Registration
|
255 |
add_action ('login_form', 'oa_social_login_render_login_form_login');
|
256 |
|
257 |
//WordPress Profile Builder
|
258 |
add_action ('wppb_before_login', 'oa_social_login_render_login_form_login');
|
259 |
+
|
260 |
+
//BuddyPress Sidebar
|
261 |
+
add_action ('bp_before_sidebar_login_form', 'oa_social_login_render_login_form_login');
|
262 |
+
|
263 |
+
//Appthemes Vantage Theme
|
264 |
+
add_action ('va_after_admin_bar_login_form', 'oa_social_login_render_login_form_login');
|
265 |
|
266 |
|
267 |
/**
|
288 |
add_filter ('oa_social_login_custom', 'oa_social_login_filter_login_form_custom');
|
289 |
|
290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
/**
|
292 |
* Display the provider grid
|
293 |
*/
|
334 |
//Read widget settings
|
335 |
$widget_settings = (is_array ($args) ? $args : array ());
|
336 |
|
337 |
+
//Don't show the title - this is handled insided the widget
|
338 |
$plugin_caption = '';
|
339 |
|
340 |
//Buttons size
|
383 |
$output [] = ' <script type="text/javascript">';
|
384 |
$output [] = ' oneall.api.plugins.social_login.build("oneall_social_login_providers_' . $rand . '", {';
|
385 |
$output [] = ' "providers": ["' . implode ('","', $providers) . '"], ';
|
386 |
+
//$output [] = ' "same_window": true, ';
|
387 |
$output [] = ' "callback_uri": (window.location.href + ((window.location.href.split(\'?\')[1] ? \'&\':\'?\') + "oa_social_login_source=' . $source . '")), ';
|
388 |
$output [] = ' "css_theme_uri": "' . $css_theme_uri . '" ';
|
389 |
$output [] = ' });';
|
390 |
$output [] = ' </script>';
|
391 |
+
$output [] = ' <!-- OneAll.com / Social Login for WordPress / v'.constant('OA_SOCIAL_LOGIN_VERSION').' -->';
|
392 |
$output [] = '</div>';
|
393 |
|
394 |
//Done
|
includes/widget.php
CHANGED
@@ -68,7 +68,7 @@ class oa_social_login_widget extends WP_Widget
|
|
68 |
|
69 |
foreach ($instance as $key => $value)
|
70 |
{
|
71 |
-
$instance [$key] =
|
72 |
}
|
73 |
|
74 |
$instance = wp_parse_args ((array) $instance, $default_settings);
|
68 |
|
69 |
foreach ($instance as $key => $value)
|
70 |
{
|
71 |
+
$instance [$key] = oa_social_login_esc_attr ($value);
|
72 |
}
|
73 |
|
74 |
$instance = wp_parse_args ((array) $instance, $default_settings);
|
languages/oa_social_login-de_DE.mo
CHANGED
Binary file
|
languages/oa_social_login-de_DE.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Social Login\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2012-
|
6 |
-
"PO-Revision-Date: 2012-
|
7 |
"Last-Translator: Claude Schlesser <cschlesser@oneall.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"Language: \n"
|
@@ -27,6 +27,10 @@ msgstr "Dieses Plugin benötigt Wordpress %s oder höher. Bitte aktualisieren Si
|
|
27 |
msgid "Settings"
|
28 |
msgstr "Einstellungen"
|
29 |
|
|
|
|
|
|
|
|
|
30 |
#: includes/admin.php:14
|
31 |
msgid "Registration"
|
32 |
msgstr "Registriert mit"
|
@@ -104,11 +108,11 @@ msgid "Autodetection Error - our <a href=\"%s\" target=\"_blank\">documentation<
|
|
104 |
msgstr "Verbindungsfehler - in unserer <a href=\"%s\" target=\"_blank\">Dokumentation</a> finden Sie die Lösung."
|
105 |
|
106 |
#: includes/admin.php:554
|
107 |
-
msgid "Allow your visitors to comment, login and register with
|
108 |
-
msgstr "Erlauben Sie Ihren Besuchern, sich mit
|
109 |
|
110 |
#: includes/admin.php:555
|
111 |
-
msgid "Draw a larger audience and increase user engagement in a few simple steps."
|
112 |
msgstr "Steigern Sie die Beteilung Ihrer Nutzer auf einfachste Art und Weise."
|
113 |
|
114 |
#: includes/admin.php:559
|
@@ -125,7 +129,7 @@ msgid "After having created your account and setup your Site, please enter the S
|
|
125 |
msgstr "Nachdem Sie Ihr Konto angemeldet haben, müssen Sie die API-Daten in nachfolgendes Formular eintragen."
|
126 |
|
127 |
#: includes/admin.php:564
|
128 |
-
msgid "Don't worry the setup only
|
129 |
msgstr "Keine Sorge! Die Einrichtung dauert nur wenige Minuten."
|
130 |
|
131 |
#: includes/admin.php:567
|
@@ -174,8 +178,8 @@ msgstr "<a target=\"_blank\" href=\"%s\">Schreiben Sie uns</a>, falls Sie Hilfe
|
|
174 |
|
175 |
#: includes/admin.php:601
|
176 |
#, php-format
|
177 |
-
msgid "We also have plugins for <a target=\"_blank\" href=\"%s\">Drupal and Joomla</a> amongst others"
|
178 |
-
msgstr "Wir bieten auch Module für <a target=\"_blank\" href=\"%s\">Drupal und Joomla</a> an"
|
179 |
|
180 |
#: includes/admin.php:610
|
181 |
#: includes/admin.php:788
|
@@ -336,16 +340,16 @@ msgid "No, no not display the social networks in the user list"
|
|
336 |
msgstr "Nein, soziale Netzwerke nicht anzeigen"
|
337 |
|
338 |
#: includes/admin.php:835
|
339 |
-
msgid "Do you want to receive an email
|
340 |
-
msgstr "Wollen Sie per Email benachrichtigt werden,
|
341 |
|
342 |
#: includes/admin.php:841
|
343 |
-
msgid "Yes, send me an email
|
344 |
-
msgstr "Ja, ich möchte eine Email erhalten wenn jemand sich
|
345 |
|
346 |
#: includes/admin.php:842
|
347 |
-
msgid "No, do not send me
|
348 |
-
msgstr "Nein, keine Benachrichtigung per Email"
|
349 |
|
350 |
#: includes/admin.php:849
|
351 |
msgid "User Settings"
|
@@ -364,7 +368,7 @@ msgid "Yes, require the user to enter his email address manually and display thi
|
|
364 |
msgstr "Ja, Benutzer mit folgendem Text auffordern, ihre Email-Adresse einzugeben:"
|
365 |
|
366 |
#: includes/admin.php:862
|
367 |
-
#: includes/user_interface.php:
|
368 |
#, php-format
|
369 |
msgid "<strong>We unfortunately could not retrieve your email address from %s.</strong> Please enter your email address in the form below in order to continue."
|
370 |
msgstr "<strong>Wir konnten Ihre E-Mail-Adresse leider nicht über Ihr %s Konto ermitteln.</strong> Bitte geben Sie Ihre Email-Adresse nachfolgend an."
|
@@ -514,32 +518,32 @@ msgstr "Weiterleitung zurück zur aktuellen Seite"
|
|
514 |
msgid "Redirect users to this page after they have registered with Social Login embedded by Widget/Shortcode:"
|
515 |
msgstr "Benutzer zu dieser Seite weiterleiten nachdem sie über das Social Login Widget/Shortcode registriert haben:"
|
516 |
|
517 |
-
#: includes/user_interface.php:
|
518 |
msgid "Please enable at least one social network!"
|
519 |
msgstr "Bitte aktivieren Sie mindestens ein soziales Netzwerk!"
|
520 |
|
521 |
-
#: includes/user_interface.php:
|
522 |
msgid "Please enter your email address"
|
523 |
msgstr "Bitte geben Sie Ihre E-Mail-Adresse ein"
|
524 |
|
525 |
-
#: includes/user_interface.php:
|
526 |
msgid "This email is not valid"
|
527 |
msgstr "Diese E-Mail-Adresse ist ungültig"
|
528 |
|
529 |
-
#: includes/user_interface.php:
|
530 |
msgid "This email is already used by another account"
|
531 |
msgstr "Diese E-Mail-Adresse wird bereits verwendet"
|
532 |
|
533 |
-
#: includes/user_interface.php:
|
534 |
#, php-format
|
535 |
msgid "You have successfully connected with %s!"
|
536 |
msgstr "Sie haben Sich erfolgreicht mit %s angemeldet!"
|
537 |
|
538 |
-
#: includes/user_interface.php:
|
539 |
msgid "Your email address"
|
540 |
msgstr "Ihre E-Mail-Adresse"
|
541 |
|
542 |
-
#: includes/user_interface.php:
|
543 |
msgid "Confirm my email address"
|
544 |
msgstr "Bitte bestätigen Sie Ihre E-Mail-Adresse"
|
545 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Social Login\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-10-15 14:52+0100\n"
|
6 |
+
"PO-Revision-Date: 2012-10-15 14:53+0100\n"
|
7 |
"Last-Translator: Claude Schlesser <cschlesser@oneall.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"Language: \n"
|
27 |
msgid "Settings"
|
28 |
msgstr "Einstellungen"
|
29 |
|
30 |
+
#: includes/communication.php:209
|
31 |
+
msgid "This Social Network account may not be used to register"
|
32 |
+
msgstr "Dieses Konto kann nicht zur Anmeldung genutzt werden"
|
33 |
+
|
34 |
#: includes/admin.php:14
|
35 |
msgid "Registration"
|
36 |
msgstr "Registriert mit"
|
108 |
msgstr "Verbindungsfehler - in unserer <a href=\"%s\" target=\"_blank\">Dokumentation</a> finden Sie die Lösung."
|
109 |
|
110 |
#: includes/admin.php:554
|
111 |
+
msgid "Allow your visitors to comment, login and register with 20+ Social Networks like for example Twitter, Facebook, LinkedIn, Hyves, VKontakte, Google or Yahoo."
|
112 |
+
msgstr "Erlauben Sie Ihren Besuchern, sich mit 20+ Sozialen Netzwerk wie z.B. Twitter, Facebook, LinkedIn, Hyves, VKontakte, Google oder Yahoo anzumelden, und Kommentare zu hinterlassen."
|
113 |
|
114 |
#: includes/admin.php:555
|
115 |
+
msgid "Draw a larger audience and increase your user engagement in a few simple steps."
|
116 |
msgstr "Steigern Sie die Beteilung Ihrer Nutzer auf einfachste Art und Weise."
|
117 |
|
118 |
#: includes/admin.php:559
|
129 |
msgstr "Nachdem Sie Ihr Konto angemeldet haben, müssen Sie die API-Daten in nachfolgendes Formular eintragen."
|
130 |
|
131 |
#: includes/admin.php:564
|
132 |
+
msgid "Don't worry the setup takes only a couple of minutes!"
|
133 |
msgstr "Keine Sorge! Die Einrichtung dauert nur wenige Minuten."
|
134 |
|
135 |
#: includes/admin.php:567
|
178 |
|
179 |
#: includes/admin.php:601
|
180 |
#, php-format
|
181 |
+
msgid "We also have turnkey plugins for <a target=\"_blank\" href=\"%s\">Drupal, phpBB and Joomla</a> amongst others"
|
182 |
+
msgstr "Wir bieten auch Module für <a target=\"_blank\" href=\"%s\">Drupal, phpBB und Joomla</a> an"
|
183 |
|
184 |
#: includes/admin.php:610
|
185 |
#: includes/admin.php:788
|
340 |
msgstr "Nein, soziale Netzwerke nicht anzeigen"
|
341 |
|
342 |
#: includes/admin.php:835
|
343 |
+
msgid "Do you want to receive an email whenever a new user registers with Social Login ?"
|
344 |
+
msgstr "Wollen Sie per Email benachrichtigt werden, sobald ein Benutzer sich mit Social Login anmeldet?"
|
345 |
|
346 |
#: includes/admin.php:841
|
347 |
+
msgid "Yes, send me an email whenever a new user registers with Social Login"
|
348 |
+
msgstr "Ja, ich möchte eine Email erhalten, wenn jemand sich mit Social Login anmeldet"
|
349 |
|
350 |
#: includes/admin.php:842
|
351 |
+
msgid "No, do not send me any emails"
|
352 |
+
msgstr "Nein, keine Benachrichtigung per Email versenden"
|
353 |
|
354 |
#: includes/admin.php:849
|
355 |
msgid "User Settings"
|
368 |
msgstr "Ja, Benutzer mit folgendem Text auffordern, ihre Email-Adresse einzugeben:"
|
369 |
|
370 |
#: includes/admin.php:862
|
371 |
+
#: includes/user_interface.php:467
|
372 |
#, php-format
|
373 |
msgid "<strong>We unfortunately could not retrieve your email address from %s.</strong> Please enter your email address in the form below in order to continue."
|
374 |
msgstr "<strong>Wir konnten Ihre E-Mail-Adresse leider nicht über Ihr %s Konto ermitteln.</strong> Bitte geben Sie Ihre Email-Adresse nachfolgend an."
|
518 |
msgid "Redirect users to this page after they have registered with Social Login embedded by Widget/Shortcode:"
|
519 |
msgstr "Benutzer zu dieser Seite weiterleiten nachdem sie über das Social Login Widget/Shortcode registriert haben:"
|
520 |
|
521 |
+
#: includes/user_interface.php:363
|
522 |
msgid "Please enable at least one social network!"
|
523 |
msgstr "Bitte aktivieren Sie mindestens ein soziales Netzwerk!"
|
524 |
|
525 |
+
#: includes/user_interface.php:435
|
526 |
msgid "Please enter your email address"
|
527 |
msgstr "Bitte geben Sie Ihre E-Mail-Adresse ein"
|
528 |
|
529 |
+
#: includes/user_interface.php:441
|
530 |
msgid "This email is not valid"
|
531 |
msgstr "Diese E-Mail-Adresse ist ungültig"
|
532 |
|
533 |
+
#: includes/user_interface.php:446
|
534 |
msgid "This email is already used by another account"
|
535 |
msgstr "Diese E-Mail-Adresse wird bereits verwendet"
|
536 |
|
537 |
+
#: includes/user_interface.php:479
|
538 |
#, php-format
|
539 |
msgid "You have successfully connected with %s!"
|
540 |
msgstr "Sie haben Sich erfolgreicht mit %s angemeldet!"
|
541 |
|
542 |
+
#: includes/user_interface.php:491
|
543 |
msgid "Your email address"
|
544 |
msgstr "Ihre E-Mail-Adresse"
|
545 |
|
546 |
+
#: includes/user_interface.php:503
|
547 |
msgid "Confirm my email address"
|
548 |
msgstr "Bitte bestätigen Sie Ihre E-Mail-Adresse"
|
549 |
|
oa-social-login.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Social Login
|
4 |
Plugin URI: http://www.oneall.com/
|
5 |
Description: Allow your visitors to <strong>comment, login and register with 20+ social networks</strong> like Twitter, Facebook, LinkedIn, Hyves, Вконтакте, Google or Yahoo.
|
6 |
-
Version: 3.
|
7 |
Author: Claude Schlesser
|
8 |
Author URI: http://www.oneall.com/
|
9 |
License: GPL2
|
@@ -11,7 +11,7 @@ License: GPL2
|
|
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', '3.
|
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 20+ social networks</strong> like Twitter, Facebook, LinkedIn, Hyves, Вконтакте, Google or Yahoo.
|
6 |
+
Version: 3.7
|
7 |
Author: Claude Schlesser
|
8 |
Author URI: http://www.oneall.com/
|
9 |
License: GPL2
|
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', '3.7');
|
15 |
|
16 |
/**
|
17 |
* Check technical requirements before activating the plugin (Wordpress 3.0 or newer required)
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: ClaudeSchlesser
|
|
3 |
Tags: social login, social connect, facebook login, linkedin, livejournal, google, yahoo, twitter login, openid, paypal, vkontakte, hyves, widget, plugin, social network login, comments
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 3.4.2
|
6 |
-
Stable tag: 3.
|
7 |
|
8 |
Allow your visitors to comment and login with social networks like Twitter, Facebook, Paypal, LinkedIn, LiveJournal, OpenID, VKontakte, Google, Yahoo
|
9 |
|
@@ -42,6 +42,8 @@ login and register with social networks like Twitter, Facebook, LinkedIn, Paypal
|
|
42 |
<li>Wordpress.com</li>
|
43 |
<li>Windows Live</li>
|
44 |
<li>StackExchange</li>
|
|
|
|
|
45 |
<li>Steam</li>
|
46 |
<li>Hyves</li>
|
47 |
<li>Mail.ru</li>
|
@@ -116,6 +118,16 @@ http://docs.oneall.com/plugins/guide/social-login-wordpress/
|
|
116 |
|
117 |
== Changelog ==
|
118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
= 3.6 =
|
120 |
* Debug Output Removed
|
121 |
|
@@ -229,12 +241,12 @@ http://docs.oneall.com/plugins/guide/social-login-wordpress/
|
|
229 |
== Testimonials ==
|
230 |
|
231 |
<strong>Used by thousands of users around the world!</strong>
|
232 |
-
|
233 |
<em>You have no idea how it THRILLED me to integrate oneall. It was SO amazingly easy, your team has simplified the whole process of signing up for
|
234 |
authorization on multiple social media sites. I HAD NO QUESTIONS/STEPS THAT YOU HADN'T ALREADY ANTICIPATED. It saved me HOURS of work!</em>
|
235 |
<strong>Kelly C.</strong>
|
236 |
|
237 |
-
<em>This is cool. Nice work. I'm
|
238 |
<strong>Jason M.</strong>
|
239 |
|
240 |
<em>This service is simply remarkable, I've tried integrating logins before and it has never been this easy!</em>
|
@@ -291,4 +303,7 @@ for putting together such a great product that so many users can implement with
|
|
291 |
<strong>Janae S.</strong>
|
292 |
|
293 |
<em>I love your service the way it is, it's amazing how easy the logging-in-via-social-network is integrated into a wordpress website!</em>
|
294 |
-
<strong>Martin S.</strong>
|
|
|
|
|
|
3 |
Tags: social login, social connect, facebook login, linkedin, livejournal, google, yahoo, twitter login, openid, paypal, vkontakte, hyves, widget, plugin, social network login, comments
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 3.4.2
|
6 |
+
Stable tag: 3.7
|
7 |
|
8 |
Allow your visitors to comment and login with social networks like Twitter, Facebook, Paypal, LinkedIn, LiveJournal, OpenID, VKontakte, Google, Yahoo
|
9 |
|
42 |
<li>Wordpress.com</li>
|
43 |
<li>Windows Live</li>
|
44 |
<li>StackExchange</li>
|
45 |
+
<li>Blogger</li>
|
46 |
+
<li>Disqus</li>
|
47 |
<li>Steam</li>
|
48 |
<li>Hyves</li>
|
49 |
<li>Mail.ru</li>
|
118 |
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= 3.7 =
|
122 |
+
* Hook for BuddyPress Registration added
|
123 |
+
* Hook for BuddyPress Sidebar added
|
124 |
+
* Hook for Appthemes Vantage Theme added
|
125 |
+
* Filter for email addresses of new users added
|
126 |
+
* Admin page width fixed
|
127 |
+
* Minor text changes
|
128 |
+
* Identity Provider "Blogger" added
|
129 |
+
* Identity Provider "Disqus" added
|
130 |
+
|
131 |
= 3.6 =
|
132 |
* Debug Output Removed
|
133 |
|
241 |
== Testimonials ==
|
242 |
|
243 |
<strong>Used by thousands of users around the world!</strong>
|
244 |
+
|
245 |
<em>You have no idea how it THRILLED me to integrate oneall. It was SO amazingly easy, your team has simplified the whole process of signing up for
|
246 |
authorization on multiple social media sites. I HAD NO QUESTIONS/STEPS THAT YOU HADN'T ALREADY ANTICIPATED. It saved me HOURS of work!</em>
|
247 |
<strong>Kelly C.</strong>
|
248 |
|
249 |
+
<em>This is cool. Nice work. I'm VERY impressed. You've made this about as painless as it gets and the value it adds is incredible.</em>
|
250 |
<strong>Jason M.</strong>
|
251 |
|
252 |
<em>This service is simply remarkable, I've tried integrating logins before and it has never been this easy!</em>
|
303 |
<strong>Janae S.</strong>
|
304 |
|
305 |
<em>I love your service the way it is, it's amazing how easy the logging-in-via-social-network is integrated into a wordpress website!</em>
|
306 |
+
<strong>Martin S.</strong>
|
307 |
+
|
308 |
+
<em>The site and the plugin are working magnificently. Thank you one million times for making your products/services available in the manner that you have.</em>
|
309 |
+
<strong>Herman G.</strong>
|