<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[56048] trunk: Editor: Update block-serialization-default-parser package for WP 6.3 Beta 1.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/56048">56048</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/56048","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>peterwilsoncc</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2023-06-27 00:43:42 +0000 (Tue, 27 Jun 2023)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Editor: Update block-serialization-default-parser package for WP 6.3 Beta 1.
Update the `@wordpress/block-serialization-default-parser` to 4.35.1 for WordPress 6.3 Beta 1. These changes split the following classes in to their own files in order to match the WordPress PHP coding standards:
* `WP_Block_Parser_Block`
* `WP_Block_Parser_Frame`
* `WP_Block_Parser`
These classes were previously all included in the `src/wp-includes/class-wp-block-parser.php` file. In order to maintain backward compatibly for developers requiring the file directly, the relocated classes are replaced with `require_once` calls in the original file.
In order to retain the commit history of the new files, they have been created using the `svn copy` command.
Props aristath, rajanpanchal2028, jrf, SergeyBiryukov, costdev, manfcarlo, spacedmonkey, mukesh27, isabel_brison, dd32.
Fixes <a href="https://core.trac.wordpress.org/ticket/57832">#57832</a>.
See <a href="https://core.trac.wordpress.org/ticket/58623">#58623</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkpackagelockjson">trunk/package-lock.json</a></li>
<li><a href="#trunkpackagejson">trunk/package.json</a></li>
<li><a href="#trunkphpcsxmldist">trunk/phpcs.xml.dist</a></li>
<li><a href="#trunksrcwpincludesclasswpblockparserphp">trunk/src/wp-includes/class-wp-block-parser.php</a></li>
<li><a href="#trunksrcwpsettingsphp">trunk/src/wp-settings.php</a></li>
<li><a href="#trunktoolswebpackpackagesjs">trunk/tools/webpack/packages.js</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesclasswpblockparserblockphp">trunk/src/wp-includes/class-wp-block-parser-block.php</a></li>
<li><a href="#trunksrcwpincludesclasswpblockparserframephp">trunk/src/wp-includes/class-wp-block-parser-frame.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkpackagelockjson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/package-lock.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/package-lock.json 2023-06-27 00:21:12 UTC (rev 56047)
+++ trunk/package-lock.json 2023-06-27 00:43:42 UTC (rev 56048)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4167,9 +4167,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/block-serialization-default-parser": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "4.26.1",
- "resolved": "https://registry.npmjs.org/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-4.26.1.tgz",
- "integrity": "sha512-ZsdqND0BnCscRtp5TiCAcLQkq5C045bKjIsOVDIQomb01UnNttkDNCdSUjbk4dtypcaFQ2MFbUnx2kTajYD+kA==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "4.35.1",
+ "resolved": "https://registry.npmjs.org/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-4.35.1.tgz",
+ "integrity": "sha512-kVestCLPvZadCzvRSt6y7wyRwlvitWgvvhUZCputqsYyIhpqT3uYLqBn2BMxg1ezA0pSUjpDOV/QwjbOftbBVg==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.16.0"
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunkpackagejson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/package.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/package.json 2023-06-27 00:21:12 UTC (rev 56047)
+++ trunk/package.json 2023-06-27 00:43:42 UTC (rev 56048)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -85,7 +85,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/block-directory": "4.3.13",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/block-editor": "11.3.10",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/block-library": "8.3.13",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/block-serialization-default-parser": "4.26.1",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/block-serialization-default-parser": "4.35.1",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/blocks": "12.3.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/components": "23.3.7",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/compose": "6.3.3",
</span></span></pre></div>
<a id="trunkphpcsxmldist"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/phpcs.xml.dist</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/phpcs.xml.dist 2023-06-27 00:21:12 UTC (rev 56047)
+++ trunk/phpcs.xml.dist 2023-06-27 00:43:42 UTC (rev 56048)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -118,7 +118,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <exclude-pattern>/src/wp-includes/class-requests\.php</exclude-pattern>
</span><span class="cx" style="display: block; padding: 0 10px"> <exclude-pattern>/src/wp-includes/class-simplepie\.php</exclude-pattern>
</span><span class="cx" style="display: block; padding: 0 10px"> <exclude-pattern>/src/wp-includes/class-snoopy\.php</exclude-pattern>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <exclude-pattern>/src/wp-includes/class-wp-block-parser\.php</exclude-pattern>
</del><span class="cx" style="display: block; padding: 0 10px"> <exclude-pattern>/src/wp-includes/deprecated\.php</exclude-pattern>
</span><span class="cx" style="display: block; padding: 0 10px"> <exclude-pattern>/src/wp-includes/ms-deprecated\.php</exclude-pattern>
</span><span class="cx" style="display: block; padding: 0 10px"> <exclude-pattern>/src/wp-includes/pluggable-deprecated\.php</exclude-pattern>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -187,6 +186,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <exclude-pattern>/tests/phpunit/tests/multisite/site\.php</exclude-pattern>
</span><span class="cx" style="display: block; padding: 0 10px"> </rule>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <!-- Allow non-snake-case vars & properties for block-related classes. -->
+ <rule ref="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase">
+ <exclude-pattern>/src/wp-includes/class-wp-block-parser\.php</exclude-pattern>
+ <exclude-pattern>/src/wp-includes/class-wp-block-parser-block\.php</exclude-pattern>
+ </rule>
+ <rule ref="WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase">
+ <exclude-pattern>/src/wp-includes/class-wp-block-parser-block\.php</exclude-pattern>
+ </rule>
+ <rule ref="WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase">
+ <exclude-pattern>/src/wp-includes/class-wp-block-parser-block\.php</exclude-pattern>
+ </rule>
+
</ins><span class="cx" style="display: block; padding: 0 10px"> <!-- Allow the I18n functions file for issues identified by the I18n sniff
</span><span class="cx" style="display: block; padding: 0 10px"> (such as calling the low-level translate() function). -->
</span><span class="cx" style="display: block; padding: 0 10px"> <rule ref="WordPress.WP.I18n">
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpblockparserblockphpfromrev56047trunksrcwpincludesclasswpblockparserphp"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: trunk/src/wp-includes/class-wp-block-parser-block.php (from rev 56047, trunk/src/wp-includes/class-wp-block-parser.php)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-block-parser-block.php (rev 0)
+++ trunk/src/wp-includes/class-wp-block-parser-block.php 2023-06-27 00:43:42 UTC (rev 56048)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,90 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Block Serialization Parser
+ *
+ * @package WordPress
+ */
+
+/**
+ * Class WP_Block_Parser_Block
+ *
+ * Holds the block structure in memory
+ *
+ * @since 5.0.0
+ */
+class WP_Block_Parser_Block {
+ /**
+ * Name of block
+ *
+ * @example "core/paragraph"
+ *
+ * @since 5.0.0
+ * @var string
+ */
+ public $blockName; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
+
+ /**
+ * Optional set of attributes from block comment delimiters
+ *
+ * @example null
+ * @example array( 'columns' => 3 )
+ *
+ * @since 5.0.0
+ * @var array|null
+ */
+ public $attrs;
+
+ /**
+ * List of inner blocks (of this same class)
+ *
+ * @since 5.0.0
+ * @var WP_Block_Parser_Block[]
+ */
+ public $innerBlocks; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
+
+ /**
+ * Resultant HTML from inside block comment delimiters
+ * after removing inner blocks
+ *
+ * @example "...Just <!-- wp:test /--> testing..." -> "Just testing..."
+ *
+ * @since 5.0.0
+ * @var string
+ */
+ public $innerHTML; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
+
+ /**
+ * List of string fragments and null markers where inner blocks were found
+ *
+ * @example array(
+ * 'innerHTML' => 'BeforeInnerAfter',
+ * 'innerBlocks' => array( block, block ),
+ * 'innerContent' => array( 'Before', null, 'Inner', null, 'After' ),
+ * )
+ *
+ * @since 4.2.0
+ * @var array
+ */
+ public $innerContent; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
+
+ /**
+ * Constructor.
+ *
+ * Will populate object properties from the provided arguments.
+ *
+ * @since 5.0.0
+ *
+ * @param string $name Name of block.
+ * @param array $attrs Optional set of attributes from block comment delimiters.
+ * @param array $inner_blocks List of inner blocks (of this same class).
+ * @param string $inner_html Resultant HTML from inside block comment delimiters after removing inner blocks.
+ * @param array $inner_content List of string fragments and null markers where inner blocks were found.
+ */
+ public function __construct( $name, $attrs, $inner_blocks, $inner_html, $inner_content ) {
+ $this->blockName = $name; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
+ $this->attrs = $attrs;
+ $this->innerBlocks = $inner_blocks; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
+ $this->innerHTML = $inner_html; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
+ $this->innerContent = $inner_content; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
+ }
+}
</ins></span></pre></div>
<a id="trunksrcwpincludesclasswpblockparserframephpfromrev56047trunksrcwpincludesclasswpblockparserphp"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: trunk/src/wp-includes/class-wp-block-parser-frame.php (from rev 56047, trunk/src/wp-includes/class-wp-block-parser.php)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-block-parser-frame.php (rev 0)
+++ trunk/src/wp-includes/class-wp-block-parser-frame.php 2023-06-27 00:43:42 UTC (rev 56048)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,78 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Block Serialization Parser
+ *
+ * @package WordPress
+ */
+
+/**
+ * Class WP_Block_Parser_Frame
+ *
+ * Holds partial blocks in memory while parsing
+ *
+ * @internal
+ * @since 5.0.0
+ */
+class WP_Block_Parser_Frame {
+ /**
+ * Full or partial block
+ *
+ * @since 5.0.0
+ * @var WP_Block_Parser_Block
+ */
+ public $block;
+
+ /**
+ * Byte offset into document for start of parse token
+ *
+ * @since 5.0.0
+ * @var int
+ */
+ public $token_start;
+
+ /**
+ * Byte length of entire parse token string
+ *
+ * @since 5.0.0
+ * @var int
+ */
+ public $token_length;
+
+ /**
+ * Byte offset into document for after parse token ends
+ * (used during reconstruction of stack into parse production)
+ *
+ * @since 5.0.0
+ * @var int
+ */
+ public $prev_offset;
+
+ /**
+ * Byte offset into document where leading HTML before token starts
+ *
+ * @since 5.0.0
+ * @var int
+ */
+ public $leading_html_start;
+
+ /**
+ * Constructor
+ *
+ * Will populate object properties from the provided arguments.
+ *
+ * @since 5.0.0
+ *
+ * @param WP_Block_Parser_Block $block Full or partial block.
+ * @param int $token_start Byte offset into document for start of parse token.
+ * @param int $token_length Byte length of entire parse token string.
+ * @param int $prev_offset Byte offset into document for after parse token ends.
+ * @param int $leading_html_start Byte offset into document where leading HTML before token starts.
+ */
+ public function __construct( $block, $token_start, $token_length, $prev_offset = null, $leading_html_start = null ) {
+ $this->block = $block;
+ $this->token_start = $token_start;
+ $this->token_length = $token_length;
+ $this->prev_offset = isset( $prev_offset ) ? $prev_offset : $token_start + $token_length;
+ $this->leading_html_start = $leading_html_start;
+ }
+}
</ins></span></pre></div>
<a id="trunksrcwpincludesclasswpblockparserphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-block-parser.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-block-parser.php 2023-06-27 00:21:12 UTC (rev 56047)
+++ trunk/src/wp-includes/class-wp-block-parser.php 2023-06-27 00:43:42 UTC (rev 56048)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6,162 +6,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Class WP_Block_Parser_Block
- *
- * Holds the block structure in memory
- *
- * @since 5.0.0
- */
-class WP_Block_Parser_Block {
- /**
- * Name of block
- *
- * @example "core/paragraph"
- *
- * @since 5.0.0
- * @var string
- */
- public $blockName;
-
- /**
- * Optional set of attributes from block comment delimiters
- *
- * @example null
- * @example array( 'columns' => 3 )
- *
- * @since 5.0.0
- * @var array|null
- */
- public $attrs;
-
- /**
- * List of inner blocks (of this same class)
- *
- * @since 5.0.0
- * @var WP_Block_Parser_Block[]
- */
- public $innerBlocks;
-
- /**
- * Resultant HTML from inside block comment delimiters
- * after removing inner blocks
- *
- * @example "...Just <!-- wp:test /--> testing..." -> "Just testing..."
- *
- * @since 5.0.0
- * @var string
- */
- public $innerHTML;
-
- /**
- * List of string fragments and null markers where inner blocks were found
- *
- * @example array(
- * 'innerHTML' => 'BeforeInnerAfter',
- * 'innerBlocks' => array( block, block ),
- * 'innerContent' => array( 'Before', null, 'Inner', null, 'After' ),
- * )
- *
- * @since 4.2.0
- * @var array
- */
- public $innerContent;
-
- /**
- * Constructor.
- *
- * Will populate object properties from the provided arguments.
- *
- * @since 5.0.0
- *
- * @param string $name Name of block.
- * @param array $attrs Optional set of attributes from block comment delimiters.
- * @param array $innerBlocks List of inner blocks (of this same class).
- * @param string $innerHTML Resultant HTML from inside block comment delimiters after removing inner blocks.
- * @param array $innerContent List of string fragments and null markers where inner blocks were found.
- */
- public function __construct( $name, $attrs, $innerBlocks, $innerHTML, $innerContent ) {
- $this->blockName = $name;
- $this->attrs = $attrs;
- $this->innerBlocks = $innerBlocks;
- $this->innerHTML = $innerHTML;
- $this->innerContent = $innerContent;
- }
-}
-
-/**
- * Class WP_Block_Parser_Frame
- *
- * Holds partial blocks in memory while parsing
- *
- * @internal
- * @since 5.0.0
- */
-class WP_Block_Parser_Frame {
- /**
- * Full or partial block
- *
- * @since 5.0.0
- * @var WP_Block_Parser_Block
- */
- public $block;
-
- /**
- * Byte offset into document for start of parse token
- *
- * @since 5.0.0
- * @var int
- */
- public $token_start;
-
- /**
- * Byte length of entire parse token string
- *
- * @since 5.0.0
- * @var int
- */
- public $token_length;
-
- /**
- * Byte offset into document for after parse token ends
- * (used during reconstruction of stack into parse production)
- *
- * @since 5.0.0
- * @var int
- */
- public $prev_offset;
-
- /**
- * Byte offset into document where leading HTML before token starts
- *
- * @since 5.0.0
- * @var int
- */
- public $leading_html_start;
-
- /**
- * Constructor
- *
- * Will populate object properties from the provided arguments.
- *
- * @since 5.0.0
- *
- * @param WP_Block_Parser_Block $block Full or partial block.
- * @param int $token_start Byte offset into document for start of parse token.
- * @param int $token_length Byte length of entire parse token string.
- * @param int $prev_offset Byte offset into document for after parse token ends.
- * @param int $leading_html_start Byte offset into document where leading HTML before token starts.
- */
- public function __construct( $block, $token_start, $token_length, $prev_offset = null, $leading_html_start = null ) {
- $this->block = $block;
- $this->token_start = $token_start;
- $this->token_length = $token_length;
- $this->prev_offset = isset( $prev_offset ) ? $prev_offset : $token_start + $token_length;
- $this->leading_html_start = $leading_html_start;
- }
-}
-
-/**
</del><span class="cx" style="display: block; padding: 0 10px"> * Class WP_Block_Parser
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Parses a document and constructs a list of parsed block objects
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -470,11 +314,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @internal
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $innerHTML HTML content of block.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $inner_html HTML content of block.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return WP_Block_Parser_Block freeform block object.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public function freeform( $innerHTML ) {
- return new WP_Block_Parser_Block( null, $this->empty_attrs, array(), $innerHTML, array( $innerHTML ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function freeform( $inner_html ) {
+ return new WP_Block_Parser_Block( null, $this->empty_attrs, array(), $inner_html, array( $inner_html ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -553,3 +397,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->output[] = (array) $stack_top->block;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+/**
+ * WP_Block_Parser_Block class.
+ *
+ * Required for backward compatibility in WordPress Core.
+ */
+require_once __DIR__ . '/class-wp-block-parser-block.php';
+
+/**
+ * WP_Block_Parser_Frame class.
+ *
+ * Required for backward compatibility in WordPress Core.
+ */
+require_once __DIR__ . '/class-wp-block-parser-frame.php';
</ins></span></pre></div>
<a id="trunksrcwpsettingsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-settings.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-settings.php 2023-06-27 00:21:12 UTC (rev 56047)
+++ trunk/src/wp-settings.php 2023-06-27 00:43:42 UTC (rev 56048)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -318,6 +318,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/class-wp-block-type-registry.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/class-wp-block.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/class-wp-block-list.php';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+require ABSPATH . WPINC . '/class-wp-block-parser-block.php';
+require ABSPATH . WPINC . '/class-wp-block-parser-frame.php';
</ins><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/class-wp-block-parser.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/blocks.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/blocks/index.php';
</span></span></pre></div>
<a id="trunktoolswebpackpackagesjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tools/webpack/packages.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tools/webpack/packages.js 2023-06-27 00:21:12 UTC (rev 56047)
+++ trunk/tools/webpack/packages.js 2023-06-27 00:43:42 UTC (rev 56048)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -99,7 +99,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> const phpFiles = {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'block-serialization-default-parser/parser.php': 'wp-includes/class-wp-block-parser.php',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'block-serialization-default-parser/class-wp-block-parser.php': 'wp-includes/class-wp-block-parser.php',
+ 'block-serialization-default-parser/class-wp-block-parser-frame.php': 'wp-includes/class-wp-block-parser-frame.php',
+ 'block-serialization-default-parser/class-wp-block-parser-block.php': 'wp-includes/class-wp-block-parser-block.php',
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> const developmentCopies = mapVendorCopies( vendors, buildTarget );
</span></span></pre>
</div>
</div>
</body>
</html>