Version Description
Download this release
Release Info
Developer | jfarthing84 |
Plugin | Theme My Login |
Version | 2.0.8 |
Comparing to | |
See all releases |
Code changes from version 2.0.7 to 2.0.8
- includes/profile-actions.php +4 -4
- includes/profile-form.php +5 -3
- includes/wp-login-actions.php +2 -2
- includes/wp-login-forms.php +2 -4
- readme.txt +3 -2
- theme-my-login.php +34 -46
includes/profile-actions.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
require('wp-login-functions.php');
|
4 |
-
require_once ABSPATH . '/wp-admin/includes/misc.php';
|
5 |
-
require_once ABSPATH . '/wp-admin/includes/user.php';
|
6 |
-
require_once ABSPATH . WPINC . '/registration.php';
|
7 |
|
8 |
if ( !isset($user_id) ) {
|
9 |
$current_user = wp_get_current_user();
|
1 |
<?php
|
2 |
|
3 |
+
require (WP_PLUGIN_DIR . '/theme-my-login/includes/wp-login-functions.php');
|
4 |
+
require_once (ABSPATH . '/wp-admin/includes/misc.php');
|
5 |
+
require_once (ABSPATH . '/wp-admin/includes/user.php');
|
6 |
+
require_once (ABSPATH . WPINC . '/registration.php');
|
7 |
|
8 |
if ( !isset($user_id) ) {
|
9 |
$current_user = wp_get_current_user();
|
includes/profile-form.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
require('wp-login-functions.php');
|
4 |
-
require_once ABSPATH . '/wp-admin/includes/misc.php';
|
5 |
-
require_once ABSPATH . '/wp-admin/includes/user.php';
|
6 |
|
7 |
if ( !isset($user_id) ) {
|
8 |
$current_user = wp_get_current_user();
|
@@ -14,7 +14,9 @@ if (isset($wp_http_referer))
|
|
14 |
$wp_http_referer = remove_query_arg(array('update', 'delete_count'), stripslashes($wp_http_referer));
|
15 |
$user_id = (int) $user_id;
|
16 |
|
|
|
17 |
$profileuser = get_user_to_edit($user_id);
|
|
|
18 |
if ( !current_user_can('edit_user', $user_id) )
|
19 |
wp_die(__('You do not have permission to edit this user.'));
|
20 |
|
1 |
<?php
|
2 |
|
3 |
+
require (WP_PLUGIN_DIR . '/theme-my-login/includes/wp-login-functions.php');
|
4 |
+
require_once (ABSPATH . '/wp-admin/includes/misc.php');
|
5 |
+
require_once (ABSPATH . '/wp-admin/includes/user.php');
|
6 |
|
7 |
if ( !isset($user_id) ) {
|
8 |
$current_user = wp_get_current_user();
|
14 |
$wp_http_referer = remove_query_arg(array('update', 'delete_count'), stripslashes($wp_http_referer));
|
15 |
$user_id = (int) $user_id;
|
16 |
|
17 |
+
global $profileuser;
|
18 |
$profileuser = get_user_to_edit($user_id);
|
19 |
+
|
20 |
if ( !current_user_can('edit_user', $user_id) )
|
21 |
wp_die(__('You do not have permission to edit this user.'));
|
22 |
|
includes/wp-login-actions.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
global $wp_version;
|
4 |
|
5 |
-
require('wp-login-functions.php');
|
6 |
|
7 |
if ( force_ssl_admin() && !is_ssl() ) {
|
8 |
if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) {
|
@@ -85,7 +85,7 @@ case 'register' :
|
|
85 |
}
|
86 |
|
87 |
if ( $http_post ) {
|
88 |
-
require_once(
|
89 |
|
90 |
$user_login = $_POST['user_login'];
|
91 |
$user_email = $_POST['user_email'];
|
2 |
|
3 |
global $wp_version;
|
4 |
|
5 |
+
require (WP_PLUGIN_DIR . '/theme-my-login/includes/wp-login-functions.php');
|
6 |
|
7 |
if ( force_ssl_admin() && !is_ssl() ) {
|
8 |
if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) {
|
85 |
}
|
86 |
|
87 |
if ( $http_post ) {
|
88 |
+
require_once (ABSPATH . WPINC . '/registration.php');
|
89 |
|
90 |
$user_login = $_POST['user_login'];
|
91 |
$user_email = $_POST['user_email'];
|
includes/wp-login-forms.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
require('wp-login-functions.php');
|
4 |
|
5 |
$http_post = ('POST' == $_SERVER['REQUEST_METHOD']);
|
6 |
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
|
@@ -70,14 +70,12 @@ default :
|
|
70 |
if ( isset( $_REQUEST['redirect_to'] ) ) {
|
71 |
$redirect_to = $_REQUEST['redirect_to'];
|
72 |
// Redirect to https if user wants ssl
|
73 |
-
if (
|
74 |
$redirect_to = preg_replace('|^http://|', 'https://', $redirect_to);
|
75 |
} else {
|
76 |
$redirect_to = $this->GetOption('login_redirect');
|
77 |
}
|
78 |
|
79 |
-
//$redirect_to = apply_filters('login_redirect', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '', $user);
|
80 |
-
|
81 |
// Clear errors if loggedout is set.
|
82 |
if ( !empty($_GET['loggedout']) )
|
83 |
$errors = new WP_Error();
|
1 |
<?php
|
2 |
|
3 |
+
require (WP_PLUGIN_DIR . '/theme-my-login/includes/wp-login-functions.php');
|
4 |
|
5 |
$http_post = ('POST' == $_SERVER['REQUEST_METHOD']);
|
6 |
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
|
70 |
if ( isset( $_REQUEST['redirect_to'] ) ) {
|
71 |
$redirect_to = $_REQUEST['redirect_to'];
|
72 |
// Redirect to https if user wants ssl
|
73 |
+
if ( $secure_cookie && false !== strpos($redirect_to, 'wp-admin') )
|
74 |
$redirect_to = preg_replace('|^http://|', 'https://', $redirect_to);
|
75 |
} else {
|
76 |
$redirect_to = $this->GetOption('login_redirect');
|
77 |
}
|
78 |
|
|
|
|
|
79 |
// Clear errors if loggedout is set.
|
80 |
if ( !empty($_GET['loggedout']) )
|
81 |
$errors = new WP_Error();
|
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.
|
8 |
|
9 |
This plugin themes the WordPress login, register, forgot password and profile pages to look like the rest of your website.
|
10 |
|
@@ -60,4 +60,5 @@ Now you can save your changes and go test out your new themed login and registra
|
|
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
|
62 |
* 2.0.6 - 2009-04-08 - Added the option to turn on/off subscriber profile theming
|
63 |
-
* 2.0.7 - 2009-04-10 - Fixed a bug that broke the Featured Content plugin
|
|
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.8
|
8 |
|
9 |
This plugin themes the WordPress login, register, forgot password and profile pages to look like the rest of your website.
|
10 |
|
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
|
62 |
* 2.0.6 - 2009-04-08 - Added the option to turn on/off subscriber profile theming
|
63 |
+
* 2.0.7 - 2009-04-10 - Fixed a bug that broke the Featured Content plugin
|
64 |
+
* 2.0.8 - 2009-04-11 - Fixed a bug that broke the login with permalinks
|
theme-my-login.php
CHANGED
@@ -3,52 +3,31 @@
|
|
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.
|
7 |
Author: Jae Dub
|
8 |
Author URI: http://webdesign.jaedub.com
|
9 |
-
|
10 |
-
Version History
|
11 |
-
|
12 |
-
1.0.0 - 2009-03-13
|
13 |
-
Initial release version
|
14 |
-
1.0.1 - 2009-03-14
|
15 |
-
Made backwards compatible to WordPress 2.5+
|
16 |
-
1.1.0 - 2009-03-14
|
17 |
-
Added custom profile to completely hide the back-end from subscribers
|
18 |
-
1.1.1 - 2009-03-16
|
19 |
-
Prepared plugin for internationalization and fixed a PHP version bug
|
20 |
-
1.1.2 - 2009-03-20
|
21 |
-
Updated to allow customization of text below registration form
|
22 |
-
1.2.0 - 2009-03-26
|
23 |
-
Added capability to customize page titles for all pages affected by plugin
|
24 |
-
2.0.0 - 2009-03-27
|
25 |
-
Completely rewrote plugin to use page template, no more specifying template files & HTML
|
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 |
-
2.0.6 - 2009-04-08
|
37 |
-
Added the option to turn on/off subscriber profile theming
|
38 |
-
2.0.7 - 2009-04-10
|
39 |
-
Fixed a bug that broke the Featured Content plugin
|
40 |
*/
|
41 |
|
42 |
|
43 |
global $wp_version;
|
44 |
|
45 |
-
if ($wp_version < '2.6')
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
if (!class_exists('ThemeMyLogin')) {
|
49 |
class ThemeMyLogin {
|
50 |
|
51 |
-
var $version = '2.0.
|
52 |
var $options = array();
|
53 |
var $errors = '';
|
54 |
|
@@ -158,7 +137,7 @@ if (!class_exists('ThemeMyLogin')) {
|
|
158 |
}
|
159 |
|
160 |
function AdminPage(){
|
161 |
-
|
162 |
}
|
163 |
|
164 |
function QueryURL() {
|
@@ -229,13 +208,20 @@ if (!class_exists('ThemeMyLogin')) {
|
|
229 |
|
230 |
function ParseRequest() {
|
231 |
global $wp;
|
232 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
|
234 |
-
if ($
|
235 |
if ($this->GetOption('theme_profile') && isset($_GET['profile']) && isset($_REQUEST['action']) && $_REQUEST['action'] == 'update' && is_user_logged_in())
|
236 |
-
|
237 |
else
|
238 |
-
|
239 |
}
|
240 |
}
|
241 |
|
@@ -251,11 +237,11 @@ if (!class_exists('ThemeMyLogin')) {
|
|
251 |
}
|
252 |
|
253 |
function DisplayProfile() {
|
254 |
-
|
255 |
}
|
256 |
|
257 |
function DisplayLogin() {
|
258 |
-
|
259 |
}
|
260 |
|
261 |
function WPHead() {
|
@@ -267,7 +253,9 @@ if (!class_exists('ThemeMyLogin')) {
|
|
267 |
if (isset($_GET['profile']) && is_user_logged_in())
|
268 |
return str_replace('%blogname%', get_option('blogname'), $this->GetOption('profile_title'));
|
269 |
|
270 |
-
if (isset($_GET['action']))
|
|
|
|
|
271 |
switch ($_GET['action']) {
|
272 |
case 'register':
|
273 |
return str_replace('%blogname%', get_option('blogname'), $this->GetOption('register_title'));
|
@@ -282,7 +270,6 @@ if (!class_exists('ThemeMyLogin')) {
|
|
282 |
default:
|
283 |
return str_replace('%blogname%', get_option('blogname'), $this->GetOption('login_title'));
|
284 |
}
|
285 |
-
endif;
|
286 |
} return $title;
|
287 |
}
|
288 |
|
@@ -291,7 +278,9 @@ if (!class_exists('ThemeMyLogin')) {
|
|
291 |
if (isset($_GET['profile']) && is_user_logged_in())
|
292 |
return $this->GetOption('profile_text');
|
293 |
|
294 |
-
if (isset($_GET['action']))
|
|
|
|
|
295 |
switch ($_GET['action']) {
|
296 |
case 'register':
|
297 |
return $this->GetOption('register_text');
|
@@ -306,7 +295,6 @@ if (!class_exists('ThemeMyLogin')) {
|
|
306 |
default:
|
307 |
return $this->GetOption('login_text');
|
308 |
}
|
309 |
-
endif;
|
310 |
} return $title;
|
311 |
}
|
312 |
|
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.8
|
7 |
Author: Jae Dub
|
8 |
Author URI: http://webdesign.jaedub.com
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
*/
|
10 |
|
11 |
|
12 |
global $wp_version;
|
13 |
|
14 |
+
if ($wp_version < '2.6') {
|
15 |
+
if ( !defined('WP_CONTENT_DIR') )
|
16 |
+
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
|
17 |
+
if ( !defined('WP_CONTENT_URL') )
|
18 |
+
define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content');
|
19 |
+
if ( !defined('WP_PLUGIN_DIR') )
|
20 |
+
define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
|
21 |
+
if ( !defined('WP_PLUGIN_URL') )
|
22 |
+
define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' );
|
23 |
+
|
24 |
+
require (WP_PLUGIN_DIR . '/theme-my-login/includes/compat.php');
|
25 |
+
}
|
26 |
|
27 |
if (!class_exists('ThemeMyLogin')) {
|
28 |
class ThemeMyLogin {
|
29 |
|
30 |
+
var $version = '2.0.8';
|
31 |
var $options = array();
|
32 |
var $errors = '';
|
33 |
|
137 |
}
|
138 |
|
139 |
function AdminPage(){
|
140 |
+
require (WP_PLUGIN_DIR . '/theme-my-login/includes/admin-page.php');
|
141 |
}
|
142 |
|
143 |
function QueryURL() {
|
208 |
|
209 |
function ParseRequest() {
|
210 |
global $wp;
|
211 |
+
$is_login = false;
|
212 |
+
$page_id = isset($wp->query_vars['page_id']) ? $wp->query_vars['page_id'] : 0;
|
213 |
+
$pagename = isset($wp->query_vars['pagename']) ? $wp->query_vars['pagename'] : '';
|
214 |
+
|
215 |
+
if (isset($page_id) && $page_id == $this->GetOption('page_id'))
|
216 |
+
$is_login = true;
|
217 |
+
elseif (isset($pagename) && $pagename == 'login')
|
218 |
+
$is_login = true;
|
219 |
|
220 |
+
if ($is_login) {
|
221 |
if ($this->GetOption('theme_profile') && isset($_GET['profile']) && isset($_REQUEST['action']) && $_REQUEST['action'] == 'update' && is_user_logged_in())
|
222 |
+
require (WP_PLUGIN_DIR . '/theme-my-login/includes/profile-actions.php');
|
223 |
else
|
224 |
+
require (WP_PLUGIN_DIR . '/theme-my-login/includes/wp-login-actions.php');
|
225 |
}
|
226 |
}
|
227 |
|
237 |
}
|
238 |
|
239 |
function DisplayProfile() {
|
240 |
+
require (WP_PLUGIN_DIR . '/theme-my-login/includes/profile-form.php');
|
241 |
}
|
242 |
|
243 |
function DisplayLogin() {
|
244 |
+
require (WP_PLUGIN_DIR . '/theme-my-login/includes/wp-login-forms.php');
|
245 |
}
|
246 |
|
247 |
function WPHead() {
|
253 |
if (isset($_GET['profile']) && is_user_logged_in())
|
254 |
return str_replace('%blogname%', get_option('blogname'), $this->GetOption('profile_title'));
|
255 |
|
256 |
+
if (!isset($_GET['action']))
|
257 |
+
$_GET['action'] = 'login';
|
258 |
+
|
259 |
switch ($_GET['action']) {
|
260 |
case 'register':
|
261 |
return str_replace('%blogname%', get_option('blogname'), $this->GetOption('register_title'));
|
270 |
default:
|
271 |
return str_replace('%blogname%', get_option('blogname'), $this->GetOption('login_title'));
|
272 |
}
|
|
|
273 |
} return $title;
|
274 |
}
|
275 |
|
278 |
if (isset($_GET['profile']) && is_user_logged_in())
|
279 |
return $this->GetOption('profile_text');
|
280 |
|
281 |
+
if (!isset($_GET['action']))
|
282 |
+
$_GET['action'] = 'login';
|
283 |
+
|
284 |
switch ($_GET['action']) {
|
285 |
case 'register':
|
286 |
return $this->GetOption('register_text');
|
295 |
default:
|
296 |
return $this->GetOption('login_text');
|
297 |
}
|
|
|
298 |
} return $title;
|
299 |
}
|
300 |
|