Version Description
- Fix redirect loop bug
- Add visual cues for permalinks
- Fix iframe bug
Download this release
Release Info
Developer | jfarthing84 |
Plugin | Theme My Login |
Version | 6.2.2 |
Comparing to | |
See all releases |
Code changes from version 6.2.1 to 6.2.2
- admin/class-theme-my-login-admin.php +1 -0
- includes/class-theme-my-login.php +35 -12
- readme.txt +6 -1
- theme-my-login.php +1 -1
admin/class-theme-my-login-admin.php
CHANGED
@@ -350,6 +350,7 @@ class Theme_My_Login_Admin {
|
|
350 |
<th scope="row"><label for="theme_my_login_permalinks_<?php echo $action; ?>"><?php echo $label; ?></label></th>
|
351 |
<td>
|
352 |
<input name="theme_my_login[permalinks][<?php echo $action; ?>]" type="text" id="theme_my_login_permalinks_<?php echo $action; ?>" value="<?php echo $theme_my_login->options->get_option( array( 'permalinks', $action ) ); ?>" class="regular-text" />
|
|
|
353 |
</td>
|
354 |
</tr>
|
355 |
<?php endforeach;
|
350 |
<th scope="row"><label for="theme_my_login_permalinks_<?php echo $action; ?>"><?php echo $label; ?></label></th>
|
351 |
<td>
|
352 |
<input name="theme_my_login[permalinks][<?php echo $action; ?>]" type="text" id="theme_my_login_permalinks_<?php echo $action; ?>" value="<?php echo $theme_my_login->options->get_option( array( 'permalinks', $action ) ); ?>" class="regular-text" />
|
353 |
+
<p class="description"><strong><?php _e( 'Permalink:' ); ?></strong> <span id="sample-permalink"><?php echo $theme_my_login->get_login_page_link( compact( 'action' ) ); ?></span></p>
|
354 |
</td>
|
355 |
</tr>
|
356 |
<?php endforeach;
|
includes/class-theme-my-login.php
CHANGED
@@ -84,6 +84,8 @@ class Theme_My_Login {
|
|
84 |
// Load options again to allow modules to tap in
|
85 |
add_action( 'tml_modules_loaded', array( &$this, 'init_options' ), 0 );
|
86 |
|
|
|
|
|
87 |
add_action( 'init', array( &$this, 'init' ) );
|
88 |
add_action( 'widgets_init', array( &$this, 'widgets_init' ) );
|
89 |
add_action( 'parse_request', array( &$this, 'parse_request' ) );
|
@@ -130,6 +132,33 @@ class Theme_My_Login {
|
|
130 |
) ) );
|
131 |
}
|
132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
/**
|
134 |
* Initializes the plugin
|
135 |
*
|
@@ -147,13 +176,6 @@ class Theme_My_Login {
|
|
147 |
wp_enqueue_style( 'theme-my-login', Theme_My_Login::get_stylesheet(), false, $this->options->get_option( 'version' ) );
|
148 |
|
149 |
$wp->add_query_var( 'action' );
|
150 |
-
|
151 |
-
$page_id = $this->options->get_option( 'page_id' );
|
152 |
-
|
153 |
-
foreach ( $this->options->get_option( 'permalinks', array() ) as $action => $slug ) {
|
154 |
-
if ( !empty( $slug ) )
|
155 |
-
add_rewrite_rule( "$slug/?$", "index.php?page_id=$page_id&action=$action", 'top' );
|
156 |
-
}
|
157 |
}
|
158 |
|
159 |
/**
|
@@ -209,7 +231,6 @@ class Theme_My_Login {
|
|
209 |
do_action_ref_array( 'tml_request', array( &$this ) );
|
210 |
|
211 |
// allow plugins to override the default actions, and to add extra actions if they want
|
212 |
-
do_action( 'login_init' );
|
213 |
do_action( 'login_form_' . $action );
|
214 |
|
215 |
if ( has_action( 'tml_request_' . $action ) ) {
|
@@ -418,6 +439,8 @@ class Theme_My_Login {
|
|
418 |
global $wp_version;
|
419 |
|
420 |
if ( $this->is_login_page() ) {
|
|
|
|
|
421 |
remove_action( 'wp_head', 'feed_links', 2 );
|
422 |
remove_action( 'wp_head', 'feed_links_extra', 3 );
|
423 |
remove_action( 'wp_head', 'rsd_link' );
|
@@ -465,12 +488,12 @@ class Theme_My_Login {
|
|
465 |
|
466 |
$link = $wp_rewrite->get_page_permastruct();
|
467 |
if ( !empty( $link ) ) {
|
|
|
468 |
$action = isset( $q['action'] ) ? $q['action'] : 'login';
|
469 |
-
if ( $slug = $this->options->get_option( array( 'permalinks', $action ) ) )
|
|
|
470 |
unset( $q['action'] );
|
471 |
-
|
472 |
-
$slug = $page->post_name;
|
473 |
-
$link = str_replace( '%pagename%', $slug, $link );
|
474 |
$link = home_url( $link );
|
475 |
$link = user_trailingslashit( $link, 'page' );
|
476 |
} else {
|
84 |
// Load options again to allow modules to tap in
|
85 |
add_action( 'tml_modules_loaded', array( &$this, 'init_options' ), 0 );
|
86 |
|
87 |
+
add_filter( 'rewrite_rules_array', array( &$this, 'rewrite_rules_array' ) );
|
88 |
+
|
89 |
add_action( 'init', array( &$this, 'init' ) );
|
90 |
add_action( 'widgets_init', array( &$this, 'widgets_init' ) );
|
91 |
add_action( 'parse_request', array( &$this, 'parse_request' ) );
|
132 |
) ) );
|
133 |
}
|
134 |
|
135 |
+
/**
|
136 |
+
* Handles permalink rewrite rules
|
137 |
+
*
|
138 |
+
* @since 6.2.2
|
139 |
+
* @access public
|
140 |
+
*
|
141 |
+
* @param array $rules Rewrite rules
|
142 |
+
* @return array Rewrite rules
|
143 |
+
*/
|
144 |
+
function rewrite_rules_array( $rules ) {
|
145 |
+
if ( defined( 'WP_INSTALLING' ) )
|
146 |
+
return $rules;
|
147 |
+
|
148 |
+
$page =& get_page( $this->options->get_option( 'page_id' ) );
|
149 |
+
|
150 |
+
$page_uri = get_page_uri( $page->ID );
|
151 |
+
|
152 |
+
$tml_rules = array();
|
153 |
+
foreach ( $this->options->get_option( 'permalinks', array() ) as $action => $slug ) {
|
154 |
+
if ( !empty( $slug ) ) {
|
155 |
+
$slug = str_replace( $page->post_name, $slug, $page_uri );
|
156 |
+
$tml_rules["{$slug}/?$"] = "index.php?page_id={$page->ID}&action={$action}";
|
157 |
+
}
|
158 |
+
}
|
159 |
+
return array_merge( $tml_rules, $rules );
|
160 |
+
}
|
161 |
+
|
162 |
/**
|
163 |
* Initializes the plugin
|
164 |
*
|
176 |
wp_enqueue_style( 'theme-my-login', Theme_My_Login::get_stylesheet(), false, $this->options->get_option( 'version' ) );
|
177 |
|
178 |
$wp->add_query_var( 'action' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
}
|
180 |
|
181 |
/**
|
231 |
do_action_ref_array( 'tml_request', array( &$this ) );
|
232 |
|
233 |
// allow plugins to override the default actions, and to add extra actions if they want
|
|
|
234 |
do_action( 'login_form_' . $action );
|
235 |
|
236 |
if ( has_action( 'tml_request_' . $action ) ) {
|
439 |
global $wp_version;
|
440 |
|
441 |
if ( $this->is_login_page() ) {
|
442 |
+
do_action( 'login_init' );
|
443 |
+
|
444 |
remove_action( 'wp_head', 'feed_links', 2 );
|
445 |
remove_action( 'wp_head', 'feed_links_extra', 3 );
|
446 |
remove_action( 'wp_head', 'rsd_link' );
|
488 |
|
489 |
$link = $wp_rewrite->get_page_permastruct();
|
490 |
if ( !empty( $link ) ) {
|
491 |
+
$link = str_replace( '%pagename%', get_page_uri( $page->ID ), $link );
|
492 |
$action = isset( $q['action'] ) ? $q['action'] : 'login';
|
493 |
+
if ( $slug = $this->options->get_option( array( 'permalinks', $action ) ) ) {
|
494 |
+
$link = str_replace( $page->post_name, $slug, $link );
|
495 |
unset( $q['action'] );
|
496 |
+
}
|
|
|
|
|
497 |
$link = home_url( $link );
|
498 |
$link = user_trailingslashit( $link, 'page' );
|
499 |
} else {
|
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.4
|
6 |
-
Stable tag: 6.2.
|
7 |
|
8 |
Themes the WordPress login pages according to your theme.
|
9 |
|
@@ -41,6 +41,11 @@ Please visit http://www.jfarthing.com/docs/category/theme-my-login first and the
|
|
41 |
|
42 |
== Changelog ==
|
43 |
|
|
|
|
|
|
|
|
|
|
|
44 |
= 6.2.1 =
|
45 |
* Add post password handling
|
46 |
* Don't block admin when DOING_AJAX
|
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.4
|
6 |
+
Stable tag: 6.2.2
|
7 |
|
8 |
Themes the WordPress login pages according to your theme.
|
9 |
|
41 |
|
42 |
== Changelog ==
|
43 |
|
44 |
+
= 6.2.2 =
|
45 |
+
* Fix redirect loop bug
|
46 |
+
* Add visual cues for permalinks
|
47 |
+
* Fix iframe bug
|
48 |
+
|
49 |
= 6.2.1 =
|
50 |
* Add post password handling
|
51 |
* Don't block admin when DOING_AJAX
|
theme-my-login.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Theme My Login
|
4 |
Plugin URI: http://www.jfarthing.com/development/theme-my-login/
|
5 |
Description: Themes the WordPress login, registration and forgot password pages according to your theme.
|
6 |
-
Version: 6.2.
|
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/development/theme-my-login/
|
5 |
Description: Themes the WordPress login, registration and forgot password pages according to your theme.
|
6 |
+
Version: 6.2.2
|
7 |
Author: Jeff Farthing
|
8 |
Author URI: http://www.jfarthing.com
|
9 |
Text Domain: theme-my-login
|