Skip to content

WordPress 7.0 Compatibility Review #2660

Description

@jnealey-godaddy

Overview

WordPress 7.0 is scheduled for release on April 9, 2026. This issue tracks the work needed to ensure CoBlocks is fully compatible. Beta 1 is already available for testing.


Critical: Post Editor Always Iframed (Block API v2 Deprecated)

This is the highest-risk change for CoBlocks.

In WordPress 7.0, the post editor will always run inside an iframe, removing the legacy fallback that previously allowed blocks using API v1/v2 to opt out. Block API v2 has been deprecated since WP 6.9.

Affected CoBlocks blocks

Explicitly on apiVersion: 2 (must be migrated to v3):

  • click-to-tweet
  • counter
  • gallery-masonry
  • gallery-stacked
  • highlight
  • testimonials/testimonial

No apiVersion declared (default to v1 — also deprecated): 51 additional block.json files across the plugin need auditing.

Migration requirements

  • Update apiVersion to 3 in all block.json files
  • Audit JS in each block for use of global document or window — these will break in the iframe context where the editor's document is different from the admin page
  • Replace any direct DOM access with useRefEffect or other iframe-safe APIs
  • Reference: Migrating Blocks for iframe Editor Compatibility

Additional Changes to Assess

  • HtmlRenderer component (Gutenberg 22.4): Several blocks will lose an extra wrapping <div> in the editor — verify styling is consistent between editor and front end
  • New global block supports (text indent, text columns, image aspect ratios for wide/full): Check if CoBlocks' custom implementations conflict with new core features
  • isNotAll operator deprecated in query APIs — may affect the Posts block
  • theme.json link underline removed — audit any styling that relied on this default
  • PHP minimum raised to 7.4 — CoBlocks already requires 7.4, so no change needed here

CI Updates Required

The test-wp-next.yml workflow needs to be updated:

  • scheduled_release_date is stale (set to 2024-04-02)
  • wp_next URL still points to wordpress-6.8-RC2.zip
  • Update to point at WordPress 7.0 beta/RC zip and adjust installPath

Checklist

  • Update test-wp-next.yml to target WP 7.0 Beta 1
  • Audit all 57 block.json files — identify which need apiVersion: 3
  • Migrate all blocks to apiVersion: 3
  • Audit block JS files for document/window global access in iframe-unsafe ways
  • Fix any iframe compatibility issues found
  • Review Field Guide dev notes once published (March 19)
  • Run full Cypress E2E suite against WP 7.0
  • Run PHP unit tests against WP 7.0
  • Update readme.txt and package.json tested_up_to to 7.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions