File tree 2 files changed +29
-4
lines changed
2 files changed +29
-4
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { createSlotFill } from '@wordpress/components' ;
5
+
6
+ /**
7
+ * Create our Slot and Fill components
8
+ */
9
+ const { Fill, Slot } = createSlotFill ( 'AQLLegacyControls' ) ;
10
+
11
+ /**
12
+ * This slot is not exposed and is used to try to maintain the same UI
13
+ */
14
+
15
+ const AQLLegacyControls = ( { children } ) => < Fill > { children } </ Fill > ;
16
+
17
+ AQLLegacyControls . Slot = ( { fillProps } ) => (
18
+ < Slot fillProps = { fillProps } >
19
+ { ( fills ) => {
20
+ return fills . length ? fills : null ;
21
+ } }
22
+ </ Slot >
23
+ ) ;
24
+
25
+ export default AQLLegacyControls ;
Original file line number Diff line number Diff line change @@ -12,8 +12,7 @@ import { createBlock } from '@wordpress/blocks';
12
12
import { AQL } from '.' ;
13
13
import AQLControls from '../slots/aql-controls' ;
14
14
import AQLControlsInheritedQuery from '../slots/aql-controls-inherited-query' ;
15
- import { PostCountControls } from '../components/post-count-controls' ;
16
- import { PostOffsetControls } from '../components/post-offset-controls' ;
15
+ import AQLLegacyControls from '../slots/aql-legacy-controls' ;
17
16
import { PostMetaQueryControls } from '../components/post-meta-query-controls' ;
18
17
import { PostDateQueryControls } from '../components/post-date-query-controls' ;
19
18
import { MultiplePostSelect } from '../components/multiple-post-select' ;
@@ -56,9 +55,10 @@ const withAdvancedQueryControls = ( BlockEdit ) => ( props ) => {
56
55
'advanced-query-loop'
57
56
) }
58
57
>
58
+ < AQLLegacyControls . Slot
59
+ fillProps = { { ...props } }
60
+ />
59
61
< MultiplePostSelect { ...props } />
60
- < PostCountControls { ...props } />
61
- < PostOffsetControls { ...props } />
62
62
< PostOrderControls { ...props } />
63
63
< PostExcludeControls { ...props } />
64
64
< PostIncludeControls { ...props } />
You can’t perform that action at this time.
0 commit comments