From 8243a1c9f6561c2dcbd0874349e044a5467c9321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20=28Greg=29=20Zi=C3=B3=C5=82kowski?= Date: Tue, 26 Mar 2019 16:34:45 +0100 Subject: [PATCH] Block library: Standardize align and className attributes for dynamic blocks (#14533) * Block library: Refactor blocks to use supports align * Block libraray: Remove obsolete save fields which render nothing * Block library: Standardize align and className attributes for dynamic blocks * Update align options for dynamic blocks * Fixed the RSS block. Added alignment class and revised the code to look a bit more like the Latest Posts block. * Fixed the Search block alignment issue. Also added ability for classname onto RSS block. * Update CHANGELOG file for block library package * Make phpcs happy with code styles in rss block * Regenerate server registered blocks fixture for tests --- packages/block-library/CHANGELOG.md | 8 ++++-- packages/block-library/src/archives/edit.js | 17 ++---------- packages/block-library/src/archives/index.js | 8 +----- packages/block-library/src/archives/index.php | 1 + packages/block-library/src/block/index.js | 8 ------ packages/block-library/src/block/index.php | 1 - packages/block-library/src/calendar/index.php | 1 + .../block-library/src/categories/index.js | 16 ----------- .../block-library/src/categories/index.php | 21 +++++++++++++++ .../block-library/src/latest-posts/edit.js | 9 +------ .../block-library/src/latest-posts/index.js | 8 +----- .../block-library/src/latest-posts/index.php | 9 ++++--- .../block-library/src/legacy-widget/index.php | 3 +++ packages/block-library/src/rss/editor.scss | 3 +++ packages/block-library/src/rss/index.js | 1 + packages/block-library/src/rss/index.php | 27 +++++++++++++++++-- packages/block-library/src/rss/style.scss | 1 + packages/block-library/src/search/index.js | 4 +++ packages/block-library/src/search/index.php | 12 ++++++++- packages/block-library/src/shortcode/index.js | 7 ----- .../block-library/src/shortcode/index.php | 6 +++++ .../block-library/src/tag-cloud/index.php | 13 ++++----- .../fixtures/blocks/core__rss.parsed.json | 8 +++--- .../fixtures/blocks/core__rss.serialized.html | 2 +- .../core__search__custom-text.parsed.json | 4 +-- .../core__search__custom-text.serialized.html | 2 +- ...core__tag-cloud__showTagCounts.parsed.json | 4 +-- ...__tag-cloud__showTagCounts.serialized.html | 2 +- .../fixtures/blocks/core__video.json | 4 +-- .../full-content/server-registered.json | 2 +- 30 files changed, 114 insertions(+), 98 deletions(-) diff --git a/packages/block-library/CHANGELOG.md b/packages/block-library/CHANGELOG.md index 30a19230105eaa..78b2c131870dc3 100644 --- a/packages/block-library/CHANGELOG.md +++ b/packages/block-library/CHANGELOG.md @@ -1,6 +1,10 @@ -## 2.4.0 (Unreleased) +## 2.5.0 (Unreleased) -- Add vertical alignment controls to `columns` Block ([#13899](https://github.com/WordPress/gutenberg/pull/13899/)). +- Add vertical alignment controls to Columns Block ([#13899](https://github.com/WordPress/gutenberg/pull/13899/)). +- Add `wide` and `full` alignments to Archives block ([#14533](https://github.com/WordPress/gutenberg/pull/14533)). +- Add `wide` and `full` alignments to Categories block ([#14533](https://github.com/WordPress/gutenberg/pull/14533)). +- Add all alignment options to RSS block ([#14533](https://github.com/WordPress/gutenberg/pull/14533)). +- Add all alignment options to Search block ([#14533](https://github.com/WordPress/gutenberg/pull/14533)). ### Bug Fixes diff --git a/packages/block-library/src/archives/edit.js b/packages/block-library/src/archives/edit.js index 51f9df96f147fc..485233ce5c8eb4 100644 --- a/packages/block-library/src/archives/edit.js +++ b/packages/block-library/src/archives/edit.js @@ -8,15 +8,11 @@ import { Disabled, } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; -import { - InspectorControls, - BlockAlignmentToolbar, - BlockControls, -} from '@wordpress/block-editor'; +import { InspectorControls } from '@wordpress/block-editor'; import { ServerSideRender } from '@wordpress/editor'; export default function ArchivesEdit( { attributes, setAttributes } ) { - const { align, showPostCounts, displayAsDropdown } = attributes; + const { showPostCounts, displayAsDropdown } = attributes; return ( @@ -34,15 +30,6 @@ export default function ArchivesEdit( { attributes, setAttributes } ) { /> - - { - setAttributes( { align: nextAlign } ); - } } - controls={ [ 'left', 'center', 'right' ] } - /> - diff --git a/packages/block-library/src/archives/index.js b/packages/block-library/src/archives/index.js index a9a11bca417b9b..63643a023027d0 100644 --- a/packages/block-library/src/archives/index.js +++ b/packages/block-library/src/archives/index.js @@ -21,15 +21,9 @@ export const settings = { category: 'widgets', supports: { + align: true, html: false, }, - getEditWrapperProps( attributes ) { - const { align } = attributes; - if ( [ 'left', 'center', 'right' ].includes( align ) ) { - return { 'data-align': align }; - } - }, - edit, }; diff --git a/packages/block-library/src/archives/index.php b/packages/block-library/src/archives/index.php index 435f7b7536f367..7f744f1fd49a57 100644 --- a/packages/block-library/src/archives/index.php +++ b/packages/block-library/src/archives/index.php @@ -126,6 +126,7 @@ function register_block_core_archives() { 'attributes' => array( 'align' => array( 'type' => 'string', + 'enum' => array( 'left', 'center', 'right', 'wide', 'full' ), ), 'className' => array( 'type' => 'string', diff --git a/packages/block-library/src/block/index.js b/packages/block-library/src/block/index.js index 2a3b451f8f2a98..27de14d6a32959 100644 --- a/packages/block-library/src/block/index.js +++ b/packages/block-library/src/block/index.js @@ -17,12 +17,6 @@ export const settings = { description: __( 'Create content, and save it for you and other contributors to reuse across your site. Update the block, and the changes apply everywhere it’s used.' ), - attributes: { - ref: { - type: 'number', - }, - }, - supports: { customClassName: false, html: false, @@ -30,6 +24,4 @@ export const settings = { }, edit, - - save: () => null, }; diff --git a/packages/block-library/src/block/index.php b/packages/block-library/src/block/index.php index 2f68a3750d154a..24d2ab570a9ecc 100644 --- a/packages/block-library/src/block/index.php +++ b/packages/block-library/src/block/index.php @@ -41,7 +41,6 @@ function register_block_core_block() { 'type' => 'number', ), ), - 'render_callback' => 'render_block_core_block', ) ); diff --git a/packages/block-library/src/calendar/index.php b/packages/block-library/src/calendar/index.php index 54587a47a9dc3e..3d2e8061ba5d69 100644 --- a/packages/block-library/src/calendar/index.php +++ b/packages/block-library/src/calendar/index.php @@ -58,6 +58,7 @@ function register_block_core_calendar() { 'attributes' => array( 'align' => array( 'type' => 'string', + 'enum' => array( 'left', 'center', 'right', 'wide', 'full' ), ), 'className' => array( 'type' => 'string', diff --git a/packages/block-library/src/categories/index.js b/packages/block-library/src/categories/index.js index 8eccf1abf963e9..b3d5867f8ede41 100644 --- a/packages/block-library/src/categories/index.js +++ b/packages/block-library/src/categories/index.js @@ -20,24 +20,8 @@ export const settings = { category: 'widgets', - attributes: { - displayAsDropdown: { - type: 'boolean', - default: false, - }, - showHierarchy: { - type: 'boolean', - default: false, - }, - showPostCounts: { - type: 'boolean', - default: false, - }, - }, - supports: { align: true, - alignWide: false, html: false, }, diff --git a/packages/block-library/src/categories/index.php b/packages/block-library/src/categories/index.php index a995e447e28c35..46272f8ebf86cd 100644 --- a/packages/block-library/src/categories/index.php +++ b/packages/block-library/src/categories/index.php @@ -94,6 +94,27 @@ function register_block_core_categories() { register_block_type( 'core/categories', array( + 'attributes' => array( + 'align' => array( + 'type' => 'string', + 'enum' => array( 'left', 'center', 'right', 'wide', 'full' ), + ), + 'className' => array( + 'type' => 'string', + ), + 'displayAsDropdown' => array( + 'type' => 'boolean', + 'default' => false, + ), + 'showHierarchy' => array( + 'type' => 'boolean', + 'default' => false, + ), + 'showPostCounts' => array( + 'type' => 'boolean', + 'default' => false, + ), + ), 'render_callback' => 'render_block_core_categories', ) ); diff --git a/packages/block-library/src/latest-posts/edit.js b/packages/block-library/src/latest-posts/edit.js index 542c813ec2d329..e8b6896ae514d3 100644 --- a/packages/block-library/src/latest-posts/edit.js +++ b/packages/block-library/src/latest-posts/edit.js @@ -27,7 +27,6 @@ import { __ } from '@wordpress/i18n'; import { dateI18n, format, __experimentalGetSettings } from '@wordpress/date'; import { InspectorControls, - BlockAlignmentToolbar, BlockControls, } from '@wordpress/block-editor'; import { withSelect } from '@wordpress/data'; @@ -82,7 +81,7 @@ class LatestPostsEdit extends Component { render() { const { attributes, setAttributes, latestPosts } = this.props; const { categoriesList } = this.state; - const { displayPostDate, align, postLayout, columns, order, orderBy, categories, postsToShow } = attributes; + const { displayPostDate, postLayout, columns, order, orderBy, categories, postsToShow } = attributes; const inspectorControls = ( @@ -160,12 +159,6 @@ class LatestPostsEdit extends Component { { inspectorControls } - { - setAttributes( { align: nextAlign } ); - } } - />
    array( - 'categories' => array( + 'align' => array( 'type' => 'string', + 'enum' => array( 'left', 'center', 'right', 'wide', 'full' ), ), 'className' => array( 'type' => 'string', ), + 'categories' => array( + 'type' => 'string', + ), 'postsToShow' => array( 'type' => 'number', 'default' => 5, @@ -111,9 +115,6 @@ function register_block_core_latest_posts() { 'type' => 'number', 'default' => 3, ), - 'align' => array( - 'type' => 'string', - ), 'order' => array( 'type' => 'string', 'default' => 'desc', diff --git a/packages/block-library/src/legacy-widget/index.php b/packages/block-library/src/legacy-widget/index.php index b812f8e3c710ff..7f06f086aa7295 100644 --- a/packages/block-library/src/legacy-widget/index.php +++ b/packages/block-library/src/legacy-widget/index.php @@ -60,6 +60,9 @@ function register_block_core_legacy_widget() { 'core/legacy-widget', array( 'attributes' => array( + 'className' => array( + 'type' => 'string', + ), 'identifier' => array( 'type' => 'string', ), diff --git a/packages/block-library/src/rss/editor.scss b/packages/block-library/src/rss/editor.scss index 8632c5e101b005..4cc6b44e5b469d 100644 --- a/packages/block-library/src/rss/editor.scss +++ b/packages/block-library/src/rss/editor.scss @@ -4,3 +4,6 @@ padding-left: 0; } } +.wp-block-rss li a > div { + display: inline; +} diff --git a/packages/block-library/src/rss/index.js b/packages/block-library/src/rss/index.js index bd8d523eb62856..649b974a956902 100644 --- a/packages/block-library/src/rss/index.js +++ b/packages/block-library/src/rss/index.js @@ -22,6 +22,7 @@ export const settings = { keywords: [ __( 'atom' ), __( 'feed' ) ], supports: { + align: true, html: false, }, diff --git a/packages/block-library/src/rss/index.php b/packages/block-library/src/rss/index.php index 65a77d91823609..92406d09b6b1d6 100644 --- a/packages/block-library/src/rss/index.php +++ b/packages/block-library/src/rss/index.php @@ -79,8 +79,24 @@ function render_block_core_rss( $attributes ) { $list_items .= "
  • {$title}{$date}{$author}{$excerpt}
  • "; } - $classes = 'grid' === $attributes['blockLayout'] ? ' is-grid columns-' . $attributes['columns'] : ''; - $list_items_markup = "
      {$list_items}
    "; + $class = 'wp-block-rss'; + if ( isset( $attributes['align'] ) ) { + $class .= ' align' . $attributes['align']; + } + + if ( isset( $attributes['blockLayout'] ) && 'grid' === $attributes['blockLayout'] ) { + $class .= ' is-grid'; + } + + if ( isset( $attributes['columns'] ) && 'grid' === $attributes['blockLayout'] ) { + $class .= ' columns-' . $attributes['columns']; + } + + if ( isset( $attributes['className'] ) ) { + $class .= ' ' . $attributes['className']; + } + + $list_items_markup = "
      {$list_items}
    "; // PHP 5.2 compatibility. See: http://simplepie.org/wiki/faq/i_m_getting_memory_leaks. $rss->__destruct(); @@ -96,6 +112,13 @@ function register_block_core_rss() { register_block_type( 'core/rss', array( 'attributes' => array( + 'align' => array( + 'type' => 'string', + 'enum' => array( 'left', 'center', 'right', 'wide', 'full' ), + ), + 'className' => array( + 'type' => 'string', + ), 'columns' => array( 'type' => 'number', 'default' => 2, diff --git a/packages/block-library/src/rss/style.scss b/packages/block-library/src/rss/style.scss index a2ad8d4060dfff..14bae6e85bde37 100644 --- a/packages/block-library/src/rss/style.scss +++ b/packages/block-library/src/rss/style.scss @@ -30,6 +30,7 @@ .wp-block-rss__item-publish-date, .wp-block-rss__item-author { + display: block; color: $dark-gray-300; font-size: $default-font-size; } diff --git a/packages/block-library/src/search/index.js b/packages/block-library/src/search/index.js index 4d51919e5d663d..2860e359314ad6 100644 --- a/packages/block-library/src/search/index.js +++ b/packages/block-library/src/search/index.js @@ -21,5 +21,9 @@ export const settings = { keywords: [ __( 'find' ) ], + supports: { + align: true, + }, + edit, }; diff --git a/packages/block-library/src/search/index.php b/packages/block-library/src/search/index.php index 3f344da4781a0d..7952a9085c51f0 100644 --- a/packages/block-library/src/search/index.php +++ b/packages/block-library/src/search/index.php @@ -44,6 +44,10 @@ function render_block_core_search( $attributes ) { $class .= ' ' . $attributes['className']; } + if ( isset( $attributes['align'] ) ) { + $class .= ' align' . $attributes['align']; + } + return sprintf( '', $class, @@ -60,6 +64,13 @@ function register_block_core_search() { 'core/search', array( 'attributes' => array( + 'align' => array( + 'type' => 'string', + 'enum' => array( 'left', 'center', 'right', 'wide', 'full' ), + ), + 'className' => array( + 'type' => 'string', + ), 'label' => array( 'type' => 'string', 'default' => __( 'Search' ), @@ -73,7 +84,6 @@ function register_block_core_search() { 'default' => __( 'Search' ), ), ), - 'render_callback' => 'render_block_core_search', ) ); diff --git a/packages/block-library/src/shortcode/index.js b/packages/block-library/src/shortcode/index.js index 6d497a0e29aca9..ab872ec6647928 100644 --- a/packages/block-library/src/shortcode/index.js +++ b/packages/block-library/src/shortcode/index.js @@ -19,13 +19,6 @@ export const settings = { category: 'widgets', - attributes: { - text: { - type: 'string', - source: 'html', - }, - }, - transforms: { from: [ { diff --git a/packages/block-library/src/shortcode/index.php b/packages/block-library/src/shortcode/index.php index c3bb4c9449b08c..79df091f8a3d3c 100644 --- a/packages/block-library/src/shortcode/index.php +++ b/packages/block-library/src/shortcode/index.php @@ -24,6 +24,12 @@ function register_block_core_shortcode() { register_block_type( 'core/shortcode', array( + 'attributes' => array( + 'text' => array( + 'type' => 'string', + 'source' => 'html', + ), + ), 'render_callback' => 'render_block_core_shortcode', ) ); diff --git a/packages/block-library/src/tag-cloud/index.php b/packages/block-library/src/tag-cloud/index.php index 46cd0e66062201..6786e076b80f1d 100644 --- a/packages/block-library/src/tag-cloud/index.php +++ b/packages/block-library/src/tag-cloud/index.php @@ -48,20 +48,21 @@ function register_block_core_tag_cloud() { 'core/tag-cloud', array( 'attributes' => array( - 'taxonomy' => array( - 'type' => 'string', - 'default' => 'post_tag', + 'align' => array( + 'type' => 'string', + 'enum' => array( 'left', 'center', 'right', 'wide', 'full' ), ), 'className' => array( 'type' => 'string', ), + 'taxonomy' => array( + 'type' => 'string', + 'default' => 'post_tag', + ), 'showTagCounts' => array( 'type' => 'boolean', 'default' => false, ), - 'align' => array( - 'type' => 'string', - ), ), 'render_callback' => 'render_block_core_tag_cloud', ) diff --git a/packages/e2e-tests/fixtures/blocks/core__rss.parsed.json b/packages/e2e-tests/fixtures/blocks/core__rss.parsed.json index e55306214e219c..73c22eef246f50 100644 --- a/packages/e2e-tests/fixtures/blocks/core__rss.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__rss.parsed.json @@ -3,12 +3,12 @@ "blockName": "core/rss", "attrs": { "blockLayout": "grid", - "feedURL": "https://wordpress.org/news/", - "itemsToShow": 4, + "displayDate": true, "displayExcerpt": true, "displayAuthor": true, - "displayDate": true, - "excerptLength": 20 + "excerptLength": 20, + "feedURL": "https://wordpress.org/news/", + "itemsToShow": 4 }, "innerBlocks": [], "innerHTML": "", diff --git a/packages/e2e-tests/fixtures/blocks/core__rss.serialized.html b/packages/e2e-tests/fixtures/blocks/core__rss.serialized.html index bcb7f0c0f760bb..69b41ce041862b 100644 --- a/packages/e2e-tests/fixtures/blocks/core__rss.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__rss.serialized.html @@ -1 +1 @@ - + diff --git a/packages/e2e-tests/fixtures/blocks/core__search__custom-text.parsed.json b/packages/e2e-tests/fixtures/blocks/core__search__custom-text.parsed.json index 6b67b6d21a472e..fd128b35f93c81 100644 --- a/packages/e2e-tests/fixtures/blocks/core__search__custom-text.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__search__custom-text.parsed.json @@ -2,9 +2,9 @@ { "blockName": "core/search", "attrs": { + "buttonText": "Custom button text", "label": "Custom label", - "placeholder": "Custom placeholder", - "buttonText": "Custom button text" + "placeholder": "Custom placeholder" }, "innerBlocks": [], "innerHTML": "", diff --git a/packages/e2e-tests/fixtures/blocks/core__search__custom-text.serialized.html b/packages/e2e-tests/fixtures/blocks/core__search__custom-text.serialized.html index de15a05a22774b..bb6e6a56c9a339 100644 --- a/packages/e2e-tests/fixtures/blocks/core__search__custom-text.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__search__custom-text.serialized.html @@ -1 +1 @@ - + diff --git a/packages/e2e-tests/fixtures/blocks/core__tag-cloud__showTagCounts.parsed.json b/packages/e2e-tests/fixtures/blocks/core__tag-cloud__showTagCounts.parsed.json index d9f82c35762450..16de1a688ba372 100644 --- a/packages/e2e-tests/fixtures/blocks/core__tag-cloud__showTagCounts.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__tag-cloud__showTagCounts.parsed.json @@ -2,8 +2,8 @@ { "blockName": "core/tag-cloud", "attrs": { - "taxonomy": "category", - "showTagCounts": true + "showTagCounts": true, + "taxonomy": "category" }, "innerBlocks": [], "innerHTML": "", diff --git a/packages/e2e-tests/fixtures/blocks/core__tag-cloud__showTagCounts.serialized.html b/packages/e2e-tests/fixtures/blocks/core__tag-cloud__showTagCounts.serialized.html index 8a0a951d49efb3..9711e8c6ad6c0b 100644 --- a/packages/e2e-tests/fixtures/blocks/core__tag-cloud__showTagCounts.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__tag-cloud__showTagCounts.serialized.html @@ -1 +1 @@ - + diff --git a/packages/e2e-tests/fixtures/blocks/core__video.json b/packages/e2e-tests/fixtures/blocks/core__video.json index cb19827f7ad7b2..7b9f36d1aa30cb 100644 --- a/packages/e2e-tests/fixtures/blocks/core__video.json +++ b/packages/e2e-tests/fixtures/blocks/core__video.json @@ -9,9 +9,9 @@ "controls": true, "loop": false, "muted": false, - "playsInline": false, "preload": "metadata", - "src": "https://awesome-fake.video/file.mp4" + "src": "https://awesome-fake.video/file.mp4", + "playsInline": false }, "innerBlocks": [], "originalContent": "
    " diff --git a/test/integration/full-content/server-registered.json b/test/integration/full-content/server-registered.json index bdb2ffdd1fa5dc..9ca842b541fda0 100644 --- a/test/integration/full-content/server-registered.json +++ b/test/integration/full-content/server-registered.json @@ -1 +1 @@ -{"core\/archives":{"attributes":{"align":{"type":"string"},"className":{"type":"string"},"displayAsDropdown":{"type":"boolean","default":false},"showPostCounts":{"type":"boolean","default":false}}},"core\/block":{"attributes":{"ref":{"type":"number"}}},"core\/calendar":{"attributes":{"align":{"type":"string"},"className":{"type":"string"},"month":{"type":"integer"},"year":{"type":"integer"}}},"core\/latest-comments":{"attributes":{"align":{"type":"string","enum":["left","center","right","wide","full"]},"className":{"type":"string"},"commentsToShow":{"type":"number","default":5,"minimum":1,"maximum":100},"displayAvatar":{"type":"boolean","default":true},"displayDate":{"type":"boolean","default":true},"displayExcerpt":{"type":"boolean","default":true}}},"core\/latest-posts":{"attributes":{"categories":{"type":"string"},"className":{"type":"string"},"postsToShow":{"type":"number","default":5},"displayPostDate":{"type":"boolean","default":false},"postLayout":{"type":"string","default":"list"},"columns":{"type":"number","default":3},"align":{"type":"string"},"order":{"type":"string","default":"desc"},"orderBy":{"type":"string","default":"date"}}},"core\/rss":{"attributes":{"blockLayout":{"type":"string","default":"list"},"columns":{"type":"number","default":2},"displayAuthor":{"type":"boolean","default":false},"displayDate":{"type":"boolean","default":false},"displayExcerpt":{"type":"boolean","default":false},"excerptLength":{"type":"number","default":55},"feedURL":{"type":"string","default":""},"itemsToShow":{"type":"number","default":5}}},"core\/search":{"attributes":{"buttonText":{"type":"string","default":"Search"},"label":{"type":"string","default":"Search"},"placeholder":{"type":"string","default":""}}},"core\/tag-cloud":{"attributes":{"align":{"type":"string"},"className":{"type":"string"},"showTagCounts":{"type":"boolean","default":false},"taxonomy":{"type":"string","default":"post_tag"}}}} +{"core\/archives":{"attributes":{"align":{"type":"string","enum":["left","center","right","wide","full"]},"className":{"type":"string"},"displayAsDropdown":{"type":"boolean","default":false},"showPostCounts":{"type":"boolean","default":false}}},"core\/block":{"attributes":{"ref":{"type":"number"}}},"core\/calendar":{"attributes":{"align":{"type":"string","enum":["left","center","right","wide","full"]},"className":{"type":"string"},"month":{"type":"integer"},"year":{"type":"integer"}}},"core\/categories":{"attributes":{"align":{"type":"string","enum":["left","center","right","wide","full"]},"className":{"type":"string"},"displayAsDropdown":{"type":"boolean","default":false},"showHierarchy":{"type":"boolean","default":false},"showPostCounts":{"type":"boolean","default":false}}},"core\/latest-comments":{"attributes":{"align":{"type":"string","enum":["left","center","right","wide","full"]},"className":{"type":"string"},"commentsToShow":{"type":"number","default":5,"minimum":1,"maximum":100},"displayAvatar":{"type":"boolean","default":true},"displayDate":{"type":"boolean","default":true},"displayExcerpt":{"type":"boolean","default":true}}},"core\/latest-posts":{"attributes":{"align":{"type":"string","enum":["left","center","right","wide","full"]},"className":{"type":"string"},"categories":{"type":"string"},"postsToShow":{"type":"number","default":5},"displayPostDate":{"type":"boolean","default":false},"postLayout":{"type":"string","default":"list"},"columns":{"type":"number","default":3},"order":{"type":"string","default":"desc"},"orderBy":{"type":"string","default":"date"}}},"core\/legacy-widget":{"attributes":{"className":{"type":"string"},"identifier":{"type":"string"},"instance":{"type":"object"},"isCallbackWidget":{"type":"boolean"}}},"core\/rss":{"attributes":{"align":{"type":"string","enum":["left","center","right","wide","full"]},"className":{"type":"string"},"columns":{"type":"number","default":2},"blockLayout":{"type":"string","default":"list"},"feedURL":{"type":"string","default":""},"itemsToShow":{"type":"number","default":5},"displayExcerpt":{"type":"boolean","default":false},"displayAuthor":{"type":"boolean","default":false},"displayDate":{"type":"boolean","default":false},"excerptLength":{"type":"number","default":55}}},"core\/search":{"attributes":{"align":{"type":"string","enum":["left","center","right","wide","full"]},"className":{"type":"string"},"label":{"type":"string","default":"Search"},"placeholder":{"type":"string","default":""},"buttonText":{"type":"string","default":"Search"}}},"core\/shortcode":{"attributes":{"text":{"type":"string","source":"html"}}},"core\/tag-cloud":{"attributes":{"align":{"type":"string","enum":["left","center","right","wide","full"]},"className":{"type":"string"},"taxonomy":{"type":"string","default":"post_tag"},"showTagCounts":{"type":"boolean","default":false}}}} \ No newline at end of file