WordPress 7.0 Introduces Conditional Iframe for Post Editor
WordPress 7.0 is set to change how the post editor operates by introducing conditional iframe integration based on the block API versions used within a post. This update aims to enhance compatibility while maintaining the flexibility of the editing environment.
The discussion around iframing the WordPress editor has been ongoing, with previous implementations affecting various editors. Currently, the site editor, template editor, and all block, template, and device previews are already iframed. The post editor, however, was iframed only if all registered blocks across plugins utilized block API version 3 or higher.
With the Gutenberg plugin active, the post editor is automatically iframed regardless of block API versions if a block-based theme is in use. This change is intended to streamline the editing experience and ensure broader compatibility.
In WordPress 7.0, the decision to iframe the post editor will depend solely on the block API versions of blocks actually inserted into a post, rather than all registered blocks. If every inserted block is version 3 or higher, the editor will be iframed. If not, the iframe will be disabled to maintain compatibility with lower-versioned blocks.
The Gutenberg plugin version 22.6 will enforce iframe use even for classic themes, a shift from its current requirement only for block-based themes. This enforcement is for testing purposes to identify potential issues with lower-version blocks before a broader rollout.
The shift towards conditional iframing signals a cautious but decisive move by WordPress to modernize its editing experience. By focusing on blocks actually used in posts, WordPress aligns developer actions with end-user functionality, promoting a more seamless transition to newer block standards.
This change urges block authors to upgrade to version 3 to ensure compatibility. It also tests the waters for future enforcement of iframing, offering a buffer period for developers to adjust and provide feedback.
While the iframe enforcement is not part of the immediate WordPress 7.0 release, this update is a step towards a more integrated editing environment. The gradual rollout gives developers time to adapt, ensuring that any major issues can be resolved before full enforcement.
The community is encouraged to participate actively, reporting any incompatibilities to aid the transition process. This collaborative approach aims to refine the editor experience while maintaining flexibility for diverse themes and plugins.
Action Steps
- Developers: Upgrade your blocks to API version 3 to ensure they remain compatible with future WordPress releases.
- Site Owners: Test your site with the Gutenberg plugin to identify any block issues under the new iframe conditions.
- Agencies: Prepare client sites for the transition by reviewing block compatibility and advising on necessary updates.
- Hosting Teams: Monitor client feedback and assist with troubleshooting any iframe-related issues.