Define how an attached image is rendered

To replace <img> tags with <picture> tags in the content of your posts, follow these steps: Add a filter for post content: This filter will modify the post content to replace <img> tags with <picture> tags, allowing for responsive images based on screen size and resolution. Implement the replacement function: The function replace_content_images_with_picture_tags will find … Read more

editPost without undo entry

Yes, editPost is a wrapper around editEntityRecord which according to the core/data docs takes an options object that supports undoIgnore: options Object: Options for the edit. options.undoIgnore [boolean]: Whether to ignore the edit in undo history or not. While you could use this, generally the need to use it implies a mistake or misunderstanding somewhere, … Read more