Skip to content

Commit

Permalink
Merge pull request #116 from sectsect/master
Browse files Browse the repository at this point in the history
fix: fix PHP notices
  • Loading branch information
torounit authored Apr 12, 2024
2 parents 73fd75a + 62e315d commit f11d8a5
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 @@ -403,6 +403,10 @@ public function term_link( $termlink, $term, $taxonomy ) {
return $termlink;
}

if ( ! isset( $post_type_obj->rewrite['slug'] ) || ! isset( $post_type_obj->rewrite['with_front'] ) ) {
return $termlink;
}

$slug = $post_type_obj->rewrite['slug'];
$with_front = $post_type_obj->rewrite['with_front'];

Expand Down

0 comments on commit f11d8a5

Please sign in to comment.