Skip to content

Commit 2cd3450

Browse files
committed
rephrased dev note
1 parent 14822b0 commit 2cd3450

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/hooks/use-preset-controls.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export const usePresetControls = property => {
4040

4141
/**
4242
* Dev note:
43-
* Starting from theme.json version 3, settings such as `typography.defaultFontSizes` and `spacing.defaultSpacingSizes`
44-
* must be set to `false` to override the default presets. If these settings are not found in the theme.json, they default to `true`.
45-
* Themes that use the same slugs as the defaults will continue to use the default presets.
43+
* In theme.json version 3, `typography.defaultFontSizes` and `spacing.defaultSpacingSizes` default to `true`.
44+
* These settings must be explicitly set to `false` to override default presets. When enabled, themes with matching slugs
45+
* will use default presets, and theme presets with the same slugs will be ignored.
4646
* Therefore, we also need to get the default presets if the `defaultSizesEnabled` is `true` and merge it with the theme presets.
4747
*
4848
* https://make.wordpress.org/core/2024/06/19/theme-json-version-3/#:~:text=Breaking%20changes%20in%20version%203

0 commit comments

Comments
 (0)