Custom Post Type Permalinks - Version 3.4.4

Version Description

  • WPML support: Only apply slug translation if post type is supported. (Props @ffauvel)
Download this release

Release Info

Developer Toro_Unit
Plugin Icon 128x128 Custom Post Type Permalinks
Version 3.4.4
Comparing to
See all releases

Code changes from version 3.4.3 to 3.4.4

CPTP/Module/Permalink.php CHANGED
@@ -432,6 +432,10 @@ class CPTP_Module_Permalink extends CPTP_Module {
432
  * @return string
433
  */
434
  public function replace_post_slug_with_placeholder( $original_slug, $post_link, $post ) {
 
 
 
 
435
  return CPTP_Module_Rewrite::get_slug_placeholder( $post->post_type );
436
  }
437
  }
432
  * @return string
433
  */
434
  public function replace_post_slug_with_placeholder( $original_slug, $post_link, $post ) {
435
+ if ( ! in_array( $post->post_type, CPTP_Util::get_post_types(), true ) ) {
436
+ return $original_slug;
437
+ }
438
+
439
  return CPTP_Module_Rewrite::get_slug_placeholder( $post->post_type );
440
  }
441
  }
custom-post-type-permalinks.php CHANGED
@@ -5,13 +5,13 @@
5
  * Description: Add post archives of custom post type and customizable permalinks.
6
  * Author: Toro_Unit
7
  * Author URI: https://torounit.com/
8
- * Version: 3.4.3
9
  * Text Domain: custom-post-type-permalinks
10
  * License: GPL2 or later
11
  * Domain Path: /language/
12
  *
13
  * @package Custom_Post_Type_Permalinks
14
- * @version 3.4.3
15
  */
16
 
17
  define( 'CPTP_PLUGIN_FILE', __FILE__ );
5
  * Description: Add post archives of custom post type and customizable permalinks.
6
  * Author: Toro_Unit
7
  * Author URI: https://torounit.com/
8
+ * Version: 3.4.4
9
  * Text Domain: custom-post-type-permalinks
10
  * License: GPL2 or later
11
  * Domain Path: /language/
12
  *
13
  * @package Custom_Post_Type_Permalinks
14
+ * @version 3.4.4
15
  */
16
 
17
  define( 'CPTP_PLUGIN_FILE', __FILE__ );
readme.txt CHANGED
@@ -8,7 +8,7 @@ Tested up to: 5.6
8
  Requires PHP: 5.6
9
  License: GPLv2 or Later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.txt
11
- Stable tag: 3.4.3
12
 
13
 
14
  Edit the permalink of custom post type.
@@ -83,6 +83,9 @@ That's it. You can access the permalinks setting by going to *Settings -> Permal
83
 
84
  == Changelog ==
85
 
 
 
 
86
  = 3.4.3 =
87
  * Fix archive link bug fix.
88
 
8
  Requires PHP: 5.6
9
  License: GPLv2 or Later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.txt
11
+ Stable tag: 3.4.4
12
 
13
 
14
  Edit the permalink of custom post type.
83
 
84
  == Changelog ==
85
 
86
+ = 3.4.4 =
87
+ * WPML support: Only apply slug translation if post type is supported. (Props @ffauvel)
88
+
89
  = 3.4.3 =
90
  * Fix archive link bug fix.
91