Version Description
- Fixed removed parent post problem.
Download this release
Release Info
Developer | Toro_Unit |
Plugin | Custom Post Type Permalinks |
Version | 1.5.4 |
Comparing to | |
See all releases |
Code changes from version 1.5.2 to 1.5.4
- CPTP/Module/Permalink.php +4 -0
- custom-post-type-permalinks.php +4 -4
- readme.md +21 -1
- readme.txt +16 -1
CPTP/Module/Permalink.php
CHANGED
@@ -266,7 +266,11 @@ class CPTP_Module_Permalink extends CPTP_Module {
|
|
266 |
if ( ! $post->post_parent ) {
|
267 |
return $link;
|
268 |
}
|
|
|
269 |
$post_parent = get_post( $post->post_parent );
|
|
|
|
|
|
|
270 |
$permalink = CPTP_Util::get_permalink_structure( $post_parent->post_type );
|
271 |
$post_type = get_post_type_object( $post_parent->post_type );
|
272 |
|
266 |
if ( ! $post->post_parent ) {
|
267 |
return $link;
|
268 |
}
|
269 |
+
|
270 |
$post_parent = get_post( $post->post_parent );
|
271 |
+
if ( ! $post_parent) {
|
272 |
+
return $link;
|
273 |
+
}
|
274 |
$permalink = CPTP_Util::get_permalink_structure( $post_parent->post_type );
|
275 |
$post_type = get_post_type_object( $post_parent->post_type );
|
276 |
|
custom-post-type-permalinks.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Custom Post Type Permalinks
|
4 |
-
Plugin URI:
|
5 |
Description: Add post archives of custom post type and customizable permalinks.
|
6 |
Author: Toro_Unit
|
7 |
-
Author URI:
|
8 |
-
Version: 1.5.
|
9 |
Text Domain: custom-post-type-permalinks
|
10 |
License: GPL2 or later
|
11 |
Domain Path: /language/
|
@@ -17,7 +17,7 @@ Domain Path: /language/
|
|
17 |
* Custom Post Type Permalinks
|
18 |
*
|
19 |
* @package Custom_Post_Type_Permalinks
|
20 |
-
* @version 1.5.
|
21 |
*
|
22 |
*/
|
23 |
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Custom Post Type Permalinks
|
4 |
+
Plugin URI: https://github.com/torounit/custom-post-type-permalinks
|
5 |
Description: Add post archives of custom post type and customizable permalinks.
|
6 |
Author: Toro_Unit
|
7 |
+
Author URI: https://torounit.com/
|
8 |
+
Version: 1.5.4
|
9 |
Text Domain: custom-post-type-permalinks
|
10 |
License: GPL2 or later
|
11 |
Domain Path: /language/
|
17 |
* Custom Post Type Permalinks
|
18 |
*
|
19 |
* @package Custom_Post_Type_Permalinks
|
20 |
+
* @version 1.5.4
|
21 |
*
|
22 |
*/
|
23 |
|
readme.md
CHANGED
@@ -26,8 +26,8 @@ Donation: Please send amazon.co.jp Gift to donate[at]torounit.com.
|
|
26 |
|
27 |
### Translators
|
28 |
|
29 |
-
* French(fr_FR) - [Geoffrey Crofte](http://geoffrey.crofte.fr/)
|
30 |
* Japanese(ja) - [Toro_Unit](http://www.torounit.com/)
|
|
|
31 |
* Russian(ru_RU) - [Olart](http://olart.ru), [Natali_Z](https://profiles.wordpress.org/natali_z)
|
32 |
|
33 |
## Setting on Code
|
@@ -65,6 +65,26 @@ That's it. You can access the permalinks setting by going to *Settings -> Permal
|
|
65 |
|
66 |
## Changelog
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
### 1.3.1
|
69 |
|
70 |
* bugfix `wp_get_archives`.
|
26 |
|
27 |
### Translators
|
28 |
|
|
|
29 |
* Japanese(ja) - [Toro_Unit](http://www.torounit.com/)
|
30 |
+
* French(fr_FR) - [Geoffrey Crofte](http://geoffrey.crofte.fr/)
|
31 |
* Russian(ru_RU) - [Olart](http://olart.ru), [Natali_Z](https://profiles.wordpress.org/natali_z)
|
32 |
|
33 |
## Setting on Code
|
65 |
|
66 |
## Changelog
|
67 |
|
68 |
+
### 1.5.4
|
69 |
+
|
70 |
+
* Fixed removed parent post problem.
|
71 |
+
|
72 |
+
|
73 |
+
### 1.5.3
|
74 |
+
|
75 |
+
* readme fix.
|
76 |
+
|
77 |
+
### 1.5.0
|
78 |
+
|
79 |
+
* Tested for 4.5.
|
80 |
+
* Add filter CPTP_set_{$module_name}_module.
|
81 |
+
|
82 |
+
|
83 |
+
### 1.4.0
|
84 |
+
|
85 |
+
* Fix Translation Problem.
|
86 |
+
|
87 |
+
|
88 |
### 1.3.1
|
89 |
|
90 |
* bugfix `wp_get_archives`.
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.amazon.co.jp/registry/wishlist/COKSXS25MVQV
|
|
4 |
Tags: permalink,permalinks,custom post type,custom taxonomy,cms
|
5 |
Requires at least: 4.3
|
6 |
Tested up to: 4.5
|
7 |
-
Stable tag: 1.5.
|
8 |
License: GPLv2 or Later
|
9 |
|
10 |
Edit the permalink of custom post type.
|
@@ -61,6 +61,21 @@ That's it. You can access the permalinks setting by going to *Settings -> Permal
|
|
61 |
|
62 |
== Changelog ==
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
= 1.4.0 =
|
65 |
* Fix Translation Problem.
|
66 |
|
4 |
Tags: permalink,permalinks,custom post type,custom taxonomy,cms
|
5 |
Requires at least: 4.3
|
6 |
Tested up to: 4.5
|
7 |
+
Stable tag: 1.5.4
|
8 |
License: GPLv2 or Later
|
9 |
|
10 |
Edit the permalink of custom post type.
|
61 |
|
62 |
== Changelog ==
|
63 |
|
64 |
+
= 1.5.4 =
|
65 |
+
|
66 |
+
* Fixed removed parent post problem.
|
67 |
+
|
68 |
+
|
69 |
+
= 1.5.3 =
|
70 |
+
|
71 |
+
* readme fix.
|
72 |
+
|
73 |
+
= 1.5.0 =
|
74 |
+
|
75 |
+
* Tested for 4.5.
|
76 |
+
* Add filter CPTP_set_{$module_name}_module.
|
77 |
+
|
78 |
+
|
79 |
= 1.4.0 =
|
80 |
* Fix Translation Problem.
|
81 |
|