Skip to content

Commit 4b6c1b3

Browse files
committed
use yoda.
1 parent 033f195 commit 4b6c1b3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CPTP/Module/Permalink.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ public function term_link( $termlink, $term, $taxonomy ) {
418418
$termlink = str_replace( $wp_home, $wp_home . '/' . $slug, $termlink );
419419
}
420420

421-
if ( $taxonomy->rewrite !== false && ! $taxonomy->rewrite['hierarchical'] ) {
421+
if ( false !== $taxonomy->rewrite && ! $taxonomy->rewrite['hierarchical'] ) {
422422
$termlink = str_replace( $term->slug . '/', CPTP_Util::get_taxonomy_parents_slug( $term->term_id, $taxonomy->name, '/', true ), $termlink );
423423
}
424424

CPTP/Module/Rewrite.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function register_post_type_rules( $post_type, $args ) {
8181
if ( $args->has_archive ) {
8282
if ( is_string( $args->has_archive ) ) {
8383
$slug = $args->has_archive;
84-
};
84+
}
8585

8686
if ( $args->rewrite['with_front'] ) {
8787
$slug = substr( $wp_rewrite->front, 1 ) . $slug;
@@ -161,7 +161,7 @@ public function register_taxonomy_rules( $taxonomy, $object_type, $args ) {
161161

162162
if ( ! empty( $post_type_obj->has_archive ) && is_string( $post_type_obj->has_archive ) ) {
163163
$slug = $post_type_obj->has_archive;
164-
};
164+
}
165165

166166
if ( ! empty( $post_type_obj->rewrite['with_front'] ) ) {
167167
$slug = substr( $wp_rewrite->front, 1 ) . $slug;

0 commit comments

Comments
 (0)