Gutenberg - Version 13.7.1

Version Description

Download this release

Release Info

Developer gutenbergplugin
Plugin Icon 128x128 Gutenberg
Version 13.7.1
Comparing to
See all releases

Code changes from version 13.7.0 to 13.7.1

changelog.txt CHANGED
@@ -1,235 +1,245 @@
1
  == Changelog ==
2
 
3
- = 13.7.0 =
4
 
5
  ## Changelog
6
 
7
- ### Enhancements
8
- - Update the modal design. ([40781](https://github.com/WordPress/gutenberg/pull/40781))
9
- - Themes: Adds text decoration support to post title block. ([42328](https://github.com/WordPress/gutenberg/pull/42328))
10
- - Social Link: Automatically prepend emails with mailto protocol. ([42186](https://github.com/WordPress/gutenberg/pull/42186))
11
- - Add better ARIA labels to toggle buttons in Summary panel. ([42114](https://github.com/WordPress/gutenberg/pull/42114))
12
- - Start with featured image in media placeholder. ([41722](https://github.com/WordPress/gutenberg/pull/41722))
13
-
14
-
15
- #### Components
16
- - ColorPicker: Widen hex input field for mobile. ([42004](https://github.com/WordPress/gutenberg/pull/42004))
17
- - ComboboxControl / FormTokenField: Add flag for larger default size. ([40746](https://github.com/WordPress/gutenberg/pull/40746))
18
- - Try tabs instead of segmented control for switching between solid/gradient in color panels. ([41937](https://github.com/WordPress/gutenberg/pull/41937))
19
-
20
- #### Document Settings
21
- - Make Post Format, Slug and Author fields fill the sidebar. ([42146](https://github.com/WordPress/gutenberg/pull/42146))
22
- - Post Template: Update fallback label. ([42063](https://github.com/WordPress/gutenberg/pull/42063))
23
- - Rewrite URL (Permalink) panel as a popover. ([42033](https://github.com/WordPress/gutenberg/pull/42033))
24
-
25
- #### Full Site Editing
26
- - Expand the templates that can be added - custom taxonomies, specific term, specific category and tag. ([41875](https://github.com/WordPress/gutenberg/pull/41875))
27
- - Expand the templates that can be added - specific pages. ([42138](https://github.com/WordPress/gutenberg/pull/42138))
28
- - Re-architect templates addition. ([42457](https://github.com/WordPress/gutenberg/pull/42457))
29
- - List View: Use heading content for button label text if available. ([41855](https://github.com/WordPress/gutenberg/pull/41855))
30
- - Add New - Custom/General template. ([42127](https://github.com/WordPress/gutenberg/pull/42127))
31
- - Add the 'Apply to inner blocks' option to Block locking ([41876](https://github.com/WordPress/gutenberg/pull/41876))
32
- - Update: Wording on add generic template modal. ([42379](https://github.com/WordPress/gutenberg/pull/42379))
33
-
34
- #### Post Editor
35
- - Add estimated time to read to table of contents in editor. ([41611](https://github.com/WordPress/gutenberg/pull/41611))
36
- - Add month and day as a suggest format to the date format picker. ([42317](https://github.com/WordPress/gutenberg/pull/42317))
37
- - Post Editor: Preload templates post type permissions (REST-API). ([42209](https://github.com/WordPress/gutenberg/pull/42209))
38
-
39
- ### New APIs
40
-
41
- - JS Error Tracking: Allow custom error reporting logic to be called in Error Boundaries via a WP action hook. ([42024](https://github.com/WordPress/gutenberg/pull/42024))
42
-
43
- ### Accessibility
44
-
45
- - Add aria-checked to the selected heading level menu item. ([42273](https://github.com/WordPress/gutenberg/pull/42273))
46
- - Fix tabbing from first or last block in site editor. ([42036](https://github.com/WordPress/gutenberg/pull/42036))
47
- - Navigation block: Only focus submenu trigger on escape key press. ([41986](https://github.com/WordPress/gutenberg/pull/41986))
48
- - Change the BoxControl ARIA role from region to group. ([42094](https://github.com/WordPress/gutenberg/pull/42094))
49
- - Update site editor region labels to match post editor. ([42037](https://github.com/WordPress/gutenberg/pull/42037))
50
-
51
  ### Bug Fixes
52
 
53
- - Enable `shift` in URLPopover component. ([42214](https://github.com/WordPress/gutenberg/pull/42214))
54
- - Multi-selection: Fix select all in Safari. ([42340](https://github.com/WordPress/gutenberg/pull/42340))
55
- - Playwright: Fix relative URLs. ([42361](https://github.com/WordPress/gutenberg/pull/42361))
56
- - Document Settings: Fix tooltip appearing when opening popovers in Summary panel. ([42381](https://github.com/WordPress/gutenberg/pull/42381))
57
- - MediaReplaceFlow: Fix UI showing stale URL by avoiding state duplication. ([42116](https://github.com/WordPress/gutenberg/pull/42116))
58
- - Template Mode: Allow clearing name field while typing. ([42065](https://github.com/WordPress/gutenberg/pull/42065))
59
- - Navigation: Prevent title and href props from being rendered as HTML attributes. ([41833](https://github.com/WordPress/gutenberg/pull/41833))
60
- - Recurse into conditional CSS rules for Editor iframe stylesheets. ([41110](https://github.com/WordPress/gutenberg/pull/41110))
61
-
62
- #### Block Library
63
- - Comment template: Left, center and right alignments. ([41892](https://github.com/WordPress/gutenberg/pull/41892))
64
- - Comments block: Remove stray legacy class from edit. ([42335](https://github.com/WordPress/gutenberg/pull/42335))
65
- - Filter out images with no local id before loading media library. ([42083](https://github.com/WordPress/gutenberg/pull/42083))
66
- - Fix undo trap in Gallery block when transforming from shortcode. ([42001](https://github.com/WordPress/gutenberg/pull/42001))
67
- - Remove sticky posts setting when we inherit the query. ([40656](https://github.com/WordPress/gutenberg/pull/40656))
68
- - Social Links: Set the default protocol to 'https' if not specified. ([42167](https://github.com/WordPress/gutenberg/pull/42167))
69
-
70
- #### Components
71
- - Add missing label to border radius range control. ([42118](https://github.com/WordPress/gutenberg/pull/42118))
72
- - ComboboxControl: Use custom prefix when generating the instanceId. ([42134](https://github.com/WordPress/gutenberg/pull/42134))
73
- - Popover: Pass missing anchor ref to the getAnchorRect callback prop. ([42076](https://github.com/WordPress/gutenberg/pull/42076))
74
- - [Popover]: Fix regression of inbetween inserter in site editor. ([42329](https://github.com/WordPress/gutenberg/pull/42329))
75
-
76
- #### Block Editor
77
- - Fix Link Control 'Open in new tab' option not saving properly on committing link in buttons block. ([42073](https://github.com/WordPress/gutenberg/pull/42073))
78
- - Fix list view drop indicator positioning. ([42353](https://github.com/WordPress/gutenberg/pull/42353))
79
- - Make sure comments keep their location when inside paragraph. ([31374](https://github.com/WordPress/gutenberg/pull/31374))
80
- - Handle cases when getBlockType returns undefined. ([41884](https://github.com/WordPress/gutenberg/pull/41884))
81
-
82
- #### Site Editor
83
- - Allow clearing template name field while typing. ([42149](https://github.com/WordPress/gutenberg/pull/42149))
84
- - Template Parts: Disable block transformations. ([42090](https://github.com/WordPress/gutenberg/pull/42090))
85
- - Update template details browse label. ([42350](https://github.com/WordPress/gutenberg/pull/42350))
86
- - Fix pattern carousel / grid styling regression. ([42194](https://github.com/WordPress/gutenberg/pull/42194))
87
-
88
- #### Global Styles
89
- - Filter block level styles before compiling global stylesheet. ([42207](https://github.com/WordPress/gutenberg/pull/42207))
90
- - Fix link element hover bleeding into button element default styles. ([42072](https://github.com/WordPress/gutenberg/pull/42072))
91
-
92
- #### Post Editor
93
- - Editor: Fix term selector component exports. ([41784](https://github.com/WordPress/gutenberg/pull/41784))
94
- - Post Template: Fix condition checks. ([42038](https://github.com/WordPress/gutenberg/pull/42038))
95
-
96
- #### Build Tooling
97
- - Tests: Ignore test files in `build-types` folder. ([42260](https://github.com/WordPress/gutenberg/pull/42260))
98
- - Fix: IsEditedPostAutosaveable test case. ([42280](https://github.com/WordPress/gutenberg/pull/42280))
99
-
100
- ### Performance
101
- - Work on refactor away from Lodash to reduce build size continued
102
-
103
- ### Documentation
104
- - Add support for @ignore in the docgen tool. ([42198](https://github.com/WordPress/gutenberg/pull/42198))
105
- - Button Component readme : Suggest label in case there is not text. ([40639](https://github.com/WordPress/gutenberg/pull/40639))
106
- - New handbook page for curating the editor experience. ([42022](https://github.com/WordPress/gutenberg/pull/42022))
107
- - Rename Templates page to Block Templates. ([42276](https://github.com/WordPress/gutenberg/pull/42276))
108
- - Gutenberg Data Tutorial 5: Adding a Delete Button. ([40940](https://github.com/WordPress/gutenberg/pull/40940))
109
- - Added new FAQ on disabling caching of theme.json. ([42346](https://github.com/WordPress/gutenberg/pull/42346))
110
- - Update link to sample code in gutenberg-examples. ([42208](https://github.com/WordPress/gutenberg/pull/42208))
111
- - Add @example for getNotices to create example in the handbook. ([42023](https://github.com/WordPress/gutenberg/pull/42023))
112
- - Add examples for all actions/selectors for the @wordpress/notice package. ([42077](https://github.com/WordPress/gutenberg/pull/42077))
113
- - Update versions in WordPress for upcoming 6.0.1 release. ([42161](https://github.com/WordPress/gutenberg/pull/42161))
114
- - Fix code blocks for Block Transforms API. ([42287](https://github.com/WordPress/gutenberg/pull/42287))
115
- - Fix formatting problems with curating handbook page. ([42135](https://github.com/WordPress/gutenberg/pull/42135))
116
- - Fix link to meta box example. ([42293](https://github.com/WordPress/gutenberg/pull/42293))
117
- - Update attributes example: Alter source children. ([41016](https://github.com/WordPress/gutenberg/pull/41016))
118
-
119
- #### npm publishing workflow
120
- - Simplify workflow with GitHub Actions ([42189](https://github.com/WordPress/gutenberg/pull/42189))
121
- - Update details related to npm publishing. ([42364](https://github.com/WordPress/gutenberg/pull/42364))
122
-
123
- ### Experiments
124
- - Add a `WP_Style_Engine_CSS_Declarations` object. ([42043](https://github.com/WordPress/gutenberg/pull/42043))
125
- - Style engine: Rename 'css_var' option property to 'convert_vars_to_classnames'. ([42113](https://github.com/WordPress/gutenberg/pull/42113))
126
- - Style engine: Return declarations in array response. ([42307](https://github.com/WordPress/gutenberg/pull/42307))
127
- - Layout: Use semantic classnames, centralize layout definitions, reduce duplication, and fix blockGap in theme.json. ([40875](https://github.com/WordPress/gutenberg/pull/40875))
128
-
129
- ### Code Quality
130
- - Block Editor: Use optional chaining in 'block-list' component. ([42068](https://github.com/WordPress/gutenberg/pull/42068))
131
- - Blocks: Remove no longer used Block Content Context. ([41395](https://github.com/WordPress/gutenberg/pull/41395))
132
- - Chore: Remove two empty unrequired object destructuring. ([42279](https://github.com/WordPress/gutenberg/pull/42279))
133
- - Fix fix. ([42160](https://github.com/WordPress/gutenberg/pull/42160))
134
- - Fix: Inexistent parameter passed to getBlockIndex on getBlockInsertionPoint. ([42250](https://github.com/WordPress/gutenberg/pull/42250))
135
- - Fix: State type in automaticChangeStatus reducer. ([42251](https://github.com/WordPress/gutenberg/pull/42251))
136
- - Style engine: Add unit test coverage for WP_Style_Engine_CSS_Declarations. ([42306](https://github.com/WordPress/gutenberg/pull/42306))
137
- - Style engine: Rename main public function to reflect functionality. ([42140](https://github.com/WordPress/gutenberg/pull/42140))
138
- - Update: Remove repeated and condition on useElevation. ([42048](https://github.com/WordPress/gutenberg/pull/42048))
139
- - useSelect: Use useDebugValue to better display data in DevTools. ([42225](https://github.com/WordPress/gutenberg/pull/42225))
140
-
141
- #### Migration to Typescript
142
- - Grid: Convert component to TypeScript. ([41923](https://github.com/WordPress/gutenberg/pull/41923))
143
- - HStack: Convert component to TypeScript. ([41580](https://github.com/WordPress/gutenberg/pull/41580))
144
- - RangeControl: Convert component to TypeScript. ([40535](https://github.com/WordPress/gutenberg/pull/40535))
145
- - RangeControl: Convert stories to TypeScript. ([41444](https://github.com/WordPress/gutenberg/pull/41444))
146
- - RangeControl: Convert unit tests to typescript. ([41445](https://github.com/WordPress/gutenberg/pull/41445))
147
- - Scrollable: Convert component to TypeScript. ([42016](https://github.com/WordPress/gutenberg/pull/42016))
148
- - TextHighlight: Convert component to TypeScript. ([41698](https://github.com/WordPress/gutenberg/pull/41698))
149
- - Tip: Covert component to TypeScript. ([42262](https://github.com/WordPress/gutenberg/pull/42262))
150
- - VisuallyHidden: Convert component to TypeScript. ([42220](https://github.com/WordPress/gutenberg/pull/42220))
151
- - Spacer: Complete TypeScript migration of component. ([42013](https://github.com/WordPress/gutenberg/pull/42013))
152
- -
153
- #### Components
154
- - Add eslint to prevent SSR breakage. ([42248](https://github.com/WordPress/gutenberg/pull/42248))
155
- - Fix typos in components changelog. ([42244](https://github.com/WordPress/gutenberg/pull/42244))
156
- - Refactor `ColorPicker` to pass `exhaustive-deps`. ([41294](https://github.com/WordPress/gutenberg/pull/41294))
157
- - Refactor `Navigation` to pass `exhaustive-deps`. ([41612](https://github.com/WordPress/gutenberg/pull/41612))
158
- - Refactor`FocalPointPicker` to pass exhaustive-deps. ([41520](https://github.com/WordPress/gutenberg/pull/41520))
159
-
160
-
161
- #### Block Library
162
- - More Block: Remove duplicate block class. ([42120](https://github.com/WordPress/gutenberg/pull/42120))
163
- - Page Break Block: Remove duplicate block class. ([42121](https://github.com/WordPress/gutenberg/pull/42121))
164
- - Page List Block: Remove duplicate useBlockProps hook. ([42123](https://github.com/WordPress/gutenberg/pull/42123))
165
- - Remove client side variation fallbacks. ([42180](https://github.com/WordPress/gutenberg/pull/42180))
166
- - Site Logo: Remove unnecessary state. ([42042](https://github.com/WordPress/gutenberg/pull/42042))
167
-
168
- ### Tools
169
-
170
- - Automate the cherry-picking process for WordPress and Gutenberg releases. ([40969](https://github.com/WordPress/gutenberg/pull/40969))
171
- - Update the minimum WP version to 5.9. ([41306](https://github.com/WordPress/gutenberg/pull/41306))
172
- - Components: Remove duplicate CHANGELOG titles. ([42334](https://github.com/WordPress/gutenberg/pull/42334))
173
-
174
-
175
- #### Testing
176
- - Fix: Multiple regex in packages/env/lib/config/test/config.js. ([42249](https://github.com/WordPress/gutenberg/pull/42249))
177
- - Migrate Block Mover Test For Playwright. ([42039](https://github.com/WordPress/gutenberg/pull/42039))
178
- - Migrate format API test for playwright. ([42035](https://github.com/WordPress/gutenberg/pull/42035))
179
- - Migrate list block test to Playwright. ([41555](https://github.com/WordPress/gutenberg/pull/41555))
180
- - end-to-end Tests: Migrate Comments block test to Playwright. ([39826](https://github.com/WordPress/gutenberg/pull/39826))
181
- - fix: Update Image block native end-to-end test fixture. ([42050](https://github.com/WordPress/gutenberg/pull/42050))
182
- - SelectControl: Use roles and @testing-library/user-event in unit tests. ([42308](https://github.com/WordPress/gutenberg/pull/42308))
183
-
184
- #### Build Tooling
185
- - Ignore *.d.ts files when running unit tests. ([42304](https://github.com/WordPress/gutenberg/pull/42304))
186
- - Dependency Extraction: Output asset.php files for shared chunks too. ([41002](https://github.com/WordPress/gutenberg/pull/41002))
187
-
188
- #### Create Block
189
- - Added prompt to continue when minimum system requirements not met. ([42151](https://github.com/WordPress/gutenberg/pull/42151))
190
- - More careful prompts to continue when minimum system requirements are not met. ([42254](https://github.com/WordPress/gutenberg/pull/42254))
191
- - Fix regression from `_.size()` refactoring. ([42049](https://github.com/WordPress/gutenberg/pull/42049))
192
-
193
- #### Block Library
194
- - Comments block: Change ID to `core/comments`. ([40506](https://github.com/WordPress/gutenberg/pull/40506))
195
- - Elements: Buttons: Style the cursor for all button elements. ([42102](https://github.com/WordPress/gutenberg/pull/42102))
196
- - Post Comments Form: Fix warning i18n. ([42131](https://github.com/WordPress/gutenberg/pull/42131))
197
- - Use more clear and inclusive language in comments. ([42155](https://github.com/WordPress/gutenberg/pull/42155))
198
-
199
- #### Global Styles
200
- - Add link element `:Hover` interactivity control to global styles UI. ([41976](https://github.com/WordPress/gutenberg/pull/41976))
201
- - Add support for heading elements. ([41981](https://github.com/WordPress/gutenberg/pull/41981))
202
- - Add visited to link element allowed pseudo selector list. ([42096](https://github.com/WordPress/gutenberg/pull/42096))
203
- - Button Elements: Allow element styles in classic themes. ([42012](https://github.com/WordPress/gutenberg/pull/42012))
204
- - Theme.json: Add spacing size presets. ([41527](https://github.com/WordPress/gutenberg/pull/41527))
205
- - Theme.json Schema: Add support for button elements. ([42133](https://github.com/WordPress/gutenberg/pull/42133))
206
-
207
- #### Block Editor
208
- - Rich text: Remove placeholder on composition start. ([41970](https://github.com/WordPress/gutenberg/pull/41970))
209
- - Rich text: Remove space handling (for BUTTON and SUMMARY). ([41977](https://github.com/WordPress/gutenberg/pull/41977))
210
- - Site Editor: Make Code Editor reflect block conversions. ([42081](https://github.com/WordPress/gutenberg/pull/42081))
211
- - Remove the Template panel option from the Preferences modal ([42030](https://github.com/WordPress/gutenberg/pull/42030))
212
- #### Data Layer
213
- - Enable useSelect autocompletion. ([41911](https://github.com/WordPress/gutenberg/pull/41911))
214
- - Update wordpress/data documentation in order to prefer store object instead of store name to access the store. ([41210](https://github.com/WordPress/gutenberg/pull/41210))
215
-
216
- ## First time contributors
217
-
218
- The following PRs were merged by first time contributors:
219
-
220
- - @MarieComet: Button Component readme : Suggest label in case there is not text. ([40639](https://github.com/WordPress/gutenberg/pull/40639))
221
- - @rflw: Update attributes example: Alter source children. ([41016](https://github.com/WordPress/gutenberg/pull/41016))
222
- - @schutzsmith: Theme.json Documentation - Added new FAQ on disabling caching of theme.json. ([42346](https://github.com/WordPress/gutenberg/pull/42346))
223
- - @welenofsky: Update link to sample code in gutenberg-examples. ([42208](https://github.com/WordPress/gutenberg/pull/42208))
224
-
225
-
226
- ## Contributors
227
-
228
- The following contributors merged PRs in this release:
229
-
230
- @aaronrobertshaw @adamziel @afercia @alexstine @andrewserong @annezazu @aristath @bph @c4rl0sbr4v0 @carolinan @chad1008 @ciampo @dcalhoun @draganescu @ellatrix @fullofcaffeine @geriux @getdave @glendaviesnz @gziolo @hz-tyfoon @jameskoster @jorgefilipecosta @jsnajdr @kevin940726 @Mamaduka @MarieComet @mcliwanow @mcsf @mikachan @mirka @ndiego @noisysocks @ntsekouras @ockham @oguzkocer @opr @pavanpatil1 @pooja-muchandikar @ralucaStan @ramonjd @renatho @rflw @ryanwelcher @schutzsmith @scruffian @SiobhyB @stokesman @t-hamano @talldan @torounit @tyxla @vdwijngaert @walbo @welenofsky @youknowriad
231
-
232
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
233
 
234
 
235
  = 13.6.0 =
1
  == Changelog ==
2
 
3
+ = 13.7.1 =
4
 
5
  ## Changelog
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  ### Bug Fixes
8
 
9
+ - Plugin: Compatibility fixes for WP 5.9 and Site Editor ([42549](https://github.com/WordPress/gutenberg/pull/42549))
10
+ - Plugin: Fix PHP fatal error when using WP 5.9. ([42550](https://github.com/WordPress/gutenberg/pull/42550))
11
+
12
+
13
+ = 13.7.0 =
14
+
15
+ ## Changelog
16
+
17
+ ### Enhancements
18
+ - Update the modal design. ([40781](https://github.com/WordPress/gutenberg/pull/40781))
19
+ - Themes: Adds text decoration support to post title block. ([42328](https://github.com/WordPress/gutenberg/pull/42328))
20
+ - Social Link: Automatically prepend emails with mailto protocol. ([42186](https://github.com/WordPress/gutenberg/pull/42186))
21
+ - Add better ARIA labels to toggle buttons in Summary panel. ([42114](https://github.com/WordPress/gutenberg/pull/42114))
22
+ - Start with featured image in media placeholder. ([41722](https://github.com/WordPress/gutenberg/pull/41722))
23
+
24
+
25
+ #### Components
26
+ - ColorPicker: Widen hex input field for mobile. ([42004](https://github.com/WordPress/gutenberg/pull/42004))
27
+ - ComboboxControl / FormTokenField: Add flag for larger default size. ([40746](https://github.com/WordPress/gutenberg/pull/40746))
28
+ - Try tabs instead of segmented control for switching between solid/gradient in color panels. ([41937](https://github.com/WordPress/gutenberg/pull/41937))
29
+
30
+ #### Document Settings
31
+ - Make Post Format, Slug and Author fields fill the sidebar. ([42146](https://github.com/WordPress/gutenberg/pull/42146))
32
+ - Post Template: Update fallback label. ([42063](https://github.com/WordPress/gutenberg/pull/42063))
33
+ - Rewrite URL (Permalink) panel as a popover. ([42033](https://github.com/WordPress/gutenberg/pull/42033))
34
+
35
+ #### Full Site Editing
36
+ - Expand the templates that can be added - custom taxonomies, specific term, specific category and tag. ([41875](https://github.com/WordPress/gutenberg/pull/41875))
37
+ - Expand the templates that can be added - specific pages. ([42138](https://github.com/WordPress/gutenberg/pull/42138))
38
+ - Re-architect templates addition. ([42457](https://github.com/WordPress/gutenberg/pull/42457))
39
+ - List View: Use heading content for button label text if available. ([41855](https://github.com/WordPress/gutenberg/pull/41855))
40
+ - Add New - Custom/General template. ([42127](https://github.com/WordPress/gutenberg/pull/42127))
41
+ - Add the 'Apply to inner blocks' option to Block locking ([41876](https://github.com/WordPress/gutenberg/pull/41876))
42
+ - Update: Wording on add generic template modal. ([42379](https://github.com/WordPress/gutenberg/pull/42379))
43
+
44
+ #### Post Editor
45
+ - Add estimated time to read to table of contents in editor. ([41611](https://github.com/WordPress/gutenberg/pull/41611))
46
+ - Add month and day as a suggest format to the date format picker. ([42317](https://github.com/WordPress/gutenberg/pull/42317))
47
+ - Post Editor: Preload templates post type permissions (REST-API). ([42209](https://github.com/WordPress/gutenberg/pull/42209))
48
+
49
+ ### New APIs
50
+
51
+ - JS Error Tracking: Allow custom error reporting logic to be called in Error Boundaries via a WP action hook. ([42024](https://github.com/WordPress/gutenberg/pull/42024))
52
+
53
+ ### Accessibility
54
+
55
+ - Add aria-checked to the selected heading level menu item. ([42273](https://github.com/WordPress/gutenberg/pull/42273))
56
+ - Fix tabbing from first or last block in site editor. ([42036](https://github.com/WordPress/gutenberg/pull/42036))
57
+ - Navigation block: Only focus submenu trigger on escape key press. ([41986](https://github.com/WordPress/gutenberg/pull/41986))
58
+ - Change the BoxControl ARIA role from region to group. ([42094](https://github.com/WordPress/gutenberg/pull/42094))
59
+ - Update site editor region labels to match post editor. ([42037](https://github.com/WordPress/gutenberg/pull/42037))
60
+
61
+ ### Bug Fixes
62
+
63
+ - Enable `shift` in URLPopover component. ([42214](https://github.com/WordPress/gutenberg/pull/42214))
64
+ - Multi-selection: Fix select all in Safari. ([42340](https://github.com/WordPress/gutenberg/pull/42340))
65
+ - Playwright: Fix relative URLs. ([42361](https://github.com/WordPress/gutenberg/pull/42361))
66
+ - Document Settings: Fix tooltip appearing when opening popovers in Summary panel. ([42381](https://github.com/WordPress/gutenberg/pull/42381))
67
+ - MediaReplaceFlow: Fix UI showing stale URL by avoiding state duplication. ([42116](https://github.com/WordPress/gutenberg/pull/42116))
68
+ - Template Mode: Allow clearing name field while typing. ([42065](https://github.com/WordPress/gutenberg/pull/42065))
69
+ - Navigation: Prevent title and href props from being rendered as HTML attributes. ([41833](https://github.com/WordPress/gutenberg/pull/41833))
70
+ - Recurse into conditional CSS rules for Editor iframe stylesheets. ([41110](https://github.com/WordPress/gutenberg/pull/41110))
71
+
72
+ #### Block Library
73
+ - Comment template: Left, center and right alignments. ([41892](https://github.com/WordPress/gutenberg/pull/41892))
74
+ - Comments block: Remove stray legacy class from edit. ([42335](https://github.com/WordPress/gutenberg/pull/42335))
75
+ - Filter out images with no local id before loading media library. ([42083](https://github.com/WordPress/gutenberg/pull/42083))
76
+ - Fix undo trap in Gallery block when transforming from shortcode. ([42001](https://github.com/WordPress/gutenberg/pull/42001))
77
+ - Remove sticky posts setting when we inherit the query. ([40656](https://github.com/WordPress/gutenberg/pull/40656))
78
+ - Social Links: Set the default protocol to 'https' if not specified. ([42167](https://github.com/WordPress/gutenberg/pull/42167))
79
+
80
+ #### Components
81
+ - Add missing label to border radius range control. ([42118](https://github.com/WordPress/gutenberg/pull/42118))
82
+ - ComboboxControl: Use custom prefix when generating the instanceId. ([42134](https://github.com/WordPress/gutenberg/pull/42134))
83
+ - Popover: Pass missing anchor ref to the getAnchorRect callback prop. ([42076](https://github.com/WordPress/gutenberg/pull/42076))
84
+ - [Popover]: Fix regression of inbetween inserter in site editor. ([42329](https://github.com/WordPress/gutenberg/pull/42329))
85
+
86
+ #### Block Editor
87
+ - Fix Link Control 'Open in new tab' option not saving properly on committing link in buttons block. ([42073](https://github.com/WordPress/gutenberg/pull/42073))
88
+ - Fix list view drop indicator positioning. ([42353](https://github.com/WordPress/gutenberg/pull/42353))
89
+ - Make sure comments keep their location when inside paragraph. ([31374](https://github.com/WordPress/gutenberg/pull/31374))
90
+ - Handle cases when getBlockType returns undefined. ([41884](https://github.com/WordPress/gutenberg/pull/41884))
91
+
92
+ #### Site Editor
93
+ - Allow clearing template name field while typing. ([42149](https://github.com/WordPress/gutenberg/pull/42149))
94
+ - Template Parts: Disable block transformations. ([42090](https://github.com/WordPress/gutenberg/pull/42090))
95
+ - Update template details browse label. ([42350](https://github.com/WordPress/gutenberg/pull/42350))
96
+ - Fix pattern carousel / grid styling regression. ([42194](https://github.com/WordPress/gutenberg/pull/42194))
97
+
98
+ #### Global Styles
99
+ - Filter block level styles before compiling global stylesheet. ([42207](https://github.com/WordPress/gutenberg/pull/42207))
100
+ - Fix link element hover bleeding into button element default styles. ([42072](https://github.com/WordPress/gutenberg/pull/42072))
101
+
102
+ #### Post Editor
103
+ - Editor: Fix term selector component exports. ([41784](https://github.com/WordPress/gutenberg/pull/41784))
104
+ - Post Template: Fix condition checks. ([42038](https://github.com/WordPress/gutenberg/pull/42038))
105
+
106
+ #### Build Tooling
107
+ - Tests: Ignore test files in `build-types` folder. ([42260](https://github.com/WordPress/gutenberg/pull/42260))
108
+ - Fix: IsEditedPostAutosaveable test case. ([42280](https://github.com/WordPress/gutenberg/pull/42280))
109
+
110
+ ### Performance
111
+ - Work on refactor away from Lodash to reduce build size continued
112
+
113
+ ### Documentation
114
+ - Add support for @ignore in the docgen tool. ([42198](https://github.com/WordPress/gutenberg/pull/42198))
115
+ - Button Component readme : Suggest label in case there is not text. ([40639](https://github.com/WordPress/gutenberg/pull/40639))
116
+ - New handbook page for curating the editor experience. ([42022](https://github.com/WordPress/gutenberg/pull/42022))
117
+ - Rename Templates page to Block Templates. ([42276](https://github.com/WordPress/gutenberg/pull/42276))
118
+ - Gutenberg Data Tutorial 5: Adding a Delete Button. ([40940](https://github.com/WordPress/gutenberg/pull/40940))
119
+ - Added new FAQ on disabling caching of theme.json. ([42346](https://github.com/WordPress/gutenberg/pull/42346))
120
+ - Update link to sample code in gutenberg-examples. ([42208](https://github.com/WordPress/gutenberg/pull/42208))
121
+ - Add @example for getNotices to create example in the handbook. ([42023](https://github.com/WordPress/gutenberg/pull/42023))
122
+ - Add examples for all actions/selectors for the @wordpress/notice package. ([42077](https://github.com/WordPress/gutenberg/pull/42077))
123
+ - Update versions in WordPress for upcoming 6.0.1 release. ([42161](https://github.com/WordPress/gutenberg/pull/42161))
124
+ - Fix code blocks for Block Transforms API. ([42287](https://github.com/WordPress/gutenberg/pull/42287))
125
+ - Fix formatting problems with curating handbook page. ([42135](https://github.com/WordPress/gutenberg/pull/42135))
126
+ - Fix link to meta box example. ([42293](https://github.com/WordPress/gutenberg/pull/42293))
127
+ - Update attributes example: Alter source children. ([41016](https://github.com/WordPress/gutenberg/pull/41016))
128
+
129
+ #### npm publishing workflow
130
+ - Simplify workflow with GitHub Actions ([42189](https://github.com/WordPress/gutenberg/pull/42189))
131
+ - Update details related to npm publishing. ([42364](https://github.com/WordPress/gutenberg/pull/42364))
132
+
133
+ ### Experiments
134
+ - Add a `WP_Style_Engine_CSS_Declarations` object. ([42043](https://github.com/WordPress/gutenberg/pull/42043))
135
+ - Style engine: Rename 'css_var' option property to 'convert_vars_to_classnames'. ([42113](https://github.com/WordPress/gutenberg/pull/42113))
136
+ - Style engine: Return declarations in array response. ([42307](https://github.com/WordPress/gutenberg/pull/42307))
137
+ - Layout: Use semantic classnames, centralize layout definitions, reduce duplication, and fix blockGap in theme.json. ([40875](https://github.com/WordPress/gutenberg/pull/40875))
138
+
139
+ ### Code Quality
140
+ - Block Editor: Use optional chaining in 'block-list' component. ([42068](https://github.com/WordPress/gutenberg/pull/42068))
141
+ - Blocks: Remove no longer used Block Content Context. ([41395](https://github.com/WordPress/gutenberg/pull/41395))
142
+ - Chore: Remove two empty unrequired object destructuring. ([42279](https://github.com/WordPress/gutenberg/pull/42279))
143
+ - Fix fix. ([42160](https://github.com/WordPress/gutenberg/pull/42160))
144
+ - Fix: Inexistent parameter passed to getBlockIndex on getBlockInsertionPoint. ([42250](https://github.com/WordPress/gutenberg/pull/42250))
145
+ - Fix: State type in automaticChangeStatus reducer. ([42251](https://github.com/WordPress/gutenberg/pull/42251))
146
+ - Style engine: Add unit test coverage for WP_Style_Engine_CSS_Declarations. ([42306](https://github.com/WordPress/gutenberg/pull/42306))
147
+ - Style engine: Rename main public function to reflect functionality. ([42140](https://github.com/WordPress/gutenberg/pull/42140))
148
+ - Update: Remove repeated and condition on useElevation. ([42048](https://github.com/WordPress/gutenberg/pull/42048))
149
+ - useSelect: Use useDebugValue to better display data in DevTools. ([42225](https://github.com/WordPress/gutenberg/pull/42225))
150
+
151
+ #### Migration to Typescript
152
+ - Grid: Convert component to TypeScript. ([41923](https://github.com/WordPress/gutenberg/pull/41923))
153
+ - HStack: Convert component to TypeScript. ([41580](https://github.com/WordPress/gutenberg/pull/41580))
154
+ - RangeControl: Convert component to TypeScript. ([40535](https://github.com/WordPress/gutenberg/pull/40535))
155
+ - RangeControl: Convert stories to TypeScript. ([41444](https://github.com/WordPress/gutenberg/pull/41444))
156
+ - RangeControl: Convert unit tests to typescript. ([41445](https://github.com/WordPress/gutenberg/pull/41445))
157
+ - Scrollable: Convert component to TypeScript. ([42016](https://github.com/WordPress/gutenberg/pull/42016))
158
+ - TextHighlight: Convert component to TypeScript. ([41698](https://github.com/WordPress/gutenberg/pull/41698))
159
+ - Tip: Covert component to TypeScript. ([42262](https://github.com/WordPress/gutenberg/pull/42262))
160
+ - VisuallyHidden: Convert component to TypeScript. ([42220](https://github.com/WordPress/gutenberg/pull/42220))
161
+ - Spacer: Complete TypeScript migration of component. ([42013](https://github.com/WordPress/gutenberg/pull/42013))
162
+ -
163
+ #### Components
164
+ - Add eslint to prevent SSR breakage. ([42248](https://github.com/WordPress/gutenberg/pull/42248))
165
+ - Fix typos in components changelog. ([42244](https://github.com/WordPress/gutenberg/pull/42244))
166
+ - Refactor `ColorPicker` to pass `exhaustive-deps`. ([41294](https://github.com/WordPress/gutenberg/pull/41294))
167
+ - Refactor `Navigation` to pass `exhaustive-deps`. ([41612](https://github.com/WordPress/gutenberg/pull/41612))
168
+ - Refactor`FocalPointPicker` to pass exhaustive-deps. ([41520](https://github.com/WordPress/gutenberg/pull/41520))
169
+
170
+
171
+ #### Block Library
172
+ - More Block: Remove duplicate block class. ([42120](https://github.com/WordPress/gutenberg/pull/42120))
173
+ - Page Break Block: Remove duplicate block class. ([42121](https://github.com/WordPress/gutenberg/pull/42121))
174
+ - Page List Block: Remove duplicate useBlockProps hook. ([42123](https://github.com/WordPress/gutenberg/pull/42123))
175
+ - Remove client side variation fallbacks. ([42180](https://github.com/WordPress/gutenberg/pull/42180))
176
+ - Site Logo: Remove unnecessary state. ([42042](https://github.com/WordPress/gutenberg/pull/42042))
177
+
178
+ ### Tools
179
+
180
+ - Automate the cherry-picking process for WordPress and Gutenberg releases. ([40969](https://github.com/WordPress/gutenberg/pull/40969))
181
+ - Update the minimum WP version to 5.9. ([41306](https://github.com/WordPress/gutenberg/pull/41306))
182
+ - Components: Remove duplicate CHANGELOG titles. ([42334](https://github.com/WordPress/gutenberg/pull/42334))
183
+
184
+
185
+ #### Testing
186
+ - Fix: Multiple regex in packages/env/lib/config/test/config.js. ([42249](https://github.com/WordPress/gutenberg/pull/42249))
187
+ - Migrate Block Mover Test For Playwright. ([42039](https://github.com/WordPress/gutenberg/pull/42039))
188
+ - Migrate format API test for playwright. ([42035](https://github.com/WordPress/gutenberg/pull/42035))
189
+ - Migrate list block test to Playwright. ([41555](https://github.com/WordPress/gutenberg/pull/41555))
190
+ - end-to-end Tests: Migrate Comments block test to Playwright. ([39826](https://github.com/WordPress/gutenberg/pull/39826))
191
+ - fix: Update Image block native end-to-end test fixture. ([42050](https://github.com/WordPress/gutenberg/pull/42050))
192
+ - SelectControl: Use roles and @testing-library/user-event in unit tests. ([42308](https://github.com/WordPress/gutenberg/pull/42308))
193
+
194
+ #### Build Tooling
195
+ - Ignore *.d.ts files when running unit tests. ([42304](https://github.com/WordPress/gutenberg/pull/42304))
196
+ - Dependency Extraction: Output asset.php files for shared chunks too. ([41002](https://github.com/WordPress/gutenberg/pull/41002))
197
+
198
+ #### Create Block
199
+ - Added prompt to continue when minimum system requirements not met. ([42151](https://github.com/WordPress/gutenberg/pull/42151))
200
+ - More careful prompts to continue when minimum system requirements are not met. ([42254](https://github.com/WordPress/gutenberg/pull/42254))
201
+ - Fix regression from `_.size()` refactoring. ([42049](https://github.com/WordPress/gutenberg/pull/42049))
202
+
203
+ #### Block Library
204
+ - Comments block: Change ID to `core/comments`. ([40506](https://github.com/WordPress/gutenberg/pull/40506))
205
+ - Elements: Buttons: Style the cursor for all button elements. ([42102](https://github.com/WordPress/gutenberg/pull/42102))
206
+ - Post Comments Form: Fix warning i18n. ([42131](https://github.com/WordPress/gutenberg/pull/42131))
207
+ - Use more clear and inclusive language in comments. ([42155](https://github.com/WordPress/gutenberg/pull/42155))
208
+
209
+ #### Global Styles
210
+ - Add link element `:Hover` interactivity control to global styles UI. ([41976](https://github.com/WordPress/gutenberg/pull/41976))
211
+ - Add support for heading elements. ([41981](https://github.com/WordPress/gutenberg/pull/41981))
212
+ - Add visited to link element allowed pseudo selector list. ([42096](https://github.com/WordPress/gutenberg/pull/42096))
213
+ - Button Elements: Allow element styles in classic themes. ([42012](https://github.com/WordPress/gutenberg/pull/42012))
214
+ - Theme.json: Add spacing size presets. ([41527](https://github.com/WordPress/gutenberg/pull/41527))
215
+ - Theme.json Schema: Add support for button elements. ([42133](https://github.com/WordPress/gutenberg/pull/42133))
216
+
217
+ #### Block Editor
218
+ - Rich text: Remove placeholder on composition start. ([41970](https://github.com/WordPress/gutenberg/pull/41970))
219
+ - Rich text: Remove space handling (for BUTTON and SUMMARY). ([41977](https://github.com/WordPress/gutenberg/pull/41977))
220
+ - Site Editor: Make Code Editor reflect block conversions. ([42081](https://github.com/WordPress/gutenberg/pull/42081))
221
+ - Remove the Template panel option from the Preferences modal ([42030](https://github.com/WordPress/gutenberg/pull/42030))
222
+ #### Data Layer
223
+ - Enable useSelect autocompletion. ([41911](https://github.com/WordPress/gutenberg/pull/41911))
224
+ - Update wordpress/data documentation in order to prefer store object instead of store name to access the store. ([41210](https://github.com/WordPress/gutenberg/pull/41210))
225
+
226
+ ## First time contributors
227
+
228
+ The following PRs were merged by first time contributors:
229
+
230
+ - @MarieComet: Button Component readme : Suggest label in case there is not text. ([40639](https://github.com/WordPress/gutenberg/pull/40639))
231
+ - @rflw: Update attributes example: Alter source children. ([41016](https://github.com/WordPress/gutenberg/pull/41016))
232
+ - @schutzsmith: Theme.json Documentation - Added new FAQ on disabling caching of theme.json. ([42346](https://github.com/WordPress/gutenberg/pull/42346))
233
+ - @welenofsky: Update link to sample code in gutenberg-examples. ([42208](https://github.com/WordPress/gutenberg/pull/42208))
234
+
235
+
236
+ ## Contributors
237
+
238
+ The following contributors merged PRs in this release:
239
+
240
+ @aaronrobertshaw @adamziel @afercia @alexstine @andrewserong @annezazu @aristath @bph @c4rl0sbr4v0 @carolinan @chad1008 @ciampo @dcalhoun @draganescu @ellatrix @fullofcaffeine @geriux @getdave @glendaviesnz @gziolo @hz-tyfoon @jameskoster @jorgefilipecosta @jsnajdr @kevin940726 @Mamaduka @MarieComet @mcliwanow @mcsf @mikachan @mirka @ndiego @noisysocks @ntsekouras @ockham @oguzkocer @opr @pavanpatil1 @pooja-muchandikar @ralucaStan @ramonjd @renatho @rflw @ryanwelcher @schutzsmith @scruffian @SiobhyB @stokesman @t-hamano @talldan @torounit @tyxla @vdwijngaert @walbo @welenofsky @youknowriad
241
+
242
+
243
 
244
 
245
  = 13.6.0 =
gutenberg.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Printing since 1440. This is the development plugin for the new block editor in core.
6
  * Requires at least: 5.9
7
  * Requires PHP: 5.6
8
- * Version: 13.7.0
9
  * Author: Gutenberg Team
10
  * Text Domain: gutenberg
11
  *
@@ -13,8 +13,8 @@
13
  */
14
 
15
  ### BEGIN AUTO-GENERATED DEFINES
16
- define( 'GUTENBERG_VERSION', '13.7.0' );
17
- define( 'GUTENBERG_GIT_COMMIT', '42dba84bbcf46af4e8f1f864ac304abbfacdcef3' );
18
  ### END AUTO-GENERATED DEFINES
19
 
20
  gutenberg_pre_init();
5
  * Description: Printing since 1440. This is the development plugin for the new block editor in core.
6
  * Requires at least: 5.9
7
  * Requires PHP: 5.6
8
+ * Version: 13.7.1
9
  * Author: Gutenberg Team
10
  * Text Domain: gutenberg
11
  *
13
  */
14
 
15
  ### BEGIN AUTO-GENERATED DEFINES
16
+ define( 'GUTENBERG_VERSION', '13.7.1' );
17
+ define( 'GUTENBERG_GIT_COMMIT', '17588f9a1469ceaa1eb52fa5d3574e899ac99697' );
18
  ### END AUTO-GENERATED DEFINES
19
 
20
  gutenberg_pre_init();
lib/compat/wordpress-6.0/block-patterns.php CHANGED
@@ -5,42 +5,44 @@
5
  * @package gutenberg
6
  */
7
 
8
- /**
9
- * Registers patterns from Pattern Directory provided by a theme's
10
- * `theme.json` file.
11
- */
12
- function gutenberg_register_remote_theme_patterns() {
13
- if ( ! get_theme_support( 'core-block-patterns' ) ) {
14
- return;
15
- }
 
16
 
17
- if ( ! apply_filters( 'should_load_remote_block_patterns', true ) ) {
18
- return;
19
- }
20
 
21
- if ( ! WP_Theme_JSON_Resolver_Gutenberg::theme_has_support() ) {
22
- return;
23
- }
24
 
25
- $pattern_settings = WP_Theme_JSON_Resolver_Gutenberg::get_theme_data()->get_patterns();
26
- if ( empty( $pattern_settings ) ) {
27
- return;
28
- }
29
 
30
- $request = new WP_REST_Request( 'GET', '/wp/v2/pattern-directory/patterns' );
31
- $request['slug'] = implode( ',', $pattern_settings );
32
- $response = rest_do_request( $request );
33
- if ( $response->is_error() ) {
34
- return;
35
- }
36
- $patterns = $response->get_data();
37
- $patterns_registry = WP_Block_Patterns_Registry::get_instance();
38
- foreach ( $patterns as $pattern ) {
39
- $pattern_name = sanitize_title( $pattern['title'] );
40
- // Some patterns might be already registered as core patterns with the `core` prefix.
41
- $is_registered = $patterns_registry->is_registered( $pattern_name ) || $patterns_registry->is_registered( "core/$pattern_name" );
42
- if ( ! $is_registered ) {
43
- register_block_pattern( $pattern_name, (array) $pattern );
 
44
  }
45
  }
46
  }
5
  * @package gutenberg
6
  */
7
 
8
+ if ( ! function_exists( '_register_remote_theme_patterns' ) ) {
9
+ /**
10
+ * Registers patterns from Pattern Directory provided by a theme's
11
+ * `theme.json` file.
12
+ */
13
+ function _register_remote_theme_patterns() {
14
+ if ( ! get_theme_support( 'core-block-patterns' ) ) {
15
+ return;
16
+ }
17
 
18
+ if ( ! apply_filters( 'should_load_remote_block_patterns', true ) ) {
19
+ return;
20
+ }
21
 
22
+ if ( ! WP_Theme_JSON_Resolver_Gutenberg::theme_has_support() ) {
23
+ return;
24
+ }
25
 
26
+ $pattern_settings = WP_Theme_JSON_Resolver_Gutenberg::get_theme_data()->get_patterns();
27
+ if ( empty( $pattern_settings ) ) {
28
+ return;
29
+ }
30
 
31
+ $request = new WP_REST_Request( 'GET', '/wp/v2/pattern-directory/patterns' );
32
+ $request['slug'] = $pattern_settings;
33
+ $response = rest_do_request( $request );
34
+ if ( $response->is_error() ) {
35
+ return;
36
+ }
37
+ $patterns = $response->get_data();
38
+ $patterns_registry = WP_Block_Patterns_Registry::get_instance();
39
+ foreach ( $patterns as $pattern ) {
40
+ $pattern_name = sanitize_title( $pattern['title'] );
41
+ // Some patterns might be already registered as core patterns with the `core` prefix.
42
+ $is_registered = $patterns_registry->is_registered( $pattern_name ) || $patterns_registry->is_registered( "core/$pattern_name" );
43
+ if ( ! $is_registered ) {
44
+ register_block_pattern( $pattern_name, (array) $pattern );
45
+ }
46
  }
47
  }
48
  }
lib/compat/wordpress-6.0/block-template.php DELETED
@@ -1,38 +0,0 @@
1
- <?php
2
- /**
3
- * Block template loader functions.
4
- *
5
- * @package WordPress
6
- */
7
-
8
- /**
9
- * Return the correct template for the site's home page.
10
- *
11
- * @access private
12
- * @since 6.0.0
13
- *
14
- * @return array|null A template object, or null if none could be found
15
- */
16
- function gutenberg_resolve_home_template() {
17
- $show_on_front = get_option( 'show_on_front' );
18
- $front_page_id = get_option( 'page_on_front' );
19
-
20
- if ( 'page' === $show_on_front && $front_page_id ) {
21
- return array(
22
- 'postType' => 'page',
23
- 'postId' => $front_page_id,
24
- );
25
- }
26
-
27
- $hierarchy = array( 'front-page', 'home', 'index' );
28
- $template = gutenberg_resolve_template( 'home', $hierarchy, '' );
29
-
30
- if ( ! $template ) {
31
- return null;
32
- }
33
-
34
- return array(
35
- 'postType' => 'wp_template',
36
- 'postId' => $template->id,
37
- );
38
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/compat/wordpress-6.0/site-editor.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Compatibility fixes for WP 5.9 and Site Editor.
4
+ *
5
+ * It can be removed after the minimum required WP version is 6.0
6
+ *
7
+ * @package WordPress
8
+ */
9
+
10
+ /**
11
+ * Return the correct template for the site's home page.
12
+ *
13
+ * @access private
14
+ * @since 6.0.0
15
+ *
16
+ * @return array|null A template object, or null if none could be found
17
+ */
18
+ function gutenberg_resolve_home_template() {
19
+ $show_on_front = get_option( 'show_on_front' );
20
+ $front_page_id = get_option( 'page_on_front' );
21
+
22
+ if ( 'page' === $show_on_front && $front_page_id ) {
23
+ return array(
24
+ 'postType' => 'page',
25
+ 'postId' => $front_page_id,
26
+ );
27
+ }
28
+
29
+ $hierarchy = array( 'front-page', 'home', 'index' );
30
+ $template = resolve_block_template( 'home', $hierarchy, '' );
31
+
32
+ if ( ! $template ) {
33
+ return null;
34
+ }
35
+
36
+ return array(
37
+ 'postType' => 'wp_template',
38
+ 'postId' => $template->id,
39
+ );
40
+ }
41
+
42
+ /**
43
+ * Do a server-side redirection if missing `postType` and `postId`
44
+ * query args when visiting site editor.
45
+ *
46
+ * Note: This is a backward compatibility redirect for WP 5.9.
47
+ *
48
+ * @return void
49
+ */
50
+ function gutenberg_site_editor_maybe_redirect() {
51
+ // Skip redirection for WP 6.0 and later.
52
+ if ( function_exists( '_resolve_home_block_template' ) ) {
53
+ return;
54
+ }
55
+
56
+ // Check theme support. The action runs before checks in the Site Editor.
57
+ if ( ! wp_is_block_theme() ) {
58
+ return;
59
+ }
60
+
61
+ if ( empty( $_GET['postType'] ) && empty( $_GET['postId'] ) ) {
62
+ $template = gutenberg_resolve_home_template();
63
+ if ( ! empty( $_GET['styles'] ) ) {
64
+ $template['styles'] = sanitize_key( $_GET['styles'] );
65
+ }
66
+
67
+ $redirect_url = add_query_arg(
68
+ $template,
69
+ admin_url( 'site-editor.php' )
70
+ );
71
+ wp_safe_redirect( $redirect_url );
72
+ exit;
73
+ }
74
+ }
75
+ add_action( 'load-site-editor.php', 'gutenberg_site_editor_maybe_redirect' );
76
+
77
+ /**
78
+ * Add home template settings for WP 5.9.
79
+ *
80
+ * @param array $settings Existing block editor settings.
81
+ * @param WP_Block_Editor_Context $context The current block editor context.
82
+ * @return array
83
+ */
84
+ function gutenberg_site_editor_homepage_setting( $settings, $context ) {
85
+ if ( isset( $context->post ) ) {
86
+ return $settings;
87
+ }
88
+
89
+ if ( ! isset( $settings['__unstableHomeTemplate'] ) ) {
90
+ $settings['__unstableHomeTemplate'] = gutenberg_resolve_home_template();
91
+ }
92
+
93
+ return $settings;
94
+ }
95
+ add_filter( 'block_editor_settings_all', 'gutenberg_site_editor_homepage_setting', 10, 2 );
lib/load.php CHANGED
@@ -70,7 +70,7 @@ require __DIR__ . '/compat/wordpress-6.0/functions.php';
70
  require __DIR__ . '/compat/wordpress-6.0/class-wp-theme-json-6-0.php';
71
  require __DIR__ . '/compat/wordpress-6.0/class-wp-theme-json-resolver-6-0.php';
72
  require __DIR__ . '/compat/wordpress-6.0/block-patterns.php';
73
- require __DIR__ . '/compat/wordpress-6.0/block-template.php';
74
  require __DIR__ . '/compat/wordpress-6.0/edit-form-blocks.php';
75
  require __DIR__ . '/compat/wordpress-6.0/block-patterns-update.php';
76
  require __DIR__ . '/compat/wordpress-6.0/client-assets.php';
70
  require __DIR__ . '/compat/wordpress-6.0/class-wp-theme-json-6-0.php';
71
  require __DIR__ . '/compat/wordpress-6.0/class-wp-theme-json-resolver-6-0.php';
72
  require __DIR__ . '/compat/wordpress-6.0/block-patterns.php';
73
+ require __DIR__ . '/compat/wordpress-6.0/site-editor.php';
74
  require __DIR__ . '/compat/wordpress-6.0/edit-form-blocks.php';
75
  require __DIR__ . '/compat/wordpress-6.0/block-patterns-update.php';
76
  require __DIR__ . '/compat/wordpress-6.0/client-assets.php';
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === Gutenberg ===
2
  Contributors: matveb, joen, karmatosed
3
  Tested up to: 6.0
4
- Stable tag: 13.6.0
5
  License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
 
1
  === Gutenberg ===
2
  Contributors: matveb, joen, karmatosed
3
  Tested up to: 6.0
4
+ Stable tag: 13.7.0
5
  License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7