From 30a35dca4d733fe98f82311a273096d1c04eab0a Mon Sep 17 00:00:00 2001 From: Dharmesh Patel Date: Thu, 26 Sep 2024 17:58:09 +0530 Subject: [PATCH] Suggest terms for enabled taxonomies only. --- includes/Classifai/Helpers.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/includes/Classifai/Helpers.php b/includes/Classifai/Helpers.php index 494d64b96..60c31fdcf 100644 --- a/includes/Classifai/Helpers.php +++ b/includes/Classifai/Helpers.php @@ -589,10 +589,7 @@ function sanitize_number_of_responses_field( string $key, array $new_settings, a function get_classification_feature_enabled( string $classify_by ): bool { $settings = ( new Classification() )->get_settings(); - return filter_var( - isset( $settings[ $classify_by ] ) ?? false, - FILTER_VALIDATE_BOOLEAN - ); + return ( ! empty( $settings[ $classify_by ] ) ); } /**