Version Description
- Don't clobber query parameters when redirecting to the custom permalink from the original URL
Download this release
Release Info
Developer | michaeltyson |
Plugin | Custom Permalinks |
Version | 0.7.2 |
Comparing to | |
See all releases |
Code changes from version 0.7.1 to 0.7.2
- custom-permalinks.php +5 -1
- readme.txt +5 -1
custom-permalinks.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Custom Permalinks
|
|
4 |
Plugin URI: http://atastypixel.com/blog/wordpress/plugins/custom-permalinks/
|
5 |
Donate link: http://atastypixel.com/blog/wordpress/plugins/custom-permalinks/
|
6 |
Description: Set custom permalinks on a per-post basis
|
7 |
-
Version: 0.7.
|
8 |
Author: Michael Tyson
|
9 |
Author URI: http://atastypixel.com/blog
|
10 |
*/
|
@@ -126,6 +126,10 @@ function custom_permalinks_redirect() {
|
|
126 |
$url = preg_replace('@//*@', '/', str_replace(trim($original_permalink,'/'), trim($custom_permalink,'/'), $request));
|
127 |
$url = preg_replace('@([^?]*)&@', '\1?', $url);
|
128 |
}
|
|
|
|
|
|
|
|
|
129 |
wp_redirect( get_home_url()."/".$url, 301 );
|
130 |
exit();
|
131 |
}
|
4 |
Plugin URI: http://atastypixel.com/blog/wordpress/plugins/custom-permalinks/
|
5 |
Donate link: http://atastypixel.com/blog/wordpress/plugins/custom-permalinks/
|
6 |
Description: Set custom permalinks on a per-post basis
|
7 |
+
Version: 0.7.2
|
8 |
Author: Michael Tyson
|
9 |
Author URI: http://atastypixel.com/blog
|
10 |
*/
|
126 |
$url = preg_replace('@//*@', '/', str_replace(trim($original_permalink,'/'), trim($custom_permalink,'/'), $request));
|
127 |
$url = preg_replace('@([^?]*)&@', '\1?', $url);
|
128 |
}
|
129 |
+
|
130 |
+
// Append any query compenent
|
131 |
+
$url .= strstr($_SERVER['REQUEST_URI'], "?");
|
132 |
+
|
133 |
wp_redirect( get_home_url()."/".$url, 301 );
|
134 |
exit();
|
135 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://atastypixel.com/blog/wordpress/plugins/custom-permalinks/
|
|
4 |
Tags: permalink, url, link, address, custom, redirect
|
5 |
Requires at least: 2.6
|
6 |
Tested up to: 3.1.2
|
7 |
-
Stable tag: 0.7.
|
8 |
|
9 |
Set custom permalinks on a per-post, per-tag or per-category basis.
|
10 |
|
@@ -23,6 +23,10 @@ over your site structure.
|
|
23 |
|
24 |
== Changelog ==
|
25 |
|
|
|
|
|
|
|
|
|
26 |
= 0.7.1 =
|
27 |
|
28 |
* Compatiblity fix for last update
|
4 |
Tags: permalink, url, link, address, custom, redirect
|
5 |
Requires at least: 2.6
|
6 |
Tested up to: 3.1.2
|
7 |
+
Stable tag: 0.7.2
|
8 |
|
9 |
Set custom permalinks on a per-post, per-tag or per-category basis.
|
10 |
|
23 |
|
24 |
== Changelog ==
|
25 |
|
26 |
+
= 0.7.2 =
|
27 |
+
|
28 |
+
* Don't clobber query parameters when redirecting to the custom permalink from the original URL
|
29 |
+
|
30 |
= 0.7.1 =
|
31 |
|
32 |
* Compatiblity fix for last update
|