diff --git a/bridges/FilterBridge.php b/bridges/FilterBridge.php index a1066fb5cfb..984ad53ffa9 100644 --- a/bridges/FilterBridge.php +++ b/bridges/FilterBridge.php @@ -55,6 +55,11 @@ class FilterBridge extends FeedExpander 'type' => 'checkbox', 'required' => false, ], + 'target_category' => [ + 'name' => 'Apply filter on category', + 'type' => 'checkbox', + 'required' => false, + ], 'target_title' => [ 'name' => 'Apply filter on title', 'type' => 'checkbox', @@ -127,6 +132,9 @@ protected function parseItem(array $item) if ($this->getInput('target_content')) { $filter_fields[] = $item['content'] ?? null; } + if ($this->getInput('target_category')) { + $filter_fields[] = $item['category'] ?? null; + } if ($this->getInput('target_title')) { $filter_fields[] = $item['title'] ?? null; }