Social Login WordPress Plugin – AccessPress Social Login Lite - Version 1.0.4

Version Description

  • Addition of the pluggable function wp_new_user_notification for custom email messages.
  • Addition of the additional info for making the facebook app live.
Download this release

Release Info

Developer Access Keys
Plugin Icon 128x128 Social Login WordPress Plugin – AccessPress Social Login Lite
Version 1.0.4
Comparing to
See all releases

Code changes from version 1.0.3 to 1.0.4

accesspress-social-login-lite.php CHANGED
@@ -4,7 +4,7 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
4
  Plugin name: AccessPress Social Login Lite
5
  Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-login-lite/
6
  Description: A plugin to add various social logins to a site.
7
- version: 1.0.3
8
  Author: AccessPress Themes
9
  Author URI: https://accesspressthemes.com/
10
  Text Domain: apsl-lite
@@ -14,7 +14,7 @@ License: GPLv2 or later
14
 
15
  //Declearation of the necessary constants for plugin
16
  if(!defined ( 'APSL_VERSION' ) ){
17
- define ( 'APSL_VERSION', '1.0.3' );
18
  }
19
 
20
  if( !defined( 'APSL_IMAGE_DIR' ) ){
@@ -51,6 +51,37 @@ if(!defined('APSL_PLUGIN_DIR')){
51
  * */
52
  include_once('inc/backend/widget.php');
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
  // Declaration of the class
56
  if( !class_exists( 'APSL_Lite_Class' ) ){
@@ -96,7 +127,6 @@ if( !class_exists( 'APSL_Lite_Class' ) ){
96
 
97
  }
98
 
99
-
100
  function apsl_social_login_custom_avatar ($avatar, $mixed, $size, $default, $alt = '')
101
  {
102
  $options = get_option( APSL_SETTINGS );
4
  Plugin name: AccessPress Social Login Lite
5
  Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-login-lite/
6
  Description: A plugin to add various social logins to a site.
7
+ version: 1.0.4
8
  Author: AccessPress Themes
9
  Author URI: https://accesspressthemes.com/
10
  Text Domain: apsl-lite
14
 
15
  //Declearation of the necessary constants for plugin
16
  if(!defined ( 'APSL_VERSION' ) ){
17
+ define ( 'APSL_VERSION', '1.0.4' );
18
  }
19
 
20
  if( !defined( 'APSL_IMAGE_DIR' ) ){
51
  * */
52
  include_once('inc/backend/widget.php');
53
 
54
+ // Redefine user notification function
55
+ function wp_new_user_notification( $user_id, $plaintext_pass = '' ) {
56
+ $user = new WP_User($user_id);
57
+
58
+ $user_login = stripslashes($user->user_login);
59
+ $user_email = stripslashes($user->user_email);
60
+
61
+ $message = sprintf(__('New user registration on your site %s:'), get_option('blogname')) . "\r\n\r\n";
62
+ $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
63
+ $message .= sprintf(__('E-mail: %s'), $user_email) . "\r\n";
64
+ $message .= __('Thanks!');
65
+
66
+ $headers = 'From:'.get_option('blogname').' <'.get_option('admin_email').'>' . "\r\n";
67
+ @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), get_option('blogname')), $message, $headers);
68
+
69
+ if ( empty($plaintext_pass) )
70
+ return;
71
+
72
+ $message = __('Hi there,') . "\r\n\r\n";
73
+ $message .= sprintf(__("Welcome to %s! Here's how to log in:"), get_option('blogname')) . "\r\n\r\n";
74
+ $message .= wp_login_url() . "\r\n";
75
+ $message .= sprintf(__('Username: %s'), $user_login) . "\r\n";
76
+ $message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n\r\n";
77
+ $message .= sprintf(__('If you have any problems, please contact me at %s.'), get_option('admin_email')) . "\r\n\r\n";
78
+ $message .= __('Thanks!');
79
+
80
+ $headers = 'From:'.get_option('blogname').' <'.get_option('admin_email').'>' . "\r\n";
81
+
82
+ wp_mail($user_email, sprintf(__('[%s] Your username and password'), get_option('blogname')), $message, $headers);
83
+
84
+ }
85
 
86
  // Declaration of the class
87
  if( !class_exists( 'APSL_Lite_Class' ) ){
127
 
128
  }
129
 
 
130
  function apsl_social_login_custom_avatar ($avatar, $mixed, $size, $default, $alt = '')
131
  {
132
  $options = get_option( APSL_SETTINGS );
inc/backend/main-page.php CHANGED
@@ -93,6 +93,8 @@ if(isset($_SESSION['apsl_message'])){ ?>
93
  <li>Click on 'Add a New App' button. A popup will open. Then choose website.</li>
94
  <li>Add the required informations and don't forget to make your app live. This is very important otherwise your app will not work for all users.</li>
95
  <li>Then Click the "Create App" button and follow the instructions, your new app will be created. </li>
 
 
96
  <li>Copy and Paste "App ID" and "App Secret" here.</li>
97
  <li>Site url: <input type='text' value='<?php echo site_url(); ?>' readonly='readonly' /></li>
98
  </ul>
93
  <li>Click on 'Add a New App' button. A popup will open. Then choose website.</li>
94
  <li>Add the required informations and don't forget to make your app live. This is very important otherwise your app will not work for all users.</li>
95
  <li>Then Click the "Create App" button and follow the instructions, your new app will be created. </li>
96
+ <li>To make app live please go to settings menu and enter your email address there. Click save changes.</li>
97
+ <li>Now go the 'status and reviews' menu and make the app live.</li>
98
  <li>Copy and Paste "App ID" and "App Secret" here.</li>
99
  <li>Site url: <input type='text' value='<?php echo site_url(); ?>' readonly='readonly' /></li>
100
  </ul>
inc/frontend/login_check.php CHANGED
@@ -372,6 +372,8 @@ function siteUrl(){
372
  return site_url();
373
  }
374
 
 
 
375
  function callBackUrl(){
376
  $connection = !empty($_SERVER['HTTPS']) ? 'https://' : 'http://';
377
  $url = $connection . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"];
@@ -410,6 +412,34 @@ function updateUser($username, $email){
410
  }
411
  }
412
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
413
  function getUserByMail($email){
414
  global $wpdb;
415
  $row = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE user_email = '$email'");
372
  return site_url();
373
  }
374
 
375
+
376
+
377
  function callBackUrl(){
378
  $connection = !empty($_SERVER['HTTPS']) ? 'https://' : 'http://';
379
  $url = $connection . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"];
412
  }
413
  }
414
 
415
+ // Redefine user notification function
416
+ function wp_new_user_notification( $user_id, $plaintext_pass = '' ) {
417
+ $user = new WP_User($user_id);
418
+
419
+ $user_login = stripslashes($user->user_login);
420
+ $user_email = stripslashes($user->user_email);
421
+
422
+ $message = sprintf(__('New user registration on your blog %s:'), get_option('blogname')) . "\r\n\r\n";
423
+ $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
424
+ $message .= sprintf(__('E-mail: %s'), $user_email) . "\r\n";
425
+
426
+ @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), get_option('blogname')), $message);
427
+
428
+ if ( empty($plaintext_pass) )
429
+ return;
430
+
431
+ $message = __('Hi there,') . "\r\n\r\n";
432
+ $message .= sprintf(__("Welcome to %s! Here's how to log in:"), get_option('blogname')) . "\r\n\r\n";
433
+ $message .= wp_login_url() . "\r\n";
434
+ $message .= sprintf(__('Username: %s'), $user_login) . "\r\n";
435
+ $message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n\r\n";
436
+ $message .= sprintf(__('If you have any problems, please contact me at %s.'), get_option('admin_email')) . "\r\n\r\n";
437
+ $message .= __('Adios!');
438
+
439
+ wp_mail($user_email, sprintf(__('[%s] Your username and password'), get_option('blogname')), $message);
440
+
441
+ }
442
+
443
  function getUserByMail($email){
444
  global $wpdb;
445
  $row = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE user_email = '$email'");
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: social, login, social login, facebook, twitter, google, social connect, s
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.2
7
- Stable tag: 1.0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -71,7 +71,7 @@ For more features upgrade to PRO version
71
  - Wordpress
72
  - Buffer
73
 
74
- 16 Beautiful design templates.
75
 
76
  ★ Works with Woocommerce.
77
 
@@ -131,6 +131,10 @@ Yes. You can use the AccessPress social login lite anywhere by using shortcode i
131
  4. Backend Other settings Section.
132
 
133
  == Changelog ==
 
 
 
 
134
  = 1.0.3 =
135
  * Made the Redirect uri's selectable for each social medias.
136
 
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.2
7
+ Stable tag: 1.0.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
71
  - Wordpress
72
  - Buffer
73
 
74
+ 15 Beautiful design templates.
75
 
76
  ★ Works with Woocommerce.
77
 
131
  4. Backend Other settings Section.
132
 
133
  == Changelog ==
134
+ = 1.0.4 =
135
+ * Addition of the pluggable function wp_new_user_notification for custom email messages.
136
+ * Addition of the additional info for making the facebook app live.
137
+
138
  = 1.0.3 =
139
  * Made the Redirect uri's selectable for each social medias.
140