From cd0936372e0ba49456489a0f40e97d05e5ae3253 Mon Sep 17 00:00:00 2001 From: RaduCristianPopescu <119046336+RaduCristianPopescu@users.noreply.github.com> Date: Mon, 11 Aug 2025 17:01:31 +0300 Subject: [PATCH 1/2] feat: add support for 'link' field in conditions --- includes/util/feedzy-rss-feeds-conditions.php | 3 +++ js/Conditions/ConditionsControl.js | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/includes/util/feedzy-rss-feeds-conditions.php b/includes/util/feedzy-rss-feeds-conditions.php index 559773a97..f632e3793 100644 --- a/includes/util/feedzy-rss-feeds-conditions.php +++ b/includes/util/feedzy-rss-feeds-conditions.php @@ -299,6 +299,9 @@ public function evaluate_conditions( $default_value, $attrs, $item, $feed_url, $ $image = $admin->feedzy_retrieve_image( $item, $attrs ); $value = $image; break; + case 'link': + $value = $item->get_link(); + break; default: $value = ''; break; diff --git a/js/Conditions/ConditionsControl.js b/js/Conditions/ConditionsControl.js index 8bf0103bd..054df0597 100644 --- a/js/Conditions/ConditionsControl.js +++ b/js/Conditions/ConditionsControl.js @@ -53,6 +53,11 @@ const SUPPORTED_FIELDS = [ value: 'featured_image', unsupportedOperators: ['greater_than', 'gte', 'less_than', 'lte'], }, + { + label: __('Link', 'feedzy-rss-feeds'), + value: 'link', + unsupportedOperators: ['greater_than', 'gte', 'less_than', 'lte'], + }, ]; const isPro = window.feedzyData.isPro; From f75a56e5a546ee3ea2f10ef1c24f19cc41fac01a Mon Sep 17 00:00:00 2001 From: RaduCristianPopescu <119046336+RaduCristianPopescu@users.noreply.github.com> Date: Wed, 13 Aug 2025 10:21:11 +0300 Subject: [PATCH 2/2] fix: check for unsupoortedOperators --- js/Conditions/ConditionsControl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/Conditions/ConditionsControl.js b/js/Conditions/ConditionsControl.js index 054df0597..14406d3a6 100644 --- a/js/Conditions/ConditionsControl.js +++ b/js/Conditions/ConditionsControl.js @@ -149,7 +149,7 @@ const ConditionsControl = ({ conditions, setConditions }) => { ); const operators = Object.keys( window?.feedzyConditionsData?.operators - ).filter((key) => !field.unsupportedOperators?.includes(key)); + ).filter((key) => !field?.unsupportedOperators?.includes(key)); return (