diff --git a/wp-includes/class-wp-block.php b/wp-includes/class-wp-block.php index be73c13070..c6ca8a3bd4 100644 --- a/wp-includes/class-wp-block.php +++ b/wp-includes/class-wp-block.php @@ -333,27 +333,68 @@ class WP_Block { switch ( $block_type->attributes[ $attribute_name ]['source'] ) { case 'html': case 'rich-text': - // Hardcode the selectors and processing until the HTML API is able to read CSS selectors and replace inner HTML. - // TODO: Use the HTML API instead. - if ( 'core/paragraph' === $this->name && 'content' === $attribute_name ) { - $selector = 'p'; - } - if ( 'core/heading' === $this->name && 'content' === $attribute_name ) { - $selector = 'h[1-6]'; - } - if ( 'core/button' === $this->name && 'text' === $attribute_name ) { - // Check if it is a