From f73d5aaff9a3785950caff37df3aaa4432f4a0cd Mon Sep 17 00:00:00 2001 From: Nick Date: Thu, 9 Apr 2026 10:31:27 -0400 Subject: [PATCH 1/3] Fix: trim whitespace from slot ID exclusions to prevent space-padded entries from failing to match --- includes/functions/core.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions/core.php b/includes/functions/core.php index 24c8af5..58c81a9 100644 --- a/includes/functions/core.php +++ b/includes/functions/core.php @@ -130,7 +130,7 @@ function ( $size ) { ); $slot_ids_to_exclude_assoc = []; foreach ( $slot_ids_to_exclude as $slot_id ) { - $slot_ids_to_exclude_assoc[ $slot_id ] = 1; + $slot_ids_to_exclude_assoc[ trim( $slot_id) ] = 1; } $viewability_threshold = $avc_settings['viewability_threshold'] ?? 70; From 85f5c5755e2fd257589c343da486e988ca8e4771 Mon Sep 17 00:00:00 2001 From: Nick Date: Thu, 9 Apr 2026 16:06:20 -0400 Subject: [PATCH 2/3] add whitespace before closing paren --- includes/functions/core.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions/core.php b/includes/functions/core.php index 58c81a9..bf5bb10 100644 --- a/includes/functions/core.php +++ b/includes/functions/core.php @@ -130,7 +130,7 @@ function ( $size ) { ); $slot_ids_to_exclude_assoc = []; foreach ( $slot_ids_to_exclude as $slot_id ) { - $slot_ids_to_exclude_assoc[ trim( $slot_id) ] = 1; + $slot_ids_to_exclude_assoc[ trim( $slot_id ) ] = 1; } $viewability_threshold = $avc_settings['viewability_threshold'] ?? 70; From c5b4ed61f32fecaf03b8382f082d0faa04ee3342 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Thu, 9 Apr 2026 14:24:49 -0600 Subject: [PATCH 3/3] Remove extra spaces from excluded slot IDs on save. Remove extra spaces when we render in the input, supporting any legacy options that have extra spaces and new options that won't --- includes/settings.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/includes/settings.php b/includes/settings.php index 4fbb375..0313b23 100644 --- a/includes/settings.php +++ b/includes/settings.php @@ -213,8 +213,15 @@ function slot_ids_to_exclude_callback() { $avc_settings = get_option( 'avc_settings' ); $value = $avc_settings['slot_ids_to_exclude'] ?? []; + $value = array_filter( + array_map( + 'trim', + $value + ), + 'strlen' + ); ?> -