File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed
src/plugins/global-settings/block-styles Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -25,15 +25,15 @@ import { __ } from '@wordpress/i18n'
2525
2626export { GlobalBlockStyles } from './editor-loader'
2727
28- addFilter ( 'stackable.global-settings.inspector' , 'stackable/global-block-styles' , output => {
29- const [ isOpen , setIsOpen ] = useState ( false )
30- const hasBlockStyles = useSelect ( select => {
31- const blockStyles = select ( 'stackable/global-block-styles' ) . getAllBlockStyles ( )
28+ if ( showProNotice || isPro ) {
29+ addFilter ( 'stackable.global-settings.inspector' , 'stackable/global-block-styles' , output => {
30+ const [ isOpen , setIsOpen ] = useState ( false )
31+ const hasBlockStyles = useSelect ( select => {
32+ const blockStyles = select ( 'stackable/global-block-styles' ) . getAllBlockStyles ( )
3233
33- return Object . keys ( blockStyles ) . length > 0
34- } , [ ] )
34+ return Object . keys ( blockStyles ) . length > 0
35+ } , [ ] )
3536
36- if ( showProNotice || isPro ) {
3737 return (
3838 < Fragment >
3939 { output }
@@ -50,8 +50,5 @@ addFilter( 'stackable.global-settings.inspector', 'stackable/global-block-styles
5050 </ PanelAdvancedSettings >
5151 </ Fragment >
5252 )
53- }
54-
55- return < Fragment />
56- } , 8 )
57-
53+ } , 8 )
54+ }
You can’t perform that action at this time.
0 commit comments