From 19745fd6bac05d4418786b47df71539b826299e3 Mon Sep 17 00:00:00 2001 From: Rob Humar Date: Fri, 19 Apr 2024 15:37:12 +0100 Subject: [PATCH] fix: do not send non-replaced string if term is not there --- src/Helpers.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Helpers.php b/src/Helpers.php index 0f500a8..3533657 100644 --- a/src/Helpers.php +++ b/src/Helpers.php @@ -100,8 +100,6 @@ public static function rewrite_placeholders( $items, $post ) { foreach ( $terms as $term ) { $new_items[] = str_replace( '%' . $placeholder . '%', $term, $current_item ); } - } else { - $new_items[] = $current_item; } break; }