@@ -17,9 +17,9 @@ import { Icon, plus } from '@wordpress/icons';
1717 */
1818import PanelTab from './PanelTab' ;
1919import DateTimeControl from './DateTimeControl' ;
20- import { cond } from 'lodash' ;
2120import { useState } from 'react' ;
2221
22+ const isPro = window . feedzyData . isPro ;
2323const SUPPORTED_FIELDS = [
2424 {
2525 label : __ ( 'Title' , 'feedzy-rss-feeds' ) ,
@@ -28,15 +28,18 @@ const SUPPORTED_FIELDS = [
2828 {
2929 label : __ ( 'Description' , 'feedzy-rss-feeds' ) ,
3030 value : 'description' ,
31+ disabled : ! isPro ,
3132 } ,
3233 {
3334 label : __ ( 'Full Content' , 'feedzy-rss-feeds' ) ,
3435 value : 'fullcontent' ,
36+ disabled : ! isPro ,
3537 } ,
3638 {
3739 label : __ ( 'Author' , 'feedzy-rss-feeds' ) ,
3840 value : 'author' ,
3941 unsupportedOperators : [ 'greater_than' , 'gte' , 'less_than' , 'lte' ] ,
42+ disabled : ! isPro ,
4043 } ,
4144 {
4245 label : __ ( 'Date' , 'feedzy-rss-feeds' ) ,
@@ -49,19 +52,21 @@ const SUPPORTED_FIELDS = [
4952 'contains' ,
5053 'not_contains' ,
5154 ] ,
55+ disabled : ! isPro ,
5256 } ,
5357 {
5458 label : __ ( 'Featured Image' , 'feedzy-rss-feeds' ) ,
5559 value : 'featured_image' ,
5660 unsupportedOperators : [ 'greater_than' , 'gte' , 'less_than' , 'lte' ] ,
61+ disabled : ! isPro ,
5762 } ,
5863 {
5964 label : __ ( 'Link' , 'feedzy-rss-feeds' ) ,
6065 value : 'link' ,
6166 unsupportedOperators : [ 'greater_than' , 'gte' , 'less_than' , 'lte' ] ,
67+ disabled : ! isPro ,
6268 } ,
6369] ;
64- const isPro = window . feedzyData . isPro ;
6570
6671const ConditionsControl = ( { conditions, setConditions } ) => {
6772 const [ modalOpen , setModelOpen ] = useState ( false ) ;
0 commit comments