Version Description
Download this release
Release Info
Developer | Toro_Unit |
Plugin | Custom Post Type Permalinks |
Version | 0.7.2.1 |
Comparing to | |
See all releases |
Code changes from version 0.7.2 to 0.7.2.1
- custom-post-type-permalinks.php +4 -2
- readme.txt +1 -1
custom-post-type-permalinks.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.torounit.com
|
|
5 |
Description: Add post archives of custom post type and customizable permalinks.
|
6 |
Author: Toro-Unit
|
7 |
Author URI: http://www.torounit.com/plugins/custom-post-type-permalinks/
|
8 |
-
Version: 0.7.2
|
9 |
*/
|
10 |
|
11 |
|
@@ -145,7 +145,8 @@ class Custom_Post_Type_Permalinks {
|
|
145 |
$permalink = '/%year%/%monthnum%/%day%/%post_id%/';
|
146 |
}
|
147 |
|
148 |
-
|
|
|
149 |
$permalink = str_replace('%post_id%','%'.$post_type.'_id%',$permalink);
|
150 |
|
151 |
$slug = get_post_type_object($post_type)->rewrite['slug'];
|
@@ -190,6 +191,7 @@ class Custom_Post_Type_Permalinks {
|
|
190 |
$permalink = str_replace('%'.$post_type.'_page%', "", $permalink);
|
191 |
|
192 |
if( !$leavename ){
|
|
|
193 |
$permalink = str_replace('%'.$post_type.'_name%', $post->post_name, $permalink);
|
194 |
}
|
195 |
|
5 |
Description: Add post archives of custom post type and customizable permalinks.
|
6 |
Author: Toro-Unit
|
7 |
Author URI: http://www.torounit.com/plugins/custom-post-type-permalinks/
|
8 |
+
Version: 0.7.2.1
|
9 |
*/
|
10 |
|
11 |
|
145 |
$permalink = '/%year%/%monthnum%/%day%/%post_id%/';
|
146 |
}
|
147 |
|
148 |
+
//$permalink = str_replace('%postname%','%'.$post_type.'_name%',$permalink);
|
149 |
+
$permalink = str_replace('%postname%','%'.$post_type.'%',$permalink);
|
150 |
$permalink = str_replace('%post_id%','%'.$post_type.'_id%',$permalink);
|
151 |
|
152 |
$slug = get_post_type_object($post_type)->rewrite['slug'];
|
191 |
$permalink = str_replace('%'.$post_type.'_page%', "", $permalink);
|
192 |
|
193 |
if( !$leavename ){
|
194 |
+
$permalink = str_replace('%'.$post_type.'%', $post->post_name, $permalink);
|
195 |
$permalink = str_replace('%'.$post_type.'_name%', $post->post_name, $permalink);
|
196 |
}
|
197 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Toro_Unit
|
|
3 |
Tags: custom post type,permalink
|
4 |
Requires at least: 3.2
|
5 |
Tested up to: 3.3
|
6 |
-
Stable tag: 0.7.2
|
7 |
|
8 |
Lets you edit the permalink of custom post type.
|
9 |
|
3 |
Tags: custom post type,permalink
|
4 |
Requires at least: 3.2
|
5 |
Tested up to: 3.3
|
6 |
+
Stable tag: 0.7.2.1
|
7 |
|
8 |
Lets you edit the permalink of custom post type.
|
9 |
|