@wordpress/edit-site 4.5.0 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/add-new-template/new-template.js +10 -3
- package/build/components/add-new-template/new-template.js.map +1 -1
- package/build/components/block-editor/index.js +28 -22
- package/build/components/block-editor/index.js.map +1 -1
- package/build/components/global-styles/border-panel.js +2 -7
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/hooks.js +2 -2
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +1 -7
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/list/table.js +1 -1
- package/build/components/list/table.js.map +1 -1
- package/build/components/navigation-sidebar/navigation-panel/constants.js +2 -2
- package/build/components/navigation-sidebar/navigation-panel/constants.js.map +1 -1
- package/build/components/preferences-modal/index.js +5 -1
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/routes/use-title.js +3 -1
- package/build/components/routes/use-title.js.map +1 -1
- package/build/components/sidebar/global-styles-sidebar.js +2 -4
- package/build/components/sidebar/global-styles-sidebar.js.map +1 -1
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/template-details/index.js +4 -2
- package/build/components/template-details/index.js.map +1 -1
- package/build/index.js +11 -2
- package/build/index.js.map +1 -1
- package/build-module/components/add-new-template/new-template.js +9 -3
- package/build-module/components/add-new-template/new-template.js.map +1 -1
- package/build-module/components/block-editor/index.js +28 -23
- package/build-module/components/block-editor/index.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +2 -7
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +2 -2
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +1 -7
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/list/table.js +1 -1
- package/build-module/components/list/table.js.map +1 -1
- package/build-module/components/navigation-sidebar/navigation-panel/constants.js +2 -2
- package/build-module/components/navigation-sidebar/navigation-panel/constants.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +5 -1
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/routes/use-title.js +2 -1
- package/build-module/components/routes/use-title.js.map +1 -1
- package/build-module/components/sidebar/global-styles-sidebar.js +2 -4
- package/build-module/components/sidebar/global-styles-sidebar.js.map +1 -1
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/template-details/index.js +4 -2
- package/build-module/components/template-details/index.js.map +1 -1
- package/build-module/index.js +10 -2
- package/build-module/index.js.map +1 -1
- package/build-style/style-rtl.css +5 -43
- package/build-style/style.css +5 -43
- package/package.json +29 -29
- package/src/components/add-new-template/new-template.js +7 -2
- package/src/components/block-editor/index.js +58 -37
- package/src/components/global-styles/border-panel.js +2 -12
- package/src/components/global-styles/hooks.js +1 -1
- package/src/components/global-styles/use-global-styles-output.js +1 -4
- package/src/components/header/document-actions/style.scss +1 -1
- package/src/components/list/style.scss +1 -0
- package/src/components/list/table.js +1 -4
- package/src/components/navigation-sidebar/navigation-panel/constants.js +2 -2
- package/src/components/preferences-modal/index.js +8 -1
- package/src/components/routes/use-title.js +3 -2
- package/src/components/sidebar/global-styles-sidebar.js +1 -1
- package/src/components/sidebar/index.js +2 -0
- package/src/components/sidebar/style.scss +0 -49
- package/src/components/template-details/index.js +4 -1
- package/src/index.js +17 -0
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import classnames from 'classnames';
|
|
5
|
+
import { omit, unionBy } from 'lodash';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* WordPress dependencies
|
|
8
9
|
*/
|
|
9
10
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
10
|
-
import { useCallback, useRef, Fragment } from '@wordpress/element';
|
|
11
|
+
import { useCallback, useMemo, useRef, Fragment } from '@wordpress/element';
|
|
11
12
|
import { useEntityBlockEditor, store as coreStore } from '@wordpress/core-data';
|
|
12
13
|
import {
|
|
13
14
|
BlockList,
|
|
@@ -48,44 +49,17 @@ const LAYOUT = {
|
|
|
48
49
|
};
|
|
49
50
|
|
|
50
51
|
export default function BlockEditor( { setIsInserterOpen } ) {
|
|
51
|
-
const {
|
|
52
|
+
const { storedSettings, templateType, templateId, page } = useSelect(
|
|
52
53
|
( select ) => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
...storedSettings,
|
|
60
|
-
__experimentalBlockPatterns: select(
|
|
61
|
-
coreStore
|
|
62
|
-
).getBlockPatterns(),
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if ( ! storedSettings.__experimentalBlockPatternCategories ) {
|
|
67
|
-
storedSettings = {
|
|
68
|
-
...storedSettings,
|
|
69
|
-
__experimentalBlockPatternCategories: select(
|
|
70
|
-
coreStore
|
|
71
|
-
).getBlockPatternCategories(),
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return {
|
|
76
|
-
settings: storedSettings,
|
|
77
|
-
};
|
|
78
|
-
},
|
|
79
|
-
[ setIsInserterOpen ]
|
|
80
|
-
);
|
|
81
|
-
|
|
82
|
-
const { templateType, templateId, page } = useSelect(
|
|
83
|
-
( select ) => {
|
|
84
|
-
const { getEditedPostType, getEditedPostId, getPage } = select(
|
|
85
|
-
editSiteStore
|
|
86
|
-
);
|
|
54
|
+
const {
|
|
55
|
+
getSettings,
|
|
56
|
+
getEditedPostType,
|
|
57
|
+
getEditedPostId,
|
|
58
|
+
getPage,
|
|
59
|
+
} = select( editSiteStore );
|
|
87
60
|
|
|
88
61
|
return {
|
|
62
|
+
storedSettings: getSettings( setIsInserterOpen ),
|
|
89
63
|
templateType: getEditedPostType(),
|
|
90
64
|
templateId: getEditedPostId(),
|
|
91
65
|
page: getPage(),
|
|
@@ -94,6 +68,50 @@ export default function BlockEditor( { setIsInserterOpen } ) {
|
|
|
94
68
|
[ setIsInserterOpen ]
|
|
95
69
|
);
|
|
96
70
|
|
|
71
|
+
const settingsBlockPatterns =
|
|
72
|
+
storedSettings.__experimentalAdditionalBlockPatterns ?? // WP 6.0
|
|
73
|
+
storedSettings.__experimentalBlockPatterns; // WP 5.9
|
|
74
|
+
const settingsBlockPatternCategories =
|
|
75
|
+
storedSettings.__experimentalAdditionalBlockPatternCategories ?? // WP 6.0
|
|
76
|
+
storedSettings.__experimentalBlockPatternCategories; // WP 5.9
|
|
77
|
+
|
|
78
|
+
const { restBlockPatterns, restBlockPatternCategories } = useSelect(
|
|
79
|
+
( select ) => ( {
|
|
80
|
+
restBlockPatterns: select( coreStore ).getBlockPatterns(),
|
|
81
|
+
restBlockPatternCategories: select(
|
|
82
|
+
coreStore
|
|
83
|
+
).getBlockPatternCategories(),
|
|
84
|
+
} ),
|
|
85
|
+
[]
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
const blockPatterns = useMemo(
|
|
89
|
+
() => unionBy( settingsBlockPatterns, restBlockPatterns, 'name' ),
|
|
90
|
+
[ settingsBlockPatterns, restBlockPatterns ]
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
const blockPatternCategories = useMemo(
|
|
94
|
+
() =>
|
|
95
|
+
unionBy(
|
|
96
|
+
settingsBlockPatternCategories,
|
|
97
|
+
restBlockPatternCategories,
|
|
98
|
+
'name'
|
|
99
|
+
),
|
|
100
|
+
[ settingsBlockPatternCategories, restBlockPatternCategories ]
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
const settings = useMemo(
|
|
104
|
+
() => ( {
|
|
105
|
+
...omit( storedSettings, [
|
|
106
|
+
'__experimentalAdditionalBlockPatterns',
|
|
107
|
+
'__experimentalAdditionalBlockPatternCategories',
|
|
108
|
+
] ),
|
|
109
|
+
__experimentalBlockPatterns: blockPatterns,
|
|
110
|
+
__experimentalBlockPatternCategories: blockPatternCategories,
|
|
111
|
+
} ),
|
|
112
|
+
[ storedSettings, blockPatterns, blockPatternCategories ]
|
|
113
|
+
);
|
|
114
|
+
|
|
97
115
|
const [ blocks, onInput, onChange ] = useEntityBlockEditor(
|
|
98
116
|
'postType',
|
|
99
117
|
templateType
|
|
@@ -112,6 +130,7 @@ export default function BlockEditor( { setIsInserterOpen } ) {
|
|
|
112
130
|
const { clearSelectedBlock } = useDispatch( blockEditorStore );
|
|
113
131
|
|
|
114
132
|
const isTemplatePart = templateType === 'wp_template_part';
|
|
133
|
+
const hasBlocks = blocks.length !== 0;
|
|
115
134
|
|
|
116
135
|
const NavMenuSidebarToggle = () => (
|
|
117
136
|
<ToolbarGroup>
|
|
@@ -186,7 +205,9 @@ export default function BlockEditor( { setIsInserterOpen } ) {
|
|
|
186
205
|
<BlockList
|
|
187
206
|
className="edit-site-block-editor__block-list wp-site-blocks"
|
|
188
207
|
__experimentalLayout={ LAYOUT }
|
|
189
|
-
renderAppender={
|
|
208
|
+
renderAppender={
|
|
209
|
+
isTemplatePart && hasBlocks ? false : undefined
|
|
210
|
+
}
|
|
190
211
|
/>
|
|
191
212
|
</ResizableEditor>
|
|
192
213
|
<__unstableBlockSettingsMenuFirstItem>
|
|
@@ -182,18 +182,8 @@ export default function BorderPanel( { name } ) {
|
|
|
182
182
|
onChange={ onBorderChange }
|
|
183
183
|
showStyle={ showBorderStyle }
|
|
184
184
|
value={ border }
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
'edit-site-global-styles-sidebar__border-box-control__popover',
|
|
188
|
-
top:
|
|
189
|
-
'edit-site-global-styles-sidebar__border-box-control__popover-top',
|
|
190
|
-
right:
|
|
191
|
-
'edit-site-global-styles-sidebar__border-box-control__popover-right',
|
|
192
|
-
bottom:
|
|
193
|
-
'edit-site-global-styles-sidebar__border-box-control__popover-bottom',
|
|
194
|
-
left:
|
|
195
|
-
'edit-site-global-styles-sidebar__border-box-control__popover-left',
|
|
196
|
-
} }
|
|
185
|
+
popoverPlacement="left-start"
|
|
186
|
+
popoverOffset={ 40 }
|
|
197
187
|
__experimentalHasMultipleOrigins={ true }
|
|
198
188
|
__experimentalIsRenderedInSidebar={ true }
|
|
199
189
|
/>
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import { getValueFromVariable, getPresetVariableFromValue } from './utils';
|
|
21
21
|
import { GlobalStylesContext } from './context';
|
|
22
22
|
|
|
23
|
-
const EMPTY_CONFIG = {
|
|
23
|
+
const EMPTY_CONFIG = { settings: {}, styles: {} };
|
|
24
24
|
|
|
25
25
|
export const useGlobalStylesReset = () => {
|
|
26
26
|
const { user: config, setUserConfig } = useContext( GlobalStylesContext );
|
|
@@ -220,11 +220,8 @@ function getStylesDeclarations( blockStyles = {} ) {
|
|
|
220
220
|
|
|
221
221
|
// The goal is to move everything to server side generated engine styles
|
|
222
222
|
// This is temporary as we absorb more and more styles into the engine.
|
|
223
|
-
const extraRules = getCSSRules( blockStyles
|
|
223
|
+
const extraRules = getCSSRules( blockStyles );
|
|
224
224
|
extraRules.forEach( ( rule ) => {
|
|
225
|
-
if ( rule.selector !== 'self' ) {
|
|
226
|
-
throw "This style can't be added as inline style";
|
|
227
|
-
}
|
|
228
225
|
const cssProperty = rule.key.startsWith( '--' )
|
|
229
226
|
? rule.key
|
|
230
227
|
: kebabCase( rule.key );
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { useSelect } from '@wordpress/data';
|
|
5
|
-
import {
|
|
6
|
-
store as coreStore,
|
|
7
|
-
__experimentalUseEntityRecords as useEntityRecords,
|
|
8
|
-
} from '@wordpress/core-data';
|
|
5
|
+
import { store as coreStore, useEntityRecords } from '@wordpress/core-data';
|
|
9
6
|
import { __, sprintf } from '@wordpress/i18n';
|
|
10
7
|
import {
|
|
11
8
|
VisuallyHidden,
|
|
@@ -31,7 +31,7 @@ export const TEMPLATES_SECONDARY = [
|
|
|
31
31
|
'date',
|
|
32
32
|
'tag',
|
|
33
33
|
'attachment',
|
|
34
|
-
'single
|
|
34
|
+
'single',
|
|
35
35
|
'front-page',
|
|
36
36
|
];
|
|
37
37
|
|
|
@@ -45,7 +45,7 @@ export const TEMPLATES_GENERAL = [ 'page-home' ];
|
|
|
45
45
|
export const TEMPLATES_POSTS_PREFIXES = [
|
|
46
46
|
'post-',
|
|
47
47
|
'author-',
|
|
48
|
-
'single-
|
|
48
|
+
'single-',
|
|
49
49
|
'tag-',
|
|
50
50
|
];
|
|
51
51
|
|
|
@@ -39,7 +39,14 @@ export default function EditSitePreferencesModal( {
|
|
|
39
39
|
<EnableFeature
|
|
40
40
|
featureName="showIconLabels"
|
|
41
41
|
label={ __( 'Show button text labels' ) }
|
|
42
|
-
help={ __( 'Show text instead of icons on buttons' ) }
|
|
42
|
+
help={ __( 'Show text instead of icons on buttons.' ) }
|
|
43
|
+
/>
|
|
44
|
+
<EnableFeature
|
|
45
|
+
featureName="showListViewByDefault"
|
|
46
|
+
help={ __(
|
|
47
|
+
'Opens the block list view sidebar by default.'
|
|
48
|
+
) }
|
|
49
|
+
label={ __( 'Always open list view' ) }
|
|
43
50
|
/>
|
|
44
51
|
</PreferencesModalSection>
|
|
45
52
|
),
|
|
@@ -6,6 +6,7 @@ import { useSelect } from '@wordpress/data';
|
|
|
6
6
|
import { store as coreStore } from '@wordpress/core-data';
|
|
7
7
|
import { __, sprintf } from '@wordpress/i18n';
|
|
8
8
|
import { speak } from '@wordpress/a11y';
|
|
9
|
+
import { decodeEntities } from '@wordpress/html-entities';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Internal dependencies
|
|
@@ -36,8 +37,8 @@ export default function useTitle( title ) {
|
|
|
36
37
|
const formattedTitle = sprintf(
|
|
37
38
|
/* translators: Admin screen title. 1: Admin screen name, 2: Network or site name. */
|
|
38
39
|
__( '%1$s ‹ %2$s — WordPress' ),
|
|
39
|
-
title,
|
|
40
|
-
siteTitle
|
|
40
|
+
decodeEntities( title ),
|
|
41
|
+
decodeEntities( siteTitle )
|
|
41
42
|
);
|
|
42
43
|
|
|
43
44
|
document.title = formattedTitle;
|
|
@@ -37,11 +37,11 @@ export default function GlobalStylesSidebar() {
|
|
|
37
37
|
<DropdownMenu
|
|
38
38
|
icon={ moreVertical }
|
|
39
39
|
label={ __( 'More Global Styles Actions' ) }
|
|
40
|
-
toggleProps={ { disabled: ! canReset } }
|
|
41
40
|
controls={ [
|
|
42
41
|
{
|
|
43
42
|
title: __( 'Reset to defaults' ),
|
|
44
43
|
onClick: onReset,
|
|
44
|
+
isDisabled: ! canReset,
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
title: __( 'Welcome Guide' ),
|
|
@@ -46,6 +46,7 @@ export function SidebarComplementaryAreaFills() {
|
|
|
46
46
|
[]
|
|
47
47
|
);
|
|
48
48
|
const { enableComplementaryArea } = useDispatch( interfaceStore );
|
|
49
|
+
|
|
49
50
|
useEffect( () => {
|
|
50
51
|
if ( ! isEditorSidebarOpened ) return;
|
|
51
52
|
if ( hasBlockSelection ) {
|
|
@@ -54,6 +55,7 @@ export function SidebarComplementaryAreaFills() {
|
|
|
54
55
|
enableComplementaryArea( STORE_NAME, SIDEBAR_TEMPLATE );
|
|
55
56
|
}
|
|
56
57
|
}, [ hasBlockSelection, isEditorSidebarOpened ] );
|
|
58
|
+
|
|
57
59
|
let sidebarName = sidebar;
|
|
58
60
|
if ( ! isEditorSidebarOpened ) {
|
|
59
61
|
sidebarName = hasBlockSelection ? SIDEBAR_BLOCK : SIDEBAR_TEMPLATE;
|
|
@@ -88,55 +88,6 @@
|
|
|
88
88
|
line-height: 1;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
.edit-site-global-styles-sidebar__border-box-control__popover,
|
|
93
|
-
.edit-site-global-styles-sidebar__border-box-control__popover-top,
|
|
94
|
-
.edit-site-global-styles-sidebar__border-box-control__popover-right,
|
|
95
|
-
.edit-site-global-styles-sidebar__border-box-control__popover-bottom,
|
|
96
|
-
.edit-site-global-styles-sidebar__border-box-control__popover-left {
|
|
97
|
-
.components-popover__content {
|
|
98
|
-
width: 282px;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
$split-border-control-offset: 55px;
|
|
103
|
-
|
|
104
|
-
@include break-medium() {
|
|
105
|
-
.edit-site-global-styles-sidebar__border-box-control__popover,
|
|
106
|
-
.edit-site-global-styles-sidebar__border-box-control__popover-left {
|
|
107
|
-
.components-popover__content {
|
|
108
|
-
margin-right: #{ $grid-unit-50 + $grid-unit-15 } !important;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.edit-site-global-styles-sidebar__border-box-control__popover-top,
|
|
113
|
-
.edit-site-global-styles-sidebar__border-box-control__popover-bottom {
|
|
114
|
-
.components-popover__content {
|
|
115
|
-
margin-right: #{ $grid-unit-50 + $grid-unit-15 + $split-border-control-offset } !important;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.edit-site-global-styles-sidebar__border-box-control__popover-right {
|
|
120
|
-
.components-popover__content {
|
|
121
|
-
margin-right: #{ $grid-unit-50 + $grid-unit-15 + ( $split-border-control-offset * 2 )} !important;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.edit-site-global-styles-sidebar__border-box-control__popover,
|
|
126
|
-
.edit-site-global-styles-sidebar__border-box-control__popover-top,
|
|
127
|
-
.edit-site-global-styles-sidebar__border-box-control__popover-right,
|
|
128
|
-
.edit-site-global-styles-sidebar__border-box-control__popover-bottom,
|
|
129
|
-
.edit-site-global-styles-sidebar__border-box-control__popover-left {
|
|
130
|
-
&.is-from-top .components-popover__content {
|
|
131
|
-
margin-top: #{ -($grid-unit-50 + $grid-unit-15) } !important;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
&.is-from-bottom .components-popover__content {
|
|
135
|
-
margin-bottom: #{ -($grid-unit-50 + $grid-unit-15) } !important;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
91
|
// Override the `hr` styles defined in the `ComplementaryArea` component
|
|
141
92
|
// from the `@wordpress/interface` package.
|
|
142
93
|
.edit-site-global-styles-sidebar hr {
|
|
@@ -50,6 +50,9 @@ export default function TemplateDetails( { template, onClose } ) {
|
|
|
50
50
|
postId: undefined,
|
|
51
51
|
} );
|
|
52
52
|
|
|
53
|
+
// Only user-created and non-default templates can change the name.
|
|
54
|
+
const canEditTitle = template.is_custom && ! template.has_theme_file;
|
|
55
|
+
|
|
53
56
|
if ( ! template ) {
|
|
54
57
|
return null;
|
|
55
58
|
}
|
|
@@ -62,7 +65,7 @@ export default function TemplateDetails( { template, onClose } ) {
|
|
|
62
65
|
return (
|
|
63
66
|
<div className="edit-site-template-details">
|
|
64
67
|
<div className="edit-site-template-details__group">
|
|
65
|
-
{
|
|
68
|
+
{ canEditTitle ? (
|
|
66
69
|
<EditTemplateTitle template={ template } />
|
|
67
70
|
) : (
|
|
68
71
|
<Heading
|
package/src/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
__experimentalFetchUrlData as fetchUrlData,
|
|
14
14
|
} from '@wordpress/core-data';
|
|
15
15
|
import { store as editorStore } from '@wordpress/editor';
|
|
16
|
+
import { store as interfaceStore } from '@wordpress/interface';
|
|
16
17
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
17
18
|
import { __ } from '@wordpress/i18n';
|
|
18
19
|
import { store as viewportStore } from '@wordpress/viewport';
|
|
@@ -64,8 +65,24 @@ export function reinitializeEditor( target, settings ) {
|
|
|
64
65
|
keepCaretInsideBlock: false,
|
|
65
66
|
welcomeGuide: true,
|
|
66
67
|
welcomeGuideStyles: true,
|
|
68
|
+
shouldListViewOpenByDefault: false,
|
|
67
69
|
} );
|
|
68
70
|
|
|
71
|
+
// Check if the block list view should be open by default.
|
|
72
|
+
if (
|
|
73
|
+
select( preferencesStore ).get(
|
|
74
|
+
'core/edit-site',
|
|
75
|
+
'showListViewByDefault'
|
|
76
|
+
)
|
|
77
|
+
) {
|
|
78
|
+
dispatch( editSiteStore ).setIsListViewOpened( true );
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
dispatch( interfaceStore ).setDefaultComplementaryArea(
|
|
82
|
+
'core/edit-site',
|
|
83
|
+
'edit-site/template'
|
|
84
|
+
);
|
|
85
|
+
|
|
69
86
|
dispatch( editSiteStore ).updateSettings( settings );
|
|
70
87
|
|
|
71
88
|
// Keep the defaultTemplateTypes in the core/editor settings too,
|