Version Description
- Removed unnecessary locate_template call in admin class initialization.
- Resynching SVN with trunk.
Download this release
Release Info
Developer | netweblogic |
Plugin | Login With Ajax |
Version | 2.0.1 |
Comparing to | |
See all releases |
Code changes from version 2.0 to 2.0.1
- login-with-ajax-admin.php +115 -84
- login-with-ajax.php +11 -14
- readme.txt +37 -33
- widget/widget.css +3 -3
- widget/widget_in.php +4 -35
login-with-ajax-admin.php
CHANGED
@@ -17,10 +17,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17 |
*/
|
18 |
|
19 |
// Class initialization
|
20 |
-
class
|
21 |
// action function for above hook
|
22 |
-
function
|
|
|
|
|
|
|
|
|
23 |
$page = add_options_page('Login With Ajax', 'Login With Ajax', 8, 'login-with-ajax', array(&$this,'options'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
|
26 |
function options() {
|
@@ -60,88 +75,104 @@ class LWA{
|
|
60 |
$lwa_data = get_option('lwa_data');
|
61 |
}
|
62 |
?>
|
63 |
-
<div class="wrap">
|
64 |
<h2>Login With Ajax</h2>
|
65 |
-
<p>If you have any suggestions, come over to our plugin page and leave a comment. It may just happen!</p>
|
66 |
<form method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
<
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
<
|
104 |
-
</
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
</form>
|
146 |
</div>
|
147 |
<?php
|
@@ -150,9 +181,9 @@ class LWA{
|
|
150 |
|
151 |
function LoginWithAjaxAdminInit(){
|
152 |
global $LoginWithAjaxAdmin;
|
153 |
-
$LoginWithAjaxAdmin = new
|
154 |
}
|
155 |
|
156 |
// Start this plugin once all other plugins are fully loaded
|
157 |
-
add_action( '
|
158 |
?>
|
17 |
*/
|
18 |
|
19 |
// Class initialization
|
20 |
+
class LoginWithAjaxAdmin{
|
21 |
// action function for above hook
|
22 |
+
function LoginWithAjaxAdmin() {
|
23 |
+
add_action ( 'admin_menu', array ( &$this, 'menus' ) );
|
24 |
+
}
|
25 |
+
|
26 |
+
function menus(){
|
27 |
$page = add_options_page('Login With Ajax', 'Login With Ajax', 8, 'login-with-ajax', array(&$this,'options'));
|
28 |
+
add_action('admin_head-'.$page, array(&$this,'options_head'));
|
29 |
+
}
|
30 |
+
|
31 |
+
function options_head(){
|
32 |
+
?>
|
33 |
+
<style type="text/css">
|
34 |
+
.nwl-plugin table { width:100%; }
|
35 |
+
.nwl-plugin table .col { width:100px; }
|
36 |
+
.nwl-plugin table input.wide { width:100%; padding:2px; }
|
37 |
+
</style>
|
38 |
+
<?php
|
39 |
}
|
40 |
|
41 |
function options() {
|
75 |
$lwa_data = get_option('lwa_data');
|
76 |
}
|
77 |
?>
|
78 |
+
<div class="wrap nwl-plugin">
|
79 |
<h2>Login With Ajax</h2>
|
|
|
80 |
<form method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
|
81 |
+
<div id="poststuff" class="metabox-holder has-right-sidebar">
|
82 |
+
<div id="side-info-column" class="inner-sidebar">
|
83 |
+
<div id="categorydiv" class="postbox ">
|
84 |
+
<div class="handlediv" title="Click to toggle"></div>
|
85 |
+
<h3 class="hndle">Plugin Information</h3>
|
86 |
+
<div class="inside">
|
87 |
+
<p>This plugin was developed by <a href="http://twitter.com/marcussykes">Marcus Sykes</a> @ <a href="http://netweblogic.com">NetWebLogic</a></p>
|
88 |
+
<p>Please visit <a href="http://netweblogic.com/forums/">our forum</a> for plugin support.</p>
|
89 |
+
</div>
|
90 |
+
</div>
|
91 |
+
</div>
|
92 |
+
<div id="post-body">
|
93 |
+
<div id="post-body-content">
|
94 |
+
<p>If you have any suggestions, come over to our plugin page and leave a comment. It may just happen!</p>
|
95 |
+
<table class="form-table">
|
96 |
+
<tbody id="lwa-body">
|
97 |
+
<tr valign="top">
|
98 |
+
<td scope="row">
|
99 |
+
<label>Global Login Redirect</label>
|
100 |
+
</td>
|
101 |
+
<td>
|
102 |
+
<input type="text" name="lwa_login_redirect" value='<?= $lwa_data['login_redirect'] ?>' class='wide' />
|
103 |
+
<i>If you'd like to send the user to a specific URL after login, enter it here (e.g. http://wordpress.org/)</i>
|
104 |
+
</td>
|
105 |
+
</tr>
|
106 |
+
<tr valign="top">
|
107 |
+
<td scope="row">
|
108 |
+
<label>Global Logout Redirect</label>
|
109 |
+
</td>
|
110 |
+
<td>
|
111 |
+
<input type="text" name="lwa_logout_redirect" value='<?= $lwa_data['logout_redirect'] ?>' class='wide' />
|
112 |
+
<i>If you'd like to send the user to a specific URL after logout, enter it here (e.g. http://wordpress.org/)</i>
|
113 |
+
</td>
|
114 |
+
</tr>
|
115 |
+
<tr valign="top">
|
116 |
+
<td scope="row">
|
117 |
+
<label>Role-Based Custom Login Redirects</label>
|
118 |
+
</td>
|
119 |
+
<td>
|
120 |
+
<i>If you would like a specific user role to be redirected to a custom URL upon login, place it here (blank value will default to the global redirect)</i>
|
121 |
+
<table>
|
122 |
+
<?php
|
123 |
+
//Taken from /wp-admin/includes/template.php Line 2715
|
124 |
+
$editable_roles = get_editable_roles();
|
125 |
+
foreach( $editable_roles as $role => $details ) {
|
126 |
+
$role_login = ( is_array($lwa_data['role_login']) && array_key_exists($role, $lwa_data['role_login']) ) ? $lwa_data['role_login'][$role]:''
|
127 |
+
?>
|
128 |
+
<tr>
|
129 |
+
<td class="col"><?php echo translate_user_role($details['name']) ?></td>
|
130 |
+
<td><input type='text' class='wide' name='lwa_role_login_<?php echo esc_attr($role) ?>' value="<?php echo $role_login ?>" /></td>
|
131 |
+
</tr>
|
132 |
+
<?php
|
133 |
+
}
|
134 |
+
?>
|
135 |
+
</table>
|
136 |
+
</td>
|
137 |
+
</tr>
|
138 |
+
<tr valign="top">
|
139 |
+
<td scope="row">
|
140 |
+
<label>Role-Based Custom Logout Redirects</label>
|
141 |
+
</td>
|
142 |
+
<td>
|
143 |
+
<i>If you would like a specific user role to be redirected to a custom URL upon logout, place it here (blank value will default to the global redirect)</i>
|
144 |
+
<table>
|
145 |
+
<?php
|
146 |
+
//Taken from /wp-admin/includes/template.php Line 2715
|
147 |
+
$editable_roles = get_editable_roles();
|
148 |
+
foreach( $editable_roles as $role => $details ) {
|
149 |
+
$role_logout = ( is_array($lwa_data['role_logout']) && array_key_exists($role, $lwa_data['role_logout']) ) ? $lwa_data['role_logout'][$role]:''
|
150 |
+
?>
|
151 |
+
<tr>
|
152 |
+
<td class='col'><?php echo translate_user_role($details['name']) ?></td>
|
153 |
+
<td><input type='text' class='wide' name='lwa_role_logout_<?php echo esc_attr($role) ?>' value="<?php echo $role_logout ?>" /></td>
|
154 |
+
</tr>
|
155 |
+
<?php
|
156 |
+
}
|
157 |
+
?>
|
158 |
+
</table>
|
159 |
+
</td>
|
160 |
+
</tr>
|
161 |
+
</tbody>
|
162 |
+
<tfoot>
|
163 |
+
<tr valign="top">
|
164 |
+
<td colspan="2">
|
165 |
+
<input type="hidden" name="lwasubmitted" value="1" />
|
166 |
+
<p class="submit">
|
167 |
+
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
168 |
+
</p>
|
169 |
+
</td>
|
170 |
+
</tr>
|
171 |
+
</tfoot>
|
172 |
+
</table>
|
173 |
+
</div>
|
174 |
+
</div>
|
175 |
+
</div>
|
176 |
</form>
|
177 |
</div>
|
178 |
<?php
|
181 |
|
182 |
function LoginWithAjaxAdminInit(){
|
183 |
global $LoginWithAjaxAdmin;
|
184 |
+
$LoginWithAjaxAdmin = new LoginWithAjaxAdmin();
|
185 |
}
|
186 |
|
187 |
// Start this plugin once all other plugins are fully loaded
|
188 |
+
add_action( 'init', 'LoginWithAjaxAdminInit' );
|
189 |
?>
|
login-with-ajax.php
CHANGED
@@ -4,11 +4,11 @@ Plugin Name: Login With Ajax
|
|
4 |
Plugin URI: http://netweblogic.com/wordpress/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: NetWebLogic
|
7 |
-
Version: 2.0
|
8 |
Author URI: http://netweblogic.com/
|
9 |
Tags: Login, Ajax, Redirect, BuddyPress, MU, WPMU, sidebar, admin, widget
|
10 |
|
11 |
-
Copyright (C)
|
12 |
|
13 |
This program is free software; you can redistribute it and/or modify
|
14 |
it under the terms of the GNU General Public License as published by
|
@@ -24,9 +24,6 @@ You should have received a copy of the GNU General Public License
|
|
24 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
25 |
*/
|
26 |
|
27 |
-
include_once('login-with-ajax-admin.php');
|
28 |
-
include_once('login-with-ajax-widget.php');
|
29 |
-
|
30 |
class LoginWithAjax {
|
31 |
|
32 |
/**
|
@@ -34,6 +31,7 @@ class LoginWithAjax {
|
|
34 |
* @var WP_User
|
35 |
*/
|
36 |
var $current_user;
|
|
|
37 |
// Class initialization
|
38 |
function LoginWithAjax() {
|
39 |
//Remember the current user, in case there is a logout
|
@@ -43,7 +41,6 @@ class LoginWithAjax {
|
|
43 |
//Enqueue scripts
|
44 |
wp_enqueue_script( "login-with-ajax", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/login-with-ajax.js"), array( 'jquery' ) );
|
45 |
//Enqueue stylesheets
|
46 |
-
locate_template(array("plugins/login-with-ajax/widget_outs.php"), false);
|
47 |
if( file_exists(get_stylesheet_directory().'/plugins/login-with-ajax/widget.css') ){
|
48 |
wp_enqueue_style( "login-with-ajax-css", get_stylesheet_directory_uri().'/plugins/login-with-ajax/widget.css' );
|
49 |
}else if( file_exists(get_template_directory().'/plugins/login-with-ajax/widget.css') ){
|
@@ -52,7 +49,6 @@ class LoginWithAjax {
|
|
52 |
wp_enqueue_style( "login-with-ajax-css", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/widget/widget.css") );
|
53 |
}
|
54 |
//Register widget
|
55 |
-
//register_sidebar_widget('Login With Ajax', array(&$this, 'widget'));
|
56 |
register_widget("LoginWithAjaxWidget");
|
57 |
//Add logout/in redirection
|
58 |
add_action('wp_logout', array(&$this, 'logoutRedirect'));
|
@@ -218,7 +214,9 @@ class LoginWithAjax {
|
|
218 |
function shortcode($atts){
|
219 |
$defaults = array( 'is_widget' => false, 'profile_link' => false );
|
220 |
$atts = shortcode_atts($defaults, $atts);
|
|
|
221 |
$this->widget(array(), $atts );
|
|
|
222 |
}
|
223 |
|
224 |
/*
|
@@ -281,12 +279,12 @@ class LoginWithAjax {
|
|
281 |
return $result;
|
282 |
}
|
283 |
}
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
global $LoginWithAjax;
|
288 |
-
$LoginWithAjax = new LoginWithAjax();
|
289 |
}
|
|
|
|
|
290 |
|
291 |
//Template Tag
|
292 |
function login_with_ajax($atts = ''){
|
@@ -296,6 +294,5 @@ function login_with_ajax($atts = ''){
|
|
296 |
}
|
297 |
|
298 |
// Start this plugin once all other plugins are fully loaded
|
299 |
-
add_action( 'widgets_init', '
|
300 |
-
|
301 |
?>
|
4 |
Plugin URI: http://netweblogic.com/wordpress/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: NetWebLogic
|
7 |
+
Version: 2.0.1
|
8 |
Author URI: http://netweblogic.com/
|
9 |
Tags: Login, Ajax, Redirect, BuddyPress, MU, WPMU, sidebar, admin, widget
|
10 |
|
11 |
+
Copyright (C) 2009 NetWebLogic LLC
|
12 |
|
13 |
This program is free software; you can redistribute it and/or modify
|
14 |
it under the terms of the GNU General Public License as published by
|
24 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
25 |
*/
|
26 |
|
|
|
|
|
|
|
27 |
class LoginWithAjax {
|
28 |
|
29 |
/**
|
31 |
* @var WP_User
|
32 |
*/
|
33 |
var $current_user;
|
34 |
+
|
35 |
// Class initialization
|
36 |
function LoginWithAjax() {
|
37 |
//Remember the current user, in case there is a logout
|
41 |
//Enqueue scripts
|
42 |
wp_enqueue_script( "login-with-ajax", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/login-with-ajax.js"), array( 'jquery' ) );
|
43 |
//Enqueue stylesheets
|
|
|
44 |
if( file_exists(get_stylesheet_directory().'/plugins/login-with-ajax/widget.css') ){
|
45 |
wp_enqueue_style( "login-with-ajax-css", get_stylesheet_directory_uri().'/plugins/login-with-ajax/widget.css' );
|
46 |
}else if( file_exists(get_template_directory().'/plugins/login-with-ajax/widget.css') ){
|
49 |
wp_enqueue_style( "login-with-ajax-css", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/widget/widget.css") );
|
50 |
}
|
51 |
//Register widget
|
|
|
52 |
register_widget("LoginWithAjaxWidget");
|
53 |
//Add logout/in redirection
|
54 |
add_action('wp_logout', array(&$this, 'logoutRedirect'));
|
214 |
function shortcode($atts){
|
215 |
$defaults = array( 'is_widget' => false, 'profile_link' => false );
|
216 |
$atts = shortcode_atts($defaults, $atts);
|
217 |
+
ob_start();
|
218 |
$this->widget(array(), $atts );
|
219 |
+
return ob_get_clean();
|
220 |
}
|
221 |
|
222 |
/*
|
279 |
return $result;
|
280 |
}
|
281 |
}
|
282 |
+
//Include admin file if needed
|
283 |
+
if(is_admin()){
|
284 |
+
include_once('login-with-ajax-admin.php');
|
|
|
|
|
285 |
}
|
286 |
+
//Includes
|
287 |
+
include_once('login-with-ajax-widget.php');
|
288 |
|
289 |
//Template Tag
|
290 |
function login_with_ajax($atts = ''){
|
294 |
}
|
295 |
|
296 |
// Start this plugin once all other plugins are fully loaded
|
297 |
+
add_action( 'widgets_init', create_function( '', 'global $LoginWithAjax; $LoginWithAjax = new LoginWithAjax();' ) );
|
|
|
298 |
?>
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: netweblogic
|
|
3 |
Tags: Login, Ajax, Redirect, BuddyPress, MU, WPMU, sidebar, admin, widget
|
4 |
Requires at least: 2.7
|
5 |
Tested up to: 2.8.5
|
6 |
-
Stable tag: 2.0
|
7 |
|
8 |
Add smooth ajax during login, avoid screen refreshes and choose where users get redirected to upon login/logout. Supports SSL, MU, and BuddyPress.
|
9 |
|
@@ -28,38 +28,6 @@ If you have any problems with the plugins, please visit our [http://netweblogic.
|
|
28 |
|
29 |
If you find this plugin useful and would like to say thanks, a link, digg, or some other form of recognition to the plugin page on our blog would be appreciated.
|
30 |
|
31 |
-
== Changelog ==
|
32 |
-
|
33 |
-
= 1.1 =
|
34 |
-
* Fixed JavaScript for http to https support
|
35 |
-
* Added shortcut tag login_with_ajax()
|
36 |
-
|
37 |
-
= 1.11 =
|
38 |
-
* Fixed regular expression issue
|
39 |
-
|
40 |
-
= 1.2 =
|
41 |
-
* Fixed redirection issue
|
42 |
-
* Added link to wp-admin profile page when logged in to default widget template
|
43 |
-
|
44 |
-
= 1.3 =
|
45 |
-
* Fixed widget template $before_widget... variables being used with shorttag and template tag functions
|
46 |
-
* Added JSON encoding compatability for PHP4
|
47 |
-
* Fixed bad link for non root hosted sites in template
|
48 |
-
* Added forgot password widget
|
49 |
-
* Added redirect capability based on user roles
|
50 |
-
* Fixed template locating to handle child themes
|
51 |
-
* Added Shortcode
|
52 |
-
|
53 |
-
= 1.3.1 =
|
54 |
-
* Small bugfix on admin page if newly installed. Changes also made to the 1.3 tag
|
55 |
-
|
56 |
-
= 2.0 =
|
57 |
-
* Made plugin widget available as multiple instances (using new 2.8 Widget API)
|
58 |
-
* Profile login link now controllable at widget level
|
59 |
-
* Fixed bug where shortcode only appears at beginning of posts
|
60 |
-
* Other Small Bug fixes
|
61 |
-
|
62 |
-
|
63 |
== Installation ==
|
64 |
|
65 |
1. Upload this plugin to the `/wp-content/plugins/` directory and unzip it, or simply upload the zip file within your wordpress installation.
|
@@ -113,3 +81,39 @@ Yes, see the notes section.
|
|
113 |
Yes, see the notes section.
|
114 |
|
115 |
For further questions and answers (or to submit one yourself) go to our [http://netweblogic.com/forums/](support forums).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
Tags: Login, Ajax, Redirect, BuddyPress, MU, WPMU, sidebar, admin, widget
|
4 |
Requires at least: 2.7
|
5 |
Tested up to: 2.8.5
|
6 |
+
Stable tag: 2.0.1
|
7 |
|
8 |
Add smooth ajax during login, avoid screen refreshes and choose where users get redirected to upon login/logout. Supports SSL, MU, and BuddyPress.
|
9 |
|
28 |
|
29 |
If you find this plugin useful and would like to say thanks, a link, digg, or some other form of recognition to the plugin page on our blog would be appreciated.
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
== Installation ==
|
32 |
|
33 |
1. Upload this plugin to the `/wp-content/plugins/` directory and unzip it, or simply upload the zip file within your wordpress installation.
|
81 |
Yes, see the notes section.
|
82 |
|
83 |
For further questions and answers (or to submit one yourself) go to our [http://netweblogic.com/forums/](support forums).
|
84 |
+
|
85 |
+
|
86 |
+
== Changelog ==
|
87 |
+
|
88 |
+
= 1.1 =
|
89 |
+
* Fixed JavaScript for http to https support
|
90 |
+
* Added shortcut tag login_with_ajax()
|
91 |
+
|
92 |
+
= 1.11 =
|
93 |
+
* Fixed regular expression issue
|
94 |
+
|
95 |
+
= 1.2 =
|
96 |
+
* Fixed redirection issue
|
97 |
+
* Added link to wp-admin profile page when logged in to default widget template
|
98 |
+
|
99 |
+
= 1.3 =
|
100 |
+
* Fixed widget template $before_widget... variables being used with shorttag and template tag functions
|
101 |
+
* Added JSON encoding compatability for PHP4
|
102 |
+
* Fixed bad link for non root hosted sites in template
|
103 |
+
* Added forgot password widget
|
104 |
+
* Added redirect capability based on user roles
|
105 |
+
* Fixed template locating to handle child themes
|
106 |
+
* Added Shortcode
|
107 |
+
|
108 |
+
= 1.3.1 =
|
109 |
+
* Small bugfix on admin page if newly installed. Changes also made to the 1.3 tag
|
110 |
+
|
111 |
+
= 2.0 =
|
112 |
+
* Made plugin widget available as multiple instances (using new 2.8 Widget API)
|
113 |
+
* Profile login link now controllable at widget level
|
114 |
+
* Fixed bug where shortcode only appears at beginning of posts
|
115 |
+
* Other Small Bug fixes
|
116 |
+
|
117 |
+
= 2.0.1 =
|
118 |
+
* Removed unnecessary locate_template call in admin class initialization.
|
119 |
+
* Resynching SVN with trunk.
|
widget/widget.css
CHANGED
@@ -7,9 +7,9 @@
|
|
7 |
|
8 |
#LoginWithAjax_Loading { position:absolute; width:100%; height:100%; background:#FFFFFF url(loading.gif) 50% 50% no-repeat; left:0px; top:0px; opacity:0.8; filter:alpha(opacity=80)}
|
9 |
|
10 |
-
#LoginWithAjax_Status.invalid, #LoginWithAjax_Status.confirm { display:block;
|
11 |
-
#LoginWithAjax_Status.invalid { color:#990000; }
|
12 |
-
#LoginWithAjax_Status.confirm { color:#009900; }
|
13 |
|
14 |
/*Logged In CSS*/
|
15 |
#LoginWithAjax_Avatar { width:60px; padding-right:10px; }
|
7 |
|
8 |
#LoginWithAjax_Loading { position:absolute; width:100%; height:100%; background:#FFFFFF url(loading.gif) 50% 50% no-repeat; left:0px; top:0px; opacity:0.8; filter:alpha(opacity=80)}
|
9 |
|
10 |
+
#LoginWithAjax_Status.invalid, #LoginWithAjax_Status.confirm { text-align:left; display:block; padding:3px; margin-bottom:8px; }
|
11 |
+
#LoginWithAjax_Status.invalid { color:#990000; background:#F0D9D9; border:1px solid #E0B4B4; }
|
12 |
+
#LoginWithAjax_Status.confirm { color:#009900; background:#D8FFB0; border:1px solid #AAFF71; }
|
13 |
|
14 |
/*Logged In CSS*/
|
15 |
#LoginWithAjax_Avatar { width:60px; padding-right:10px; }
|
widget/widget_in.php
CHANGED
@@ -31,30 +31,22 @@
|
|
31 |
//Admin URL
|
32 |
if ( $lwa_data['profile_link'] == '1' ) {
|
33 |
?>
|
34 |
-
<a href="<?php bloginfo('siteurl') ?>/wp-admin/profile.php"
|
35 |
<?php
|
36 |
}
|
37 |
//Logout URL
|
38 |
if ( function_exists( 'wp_logout_url' ) ) {
|
39 |
?>
|
40 |
-
<a id="wp-logout" href="
|
41 |
<?
|
42 |
} else {
|
43 |
?>
|
44 |
-
<a id="wp-logout" href="
|
45 |
<?php
|
46 |
}
|
47 |
?>
|
48 |
<?php
|
49 |
-
if( !empty($wpmu_version) ) {
|
50 |
-
global $bp;
|
51 |
-
foreach($bp->bp_nav as $nav_item){
|
52 |
-
if($nav_item['css_id'] == 'settings'){
|
53 |
-
?>
|
54 |
-
<a href="<?= $nav_item['link'] ?>"><?= strtolower($nav_item['name']) ?></a>
|
55 |
-
<?
|
56 |
-
}
|
57 |
-
}
|
58 |
?>
|
59 |
<a href="<?php bloginfo('siteurl') ?>/wp_admin/">blog admin</a>
|
60 |
<?php
|
@@ -63,29 +55,6 @@
|
|
63 |
</td>
|
64 |
</tr>
|
65 |
</table>
|
66 |
-
<?php if ( !empty($wpmu_version) ) : ?>
|
67 |
-
<div id="LoginWithAjax_Notifications">
|
68 |
-
<?php
|
69 |
-
$notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id );
|
70 |
-
?>
|
71 |
-
<h4>Notifications <?php echo ( count($notifications) > 0 && $notifications != false ) ? "(".count($notifications).")" : "" ?></h4>
|
72 |
-
<?php
|
73 |
-
echo '<ul>';
|
74 |
-
if ( $notifications ) { ?>
|
75 |
-
<?php $counter = 0; ?>
|
76 |
-
<?php for ( $i = 0; $i < count($notifications); $i++ ) { ?>
|
77 |
-
<?php $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; ?>
|
78 |
-
<li<?php echo $alt ?>><?php echo $notifications[$i] ?></li>
|
79 |
-
<?php $counter++; ?>
|
80 |
-
<?php } ?>
|
81 |
-
<?php } else { ?>
|
82 |
-
<li><?php _e( 'No new notifications.', 'buddypress' ); ?></li>
|
83 |
-
<?php
|
84 |
-
}
|
85 |
-
echo '</ul>';
|
86 |
-
?>
|
87 |
-
</div>
|
88 |
-
<?php endif; ?>
|
89 |
</div>
|
90 |
<?php
|
91 |
if( $is_widget ){
|
31 |
//Admin URL
|
32 |
if ( $lwa_data['profile_link'] == '1' ) {
|
33 |
?>
|
34 |
+
<a href="<?php bloginfo('siteurl') ?>/wp-admin/profile.php"><?php echo strtolower(__('Profile')) ?></a><br/>
|
35 |
<?php
|
36 |
}
|
37 |
//Logout URL
|
38 |
if ( function_exists( 'wp_logout_url' ) ) {
|
39 |
?>
|
40 |
+
<a id="wp-logout" href="<?php echo wp_logout_url( site_url() ) ?>"><?php echo strtolower(__( 'Log Out' )) ?></a><br />
|
41 |
<?
|
42 |
} else {
|
43 |
?>
|
44 |
+
<a id="wp-logout" href="<?php echo site_url() . '/wp-login.php?action=logout&redirect_to=' . site_url() ?>"><?php echo strtolower(__( 'Log Out' )) ?></a><br />
|
45 |
<?php
|
46 |
}
|
47 |
?>
|
48 |
<?php
|
49 |
+
if( !empty($wpmu_version) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
?>
|
51 |
<a href="<?php bloginfo('siteurl') ?>/wp_admin/">blog admin</a>
|
52 |
<?php
|
55 |
</td>
|
56 |
</tr>
|
57 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
</div>
|
59 |
<?php
|
60 |
if( $is_widget ){
|