diff --git a/docs/how-to-guides/themes/theme-json.md b/docs/how-to-guides/themes/theme-json.md index 0990c618ea9f4..6e751aa2e19ff 100644 --- a/docs/how-to-guides/themes/theme-json.md +++ b/docs/how-to-guides/themes/theme-json.md @@ -169,6 +169,7 @@ The settings section has the following structure: "settings": { "color": { "custom": true, + "customDuotone": true, "customGradient": true, "duotone": [], "gradients": [], @@ -220,6 +221,7 @@ The settings section has the following structure: }, "color": { "custom": true, + "customDuotone": true, "customGradient": true, "duotone": [], "gradients": [], diff --git a/docs/reference-guides/filters/block-filters.md b/docs/reference-guides/filters/block-filters.md index 02a28e8f43383..57e227c4a6a8a 100644 --- a/docs/reference-guides/filters/block-filters.md +++ b/docs/reference-guides/filters/block-filters.md @@ -339,48 +339,57 @@ wp.blocks.getBlockTypes().forEach( function ( blockType ) { ## Hiding blocks from the inserter -On the server, you can filter the list of blocks shown in the inserter using the `allowed_block_types` filter. You can return either true (all block types supported), false (no block types supported), or an array of block type names to allow. You can also use the second provided param `$post` to filter block types based on its content. +### `allowed_block_types_all` + +_**Note:** Before WordPress 5.8 known as `allowed_block_types`. In the case when you want to support older versions of WordPress you might need a way to detect which filter should be used – the deprecated one vs the new one. The recommended way to proceed is to check if the `WP_Block_Editor_Context` class exists._ + +On the server, you can filter the list of blocks shown in the inserter using the `allowed_block_types_all` filter. You can return either true (all block types supported), false (no block types supported), or an array of block type names to allow. You can also use the second provided param `$editor_context` to filter block types based on its content. ```php post_type !== 'post' ) { - return $allowed_block_types; +function filter_allowed_block_types_when_post_provided( $allowed_block_types, $editor_context ) { + if ( ! empty( $editor_context->post ) ) { + return array( 'core/paragraph', 'core/heading' ); } - return array( 'core/paragraph' ); + return $allowed_block_types; } -add_filter( 'allowed_block_types', 'my_plugin_allowed_block_types', 10, 2 ); +add_filter( 'allowed_block_types_all', 'filter_allowed_block_types_when_post_provided', 10, 2 ); ``` ## Managing block categories -It is possible to filter the list of default block categories using the `block_categories` filter. You can do it on the server by implementing a function which returns a list of categories. It is going to be used during blocks registration and to group blocks in the inserter. You can also use the second provided param `$post` to generate a different list depending on the post's content. +### `block_categories_all` + +_**Note:** Before WordPress 5.8 known as `block_categories`. In the case when you want to support older versions of WordPress you might need a way to detect which filter should be used – the deprecated one vs the new one. The recommended way to proceed is to check if the `WP_Block_Editor_Context` class exists._ + +It is possible to filter the list of default block categories using the `block_categories_all` filter. You can do it on the server by implementing a function which returns a list of categories. It is going to be used during blocks registration and to group blocks in the inserter. You can also use the second provided param `$editor_context` to filter the based on its content. ```php post_type !== 'post' ) { - return $categories; - } - return array_merge( - $categories, - array( +function filter_block_categories_when_post_provided( $block_categories, $editor_context ) { + if ( ! empty( $editor_context->post ) ) { + array_push( + $block_categories, array( - 'slug' => 'my-category', - 'title' => __( 'My category', 'my-plugin' ), - 'icon' => 'wordpress', - ), - ) - ); + 'slug' => 'custom-category', + 'title' => __( 'Custom Category', 'custom-plugin' ), + 'icon' => null, + ) + ); + } + return $block_categories; } -add_filter( 'block_categories', 'my_plugin_block_categories', 10, 2 ); + +add_filter( 'block_categories_all', 'filter_block_categories_when_post_provided', 10, 2 ); ``` +### `wp.blocks.updateCategory` + You can also display an icon with your block category by setting an `icon` attribute. The value can be the slug of a [WordPress Dashicon](https://developer.wordpress.org/resource/dashicons/). You can also set a custom icon in SVG format. To do so, the icon should be rendered and set on the frontend, so it can make use of WordPress SVG, allowing mobile compatibility and making the icon more accessible. diff --git a/docs/reference-guides/filters/editor-filters.md b/docs/reference-guides/filters/editor-filters.md index 94d27c9fd994d..a445abe95e177 100644 --- a/docs/reference-guides/filters/editor-filters.md +++ b/docs/reference-guides/filters/editor-filters.md @@ -64,13 +64,51 @@ addFilter( ## Editor settings -### `block_editor_settings` +### `block_editor_settings_all` + +_**Note:** Before WordPress 5.8 known as `block_editor_settings`. In the case when you want to support older versions of WordPress you might need a way to detect which filter should be used – the deprecated one vs the new one. The recommended way to proceed is to check if the `WP_Block_Editor_Context` class exists._ This is a PHP filter which is applied before sending settings to the WordPress block editor. -You may find details about this filter [on its WordPress Code Reference page](https://developer.wordpress.org/reference/hooks/block_editor_settings/). +You may find details about this filter [on its WordPress Code Reference page](https://developer.wordpress.org/reference/hooks/block_editor_settings_all/). + +The filter will send any setting to the initialized Editor, which means any editor setting that is used to configure the editor at initialiation can be filtered by a PHP WordPress plugin before being sent. + +_Example:_ + +```php +post ) ) { + $editor_settings['maxUploadFileSize'] = 12345; + } + return $editor_settings; +} + +add_filter( 'block_editor_settings_all', 'filter_block_editor_settings_when_post_provided', 10, 2 ); +``` + +#### `block_editor_rest_api_preload_paths` + +Filters the array of REST API paths that will be used to preloaded common data to use with the block editor. + +_Example:_ + +```php +post ) ) { + array_push( $preload_paths, array( '/wp/v2/blocks', 'OPTIONS' ) ); + } + return $preload_paths; +} + +add_filter( 'block_editor_rest_api_preload_paths', 'filter_block_editor_rest_api_preload_paths_when_post_provided', 10, 2 ); +``` ### Available default editor settings @@ -88,9 +126,11 @@ If set to false the user will not be able to switch between visual and code edit ### Block Directory -The Block Directory enables installing new block plugins from [WordPress.org.](https://wordpress.org/plugins/browse/block/) It can be disabled by removing the actions that enqueue it. In WordPress core, the function is `wp_enqueue_editor_block_directory_assets`, and Gutenberg uses `gutenberg_enqueue_block_editor_assets_block_directory`. To remove the feature, use [`remove_action`,](https://developer.wordpress.org/reference/functions/remove_action/) like this: +The Block Directory enables installing new block plugins from [WordPress.org.](https://wordpress.org/plugins/browse/block/) It can be disabled by removing the actions that enqueue it. In WordPress core, the function is `wp_enqueue_editor_block_directory_assets`. To remove the feature, use [`remove_action`,](https://developer.wordpress.org/reference/functions/remove_action/) like this: ```php + array( 'custom' => null, + 'customDuotone' => null, 'customGradient' => null, 'duotone' => null, 'gradients' => null, @@ -92,7 +93,10 @@ class WP_Theme_JSON_Gutenberg { 'palette' => null, ), 'custom' => null, - 'layout' => null, + 'layout' => array( + 'contentSize' => null, + 'wideSize' => null, + ), 'spacing' => array( 'customMargin' => null, 'customPadding' => null, diff --git a/lib/experimental-default-theme.json b/lib/experimental-default-theme.json index e12e4231018a3..bf7ef9ef5147b 100644 --- a/lib/experimental-default-theme.json +++ b/lib/experimental-default-theme.json @@ -169,8 +169,9 @@ } ], "custom": true, - "link": false, - "customGradient": true + "customDuotone": true, + "customGradient": true, + "link": false }, "typography": { "dropCap": true, diff --git a/packages/block-editor/src/components/duotone-control/duotone-picker-popover.js b/packages/block-editor/src/components/duotone-control/duotone-picker-popover.js index c277b07ad1487..64f4c1cf225c2 100644 --- a/packages/block-editor/src/components/duotone-control/duotone-picker-popover.js +++ b/packages/block-editor/src/components/duotone-control/duotone-picker-popover.js @@ -11,6 +11,7 @@ function DuotonePickerPopover( { duotonePalette, colorPalette, disableCustomColors, + disableCustomDuotone, } ) { return ( diff --git a/packages/block-editor/src/components/duotone-control/index.js b/packages/block-editor/src/components/duotone-control/index.js index eb675639a5f14..757e83803e86b 100644 --- a/packages/block-editor/src/components/duotone-control/index.js +++ b/packages/block-editor/src/components/duotone-control/index.js @@ -15,15 +15,12 @@ function DuotoneControl( { colorPalette, duotonePalette, disableCustomColors, + disableCustomDuotone, value, onChange, } ) { const [ isOpen, setIsOpen ] = useState( false ); - if ( ! duotonePalette ) { - return null; - } - const onToggle = () => { setIsOpen( ( prev ) => ! prev ); }; @@ -55,6 +52,7 @@ function DuotoneControl( { duotonePalette={ duotonePalette } colorPalette={ colorPalette } disableCustomColors={ disableCustomColors } + disableCustomDuotone={ disableCustomDuotone } /> ) } diff --git a/packages/block-editor/src/hooks/duotone.js b/packages/block-editor/src/hooks/duotone.js index 6e5a79766cae8..c0de112b020d8 100644 --- a/packages/block-editor/src/hooks/duotone.js +++ b/packages/block-editor/src/hooks/duotone.js @@ -21,6 +21,8 @@ import { useSetting, } from '../components'; +const EMPTY_ARRAY = []; + /** * Convert a list of colors to an object of R, G, and B values. * @@ -124,15 +126,23 @@ function DuotonePanel( { attributes, setAttributes } ) { const style = attributes?.style; const duotone = style?.color?.duotone; - const duotonePalette = useSetting( 'color.duotone' ); - const colorPalette = useSetting( 'color.palette' ); + const duotonePalette = useSetting( 'color.duotone' ) || EMPTY_ARRAY; + const colorPalette = useSetting( 'color.palette' ) || EMPTY_ARRAY; const disableCustomColors = ! useSetting( 'color.custom' ); + const disableCustomDuotone = + ! useSetting( 'color.customDuotone' ) || + ( colorPalette?.length === 0 && disableCustomColors ); + + if ( duotonePalette?.length === 0 && disableCustomDuotone ) { + return null; + } return ( { diff --git a/packages/block-library/src/editor.scss b/packages/block-library/src/editor.scss index b813152d2f190..a3f9b9ce885c3 100644 --- a/packages/block-library/src/editor.scss +++ b/packages/block-library/src/editor.scss @@ -42,7 +42,6 @@ @import "./social-links/editor.scss"; @import "./spacer/editor.scss"; @import "./table/editor.scss"; -@import "./tag-cloud/editor.scss"; @import "./template-part/editor.scss"; @import "./text-columns/editor.scss"; @import "./video/editor.scss"; diff --git a/packages/block-library/src/latest-posts/style.scss b/packages/block-library/src/latest-posts/style.scss index 2df097b3fc990..3ea00a015063b 100644 --- a/packages/block-library/src/latest-posts/style.scss +++ b/packages/block-library/src/latest-posts/style.scss @@ -43,7 +43,6 @@ .wp-block-latest-posts__post-date, .wp-block-latest-posts__post-author { display: block; - color: #555; font-size: 0.8125em; } diff --git a/packages/block-library/src/post-terms/block.json b/packages/block-library/src/post-terms/block.json index 1f9f61738eb59..a79af6ef85539 100644 --- a/packages/block-library/src/post-terms/block.json +++ b/packages/block-library/src/post-terms/block.json @@ -11,6 +11,10 @@ }, "textAlign": { "type": "string" + }, + "separator": { + "type": "string", + "default": ", " } }, "usesContext": [ "postId", "postType" ], @@ -24,5 +28,6 @@ "lineHeight": true, "fontSize": true } - } + }, + "style": "wp-block-post-terms" } diff --git a/packages/block-library/src/post-terms/edit.js b/packages/block-library/src/post-terms/edit.js index 15b981bf69af6..4a939e2af579c 100644 --- a/packages/block-library/src/post-terms/edit.js +++ b/packages/block-library/src/post-terms/edit.js @@ -8,11 +8,12 @@ import classnames from 'classnames'; */ import { AlignmentToolbar, + InspectorAdvancedControls, BlockControls, Warning, useBlockProps, } from '@wordpress/block-editor'; -import { Spinner } from '@wordpress/components'; +import { Spinner, TextControl } from '@wordpress/components'; import { useSelect } from '@wordpress/data'; import { __ } from '@wordpress/i18n'; import { store as coreStore } from '@wordpress/core-data'; @@ -27,7 +28,7 @@ export default function PostTermsEdit( { context, setAttributes, } ) { - const { term, textAlign } = attributes; + const { term, textAlign, separator } = attributes; const { postId, postType } = context; const selectedTerm = useSelect( @@ -78,6 +79,17 @@ export default function PostTermsEdit( { } } /> + + { + setAttributes( { separator: nextValue } ); + } } + help={ __( 'Enter character(s) used to separate terms.' ) } + /> +
{ isLoading && } { ! isLoading && @@ -92,7 +104,15 @@ export default function PostTermsEdit( { { postTerm.name } ) ) - .reduce( ( prev, curr ) => [ prev, ' | ', curr ] ) } + .reduce( ( prev, curr ) => ( + <> + { prev } + + { separator || ' ' } + + { curr } + + ) ) } { ! isLoading && ! hasPostTerms && ( selectedTerm?.labels?.no_terms || diff --git a/packages/block-library/src/post-terms/index.php b/packages/block-library/src/post-terms/index.php index 436611d756704..2573c4f0fba4b 100644 --- a/packages/block-library/src/post-terms/index.php +++ b/packages/block-library/src/post-terms/index.php @@ -23,10 +23,7 @@ function render_block_core_post_terms( $attributes, $content, $block ) { } $post_terms = get_the_terms( $block->context['postId'], $attributes['term'] ); - if ( is_wp_error( $post_terms ) ) { - return ''; - } - if ( empty( $post_terms ) ) { + if ( is_wp_error( $post_terms ) || empty( $post_terms ) ) { return ''; } @@ -35,21 +32,16 @@ function render_block_core_post_terms( $attributes, $content, $block ) { $classes .= ' has-text-align-' . $attributes['textAlign']; } - $terms_links = ''; - foreach ( $post_terms as $term ) { - $terms_links .= sprintf( - '%2$s | ', - get_term_link( $term->term_id ), - esc_html( $term->name ) - ); - } - $terms_links = trim( $terms_links, ' | ' ); + $separator = empty( $attributes['separator'] ) ? ' ' : $attributes['separator']; + $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) ); - return sprintf( - '
%2$s
', - $wrapper_attributes, - $terms_links + return get_the_term_list( + $block->context['postId'], + $attributes['term'], + "
", + '' . $separator . '', + '
' ); } diff --git a/packages/block-library/src/post-terms/style.scss b/packages/block-library/src/post-terms/style.scss new file mode 100644 index 0000000000000..e447f1fd6b60d --- /dev/null +++ b/packages/block-library/src/post-terms/style.scss @@ -0,0 +1,3 @@ +.wp-block-post-terms__separator { + white-space: pre-wrap; +} diff --git a/packages/block-library/src/query/edit/query-toolbar.js b/packages/block-library/src/query/edit/query-toolbar.js index db4de14f297b1..92db79c7dad7b 100644 --- a/packages/block-library/src/query/edit/query-toolbar.js +++ b/packages/block-library/src/query/edit/query-toolbar.js @@ -61,11 +61,18 @@ export default function QueryToolbar( { labelPosition="edge" min={ 1 } max={ 100 } - onChange={ ( value ) => + onChange={ ( value ) => { + if ( + isNaN( value ) || + value < 1 || + value > 100 + ) { + return; + } setQuery( { - perPage: +value ?? -1, - } ) - } + perPage: value, + } ); + } } step="1" value={ query.perPage } isDragEnabled={ false } @@ -78,9 +85,16 @@ export default function QueryToolbar( { labelPosition="edge" min={ 0 } max={ 100 } - onChange={ ( value ) => - setQuery( { offset: +value } ) - } + onChange={ ( value ) => { + if ( + isNaN( value ) || + value < 0 || + value > 100 + ) { + return; + } + setQuery( { offset: value } ); + } } step="1" value={ query.offset } isDragEnabled={ false } @@ -98,9 +112,12 @@ export default function QueryToolbar( { label={ __( 'Max page to show' ) } labelPosition="edge" min={ 0 } - onChange={ ( value ) => - setQuery( { pages: +value } ) - } + onChange={ ( value ) => { + if ( isNaN( value ) || value < 0 ) { + return; + } + setQuery( { pages: value } ); + } } step="1" value={ query.pages } isDragEnabled={ false } diff --git a/packages/block-library/src/query/utils.js b/packages/block-library/src/query/utils.js index d8edac0adb145..6ff6e026e08b3 100644 --- a/packages/block-library/src/query/utils.js +++ b/packages/block-library/src/query/utils.js @@ -39,9 +39,8 @@ import { store as coreStore } from '@wordpress/core-data'; * @param {WPTerm[]} terms The terms to extract of helper object. * @return {QueryTermsInfo} The object with the terms information. */ -export const getTermsInfo = ( terms ) => ( { - terms, - ...terms?.reduce( +export const getTermsInfo = ( terms ) => { + const mapping = terms?.reduce( ( accumulator, term ) => { const { mapById, mapByName, names } = accumulator; mapById[ term.id ] = term; @@ -50,8 +49,13 @@ export const getTermsInfo = ( terms ) => ( { return accumulator; }, { mapById: {}, mapByName: {}, names: [] } - ), -} ); + ); + + return { + terms, + ...mapping, + }; +}; /** * Returns a helper object that contains: diff --git a/packages/block-library/src/rss/style.scss b/packages/block-library/src/rss/style.scss index 3a3995cf6e384..f7360ec76f85a 100644 --- a/packages/block-library/src/rss/style.scss +++ b/packages/block-library/src/rss/style.scss @@ -1,4 +1,7 @@ -.wp-block-rss { +ul.wp-block-rss { // The ul is needed for specificity to override the reset styles in the editor. + list-style: none; + padding: 0; + // This needs extra specificity due to the reset mixin on the parent: https://github.com/WordPress/gutenberg/blob/a250e9e5fe00dd5195624f96a3d924e7078951c3/packages/edit-post/src/style.scss#L54 &.wp-block-rss { box-sizing: border-box; @@ -36,6 +39,5 @@ .wp-block-rss__item-publish-date, .wp-block-rss__item-author { display: block; - color: #555; font-size: 0.8125em; } diff --git a/packages/block-library/src/style.scss b/packages/block-library/src/style.scss index 92e10a3dee23a..c475eab47f5dc 100644 --- a/packages/block-library/src/style.scss +++ b/packages/block-library/src/style.scss @@ -31,6 +31,7 @@ @import "./post-comments/style.scss"; @import "./post-comments-form/style.scss"; @import "./post-excerpt/style.scss"; +@import "./post-terms/style.scss"; @import "./post-title/style.scss"; @import "./preformatted/style.scss"; @import "./pullquote/style.scss"; diff --git a/packages/block-library/src/tag-cloud/editor.scss b/packages/block-library/src/tag-cloud/editor.scss deleted file mode 100644 index a554d72ee004e..0000000000000 --- a/packages/block-library/src/tag-cloud/editor.scss +++ /dev/null @@ -1,13 +0,0 @@ -.wp-block-tag-cloud { - a { - display: inline-block; - margin-right: 5px; - } - - span { - display: inline-block; - margin-left: 5px; - color: $gray-700; - text-decoration: none; - } -} diff --git a/packages/block-library/src/tag-cloud/style.scss b/packages/block-library/src/tag-cloud/style.scss index 3592e5d247314..1d1c63364147a 100644 --- a/packages/block-library/src/tag-cloud/style.scss +++ b/packages/block-library/src/tag-cloud/style.scss @@ -7,4 +7,15 @@ padding-left: 1em; padding-right: 1em; } + + a { + display: inline-block; + margin-right: 5px; + } + + span { + display: inline-block; + margin-left: 5px; + text-decoration: none; + } } diff --git a/packages/components/src/duotone-picker/duotone-picker.js b/packages/components/src/duotone-picker/duotone-picker.js index bbc546acec1c4..fa01fd8270767 100644 --- a/packages/components/src/duotone-picker/duotone-picker.js +++ b/packages/components/src/duotone-picker/duotone-picker.js @@ -22,6 +22,7 @@ function DuotonePicker( { colorPalette, duotonePalette, disableCustomColors, + disableCustomDuotone, value, onChange, } ) { @@ -29,6 +30,7 @@ function DuotonePicker( { () => getDefaultColors( colorPalette ), [ colorPalette ] ); + return ( { @@ -74,10 +76,10 @@ function DuotonePicker( { } > - { ! disableCustomColors && ( + { ! disableCustomColors && ! disableCustomDuotone && ( ) } - { colorPalette && ( + { ! disableCustomDuotone && ( { return page.mouse.click( x, y ); } - it( 'Should insert content using the placeholder and the regular inserter', async () => { + it.skip( 'Should insert content using the placeholder and the regular inserter', async () => { // This ensures the editor is loaded in navigation mode. await page.reload(); await page.waitForSelector( '.edit-post-layout' ); diff --git a/packages/e2e-tests/specs/experiments/multi-entity-saving.test.js b/packages/e2e-tests/specs/experiments/multi-entity-saving.test.js index 937ba8a090ecb..5a137f5e0eecc 100644 --- a/packages/e2e-tests/specs/experiments/multi-entity-saving.test.js +++ b/packages/e2e-tests/specs/experiments/multi-entity-saving.test.js @@ -82,7 +82,7 @@ describe( 'Multi-entity save flow', () => { expect( multiSaveButton ).toBeNull(); }; - it( 'Save flow should work as expected.', async () => { + it.skip( 'Save flow should work as expected.', async () => { await createNewPost(); // Edit the page some. await page.click( '.editor-post-title' ); diff --git a/packages/e2e-tests/specs/experiments/post-editor-template-mode.test.js b/packages/e2e-tests/specs/experiments/post-editor-template-mode.test.js index 5e8d80b1f45c5..cf229daa06a40 100644 --- a/packages/e2e-tests/specs/experiments/post-editor-template-mode.test.js +++ b/packages/e2e-tests/specs/experiments/post-editor-template-mode.test.js @@ -145,7 +145,7 @@ describe( 'Post Editor Template mode', () => { ); } ); - it( 'Allow creating custom block templates in classic themes', async () => { + it.skip( 'Allow creating custom block templates in classic themes', async () => { await activateTheme( 'twentytwentyone' ); await createNewPost(); // Create a random post. diff --git a/packages/e2e-tests/specs/widgets/customizing-widgets.test.js b/packages/e2e-tests/specs/widgets/customizing-widgets.test.js index 960d93ce1b299..e61709adf0e83 100644 --- a/packages/e2e-tests/specs/widgets/customizing-widgets.test.js +++ b/packages/e2e-tests/specs/widgets/customizing-widgets.test.js @@ -150,7 +150,7 @@ describe( 'Widgets Customizer', () => { ); } ); - it( 'should open the inspector panel', async () => { + it.skip( 'should open the inspector panel', async () => { const widgetsPanel = await find( { role: 'heading', name: /Widgets/, diff --git a/packages/e2e-tests/specs/widgets/editing-widgets.test.js b/packages/e2e-tests/specs/widgets/editing-widgets.test.js index c626564bb37e1..623cd89fd798c 100644 --- a/packages/e2e-tests/specs/widgets/editing-widgets.test.js +++ b/packages/e2e-tests/specs/widgets/editing-widgets.test.js @@ -240,7 +240,7 @@ describe( 'Widgets screen', () => { ` ); } ); - it( 'Should insert content using the inline inserter', async () => { + it.skip( 'Should insert content using the inline inserter', async () => { const [ firstWidgetArea ] = await findAll( { role: 'group', name: 'Block: Widget Area', diff --git a/packages/react-native-aztec/package.json b/packages/react-native-aztec/package.json index 0b0fcc20e5514..f567091186d8d 100644 --- a/packages/react-native-aztec/package.json +++ b/packages/react-native-aztec/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/react-native-aztec", - "version": "1.56.0", + "version": "1.57.0", "description": "Aztec view for react-native.", "private": true, "author": "The WordPress Contributors", diff --git a/packages/react-native-bridge/package.json b/packages/react-native-bridge/package.json index 7b946159f0d85..7ce5ff3235252 100644 --- a/packages/react-native-bridge/package.json +++ b/packages/react-native-bridge/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/react-native-bridge", - "version": "1.56.0", + "version": "1.57.0", "description": "Native bridge library used to integrate the block editor into a native App.", "private": true, "author": "The WordPress Contributors", diff --git a/packages/react-native-editor/ios/Podfile.lock b/packages/react-native-editor/ios/Podfile.lock index 135e8c97bfa77..f7dc687b0d70a 100644 --- a/packages/react-native-editor/ios/Podfile.lock +++ b/packages/react-native-editor/ios/Podfile.lock @@ -12,7 +12,7 @@ PODS: - React-jsi (= 0.64.0) - ReactCommon/turbomodule/core (= 0.64.0) - glog (0.3.5) - - Gutenberg (1.56.0): + - Gutenberg (1.57.0): - React-Core (= 0.64.0) - React-CoreModules (= 0.64.0) - React-RCTImage (= 0.64.0) @@ -303,7 +303,7 @@ PODS: - React-Core - RNSVG (9.13.6-gb): - React-Core - - RNTAztecView (1.56.0): + - RNTAztecView (1.57.0): - React-Core - WordPress-Aztec-iOS (~> 1.19.4) - WordPress-Aztec-iOS (1.19.4) @@ -457,9 +457,9 @@ SPEC CHECKSUMS: BVLinearGradient: b2d297a15cf094d1947df4f0519779bb3a7f2392 DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de FBLazyVector: 49cbe4b43e445b06bf29199b6ad2057649e4c8f5 - FBReactNativeSpec: 80e9cf1155002ee4720084d8813326d913815e2f + FBReactNativeSpec: 47ea6a66a418fe8bdbf26d3cc53d16dea40bae80 glog: 73c2498ac6884b13ede40eda8228cb1eee9d9d62 - Gutenberg: 92bec6d8f160c51fd16b7538ff750e1136e8a134 + Gutenberg: bb77241bcf984883fea30a910d8ccec46de54205 RCT-Folly: ec7a233ccc97cc556cf7237f0db1ff65b986f27c RCTRequired: 2f8cb5b7533219bf4218a045f92768129cf7050a RCTTypeSafety: 512728b73549e72ad7330b92f3d42936f2a4de5b @@ -496,7 +496,7 @@ SPEC CHECKSUMS: RNReanimated: f05baf4cd76b6eab2e4d7e2b244424960b968918 RNScreens: 953633729a42e23ad0c93574d676b361e3335e8b RNSVG: 46c4b680fe18237fa01eb7d7b311d77618fde31f - RNTAztecView: 2d4d506e2e203ad07ff911adf7eeb9a36a87512b + RNTAztecView: 44570e19f7141c5d7be9ddc23efdb4d6d6cf02e2 WordPress-Aztec-iOS: 870c93297849072aadfc2223e284094e73023e82 Yoga: 8c8436d4171c87504c648ae23b1d81242bdf3bbf diff --git a/packages/react-native-editor/package.json b/packages/react-native-editor/package.json index d3c5b7d53a115..0701c64844da2 100644 --- a/packages/react-native-editor/package.json +++ b/packages/react-native-editor/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/react-native-editor", - "version": "1.56.0", + "version": "1.57.0", "description": "Mobile WordPress gutenberg editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/phpunit/class-wp-theme-json-test.php b/phpunit/class-wp-theme-json-test.php index 91974e8ef6b48..6d44ca1536211 100644 --- a/phpunit/class-wp-theme-json-test.php +++ b/phpunit/class-wp-theme-json-test.php @@ -16,6 +16,10 @@ function test_get_settings() { 'color' => array( 'custom' => false, ), + 'layout' => array( + 'contentSize' => 'value', + 'invalid/key' => 'value', + ), 'invalid/key' => 'value', 'blocks' => array( 'core/group' => array( @@ -44,6 +48,9 @@ function test_get_settings() { 'color' => array( 'custom' => false, ), + 'layout' => array( + 'contentSize' => 'value', + ), 'blocks' => array( 'core/group' => array( 'color' => array(