Resizing images on page
Resizing images on page
Resizing images on page
Gutenberg Development vs Release version?
Creating a Dynamic InnerBlock that updates depending on state
Updating failed message when a wp_insert_post function is hooked to save_post hook
It cannot be done, no API currently exists to add what you want to add. If we look at the component that implements this: https://github.com/WordPress/gutenberg/blob/5b01c97c6943890abb44b2154392ffcccef87b3e/packages/format-library/src/link/inline.js#L197 The InlineLinkUI wraps a component that wraps the URLPopover component, and places a child component inside it which is how the new window checkbox is added. No slots are present … Read more
Found a JavaScript solution. If I remember correctly there was some talk about temporary solution this or related Github issues so keep that in mind. But I guess this means only server side so for only UI hiding I guess this will be fine. const wp = window.wp; // when using webpack wp.data.dispatch( ‘core/edit-post’ ).hideBlockTypes( … Read more
It turns out there is one crucial step that needs to be taken to tell WPML how the custom block should be translated. The wpml-config.xml file (placed in the root of your theme/plugin) gives instructions to WPML on how to translate your custom block. So, in my case, I created a new wpml-config.xml file and … Read more
There are a number of problems here, lets go through them one by one 1. Functions that return stuff, and Functions that output stuff get_the_content doesn’t output anything, it returns it. So you need to echo it for the results to be visible: echo get_the_content(); Functions that start with get_ almost always return a value. … Read more
Images are not shown in the post editor
There are code errors… any is not a post type and you are setting the 2nd function argument to $post instead of $post_type so it is undefined anyway. Also $post is not provided in this context, there is a separate filter for filtering by specific posts (gutenberg_can_edit_post / use_block_editor_for_post) If you want to force all … Read more