Version Description
- fixed MIME type errors between HTTP <> HTTPS ajax requests,
- added redirect shortcode attribute
Download this release
Release Info
Developer | netweblogic |
Plugin | Login With Ajax |
Version | 3.1.4 |
Comparing to | |
See all releases |
Code changes from version 3.1.3 to 3.1.4
- login-with-ajax.php +4 -1
- readme.txt +7 -1
- widget/default/widget_out.php +3 -0
- widget/divs-only/widget_out.php +3 -0
- widget/modal/widget_out.php +3 -0
login-with-ajax.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Login With Ajax
|
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/login-with-ajax/
|
5 |
Description: Ajax driven login widget. Customisable from within your template folder, and advanced settings from the admin area.
|
6 |
Author: Marcus Sykes
|
7 |
-
Version: 3.1.
|
8 |
Author URI: http://msyk.es
|
9 |
Tags: Login, Ajax, Redirect, BuddyPress, MU, WPMU, sidebar, admin, widget
|
10 |
|
@@ -139,6 +139,7 @@ class LoginWithAjax {
|
|
139 |
$return = self::register();
|
140 |
break;
|
141 |
}
|
|
|
142 |
echo self::json_encode(apply_filters('lwa_ajax_'.$_REQUEST["login-with-ajax"], $return));
|
143 |
exit();
|
144 |
}
|
@@ -158,6 +159,7 @@ class LoginWithAjax {
|
|
158 |
$return['message'] = __("Login Successful, redirecting...",'login-with-ajax');
|
159 |
//Do a redirect if necessary
|
160 |
$redirect = self::getLoginRedirect(self::$current_user);
|
|
|
161 |
if( $redirect != '' ){
|
162 |
$return['redirect'] = $redirect;
|
163 |
}
|
@@ -399,6 +401,7 @@ class LoginWithAjax {
|
|
399 |
'profile_link' => true,
|
400 |
'template' => 'default',
|
401 |
'registration' => true,
|
|
|
402 |
'remember' => true
|
403 |
);
|
404 |
self::widget(shortcode_atts($defaults, $atts));
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/login-with-ajax/
|
5 |
Description: Ajax driven login widget. Customisable from within your template folder, and advanced settings from the admin area.
|
6 |
Author: Marcus Sykes
|
7 |
+
Version: 3.1.4
|
8 |
Author URI: http://msyk.es
|
9 |
Tags: Login, Ajax, Redirect, BuddyPress, MU, WPMU, sidebar, admin, widget
|
10 |
|
139 |
$return = self::register();
|
140 |
break;
|
141 |
}
|
142 |
+
@header( 'Content-Type: application/javascript; charset=UTF-8', true ); //add this for HTTP -> HTTPS requests which assume it's a cross-site request
|
143 |
echo self::json_encode(apply_filters('lwa_ajax_'.$_REQUEST["login-with-ajax"], $return));
|
144 |
exit();
|
145 |
}
|
159 |
$return['message'] = __("Login Successful, redirecting...",'login-with-ajax');
|
160 |
//Do a redirect if necessary
|
161 |
$redirect = self::getLoginRedirect(self::$current_user);
|
162 |
+
if( !empty($_REQUEST['redirect_to']) ) $redirect= wp_sanitize_redirect($_REQUEST['redirect_to']);
|
163 |
if( $redirect != '' ){
|
164 |
$return['redirect'] = $redirect;
|
165 |
}
|
401 |
'profile_link' => true,
|
402 |
'template' => 'default',
|
403 |
'registration' => true,
|
404 |
+
'redirect' => true,
|
405 |
'remember' => true
|
406 |
);
|
407 |
self::widget(shortcode_atts($defaults, $atts));
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: netweblogic
|
|
3 |
Tags: login, ajax, ajax login, registration, redirect redirect, buddypress, multi site, sidebar, admin, widget
|
4 |
Requires at least: 3.1
|
5 |
Tested up to: 4.0
|
6 |
-
Stable tag: 3.1.
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
Add smooth ajax login/registration effects and choose where users get redirected upon log in/out. Supports SSL, MultiSite, and BuddyPress.
|
@@ -97,6 +97,8 @@ You can use the [shortcode](http://codex.wordpress.org/Shortcode) [login-with-aj
|
|
97 |
* If this template directory exists, this template will be used. Default is 'default' template.
|
98 |
* remember - (1 or 0)
|
99 |
* If value is 1 (default), a remember password link appears for password recovery
|
|
|
|
|
100 |
|
101 |
= SSL Logins =
|
102 |
|
@@ -162,6 +164,9 @@ For further questions and answers (or to submit one yourself) go to our [http://
|
|
162 |
|
163 |
|
164 |
== Changelog ==
|
|
|
|
|
|
|
165 |
|
166 |
= 3.1.3 =
|
167 |
* fixed JS/CSS file overriding problems
|
@@ -175,6 +180,7 @@ For further questions and answers (or to submit one yourself) go to our [http://
|
|
175 |
* fixed HTML validation issues in widgets
|
176 |
* added error fallback during ajax request
|
177 |
* added new icons and headers for wordpress.org plugin pages
|
|
|
178 |
|
179 |
= 3.1.2 =
|
180 |
* updated Russian, Swedish and POT language files
|
3 |
Tags: login, ajax, ajax login, registration, redirect redirect, buddypress, multi site, sidebar, admin, widget
|
4 |
Requires at least: 3.1
|
5 |
Tested up to: 4.0
|
6 |
+
Stable tag: 3.1.4
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
Add smooth ajax login/registration effects and choose where users get redirected upon log in/out. Supports SSL, MultiSite, and BuddyPress.
|
97 |
* If this template directory exists, this template will be used. Default is 'default' template.
|
98 |
* remember - (1 or 0)
|
99 |
* If value is 1 (default), a remember password link appears for password recovery
|
100 |
+
* redirect
|
101 |
+
* Successful logins are redirected to this URL
|
102 |
|
103 |
= SSL Logins =
|
104 |
|
164 |
|
165 |
|
166 |
== Changelog ==
|
167 |
+
= 3.1.4 =
|
168 |
+
* fixed MIME type errors between HTTP <> HTTPS ajax requests,
|
169 |
+
* added redirect shortcode attribute
|
170 |
|
171 |
= 3.1.3 =
|
172 |
* fixed JS/CSS file overriding problems
|
180 |
* fixed HTML validation issues in widgets
|
181 |
* added error fallback during ajax request
|
182 |
* added new icons and headers for wordpress.org plugin pages
|
183 |
+
* added redirect shortcode attribute for custom redirect
|
184 |
|
185 |
= 3.1.2 =
|
186 |
* updated Russian, Swedish and POT language files
|
widget/default/widget_out.php
CHANGED
@@ -32,6 +32,9 @@
|
|
32 |
<input type="submit" name="wp-submit" id="lwa_wp-submit" value="<?php esc_attr_e('Log In', 'login-with-ajax'); ?>" tabindex="100" />
|
33 |
<input type="hidden" name="lwa_profile_link" value="<?php echo esc_attr($lwa_data['profile_link']); ?>" />
|
34 |
<input type="hidden" name="login-with-ajax" value="login" />
|
|
|
|
|
|
|
35 |
</td>
|
36 |
<td class="lwa-submit-links">
|
37 |
<input name="rememberme" type="checkbox" class="lwa-rememberme" value="forever" /> <label><?php esc_html_e( 'Remember Me','login-with-ajax' ) ?></label>
|
32 |
<input type="submit" name="wp-submit" id="lwa_wp-submit" value="<?php esc_attr_e('Log In', 'login-with-ajax'); ?>" tabindex="100" />
|
33 |
<input type="hidden" name="lwa_profile_link" value="<?php echo esc_attr($lwa_data['profile_link']); ?>" />
|
34 |
<input type="hidden" name="login-with-ajax" value="login" />
|
35 |
+
<?php if( !empty($lwa_data['redirect']) ): ?>
|
36 |
+
<input type="hidden" name="redirect_to" value="<?php echo esc_url($lwa_data['redirect']); ?>" />
|
37 |
+
<?php endif; ?>
|
38 |
</td>
|
39 |
<td class="lwa-submit-links">
|
40 |
<input name="rememberme" type="checkbox" class="lwa-rememberme" value="forever" /> <label><?php esc_html_e( 'Remember Me','login-with-ajax' ) ?></label>
|
widget/divs-only/widget_out.php
CHANGED
@@ -26,6 +26,9 @@
|
|
26 |
<input type="submit" name="wp-submit" id="lwa_wp-submit" value="<?php esc_attr_e('Log In','login-with-ajax'); ?>" tabindex="100" />
|
27 |
<input type="hidden" name="lwa_profile_link" value="<?php echo esc_attr($lwa_data['profile_link']); ?>" />
|
28 |
<input type="hidden" name="login-with-ajax" value="login" />
|
|
|
|
|
|
|
29 |
</div>
|
30 |
|
31 |
<div class="lwa-links">
|
26 |
<input type="submit" name="wp-submit" id="lwa_wp-submit" value="<?php esc_attr_e('Log In','login-with-ajax'); ?>" tabindex="100" />
|
27 |
<input type="hidden" name="lwa_profile_link" value="<?php echo esc_attr($lwa_data['profile_link']); ?>" />
|
28 |
<input type="hidden" name="login-with-ajax" value="login" />
|
29 |
+
<?php if( !empty($lwa_data['redirect']) ): ?>
|
30 |
+
<input type="hidden" name="redirect_to" value="<?php echo esc_url($lwa_data['redirect']); ?>" />
|
31 |
+
<?php endif; ?>
|
32 |
</div>
|
33 |
|
34 |
<div class="lwa-links">
|
widget/modal/widget_out.php
CHANGED
@@ -36,6 +36,9 @@
|
|
36 |
<input type="submit" name="wp-submit" class="lwa-wp-submit" value="<?php esc_attr_e('Log In','login-with-ajax'); ?>" tabindex="100" />
|
37 |
<input type="hidden" name="lwa_profile_link" value="<?php echo !empty($lwa_data['profile_link']) ? 1:0 ?>" />
|
38 |
<input type="hidden" name="login-with-ajax" value="login" />
|
|
|
|
|
|
|
39 |
</td>
|
40 |
<td class="lwa-links">
|
41 |
<input name="rememberme" type="checkbox" id="lwa_rememberme" value="forever" /> <label><?php esc_html_e( 'Remember Me','login-with-ajax' ) ?></label>
|
36 |
<input type="submit" name="wp-submit" class="lwa-wp-submit" value="<?php esc_attr_e('Log In','login-with-ajax'); ?>" tabindex="100" />
|
37 |
<input type="hidden" name="lwa_profile_link" value="<?php echo !empty($lwa_data['profile_link']) ? 1:0 ?>" />
|
38 |
<input type="hidden" name="login-with-ajax" value="login" />
|
39 |
+
<?php if( !empty($lwa_data['redirect']) ): ?>
|
40 |
+
<input type="hidden" name="redirect_to" value="<?php echo esc_url($lwa_data['redirect']); ?>" />
|
41 |
+
<?php endif; ?>
|
42 |
</td>
|
43 |
<td class="lwa-links">
|
44 |
<input name="rememberme" type="checkbox" id="lwa_rememberme" value="forever" /> <label><?php esc_html_e( 'Remember Me','login-with-ajax' ) ?></label>
|