Version Description
- Fixed issue with pending/draft posts with permalinks
- Fixed infinite redirect issue with permalinks without trailing slash, on blogs not hosted in the webroot
Download this release
Release Info
Developer | michaeltyson |
Plugin | Custom Permalinks |
Version | 0.7.11 |
Comparing to | |
See all releases |
Code changes from version 0.7.10 to 0.7.11
- custom-permalinks.php +7 -4
- readme.txt +7 -2
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 |
*/
|
@@ -162,7 +162,6 @@ function custom_permalinks_request($query) {
|
|
162 |
"LEFT JOIN $wpdb->postmeta ON ($wpdb->posts.ID = $wpdb->postmeta.post_id) WHERE ".
|
163 |
" meta_key = 'custom_permalink' AND ".
|
164 |
" meta_value != '' AND ".
|
165 |
-
" wp_posts.post_status = 'publish' AND ".
|
166 |
" ( meta_value = LEFT('".mysql_escape_string($request_noslash)."', LENGTH(meta_value)) OR ".
|
167 |
" meta_value = LEFT('".mysql_escape_string($request_noslash."/")."', LENGTH(meta_value)) ) ".
|
168 |
"ORDER BY LENGTH(meta_value) DESC LIMIT 1";
|
@@ -257,8 +256,12 @@ function custom_permalinks_request($query) {
|
|
257 |
*/
|
258 |
function custom_permalinks_trailingslash($string, $type) {
|
259 |
global $_CPRegisteredURL;
|
260 |
-
|
261 |
-
|
|
|
|
|
|
|
|
|
262 |
}
|
263 |
return $string;
|
264 |
}
|
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.11
|
8 |
Author: Michael Tyson
|
9 |
Author URI: http://atastypixel.com/blog
|
10 |
*/
|
162 |
"LEFT JOIN $wpdb->postmeta ON ($wpdb->posts.ID = $wpdb->postmeta.post_id) WHERE ".
|
163 |
" meta_key = 'custom_permalink' AND ".
|
164 |
" meta_value != '' AND ".
|
|
|
165 |
" ( meta_value = LEFT('".mysql_escape_string($request_noslash)."', LENGTH(meta_value)) OR ".
|
166 |
" meta_value = LEFT('".mysql_escape_string($request_noslash."/")."', LENGTH(meta_value)) ) ".
|
167 |
"ORDER BY LENGTH(meta_value) DESC LIMIT 1";
|
256 |
*/
|
257 |
function custom_permalinks_trailingslash($string, $type) {
|
258 |
global $_CPRegisteredURL;
|
259 |
+
|
260 |
+
$url = parse_url(get_bloginfo('url'));
|
261 |
+
$request = ltrim(substr($string, strlen($url['path'])),'/');
|
262 |
+
|
263 |
+
if ( trim($_CPRegisteredURL,'/') == trim($request,'/') ) {
|
264 |
+
return ($string{0} == '/' ? '/' : '') . trailingslashit($url['path']) . $_CPRegisteredURL;
|
265 |
}
|
266 |
return $string;
|
267 |
}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
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.
|
7 |
-
Stable tag: 0.7.
|
8 |
|
9 |
Set custom permalinks on a per-post, per-tag or per-category basis.
|
10 |
|
@@ -29,6 +29,11 @@ within that category.
|
|
29 |
|
30 |
== Changelog ==
|
31 |
|
|
|
|
|
|
|
|
|
|
|
32 |
= 0.7.10 =
|
33 |
|
34 |
* Fix for 404 error on static front page with custom permalink set, by Eric TF Bat
|
3 |
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.3.1
|
7 |
+
Stable tag: 0.7.11
|
8 |
|
9 |
Set custom permalinks on a per-post, per-tag or per-category basis.
|
10 |
|
29 |
|
30 |
== Changelog ==
|
31 |
|
32 |
+
= 0.7.11 =
|
33 |
+
|
34 |
+
* Fixed issue with pending/draft posts with permalinks
|
35 |
+
* Fixed infinite redirect issue with permalinks without trailing slash, on blogs not hosted in the webroot
|
36 |
+
|
37 |
= 0.7.10 =
|
38 |
|
39 |
* Fix for 404 error on static front page with custom permalink set, by Eric TF Bat
|