<!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>[55234] trunk: Editor: Support the `block_types` and `viewport_width` props for remote patterns fetched from Pattern Directory.</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/55234">55234</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/55234","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>flixos90</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2023-02-06 19:38:08 +0000 (Mon, 06 Feb 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: Support the `block_types` and `viewport_width` props for remote patterns fetched from Pattern Directory.
Props ntsekouras, ironprogrammer, hellofromtonya, flixos90.
Fixes <a href="https://core.trac.wordpress.org/ticket/57611">#57611</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesblockpatternsphp">trunk/src/wp-includes/block-patterns.php</a></li>
<li><a href="#trunksrcwpincludesrestapiendpointsclasswprestpatterndirectorycontrollerphp">trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php</a></li>
<li><a href="#trunktestsphpunitdatablockspatterndirectorybrowsealljson">trunk/tests/phpunit/data/blocks/pattern-directory/browse-all.json</a></li>
<li><a href="#trunktestsphpunitdatablockspatterndirectorybrowsecategory2json">trunk/tests/phpunit/data/blocks/pattern-directory/browse-category-2.json</a></li>
<li><a href="#trunktestsphpunitdatablockspatterndirectorybrowsekeyword11json">trunk/tests/phpunit/data/blocks/pattern-directory/browse-keyword-11.json</a></li>
<li><a href="#trunktestsphpunitdatablockspatterndirectorysearchbuttonjson">trunk/tests/phpunit/data/blocks/pattern-directory/search-button.json</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesblockpatternsphp"></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/block-patterns.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/block-patterns.php 2023-02-06 18:53:27 UTC (rev 55233)
+++ trunk/src/wp-includes/block-patterns.php 2023-02-06 19:38:08 UTC (rev 55234)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -159,10 +159,37 @@
</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">+ * Normalize the pattern properties to camelCase.
+ *
+ * The API's format is snake_case, `register_block_pattern()` expects camelCase.
+ *
+ * @since 6.2.0
+ * @access private
+ *
+ * @param array $pattern Pattern as returned from the Pattern Directory API.
+ * @return array Normalized pattern.
+ */
+function wp_normalize_remote_block_pattern( $pattern ) {
+ if ( isset( $pattern['block_types'] ) ) {
+ $pattern['blockTypes'] = $pattern['block_types'];
+ unset( $pattern['block_types'] );
+ }
+
+ if ( isset( $pattern['viewport_width'] ) ) {
+ $pattern['viewportWidth'] = $pattern['viewport_width'];
+ unset( $pattern['viewport_width'] );
+ }
+
+ return (array) $pattern;
+}
+
+/**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Register Core's official patterns from wordpress.org/patterns.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.8.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.9.0 The $current_screen argument was removed.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 6.2.0 Normalize the pattern from the API (snake_case) to the
+ * format expected by `register_block_pattern` (camelCase).
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Screen $deprecated Unused. Formerly the screen that the current request was triggered from.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -196,9 +223,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> $patterns = $response->get_data();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- foreach ( $patterns as $settings ) {
- $pattern_name = 'core/' . sanitize_title( $settings['title'] );
- register_block_pattern( $pattern_name, (array) $settings );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ foreach ( $patterns as $pattern ) {
+ $normalized_pattern = wp_normalize_remote_block_pattern( $pattern );
+ $pattern_name = 'core/' . sanitize_title( $normalized_pattern['title'] );
+ register_block_pattern( $pattern_name, $normalized_pattern );
</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">@@ -207,6 +235,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Register `Featured` (category) patterns from wordpress.org/patterns.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.9.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 6.2.0 Normalized the pattern from the API (snake_case) to the
+ * format expected by `register_block_pattern()` (camelCase).
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function _load_remote_featured_patterns() {
</span><span class="cx" style="display: block; padding: 0 10px"> $supports_core_patterns = get_theme_support( 'core-block-patterns' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -226,14 +256,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> $patterns = $response->get_data();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $registry = WP_Block_Patterns_Registry::get_instance();
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $patterns as $pattern ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $pattern_name = sanitize_title( $pattern['title'] );
- $registry = WP_Block_Patterns_Registry::get_instance();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $normalized_pattern = wp_normalize_remote_block_pattern( $pattern );
+ $pattern_name = sanitize_title( $normalized_pattern['title'] );
</ins><span class="cx" style="display: block; padding: 0 10px"> // Some patterns might be already registered as core patterns with the `core` prefix.
</span><span class="cx" style="display: block; padding: 0 10px"> $is_registered = $registry->is_registered( $pattern_name ) || $registry->is_registered( "core/$pattern_name" );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $is_registered ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- register_block_pattern( $pattern_name, (array) $pattern );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ register_block_pattern( $pattern_name, $normalized_pattern );
</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">@@ -243,6 +273,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * `theme.json` file.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 6.0.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 6.2.0 Normalized the pattern from the API (snake_case) to the
+ * format expected by `register_block_pattern()` (camelCase).
</ins><span class="cx" style="display: block; padding: 0 10px"> * @access private
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function _register_remote_theme_patterns() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -269,11 +301,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $patterns = $response->get_data();
</span><span class="cx" style="display: block; padding: 0 10px"> $patterns_registry = WP_Block_Patterns_Registry::get_instance();
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $patterns as $pattern ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $pattern_name = sanitize_title( $pattern['title'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $normalized_pattern = wp_normalize_remote_block_pattern( $pattern );
+ $pattern_name = sanitize_title( $normalized_pattern['title'] );
</ins><span class="cx" style="display: block; padding: 0 10px"> // Some patterns might be already registered as core patterns with the `core` prefix.
</span><span class="cx" style="display: block; padding: 0 10px"> $is_registered = $patterns_registry->is_registered( $pattern_name ) || $patterns_registry->is_registered( "core/$pattern_name" );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $is_registered ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- register_block_pattern( $pattern_name, (array) $pattern );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ register_block_pattern( $pattern_name, $normalized_pattern );
</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="trunksrcwpincludesrestapiendpointsclasswprestpatterndirectorycontrollerphp"></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/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php 2023-02-06 18:53:27 UTC (rev 55233)
+++ trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php 2023-02-06 19:38:08 UTC (rev 55234)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -103,7 +103,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'search' => true,
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => true,
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $query_args = array_intersect_key( $request->get_params(), $valid_query_args );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $query_args = array_intersect_key( $request->get_params(), $valid_query_args );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $query_args['locale'] = get_user_locale();
</span><span class="cx" style="display: block; padding: 0 10px"> $query_args['wp-version'] = $wp_version; // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- it's defined in `version.php` above.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -202,6 +202,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'keywords' => array_map( 'sanitize_text_field', explode( ',', $raw_pattern->meta->wpop_keywords ) ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'description' => sanitize_text_field( $raw_pattern->meta->wpop_description ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'viewport_width' => absint( $raw_pattern->meta->wpop_viewport_width ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'block_types' => array_map( 'sanitize_text_field', $raw_pattern->meta->wpop_block_types ),
</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"> $prepared_pattern = $this->add_additional_fields_to_object( $prepared_pattern, $request );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -224,6 +225,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Retrieves the block pattern's schema, conforming to JSON Schema.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.8.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 6.2.0 Added `'block_types'` to schema.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array Item schema data.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -286,6 +288,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'type' => 'integer',
</span><span class="cx" style="display: block; padding: 0 10px"> 'context' => array( 'view', 'edit', 'embed' ),
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ 'block_types' => array(
+ 'description' => __( 'The block types which can use this pattern.' ),
+ 'type' => 'array',
+ 'uniqueItems' => true,
+ 'items' => array( 'type' => 'string' ),
+ 'context' => array( 'view', 'embed' ),
+ ),
</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="trunktestsphpunitdatablockspatterndirectorybrowsealljson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/data/blocks/pattern-directory/browse-all.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/data/blocks/pattern-directory/browse-all.json 2023-02-06 18:53:27 UTC (rev 55233)
+++ trunk/tests/phpunit/data/blocks/pattern-directory/browse-all.json 2023-02-06 19:38:08 UTC (rev 55234)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -10,7 +10,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "spay_email": "",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_description": "A heading preceded by a chapter number, and followed by a paragraph.",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_keywords": "blog post",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "wpop_viewport_width": 1000
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "wpop_viewport_width": 1000,
+ "wpop_block_types": [ "core/heading" ]
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "category_slugs": [ "text" ],
</span><span class="cx" style="display: block; padding: 0 10px"> "keyword_slugs": [ "core" ],
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -27,7 +28,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "spay_email": "",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_description": "A large hero section with an example background image and a heading in the center.",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_keywords": "header, hero",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "wpop_viewport_width": 1000
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "wpop_viewport_width": 1000,
+ "wpop_block_types": []
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "category_slugs": [ "header" ],
</span><span class="cx" style="display: block; padding: 0 10px"> "keyword_slugs": [ "core" ],
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -44,7 +46,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "spay_email": "",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_description": "A large hero section with a bright gradient background, a big heading and a filled button.",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_keywords": "call to action, hero section",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "wpop_viewport_width": 1000
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "wpop_viewport_width": 1000,
+ "wpop_block_types": []
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "category_slugs": [ "header" ],
</span><span class="cx" style="display: block; padding: 0 10px"> "keyword_slugs": [ "core" ],
</span></span></pre></div>
<a id="trunktestsphpunitdatablockspatterndirectorybrowsecategory2json"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/data/blocks/pattern-directory/browse-category-2.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/data/blocks/pattern-directory/browse-category-2.json 2023-02-06 18:53:27 UTC (rev 55233)
+++ trunk/tests/phpunit/data/blocks/pattern-directory/browse-category-2.json 2023-02-06 19:38:08 UTC (rev 55234)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -10,7 +10,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "spay_email": "",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_description": "Three filled buttons with rounded corners, side by side.",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_keywords": "",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "wpop_viewport_width": 600
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "wpop_viewport_width": 600,
+ "wpop_block_types": []
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "category_slugs": [ "buttons" ],
</span><span class="cx" style="display: block; padding: 0 10px"> "keyword_slugs": [ "core" ],
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -27,7 +28,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "spay_email": "",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_description": "Two buttons, one filled and one outlined, side by side.",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_keywords": "",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "wpop_viewport_width": 500
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "wpop_viewport_width": 500,
+ "wpop_block_types": []
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "category_slugs": [ "buttons" ],
</span><span class="cx" style="display: block; padding: 0 10px"> "keyword_slugs": [ "core" ],
</span></span></pre></div>
<a id="trunktestsphpunitdatablockspatterndirectorybrowsekeyword11json"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/data/blocks/pattern-directory/browse-keyword-11.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/data/blocks/pattern-directory/browse-keyword-11.json 2023-02-06 18:53:27 UTC (rev 55233)
+++ trunk/tests/phpunit/data/blocks/pattern-directory/browse-keyword-11.json 2023-02-06 19:38:08 UTC (rev 55234)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -10,7 +10,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "spay_email": "",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_description": "A heading preceded by a chapter number, and followed by a paragraph.",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_keywords": "",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "wpop_viewport_width": 1000
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "wpop_viewport_width": 1000,
+ "wpop_block_types": []
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "category_slugs": [ "text" ],
</span><span class="cx" style="display: block; padding: 0 10px"> "keyword_slugs": [ "core" ],
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -27,7 +28,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "spay_email": "",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_description": "A large hero section with an example background image and a heading in the center.",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_keywords": "",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "wpop_viewport_width": 1000
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "wpop_viewport_width": 1000,
+ "wpop_block_types": []
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "category_slugs": [ "header" ],
</span><span class="cx" style="display: block; padding: 0 10px"> "keyword_slugs": [ "core" ],
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -44,7 +46,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "spay_email": "",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_description": "A large hero section with a bright gradient background, a big heading and a filled button.",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_keywords": "",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "wpop_viewport_width": 1000
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "wpop_viewport_width": 1000,
+ "wpop_block_types": []
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "category_slugs": [ "header" ],
</span><span class="cx" style="display: block; padding: 0 10px"> "keyword_slugs": [ "core" ],
</span></span></pre></div>
<a id="trunktestsphpunitdatablockspatterndirectorysearchbuttonjson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/data/blocks/pattern-directory/search-button.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/data/blocks/pattern-directory/search-button.json 2023-02-06 18:53:27 UTC (rev 55233)
+++ trunk/tests/phpunit/data/blocks/pattern-directory/search-button.json 2023-02-06 19:38:08 UTC (rev 55234)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -10,7 +10,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "spay_email": "",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_description": "A large hero section with a bright gradient background, a big heading and a filled button.",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_keywords": "",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "wpop_viewport_width": 1000
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "wpop_viewport_width": 1000,
+ "wpop_block_types": []
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "category_slugs": [ "header" ],
</span><span class="cx" style="display: block; padding: 0 10px"> "keyword_slugs": [ "core" ],
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -27,7 +28,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "spay_email": "",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_description": "Three small columns of text, each with an outlined button with rounded corners at the bottom.",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_keywords": "",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "wpop_viewport_width": 1000
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "wpop_viewport_width": 1000,
+ "wpop_block_types": []
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "category_slugs": [ "columns" ],
</span><span class="cx" style="display: block; padding: 0 10px"> "keyword_slugs": [ "core" ],
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -44,7 +46,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "spay_email": "",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_description": "Three filled buttons with rounded corners, side by side.",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_keywords": "",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "wpop_viewport_width": 600
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "wpop_viewport_width": 600,
+ "wpop_block_types": []
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "category_slugs": [ "buttons" ],
</span><span class="cx" style="display: block; padding: 0 10px"> "keyword_slugs": [ "core" ],
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -61,7 +64,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "spay_email": "",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_description": "Two buttons, one filled and one outlined, side by side.",
</span><span class="cx" style="display: block; padding: 0 10px"> "wpop_keywords": "",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "wpop_viewport_width": 500
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "wpop_viewport_width": 500,
+ "wpop_block_types": []
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "category_slugs": [ "buttons" ],
</span><span class="cx" style="display: block; padding: 0 10px"> "keyword_slugs": [ "core" ],
</span></span></pre>
</div>
</div>
</body>
</html>