Release 1.2.0#19
Merged
Merged
Conversation
This refactors the `blockparty-iframe` block to use a server-side `render_callback` via the new `BlockRenderer` class. This approach ensures the iframe HTML is always generated on the server, providing greater control over attributes, sanitization, and future extensibility. Existing blocks will continue to render correctly due to the added `deprecated` save function.
This change excludes the 'composer.lock' file from version control and adds it to '.gitignore'. This is standard practice for libraries and plugins, allowing consuming projects to manage their own dependency versions without conflicts from locked versions within this package.
The codebase now consistently uses short array syntax (`[]`), replacing all instances of `array()`. This change is explicitly enforced by updating PHP_CodeSniffer and WPCS development dependencies to their latest stable versions, along with new rules in `phpcs.xml.dist`. Additionally, the `BlockRenderer::render` method's signature has been streamlined by removing the `$content` and `$block` parameters. This simplification leverages that `get_block_wrapper_attributes()` no longer requires these arguments when rendering dynamic blocks in modern WordPress, making the function's interface cleaner and more focused.
feat: convert iframe block to dynamic server-side rendering
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 1.2.0
Note
Medium Risk
Front-end output now depends on PHP rendering and
esc_urlon embed URLs; behavior should match the old save path but any parity gap would affect all newly saved blocks and dynamic renders.Overview
Release 1.2.0 turns the iframe block into a dynamic block: new saves keep attributes in post content and front-end markup is built in PHP via
BlockRendererand aregister_block_type()render_callback, replacing the previous blocks-manifest bulk registration.The editor no longer uses a live
savefunction; the oldsave.jsoutput is registered underdeprecatedso posts that still contain serialized iframe HTML stay editable.includes/BlockRenderer.phpmirrors the former save behavior (wrapper attributes,loading, customiframeAttributes, exclusions for boolean/legacy attrs) withesc_url/esc_attr.Developer/release: PSR-4 autoload for
Blockparty\Iframe\,composer.lockremoved from git, PHPCS short-array rules updated, version bumps across plugin metadata, blueprint ref1.2.0, and minor npm script renames (env:start/env:stop).Reviewed by Cursor Bugbot for commit 7e64be0. Bugbot is set up for automated code reviews on this repo. Configure here.