When using the MediaPlaceholder component, will skipping blobUrl handling break something?
When using the MediaPlaceholder component, will skipping blobUrl handling break something?
When using the MediaPlaceholder component, will skipping blobUrl handling break something?
In block themes patterns won’t have access to context such as id it seems: https://developer.wordpress.org/block-editor/reference-guides/block-api/block-patterns One has to create a custom block to get post id and use useSelect hook to get post Id like so: import { useSelect } from “@wordpress/data”; … inside Edit block function: const postId = useSelect(select => select(‘core/editor’).getCurrentPostId()); then, postId … Read more
Hide title block on edit screen in Gutenberg
Using the block theme in production
Add a class to img of core/cover block
This seems to be the no-shadow rule. The problem is that it doesn’t like that you have defined two variables with the same name: isSavingNonPostEntityChanges (see code comments below). const { isSaving, isSavingNonPostEntityChanges } = useSelect((select) => { // <– here const { isSavingPost, isSavingNonPostEntityChanges } = select(editorStore); // <– and here return { isSaving: … Read more
No, there’s no way to remove that div from the RadioControl component. You can see in the source for the component that there are no options that will control whether that div is rendered. It will always be rendered when using that particular component. Depending on what you actually need to do you could just … Read more
You would need a combination of JavaScript for the custom block, and CSS to make the H1 span across both columns. The JavaScript would be like this: registerBlockType(‘my-plugin/two-columns’, { title: ‘Two Columns’, icon: ‘screenoptions’, category: ‘common’, attributes: { title: { type: ‘string’, }, imageUrl: { type: ‘string’, }, }, edit({ attributes, setAttributes }) { const … Read more
The PHP code you shared registers the block on the server side, and this information is passed to the block editor via the REST API. However, no information about how to display or edit the block is included with this, there is no edit component, no save component, and no JS file referenced. So there … Read more
The mistake I made was that I didn’t set the attribute property in the deprecated block to the proper value. I have to assign the expected attributes here, just as I did in block.json. If the attributes changed, I’d put the old attributes here. Since they did not change, I used the current value of … Read more