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..14406d3a6 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; @@ -144,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 (