11/**
22 * External dependencies
33 */
4- import { i18n , isPro } from 'stackable'
4+ import {
5+ i18n , showProNotice , isPro ,
6+ } from 'stackable'
57import {
68 PanelAdvancedSettings ,
79 ProControl ,
@@ -11,23 +13,24 @@ import { addFilter, applyFilters } from '@wordpress/hooks'
1113import { Fragment } from '@wordpress/element'
1214import { __ } from '@wordpress/i18n'
1315
14- addFilter ( 'stackable.global-settings.inspector' , 'stackable/icon-library' , output => {
15- return (
16- < Fragment >
17- { output }
18-
19- < PanelAdvancedSettings
20- title = { __ ( 'Icon Library' , i18n ) }
21- id = "icon-library-settings"
22- isPremiumPanel = { ! isPro }
23- >
24- { ! isPro && < ProControl type = "icon-library" /> }
25- { isPro &&
26- applyFilters ( 'stackable.global-settings.inspector.icon-library.control' , null )
27- }
16+ if ( showProNotice || isPro ) {
17+ addFilter ( 'stackable.global-settings.inspector' , 'stackable/icon-library' , output => {
18+ return (
19+ < Fragment >
20+ { output }
2821
29- </ PanelAdvancedSettings >
30- </ Fragment >
31- )
32- } )
22+ < PanelAdvancedSettings
23+ title = { __ ( 'Icon Library' , i18n ) }
24+ id = "icon-library-settings"
25+ isPremiumPanel = { ! isPro }
26+ >
27+ { ! isPro && < ProControl type = "icon-library" /> }
28+ { isPro &&
29+ applyFilters ( 'stackable.global-settings.inspector.icon-library.control' , null )
30+ }
3331
32+ </ PanelAdvancedSettings >
33+ </ Fragment >
34+ )
35+ } )
36+ }
0 commit comments