Commit 653082d744 for wordpress.org
commit 653082d744d4fb1f1490b07360ff063e3be2b11c
Author: dmsnell <dmsnell@git.wordpress.org>
Date: Thu Jan 8 23:45:59 2026 +0000
Block Processor: Fix is_block_type() for inner HTML
Previously, the WP_Block_Processor class was making a mistake in
mis-reporting whether a token matches a block type when #innerHTML spans
are involved.
This patch fixes the logic, which was originally written before a
distinction between inner HTML and top-level freeform content was built.
Developed in https://github.com/WordPress/wordpress-develop/pull/10701
Discussed in https://core.trac.wordpress.org/ticket/64485
Fixes #64485.
Built from https://develop.svn.wordpress.org/trunk@61452
git-svn-id: http://core.svn.wordpress.org/trunk@60764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-includes/class-wp-block-processor.php b/wp-includes/class-wp-block-processor.php
index e473c30203..39f79b99e7 100644
--- a/wp-includes/class-wp-block-processor.php
+++ b/wp-includes/class-wp-block-processor.php
@@ -1440,12 +1440,17 @@ class WP_Block_Processor {
return true;
}
- // This is a core/freeform text block, it’s special.
- if ( $this->is_html() && 0 === ( $this->open_blocks_length[0] ?? null ) ) {
- return (
- 'core/freeform' === $block_type ||
- 'freeform' === $block_type
- );
+ if ( $this->is_html() ) {
+ // This is a core/freeform text block, it’s special.
+ if ( 0 === ( $this->open_blocks_length[0] ?? null ) ) {
+ return (
+ 'core/freeform' === $block_type ||
+ 'freeform' === $block_type
+ );
+ }
+
+ // Otherwise this is innerHTML and not a block.
+ return false;
}
return $this->are_equal_block_types( $this->source_text, $this->namespace_at, $this->name_at - $this->namespace_at + $this->name_length, $block_type, 0, strlen( $block_type ) );
diff --git a/wp-includes/css/dist/index.php b/wp-includes/css/dist/index.php
index 97a17c3b37..5dd8765436 100644
--- a/wp-includes/css/dist/index.php
+++ b/wp-includes/css/dist/index.php
@@ -7,6 +7,11 @@
*/
return array(
+ array(
+ 'handle' => 'wp-list-reusable-blocks',
+ 'path' => 'list-reusable-blocks/style',
+ 'dependencies' => array('wp-components'),
+ ),
array(
'handle' => 'wp-nux',
'path' => 'nux/style',
@@ -17,11 +22,6 @@ return array(
'path' => 'preferences/style',
'dependencies' => array('wp-components'),
),
- array(
- 'handle' => 'wp-list-reusable-blocks',
- 'path' => 'list-reusable-blocks/style',
- 'dependencies' => array('wp-components'),
- ),
array(
'handle' => 'wp-commands',
'path' => 'commands/style',
@@ -33,13 +33,13 @@ return array(
'dependencies' => array('wp-block-editor', 'wp-components'),
),
array(
- 'handle' => 'wp-patterns',
- 'path' => 'patterns/style',
+ 'handle' => 'wp-widgets',
+ 'path' => 'widgets/style',
'dependencies' => array('wp-block-editor', 'wp-components'),
),
array(
- 'handle' => 'wp-widgets',
- 'path' => 'widgets/style',
+ 'handle' => 'wp-patterns',
+ 'path' => 'patterns/style',
'dependencies' => array('wp-block-editor', 'wp-components'),
),
array(
diff --git a/wp-includes/js/dist/script-modules/index.php b/wp-includes/js/dist/script-modules/index.php
index 0c2455fb13..eec05b8052 100644
--- a/wp-includes/js/dist/script-modules/index.php
+++ b/wp-includes/js/dist/script-modules/index.php
@@ -22,21 +22,6 @@ return array(
'path' => 'interactivity-router/full-page',
'asset' => 'interactivity-router/full-page.min.asset.php',
),
- array(
- 'id' => '@wordpress/a11y',
- 'path' => 'a11y/index',
- 'asset' => 'a11y/index.min.asset.php',
- ),
- array(
- 'id' => '@wordpress/route',
- 'path' => 'route/index',
- 'asset' => 'route/index.min.asset.php',
- ),
- array(
- 'id' => '@wordpress/abilities',
- 'path' => 'abilities/index',
- 'asset' => 'abilities/index.min.asset.php',
- ),
array(
'id' => '@wordpress/latex-to-mathml',
'path' => 'latex-to-mathml/index',
@@ -47,11 +32,26 @@ return array(
'path' => 'latex-to-mathml/loader',
'asset' => 'latex-to-mathml/loader.min.asset.php',
),
+ array(
+ 'id' => '@wordpress/a11y',
+ 'path' => 'a11y/index',
+ 'asset' => 'a11y/index.min.asset.php',
+ ),
+ array(
+ 'id' => '@wordpress/abilities',
+ 'path' => 'abilities/index',
+ 'asset' => 'abilities/index.min.asset.php',
+ ),
array(
'id' => '@wordpress/core-abilities',
'path' => 'core-abilities/index',
'asset' => 'core-abilities/index.min.asset.php',
),
+ array(
+ 'id' => '@wordpress/route',
+ 'path' => 'route/index',
+ 'asset' => 'route/index.min.asset.php',
+ ),
array(
'id' => '@wordpress/edit-site-init',
'path' => 'edit-site-init/index',
diff --git a/wp-includes/version.php b/wp-includes/version.php
index a3d48fffb6..20928d6dae 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.0-alpha-61451';
+$wp_version = '7.0-alpha-61452';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.