Skip to content

Commit

Permalink
Merge pull request #102 from ffauvel/wpml-slug-translation-fix
Browse files Browse the repository at this point in the history
Only apply slug translation if post type is supported
  • Loading branch information
torounit committed Jan 4, 2021
2 parents 864b6e9 + d1d1788 commit c434df0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CPTP/Module/Permalink.php
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,10 @@ public function term_link( $termlink, $term, $taxonomy ) {
* @return string
*/
public function replace_post_slug_with_placeholder( $original_slug, $post_link, $post ) {
if ( ! in_array( $post->post_type, CPTP_Util::get_post_types(), true ) ) {
return $original_slug;
}

return CPTP_Module_Rewrite::get_slug_placeholder( $post->post_type );
}
}

0 comments on commit c434df0

Please sign in to comment.