MW
Tutorial

WordPress 7.0 Developer APIs

PHP-only block registration, the Interactivity API's new watch() function, DataViews and DataForms, Block Bindings iterations — the new developer APIs in WordPress 7.0.

advanced 25 min May 20, 2026
You build blocks, plugins, or custom editor screens Comfortable with both PHP and the block editor's JavaScript packages

WORDPRESS 7.0 DEVELOPER APIS

WordPress 7.0’s “Developer’s Toolbox” is a set of changes that will not show up in any “what’s new” screenshot, but will change how you write code. Here are the ones worth knowing.

PHP-only block registration

This is the most significant API change in 7.0. You can now create blocks and patterns entirely on the server in PHP, and register them with the Block API — no JavaScript build step required.

A block declares itself for auto-registration with a support flag plus a render callback:

register_block_type( 'my-plugin/notice', [
  'supports' => [ 'autoRegister' => true ],
  'attributes' => [
      'message' => [ 'type' => 'string' ],
  ],
  'render_callback' => function ( $attrs ) {
      return '<div class="notice">' .
          esc_html( $attrs['message'] ) . '</div>';
  },
] );

When a block declares 'supports' => [ 'autoRegister' => true ] alongside a render callback, WordPress registers it automatically and exposes it to the client via a JavaScript global. PHP-registered block attributes are editable in the editor, inspector controls can be generated from those attributes, and DataForm inspector controls are added automatically for PHP auto-registered blocks.

The Interactivity API gains watch()

The @wordpress/interactivity package gets a new watch() function. It subscribes to changes in any signal accessed inside a callback and re-runs that callback whenever those signals change — a clean reactive primitive.

import { store, watch } from '@wordpress/interactivity';

store( 'myPlugin', {
  callbacks: {
    logUrl() {
      watch( () => {
        // Re-runs whenever state.url changes.
        console.log( 'URL is now', state.url );
      } );
    },
  },
} );

The matching directive, data-wp-watch, can be attached to a DOM element’s lifecycle to react to state changes. One related detail: state.url is now populated server-side during directive processing and stays unchanged until the first client-side navigation — so server-rendered output is correct before any JavaScript runs.

DataViews and DataForms

The DataViews and DataForms systems — the data-table and data-form components Core uses for admin screens — expand in 7.0 with a new Activity layout, a new Details layout, improved modal appearance, and the ability to register third-party types in the Field API.

If you build custom admin screens, this matters: the same components that power Core’s list and edit screens are increasingly available to you, and the Field API now accepts your own field types.

Block Bindings iterations

Block Bindings — the system that connects block attributes to dynamic data sources — continues to mature. 7.0 adds the ability to filter available attribute sources by format, aligning Block Bindings with the Field API. Pattern Overrides now apply to any block, including custom blocks, opted in through block_bindings_supported_attributes filters.

A new plugin-list filter

A small but welcome admin API: the new plugins_list_status_text filter lets you add custom filtering to the plugins screen. Custom statuses added via plugins_list now appear as tabs at the top of the plugin list, and the tab label is customizable.

WP Filter plugins_list_status_text · priority 10 · 2 args: $text, $status
my-plugin.php
add_filter( 'plugins_list_status_text', function ( $text, $status ) {
  if ( 'needs-update' === $status ) {
      return 'Needs 7.0 update';
  }
  return $text;
}, 10, 2 );

Site Editor build and routing

Finally, 7.0 lays foundations for an extensible Site Editor: route validation, a new @wordpress/boot package that lets plugins build custom Site Editor pages, and a refactored @wordpress/scripts that builds from directories and reduces the Webpack dependency. These are groundwork — the payoff arrives in later releases — but if you build editor extensions, the direction is worth tracking.

What’s next

You now have the full picture of WordPress 7.0 — AI, dashboard, breaking changes, new blocks, and new APIs. The final tutorial pulls it together into something actionable: a step-by-step checklist to get your own plugin or theme 7.0-ready.

You've completed this tutorial!

Get the next one in your inbox. Practical tips, no fluff.

Subscribe

Get weekly notes in your inbox

Practical tips, tutorials and resources. No spam.