@wordpress/editor 14.8.4 → 14.8.6
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/build/bindings/api.js +2 -5
- package/build/bindings/api.js.map +1 -1
- package/build/bindings/pattern-overrides.js +7 -6
- package/build/bindings/pattern-overrides.js.map +1 -1
- package/build/bindings/post-meta.js +65 -43
- package/build/bindings/post-meta.js.map +1 -1
- package/build/components/entities-saved-states/index.js +8 -6
- package/build/components/entities-saved-states/index.js.map +1 -1
- package/build/components/post-publish-panel/maybe-upload-media.js +3 -3
- package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build/components/preview-dropdown/index.js +5 -0
- package/build/components/preview-dropdown/index.js.map +1 -1
- package/build/components/provider/index.js +10 -14
- package/build/components/provider/index.js.map +1 -1
- package/build/components/zoom-out-toggle/index.js +7 -3
- package/build/components/zoom-out-toggle/index.js.map +1 -1
- package/build/hooks/pattern-overrides.js +1 -4
- package/build/hooks/pattern-overrides.js.map +1 -1
- package/build/store/actions.js +15 -4
- package/build/store/actions.js.map +1 -1
- package/build-module/bindings/api.js +1 -4
- package/build-module/bindings/api.js.map +1 -1
- package/build-module/bindings/pattern-overrides.js +7 -6
- package/build-module/bindings/pattern-overrides.js.map +1 -1
- package/build-module/bindings/post-meta.js +66 -43
- package/build-module/bindings/post-meta.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js +8 -6
- package/build-module/components/entities-saved-states/index.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-upload-media.js +3 -3
- package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build-module/components/preview-dropdown/index.js +5 -0
- package/build-module/components/preview-dropdown/index.js.map +1 -1
- package/build-module/components/provider/index.js +10 -14
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/zoom-out-toggle/index.js +7 -3
- package/build-module/components/zoom-out-toggle/index.js.map +1 -1
- package/build-module/hooks/pattern-overrides.js +1 -4
- package/build-module/hooks/pattern-overrides.js.map +1 -1
- package/build-module/store/actions.js +16 -5
- package/build-module/store/actions.js.map +1 -1
- package/build-style/style-rtl.css +2 -2
- package/build-style/style.css +2 -2
- package/build-types/bindings/api.d.ts.map +1 -1
- package/build-types/bindings/pattern-overrides.d.ts +5 -4
- package/build-types/bindings/pattern-overrides.d.ts.map +1 -1
- package/build-types/bindings/post-meta.d.ts +7 -12
- package/build-types/bindings/post-meta.d.ts.map +1 -1
- package/build-types/components/entities-saved-states/index.d.ts.map +1 -1
- package/build-types/components/preview-dropdown/index.d.ts.map +1 -1
- package/build-types/components/provider/index.d.ts.map +1 -1
- package/build-types/components/zoom-out-toggle/index.d.ts.map +1 -1
- package/build-types/store/actions.d.ts.map +1 -1
- package/package.json +30 -30
- package/src/bindings/api.js +1 -2
- package/src/bindings/pattern-overrides.js +27 -30
- package/src/bindings/post-meta.js +70 -64
- package/src/components/entities-saved-states/index.js +10 -8
- package/src/components/entities-saved-states/style.scss +2 -2
- package/src/components/post-publish-panel/maybe-upload-media.js +3 -3
- package/src/components/preview-dropdown/index.js +3 -0
- package/src/components/provider/index.js +13 -20
- package/src/components/zoom-out-toggle/index.js +7 -1
- package/src/hooks/pattern-overrides.js +1 -2
- package/src/store/actions.js +26 -11
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -9,26 +9,63 @@ import { store as coreDataStore } from '@wordpress/core-data';
|
|
|
9
9
|
import { store as editorStore } from '../store';
|
|
10
10
|
import { unlock } from '../lock-unlock';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Gets a list of post meta fields with their values and labels
|
|
14
|
+
* to be consumed in the needed callbacks.
|
|
15
|
+
* If the value is not available based on context, like in templates,
|
|
16
|
+
* it falls back to the default value, label, or key.
|
|
17
|
+
*
|
|
18
|
+
* @param {Object} select The select function from the data store.
|
|
19
|
+
* @param {Object} context The context provided.
|
|
20
|
+
* @return {Object} List of post meta fields with their value and label.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```js
|
|
24
|
+
* {
|
|
25
|
+
* field_1_key: {
|
|
26
|
+
* label: 'Field 1 Label',
|
|
27
|
+
* value: 'Field 1 Value',
|
|
28
|
+
* },
|
|
29
|
+
* field_2_key: {
|
|
30
|
+
* label: 'Field 2 Label',
|
|
31
|
+
* value: 'Field 2 Value',
|
|
32
|
+
* },
|
|
33
|
+
* ...
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
function getPostMetaFields( select, context ) {
|
|
38
|
+
const { getEditedEntityRecord } = select( coreDataStore );
|
|
39
|
+
const { getRegisteredPostMeta } = unlock( select( coreDataStore ) );
|
|
16
40
|
|
|
41
|
+
let entityMetaValues;
|
|
42
|
+
// Try to get the current entity meta values.
|
|
17
43
|
if ( context?.postType && context?.postId ) {
|
|
18
|
-
|
|
44
|
+
entityMetaValues = getEditedEntityRecord(
|
|
19
45
|
'postType',
|
|
20
46
|
context?.postType,
|
|
21
47
|
context?.postId
|
|
22
48
|
).meta;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const registeredFields = getRegisteredPostMeta( context?.postType );
|
|
52
|
+
const metaFields = {};
|
|
53
|
+
Object.entries( registeredFields || {} ).forEach( ( [ key, props ] ) => {
|
|
54
|
+
// Don't include footnotes or private fields.
|
|
55
|
+
if ( key !== 'footnotes' && key.charAt( 0 ) !== '_' ) {
|
|
56
|
+
metaFields[ key ] = {
|
|
57
|
+
label: props.title || key,
|
|
58
|
+
value:
|
|
59
|
+
// When using the entity value, an empty string IS a valid value.
|
|
60
|
+
entityMetaValues?.[ key ] ??
|
|
61
|
+
// When using the default, an empty string IS NOT a valid value.
|
|
62
|
+
( props.default || undefined ),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
} );
|
|
66
|
+
|
|
67
|
+
if ( ! Object.keys( metaFields || {} ).length ) {
|
|
68
|
+
return null;
|
|
32
69
|
}
|
|
33
70
|
|
|
34
71
|
return metaFields;
|
|
@@ -36,34 +73,33 @@ function getMetadata( registry, context, registeredFields ) {
|
|
|
36
73
|
|
|
37
74
|
export default {
|
|
38
75
|
name: 'core/post-meta',
|
|
39
|
-
getValues( {
|
|
40
|
-
const
|
|
41
|
-
registry.select( coreDataStore )
|
|
42
|
-
);
|
|
43
|
-
const registeredFields = getRegisteredPostMeta( context?.postType );
|
|
44
|
-
const metaFields = getMetadata( registry, context, registeredFields );
|
|
76
|
+
getValues( { select, context, bindings } ) {
|
|
77
|
+
const metaFields = getPostMetaFields( select, context );
|
|
45
78
|
|
|
46
79
|
const newValues = {};
|
|
47
80
|
for ( const [ attributeName, source ] of Object.entries( bindings ) ) {
|
|
48
81
|
// Use the value, the field label, or the field key.
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
metaFields?.[
|
|
52
|
-
|
|
53
|
-
metaKey;
|
|
82
|
+
const fieldKey = source.args.key;
|
|
83
|
+
const { value: fieldValue, label: fieldLabel } =
|
|
84
|
+
metaFields?.[ fieldKey ] || {};
|
|
85
|
+
newValues[ attributeName ] = fieldValue ?? fieldLabel ?? fieldKey;
|
|
54
86
|
}
|
|
55
87
|
return newValues;
|
|
56
88
|
},
|
|
57
|
-
setValues( {
|
|
89
|
+
setValues( { dispatch, context, bindings } ) {
|
|
58
90
|
const newMeta = {};
|
|
59
91
|
Object.values( bindings ).forEach( ( { args, newValue } ) => {
|
|
60
92
|
newMeta[ args.key ] = newValue;
|
|
61
93
|
} );
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
94
|
+
|
|
95
|
+
dispatch( coreDataStore ).editEntityRecord(
|
|
96
|
+
'postType',
|
|
97
|
+
context?.postType,
|
|
98
|
+
context?.postId,
|
|
99
|
+
{
|
|
65
100
|
meta: newMeta,
|
|
66
|
-
}
|
|
101
|
+
}
|
|
102
|
+
);
|
|
67
103
|
},
|
|
68
104
|
canUserEditValue( { select, context, args } ) {
|
|
69
105
|
// Lock editing in query loop.
|
|
@@ -79,14 +115,9 @@ export default {
|
|
|
79
115
|
return false;
|
|
80
116
|
}
|
|
81
117
|
|
|
82
|
-
|
|
118
|
+
const fieldValue = getPostMetaFields( select, context )?.[ args.key ]
|
|
119
|
+
?.value;
|
|
83
120
|
// Empty string or `false` could be a valid value, so we need to check if the field value is undefined.
|
|
84
|
-
const fieldValue = select( coreDataStore ).getEntityRecord(
|
|
85
|
-
'postType',
|
|
86
|
-
postType,
|
|
87
|
-
context?.postId
|
|
88
|
-
)?.meta?.[ args.key ];
|
|
89
|
-
|
|
90
121
|
if ( fieldValue === undefined ) {
|
|
91
122
|
return false;
|
|
92
123
|
}
|
|
@@ -109,32 +140,7 @@ export default {
|
|
|
109
140
|
|
|
110
141
|
return true;
|
|
111
142
|
},
|
|
112
|
-
getFieldsList( {
|
|
113
|
-
|
|
114
|
-
registry.select( coreDataStore )
|
|
115
|
-
);
|
|
116
|
-
const registeredFields = getRegisteredPostMeta( context?.postType );
|
|
117
|
-
const metaFields = getMetadata( registry, context, registeredFields );
|
|
118
|
-
|
|
119
|
-
if ( ! metaFields || ! Object.keys( metaFields ).length ) {
|
|
120
|
-
return null;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return Object.fromEntries(
|
|
124
|
-
Object.entries( metaFields )
|
|
125
|
-
// Remove footnotes or private keys from the list of fields.
|
|
126
|
-
.filter(
|
|
127
|
-
( [ key ] ) =>
|
|
128
|
-
key !== 'footnotes' && key.charAt( 0 ) !== '_'
|
|
129
|
-
)
|
|
130
|
-
// Return object with label and value.
|
|
131
|
-
.map( ( [ key, value ] ) => [
|
|
132
|
-
key,
|
|
133
|
-
{
|
|
134
|
-
label: registeredFields?.[ key ]?.title || key,
|
|
135
|
-
value,
|
|
136
|
-
},
|
|
137
|
-
] )
|
|
138
|
-
);
|
|
143
|
+
getFieldsList( { select, context } ) {
|
|
144
|
+
return getPostMetaFields( select, context );
|
|
139
145
|
},
|
|
140
146
|
};
|
|
@@ -128,11 +128,21 @@ export function EntitiesSavedStatesExtensible( {
|
|
|
128
128
|
aria-describedby={ renderDialog ? dialogDescription : undefined }
|
|
129
129
|
>
|
|
130
130
|
<Flex className="entities-saved-states__panel-header" gap={ 2 }>
|
|
131
|
+
<FlexItem
|
|
132
|
+
isBlock
|
|
133
|
+
as={ Button }
|
|
134
|
+
variant="secondary"
|
|
135
|
+
size="compact"
|
|
136
|
+
onClick={ dismissPanel }
|
|
137
|
+
>
|
|
138
|
+
{ __( 'Cancel' ) }
|
|
139
|
+
</FlexItem>
|
|
131
140
|
<FlexItem
|
|
132
141
|
isBlock
|
|
133
142
|
as={ Button }
|
|
134
143
|
ref={ saveButtonRef }
|
|
135
144
|
variant="primary"
|
|
145
|
+
size="compact"
|
|
136
146
|
disabled={ ! saveEnabled }
|
|
137
147
|
accessibleWhenDisabled
|
|
138
148
|
onClick={ () =>
|
|
@@ -147,14 +157,6 @@ export function EntitiesSavedStatesExtensible( {
|
|
|
147
157
|
>
|
|
148
158
|
{ saveLabel }
|
|
149
159
|
</FlexItem>
|
|
150
|
-
<FlexItem
|
|
151
|
-
isBlock
|
|
152
|
-
as={ Button }
|
|
153
|
-
variant="secondary"
|
|
154
|
-
onClick={ dismissPanel }
|
|
155
|
-
>
|
|
156
|
-
{ __( 'Cancel' ) }
|
|
157
|
-
</FlexItem>
|
|
158
160
|
</Flex>
|
|
159
161
|
|
|
160
162
|
<div className="entities-saved-states__text-prompt">
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
.entities-saved-states__panel-header {
|
|
2
2
|
box-sizing: border-box;
|
|
3
3
|
background: $white;
|
|
4
|
-
padding-left: $grid-unit-
|
|
5
|
-
padding-right: $grid-unit-
|
|
4
|
+
padding-left: $grid-unit-20;
|
|
5
|
+
padding-right: $grid-unit-20;
|
|
6
6
|
height: $header-height;
|
|
7
7
|
border-bottom: $border-width solid $gray-300;
|
|
8
8
|
}
|
|
@@ -98,8 +98,8 @@ function Image( { clientId, alt, url } ) {
|
|
|
98
98
|
animate={ { opacity: 1 } }
|
|
99
99
|
exit={ { opacity: 0, scale: 0 } }
|
|
100
100
|
style={ {
|
|
101
|
-
width: '
|
|
102
|
-
height: '
|
|
101
|
+
width: '32px',
|
|
102
|
+
height: '32px',
|
|
103
103
|
objectFit: 'cover',
|
|
104
104
|
borderRadius: '2px',
|
|
105
105
|
cursor: 'pointer',
|
|
@@ -256,7 +256,7 @@ export default function MaybeUploadMediaPanel() {
|
|
|
256
256
|
<Spinner />
|
|
257
257
|
) : (
|
|
258
258
|
<Button
|
|
259
|
-
|
|
259
|
+
size="compact"
|
|
260
260
|
variant="primary"
|
|
261
261
|
onClick={ uploadImages }
|
|
262
262
|
>
|
|
@@ -28,6 +28,7 @@ import { ActionItem } from '@wordpress/interface';
|
|
|
28
28
|
import { store as editorStore } from '../../store';
|
|
29
29
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
30
30
|
import PostPreviewButton from '../post-preview-button';
|
|
31
|
+
import { unlock } from '../../lock-unlock';
|
|
31
32
|
|
|
32
33
|
export default function PreviewDropdown( { forceIsAutosaveable, disabled } ) {
|
|
33
34
|
const { deviceType, homeUrl, isTemplate, isViewable, showIconLabels } =
|
|
@@ -46,10 +47,12 @@ export default function PreviewDropdown( { forceIsAutosaveable, disabled } ) {
|
|
|
46
47
|
}, [] );
|
|
47
48
|
const { setDeviceType } = useDispatch( editorStore );
|
|
48
49
|
const { __unstableSetEditorMode } = useDispatch( blockEditorStore );
|
|
50
|
+
const { resetZoomLevel } = unlock( useDispatch( blockEditorStore ) );
|
|
49
51
|
|
|
50
52
|
const handleDevicePreviewChange = ( newDeviceType ) => {
|
|
51
53
|
setDeviceType( newDeviceType );
|
|
52
54
|
__unstableSetEditorMode( 'edit' );
|
|
55
|
+
resetZoomLevel();
|
|
53
56
|
};
|
|
54
57
|
|
|
55
58
|
const isMobile = useViewportMatch( 'medium', '<' );
|
|
@@ -188,26 +188,19 @@ export const ExperimentalEditorProvider = withRegistryProvider(
|
|
|
188
188
|
const postContext = {};
|
|
189
189
|
// If it is a template, try to inherit the post type from the slug.
|
|
190
190
|
if ( post.type === 'wp_template' ) {
|
|
191
|
-
if (
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
'|'
|
|
205
|
-
) })(?:-.+)?$`
|
|
206
|
-
);
|
|
207
|
-
if ( match ) {
|
|
208
|
-
postContext.postType = match[ 1 ];
|
|
209
|
-
}
|
|
210
|
-
break;
|
|
191
|
+
if ( post.slug === 'page' ) {
|
|
192
|
+
postContext.postType = 'page';
|
|
193
|
+
} else if ( post.slug === 'single' ) {
|
|
194
|
+
postContext.postType = 'post';
|
|
195
|
+
} else if ( post.slug.split( '-' )[ 0 ] === 'single' ) {
|
|
196
|
+
// If the slug is single-{postType}, infer the post type from the slug.
|
|
197
|
+
const postTypesSlugs =
|
|
198
|
+
postTypes?.map( ( entity ) => entity.slug ) || [];
|
|
199
|
+
const match = post.slug.match(
|
|
200
|
+
`^single-(${ postTypesSlugs.join( '|' ) })(?:-.+)?$`
|
|
201
|
+
);
|
|
202
|
+
if ( match ) {
|
|
203
|
+
postContext.postType = match[ 1 ];
|
|
211
204
|
}
|
|
212
205
|
}
|
|
213
206
|
} else if (
|
|
@@ -7,6 +7,7 @@ import { __ } from '@wordpress/i18n';
|
|
|
7
7
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
8
8
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
9
9
|
import { square as zoomOutIcon } from '@wordpress/icons';
|
|
10
|
+
import { store as preferencesStore } from '@wordpress/preferences';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Internal dependencies
|
|
@@ -14,8 +15,12 @@ import { square as zoomOutIcon } from '@wordpress/icons';
|
|
|
14
15
|
import { unlock } from '../../lock-unlock';
|
|
15
16
|
|
|
16
17
|
const ZoomOutToggle = () => {
|
|
17
|
-
const { isZoomOut } = useSelect( ( select ) => ( {
|
|
18
|
+
const { isZoomOut, showIconLabels } = useSelect( ( select ) => ( {
|
|
18
19
|
isZoomOut: unlock( select( blockEditorStore ) ).isZoomOut(),
|
|
20
|
+
showIconLabels: select( preferencesStore ).get(
|
|
21
|
+
'core',
|
|
22
|
+
'showIconLabels'
|
|
23
|
+
),
|
|
19
24
|
} ) );
|
|
20
25
|
|
|
21
26
|
const { resetZoomLevel, setZoomLevel, __unstableSetEditorMode } = unlock(
|
|
@@ -38,6 +43,7 @@ const ZoomOutToggle = () => {
|
|
|
38
43
|
label={ __( 'Toggle Zoom Out' ) }
|
|
39
44
|
isPressed={ isZoomOut }
|
|
40
45
|
size="compact"
|
|
46
|
+
showTooltip={ ! showIconLabels }
|
|
41
47
|
/>
|
|
42
48
|
);
|
|
43
49
|
};
|
|
@@ -6,7 +6,7 @@ import { privateApis as patternsPrivateApis } from '@wordpress/patterns';
|
|
|
6
6
|
import { createHigherOrderComponent } from '@wordpress/compose';
|
|
7
7
|
import { useBlockEditingMode } from '@wordpress/block-editor';
|
|
8
8
|
import { useSelect } from '@wordpress/data';
|
|
9
|
-
import {
|
|
9
|
+
import { getBlockBindingsSource } from '@wordpress/blocks';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Internal dependencies
|
|
@@ -58,7 +58,6 @@ function ControlsWithStoreSubscription( props ) {
|
|
|
58
58
|
const blockEditingMode = useBlockEditingMode();
|
|
59
59
|
const { hasPatternOverridesSource, isEditingSyncedPattern } = useSelect(
|
|
60
60
|
( select ) => {
|
|
61
|
-
const { getBlockBindingsSource } = unlock( select( blocksStore ) );
|
|
62
61
|
const { getCurrentPostType, getEditedPostAttribute } =
|
|
63
62
|
select( editorStore );
|
|
64
63
|
|
package/src/store/actions.js
CHANGED
|
@@ -12,7 +12,11 @@ import {
|
|
|
12
12
|
import { store as noticesStore } from '@wordpress/notices';
|
|
13
13
|
import { store as coreStore } from '@wordpress/core-data';
|
|
14
14
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
applyFilters,
|
|
17
|
+
applyFiltersAsync,
|
|
18
|
+
doActionAsync,
|
|
19
|
+
} from '@wordpress/hooks';
|
|
16
20
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
17
21
|
import { __ } from '@wordpress/i18n';
|
|
18
22
|
|
|
@@ -184,7 +188,7 @@ export const savePost =
|
|
|
184
188
|
}
|
|
185
189
|
|
|
186
190
|
const previousRecord = select.getCurrentPost();
|
|
187
|
-
|
|
191
|
+
let edits = {
|
|
188
192
|
id: previousRecord.id,
|
|
189
193
|
...registry
|
|
190
194
|
.select( coreStore )
|
|
@@ -199,9 +203,9 @@ export const savePost =
|
|
|
199
203
|
|
|
200
204
|
let error = false;
|
|
201
205
|
try {
|
|
202
|
-
|
|
203
|
-
'editor.
|
|
204
|
-
|
|
206
|
+
edits = await applyFiltersAsync(
|
|
207
|
+
'editor.preSavePost',
|
|
208
|
+
edits,
|
|
205
209
|
options
|
|
206
210
|
);
|
|
207
211
|
} catch ( err ) {
|
|
@@ -236,14 +240,25 @@ export const savePost =
|
|
|
236
240
|
);
|
|
237
241
|
}
|
|
238
242
|
|
|
243
|
+
// Run the hook with legacy unstable name for backward compatibility
|
|
239
244
|
if ( ! error ) {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
+
try {
|
|
246
|
+
await applyFilters(
|
|
247
|
+
'editor.__unstableSavePost',
|
|
248
|
+
Promise.resolve(),
|
|
249
|
+
options
|
|
250
|
+
);
|
|
251
|
+
} catch ( err ) {
|
|
245
252
|
error = err;
|
|
246
|
-
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
if ( ! error ) {
|
|
257
|
+
try {
|
|
258
|
+
await doActionAsync( 'editor.savePost', options );
|
|
259
|
+
} catch ( err ) {
|
|
260
|
+
error = err;
|
|
261
|
+
}
|
|
247
262
|
}
|
|
248
263
|
dispatch( { type: 'REQUEST_POST_UPDATE_FINISH', options } );
|
|
249
264
|
|