Version Description
- Fix issue with blank pages where page.php didn't exists in a theme
- Fix issue where activating Themed Profiles resulted in a 404 for profile page
- Fix issue where options were being deleted upon upgrade
- Fix issue with AJAX module not working properly in Internet Explorer
Download this release
Release Info
Developer | jfarthing84 |
Plugin | Theme My Login |
Version | 6.3.5 |
Comparing to | |
See all releases |
Code changes from version 6.3.4 to 6.3.5
- admin/class-theme-my-login-admin.php +10 -6
- includes/class-theme-my-login-abstract.php +1 -1
- includes/class-theme-my-login.php +11 -6
- modules/ajax/ajax.php +8 -0
- modules/custom-email/admin/custom-email-admin.php +0 -14
- modules/custom-redirection/admin/custom-redirection-admin.php +0 -14
- modules/custom-user-links/admin/custom-user-links-admin.php +0 -14
- modules/security/admin/security-admin.php +0 -14
- modules/themed-profiles/admin/themed-profiles-admin.php +2 -2
- modules/user-moderation/admin/user-moderation-admin.php +0 -1
- readme.txt +7 -1
- theme-my-login.php +1 -1
admin/class-theme-my-login-admin.php
CHANGED
@@ -250,17 +250,21 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
|
|
250 |
// 6.3 upgrade
|
251 |
if ( version_compare( $version, '6.3.3', '<' ) ) {
|
252 |
// Delete obsolete options
|
253 |
-
$this->delete_option( 'page_id'
|
254 |
-
$this->delete_option( '
|
255 |
-
$this->delete_option( '
|
|
|
|
|
256 |
|
257 |
// Move options to their own rows
|
258 |
foreach ( $this->get_options() as $key => $value ) {
|
259 |
if ( in_array( $key, array( 'active_modules' ) ) )
|
260 |
continue;
|
261 |
|
262 |
-
if ( is_array( $value ) )
|
263 |
-
|
|
|
|
|
264 |
|
265 |
$this->delete_option( $key );
|
266 |
}
|
@@ -294,7 +298,7 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
|
|
294 |
}
|
295 |
|
296 |
// Generate permalinks
|
297 |
-
flush_rewrite_rules();
|
298 |
|
299 |
// Activate modules
|
300 |
foreach ( $this->get_option( 'active_modules', array() ) as $module ) {
|
250 |
// 6.3 upgrade
|
251 |
if ( version_compare( $version, '6.3.3', '<' ) ) {
|
252 |
// Delete obsolete options
|
253 |
+
$this->delete_option( 'page_id' );
|
254 |
+
$this->delete_option( 'show_page' );
|
255 |
+
$this->delete_option( 'initial_nag' );
|
256 |
+
$this->delete_option( 'permalinks' );
|
257 |
+
$this->delete_option( 'flush_rules' );
|
258 |
|
259 |
// Move options to their own rows
|
260 |
foreach ( $this->get_options() as $key => $value ) {
|
261 |
if ( in_array( $key, array( 'active_modules' ) ) )
|
262 |
continue;
|
263 |
|
264 |
+
if ( ! is_array( $value ) )
|
265 |
+
continue;
|
266 |
+
|
267 |
+
update_option( "theme_my_login_{$key}", $value );
|
268 |
|
269 |
$this->delete_option( $key );
|
270 |
}
|
298 |
}
|
299 |
|
300 |
// Generate permalinks
|
301 |
+
flush_rewrite_rules( false );
|
302 |
|
303 |
// Activate modules
|
304 |
foreach ( $this->get_option( 'active_modules', array() ) as $module ) {
|
includes/class-theme-my-login-abstract.php
CHANGED
@@ -49,7 +49,7 @@ abstract class Theme_My_Login_Abstract {
|
|
49 |
* Constructor
|
50 |
*
|
51 |
* @since 6.3
|
52 |
-
* @access
|
53 |
*/
|
54 |
protected function __construct() {
|
55 |
$this->load_options();
|
49 |
* Constructor
|
50 |
*
|
51 |
* @since 6.3
|
52 |
+
* @access protected
|
53 |
*/
|
54 |
protected function __construct() {
|
55 |
$this->load_options();
|
includes/class-theme-my-login.php
CHANGED
@@ -21,7 +21,7 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
21 |
* @since 6.3.2
|
22 |
* @const string
|
23 |
*/
|
24 |
-
const version = '6.3.
|
25 |
|
26 |
/**
|
27 |
* Holds options key
|
@@ -98,8 +98,6 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
98 |
*/
|
99 |
public static function default_options() {
|
100 |
return apply_filters( 'tml_default_options', array(
|
101 |
-
'page_id' => 0,
|
102 |
-
'show_page' => true,
|
103 |
'enable_css' => true,
|
104 |
'email_login' => true,
|
105 |
'active_modules' => array()
|
@@ -605,8 +603,10 @@ if(typeof wpOnload=='function')wpOnload()
|
|
605 |
* @return string The template to include
|
606 |
*/
|
607 |
public function template_include( $template ) {
|
608 |
-
if ( self::is_tml_page() )
|
609 |
-
$
|
|
|
|
|
610 |
return $template;
|
611 |
}
|
612 |
|
@@ -883,7 +883,12 @@ if(typeof wpOnload=='function')wpOnload()
|
|
883 |
elseif ( 'retrievepassword' == $action )
|
884 |
$action = 'lostpassword';
|
885 |
|
886 |
-
|
|
|
|
|
|
|
|
|
|
|
887 |
}
|
888 |
|
889 |
/**
|
21 |
* @since 6.3.2
|
22 |
* @const string
|
23 |
*/
|
24 |
+
const version = '6.3.5';
|
25 |
|
26 |
/**
|
27 |
* Holds options key
|
98 |
*/
|
99 |
public static function default_options() {
|
100 |
return apply_filters( 'tml_default_options', array(
|
|
|
|
|
101 |
'enable_css' => true,
|
102 |
'email_login' => true,
|
103 |
'active_modules' => array()
|
603 |
* @return string The template to include
|
604 |
*/
|
605 |
public function template_include( $template ) {
|
606 |
+
if ( self::is_tml_page() ) {
|
607 |
+
if ( $page_template = get_page_template() )
|
608 |
+
return $page_template;
|
609 |
+
}
|
610 |
return $template;
|
611 |
}
|
612 |
|
883 |
elseif ( 'retrievepassword' == $action )
|
884 |
$action = 'lostpassword';
|
885 |
|
886 |
+
$page_id = wp_cache_get( $action, 'tml_page_ids' );
|
887 |
+
if ( false === $page_id ) {
|
888 |
+
$page_id = $wpdb->get_var( $wpdb->prepare( "SELECT p.ID FROM $wpdb->posts p LEFT JOIN $wpdb->postmeta pmeta ON p.ID = pmeta.post_id WHERE p.post_type = 'tml_page' AND pmeta.meta_key = '_tml_action' AND pmeta.meta_value = %s", $action ) );
|
889 |
+
wp_cache_add( $action, $page_id, 'tml_page_ids' );
|
890 |
+
}
|
891 |
+
return $page_id;
|
892 |
}
|
893 |
|
894 |
/**
|
modules/ajax/ajax.php
CHANGED
@@ -83,6 +83,14 @@ class Theme_My_Login_Ajax extends Theme_My_Login_Abstract {
|
|
83 |
|
84 |
$data = $instance->display();
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
$x = new WP_Ajax_Response( array(
|
87 |
'what' => 'login',
|
88 |
'action' => $theme_my_login->request_action,
|
83 |
|
84 |
$data = $instance->display();
|
85 |
|
86 |
+
send_origin_headers();
|
87 |
+
|
88 |
+
@header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
|
89 |
+
@header( 'X-Robots-Tag: noindex' );
|
90 |
+
|
91 |
+
send_nosniff_header();
|
92 |
+
nocache_headers();
|
93 |
+
|
94 |
$x = new WP_Ajax_Response( array(
|
95 |
'what' => 'login',
|
96 |
'action' => $theme_my_login->request_action,
|
modules/custom-email/admin/custom-email-admin.php
CHANGED
@@ -44,7 +44,6 @@ class Theme_My_Login_Custom_Email_Admin extends Theme_My_Login_Abstract {
|
|
44 |
* @access protected
|
45 |
*/
|
46 |
protected function load() {
|
47 |
-
add_action( 'tml_activate_custom-email/custom-email.php', array( &$this, 'activate' ) );
|
48 |
add_action( 'tml_uninstall_custom-email/custom-email.php', array( &$this, 'uninstall' ) );
|
49 |
|
50 |
add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
|
@@ -65,19 +64,6 @@ class Theme_My_Login_Custom_Email_Admin extends Theme_My_Login_Abstract {
|
|
65 |
return Theme_My_Login_Custom_Email::default_options();
|
66 |
}
|
67 |
|
68 |
-
/**
|
69 |
-
* Activates the module
|
70 |
-
*
|
71 |
-
* Callback for "tml_activate_custom-email/custom-email.php" hook in method Theme_My_Login_Modules_Admin::activate_module()
|
72 |
-
*
|
73 |
-
* @see Theme_My_Login_Modules_Admin::activate_module()
|
74 |
-
* @since 6.0
|
75 |
-
* @access public
|
76 |
-
*/
|
77 |
-
public function activate() {
|
78 |
-
$this->save_options();
|
79 |
-
}
|
80 |
-
|
81 |
/**
|
82 |
* Uninstalls the module
|
83 |
*
|
44 |
* @access protected
|
45 |
*/
|
46 |
protected function load() {
|
|
|
47 |
add_action( 'tml_uninstall_custom-email/custom-email.php', array( &$this, 'uninstall' ) );
|
48 |
|
49 |
add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
|
64 |
return Theme_My_Login_Custom_Email::default_options();
|
65 |
}
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
/**
|
68 |
* Uninstalls the module
|
69 |
*
|
modules/custom-redirection/admin/custom-redirection-admin.php
CHANGED
@@ -41,7 +41,6 @@ class Theme_My_Login_Custom_Redirection_Admin extends Theme_My_Login_Abstract {
|
|
41 |
* @access protected
|
42 |
*/
|
43 |
protected function load() {
|
44 |
-
add_action( 'tml_activate_custom-redirection/custom-redirection.php', array( &$this, 'activate' ) );
|
45 |
add_action( 'tml_uninstall_custom-redirection/custom-redirection.php', array( &$this, 'uninstall' ) );
|
46 |
|
47 |
add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
|
@@ -60,19 +59,6 @@ class Theme_My_Login_Custom_Redirection_Admin extends Theme_My_Login_Abstract {
|
|
60 |
return Theme_My_Login_Custom_Redirection::default_options();
|
61 |
}
|
62 |
|
63 |
-
/**
|
64 |
-
* Activates the module
|
65 |
-
*
|
66 |
-
* Callback for "tml_activate_custom-redirection/custom-redirection.php" hook in method Theme_My_Login_Modules_Admin::activate_module()
|
67 |
-
*
|
68 |
-
* @see Theme_My_Login_Modules_Admin::activate_module()
|
69 |
-
* @since 6.0
|
70 |
-
* @access public
|
71 |
-
*/
|
72 |
-
public function activate() {
|
73 |
-
$this->save_options();
|
74 |
-
}
|
75 |
-
|
76 |
/**
|
77 |
* Uninstalls the module
|
78 |
*
|
41 |
* @access protected
|
42 |
*/
|
43 |
protected function load() {
|
|
|
44 |
add_action( 'tml_uninstall_custom-redirection/custom-redirection.php', array( &$this, 'uninstall' ) );
|
45 |
|
46 |
add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
|
59 |
return Theme_My_Login_Custom_Redirection::default_options();
|
60 |
}
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
/**
|
63 |
* Uninstalls the module
|
64 |
*
|
modules/custom-user-links/admin/custom-user-links-admin.php
CHANGED
@@ -44,7 +44,6 @@ class Theme_My_Login_Custom_User_Links_Admin extends Theme_My_Login_Abstract {
|
|
44 |
* @access protected
|
45 |
*/
|
46 |
protected function load() {
|
47 |
-
add_action( 'tml_activate_custom-user-links/custom-user-links.php', array( &$this, 'activate' ) );
|
48 |
add_action( 'tml_uninstall_custom-user-links/custom-user-links.php', array( &$this, 'uninstall' ) );
|
49 |
|
50 |
add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
|
@@ -68,19 +67,6 @@ class Theme_My_Login_Custom_User_Links_Admin extends Theme_My_Login_Abstract {
|
|
68 |
return Theme_My_login_Custom_User_Links::default_options();
|
69 |
}
|
70 |
|
71 |
-
/**
|
72 |
-
* Activates the module
|
73 |
-
*
|
74 |
-
* Callback for "tml_activate_custom-user-links/custom-user-links.php" hook in method Theme_My_Login_Admin::activate_module()
|
75 |
-
*
|
76 |
-
* @see Theme_My_Login_Admin::activate_module()
|
77 |
-
* @since 6.0
|
78 |
-
* @access public
|
79 |
-
*/
|
80 |
-
public function activate() {
|
81 |
-
$this->save_options();
|
82 |
-
}
|
83 |
-
|
84 |
/**
|
85 |
* Uninstalls the module
|
86 |
*
|
44 |
* @access protected
|
45 |
*/
|
46 |
protected function load() {
|
|
|
47 |
add_action( 'tml_uninstall_custom-user-links/custom-user-links.php', array( &$this, 'uninstall' ) );
|
48 |
|
49 |
add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
|
67 |
return Theme_My_login_Custom_User_Links::default_options();
|
68 |
}
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
/**
|
71 |
* Uninstalls the module
|
72 |
*
|
modules/security/admin/security-admin.php
CHANGED
@@ -52,7 +52,6 @@ class Theme_My_Login_Security_Admin extends Theme_My_Login_Abstract {
|
|
52 |
* @access protected
|
53 |
*/
|
54 |
protected function load() {
|
55 |
-
add_action( 'tml_activate_security/security.php', array( &$this, 'activate' ) );
|
56 |
add_action( 'tml_uninstall_security/security.php', array( &$this, 'uninstall' ) );
|
57 |
|
58 |
add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
|
@@ -62,19 +61,6 @@ class Theme_My_Login_Security_Admin extends Theme_My_Login_Abstract {
|
|
62 |
add_filter( 'user_row_actions', array( &$this, 'user_row_actions' ), 10, 2 );
|
63 |
}
|
64 |
|
65 |
-
/**
|
66 |
-
* Activates the module
|
67 |
-
*
|
68 |
-
* Callback for "tml_activate_security/security.php" hook in method Theme_My_Login_Modules_Admin::activate_module()
|
69 |
-
*
|
70 |
-
* @see Theme_My_Login_Modules_Admin::activate_module()
|
71 |
-
* @since 6.0
|
72 |
-
* @access public
|
73 |
-
*/
|
74 |
-
public function activate() {
|
75 |
-
$this->save_options();
|
76 |
-
}
|
77 |
-
|
78 |
/**
|
79 |
* Uninstalls the module
|
80 |
*
|
52 |
* @access protected
|
53 |
*/
|
54 |
protected function load() {
|
|
|
55 |
add_action( 'tml_uninstall_security/security.php', array( &$this, 'uninstall' ) );
|
56 |
|
57 |
add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
|
61 |
add_filter( 'user_row_actions', array( &$this, 'user_row_actions' ), 10, 2 );
|
62 |
}
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
/**
|
65 |
* Uninstalls the module
|
66 |
*
|
modules/themed-profiles/admin/themed-profiles-admin.php
CHANGED
@@ -78,9 +78,9 @@ class Theme_My_Login_Themed_Profiles_Admin extends Theme_My_Login_Abstract {
|
|
78 |
'ping_status' => 'closed'
|
79 |
) );
|
80 |
update_post_meta( $page_id, '_tml_action', 'profile' );
|
81 |
-
}
|
82 |
|
83 |
-
|
|
|
84 |
}
|
85 |
|
86 |
/**
|
78 |
'ping_status' => 'closed'
|
79 |
) );
|
80 |
update_post_meta( $page_id, '_tml_action', 'profile' );
|
|
|
81 |
|
82 |
+
flush_rewrite_rules( false );
|
83 |
+
}
|
84 |
}
|
85 |
|
86 |
/**
|
modules/user-moderation/admin/user-moderation-admin.php
CHANGED
@@ -86,7 +86,6 @@ class Theme_My_Login_User_Moderation_Admin extends Theme_My_Login_Abstract {
|
|
86 |
add_settings_error( $this->options_key, 'invalid_module', __( 'User Moderation is not currently compatible with multisite.', 'theme-my-login' ) );
|
87 |
return;
|
88 |
}
|
89 |
-
$this->save_options();
|
90 |
add_role( 'pending', 'Pending', array() );
|
91 |
}
|
92 |
|
86 |
add_settings_error( $this->options_key, 'invalid_module', __( 'User Moderation is not currently compatible with multisite.', 'theme-my-login' ) );
|
87 |
return;
|
88 |
}
|
|
|
89 |
add_role( 'pending', 'Pending', array() );
|
90 |
}
|
91 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: jfarthing84
|
|
3 |
Tags: widget, login, registration, theme, custom, log in, register, sidebar, gravatar, redirection, e-mail
|
4 |
Requires at least: 3.1
|
5 |
Tested up to: 3.5.1
|
6 |
-
Stable tag: 6.3.
|
7 |
|
8 |
Themes the WordPress login pages according to your theme.
|
9 |
|
@@ -56,6 +56,12 @@ Please visit http://www.jfarthing.com/development/theme-my-login first and then
|
|
56 |
|
57 |
== Changelog ==
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
= 6.3.4 =
|
60 |
* Use verbose rewrite rules for TML pages
|
61 |
|
3 |
Tags: widget, login, registration, theme, custom, log in, register, sidebar, gravatar, redirection, e-mail
|
4 |
Requires at least: 3.1
|
5 |
Tested up to: 3.5.1
|
6 |
+
Stable tag: 6.3.5
|
7 |
|
8 |
Themes the WordPress login pages according to your theme.
|
9 |
|
56 |
|
57 |
== Changelog ==
|
58 |
|
59 |
+
= 6.3.5 =
|
60 |
+
* Fix issue with blank pages where page.php didn't exists in a theme
|
61 |
+
* Fix issue where activating Themed Profiles resulted in a 404 for profile page
|
62 |
+
* Fix issue where options were being deleted upon upgrade
|
63 |
+
* Fix issue with AJAX module not working properly in Internet Explorer
|
64 |
+
|
65 |
= 6.3.4 =
|
66 |
* Use verbose rewrite rules for TML pages
|
67 |
|
theme-my-login.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Theme My Login
|
4 |
Plugin URI: http://www.jfarthing.com/extend/wordpress-plugins/theme-my-login/
|
5 |
Description: Themes the WordPress login, registration and forgot password pages according to your theme.
|
6 |
-
Version: 6.3.
|
7 |
Author: Jeff Farthing
|
8 |
Author URI: http://www.jfarthing.com
|
9 |
Text Domain: theme-my-login
|
3 |
Plugin Name: Theme My Login
|
4 |
Plugin URI: http://www.jfarthing.com/extend/wordpress-plugins/theme-my-login/
|
5 |
Description: Themes the WordPress login, registration and forgot password pages according to your theme.
|
6 |
+
Version: 6.3.5
|
7 |
Author: Jeff Farthing
|
8 |
Author URI: http://www.jfarthing.com
|
9 |
Text Domain: theme-my-login
|