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
This commit is contained in:
@@ -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 ) );
|
||||
|
||||
18
wp-includes/css/dist/index.php
vendored
18
wp-includes/css/dist/index.php
vendored
@@ -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(
|
||||
|
||||
30
wp-includes/js/dist/script-modules/index.php
vendored
30
wp-includes/js/dist/script-modules/index.php
vendored
@@ -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',
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user