Open
Description
openedon Aug 7, 2024
Description
The default mediaWidth setting for the Media & Text block does not change when updated in the theme.json file of a block theme.
Step-by-step reproduction instructions
- Install or activate a Block theme (e.g., Twenty Twenty-Four or Twenty Twenty-Three).
- Edit the theme’s theme.json file to set block-level settings for the Media & Text block to change the default mediaWidth.
- Check the block’s settings in the editor to see if the default mediaWidth has changed.
Expected Result:
The default mediaWidth should update to the new value set in the theme.json file.
Actual Result:
The default mediaWidth remains at 50, even after clearing the cache and switching themes back and forth.
Code Snippet from theme.json:
{
"settings": {
"blocks": {
"core/media-text": {
"mediaWidth": {
"type": "number",
"default": 60
}
}
}
}
}
Also tested:
"core/media-text": {
"custom": {
"mediaWidth": 60
}
}
and this:
"core/media-text": {
"attributes": {
"mediaWidth": {
"type": "number",
"default": 60
}
}
}
Screenshots, screen recording, code snippet
Environment info
– WordPress 6.6.1
– Tested with no Gutenberg plugin
– Also tested with Gutenberg Version 18.9.0
– Browser: Chrome - Version 127.0.6533.90
– Theme: Twenty Twenty-Four and Twenty Twenty-Three
– macOS
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment