Version Description
- Done the addition of option for the profile image dimension settings for facebook.
Download this release
Release Info
Developer | Access Keys |
Plugin | Social Login WordPress Plugin – AccessPress Social Login Lite |
Version | 3.0.4 |
Comparing to | |
See all releases |
Code changes from version 3.0.3 to 3.0.4
- accesspress-social-login-lite.php +2 -2
- inc/backend/activation.php +1 -1
- inc/backend/main-page.php +17 -1
- inc/backend/save-settings.php +13 -1
- inc/frontend/login_check.php +14 -2
- readme.txt +4 -1
accesspress-social-login-lite.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin name: AccessPress Social Login Lite
|
4 |
Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-login-lite/
|
5 |
Description: A plugin to add various social logins to a site.
|
6 |
-
version: 3.0.
|
7 |
Author: AccessPress Themes
|
8 |
Author URI: https://accesspressthemes.com/
|
9 |
Text Domain: accesspress-social-login-lite
|
@@ -12,7 +12,7 @@
|
|
12 |
*/
|
13 |
//Declearation of the necessary constants for plugin
|
14 |
if( !defined( 'APSL_VERSION' ) ) {
|
15 |
-
define( 'APSL_VERSION', '3.0.
|
16 |
}
|
17 |
|
18 |
if( !defined( 'APSL_IMAGE_DIR' ) ) {
|
3 |
Plugin name: AccessPress Social Login Lite
|
4 |
Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-login-lite/
|
5 |
Description: A plugin to add various social logins to a site.
|
6 |
+
version: 3.0.4
|
7 |
Author: AccessPress Themes
|
8 |
Author URI: https://accesspressthemes.com/
|
9 |
Text Domain: accesspress-social-login-lite
|
12 |
*/
|
13 |
//Declearation of the necessary constants for plugin
|
14 |
if( !defined( 'APSL_VERSION' ) ) {
|
15 |
+
define( 'APSL_VERSION', '3.0.4' );
|
16 |
}
|
17 |
|
18 |
if( !defined( 'APSL_IMAGE_DIR' ) ) {
|
inc/backend/activation.php
CHANGED
@@ -5,7 +5,7 @@ $social_networks = array(0 => 'facebook', 1 => 'twitter', 2 => 'google');
|
|
5 |
|
6 |
$apsl_settings['network_ordering'] = $social_networks;
|
7 |
//facebook settings
|
8 |
-
$facebook_parameters = array('apsl_facebook_enable' => '0', 'apsl_facebook_app_id' => '', 'apsl_facebook_app_secret' => '');
|
9 |
$apsl_settings['apsl_facebook_settings'] = $facebook_parameters;
|
10 |
//twitter settings
|
11 |
$twitter_parameters = array('apsl_twitter_enable' => '0', 'apsl_twitter_api_key' => '', 'apsl_twitter_api_secret' => '');
|
5 |
|
6 |
$apsl_settings['network_ordering'] = $social_networks;
|
7 |
//facebook settings
|
8 |
+
$facebook_parameters = array('apsl_facebook_enable' => '0', 'apsl_facebook_app_id' => '', 'apsl_facebook_app_secret' => '', 'apsl_profile_image_width' => '50', 'apsl_profile_image_height' => '50');
|
9 |
$apsl_settings['apsl_facebook_settings'] = $facebook_parameters;
|
10 |
//twitter settings
|
11 |
$twitter_parameters = array('apsl_twitter_enable' => '0', 'apsl_twitter_api_key' => '', 'apsl_twitter_api_secret' => '');
|
inc/backend/main-page.php
CHANGED
@@ -95,6 +95,22 @@ $options = get_option( APSL_SETTINGS );
|
|
95 |
}
|
96 |
?>' />
|
97 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
<div class='apsl-info'>
|
99 |
<span class='apsl-info-note'><?php _e( 'Note:', 'accesspress-social-login-lite' ); ?></span> <br />
|
100 |
<span class='apsl-info-content'>You need to create a new facebook API Applitation to setup facebook login. Please follow the instructions to create new app.</span>
|
@@ -224,7 +240,7 @@ $options = get_option( APSL_SETTINGS );
|
|
224 |
?>
|
225 |
<?php
|
226 |
endforeach; ?>
|
227 |
-
</div>
|
228 |
</div>
|
229 |
|
230 |
<div class='apsl-tab-contents' id='tab-apsl-theme-settings' style="display:none">
|
95 |
}
|
96 |
?>' />
|
97 |
</div>
|
98 |
+
|
99 |
+
<div class='apsl-fb-profile-image-size'>
|
100 |
+
<label><?php _e( 'Profile picture image size', 'accesspress-social-login-lite' ); ?></label><br />
|
101 |
+
<label for='apsl-fb-profile-image-width'><?php _e( 'Width:', 'accesspress-social-login-lite' ); ?></label> <input type='number' name='apsl_facebook_settings[apsl_profile_image_width]' id='apsl-fb-profile-image-width' value='<?php
|
102 |
+
if( isset( $options['apsl_facebook_settings']['apsl_profile_image_width'] ) ) {
|
103 |
+
echo $options['apsl_facebook_settings']['apsl_profile_image_width'];
|
104 |
+
}
|
105 |
+
?>' /> px
|
106 |
+
<br />
|
107 |
+
<label for='apsl-fb-profile-image-height'><?php _e( 'Height:', 'accesspress-social-login-lite' ); ?></label> <input type='number' name='apsl_facebook_settings[apsl_profile_image_height]' id='apsl-fb-profile-image-height' value='<?php
|
108 |
+
if( isset( $options['apsl_facebook_settings']['apsl_profile_image_height'] ) ) {
|
109 |
+
echo $options['apsl_facebook_settings']['apsl_profile_image_height'];
|
110 |
+
}
|
111 |
+
?>' /> px
|
112 |
+
<div class='apsl-info'>Please note that the facebook might not provide the exact dimention of the image as settings above.</div>
|
113 |
+
</div>
|
114 |
<div class='apsl-info'>
|
115 |
<span class='apsl-info-note'><?php _e( 'Note:', 'accesspress-social-login-lite' ); ?></span> <br />
|
116 |
<span class='apsl-info-content'>You need to create a new facebook API Applitation to setup facebook login. Please follow the instructions to create new app.</span>
|
240 |
?>
|
241 |
<?php
|
242 |
endforeach; ?>
|
243 |
+
</div>
|
244 |
</div>
|
245 |
|
246 |
<div class='apsl-tab-contents' id='tab-apsl-theme-settings' style="display:none">
|
inc/backend/save-settings.php
CHANGED
@@ -4,15 +4,27 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
|
|
4 |
$apsl_settings = array();
|
5 |
$apsl_settings['network_ordering'] = $_POST['network_ordering'];
|
6 |
|
|
|
7 |
//for facebook settings
|
8 |
foreach( $_POST['apsl_facebook_settings'] as $key => $value ) {
|
9 |
$$key = sanitize_text_field( $value );
|
10 |
}
|
|
|
11 |
$apsl_facebook_enable = isset( $apsl_facebook_enable ) ? $apsl_facebook_enable : '';
|
12 |
|
13 |
-
$facebook_parameters = array('apsl_facebook_enable' => $apsl_facebook_enable,
|
|
|
|
|
|
|
|
|
|
|
14 |
$apsl_settings['apsl_facebook_settings'] = $facebook_parameters;
|
15 |
|
|
|
|
|
|
|
|
|
|
|
16 |
//for twitter settings
|
17 |
foreach( $_POST['apsl_twitter_settings'] as $key => $value ) {
|
18 |
$$key = sanitize_text_field( $value );
|
4 |
$apsl_settings = array();
|
5 |
$apsl_settings['network_ordering'] = $_POST['network_ordering'];
|
6 |
|
7 |
+
|
8 |
//for facebook settings
|
9 |
foreach( $_POST['apsl_facebook_settings'] as $key => $value ) {
|
10 |
$$key = sanitize_text_field( $value );
|
11 |
}
|
12 |
+
|
13 |
$apsl_facebook_enable = isset( $apsl_facebook_enable ) ? $apsl_facebook_enable : '';
|
14 |
|
15 |
+
$facebook_parameters = array( 'apsl_facebook_enable' => $apsl_facebook_enable,
|
16 |
+
'apsl_facebook_app_id' => $apsl_facebook_app_id,
|
17 |
+
'apsl_facebook_app_secret' => $apsl_facebook_app_secret,
|
18 |
+
'apsl_profile_image_width' => $apsl_profile_image_width,
|
19 |
+
'apsl_profile_image_height' => $apsl_profile_image_height
|
20 |
+
);
|
21 |
$apsl_settings['apsl_facebook_settings'] = $facebook_parameters;
|
22 |
|
23 |
+
// echo "<pre>";
|
24 |
+
// print_r($apsl_settings['apsl_facebook_settings']);
|
25 |
+
// echo "</pre>";
|
26 |
+
// die();
|
27 |
+
|
28 |
//for twitter settings
|
29 |
foreach( $_POST['apsl_twitter_settings'] as $key => $value ) {
|
30 |
$$key = sanitize_text_field( $value );
|
inc/frontend/login_check.php
CHANGED
@@ -74,6 +74,18 @@ if( !class_exists( 'APSL_Lite_Login_Check_Class' ) ) {
|
|
74 |
$exploder = explode( '_', $_GET['apsl_login_id'] );
|
75 |
$action = $exploder[1];
|
76 |
$options = get_option( APSL_SETTINGS );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
$config = array('app_id' => $options['apsl_facebook_settings']['apsl_facebook_app_id'], 'app_secret' => $options['apsl_facebook_settings']['apsl_facebook_app_secret'], 'default_graph_version' => 'v2.4');
|
78 |
|
79 |
include( APSL_PLUGIN_DIR . 'facebook/autoload.php' );
|
@@ -150,12 +162,12 @@ if( !class_exists( 'APSL_Lite_Login_Check_Class' ) ) {
|
|
150 |
$return_user_details->gender = $user_profile['gender'];
|
151 |
$return_user_details->url = $user_profile['link'];
|
152 |
$return_user_details->about = ''; //facebook doesn't return user about details.
|
153 |
-
$headers = get_headers( 'https://graph.facebook.com/' . $user_profile['id'] . '/picture', 1 );
|
154 |
// just a precaution, check whether the header isset...
|
155 |
if( isset( $headers['Location'] ) ) {
|
156 |
$return_user_details->deuimage = $headers['Location']; // string
|
157 |
|
158 |
-
}
|
159 |
else {
|
160 |
$return_user_details->deuimage = false; // nothing there? .. weird, but okay!
|
161 |
|
74 |
$exploder = explode( '_', $_GET['apsl_login_id'] );
|
75 |
$action = $exploder[1];
|
76 |
$options = get_option( APSL_SETTINGS );
|
77 |
+
if(isset($options['apsl_facebook_settings']['apsl_profile_image_width'])){
|
78 |
+
$width = $options['apsl_facebook_settings']['apsl_profile_image_width'];
|
79 |
+
}else{
|
80 |
+
$width = 150;
|
81 |
+
}
|
82 |
+
|
83 |
+
if(isset($options['apsl_facebook_settings']['apsl_profile_image_height'])){
|
84 |
+
$height = $options['apsl_facebook_settings']['apsl_profile_image_height'];
|
85 |
+
}else{
|
86 |
+
$height = 150;
|
87 |
+
}
|
88 |
+
|
89 |
$config = array('app_id' => $options['apsl_facebook_settings']['apsl_facebook_app_id'], 'app_secret' => $options['apsl_facebook_settings']['apsl_facebook_app_secret'], 'default_graph_version' => 'v2.4');
|
90 |
|
91 |
include( APSL_PLUGIN_DIR . 'facebook/autoload.php' );
|
162 |
$return_user_details->gender = $user_profile['gender'];
|
163 |
$return_user_details->url = $user_profile['link'];
|
164 |
$return_user_details->about = ''; //facebook doesn't return user about details.
|
165 |
+
$headers = get_headers( 'https://graph.facebook.com/' . $user_profile['id'] . '/picture?width='.$width.'&height='.$height, 1 );
|
166 |
// just a precaution, check whether the header isset...
|
167 |
if( isset( $headers['Location'] ) ) {
|
168 |
$return_user_details->deuimage = $headers['Location']; // string
|
169 |
|
170 |
+
}
|
171 |
else {
|
172 |
$return_user_details->deuimage = false; // nothing there? .. weird, but okay!
|
173 |
|
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.3
|
7 |
-
Stable tag: 3.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -131,6 +131,9 @@ Yes. You can use the AccessPress social login lite anywhere by using shortcode i
|
|
131 |
4. Backend Other settings Section.
|
132 |
|
133 |
== Changelog ==
|
|
|
|
|
|
|
134 |
= 3.0.3 =
|
135 |
* Done the modifications for the google app creation note section.
|
136 |
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.3
|
7 |
+
Stable tag: 3.0.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
131 |
4. Backend Other settings Section.
|
132 |
|
133 |
== Changelog ==
|
134 |
+
= 3.0.4 =
|
135 |
+
* Done the addition of option for the profile image dimension settings for facebook.
|
136 |
+
|
137 |
= 3.0.3 =
|
138 |
* Done the modifications for the google app creation note section.
|
139 |
|