<!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>[43918] branches/5.0: REST API: Preserve unknown, respect `null` in server-side block rendering.</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/43918">43918</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/43918","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>danielbachhuber</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2018-11-21 14:43:33 +0000 (Wed, 21 Nov 2018)</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'>REST API: Preserve unknown, respect `null` in server-side block rendering.

* Skips validation where there is no attribute definition, but keeps the attribute value. Previously, the attribute would be omitted from the attributes passed to `render_callback`. Notably, this resolves an issue where `render_callback` cannot receive a block's `align` and `customClassName` attribute values, since these are defined as a client-side filter.
* Validates `null` as a proper value in its own right. Previously, a client implementation of a block could track `{"attribute":null}` as an explicitly empty value, and the server would wrongly initiate defaulting behavior. The new behavior will now only populate a default value if the attribute is not defined at all, including when unset in its being invalid per the attribute schema.

Props aduth, noisysocks, youknowriad.
See <a href="https://core.trac.wordpress.org/ticket/45145">#45145</a> for the patch, <a href="https://core.trac.wordpress.org/ticket/45098">#45098</a> for the original ticket.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branches50srcwpincludesclasswpblocktypephp">branches/5.0/src/wp-includes/class-wp-block-type.php</a></li>
<li><a href="#branches50srcwpincludesrestapiendpointsclasswprestblockrenderercontrollerphp">branches/5.0/src/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php</a></li>
<li><a href="#branches50testsphpunittestsblocksblocktypephp">branches/5.0/tests/phpunit/tests/blocks/block-type.php</a></li>
<li><a href="#branches50testsphpunittestsrestapirestblockrenderercontrollerphp">branches/5.0/tests/phpunit/tests/rest-api/rest-block-renderer-controller.php</a></li>
<li><a href="#branches50testsqunitfixtureswpapigeneratedjs">branches/5.0/tests/qunit/fixtures/wp-api-generated.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branches50srcwpincludesclasswpblocktypephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.0/src/wp-includes/class-wp-block-type.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/src/wp-includes/class-wp-block-type.php      2018-11-21 14:34:09 UTC (rev 43917)
+++ branches/5.0/src/wp-includes/class-wp-block-type.php        2018-11-21 14:43:33 UTC (rev 43918)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -123,7 +123,7 @@
</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">         * Validates attributes against the current block schema, populating
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * defaulted and missing values, and omitting unknown attributes.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * defaulted and missing values.
</ins><span class="cx" style="display: block; padding: 0 10px">          *
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 5.0.0
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -131,30 +131,41 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @return array             Prepared block attributes.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function prepare_attributes_for_render( $attributes ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                // If there are no attribute definitions for the block type, skip
+               // processing and return vebatim.
</ins><span class="cx" style="display: block; padding: 0 10px">                 if ( ! isset( $this->attributes ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        return $attributes;
</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">-                $prepared_attributes = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         foreach ( $attributes as $attribute_name => $value ) {
+                       // If the attribute is not defined by the block type, it cannot be
+                       // validated.
+                       if ( ! isset( $this->attributes[ $attribute_name ] ) ) {
+                               continue;
+                       }
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                foreach ( $this->attributes as $attribute_name => $schema ) {
-                       $value = null;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $schema = $this->attributes[ $attribute_name ];
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        if ( isset( $attributes[ $attribute_name ] ) ) {
-                               $is_valid = rest_validate_value_from_schema( $attributes[ $attribute_name ], $schema );
-                               if ( ! is_wp_error( $is_valid ) ) {
-                                       $value = rest_sanitize_value_from_schema( $attributes[ $attribute_name ], $schema );
-                               }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 // Validate value by JSON schema. An invalid value should revert to
+                       // its default, if one exists. This occurs by virtue of the missing
+                       // attributes loop immediately following. If there is not a default
+                       // assigned, the attribute value should remain unset.
+                       $is_valid = rest_validate_value_from_schema( $value, $schema );
+                       if ( is_wp_error( $is_valid ) ) {
+                               unset( $attributes[ $attribute_name ] );
</ins><span class="cx" style="display: block; padding: 0 10px">                         }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                }
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        if ( is_null( $value ) && isset( $schema['default'] ) ) {
-                               $value = $schema['default'];
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // Populate values of any missing attributes for which the block type
+               // defines a default.
+               $missing_schema_attributes = array_diff_key( $this->attributes, $attributes );
+               foreach ( $missing_schema_attributes as $attribute_name => $schema ) {
+                       if ( isset( $schema['default'] ) ) {
+                               $attributes[ $attribute_name ] = $schema['default'];
</ins><span class="cx" style="display: block; padding: 0 10px">                         }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-                       $prepared_attributes[ $attribute_name ] = $value;
</del><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">-                return $prepared_attributes;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         return $attributes;
</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></pre></div>
<a id="branches50srcwpincludesrestapiendpointsclasswprestblockrenderercontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.0/src/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/src/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php       2018-11-21 14:34:09 UTC (rev 43917)
+++ branches/5.0/src/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php 2018-11-21 14:43:33 UTC (rev 43918)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -61,6 +61,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                                'type'                 => 'object',
</span><span class="cx" style="display: block; padding: 0 10px">                                                                'additionalProperties' => false,
</span><span class="cx" style="display: block; padding: 0 10px">                                                                'properties'           => $block_type->get_attributes(),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                                                'default'              => array(),
</ins><span class="cx" style="display: block; padding: 0 10px">                                                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                                                        'post_id'    => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                                                'description' => __( 'ID of the post context.' ),
</span></span></pre></div>
<a id="branches50testsphpunittestsblocksblocktypephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.0/tests/phpunit/tests/blocks/block-type.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/tests/blocks/block-type.php    2018-11-21 14:34:09 UTC (rev 43917)
+++ branches/5.0/tests/phpunit/tests/blocks/block-type.php      2018-11-21 14:43:33 UTC (rev 43918)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -168,7 +168,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'wrongType'          => 5,
</span><span class="cx" style="display: block; padding: 0 10px">                        'wrongTypeDefaulted' => 5,
</span><span class="cx" style="display: block; padding: 0 10px">                        /* missingDefaulted */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'undefined'          => 'omit',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 'undefined'          => 'include',
+                       'intendedNull'       => null,
</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">                $block_type = new WP_Block_Type(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -189,6 +190,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                'type'    => 'string',
</span><span class="cx" style="display: block; padding: 0 10px">                                                'default' => 'define',
</span><span class="cx" style="display: block; padding: 0 10px">                                        ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                        'intendedNull'       => array(
+                                               'type'    => array( 'string', 'null' ),
+                                               'default' => 'wrong',
+                                       ),
</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">@@ -198,9 +203,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'correct'            => 'include',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'wrongType'          => null,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         /* wrongType */
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'wrongTypeDefaulted' => 'defaulted',
</span><span class="cx" style="display: block; padding: 0 10px">                                'missingDefaulted'   => 'define',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'undefined'          => 'include',
+                               'intendedNull'       => null,
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        $prepared_attributes
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -207,6 +214,19 @@
</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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         * @ticket 45145
+        */
+       function test_prepare_attributes_none_defined() {
+               $attributes = array( 'exists' => 'keep' );
+
+               $block_type = new WP_Block_Type( 'core/dummy', array() );
+
+               $prepared_attributes = $block_type->prepare_attributes_for_render( $attributes );
+
+               $this->assertEquals( $attributes, $prepared_attributes );
+       }
+
+       /**
</ins><span class="cx" style="display: block; padding: 0 10px">          * @ticket 45097
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_has_block_with_mixed_content() {
</span></span></pre></div>
<a id="branches50testsphpunittestsrestapirestblockrenderercontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.0/tests/phpunit/tests/rest-api/rest-block-renderer-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/tests/rest-api/rest-block-renderer-controller.php      2018-11-21 14:34:09 UTC (rev 43917)
+++ branches/5.0/tests/phpunit/tests/rest-api/rest-block-renderer-controller.php        2018-11-21 14:43:33 UTC (rev 43918)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -319,7 +319,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $block_type = WP_Block_Type_Registry::get_instance()->get_registered( self::$block_name );
</span><span class="cx" style="display: block; padding: 0 10px">                $defaults   = array();
</span><span class="cx" style="display: block; padding: 0 10px">                foreach ( $block_type->attributes as $key => $attribute ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $defaults[ $key ] = isset( $attribute['default'] ) ? $attribute['default'] : null;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 if ( isset( $attribute['default'] ) ) {
+                               $defaults[ $key ] = $attribute['default'];
+                       }
</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">                $request = new WP_REST_Request( 'GET', self::$rest_api_route . self::$block_name );
</span></span></pre></div>
<a id="branches50testsqunitfixtureswpapigeneratedjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.0/tests/qunit/fixtures/wp-api-generated.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/qunit/fixtures/wp-api-generated.js     2018-11-21 14:34:09 UTC (rev 43917)
+++ branches/5.0/tests/qunit/fixtures/wp-api-generated.js       2018-11-21 14:43:33 UTC (rev 43918)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4314,6 +4314,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                         },
</span><span class="cx" style="display: block; padding: 0 10px">                         "attributes": {
</span><span class="cx" style="display: block; padding: 0 10px">                             "required": false,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                            "default": [],
</ins><span class="cx" style="display: block; padding: 0 10px">                             "description": "Attributes for core/block block",
</span><span class="cx" style="display: block; padding: 0 10px">                             "type": "object"
</span><span class="cx" style="display: block; padding: 0 10px">                         },
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4353,6 +4354,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                         },
</span><span class="cx" style="display: block; padding: 0 10px">                         "attributes": {
</span><span class="cx" style="display: block; padding: 0 10px">                             "required": false,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                            "default": [],
</ins><span class="cx" style="display: block; padding: 0 10px">                             "description": "Attributes for core/latest-comments block",
</span><span class="cx" style="display: block; padding: 0 10px">                             "type": "object"
</span><span class="cx" style="display: block; padding: 0 10px">                         },
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4392,6 +4394,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                         },
</span><span class="cx" style="display: block; padding: 0 10px">                         "attributes": {
</span><span class="cx" style="display: block; padding: 0 10px">                             "required": false,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                            "default": [],
</ins><span class="cx" style="display: block; padding: 0 10px">                             "description": "Attributes for core/archives block",
</span><span class="cx" style="display: block; padding: 0 10px">                             "type": "object"
</span><span class="cx" style="display: block; padding: 0 10px">                         },
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4431,6 +4434,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                         },
</span><span class="cx" style="display: block; padding: 0 10px">                         "attributes": {
</span><span class="cx" style="display: block; padding: 0 10px">                             "required": false,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                            "default": [],
</ins><span class="cx" style="display: block; padding: 0 10px">                             "description": "Attributes for core/categories block",
</span><span class="cx" style="display: block; padding: 0 10px">                             "type": "object"
</span><span class="cx" style="display: block; padding: 0 10px">                         },
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4470,6 +4474,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                         },
</span><span class="cx" style="display: block; padding: 0 10px">                         "attributes": {
</span><span class="cx" style="display: block; padding: 0 10px">                             "required": false,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                            "default": [],
</ins><span class="cx" style="display: block; padding: 0 10px">                             "description": "Attributes for core/latest-posts block",
</span><span class="cx" style="display: block; padding: 0 10px">                             "type": "object"
</span><span class="cx" style="display: block; padding: 0 10px">                         },
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4509,6 +4514,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                         },
</span><span class="cx" style="display: block; padding: 0 10px">                         "attributes": {
</span><span class="cx" style="display: block; padding: 0 10px">                             "required": false,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                            "default": [],
</ins><span class="cx" style="display: block; padding: 0 10px">                             "description": "Attributes for core/shortcode block",
</span><span class="cx" style="display: block; padding: 0 10px">                             "type": "object"
</span><span class="cx" style="display: block; padding: 0 10px">                         },
</span></span></pre>
</div>
</div>

</body>
</html>