diff --git a/includes/functions/core.php b/includes/functions/core.php index 24c8af5..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[ $slot_id ] = 1; + $slot_ids_to_exclude_assoc[ trim( $slot_id ) ] = 1; } $viewability_threshold = $avc_settings['viewability_threshold'] ?? 70; 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' + ); ?> -