Version Description
- Fix for 404 error on static front page with custom permalink set, by Eric TF Bat
Download this release
Release Info
Developer | michaeltyson |
Plugin | Custom Permalinks |
Version | 0.7.10 |
Comparing to | |
See all releases |
Code changes from version 0.7.9 to 0.7.10
- custom-permalinks.php +5 -5
- 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 |
*/
|
@@ -148,7 +148,7 @@ function custom_permalinks_request($query) {
|
|
148 |
// First, search for a matching custom permalink, and if found, generate the corresponding
|
149 |
// original URL
|
150 |
|
151 |
-
$originalUrl =
|
152 |
|
153 |
// Get request URI, strip parameters and /'s
|
154 |
$url = parse_url(get_bloginfo('url')); $url = $url['path'];
|
@@ -165,7 +165,7 @@ function custom_permalinks_request($query) {
|
|
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";
|
169 |
|
170 |
$posts = $wpdb->get_results($sql);
|
171 |
|
@@ -183,7 +183,7 @@ function custom_permalinks_request($query) {
|
|
183 |
$request_noslash ) );
|
184 |
}
|
185 |
|
186 |
-
if (
|
187 |
// See if any terms have a matching permalink
|
188 |
$table = get_option('custom_permalink_table');
|
189 |
if ( !$table ) return $query;
|
@@ -211,7 +211,7 @@ function custom_permalinks_request($query) {
|
|
211 |
}
|
212 |
}
|
213 |
|
214 |
-
if ( $originalUrl ) {
|
215 |
$originalUrl = str_replace('//', '/', $originalUrl);
|
216 |
|
217 |
if ( ($pos=strpos($_SERVER['REQUEST_URI'], '?')) !== false ) {
|
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.10
|
8 |
Author: Michael Tyson
|
9 |
Author URI: http://atastypixel.com/blog
|
10 |
*/
|
148 |
// First, search for a matching custom permalink, and if found, generate the corresponding
|
149 |
// original URL
|
150 |
|
151 |
+
$originalUrl = NULL;
|
152 |
|
153 |
// Get request URI, strip parameters and /'s
|
154 |
$url = parse_url(get_bloginfo('url')); $url = $url['path'];
|
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";
|
169 |
|
170 |
$posts = $wpdb->get_results($sql);
|
171 |
|
183 |
$request_noslash ) );
|
184 |
}
|
185 |
|
186 |
+
if ( $originalUrl === NULL ) {
|
187 |
// See if any terms have a matching permalink
|
188 |
$table = get_option('custom_permalink_table');
|
189 |
if ( !$table ) return $query;
|
211 |
}
|
212 |
}
|
213 |
|
214 |
+
if ( $originalUrl !== NULL ) {
|
215 |
$originalUrl = str_replace('//', '/', $originalUrl);
|
216 |
|
217 |
if ( ($pos=strpos($_SERVER['REQUEST_URI'], '?')) !== false ) {
|
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.2.1
|
7 |
-
Stable tag: 0.7.
|
8 |
|
9 |
Set custom permalinks on a per-post, per-tag or per-category basis.
|
10 |
|
@@ -29,6 +29,10 @@ within that category.
|
|
29 |
|
30 |
== Changelog ==
|
31 |
|
|
|
|
|
|
|
|
|
32 |
= 0.7.9 =
|
33 |
|
34 |
* Support for custom post types, by Balázs Németh
|
4 |
Tags: permalink, url, link, address, custom, redirect
|
5 |
Requires at least: 2.6
|
6 |
Tested up to: 3.2.1
|
7 |
+
Stable tag: 0.7.9
|
8 |
|
9 |
Set custom permalinks on a per-post, per-tag or per-category basis.
|
10 |
|
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
|
35 |
+
|
36 |
= 0.7.9 =
|
37 |
|
38 |
* Support for custom post types, by Balázs Németh
|