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

Version Description

  • Done the code formatting and removal of unnecessary codes.
Download this release

Release Info

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

Code changes from version 3.2.1 to 3.2.2

accesspress-social-login-lite.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin name: Social Login WordPress Plugin - 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.2.1
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.2.1' );
16
  }
17
 
18
  if( !defined( 'APSL_IMAGE_DIR' ) ) {
3
  Plugin name: Social Login WordPress Plugin - 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.2.2
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.2.2' );
16
  }
17
 
18
  if( !defined( 'APSL_IMAGE_DIR' ) ) {
inc/backend/main-page.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php defined( 'ABSPATH' ) or die( "No script kiddies please!" ); ?>
2
- <div class="wrap"><div class='apsl-outer-wrapper'>
3
-
4
  <div class="apsl-setting-header clearfix">
5
-
6
  <div class="apsl-headerlogo">
7
  <div class="logo-wrap"> <img src="<?php echo APSL_IMAGE_DIR; ?>/logo.png" alt="<?php esc_attr_e( 'AccessPress Social Login Lite', 'accesspress-social-login-lite' ); ?>" /></div>
8
  <div class="logo-content"><?php esc_attr_e( 'AccessPress Social Login Lite', 'accesspress-social-login-lite' ); ?><br />
@@ -30,24 +29,18 @@
30
 
31
  </div>
32
  </div>
33
-
34
  </div>
35
  <div class="clear"></div>
36
  </div>
37
  <div class="clear"></div>
38
 
39
- <?php
40
- $options = get_option( APSL_SETTINGS );
41
- ?>
42
-
43
- <?php if( isset( $_SESSION['apsl_message'] ) ) { ?>
44
  <div class="apsl-message">
45
- <p> <?php echo $_SESSION['apsl_message'];
46
- unset( $_SESSION['apsl_message'] ); ?>
47
- </p>
48
  </div>
49
- <?php
50
- } ?>
51
  <div class='apsl-networks'>
52
  <div class='apsl-network-options'>
53
  <form method="post" action="<?php echo admin_url() . 'admin-post.php' ?>">
@@ -66,11 +59,12 @@ $options = get_option( APSL_SETTINGS );
66
  <div class='apsl-tab-contents' id='tab-apsl-networks-settings'>
67
 
68
  <div class='network-settings'>
69
- <?php foreach( $options['network_ordering'] as $key => $value ): ?>
 
70
  <?php
71
- switch( $value ) {
72
- case 'facebook':
73
- ?>
74
  <div class='apsl-settings apsl-facebook-settings'>
75
  <!-- Facebook Settings -->
76
  <div class='apsl-label'><?php _e( "Facebook", 'accesspress-social-login-lite' ); ?><span class='apsl_show_hide' id='apsl_show_hide_<?php echo $value; ?>'><i class="fa fa-caret-down"></i></span> </div>
@@ -82,17 +76,17 @@ $options = get_option( APSL_SETTINGS );
82
  </div>
83
  <div class='apsl-app-id-wrapper'>
84
  <label><?php _e( 'App ID:', 'accesspress-social-login-lite' ); ?></label><input type='text' id='apsl-facebook-app-id' name='apsl_facebook_settings[apsl_facebook_app_id]' value='<?php
85
- if( isset( $options['apsl_facebook_settings']['apsl_facebook_app_id'] ) ) {
86
- echo $options['apsl_facebook_settings']['apsl_facebook_app_id'];
87
- }
88
- ?>' />
89
  </div>
90
  <div class='apsl-app-secret-wrapper'>
91
  <label><?php _e( 'App Secret:', 'accesspress-social-login-lite' ); ?></label><input type='text' id='apsl-facebook-app-secret' name='apsl_facebook_settings[apsl_facebook_app_secret]' value='<?php
92
- if( isset( $options['apsl_facebook_settings']['apsl_facebook_app_secret'] ) ) {
93
- echo $options['apsl_facebook_settings']['apsl_facebook_app_secret'];
94
- }
95
- ?>' />
96
  </div>
97
 
98
  <div class='apsl-fb-profile-image-size'>
@@ -108,7 +102,7 @@ $options = get_option( APSL_SETTINGS );
108
  echo $options['apsl_facebook_settings']['apsl_profile_image_height'];
109
  }
110
  ?>' style="width: 60px;" /> px
111
- <div class='apsl-info'>Please note that the facebook might not provide the exact dimention of the image as settings above.</div>
112
  </div>
113
  <div class='apsl-info'>
114
  <span class='apsl-info-note'><?php _e( 'Note:', 'accesspress-social-login-lite' ); ?></span> <br />
@@ -130,11 +124,11 @@ $options = get_option( APSL_SETTINGS );
130
  </div>
131
  </div>
132
  </div>
133
- <?php
134
- break; ?>
135
 
136
- <?php
137
- case 'twitter': ?>
138
  <div class='apsl-settings apsl-twitter-settings'>
139
  <!-- Twitter Settings -->
140
  <div class='apsl-label'><?php _e( "Twitter", 'accesspress-social-login-lite' ); ?> <span class='apsl_show_hide' id='apsl_show_hide_<?php echo $value; ?>'><i class="fa fa-caret-down"></i></span> </div>
@@ -146,18 +140,18 @@ $options = get_option( APSL_SETTINGS );
146
 
147
  <div class='apsl-app-id-wrapper'>
148
  <label><?php _e( 'Consumer Key (API Key):', 'accesspress-social-login-lite' ); ?></label><input type='text' id='apsl-twitter-app-id' name='apsl_twitter_settings[apsl_twitter_api_key]' value='<?php
149
- if( isset( $options['apsl_twitter_settings']['apsl_twitter_api_key'] ) ) {
150
- echo $options['apsl_twitter_settings']['apsl_twitter_api_key'];
151
- }
152
- ?>' />
153
  </div>
154
 
155
  <div class='apsl-app-secret-wrapper'>
156
  <label><?php _e( 'Consumer Secret (API Secret):', 'accesspress-social-login-lite' ); ?></label><input type='text' id='apsl-twitter-app-secret' name='apsl_twitter_settings[apsl_twitter_api_secret]' value='<?php
157
- if( isset( $options['apsl_twitter_settings']['apsl_twitter_api_secret'] ) ) {
158
- echo $options['apsl_twitter_settings']['apsl_twitter_api_secret'];
159
- }
160
- ?>' />
161
  </div>
162
 
163
  <input type='hidden' name='network_ordering[]' value='twitter' />
@@ -174,12 +168,12 @@ $options = get_option( APSL_SETTINGS );
174
  </ul>
175
 
176
  </div>
177
- </div>
178
  </div>
179
- <?php
180
- break;
181
- case 'google':
182
- ?>
183
  <div class='apsl-settings apsl-google-settings'>
184
  <!-- Google Settings -->
185
  <div class='apsl-label'><?php _e( "Google", 'accesspress-social-login-lite' ); ?> <span class='apsl_show_hide' id='apsl_show_hide_<?php echo $value; ?>'><i class="fa fa-caret-down"></i></span> </div>
@@ -190,17 +184,17 @@ $options = get_option( APSL_SETTINGS );
190
  </div>
191
  <div class='apsl-app-id-wrapper'>
192
  <label><?php _e( 'Client ID:', 'accesspress-social-login-lite' ); ?></label><input type='text' id='apsl-google-client-id' name='apsl_google_settings[apsl_google_client_id]' value='<?php
193
- if( isset( $options['apsl_google_settings']['apsl_google_client_id'] ) ) {
194
- echo $options['apsl_google_settings']['apsl_google_client_id'];
195
- }
196
- ?>' />
197
  </div>
198
  <div class='apsl-app-secret-wrapper'>
199
  <label><?php _e( 'Client Secret:', 'accesspress-social-login-lite' ); ?></label><input type='text' id='apsl-google-client-secret' name='apsl_google_settings[apsl_google_client_secret]' value='<?php
200
- if( isset( $options['apsl_google_settings']['apsl_google_client_secret'] ) ) {
201
- echo $options['apsl_google_settings']['apsl_google_client_secret'];
202
- }
203
- ?>' />
204
  </div>
205
  <input type='hidden' name='network_ordering[]' value='google' />
206
  <div class='apsl-info'>
@@ -230,17 +224,17 @@ $options = get_option( APSL_SETTINGS );
230
  </div>
231
  </div>
232
  </div>
233
- <?php
234
- break; ?>
235
-
236
- <?php
237
- default:
238
- echo "should not reach here";
239
- break;
240
- }
241
- ?>
242
- <?php
243
- endforeach; ?>
244
  </div>
245
  </div>
246
 
@@ -265,20 +259,20 @@ endforeach; ?>
265
  <div class='apsl_network_settings_wrapper' style='display:none'>
266
  <p><?php _e( 'Please choose the options where you want to display the social login form.', 'accesspress-social-login-lite' ); ?></p>
267
  <p><input type="checkbox" id="apsl_login_form" value="login_form" name="apsl_display_options[]" <?php
268
- if( in_array( "login_form", $options['apsl_display_options'] ) ) {
269
- echo "checked='checked'";
270
- }
271
- ?> ><label for="apsl_login_form"><?php _e( 'Login Form', 'accesspress-social-login-lite' ); ?> </label></p>
272
- <p><input type="checkbox" id="apsl_register_form" value="register_form" name="apsl_display_options[]" <?php
273
- if( in_array( "register_form", $options['apsl_display_options'] ) ) {
274
- echo "checked='checked'";
275
- }
276
- ?> ><label for="apsl_register_form"><?php _e( 'Register Form', 'accesspress-social-login-lite' ); ?> </label></p>
277
- <p><input type="checkbox" id="apsl_comment_form" value="comment_form" name="apsl_display_options[]" <?php
278
- if( in_array( "comment_form", $options['apsl_display_options'] ) ) {
279
- echo "checked='checked'";
280
- }
281
- ?> ><label for="apsl_comment_form"><?php _e( 'Comments', 'accesspress-social-login-lite' ); ?> </label></p>
282
  </div>
283
  </div>
284
  </div>
@@ -287,7 +281,7 @@ if( in_array( "comment_form", $options['apsl_display_options'] ) ) {
287
  <div class='apsl-themes-wrapper'>
288
  <div class="apsl-label"><?php _e( 'Available icon themes', 'accesspress-social-login-lite' ); ?> <span class='apsl_show_hide'><i class="fa fa-caret-down"></i></span> </div>
289
  <div class='apsl_network_settings_wrapper' style='display:none'>
290
- <?php for( $i = 1;$i <= 4;$i++ ): ?>
291
  <div class='apsl-theme apsl-theme-<?php echo $i; ?>'>
292
  <label><input type="radio" id="apsl-theme-<?php echo $i; ?>" value="<?php echo $i; ?>" class="apsl-theme apsl-png-theme" name="apsl_icon_theme" <?php checked( $i, $options['apsl_icon_theme'] ); ?> >
293
  <span><?php _e( 'Theme ' . $i, 'accesspress-social-login-lite' ); ?></span></label>
@@ -295,8 +289,8 @@ if( in_array( "comment_form", $options['apsl_display_options'] ) ) {
295
  <img src="<?php echo APSL_IMAGE_DIR; ?>/preview-<?php echo $i; ?>.jpg" alt="theme preview">
296
  </div>
297
  </div>
298
- <?php
299
- endfor; ?>
300
  </div>
301
  </div>
302
  </div>
@@ -307,12 +301,12 @@ endfor; ?>
307
  <div class='apsl_network_settings_wrapper' style='display:none'>
308
  <p class='apsl-title-text-field'>
309
  <span><?php _e( 'Login text:', 'accesspress-social-login-lite' ); ?></span> <input type='text' name='apsl_title_text_field' id='apsl-title-text' value='<?php
310
- if( isset( $options['apsl_title_text_field'] ) && $options['apsl_title_text_field'] != '' ) {
311
- echo $options['apsl_title_text_field'];
312
- }
313
- ?>' />
314
  </p>
315
- </div>
316
  </div>
317
  </div>
318
 
@@ -321,37 +315,37 @@ if( isset( $options['apsl_title_text_field'] ) && $options['apsl_title_text_fiel
321
  <div class="apsl-label"><?php _e( 'Logout redirect link', 'accesspress-social-login-lite' ); ?> <span class='apsl_show_hide'><i class="fa fa-caret-down"></i></span> </div>
322
  <div class='apsl_network_settings_wrapper' style='display:none'>
323
  <input type='radio' id='apsl_custom_logout_redirect_home' class='apsl_custom_logout_redirect_options' name='apsl_custom_logout_redirect_options' value='home' <?php
324
- if( isset( $options['apsl_custom_logout_redirect_options'] ) ) {
325
- checked( $options['apsl_custom_logout_redirect_options'], 'home', 'true' );
326
- }
327
- ?> /> <label for='apsl_custom_logout_redirect_home'><?php _e( 'Home page', 'accesspress-social-login-lite' ); ?></label><br /><br />
328
  <input type='radio' id='apsl_custom_logout_redirect_current' class='apsl_custom_logout_redirect_options' name='apsl_custom_logout_redirect_options' value='current_page' <?php
329
- if( isset( $options['apsl_custom_logout_redirect_options'] ) ) {
330
- checked( $options['apsl_custom_logout_redirect_options'], 'current_page', 'true' );
331
- }
332
- ?> /> <label for='apsl_custom_logout_redirect_current'><?php _e( 'Current page', 'accesspress-social-login-lite' ); ?></label><br /><br />
333
 
334
 
335
  <input type='radio' id='apsl_custom_logout_redirect_custom' class='apsl_custom_logout_redirect_options' name='apsl_custom_logout_redirect_options' value='custom_page' <?php
336
- if( isset( $options['apsl_custom_logout_redirect_options'] ) ) {
337
- checked( $options['apsl_custom_logout_redirect_options'], 'custom_page', 'true' );
338
- }
339
- ?> /> <label for='apsl_custom_logout_redirect_custom'><?php _e( 'Custom page', 'accesspress-social-login-lite' ); ?></label><br />
340
 
341
  <div class='apsl-custom-logout-redirect-link' <?php if( isset( $options['apsl_custom_logout_redirect_options'] ) ) {
342
- if( $options['apsl_custom_logout_redirect_options'] == 'custom_page' ) {
343
- ?> style='display: block' <?php
344
- }
345
- else { ?> style='display:none' <?php
346
- }
347
- }
348
- ?>>
349
  <p class='apsl-title-text-field'>
350
  <span><?php _e( 'Logout redirect page:', 'accesspress-social-login-lite' ); ?></span> <input type='text' name='apsl_custom_logout_redirect_link' id='apsl-custom-logout-redirect-link' value='<?php
351
- if( isset( $options['apsl_custom_logout_redirect_link'] ) && $options['apsl_custom_logout_redirect_link'] != '' ) {
352
- echo $options['apsl_custom_logout_redirect_link'];
353
- }
354
- ?>' />
355
  </p>
356
  <div class='apsl-info'>
357
  <span class='apsl-info-note'><?php _e( 'Note:', 'accesspress-social-login-lite' ); ?></span> <br />
@@ -368,15 +362,15 @@ if( isset( $options['apsl_custom_logout_redirect_link'] ) && $options['apsl_cust
368
  <div class="apsl-label"><?php _e( 'Login redirect link', 'accesspress-social-login-lite' ); ?> <span class='apsl_show_hide'><i class="fa fa-caret-down"></i></span> </div>
369
  <div class='apsl_network_settings_wrapper' style='display:none'>
370
  <input type='radio' id='apsl_custom_login_redirect_home' class='apsl_custom_login_redirect_options' name='apsl_custom_login_redirect_options' value='home' <?php
371
- if( isset( $options['apsl_custom_login_redirect_options'] ) ) {
372
- checked( $options['apsl_custom_login_redirect_options'], 'home', 'true' );
373
- }
374
- ?> /> <label for='apsl_custom_login_redirect_home'><?php _e( 'Home page', 'accesspress-social-login-lite' ); ?></label><br /><br />
375
  <input type='radio' id='apsl_custom_login_redirect_current' class='apsl_custom_login_redirect_options' name='apsl_custom_login_redirect_options' value='current_page' <?php
376
- if( isset( $options['apsl_custom_login_redirect_options'] ) ) {
377
- checked( $options['apsl_custom_login_redirect_options'], 'current_page', 'true' );
378
- }
379
- ?> /> <label for='apsl_custom_login_redirect_current'><?php _e( 'Current page', 'accesspress-social-login-lite' ); ?></label><br /><br />
380
  <div class='apsl-custom-login-redirect-link1' >
381
  <div class='apsl-info'>
382
  <span class='apsl-info-note'><?php _e( 'Note:', 'accesspress-social-login-lite' ); ?></span> <br />
@@ -384,25 +378,25 @@ if( isset( $options['apsl_custom_login_redirect_options'] ) ) {
384
  </div>
385
  </div>
386
  <input type='radio' id='apsl_custom_login_redirect_custom' class='apsl_custom_login_redirect_options' name='apsl_custom_login_redirect_options' value='custom_page' <?php
387
- if( isset( $options['apsl_custom_login_redirect_options'] ) ) {
388
- checked( $options['apsl_custom_login_redirect_options'], 'custom_page', 'true' );
389
- }
390
- ?> /> <label for='apsl_custom_login_redirect_custom'><?php _e( 'Custom page', 'accesspress-social-login-lite' ); ?></label><br />
391
 
392
  <div class='apsl-custom-login-redirect-link' <?php if( isset( $options['apsl_custom_login_redirect_options'] ) ) {
393
- if( $options['apsl_custom_login_redirect_options'] == 'custom_page' ) {
394
- ?> style='display: block' <?php
395
- }
396
- else { ?> style='display:none' <?php
397
- }
398
- }
399
- ?>>
400
  <p class='apsl-title-text-field'>
401
  <span><?php _e( 'Login redirect page:', 'accesspress-social-login-lite' ); ?></span> <input type='text' name='apsl_custom_login_redirect_link' id='apsl-custom-login-redirect-link' value='<?php
402
- if( isset( $options['apsl_custom_login_redirect_link'] ) && $options['apsl_custom_login_redirect_link'] != '' ) {
403
- echo $options['apsl_custom_login_redirect_link'];
404
- }
405
- ?>' />
406
  </p>
407
  <div class='apsl-info'>
408
  <span class='apsl-info-note'><?php _e( 'Note:', 'accesspress-social-login-lite' ); ?></span> <br />
@@ -418,15 +412,15 @@ if( isset( $options['apsl_custom_login_redirect_link'] ) && $options['apsl_custo
418
  <div class="apsl-label"><?php _e( 'User avatar', 'accesspress-social-login-lite' ); ?> <span class='apsl_show_hide'><i class="fa fa-caret-down"></i></span> </div>
419
  <div class='apsl_network_settings_wrapper apsl_network_settings_outer' style='display:none'>
420
  <input type='radio' id='apsl_user_avatar_default' class='apsl_user_avatar_options' name='apsl_user_avatar_options' value='default' <?php
421
- if( isset( $options['apsl_user_avatar_options'] ) ) {
422
- checked( $options['apsl_user_avatar_options'], 'default', 'true' );
423
- }
424
- ?> /> <label for='apsl_user_avatar_default'><?php _e( 'Use wordpress provided default avatar.', 'accesspress-social-login-lite' ); ?></label><br /><br />
425
  <input type='radio' id='apsl_user_avatar_social' class='apsl_user_avatar_options' name='apsl_user_avatar_options' value='social' <?php
426
- if( isset( $options['apsl_user_avatar_options'] ) ) {
427
- checked( $options['apsl_user_avatar_options'], 'social', 'true' );
428
- }
429
- ?> /> <label for='apsl_user_avatar_social'><?php _e( 'Use the profile picture from social media where available.', 'accesspress-social-login-lite' ); ?></label><br /><br />
430
  <div class='apsl-info'>
431
  <span class='apsl-info-note'><?php _e( 'Note:', 'accesspress-social-login-lite' ); ?></span> <br />
432
  <span class='apsl-info-content'>Please choose the options from where you want your users avatar to be loaded from. If you choose default wordpress avatar it will use the gravatar profile image if user have gravatar profile assocated with their registered email address.</span>
@@ -440,15 +434,15 @@ if( isset( $options['apsl_user_avatar_options'] ) ) {
440
  <div class="apsl-label"><?php _e( 'Email notification settings', 'accesspress-social-login-lite' ); ?> <span class='apsl_show_hide'><i class="fa fa-caret-down"></i></span> </div>
441
  <div class='apsl_network_settings_wrapper apsl_network_settings_outer' style='display:none'>
442
  <input type='radio' id='apsl_send_email_notification_yes' class='apsl_send_email_notification_yes' name='apsl_send_email_notification_options' value='yes' <?php
443
- if( isset( $options['apsl_send_email_notification_options'] ) ) {
444
- checked( $options['apsl_send_email_notification_options'], 'yes', 'true' );
445
- }
446
- ?> /> <label for='apsl_send_email_notification_yes'><?php _e( 'Send email notification to both user and site admin.', 'accesspress-social-login-lite' ); ?></label><br /><br />
447
  <input type='radio' id='apsl_send_email_notification_no' class='apsl_send_email_notification_no' name='apsl_send_email_notification_options' value='no' <?php
448
- if( isset( $options['apsl_send_email_notification_options'] ) ) {
449
- checked( $options['apsl_send_email_notification_options'], 'no', 'true' );
450
- }
451
- ?> /> <label for='apsl_send_email_notification_no'><?php _e( 'Do not send email notification to both user and site admin.', 'accesspress-social-login-lite' ); ?></label><br /><br />
452
  <div class='apsl-info'>
453
  <span class='apsl-info-note'><?php _e( 'Note:', 'accesspress-social-login-lite' ); ?></span> <br />
454
  <span class='apsl-info-content'>Here you can configure an options to send email notifications about user registration to site admin and user.</span>
@@ -462,22 +456,22 @@ if( isset( $options['apsl_send_email_notification_options'] ) ) {
462
 
463
  <!-- how to use section -->
464
  <div class='apsl-tab-contents' id='tab-apsl-how-to-use' style="display:none">
465
- <?php include( APSL_PLUGIN_DIR . 'inc/backend/how-to-use.php' ); ?>
466
  </div>
467
 
468
  <!-- about section -->
469
  <div class='apsl-tab-contents' id='tab-apsl-about' style="display:none">
470
- <?php include( APSL_PLUGIN_DIR . 'inc/backend/about.php' ); ?>
471
  </div>
472
 
473
  <!-- Save settings Button -->
474
  <div class='apsl-save-settings'>
475
- <?php wp_nonce_field( 'apsl_nonce_save_settings', 'apsl_settings_action' ); ?>
476
  <input type='submit' class='apsl-submit-settings primary-button' name='apsl_save_settings' value='<?php _e( 'Save settings', 'accesspress-social-login-lite' ); ?>' />
477
  </div>
478
 
479
  <div class='apsl-restore-settings'>
480
- <?php $nonce = wp_create_nonce( 'apsl-restore-default-settings-nonce' ); ?>
481
  <a href="<?php echo admin_url() . 'admin-post.php?action=apsl_restore_default_settings&_wpnonce=' . $nonce; ?>" onclick="return confirm('<?php _e( 'Are you sure you want to restore default settings?', 'accesspress-social-login-lite' ); ?>')"><input type="button" value="Restore Default Settings" class="apsl-reset-button button primary-button"/></a>
482
  </div>
483
 
1
  <?php defined( 'ABSPATH' ) or die( "No script kiddies please!" ); ?>
2
+ <div class="wrap">
3
+ <div class='apsl-outer-wrapper'>
4
  <div class="apsl-setting-header clearfix">
 
5
  <div class="apsl-headerlogo">
6
  <div class="logo-wrap"> <img src="<?php echo APSL_IMAGE_DIR; ?>/logo.png" alt="<?php esc_attr_e( 'AccessPress Social Login Lite', 'accesspress-social-login-lite' ); ?>" /></div>
7
  <div class="logo-content"><?php esc_attr_e( 'AccessPress Social Login Lite', 'accesspress-social-login-lite' ); ?><br />
29
 
30
  </div>
31
  </div>
 
32
  </div>
33
  <div class="clear"></div>
34
  </div>
35
  <div class="clear"></div>
36
 
37
+ <?php $options = get_option( APSL_SETTINGS );
38
+ if( isset( $_SESSION['apsl_message'] ) ) { ?>
 
 
 
39
  <div class="apsl-message">
40
+ <p> <?php echo $_SESSION['apsl_message']; unset( $_SESSION['apsl_message'] ); ?> </p>
 
 
41
  </div>
42
+ <?php
43
+ } ?>
44
  <div class='apsl-networks'>
45
  <div class='apsl-network-options'>
46
  <form method="post" action="<?php echo admin_url() . 'admin-post.php' ?>">
59
  <div class='apsl-tab-contents' id='tab-apsl-networks-settings'>
60
 
61
  <div class='network-settings'>
62
+ <?php
63
+ foreach( $options['network_ordering'] as $key => $value ): ?>
64
  <?php
65
+ switch( $value ) {
66
+ case 'facebook':
67
+ ?>
68
  <div class='apsl-settings apsl-facebook-settings'>
69
  <!-- Facebook Settings -->
70
  <div class='apsl-label'><?php _e( "Facebook", 'accesspress-social-login-lite' ); ?><span class='apsl_show_hide' id='apsl_show_hide_<?php echo $value; ?>'><i class="fa fa-caret-down"></i></span> </div>
76
  </div>
77
  <div class='apsl-app-id-wrapper'>
78
  <label><?php _e( 'App ID:', 'accesspress-social-login-lite' ); ?></label><input type='text' id='apsl-facebook-app-id' name='apsl_facebook_settings[apsl_facebook_app_id]' value='<?php
79
+ if( isset( $options['apsl_facebook_settings']['apsl_facebook_app_id'] ) ) {
80
+ echo $options['apsl_facebook_settings']['apsl_facebook_app_id'];
81
+ }
82
+ ?>' />
83
  </div>
84
  <div class='apsl-app-secret-wrapper'>
85
  <label><?php _e( 'App Secret:', 'accesspress-social-login-lite' ); ?></label><input type='text' id='apsl-facebook-app-secret' name='apsl_facebook_settings[apsl_facebook_app_secret]' value='<?php
86
+ if( isset( $options['apsl_facebook_settings']['apsl_facebook_app_secret'] ) ) {
87
+ echo $options['apsl_facebook_settings']['apsl_facebook_app_secret'];
88
+ }
89
+ ?>' />
90
  </div>
91
 
92
  <div class='apsl-fb-profile-image-size'>
102
  echo $options['apsl_facebook_settings']['apsl_profile_image_height'];
103
  }
104
  ?>' style="width: 60px;" /> px
105
+ <div class='apsl-info'>Please note that the facebook might not provide the exact dimention of the image as settings above.</div>
106
  </div>
107
  <div class='apsl-info'>
108
  <span class='apsl-info-note'><?php _e( 'Note:', 'accesspress-social-login-lite' ); ?></span> <br />
124
  </div>
125
  </div>
126
  </div>
127
+ <?php
128
+ break; ?>
129
 
130
+ <?php
131
+ case 'twitter': ?>
132
  <div class='apsl-settings apsl-twitter-settings'>
133
  <!-- Twitter Settings -->
134
  <div class='apsl-label'><?php _e( "Twitter", 'accesspress-social-login-lite' ); ?> <span class='apsl_show_hide' id='apsl_show_hide_<?php echo $value; ?>'><i class="fa fa-caret-down"></i></span> </div>
140
 
141
  <div class='apsl-app-id-wrapper'>
142
  <label><?php _e( 'Consumer Key (API Key):', 'accesspress-social-login-lite' ); ?></label><input type='text' id='apsl-twitter-app-id' name='apsl_twitter_settings[apsl_twitter_api_key]' value='<?php
143
+ if( isset( $options['apsl_twitter_settings']['apsl_twitter_api_key'] ) ) {
144
+ echo $options['apsl_twitter_settings']['apsl_twitter_api_key'];
145
+ }
146
+ ?>' />
147
  </div>
148
 
149
  <div class='apsl-app-secret-wrapper'>
150
  <label><?php _e( 'Consumer Secret (API Secret):', 'accesspress-social-login-lite' ); ?></label><input type='text' id='apsl-twitter-app-secret' name='apsl_twitter_settings[apsl_twitter_api_secret]' value='<?php
151
+ if( isset( $options['apsl_twitter_settings']['apsl_twitter_api_secret'] ) ) {
152
+ echo $options['apsl_twitter_settings']['apsl_twitter_api_secret'];
153
+ }
154
+ ?>' />
155
  </div>
156
 
157
  <input type='hidden' name='network_ordering[]' value='twitter' />
168
  </ul>
169
 
170
  </div>
171
+ </div>
172
  </div>
173
+ <?php
174
+ break;
175
+ case 'google':
176
+ ?>
177
  <div class='apsl-settings apsl-google-settings'>
178
  <!-- Google Settings -->
179
  <div class='apsl-label'><?php _e( "Google", 'accesspress-social-login-lite' ); ?> <span class='apsl_show_hide' id='apsl_show_hide_<?php echo $value; ?>'><i class="fa fa-caret-down"></i></span> </div>
184
  </div>
185
  <div class='apsl-app-id-wrapper'>
186
  <label><?php _e( 'Client ID:', 'accesspress-social-login-lite' ); ?></label><input type='text' id='apsl-google-client-id' name='apsl_google_settings[apsl_google_client_id]' value='<?php
187
+ if( isset( $options['apsl_google_settings']['apsl_google_client_id'] ) ) {
188
+ echo $options['apsl_google_settings']['apsl_google_client_id'];
189
+ }
190
+ ?>' />
191
  </div>
192
  <div class='apsl-app-secret-wrapper'>
193
  <label><?php _e( 'Client Secret:', 'accesspress-social-login-lite' ); ?></label><input type='text' id='apsl-google-client-secret' name='apsl_google_settings[apsl_google_client_secret]' value='<?php
194
+ if( isset( $options['apsl_google_settings']['apsl_google_client_secret'] ) ) {
195
+ echo $options['apsl_google_settings']['apsl_google_client_secret'];
196
+ }
197
+ ?>' />
198
  </div>
199
  <input type='hidden' name='network_ordering[]' value='google' />
200
  <div class='apsl-info'>
224
  </div>
225
  </div>
226
  </div>
227
+ <?php
228
+ break; ?>
229
+
230
+ <?php
231
+ default:
232
+ echo "should not reach here";
233
+ break;
234
+ }
235
+ ?>
236
+ <?php
237
+ endforeach; ?>
238
  </div>
239
  </div>
240
 
259
  <div class='apsl_network_settings_wrapper' style='display:none'>
260
  <p><?php _e( 'Please choose the options where you want to display the social login form.', 'accesspress-social-login-lite' ); ?></p>
261
  <p><input type="checkbox" id="apsl_login_form" value="login_form" name="apsl_display_options[]" <?php
262
+ if( in_array( "login_form", $options['apsl_display_options'] ) ) {
263
+ echo "checked='checked'";
264
+ }
265
+ ?> ><label for="apsl_login_form"><?php _e( 'Login Form', 'accesspress-social-login-lite' ); ?> </label></p>
266
+ <p><input type="checkbox" id="apsl_register_form" value="register_form" name="apsl_display_options[]" <?php
267
+ if( in_array( "register_form", $options['apsl_display_options'] ) ) {
268
+ echo "checked='checked'";
269
+ }
270
+ ?> ><label for="apsl_register_form"><?php _e( 'Register Form', 'accesspress-social-login-lite' ); ?> </label></p>
271
+ <p><input type="checkbox" id="apsl_comment_form" value="comment_form" name="apsl_display_options[]" <?php
272
+ if( in_array( "comment_form", $options['apsl_display_options'] ) ) {
273
+ echo "checked='checked'";
274
+ }
275
+ ?> ><label for="apsl_comment_form"><?php _e( 'Comments', 'accesspress-social-login-lite' ); ?> </label></p>
276
  </div>
277
  </div>
278
  </div>
281
  <div class='apsl-themes-wrapper'>
282
  <div class="apsl-label"><?php _e( 'Available icon themes', 'accesspress-social-login-lite' ); ?> <span class='apsl_show_hide'><i class="fa fa-caret-down"></i></span> </div>
283
  <div class='apsl_network_settings_wrapper' style='display:none'>
284
+ <?php for( $i = 1;$i <= 4;$i++ ): ?>
285
  <div class='apsl-theme apsl-theme-<?php echo $i; ?>'>
286
  <label><input type="radio" id="apsl-theme-<?php echo $i; ?>" value="<?php echo $i; ?>" class="apsl-theme apsl-png-theme" name="apsl_icon_theme" <?php checked( $i, $options['apsl_icon_theme'] ); ?> >
287
  <span><?php _e( 'Theme ' . $i, 'accesspress-social-login-lite' ); ?></span></label>
289
  <img src="<?php echo APSL_IMAGE_DIR; ?>/preview-<?php echo $i; ?>.jpg" alt="theme preview">
290
  </div>
291
  </div>
292
+ <?php
293
+ endfor; ?>
294
  </div>
295
  </div>
296
  </div>
301
  <div class='apsl_network_settings_wrapper' style='display:none'>
302
  <p class='apsl-title-text-field'>
303
  <span><?php _e( 'Login text:', 'accesspress-social-login-lite' ); ?></span> <input type='text' name='apsl_title_text_field' id='apsl-title-text' value='<?php
304
+ if( isset( $options['apsl_title_text_field'] ) && $options['apsl_title_text_field'] != '' ) {
305
+ echo $options['apsl_title_text_field'];
306
+ }
307
+ ?>' />
308
  </p>
309
+ </div>
310
  </div>
311
  </div>
312
 
315
  <div class="apsl-label"><?php _e( 'Logout redirect link', 'accesspress-social-login-lite' ); ?> <span class='apsl_show_hide'><i class="fa fa-caret-down"></i></span> </div>
316
  <div class='apsl_network_settings_wrapper' style='display:none'>
317
  <input type='radio' id='apsl_custom_logout_redirect_home' class='apsl_custom_logout_redirect_options' name='apsl_custom_logout_redirect_options' value='home' <?php
318
+ if( isset( $options['apsl_custom_logout_redirect_options'] ) ) {
319
+ checked( $options['apsl_custom_logout_redirect_options'], 'home', 'true' );
320
+ }
321
+ ?> /> <label for='apsl_custom_logout_redirect_home'><?php _e( 'Home page', 'accesspress-social-login-lite' ); ?></label><br /><br />
322
  <input type='radio' id='apsl_custom_logout_redirect_current' class='apsl_custom_logout_redirect_options' name='apsl_custom_logout_redirect_options' value='current_page' <?php
323
+ if( isset( $options['apsl_custom_logout_redirect_options'] ) ) {
324
+ checked( $options['apsl_custom_logout_redirect_options'], 'current_page', 'true' );
325
+ }
326
+ ?> /> <label for='apsl_custom_logout_redirect_current'><?php _e( 'Current page', 'accesspress-social-login-lite' ); ?></label><br /><br />
327
 
328
 
329
  <input type='radio' id='apsl_custom_logout_redirect_custom' class='apsl_custom_logout_redirect_options' name='apsl_custom_logout_redirect_options' value='custom_page' <?php
330
+ if( isset( $options['apsl_custom_logout_redirect_options'] ) ) {
331
+ checked( $options['apsl_custom_logout_redirect_options'], 'custom_page', 'true' );
332
+ }
333
+ ?> /> <label for='apsl_custom_logout_redirect_custom'><?php _e( 'Custom page', 'accesspress-social-login-lite' ); ?></label><br />
334
 
335
  <div class='apsl-custom-logout-redirect-link' <?php if( isset( $options['apsl_custom_logout_redirect_options'] ) ) {
336
+ if( $options['apsl_custom_logout_redirect_options'] == 'custom_page' ) {
337
+ ?> style='display: block' <?php
338
+ }
339
+ else { ?> style='display:none' <?php
340
+ }
341
+ }
342
+ ?>>
343
  <p class='apsl-title-text-field'>
344
  <span><?php _e( 'Logout redirect page:', 'accesspress-social-login-lite' ); ?></span> <input type='text' name='apsl_custom_logout_redirect_link' id='apsl-custom-logout-redirect-link' value='<?php
345
+ if( isset( $options['apsl_custom_logout_redirect_link'] ) && $options['apsl_custom_logout_redirect_link'] != '' ) {
346
+ echo $options['apsl_custom_logout_redirect_link'];
347
+ }
348
+ ?>' />
349
  </p>
350
  <div class='apsl-info'>
351
  <span class='apsl-info-note'><?php _e( 'Note:', 'accesspress-social-login-lite' ); ?></span> <br />
362
  <div class="apsl-label"><?php _e( 'Login redirect link', 'accesspress-social-login-lite' ); ?> <span class='apsl_show_hide'><i class="fa fa-caret-down"></i></span> </div>
363
  <div class='apsl_network_settings_wrapper' style='display:none'>
364
  <input type='radio' id='apsl_custom_login_redirect_home' class='apsl_custom_login_redirect_options' name='apsl_custom_login_redirect_options' value='home' <?php
365
+ if( isset( $options['apsl_custom_login_redirect_options'] ) ) {
366
+ checked( $options['apsl_custom_login_redirect_options'], 'home', 'true' );
367
+ }
368
+ ?> /> <label for='apsl_custom_login_redirect_home'><?php _e( 'Home page', 'accesspress-social-login-lite' ); ?></label><br /><br />
369
  <input type='radio' id='apsl_custom_login_redirect_current' class='apsl_custom_login_redirect_options' name='apsl_custom_login_redirect_options' value='current_page' <?php
370
+ if( isset( $options['apsl_custom_login_redirect_options'] ) ) {
371
+ checked( $options['apsl_custom_login_redirect_options'], 'current_page', 'true' );
372
+ }
373
+ ?> /> <label for='apsl_custom_login_redirect_current'><?php _e( 'Current page', 'accesspress-social-login-lite' ); ?></label><br /><br />
374
  <div class='apsl-custom-login-redirect-link1' >
375
  <div class='apsl-info'>
376
  <span class='apsl-info-note'><?php _e( 'Note:', 'accesspress-social-login-lite' ); ?></span> <br />
378
  </div>
379
  </div>
380
  <input type='radio' id='apsl_custom_login_redirect_custom' class='apsl_custom_login_redirect_options' name='apsl_custom_login_redirect_options' value='custom_page' <?php
381
+ if( isset( $options['apsl_custom_login_redirect_options'] ) ) {
382
+ checked( $options['apsl_custom_login_redirect_options'], 'custom_page', 'true' );
383
+ }
384
+ ?> /> <label for='apsl_custom_login_redirect_custom'><?php _e( 'Custom page', 'accesspress-social-login-lite' ); ?></label><br />
385
 
386
  <div class='apsl-custom-login-redirect-link' <?php if( isset( $options['apsl_custom_login_redirect_options'] ) ) {
387
+ if( $options['apsl_custom_login_redirect_options'] == 'custom_page' ) {
388
+ ?> style='display: block' <?php
389
+ }
390
+ else { ?> style='display:none' <?php
391
+ }
392
+ }
393
+ ?>>
394
  <p class='apsl-title-text-field'>
395
  <span><?php _e( 'Login redirect page:', 'accesspress-social-login-lite' ); ?></span> <input type='text' name='apsl_custom_login_redirect_link' id='apsl-custom-login-redirect-link' value='<?php
396
+ if( isset( $options['apsl_custom_login_redirect_link'] ) && $options['apsl_custom_login_redirect_link'] != '' ) {
397
+ echo $options['apsl_custom_login_redirect_link'];
398
+ }
399
+ ?>' />
400
  </p>
401
  <div class='apsl-info'>
402
  <span class='apsl-info-note'><?php _e( 'Note:', 'accesspress-social-login-lite' ); ?></span> <br />
412
  <div class="apsl-label"><?php _e( 'User avatar', 'accesspress-social-login-lite' ); ?> <span class='apsl_show_hide'><i class="fa fa-caret-down"></i></span> </div>
413
  <div class='apsl_network_settings_wrapper apsl_network_settings_outer' style='display:none'>
414
  <input type='radio' id='apsl_user_avatar_default' class='apsl_user_avatar_options' name='apsl_user_avatar_options' value='default' <?php
415
+ if( isset( $options['apsl_user_avatar_options'] ) ) {
416
+ checked( $options['apsl_user_avatar_options'], 'default', 'true' );
417
+ }
418
+ ?> /> <label for='apsl_user_avatar_default'><?php _e( 'Use wordpress provided default avatar.', 'accesspress-social-login-lite' ); ?></label><br /><br />
419
  <input type='radio' id='apsl_user_avatar_social' class='apsl_user_avatar_options' name='apsl_user_avatar_options' value='social' <?php
420
+ if( isset( $options['apsl_user_avatar_options'] ) ) {
421
+ checked( $options['apsl_user_avatar_options'], 'social', 'true' );
422
+ }
423
+ ?> /> <label for='apsl_user_avatar_social'><?php _e( 'Use the profile picture from social media where available.', 'accesspress-social-login-lite' ); ?></label><br /><br />
424
  <div class='apsl-info'>
425
  <span class='apsl-info-note'><?php _e( 'Note:', 'accesspress-social-login-lite' ); ?></span> <br />
426
  <span class='apsl-info-content'>Please choose the options from where you want your users avatar to be loaded from. If you choose default wordpress avatar it will use the gravatar profile image if user have gravatar profile assocated with their registered email address.</span>
434
  <div class="apsl-label"><?php _e( 'Email notification settings', 'accesspress-social-login-lite' ); ?> <span class='apsl_show_hide'><i class="fa fa-caret-down"></i></span> </div>
435
  <div class='apsl_network_settings_wrapper apsl_network_settings_outer' style='display:none'>
436
  <input type='radio' id='apsl_send_email_notification_yes' class='apsl_send_email_notification_yes' name='apsl_send_email_notification_options' value='yes' <?php
437
+ if( isset( $options['apsl_send_email_notification_options'] ) ) {
438
+ checked( $options['apsl_send_email_notification_options'], 'yes', 'true' );
439
+ }
440
+ ?> /> <label for='apsl_send_email_notification_yes'><?php _e( 'Send email notification to both user and site admin.', 'accesspress-social-login-lite' ); ?></label><br /><br />
441
  <input type='radio' id='apsl_send_email_notification_no' class='apsl_send_email_notification_no' name='apsl_send_email_notification_options' value='no' <?php
442
+ if( isset( $options['apsl_send_email_notification_options'] ) ) {
443
+ checked( $options['apsl_send_email_notification_options'], 'no', 'true' );
444
+ }
445
+ ?> /> <label for='apsl_send_email_notification_no'><?php _e( 'Do not send email notification to both user and site admin.', 'accesspress-social-login-lite' ); ?></label><br /><br />
446
  <div class='apsl-info'>
447
  <span class='apsl-info-note'><?php _e( 'Note:', 'accesspress-social-login-lite' ); ?></span> <br />
448
  <span class='apsl-info-content'>Here you can configure an options to send email notifications about user registration to site admin and user.</span>
456
 
457
  <!-- how to use section -->
458
  <div class='apsl-tab-contents' id='tab-apsl-how-to-use' style="display:none">
459
+ <?php include( APSL_PLUGIN_DIR . 'inc/backend/how-to-use.php' ); ?>
460
  </div>
461
 
462
  <!-- about section -->
463
  <div class='apsl-tab-contents' id='tab-apsl-about' style="display:none">
464
+ <?php include( APSL_PLUGIN_DIR . 'inc/backend/about.php' ); ?>
465
  </div>
466
 
467
  <!-- Save settings Button -->
468
  <div class='apsl-save-settings'>
469
+ <?php wp_nonce_field( 'apsl_nonce_save_settings', 'apsl_settings_action' ); ?>
470
  <input type='submit' class='apsl-submit-settings primary-button' name='apsl_save_settings' value='<?php _e( 'Save settings', 'accesspress-social-login-lite' ); ?>' />
471
  </div>
472
 
473
  <div class='apsl-restore-settings'>
474
+ <?php $nonce = wp_create_nonce( 'apsl-restore-default-settings-nonce' ); ?>
475
  <a href="<?php echo admin_url() . 'admin-post.php?action=apsl_restore_default_settings&_wpnonce=' . $nonce; ?>" onclick="return confirm('<?php _e( 'Are you sure you want to restore default settings?', 'accesspress-social-login-lite' ); ?>')"><input type="button" value="Restore Default Settings" class="apsl-reset-button button primary-button"/></a>
476
  </div>
477
 
inc/frontend/login_check.php CHANGED
@@ -786,7 +786,7 @@ if( !class_exists( 'APSL_Lite_Login_Check_Class' ) ) {
786
  }
787
 
788
  } //termination of a class
789
-
790
  } //end of if statement
791
 
792
  $apsl_login_check = new APSL_Lite_Login_Check_Class();
786
  }
787
 
788
  } //termination of a class
789
+
790
  } //end of if statement
791
 
792
  $apsl_login_check = new APSL_Lite_Login_Check_Class();
inc/frontend/login_integration.php CHANGED
@@ -13,10 +13,10 @@ $encoded_url = urlencode( $redirect_to );
13
  <?php _e( 'You have Access Denied. Please authorize the app to login.', 'accesspress-social-login-lite' ); ?>
14
  </div>
15
  <?php } ?>
16
-
17
  <div class='social-networks'>
18
- <?php foreach ( $options['network_ordering'] as $key => $value ): ?>
19
- <?php if ( $options["apsl_{$value}_settings"]["apsl_{$value}_enable"] === 'enable' ) { ?>
 
20
  <a href="<?php echo wp_login_url(); ?>?apsl_login_id=<?php echo $value; ?>_login<?php
21
  if ( $encoded_url ) {
22
  echo "&state=" . base64_encode( "redirect_to=$encoded_url" );
@@ -31,7 +31,9 @@ $encoded_url = urlencode( $redirect_to );
31
  <span class="apsl-long-login-text"><?php _e( 'Login with', 'accesspress-social-login-lite' ); ?><?php echo ' ' . $value; ?></span>
32
  </div>
33
  </a>
34
- <?php } ?>
35
- <?php endforeach; ?>
 
 
36
  </div>
37
  </div>
13
  <?php _e( 'You have Access Denied. Please authorize the app to login.', 'accesspress-social-login-lite' ); ?>
14
  </div>
15
  <?php } ?>
 
16
  <div class='social-networks'>
17
+ <?php
18
+ foreach ( $options['network_ordering'] as $key => $value ):
19
+ if ( $options["apsl_{$value}_settings"]["apsl_{$value}_enable"] === 'enable' ) { ?>
20
  <a href="<?php echo wp_login_url(); ?>?apsl_login_id=<?php echo $value; ?>_login<?php
21
  if ( $encoded_url ) {
22
  echo "&state=" . base64_encode( "redirect_to=$encoded_url" );
31
  <span class="apsl-long-login-text"><?php _e( 'Login with', 'accesspress-social-login-lite' ); ?><?php echo ' ' . $value; ?></span>
32
  </div>
33
  </a>
34
+ <?php
35
+ }
36
+ endforeach;
37
+ ?>
38
  </div>
39
  </div>
inc/frontend/shortcode.php CHANGED
@@ -1,6 +1,6 @@
1
- <?php defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); ?>
2
- <?php $options = get_option( APSL_SETTINGS ); ?>
3
  <?php
 
 
4
  if ( is_user_logged_in() ) {
5
  global $current_user;
6
  $user_info = "<span class='display-name'>{$current_user->data->display_name}</span>&nbsp;";
@@ -30,14 +30,10 @@ if ( is_user_logged_in() ) {
30
  ?><div class="user-login"><?php _e('Welcome', 'accesspress-social-login-lite'); ?> <b><?php echo $user_info; ?></b>&nbsp;|&nbsp;<a href="<?php echo $user_logout_url; ?>" title="<?php _e('Logout', 'accesspress-social-login-lite'); ?>"><?php _e('Logout', 'accesspress-social-login-lite'); ?></a></div>
31
  <?php
32
  } else {
33
- ?>
34
- <?php
35
  $current_url = APSL_Lite_Login_Check_Class:: curPageURL();
36
  $encoded_url = urlencode( $current_url );
 
37
  ?>
38
-
39
- <?php $theme = $options['apsl_icon_theme']; ?>
40
-
41
  <div class='apsl-login-networks theme-<?php echo $theme; ?> clearfix'>
42
  <?php if ( isset( $attr['login_text'] ) && $attr['login_text'] != '' ) { ?>
43
  <span class='apsl-login-new-text'><?php echo $attr['login_text']; ?></span>
@@ -46,24 +42,24 @@ if ( is_user_logged_in() ) {
46
  <div class='apsl-error'><?php _e( 'You have Access Denied. Please authorize the app to login.', 'accesspress-social-login-lite' ); ?></div>
47
  <?php } ?>
48
  <div class='social-networks'>
49
- <?php foreach ( $options['network_ordering'] as $key => $value ): ?>
50
- <?php if ( $options["apsl_{$value}_settings"]["apsl_{$value}_enable"] === 'enable' ) { ?>
 
51
  <a href="<?php echo wp_login_url() ?>?apsl_login_id=<?php echo $value; ?>_login<?php
52
  if ( $encoded_url ) {
53
  echo "&state=" . base64_encode( "redirect_to=$encoded_url" );
54
  }
55
- ?>" title='<?php
56
- _e( 'Login with', 'accesspress-social-login-lite' );
57
- echo ' ' . $value;
58
- ?>'>
59
  <div class="apsl-icon-block icon-<?php echo $value; ?>">
60
  <i class="fa fa-<?php echo $value; ?>"></i>
61
  <span class="apsl-login-text"><?php _e( 'Login', 'accesspress-social-login-lite' ); ?></span>
62
  <span class="apsl-long-login-text"><?php _e( 'Login with', 'accesspress-social-login-lite' ); ?><?php echo ' ' . $value; ?></span>
63
  </div>
64
  </a>
65
- <?php } ?>
66
- <?php endforeach; ?>
 
 
67
  </div>
68
  </div>
69
  <?php
 
 
1
  <?php
2
+ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
+ $options = get_option( APSL_SETTINGS );
4
  if ( is_user_logged_in() ) {
5
  global $current_user;
6
  $user_info = "<span class='display-name'>{$current_user->data->display_name}</span>&nbsp;";
30
  ?><div class="user-login"><?php _e('Welcome', 'accesspress-social-login-lite'); ?> <b><?php echo $user_info; ?></b>&nbsp;|&nbsp;<a href="<?php echo $user_logout_url; ?>" title="<?php _e('Logout', 'accesspress-social-login-lite'); ?>"><?php _e('Logout', 'accesspress-social-login-lite'); ?></a></div>
31
  <?php
32
  } else {
 
 
33
  $current_url = APSL_Lite_Login_Check_Class:: curPageURL();
34
  $encoded_url = urlencode( $current_url );
35
+ $theme = $options['apsl_icon_theme'];
36
  ?>
 
 
 
37
  <div class='apsl-login-networks theme-<?php echo $theme; ?> clearfix'>
38
  <?php if ( isset( $attr['login_text'] ) && $attr['login_text'] != '' ) { ?>
39
  <span class='apsl-login-new-text'><?php echo $attr['login_text']; ?></span>
42
  <div class='apsl-error'><?php _e( 'You have Access Denied. Please authorize the app to login.', 'accesspress-social-login-lite' ); ?></div>
43
  <?php } ?>
44
  <div class='social-networks'>
45
+ <?php
46
+ foreach ( $options['network_ordering'] as $key => $value ):
47
+ if ( $options["apsl_{$value}_settings"]["apsl_{$value}_enable"] === 'enable' ) { ?>
48
  <a href="<?php echo wp_login_url() ?>?apsl_login_id=<?php echo $value; ?>_login<?php
49
  if ( $encoded_url ) {
50
  echo "&state=" . base64_encode( "redirect_to=$encoded_url" );
51
  }
52
+ ?>" title='<?php _e( 'Login with', 'accesspress-social-login-lite' ); echo ' ' . $value; ?>'>
 
 
 
53
  <div class="apsl-icon-block icon-<?php echo $value; ?>">
54
  <i class="fa fa-<?php echo $value; ?>"></i>
55
  <span class="apsl-login-text"><?php _e( 'Login', 'accesspress-social-login-lite' ); ?></span>
56
  <span class="apsl-long-login-text"><?php _e( 'Login with', 'accesspress-social-login-lite' ); ?><?php echo ' ' . $value; ?></span>
57
  </div>
58
  </a>
59
+ <?php
60
+ }
61
+ endforeach;
62
+ ?>
63
  </div>
64
  </div>
65
  <?php
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.7
7
- Stable tag: 3.2.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -137,6 +137,9 @@ Yes. You can use the AccessPress social login lite anywhere by using shortcode i
137
  4. Backend Other settings Section.
138
 
139
  == Changelog ==
 
 
 
140
  = 3.2.1 =
141
  * Fixed the input field size for the image size settings for the facebook.
142
 
@@ -149,7 +152,7 @@ Yes. You can use the AccessPress social login lite anywhere by using shortcode i
149
  * Done some strings translation ready in the shortcode.php file.
150
 
151
  = 3.1.8 =
152
- * Done the addition of the notice for the google+ login info.
153
 
154
  = 3.1.7 =
155
  * Done the removal of the 'bio' field from the facebook login to make the plugin compactible with the Facebook API version 2.8.
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.7
7
+ Stable tag: 3.2.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
137
  4. Backend Other settings Section.
138
 
139
  == Changelog ==
140
+ = 3.2.2 =
141
+ * Done the code formatting and removal of unnecessary codes.
142
+
143
  = 3.2.1 =
144
  * Fixed the input field size for the image size settings for the facebook.
145
 
152
  * Done some strings translation ready in the shortcode.php file.
153
 
154
  = 3.1.8 =
155
+ * Done the addition of the notice for the google+ login info.
156
 
157
  = 3.1.7 =
158
  * Done the removal of the 'bio' field from the facebook login to make the plugin compactible with the Facebook API version 2.8.