You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: changelog.txt
+12-2
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
== Changelog ==
2
2
3
-
= 18.0.0-rc.1 =
4
-
3
+
= 18.0.0 =
5
4
6
5
## Changelog
7
6
@@ -81,6 +80,10 @@
81
80
- Template Parts: Fix typo in translatable string. ([59816](https://github.com/WordPress/gutenberg/pull/59816))
82
81
- Ensure consistent return type in `WP_Navigation_Block_Renderer::Get_markup_for_inner_block()`. ([59820](https://github.com/WordPress/gutenberg/pull/59820))
83
82
- Return early from saving meta data for the navigation without a $post->ID. ([59875](https://github.com/WordPress/gutenberg/pull/59875))
83
+
- Fix root ID calculation when check if block can be transformed. ([60167](https://github.com/WordPress/gutenberg/pull/60167))
84
+
- Featured Image: Fix overlay rendering in the editor. ([60187](https://github.com/WordPress/gutenberg/pull/60187))
- Navigation: Avoid content loss when only specific entity fields are edited. ([60071](https://github.com/WordPress/gutenberg/pull/60071))
84
87
85
88
#### Font Library
86
89
- Avoid auto-removing font families without font faces. ([59910](https://github.com/WordPress/gutenberg/pull/59910))
@@ -90,6 +93,8 @@
90
93
- Polish Google Fonts consent box. ([59631](https://github.com/WordPress/gutenberg/pull/59631))
91
94
- Refactors the upload handler in order to check if files being uploaded are valid font files. ([59648](https://github.com/WordPress/gutenberg/pull/59648))
92
95
- Reset notices when navigating away from the collection. ([59981](https://github.com/WordPress/gutenberg/pull/59981))
96
+
- Activate the fonts coming from the backend and not the data from the frontend. ([60093](https://github.com/WordPress/gutenberg/pull/60093))
97
+
- Install fonts in sequence to work around race condition. ([60180](https://github.com/WordPress/gutenberg/pull/60180))
93
98
94
99
#### Interactivity API
95
100
- Backport fixes from Core. ([59903](https://github.com/WordPress/gutenberg/pull/59903))
@@ -122,6 +127,8 @@
122
127
- Remove filter for same number of settings. ([59590](https://github.com/WordPress/gutenberg/pull/59590))
123
128
- Site editor: Find font families for typography presets crashes editor. ([59806](https://github.com/WordPress/gutenberg/pull/59806))
124
129
- Force root min-height of 100% for backgrounds. ([59809](https://github.com/WordPress/gutenberg/pull/59809))
130
+
- Featured Image: Fix block support selectors after shadow support addition. ([60184](https://github.com/WordPress/gutenberg/pull/60184))
131
+
- Fix list of base theme fonts when a theme variation is applied.. ([59959](https://github.com/WordPress/gutenberg/pull/59959))
125
132
126
133
#### Patterns
127
134
- Add pattern title in create modal in post editor. ([59550](https://github.com/WordPress/gutenberg/pull/59550))
@@ -224,6 +231,7 @@
224
231
- Don't memoize callbacks in 'BlockSettingsDropdown'. ([59397](https://github.com/WordPress/gutenberg/pull/59397))
225
232
- Link dialog: Remove CSS hack. ([59746](https://github.com/WordPress/gutenberg/pull/59746))
226
233
- Pattern Explorer: Remove leftover source filter state handlers. ([60019](https://github.com/WordPress/gutenberg/pull/60019))
234
+
- Fix code formatting in Nav block view file. ([60162](https://github.com/WordPress/gutenberg/pull/60162))
Copy file name to clipboardexpand all lines: docs/explanations/architecture/styles.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ For example:
78
78
79
79
The paragraph declares support for font size in its `block.json`. This means the block will show a UI control for users to tweak its font size, unless it's disabled by the theme (learn more about how themes can disable UI controls in [the `theme.json` reference](https://developer.wordpress.org/block-editor/reference-guides/theme-json-reference/)). The system will also take care of setting up the UI control data (the font size of the block if it has one already assigned, the list of available font sizes to show), and will serialize the block data into HTML markup upon user changes (attach classes and inline styles appropriately).
80
80
81
-
By using the block supports mechanism via `block.json`, the block author is able to create the same experience as before just by writing a couple of lines. Check the tutorials for adding block supports to [static](/docs/how-to-guides/block-tutorial/block-supports-in-static-blocks.md)and [dynamic](/docs/how-to-guides/block-tutorial/block-supports-in-dynamic-blocks.md) blocks.
81
+
By using the block supports mechanism via `block.json`, the block author is able to create the same experience as before just by writing a couple of lines. Check the [block supports api](/docs/reference-guides/block-api/block-supports.md)for adding blocksupports to static or dynamic blocks.
82
82
83
83
Besides the benefit of having to do less work to achieve the same results, there's a few other advantages:
Copy file name to clipboardexpand all lines: docs/getting-started/fundamentals/registration-of-a-block.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ register_block_type(
33
33
);
34
34
```
35
35
36
-
Here is a more complete example, including the `init` hook.
36
+
Here is a more complete example, including the `init` hook.
37
37
38
38
```php
39
39
function minimal_block_ca6eda___register_block() {
@@ -46,7 +46,7 @@ _See the [full block example](https://github.com/WordPress/block-development-exa
46
46
47
47
## Registering a block with JavaScript (client-side)
48
48
49
-
When the block has already been registered on the server, you only need to register the client-side settings in JavaScipt using the [`registerBlockType`](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-blocks/#registerblocktype) method from the `@wordpress/blocks` package. You just need to make sure you use the same block name as defined in the block's `block.json` file. Here's an example:
49
+
When the block has already been registered on the server, you only need to register the client-side settings in JavaScript using the [`registerBlockType`](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-blocks/#registerblocktype) method from the `@wordpress/blocks` package. You just need to make sure you use the same block name as defined in the block's `block.json` file. Here's an example:
Copy file name to clipboardexpand all lines: docs/getting-started/fundamentals/static-dynamic-rendering.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,11 @@ A block's front-end markup can either be dynamically generated server-side upon
6
6
The post <ahref="https://developer.wordpress.org/news/2023/02/27/static-vs-dynamic-blocks-whats-the-difference/">Static vs. dynamic blocks: What’s the difference?</a> provides a great introduction to this topic.
7
7
</div>
8
8
9
-
## Static rendering
9
+
## Static rendering
10
10
11
11
Blocks with "static rendering" produce front-end output that is fixed and stored in the database upon saving. These blocks rely solely on their `save` function to define their [HTML markup](https://developer.wordpress.org/block-editor/getting-started/fundamentals/markup-representation-block/), which remains unchanged unless manually edited in the Block Editor.
12
12
13
-
If a block does not use a dynamic rendering method—meaning it doesn't generate content on the fly via PHP when the page loads—it's considered a "static block."
13
+
If a block does not use a dynamic rendering method—meaning it doesn't generate content on the fly via PHP when the page loads—it's considered a "static block."
14
14
15
15
The diagram below illustrates how static block content is saved in the database and then retrieved and rendered as HTML on the front end.
16
16
@@ -24,7 +24,7 @@ Blocks in WordPress are encapsulated within special comment tags that serve as u
24
24
25
25
<details><summary><strong>View an example of static rendering in the Preformatted block</strong></summary>
26
26
<br/>
27
-
The following <ahref="https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/preformatted/save.js"><code>save</code> function</a> for the <ahreh="https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/preformatted">Preformatted</a> core block looks like this:
27
+
The following <ahref="https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/preformatted/save.js"><code>save</code> function</a> for the <ahref="https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/preformatted">Preformatted</a> core block looks like this:
@@ -160,7 +160,7 @@ On the front end, the `render_callback` is used to dynamically render the markup
160
160
161
161
### HTML representation of dynamic blocks in the database (`save`)
162
162
163
-
For dynamic blocks, the `save` callback function can return just `null`, which tells the editor to save only the block delimiter comment (along with any existing [block attributes](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/)) to the database. These attributes are then passed into the server-side rendering callback, which will determine how to display the block on the front end of your site.
163
+
For dynamic blocks, the `save` callback function can return just `null`, which tells the editor to save only the block delimiter comment (along with any existing [block attributes](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/)) to the database. These attributes are then passed into the server-side rendering callback, which will determine how to display the block on the front end of your site.
164
164
165
165
When `save` is `null`, the Block Editor will skip the [block markup validation process](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#validation), avoiding issues with frequently changing markup.
166
166
@@ -176,4 +176,4 @@ If you are using [InnerBlocks](https://developer.wordpress.org/block-editor/how-
176
176
## Additional resources
177
177
178
178
-[Static vs. dynamic blocks: What’s the difference?](https://developer.wordpress.org/news/2023/02/27/static-vs-dynamic-blocks-whats-the-difference/) | Developer Blog
179
-
-[Block deprecation – a tutorial](https://developer.wordpress.org/news/2023/03/10/block-deprecation-a-tutorial/) | Developer Blog
179
+
-[Block deprecation – a tutorial](https://developer.wordpress.org/news/2023/03/10/block-deprecation-a-tutorial/) | Developer Blog
Copy file name to clipboardexpand all lines: docs/how-to-guides/curating-the-editor-experience/disable-editor-functionality.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
# Disable Editor functionality
2
2
3
-
This page is dedicated to the many ways you can disable specific functionality in the Post Editor and Site Editor that are not covered in other areas of the curation documentation.
3
+
This page is dedicated to the many ways you can disable specific functionality in the Post Editor and Site Editor that are not covered in other areas of the curation documentation.
4
4
5
5
## Restrict block options
6
6
7
-
There might be times when you don’t want access to a block at all to be available for users. To control what’s available in the inserter, you can take two approaches: [an allow list](/docs/reference-guides/filters/block-filters.md#using-an-allow-list) that disables all blocks except those on the list or a [deny list that unregisters specific blocks](/docs/reference-guides/filters/block-filters.md#using-a-deny-list).
7
+
There might be times when you don’t want access to a block at all to be available for users. To control what’s available in the inserter, you can take two approaches: [an allow list](/docs/reference-guides/filters/block-filters.md#using-an-allow-list) that disables all blocks except those on the list or a [deny list that unregisters specific blocks](/docs/reference-guides/filters/block-filters.md#using-a-deny-list).
8
8
9
9
## Disable the Pattern Directory
10
10
11
-
To fully remove patterns bundled with WordPress core from being accessed in the Inserter, the following can be added to your `functions.php` file:
11
+
To fully remove patterns bundled with WordPress core from being accessed in the Inserter, the following can be added to your `functions.php` file:
Some Core blocks are actually [block variations](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-variations/). A great example is the Row and Stack blocks, which are actually variations of the Group block. If you want to disable these "blocks", you actually need to disable the respective variations.
23
23
24
-
Block variations are registered using JavaScript and need to be disabled with JavaScript. The code below will disable the Row variation.
24
+
Block variations are registered using JavaScript and need to be disabled with JavaScript. The code below will disable the Row variation.
There are a few Core blocks that include their own [block styles](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-styles/). An example is the Image block, which includes a block style for rounded images called "Rounded". You many not want your users to round images, or you might prefer to use the border-radius control instead of the block style. Either way, it's easy to disable any unwanted block styles.
50
50
51
-
Unlike block variations, you can register styles in either JavaScript or PHP. If a style was registered in JavaScript, it must be disabled with JavaScript. If registered using PHP, the style can be disabled with either. All Core block styles are registed in JavaScript.
51
+
Unlike block variations, you can register styles in either JavaScript or PHP. If a style was registered in JavaScript, it must be disabled with JavaScript. If registered using PHP, the style can be disabled with either. All Core block styles are registered in JavaScript.
52
52
53
53
So, you would use the following code to disable the "Rounded" block style for the Image block.
54
54
@@ -58,7 +58,7 @@ wp.domReady( () => {
58
58
});
59
59
```
60
60
61
-
This JavaScript should be enqueued much like the block variation example above. Refer to the [block styles](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-styles/) documentation for how to register and unregister styles using PHP.
61
+
This JavaScript should be enqueued much like the block variation example above. Refer to the [block styles](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-styles/) documentation for how to register and unregister styles using PHP.
62
62
63
63
## Disable access to the Template Editor
64
64
@@ -71,7 +71,7 @@ function example_theme_support() {
This code prevents all users from accessing the Code Editor. You could also add [capability](https://wordpress.org/documentation/article/roles-and-capabilities/) checks to disable access for specific users.
89
+
This code prevents all users from accessing the Code Editor. You could also add [capability](https://wordpress.org/documentation/article/roles-and-capabilities/) checks to disable access for specific users.
Copy file name to clipboardexpand all lines: docs/reference-guides/filters/block-filters.md
+18
Original file line number
Diff line number
Diff line change
@@ -283,6 +283,24 @@ wp.hooks.addFilter(
283
283
```
284
284
285
285
286
+
### `editor.postContentBlockTypes`
287
+
288
+
Used to modify the list of blocks that should be enabled even when used inside a locked template. Any block that saves data to a post should be added here. Examples of this are the post featured image block. Which often gets used in templates but should still allow selecting the image even when the template is locked.
0 commit comments