diff --git a/.plugin-data b/.plugin-data index b31f38f..57b5ffd 100644 --- a/.plugin-data +++ b/.plugin-data @@ -1,4 +1,4 @@ { - "version": "1.1.2", + "version": "1.2.0", "slug": "blockparty-iframe" } diff --git a/.wordpress-org/blueprints/blueprint.json b/.wordpress-org/blueprints/blueprint.json index 66f6ac6..6eb75c6 100644 --- a/.wordpress-org/blueprints/blueprint.json +++ b/.wordpress-org/blueprints/blueprint.json @@ -11,7 +11,7 @@ "pluginData": { "resource": "git:directory", "url": "https://github.com/BeAPI/blockparty-iframe", - "ref": "1.1.2", + "ref": "1.2.0", "refType": "tag" }, "options": { diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fa15f3..b3c5c8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,24 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/). +## [1.2.0] - 2026-04-22 + +### Changed + +- **Dynamic block rendering**: The iframe is rendered on the server via `BlockRenderer` and a `render_callback` (same pattern as blockparty-post-sharing). Post content stores block attributes only; frontend markup is built at display time. +- **Plugin bootstrap**: Register the block with `register_block_type()` and `render_callback` instead of metadata-collection-only registration. + +### Added + +- **`includes/BlockRenderer.php`**: PHP render for the wrapper (`get_block_wrapper_attributes()`), `loading`, and custom iframe attributes (parity with the former `save.js` logic). +- **Block deprecation**: The previous static `save.js` output is kept as a deprecated block definition so existing posts with serialized HTML remain valid in the editor. + +### Developer + +- **Composer autoload**: PSR-4 `Blockparty\Iframe\` → `includes/`. +- **PHPCS**: Enforce short array syntax (`[]`) via `Generic.Arrays.DisallowLongArraySyntax`; fix exclusion of `Universal.Arrays.DisallowShortArraySyntax` from WordPress-Core. +- **Composer**: `composer.lock` ignored in git; dev dependency pins refreshed (`dealerdirect/phpcodesniffer-composer-installer`, `wp-coding-standards/wpcs`). + ## [1.1.2] - 2026-04-21 ### Fixed @@ -141,6 +159,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/). --- +[1.2.0]: https://github.com/BeAPI/blockparty-iframe/releases/tag/1.2.0 [1.1.2]: https://github.com/BeAPI/blockparty-iframe/releases/tag/1.1.2 [1.1.1]: https://github.com/BeAPI/blockparty-iframe/releases/tag/1.1.1 [1.1.0]: https://github.com/BeAPI/blockparty-iframe/releases/tag/1.1.0 diff --git a/blockparty-iframe.php b/blockparty-iframe.php index 351f893..f214e34 100644 --- a/blockparty-iframe.php +++ b/blockparty-iframe.php @@ -2,7 +2,7 @@ /** * Plugin Name: Blockparty Iframe * Description: Add a block to display an embedded frame in the WordPress editor. - * Version: 1.1.2 + * Version: 1.2.0 * Requires at least: 6.7 * Requires PHP: 8.1 * Author: Be API Technical team @@ -23,7 +23,7 @@ include_once __DIR__ . '/vendor/autoload.php'; } -define( 'BLOCKPARTY_IFRAME_VERSION', '1.1.2' ); +define( 'BLOCKPARTY_IFRAME_VERSION', '1.2.0' ); define( 'BLOCKPARTY_IFRAME_URL', plugin_dir_url( __FILE__ ) ); define( 'BLOCKPARTY_IFRAME_DIR', plugin_dir_path( __FILE__ ) ); define( 'BLOCKPARTY_IFRAME_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); diff --git a/package-lock.json b/package-lock.json index 7489962..62fdcf8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "blockparty-iframe", - "version": "1.1.1", + "version": "1.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "blockparty-iframe", - "version": "1.1.1", + "version": "1.2.0", "license": "GPL-2.0-or-later", "dependencies": { "@wordpress/block-editor": "15.17.0", diff --git a/package.json b/package.json index 45764d2..d43ae6e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blockparty-iframe", - "version": "1.1.2", + "version": "1.2.0", "description": "Add a block to display an embedded frame in the WordPress editor.", "author": "Be API Technical team", "license": "GPL-2.0-or-later", diff --git a/readme.txt b/readme.txt index 44a360b..4f98e3f 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: Be API Technical team Tags: block, iframe, editor Tested up to: 6.7 -Stable tag: 1.1.2 +Stable tag: 1.2.0 License: GPL-2.0-or-later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -45,6 +45,9 @@ directory take precedence. For example, `/assets/screenshot-1.png` would win ove == Changelog == += 1.2.0 = +* Dynamic block: iframe markup is rendered in PHP on the front end (block attributes are stored in post content). Existing posts with the previous static HTML remain supported in the editor. + = 1.1.2 = * WordPress.org Playground blueprint: write the demo mu-plugin with a nowdoc so the embedded wp_kses_allowed_html snippet is valid PHP (avoids a fatal on load). Blueprint install ref set to tag 1.1.2. * Developer dependencies: remove Psalm static analysis (smaller Composer dev footprint); PHPCS and existing quality tasks remain. diff --git a/src/blockparty-iframe/block.json b/src/blockparty-iframe/block.json index 2cfe575..1f1d285 100644 --- a/src/blockparty-iframe/block.json +++ b/src/blockparty-iframe/block.json @@ -2,13 +2,16 @@ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "blockparty/iframe", - "version": "1.1.2", + "version": "1.2.0", "title": "Iframe", "category": "widgets", "description": "Display an embedded frame.", "example": {}, "supports": { - "align": [ "wide", "full" ], + "align": [ + "wide", + "full" + ], "dimensions": { "aspectRatio": true, "height": true,