Version Description
- Use verbose rewrite rules for TML pages
Download this release
Release Info
Developer | jfarthing84 |
Plugin | Theme My Login |
Version | 6.3.4 |
Comparing to | |
See all releases |
Code changes from version 6.3.3 to 6.3.4
- includes/class-theme-my-login.php +24 -26
- readme.txt +4 -1
- theme-my-login.php +1 -1
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
|
@@ -137,7 +137,6 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
137 |
add_action( 'plugins_loaded', array( &$this, 'plugins_loaded' ) );
|
138 |
add_action( 'init', array( &$this, 'init' ) );
|
139 |
add_action( 'widgets_init', array( &$this, 'widgets_init' ) );
|
140 |
-
add_action( 'pre_get_posts', array( &$this, 'pre_get_posts' ) );
|
141 |
add_action( 'wp', array( &$this, 'wp' ) );
|
142 |
add_action( 'template_redirect', array( &$this, 'template_redirect' ) );
|
143 |
add_action( 'wp_enqueue_scripts', array( &$this, 'wp_enqueue_scripts' ) );
|
@@ -146,6 +145,7 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
146 |
add_action( 'wp_print_footer_scripts', array( &$this, 'wp_print_footer_scripts' ) );
|
147 |
add_action( 'wp_authenticate', array( &$this, 'wp_authenticate' ) );
|
148 |
|
|
|
149 |
add_filter( 'template_include', array( &$this, 'template_include' ) );
|
150 |
add_filter( 'site_url', array( &$this, 'site_url' ), 10, 3 );
|
151 |
add_filter( 'logout_url', array( &$this, 'logout_url' ), 10, 2 );
|
@@ -218,30 +218,6 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
218 |
register_widget( 'Theme_My_Login_Widget' );
|
219 |
}
|
220 |
|
221 |
-
/**
|
222 |
-
* Changes post type to tml_page for TML permalinks
|
223 |
-
*
|
224 |
-
* @since 6.3
|
225 |
-
*
|
226 |
-
* @param object $wp_query WP_Query object
|
227 |
-
*/
|
228 |
-
public function pre_get_posts( &$wp_query ) {
|
229 |
-
global $wpdb;
|
230 |
-
|
231 |
-
if ( ! $wp_query->is_main_query() )
|
232 |
-
return;
|
233 |
-
|
234 |
-
if ( ( $pagename = $wp_query->get( 'pagename' ) ) || ( $pagename = $wp_query->get( 'name' ) ) ) {
|
235 |
-
if ( $page = get_page_by_path( $pagename, OBJECT, 'tml_page' ) ) {
|
236 |
-
$wp_query->set( 'post_type', 'tml_page' );
|
237 |
-
$wp_query->is_single = true;
|
238 |
-
$wp_query->is_page = false;
|
239 |
-
$wp_query->queried_object = $page;
|
240 |
-
$wp_query->queried_object_id = $page->ID;
|
241 |
-
}
|
242 |
-
}
|
243 |
-
}
|
244 |
-
|
245 |
/**
|
246 |
* Used to add/remove filters from login page
|
247 |
*
|
@@ -598,6 +574,28 @@ if(typeof wpOnload=='function')wpOnload()
|
|
598 |
* Filters
|
599 |
************************************************************************************************************************/
|
600 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
601 |
/**
|
602 |
* Uses Page template hierarchy for TML pages
|
603 |
*
|
21 |
* @since 6.3.2
|
22 |
* @const string
|
23 |
*/
|
24 |
+
const version = '6.3.4';
|
25 |
|
26 |
/**
|
27 |
* Holds options key
|
137 |
add_action( 'plugins_loaded', array( &$this, 'plugins_loaded' ) );
|
138 |
add_action( 'init', array( &$this, 'init' ) );
|
139 |
add_action( 'widgets_init', array( &$this, 'widgets_init' ) );
|
|
|
140 |
add_action( 'wp', array( &$this, 'wp' ) );
|
141 |
add_action( 'template_redirect', array( &$this, 'template_redirect' ) );
|
142 |
add_action( 'wp_enqueue_scripts', array( &$this, 'wp_enqueue_scripts' ) );
|
145 |
add_action( 'wp_print_footer_scripts', array( &$this, 'wp_print_footer_scripts' ) );
|
146 |
add_action( 'wp_authenticate', array( &$this, 'wp_authenticate' ) );
|
147 |
|
148 |
+
add_filter( 'rewrite_rules_array', array( &$this, 'rewrite_rules_array' ) );
|
149 |
add_filter( 'template_include', array( &$this, 'template_include' ) );
|
150 |
add_filter( 'site_url', array( &$this, 'site_url' ), 10, 3 );
|
151 |
add_filter( 'logout_url', array( &$this, 'logout_url' ), 10, 2 );
|
218 |
register_widget( 'Theme_My_Login_Widget' );
|
219 |
}
|
220 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
/**
|
222 |
* Used to add/remove filters from login page
|
223 |
*
|
574 |
* Filters
|
575 |
************************************************************************************************************************/
|
576 |
|
577 |
+
/**
|
578 |
+
* Generates verbose rewrite rules for plugin pages
|
579 |
+
*
|
580 |
+
* @since 6.3.4
|
581 |
+
*
|
582 |
+
* @param array $rules Rewrite rules
|
583 |
+
* @return array Rewrite rules
|
584 |
+
*/
|
585 |
+
public function rewrite_rules_array( $rules ) {
|
586 |
+
$pages = get_posts( array(
|
587 |
+
'post_type' => 'tml_page',
|
588 |
+
'posts_per_page' => -1
|
589 |
+
) );
|
590 |
+
|
591 |
+
$tml_rules = array();
|
592 |
+
foreach ( $pages as $page ) {
|
593 |
+
$tml_rules["{$page->post_name}/?$"] = "index.php?tml_page={$page->post_name}";
|
594 |
+
}
|
595 |
+
|
596 |
+
return array_merge( $tml_rules, $rules );
|
597 |
+
}
|
598 |
+
|
599 |
/**
|
600 |
* Uses Page template hierarchy for TML pages
|
601 |
*
|
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,9 @@ Please visit http://www.jfarthing.com/development/theme-my-login first and then
|
|
56 |
|
57 |
== Changelog ==
|
58 |
|
|
|
|
|
|
|
59 |
= 6.3.3 =
|
60 |
* Fix issue where actions weren't being appended to page links
|
61 |
* Fix issue where modules weren't being installed on upgrade
|
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.4
|
7 |
|
8 |
Themes the WordPress login pages according to your theme.
|
9 |
|
56 |
|
57 |
== Changelog ==
|
58 |
|
59 |
+
= 6.3.4 =
|
60 |
+
* Use verbose rewrite rules for TML pages
|
61 |
+
|
62 |
= 6.3.3 =
|
63 |
* Fix issue where actions weren't being appended to page links
|
64 |
* Fix issue where modules weren't being installed on upgrade
|
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.4
|
7 |
Author: Jeff Farthing
|
8 |
Author URI: http://www.jfarthing.com
|
9 |
Text Domain: theme-my-login
|