Skip to content

Commit

Permalink
Suggest terms for enabled taxonomies only.
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdharmesh committed Sep 26, 2024
1 parent a5332d1 commit 30a35dc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions includes/Classifai/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] ) );
}

/**
Expand Down

0 comments on commit 30a35dc

Please sign in to comment.