diff --git a/inc/hacks.php b/inc/hacks.php index 631c51c..bbaac14 100644 --- a/inc/hacks.php +++ b/inc/hacks.php @@ -255,9 +255,8 @@ public function comment_redirect( string $url, WP_Comment $comment ): string { $url = \apply_filters( 'comment_experience\redirect', $url, $comment, 'first' ); } } - // Only change $url when the page option is actually set and not zero. - if ( isset( $this->options['redirect_repeat_page'] ) && (int) $this->options['redirect_repeat_page'] !== 0 ) { + elseif ( isset( $this->options['redirect_repeat_page'] ) && (int) $this->options['redirect_repeat_page'] !== 0 ) { $url = \get_permalink( (int) $this->options['redirect_repeat_page'] ); /**