Version Description
- Fixed a problem with permalinks with "/" components
Download this release
Release Info
Developer | michaeltyson |
Plugin | Custom Permalinks |
Version | 0.7.23 |
Comparing to | |
See all releases |
Code changes from version 0.7.22 to 0.7.23
- custom-permalinks.php +9 -2
- 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 |
Text Domain: custom-permalinks
|
@@ -92,7 +92,6 @@ function custom_permalinks_term_link($permalink, $term) {
|
|
92 |
* @since 0.1
|
93 |
*/
|
94 |
function custom_permalinks_redirect() {
|
95 |
-
|
96 |
// Get request URI, strip parameters
|
97 |
$url = parse_url(get_bloginfo('url'));
|
98 |
$url = isset($url['path']) ? $url['path'] : '';
|
@@ -673,9 +672,17 @@ function custom_permalinks_admin_rows() {
|
|
673 |
* @since 0.1
|
674 |
*/
|
675 |
function custom_permalinks_original_post_link($post_id) {
|
|
|
|
|
|
|
|
|
676 |
list( $permalink, $post_name ) = get_sample_permalink( $post_id );
|
677 |
$permalink = str_replace(array('%pagename%','%postname%'), $post_name, $permalink);
|
678 |
$permalink = ltrim(str_replace(home_url(), '', $permalink), '/');
|
|
|
|
|
|
|
|
|
679 |
return $permalink;
|
680 |
}
|
681 |
|
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.23
|
8 |
Author: Michael Tyson
|
9 |
Author URI: http://atastypixel.com/blog
|
10 |
Text Domain: custom-permalinks
|
92 |
* @since 0.1
|
93 |
*/
|
94 |
function custom_permalinks_redirect() {
|
|
|
95 |
// Get request URI, strip parameters
|
96 |
$url = parse_url(get_bloginfo('url'));
|
97 |
$url = isset($url['path']) ? $url['path'] : '';
|
672 |
* @since 0.1
|
673 |
*/
|
674 |
function custom_permalinks_original_post_link($post_id) {
|
675 |
+
remove_filter( 'post_link', 'custom_permalinks_post_link', 'edit_files', 2 ); // original hook
|
676 |
+
remove_filter( 'post_type_link', 'custom_permalinks_post_link', 'edit_files', 2 );
|
677 |
+
|
678 |
+
require_once ABSPATH . '/wp-admin/includes/post.php';
|
679 |
list( $permalink, $post_name ) = get_sample_permalink( $post_id );
|
680 |
$permalink = str_replace(array('%pagename%','%postname%'), $post_name, $permalink);
|
681 |
$permalink = ltrim(str_replace(home_url(), '', $permalink), '/');
|
682 |
+
|
683 |
+
add_filter( 'post_link', 'custom_permalinks_post_link', 'edit_files', 2 ); // original hook
|
684 |
+
add_filter( 'post_type_link', 'custom_permalinks_post_link', 'edit_files', 2 );
|
685 |
+
|
686 |
return $permalink;
|
687 |
}
|
688 |
|
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: 4.5
|
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.22 =
|
33 |
|
34 |
* Fixed PHP warning
|
4 |
Tags: permalink, url, link, address, custom, redirect
|
5 |
Requires at least: 2.6
|
6 |
Tested up to: 4.5
|
7 |
+
Stable tag: 0.7.23
|
8 |
|
9 |
Set custom permalinks on a per-post, per-tag or per-category basis.
|
10 |
|
29 |
|
30 |
== Changelog ==
|
31 |
|
32 |
+
= 0.7.23 =
|
33 |
+
|
34 |
+
* Fixed a problem with permalinks with "/" components
|
35 |
+
|
36 |
= 0.7.22 =
|
37 |
|
38 |
* Fixed PHP warning
|