Theme My Login - Version 2.0.5

Version Description

Download this release

Release Info

Developer jfarthing84
Plugin Icon 128x128 Theme My Login
Version 2.0.5
Comparing to
See all releases

Code changes from version 2.0.4 to 2.0.5

includes/admin-page.php CHANGED
@@ -54,14 +54,14 @@ if ( $_POST ) {
54
  <th scope="row"><label for="login_redirect"><?php _e('Redirect on Login'); ?></label></th>
55
  <td>
56
  <input name="login_redirect" type="text" id="login_redirect" value="<?php echo( htmlspecialchars ( $this->GetOption('login_redirect') ) ); ?>" class="regular-text" />
57
- <span class="setting-description"><?php _e('Defaults to <code>wp-admin/</code>.'); ?></span>
58
  </td>
59
  </tr>
60
  <tr valign="top">
61
  <th scope="row"><label for="logout_redirect"><?php _e('Redirect on Logout'); ?></label></th>
62
  <td>
63
  <input name="logout_redirect" type="text" id="logout_redirect" value="<?php echo( htmlspecialchars ( $this->GetOption('logout_redirect') ) ); ?>" class="regular-text" />
64
- <span class="setting-description"><?php _e('Defaults to <code>wp-login.php?loggedout=true</code>.'); ?></span>
65
  </td>
66
  </tr>
67
  </table>
@@ -72,7 +72,7 @@ if ( $_POST ) {
72
  <th scope="row"><label for="register_title"><?php _e('Register Page Title'); ?></label></th>
73
  <td>
74
  <input name="register_title" type="text" id="register_title" value="<?php echo( htmlspecialchars ( $this->GetOption('register_title') ) ); ?>" class="regular-text" />
75
- <span class="setting-description">You can use %blogname% for your blog name. Defaults to 'Register &rsaquo;'</span>
76
  </td>
77
  </tr>
78
  <tr valign="top">
@@ -93,7 +93,7 @@ if ( $_POST ) {
93
  <th scope="row"><label for="login_title"><?php _e('Login Page Title'); ?></label></th>
94
  <td>
95
  <input name="login_title" type="text" id="login_title" value="<?php echo( htmlspecialchars ( $this->GetOption('login_title') ) ); ?>" class="regular-text" />
96
- <span class="setting-description">You can use %blogname% for your blog name. Defaults to 'Log In &rsaquo;'</span>
97
  </td>
98
  </tr>
99
  <tr valign="top">
@@ -107,7 +107,7 @@ if ( $_POST ) {
107
  <th scope="row"><label for="password_title"><?php _e('Lost Password Page Title'); ?></label></th>
108
  <td>
109
  <input name="password_title" type="text" id="password_title" value="<?php echo( htmlspecialchars ( $this->GetOption('password_title') ) ); ?>" class="regular-text" />
110
- <span class="setting-description">You can use %blogname% for your blog name. Defaults to 'Lost Password &rsaquo;'</span>
111
  </td>
112
  </tr>
113
  <tr valign="top">
@@ -121,7 +121,7 @@ if ( $_POST ) {
121
  <th scope="row"><label for="profile_title"><?php _e('Profile Page Title'); ?></label></th>
122
  <td>
123
  <input name="profile_title" type="text" id="profile_title" value="<?php echo( htmlspecialchars ( $this->GetOption('profile_title') ) ); ?>" class="regular-text" />
124
- <span class="setting-description">You can use %blogname% for your blog name. Defaults to 'Profile &rsaquo;'</span>
125
  </td>
126
  </tr>
127
  <tr valign="top">
54
  <th scope="row"><label for="login_redirect"><?php _e('Redirect on Login'); ?></label></th>
55
  <td>
56
  <input name="login_redirect" type="text" id="login_redirect" value="<?php echo( htmlspecialchars ( $this->GetOption('login_redirect') ) ); ?>" class="regular-text" />
57
+ <span class="setting-description"><?php _e('Must be an absolute URL.'); ?></span>
58
  </td>
59
  </tr>
60
  <tr valign="top">
61
  <th scope="row"><label for="logout_redirect"><?php _e('Redirect on Logout'); ?></label></th>
62
  <td>
63
  <input name="logout_redirect" type="text" id="logout_redirect" value="<?php echo( htmlspecialchars ( $this->GetOption('logout_redirect') ) ); ?>" class="regular-text" />
64
+ <span class="setting-description"><?php _e('Must be an absolute URL.'); ?></span>
65
  </td>
66
  </tr>
67
  </table>
72
  <th scope="row"><label for="register_title"><?php _e('Register Page Title'); ?></label></th>
73
  <td>
74
  <input name="register_title" type="text" id="register_title" value="<?php echo( htmlspecialchars ( $this->GetOption('register_title') ) ); ?>" class="regular-text" />
75
+ <span class="setting-description">You can use %blogname% for your blog name.'</span>
76
  </td>
77
  </tr>
78
  <tr valign="top">
93
  <th scope="row"><label for="login_title"><?php _e('Login Page Title'); ?></label></th>
94
  <td>
95
  <input name="login_title" type="text" id="login_title" value="<?php echo( htmlspecialchars ( $this->GetOption('login_title') ) ); ?>" class="regular-text" />
96
+ <span class="setting-description">You can use %blogname% for your blog name.'</span>
97
  </td>
98
  </tr>
99
  <tr valign="top">
107
  <th scope="row"><label for="password_title"><?php _e('Lost Password Page Title'); ?></label></th>
108
  <td>
109
  <input name="password_title" type="text" id="password_title" value="<?php echo( htmlspecialchars ( $this->GetOption('password_title') ) ); ?>" class="regular-text" />
110
+ <span class="setting-description">You can use %blogname% for your blog name.'</span>
111
  </td>
112
  </tr>
113
  <tr valign="top">
121
  <th scope="row"><label for="profile_title"><?php _e('Profile Page Title'); ?></label></th>
122
  <td>
123
  <input name="profile_title" type="text" id="profile_title" value="<?php echo( htmlspecialchars ( $this->GetOption('profile_title') ) ); ?>" class="regular-text" />
124
+ <span class="setting-description">You can use %blogname% for your blog name.'</span>
125
  </td>
126
  </tr>
127
  <tr valign="top">
includes/wp-login-forms.php CHANGED
@@ -61,7 +61,7 @@ case 'register' :
61
  <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" value="<?php _e('Register'); ?>" tabindex="100" /></p>
62
  </form>
63
 
64
- <ul id="nav">
65
  <li><a href="<?php echo site_url('wp-login.php', 'login') ?>"><?php _e('Log in') ?></a></li>
66
  <li><a href="<?php echo site_url('wp-login.php?action=lostpassword', 'login') ?>" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a></li>
67
  </ul>
61
  <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" value="<?php _e('Register'); ?>" tabindex="100" /></p>
62
  </form>
63
 
64
+ <ul class="nav">
65
  <li><a href="<?php echo site_url('wp-login.php', 'login') ?>"><?php _e('Log in') ?></a></li>
66
  <li><a href="<?php echo site_url('wp-login.php?action=lostpassword', 'login') ?>" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a></li>
67
  </ul>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://webdesign.jaedub.com
4
  Tags: wordpress, login, register, theme, form, james kelly
5
  Requires at least: 2.5
6
  Tested up to: 2.7.1
7
- Stable tag: 2.0.4
8
 
9
  This plugin themes the WordPress login, register, forgot password and profile pages to look like the rest of your website.
10
 
@@ -55,6 +55,7 @@ Now you can save your changes and go test out your new themed login and registra
55
  * 1.2.0 - 2009-03-26 - Added capability to customize page titles for all pages affected by plugin
56
  * 2.0.0 - 2009-03-27 - Completely rewrote plugin to use page template, no more specifying template files & HTML
57
  * 2.0.1 - 2009-03-30 - Fixed a bug that redirected users who were not yet logged in to profile page
58
- * 2.0.2 - 2009-03-31 - Fixed a bug that broke new user registration and a bug that broke other plugins that use 'the_content' filter
59
  * 2.0.3 - 2009-04-02 - Fixed various reported bugs and cleaned up code
60
- * 2.0.4 - 2009-04-03 - Fixed a bug regarding relative URL's in redirection
 
4
  Tags: wordpress, login, register, theme, form, james kelly
5
  Requires at least: 2.5
6
  Tested up to: 2.7.1
7
+ Stable tag: 2.0.5
8
 
9
  This plugin themes the WordPress login, register, forgot password and profile pages to look like the rest of your website.
10
 
55
  * 1.2.0 - 2009-03-26 - Added capability to customize page titles for all pages affected by plugin
56
  * 2.0.0 - 2009-03-27 - Completely rewrote plugin to use page template, no more specifying template files & HTML
57
  * 2.0.1 - 2009-03-30 - Fixed a bug that redirected users who were not yet logged in to profile page
58
+ * 2.0.2 - 2009-03-31 - Fixed a bug that broke registration and broke other plugins using the_content filter
59
  * 2.0.3 - 2009-04-02 - Fixed various reported bugs and cleaned up code
60
+ * 2.0.4 - 2009-04-03 - Fixed a bug regarding relative URL's in redirection
61
+ * 2.0.5 - 2009-04-04 - Fixed a bug with default redirection and hid the login form from logged in users
theme-my-login.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Theme My Login
4
  Plugin URI: http://webdesign.jaedub.com/wordpress-plugins/theme-my-login-plugin
5
  Description: Themes the WordPress login, register, forgot password and profile pages to look like the rest of your website.
6
- Version: 2.0.4
7
  Author: Jae Dub
8
  Author URI: http://webdesign.jaedub.com
9
 
@@ -26,11 +26,13 @@ Version History
26
  2.0.1 - 2009-03-30
27
  Fixed a bug that redirected users who were not yet logged in to profile page
28
  2.0.2 - 2009-03-31
29
- Fixed a bug that broke new user registration and a bug that broke other plugins that use 'the_content' filter
30
  2.0.3 - 2009-04-02
31
  Fixed various reported bugs and cleaned up code
32
  2.0.4 - 2009-04-03
33
  Fixed a bug regarding relative URL's in redirection
 
 
34
  */
35
 
36
  if (!class_exists('ThemeMyLogin')) {
@@ -83,6 +85,11 @@ if (!class_exists('ThemeMyLogin')) {
83
  $page_id = $theme_my_login->ID;
84
  }
85
 
 
 
 
 
 
86
  $this->SetOption('page_id', $page_id);
87
  $this->SaveOptions();
88
  }
@@ -98,8 +105,8 @@ if (!class_exists('ThemeMyLogin')) {
98
  function InitOptions() {
99
  $this->options['chk_uninstall'] = 0;
100
  $this->options['page_id'] = '0';
101
- $this->options['login_redirect'] = 'wp-admin/';
102
- $this->options['logout_redirect'] = 'wp-login.php?loggedout=true';
103
  $this->options['login_title'] = '%blogname% &rsaquo; Log In';
104
  $this->options['login_text'] = 'Log In';
105
  $this->options['register_title'] = '%blogname% &rsaquo; Register';
@@ -200,7 +207,10 @@ if (!class_exists('ThemeMyLogin')) {
200
  switch ($pagenow) {
201
  case 'wp-register.php':
202
  case 'wp-login.php':
203
- $redirect_to = $this->ArgURL($permalink, $_GET);
 
 
 
204
  wp_safe_redirect($redirect_to);
205
  exit;
206
  break;
3
  Plugin Name: Theme My Login
4
  Plugin URI: http://webdesign.jaedub.com/wordpress-plugins/theme-my-login-plugin
5
  Description: Themes the WordPress login, register, forgot password and profile pages to look like the rest of your website.
6
+ Version: 2.0.5
7
  Author: Jae Dub
8
  Author URI: http://webdesign.jaedub.com
9
 
26
  2.0.1 - 2009-03-30
27
  Fixed a bug that redirected users who were not yet logged in to profile page
28
  2.0.2 - 2009-03-31
29
+ Fixed a bug that broke registration and broke other plugins using the_content filter
30
  2.0.3 - 2009-04-02
31
  Fixed various reported bugs and cleaned up code
32
  2.0.4 - 2009-04-03
33
  Fixed a bug regarding relative URL's in redirection
34
+ 2.0.5 - 2009-04-04
35
+ Fixed a bug with default redirection and hid the login form from logged in users
36
  */
37
 
38
  if (!class_exists('ThemeMyLogin')) {
85
  $page_id = $theme_my_login->ID;
86
  }
87
 
88
+ if ($this->GetOption('login_redirect') == 'wp-admin/')
89
+ $this->SetOption('login_redirect', admin_url());
90
+ if ($this->GetOption('logout_redirect') == 'wp-login.php?loggedout=true')
91
+ $this->SetOption('logout_redirect', site_url('wp-login.php?loggedout=true', 'login'));
92
+
93
  $this->SetOption('page_id', $page_id);
94
  $this->SaveOptions();
95
  }
105
  function InitOptions() {
106
  $this->options['chk_uninstall'] = 0;
107
  $this->options['page_id'] = '0';
108
+ $this->options['login_redirect'] = admin_url();
109
+ $this->options['logout_redirect'] = site_url('wp-login.php?loggedout=true', 'login');
110
  $this->options['login_title'] = '%blogname% &rsaquo; Log In';
111
  $this->options['login_text'] = 'Log In';
112
  $this->options['register_title'] = '%blogname% &rsaquo; Register';
207
  switch ($pagenow) {
208
  case 'wp-register.php':
209
  case 'wp-login.php':
210
+ if ( is_user_logged_in() && $_REQUEST['action'] != 'logout' )
211
+ $redirect_to = admin_url('profile.php');
212
+ else
213
+ $redirect_to = $this->ArgURL($permalink, $_GET);
214
  wp_safe_redirect($redirect_to);
215
  exit;
216
  break;