From aadec88778d3d766cb72cac43bb4abe6bff8c991 Mon Sep 17 00:00:00 2001 From: adamsilverstein Date: Thu, 28 May 2026 16:46:30 -0400 Subject: [PATCH 1/4] Build/Test Tools: Bump bundled Gutenberg to 0e198c7 for HEIC canvas fallback. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cc7422d42ef1b..b156d6eeb813d 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "https://develop.svn.wordpress.org/trunk" }, "gutenberg": { - "sha": "14db4ab9395a9e96430eed678e4288a59eecbd15", + "sha": "0e198c7ac7ca634e73ded9220ce048c0302174dd", "ghcrRepo": "WordPress/gutenberg/gutenberg-wp-develop-build" }, "engines": { From 20e7ea350cc4c4857db3d6d4ce85031cb06a6104 Mon Sep 17 00:00:00 2001 From: adamsilverstein Date: Mon, 15 Jun 2026 20:57:11 +0200 Subject: [PATCH 2/4] Build/Test Tools: Bump bundled Gutenberg to 7c2994d. Update the bundled Gutenberg SHA to the latest trunk build and refresh the generated build output, block registration, and icon library assets. Built from WordPress/gutenberg@7c2994dec76b860b7d88c19a456fbd8db8526de5. --- package.json | 2 +- .../assets/script-loader-packages.php | 141 +- .../assets/script-modules-packages.php | 14 +- src/wp-includes/blocks/blocks-json.php | 28 +- src/wp-includes/blocks/home-link.php | 18 +- src/wp-includes/blocks/icon.php | 23 + src/wp-includes/blocks/icon/block.json | 12 + src/wp-includes/blocks/image.php | 8 +- src/wp-includes/blocks/image/block.json | 1 + src/wp-includes/blocks/navigation-link.php | 16 +- src/wp-includes/blocks/navigation-submenu.php | 31 +- .../blocks/navigation-submenu/block.json | 7 + src/wp-includes/blocks/navigation.php | 58 + src/wp-includes/blocks/page-list.php | 20 +- src/wp-includes/blocks/page-list/block.json | 7 +- src/wp-includes/blocks/post-author-name.php | 2 +- src/wp-includes/blocks/post-date.php | 2 +- .../blocks/post-featured-image.php | 48 +- .../blocks/post-featured-image/block.json | 1 + src/wp-includes/blocks/read-more.php | 4 +- src/wp-includes/build/constants.php | 2 +- src/wp-includes/build/pages.php | 10 - .../pages/font-library/page-wp-admin.php | 6 +- .../build/pages/font-library/page.php | 28 +- .../options-connectors/page-wp-admin.php | 6 +- .../build/pages/options-connectors/page.php | 28 +- src/wp-includes/build/routes.php | 95 - .../build/routes/connectors-home/content.js | 2674 +++-- .../connectors-home/content.min.asset.php | 2 +- .../routes/connectors-home/content.min.js | 2 +- .../build/routes/font-list/content.js | 9838 +++++++++++++++-- .../routes/font-list/content.min.asset.php | 2 +- .../build/routes/font-list/content.min.js | 32 +- src/wp-includes/build/routes/registry.php | 63 - src/wp-includes/images/icon-library/time.svg | 3 + 35 files changed, 10771 insertions(+), 2463 deletions(-) create mode 100644 src/wp-includes/images/icon-library/time.svg diff --git a/package.json b/package.json index b156d6eeb813d..8057901392409 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "https://develop.svn.wordpress.org/trunk" }, "gutenberg": { - "sha": "0e198c7ac7ca634e73ded9220ce048c0302174dd", + "sha": "7c2994dec76b860b7d88c19a456fbd8db8526de5", "ghcrRepo": "WordPress/gutenberg/gutenberg-wp-develop-build" }, "engines": { diff --git a/src/wp-includes/assets/script-loader-packages.php b/src/wp-includes/assets/script-loader-packages.php index 68eb83ca50259..afa3e425061d6 100644 --- a/src/wp-includes/assets/script-loader-packages.php +++ b/src/wp-includes/assets/script-loader-packages.php @@ -4,7 +4,7 @@ 'wp-dom-ready', 'wp-i18n' ), - 'version' => 'fcf6721cc81dbcc7cb4c' + 'version' => '483af07a6016f640f456' ), 'annotations.js' => array( 'dependencies' => array( @@ -13,7 +13,7 @@ 'wp-i18n', 'wp-rich-text' ), - 'version' => '4890cce18af9c7b2cff7' + 'version' => 'd4fe1eeb787c2fd5ee89' ), 'api-fetch.js' => array( 'dependencies' => array( @@ -21,25 +21,25 @@ 'wp-private-apis', 'wp-url' ), - 'version' => '908b760f8cecb1dac3e2' + 'version' => 'b5b51750518787a93005' ), 'autop.js' => array( 'dependencies' => array( ), - 'version' => '8bcfa39099f75174e47f' + 'version' => '9d0d0901b46f0a9027c9' ), 'base-styles.js' => array( 'dependencies' => array( ), - 'version' => '534d03c4d98549e6f3ac' + 'version' => '8ebe97b095beb7e9279b' ), 'blob.js' => array( 'dependencies' => array( ), - 'version' => '36f5095d3e75fc266d24' + 'version' => '198af75fe06d924090d8' ), 'block-directory.js' => array( 'dependencies' => array( @@ -66,7 +66,7 @@ 'wp-theme', 'wp-url' ), - 'version' => 'e3668608ce66d220bdba' + 'version' => '73ae241f079f4ca777e0' ), 'block-editor.js' => array( 'dependencies' => array( @@ -104,7 +104,7 @@ 'wp-url', 'wp-warning' ), - 'version' => '8734d6b886270cd24cb1' + 'version' => '495bc7e0f12962323735' ), 'block-library.js' => array( 'dependencies' => array( @@ -149,19 +149,19 @@ 'import' => 'dynamic' ) ), - 'version' => 'f4ce0374a285364d8e28' + 'version' => '904bfd65fc0272474e04' ), 'block-serialization-default-parser.js' => array( 'dependencies' => array( ), - 'version' => '9f925ec37fe0ec021ac2' + 'version' => 'bff55bd3f1ce9df0c99c' ), 'block-serialization-spec-parser.js' => array( 'dependencies' => array( ), - 'version' => '23146319d073f10647ab' + 'version' => '9ebc5e95e1de1cabd1e6' ), 'blocks.js' => array( 'dependencies' => array( @@ -182,7 +182,7 @@ 'wp-shortcode', 'wp-warning' ), - 'version' => 'f4a5cd2440113e1f29d1' + 'version' => '2ee91c280141de25ebf0' ), 'commands.js' => array( 'dependencies' => array( @@ -198,7 +198,7 @@ 'wp-primitives', 'wp-private-apis' ), - 'version' => '28baf08aaedb912f7881' + 'version' => '8b8663311faa33540c1b' ), 'components.js' => array( 'dependencies' => array( @@ -223,7 +223,7 @@ 'wp-theme', 'wp-warning' ), - 'version' => '4e3661d1128d5fbe846c' + 'version' => 'ae50cdf11fbc575d2b51' ), 'compose.js' => array( 'dependencies' => array( @@ -238,7 +238,7 @@ 'wp-private-apis', 'wp-undo-manager' ), - 'version' => 'd2b32325fa3cd394f20a' + 'version' => 'e234bbf2606001a9cdd3' ), 'core-commands.js' => array( 'dependencies' => array( @@ -255,7 +255,7 @@ 'wp-router', 'wp-url' ), - 'version' => 'adfb03e72a6284e81a0a' + 'version' => 'c387d70a2b85c37011a2' ), 'core-data.js' => array( 'dependencies' => array( @@ -276,7 +276,7 @@ 'wp-url', 'wp-warning' ), - 'version' => '34cc32ede754e650311c' + 'version' => 'b0a7e67392467257625e' ), 'customize-widgets.js' => array( 'dependencies' => array( @@ -305,7 +305,7 @@ 'wp-theme', 'wp-widgets' ), - 'version' => 'c7699f8b9a9b894aa44f' + 'version' => '0c48982a1d300208f58b' ), 'data.js' => array( 'dependencies' => array( @@ -318,7 +318,7 @@ 'wp-private-apis', 'wp-redux-routine' ), - 'version' => '1e1f56991c684ecfa9b5' + 'version' => 'c547bd40753de57cdc64' ), 'data-controls.js' => array( 'dependencies' => array( @@ -326,32 +326,32 @@ 'wp-data', 'wp-deprecated' ), - 'version' => '7c5523ccc35ca51b1612' + 'version' => '730061ade69d7f341014' ), 'date.js' => array( 'dependencies' => array( 'moment', 'wp-deprecated' ), - 'version' => '56c0df1810475be9c003' + 'version' => '2faaf49020b2074de156' ), 'deprecated.js' => array( 'dependencies' => array( 'wp-hooks' ), - 'version' => '039c87cfdc49dc9ebaee' + 'version' => '990e85f234fee8f7d446' ), 'dom.js' => array( 'dependencies' => array( 'wp-deprecated' ), - 'version' => '9c9013033c069dba635b' + 'version' => 'ea68e9ed0a44f0e21a67' ), 'dom-ready.js' => array( 'dependencies' => array( ), - 'version' => '2109e6d8d6b85110c2e1' + 'version' => 'a06281ae5cf5500e9317' ), 'edit-post.js' => array( 'dependencies' => array( @@ -395,7 +395,7 @@ 'import' => 'static' ) ), - 'version' => 'bf8943e7dfdd79e59fd6' + 'version' => '36f5eee7d89b06645546' ), 'edit-site.js' => array( 'dependencies' => array( @@ -444,7 +444,7 @@ 'import' => 'static' ) ), - 'version' => '7b6145d7696dd4b09737' + 'version' => '6e5fedb5456e02f21087' ), 'edit-widgets.js' => array( 'dependencies' => array( @@ -485,7 +485,7 @@ 'import' => 'static' ) ), - 'version' => 'faa74e652cf98a61859c' + 'version' => '0a7901ee8e8f8c17db97' ), 'editor.js' => array( 'dependencies' => array( @@ -535,22 +535,21 @@ 'import' => 'static' ) ), - 'version' => '297c4f04ae33b54955ca' + 'version' => '1e4e3134648fa5fc5e7c' ), 'element.js' => array( 'dependencies' => array( 'react', 'react-dom', - 'wp-deprecated', 'wp-escape-html' ), - 'version' => '94fbaad7527a82fadfdb' + 'version' => 'ce395381f7d64d2a6d71' ), 'escape-html.js' => array( 'dependencies' => array( ), - 'version' => 'f6c90ca9eb0b2ade8525' + 'version' => '3f093e5cca67aa0f8b56' ), 'format-library.js' => array( 'dependencies' => array( @@ -577,31 +576,31 @@ 'import' => 'dynamic' ) ), - 'version' => '5eddf2ad1f670af962a7' + 'version' => '9227459993502b2afce7' ), 'hooks.js' => array( 'dependencies' => array( ), - 'version' => 'ba8576df586de61e43dd' + 'version' => '7496969728ca0f95732d' ), 'html-entities.js' => array( 'dependencies' => array( ), - 'version' => '6639fe16c26bf584092a' + 'version' => '8c6fa5b869dfeadc4af2' ), 'i18n.js' => array( 'dependencies' => array( 'wp-hooks' ), - 'version' => 'cf342c5f7668cb788dd6' + 'version' => '125448662852c5e18937' ), 'is-shallow-equal.js' => array( 'dependencies' => array( ), - 'version' => 'c10573b39b145ad52de8' + 'version' => '5d84b9f3cb50d2ce7d04' ), 'keyboard-shortcuts.js' => array( 'dependencies' => array( @@ -610,13 +609,13 @@ 'wp-element', 'wp-keycodes' ), - 'version' => '692235325fdbc6b7827a' + 'version' => '0dd268b2132a3f82b1d4' ), 'keycodes.js' => array( 'dependencies' => array( 'wp-i18n' ), - 'version' => '03c771bccf8cd94e7bf2' + 'version' => 'aa1a141e3468afe7f852' ), 'list-reusable-blocks.js' => array( 'dependencies' => array( @@ -628,7 +627,7 @@ 'wp-element', 'wp-i18n' ), - 'version' => '823632e44c0d5da68907' + 'version' => 'a44da9be02cdfef6e44d' ), 'media-utils.js' => array( 'dependencies' => array( @@ -655,7 +654,7 @@ 'wp-url', 'wp-warning' ), - 'version' => '8779c2f40074e16799fd' + 'version' => '399783506c464f6e2aab' ), 'notices.js' => array( 'dependencies' => array( @@ -663,20 +662,14 @@ 'wp-components', 'wp-data' ), - 'version' => '917351f71ee3fe2cb31e' + 'version' => '505026883bbd05994872' ), 'nux.js' => array( 'dependencies' => array( - 'react-jsx-runtime', - 'wp-components', - 'wp-compose', 'wp-data', - 'wp-deprecated', - 'wp-element', - 'wp-i18n', - 'wp-primitives' + 'wp-deprecated' ), - 'version' => 'cb03c4a931dadcb071ad' + 'version' => 'b0afe722eacfd6e9a364' ), 'patterns.js' => array( 'dependencies' => array( @@ -696,7 +689,7 @@ 'wp-private-apis', 'wp-url' ), - 'version' => 'e1bf4bcb6c8368a1e201' + 'version' => '370c242827f36de944f5' ), 'plugins.js' => array( 'dependencies' => array( @@ -708,7 +701,7 @@ 'wp-is-shallow-equal', 'wp-primitives' ), - 'version' => '5593b4af0066d1e56545' + 'version' => 'fb81afeb7c472b9fb513' ), 'preferences.js' => array( 'dependencies' => array( @@ -724,32 +717,32 @@ 'wp-primitives', 'wp-private-apis' ), - 'version' => '4770913d33bab775d31d' + 'version' => '918930601e250eee727e' ), 'preferences-persistence.js' => array( 'dependencies' => array( 'wp-api-fetch' ), - 'version' => 'c02ed55f24a03cff856f' + 'version' => 'e8033be98338d1861bca' ), 'primitives.js' => array( 'dependencies' => array( 'react-jsx-runtime', 'wp-element' ), - 'version' => 'feacea34d534e03dfe7b' + 'version' => 'a5c905ec27bcd76ef287' ), 'priority-queue.js' => array( 'dependencies' => array( ), - 'version' => '6249843c310fb0f4c2d5' + 'version' => '1f0e89e247bc0bd3f9b9' ), 'private-apis.js' => array( 'dependencies' => array( ), - 'version' => '8571ef20e035b1194567' + 'version' => 'db306a8644da6d3146ac' ), 'react-i18n.js' => array( 'dependencies' => array( @@ -757,13 +750,13 @@ 'wp-element', 'wp-i18n' ), - 'version' => 'c8381a0f1b9c8f4c16e2' + 'version' => '9b74577dbd7e50f6b77b' ), 'redux-routine.js' => array( 'dependencies' => array( ), - 'version' => '5c06ff6ae58b95bd35b1' + 'version' => '64f9f5001aabc046c605' ), 'reusable-blocks.js' => array( 'dependencies' => array( @@ -779,7 +772,7 @@ 'wp-primitives', 'wp-url' ), - 'version' => '845bf300466d158d6590' + 'version' => '372c845659b9a298e4fb' ), 'rich-text.js' => array( 'dependencies' => array( @@ -794,7 +787,7 @@ 'wp-keycodes', 'wp-private-apis' ), - 'version' => '903b225e25e9ebe0b950' + 'version' => 'da75f56985c87415ce86' ), 'router.js' => array( 'dependencies' => array( @@ -804,7 +797,7 @@ 'wp-private-apis', 'wp-url' ), - 'version' => '3aedf56b85f9bd271c2a' + 'version' => '0249e6724784b1c2583b' ), 'server-side-render.js' => array( 'dependencies' => array( @@ -818,19 +811,19 @@ 'wp-i18n', 'wp-url' ), - 'version' => 'ab9bb82bd793d93e0357' + 'version' => '48cee6850e8be3502509' ), 'shortcode.js' => array( 'dependencies' => array( ), - 'version' => 'a3ab4684e676fce66298' + 'version' => '11742fe18cc215d3d5ab' ), 'style-engine.js' => array( 'dependencies' => array( ), - 'version' => '22d526c0e640775bff61' + 'version' => 'b2c79081dde904761e72' ), 'sync.js' => array( 'dependencies' => array( @@ -838,7 +831,7 @@ 'wp-hooks', 'wp-private-apis' ), - 'version' => 'b63f7b87a251db85fd94' + 'version' => 'eec01499761de7c20440' ), 'theme.js' => array( 'dependencies' => array( @@ -846,19 +839,19 @@ 'wp-element', 'wp-private-apis' ), - 'version' => 'd7dfbaed0fa14cf69398' + 'version' => '1d6cd90c6ecb55fdb3c1' ), 'token-list.js' => array( 'dependencies' => array( ), - 'version' => '8269785404c75dcfbc85' + 'version' => '16f0aebdd39d87c2a84b' ), 'undo-manager.js' => array( 'dependencies' => array( 'wp-is-shallow-equal' ), - 'version' => '1c629dcc3969852bf08f' + 'version' => '27bb0ae036a2c9d4a1b5' ), 'upload-media.js' => array( 'dependencies' => array( @@ -877,13 +870,13 @@ 'import' => 'dynamic' ) ), - 'version' => '8fdb1414fce1fa61de7e' + 'version' => 'c3362866e191c81cdc90' ), 'url.js' => array( 'dependencies' => array( ), - 'version' => '9f8919f385a1393af24d' + 'version' => '9dd5f16a5ce37bf4ba2c' ), 'viewport.js' => array( 'dependencies' => array( @@ -891,13 +884,13 @@ 'wp-data', 'wp-element' ), - 'version' => '75c93ee6116afdc602fd' + 'version' => '83b39beb77dcc56c4d26' ), 'warning.js' => array( 'dependencies' => array( ), - 'version' => '7398c7f00cc7d8469e22' + 'version' => '36fdbdc984d93aee8a97' ), 'widgets.js' => array( 'dependencies' => array( @@ -914,12 +907,12 @@ 'wp-notices', 'wp-primitives' ), - 'version' => '3bdcff96f81157b799e1' + 'version' => '3ab93e442c755a6b2b4e' ), 'wordcount.js' => array( 'dependencies' => array( ), - 'version' => 'dfb0120218281ee827f8' + 'version' => '3b928d5db8724a8614dd' ) ); \ No newline at end of file diff --git a/src/wp-includes/assets/script-modules-packages.php b/src/wp-includes/assets/script-modules-packages.php index 3f49e7b23ab16..2a666f6d1b4e5 100644 --- a/src/wp-includes/assets/script-modules-packages.php +++ b/src/wp-includes/assets/script-modules-packages.php @@ -88,7 +88,7 @@ 'import' => 'static' ) ), - 'version' => '1ecf748f10b95c76b349' + 'version' => '3440d5367efaa2741a5b' ), 'block-library/query/view.js' => array( 'dependencies' => array( @@ -128,7 +128,7 @@ 'import' => 'static' ) ), - 'version' => '1f60dd5e3fa56c6b2e2e' + 'version' => '5d52d03cfb0ddbaca920' ), 'boot/index.js' => array( 'dependencies' => array( @@ -166,7 +166,7 @@ 'import' => 'static' ) ), - 'version' => '7b98331334f7756a5210' + 'version' => '72fd3d0a23e52ff8501f' ), 'connectors/index.js' => array( 'dependencies' => array( @@ -177,7 +177,7 @@ 'wp-i18n', 'wp-private-apis' ), - 'version' => 'dce5e2b0fc240815717b' + 'version' => '753a649aa400199df0fd' ), 'content-types/index.js' => array( 'dependencies' => array( @@ -212,7 +212,7 @@ 'import' => 'static' ) ), - 'version' => '5fde95653aecf285d659' + 'version' => 'b73e2c8d19862319099e' ), 'core-abilities/index.js' => array( 'dependencies' => array( @@ -240,7 +240,7 @@ 'import' => 'static' ) ), - 'version' => '3e9b6e117adbaf70a10f' + 'version' => '03b5e26742d2806990c6' ), 'interactivity/index.js' => array( 'dependencies' => array( @@ -335,7 +335,7 @@ 'dependencies' => array( ), - 'version' => '7ba90481a9cc1776ce7a' + 'version' => '4972ce7ba840491f17bb' ), 'workflow/index.js' => array( 'dependencies' => array( diff --git a/src/wp-includes/blocks/blocks-json.php b/src/wp-includes/blocks/blocks-json.php index 1f61f615b6dfa..b1ab52482add7 100644 --- a/src/wp-includes/blocks/blocks-json.php +++ b/src/wp-includes/blocks/blocks-json.php @@ -3136,6 +3136,18 @@ 'icon' => array( 'type' => 'string', 'role' => 'content' + ), + 'flipHorizontal' => array( + 'type' => 'boolean', + 'default' => false + ), + 'flipVertical' => array( + 'type' => 'boolean', + 'default' => false + ), + 'rotation' => array( + 'type' => 'number', + 'default' => 0 ) ), 'supports' => array( @@ -3354,6 +3366,7 @@ ) ), 'selectors' => array( + 'dimensions' => '.wp-block-image img', 'border' => '.wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder', 'shadow' => '.wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder', 'filter' => array( @@ -4514,8 +4527,15 @@ ), 'isTopLevelItem' => array( 'type' => 'boolean' + ), + 'isParentSubmenu' => array( + 'type' => 'boolean', + 'default' => true ) ), + 'providesContext' => array( + 'core/isInsideSubmenu' => 'isParentSubmenu' + ), 'usesContext' => array( 'textColor', 'customTextColor', @@ -4603,10 +4623,6 @@ 'parentPageID' => array( 'type' => 'integer', 'default' => 0 - ), - 'isNested' => array( - 'type' => 'boolean', - 'default' => false ) ), 'usesContext' => array( @@ -4623,7 +4639,8 @@ 'showSubmenuIcon', 'style', 'openSubmenusOnClick', - 'submenuVisibility' + 'submenuVisibility', + 'core/isInsideSubmenu' ), 'supports' => array( 'anchor' => true, @@ -5633,6 +5650,7 @@ ) ), 'selectors' => array( + 'dimensions' => '.wp-block-post-featured-image img', 'border' => '.wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay', 'shadow' => '.wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder', 'filter' => array( diff --git a/src/wp-includes/blocks/home-link.php b/src/wp-includes/blocks/home-link.php index beab1e7b9f011..48c4b5b191807 100644 --- a/src/wp-includes/blocks/home-link.php +++ b/src/wp-includes/blocks/home-link.php @@ -5,8 +5,6 @@ * @package WordPress */ -require_once __DIR__ . '/navigation-link/shared/build-css-font-sizes.php'; - /** * Build an array with CSS classes and inline styles defining the colors * which will be applied to the home link markup in the front-end. @@ -70,22 +68,12 @@ function block_core_home_link_build_css_colors( $context ) { * @return string The li wrapper attributes. */ function block_core_home_link_build_li_wrapper_attributes( $context ) { - $colors = block_core_home_link_build_css_colors( $context ); - // The build system prefixes this function with "gutenberg_" to avoid - // collisions with the core version. Until this function is backported to - // core, we need to guard it's use and only call the prefixed name in - // the plugin. - if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) { - $font_sizes = gutenberg_block_core_shared_navigation_build_css_font_sizes( $context ); - } else { - $font_sizes = block_core_shared_navigation_build_css_font_sizes( $context ); - } + $colors = block_core_home_link_build_css_colors( $context ); $classes = array_merge( - $colors['css_classes'], - $font_sizes['css_classes'] + $colors['css_classes'] ); - $style_attribute = ( $colors['inline_styles'] . $font_sizes['inline_styles'] ); + $style_attribute = ( $colors['inline_styles'] ); $classes[] = 'wp-block-navigation-item'; if ( is_front_page() ) { diff --git a/src/wp-includes/blocks/icon.php b/src/wp-includes/blocks/icon.php index 1b7a27a147698..205cd397d7c42 100644 --- a/src/wp-includes/blocks/icon.php +++ b/src/wp-includes/blocks/icon.php @@ -96,6 +96,29 @@ function render_block_core_icon( $attributes ) { $processor->add_class( $styles['classnames'] ); } + // Apply flip classes to the SVG. + $flip_horizontal = $attributes['flipHorizontal'] ?? false; + $flip_vertical = $attributes['flipVertical'] ?? false; + + if ( $flip_horizontal ) { + $processor->add_class( 'is-flip-horizontal' ); + } + if ( $flip_vertical ) { + $processor->add_class( 'is-flip-vertical' ); + } + + $rotation = isset( $attributes['rotation'] ) ? (int) $attributes['rotation'] : 0; + + if ( $rotation ) { + $current_style = $processor->get_attribute( 'style' ) ?? ''; + $rotation_css = 'rotate: ' . $rotation . 'deg;'; + if ( $current_style ) { + $processor->set_attribute( 'style', $current_style . ' ' . $rotation_css ); + } else { + $processor->set_attribute( 'style', $rotation_css ); + } + } + $aria_label = ! empty( $attributes['ariaLabel'] ) ? $attributes['ariaLabel'] : ''; if ( ! $aria_label ) { diff --git a/src/wp-includes/blocks/icon/block.json b/src/wp-includes/blocks/icon/block.json index 23d0f10dc4b26..f0dd4bb4018f3 100644 --- a/src/wp-includes/blocks/icon/block.json +++ b/src/wp-includes/blocks/icon/block.json @@ -11,6 +11,18 @@ "icon": { "type": "string", "role": "content" + }, + "flipHorizontal": { + "type": "boolean", + "default": false + }, + "flipVertical": { + "type": "boolean", + "default": false + }, + "rotation": { + "type": "number", + "default": 0 } }, "supports": { diff --git a/src/wp-includes/blocks/image.php b/src/wp-includes/blocks/image.php index cedd35abc1d88..5aa42bb48ab98 100644 --- a/src/wp-includes/blocks/image.php +++ b/src/wp-includes/blocks/image.php @@ -171,13 +171,13 @@ function block_core_image_get_lightbox_settings( $block ) { * * @since 6.4.0 * - * @param string $block_content Rendered block content. - * @param array $block Block object. - * @param array $block_instance Block instance. + * @param string $block_content Rendered block content. + * @param array $block Block object. + * @param WP_Block $block_instance Block instance. * * @return string Filtered block content. */ -function block_core_image_render_lightbox( $block_content, $block, $block_instance ) { +function block_core_image_render_lightbox( $block_content, array $block, WP_Block $block_instance ) { /* * If there's no IMG tag in the block then return the given block content * as-is. There's nothing that this code can knowingly modify to add the diff --git a/src/wp-includes/blocks/image/block.json b/src/wp-includes/blocks/image/block.json index 31c4873fe3b7a..a8879d4258480 100644 --- a/src/wp-includes/blocks/image/block.json +++ b/src/wp-includes/blocks/image/block.json @@ -141,6 +141,7 @@ } }, "selectors": { + "dimensions": ".wp-block-image img", "border": ".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder", "shadow": ".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder", "filter": { diff --git a/src/wp-includes/blocks/navigation-link.php b/src/wp-includes/blocks/navigation-link.php index f92a2ff344e50..6a1cfb9918873 100644 --- a/src/wp-includes/blocks/navigation-link.php +++ b/src/wp-includes/blocks/navigation-link.php @@ -7,7 +7,6 @@ require_once __DIR__ . '/navigation-link/shared/item-should-render.php'; require_once __DIR__ . '/navigation-link/shared/render-submenu-icon.php'; -require_once __DIR__ . '/navigation-link/shared/build-css-font-sizes.php'; /** * Build an array with CSS classes and inline styles defining the colors @@ -138,19 +137,7 @@ function render_block_core_navigation_link( $attributes, $content, $block ) { return ''; } - // The build system prefixes this function with "gutenberg_" to avoid - // collisions with the core version. Until this function is backported to - // core, we need to guard its use and only call the prefixed name in - // the plugin. - if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) { - $font_sizes = gutenberg_block_core_shared_navigation_build_css_font_sizes( $block->context ); - } else { - $font_sizes = block_core_shared_navigation_build_css_font_sizes( $block->context ); - } - $classes = array_merge( - $font_sizes['css_classes'] - ); - $style_attribute = $font_sizes['inline_styles']; + $classes = array(); // Render inner blocks first to check if any menu items will actually display. $inner_blocks_html = ''; @@ -174,7 +161,6 @@ function render_block_core_navigation_link( $attributes, $content, $block ) { array( 'class' => $css_classes . ' wp-block-navigation-item' . ( $has_submenu ? ' has-child' : '' ) . ( $is_active ? ' current-menu-item' : '' ), - 'style' => $style_attribute, ) ); $html = '
  • ' . diff --git a/src/wp-includes/blocks/navigation-submenu.php b/src/wp-includes/blocks/navigation-submenu.php index 6990de1813d7a..751b4e7179ddd 100644 --- a/src/wp-includes/blocks/navigation-submenu.php +++ b/src/wp-includes/blocks/navigation-submenu.php @@ -7,7 +7,19 @@ require_once __DIR__ . '/navigation-link/shared/item-should-render.php'; require_once __DIR__ . '/navigation-link/shared/render-submenu-icon.php'; -require_once __DIR__ . '/navigation-link/shared/build-css-font-sizes.php'; + +/** + * Renders the submenu icon SVG for the Navigation Submenu block. + * + * @since 5.9.0 + * @deprecated 7.0.0 Use block_core_shared_navigation_render_submenu_icon() instead. + * + * @return string SVG markup for the submenu icon. + */ +function block_core_navigation_submenu_render_submenu_icon() { + _deprecated_function( __FUNCTION__, '7.0.0', 'block_core_shared_navigation_render_submenu_icon()' ); + return block_core_shared_navigation_render_submenu_icon(); +} /** * Renders the submenu icon SVG for the Navigation Submenu block. @@ -87,17 +99,6 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) { return ''; } - // The build system prefixes this function with "gutenberg_" to avoid - // collisions with the core version. Until this function is backported to - // core, we need to guard its use and only call the prefixed name in - // the plugin. - if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) { - $font_sizes = gutenberg_block_core_shared_navigation_build_css_font_sizes( $block->context ); - } else { - $font_sizes = block_core_shared_navigation_build_css_font_sizes( $block->context ); - } - $style_attribute = $font_sizes['inline_styles']; - // Render inner blocks first to check if any menu items will actually display. $inner_blocks_html = ''; foreach ( $block->inner_blocks as $inner_block ) { @@ -124,10 +125,7 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) { $classes = array( 'wp-block-navigation-item', ); - $classes = array_merge( - $classes, - $font_sizes['css_classes'] - ); + if ( $has_submenu ) { $classes[] = 'has-child'; } @@ -147,7 +145,6 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) { $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ), - 'style' => $style_attribute, ) ); diff --git a/src/wp-includes/blocks/navigation-submenu/block.json b/src/wp-includes/blocks/navigation-submenu/block.json index b11aba479ce13..7dde393be1759 100644 --- a/src/wp-includes/blocks/navigation-submenu/block.json +++ b/src/wp-includes/blocks/navigation-submenu/block.json @@ -40,8 +40,15 @@ }, "isTopLevelItem": { "type": "boolean" + }, + "isParentSubmenu": { + "type": "boolean", + "default": true } }, + "providesContext": { + "core/isInsideSubmenu": "isParentSubmenu" + }, "usesContext": [ "textColor", "customTextColor", diff --git a/src/wp-includes/blocks/navigation.php b/src/wp-includes/blocks/navigation.php index a530494ff36e7..eb960636b9f25 100644 --- a/src/wp-includes/blocks/navigation.php +++ b/src/wp-includes/blocks/navigation.php @@ -1557,6 +1557,64 @@ function register_block_core_navigation() { add_action( 'init', 'register_block_core_navigation' ); +/** + * Adds the Navigation block state class to inner list containers. + * + * State block support adds the generated `wp-states-*` class to the outer + * block wrapper. The Navigation block renders its menu items inside an inner + * `wp-block-navigation__container` list, so the same state class is also needed + * there for state styles to apply directly to the menu list. + * + * Currently this is required as a workaround because of how difficult it is for nav + * child blocks to inherit styles through the complex responsive nav block html. The + * bug in https://github.com/WordPress/gutenberg/issues/62690 also prevents inheritance. + * + * @since 7.1.0 + * + * @param string $block_content The block content. + * @param array $block The full block, including name and attributes. + * @return string The updated block content. + */ +function block_core_navigation_add_state_class_to_container( $block_content, $block ) { + if ( 'core/navigation' !== ( $block['blockName'] ?? null ) || empty( $block_content ) ) { + return $block_content; + } + + $processor = new WP_HTML_Tag_Processor( $block_content ); + if ( ! $processor->next_tag() ) { + return $block_content; + } + + $class_attribute = $processor->get_attribute( 'class' ); + if ( ! is_string( $class_attribute ) || ! preg_match( '/\bwp-states-[a-f0-9]{8}\b/', $class_attribute, $matches ) ) { + return $block_content; + } + + $state_class = $matches[0]; + while ( $processor->next_tag() ) { + // Custom overlay content can include nested Navigation blocks. + // Avoid applying the outer Navigation state class to an inner nav block. + if ( $processor->has_class( 'wp-block-navigation' ) && ! $processor->has_class( 'wp-block-navigation__container' ) ) { + break; + } + + if ( ! $processor->has_class( 'wp-block-navigation__container' ) ) { + continue; + } + + $class_attribute = $processor->get_attribute( 'class' ); + if ( is_string( $class_attribute ) && preg_match( '/\bwp-states-[a-f0-9]{8}\b/', $class_attribute ) ) { + continue; + } + + $processor->add_class( $state_class ); + } + + return $processor->get_updated_html(); +} + +add_filter( 'render_block', 'block_core_navigation_add_state_class_to_container', 11, 2 ); + /** * Filter that changes the parsed attribute values of navigation blocks contain typographic presets to contain the values directly. * diff --git a/src/wp-includes/blocks/page-list.php b/src/wp-includes/blocks/page-list.php index 685f79331784b..6dd368f8c8d43 100644 --- a/src/wp-includes/blocks/page-list.php +++ b/src/wp-includes/blocks/page-list.php @@ -5,8 +5,6 @@ * @package WordPress */ -require_once __DIR__ . '/navigation-link/shared/build-css-font-sizes.php'; - /** * Returns the submenu visibility value with backward compatibility * for the deprecated openSubmenusOnClick attribute. @@ -261,7 +259,7 @@ function render_block_core_page_list( $attributes, $content, $block ) { ++$block_id; $parent_page_id = $attributes['parentPageID']; - $is_nested = $attributes['isNested']; + $is_nested = ! empty( $block->context['core/isInsideSubmenu'] ); $all_pages = get_pages( array( @@ -306,22 +304,12 @@ function render_block_core_page_list( $attributes, $content, $block ) { } } - $colors = block_core_page_list_build_css_colors( $attributes, $block->context ); - // The build system prefixes this function with "gutenberg_" to avoid - // collisions with the core version. Until this function is backported to - // core, we need to guard its use and only call the prefixed name in - // the plugin. - if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) { - $font_sizes = gutenberg_block_core_shared_navigation_build_css_font_sizes( $block->context ); - } else { - $font_sizes = block_core_shared_navigation_build_css_font_sizes( $block->context ); - } + $colors = block_core_page_list_build_css_colors( $attributes, $block->context ); $classes = array_merge( - $colors['css_classes'], - $font_sizes['css_classes'] + $colors['css_classes'] ); - $style_attribute = ( $colors['inline_styles'] . $font_sizes['inline_styles'] ); + $style_attribute = ( $colors['inline_styles'] ); $css_classes = trim( implode( ' ', $classes ) ); $nested_pages = block_core_page_list_nest_pages( $top_level_pages, $pages_with_children ); diff --git a/src/wp-includes/blocks/page-list/block.json b/src/wp-includes/blocks/page-list/block.json index 2b97f248c5768..ebd5dd6c1565c 100644 --- a/src/wp-includes/blocks/page-list/block.json +++ b/src/wp-includes/blocks/page-list/block.json @@ -12,10 +12,6 @@ "parentPageID": { "type": "integer", "default": 0 - }, - "isNested": { - "type": "boolean", - "default": false } }, "usesContext": [ @@ -32,7 +28,8 @@ "showSubmenuIcon", "style", "openSubmenusOnClick", - "submenuVisibility" + "submenuVisibility", + "core/isInsideSubmenu" ], "supports": { "anchor": true, diff --git a/src/wp-includes/blocks/post-author-name.php b/src/wp-includes/blocks/post-author-name.php index ac514401f5cc2..73113eb1efc4b 100644 --- a/src/wp-includes/blocks/post-author-name.php +++ b/src/wp-includes/blocks/post-author-name.php @@ -32,7 +32,7 @@ function render_block_core_post_author_name( $attributes, $content, $block ) { $author_name = get_the_author_meta( 'display_name', $author_id ); if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) { - $author_name = sprintf( '', get_author_posts_url( $author_id ), esc_attr( $attributes['linkTarget'] ), $author_name ); + $author_name = sprintf( '', esc_url( get_author_posts_url( $author_id ) ), esc_attr( $attributes['linkTarget'] ), $author_name ); } $classes = array(); diff --git a/src/wp-includes/blocks/post-date.php b/src/wp-includes/blocks/post-date.php index a8073dd846217..5c92c46aa60d4 100644 --- a/src/wp-includes/blocks/post-date.php +++ b/src/wp-includes/blocks/post-date.php @@ -84,7 +84,7 @@ function render_block_core_post_date( $attributes, $content, $block ) { $time_tag = sprintf( '', $unformatted_date, $formatted_date ); if ( isset( $attributes['isLink'] ) && $attributes['isLink'] && isset( $block->context['postId'] ) ) { - $time_tag = sprintf( '%2s', get_the_permalink( $block->context['postId'] ), $time_tag ); + $time_tag = sprintf( '%2$s', esc_url( get_the_permalink( $block->context['postId'] ) ), $time_tag ); } return sprintf( '
    %2$s
    ', $wrapper_attributes, $time_tag ); diff --git a/src/wp-includes/blocks/post-featured-image.php b/src/wp-includes/blocks/post-featured-image.php index 56cf9a66e4e03..536de7e1448e8 100644 --- a/src/wp-includes/blocks/post-featured-image.php +++ b/src/wp-includes/blocks/post-featured-image.php @@ -40,16 +40,26 @@ function render_block_core_post_featured_image( $attributes, $content, $block ) } $extra_styles = ''; + $has_width = array_key_exists( 'width', $attributes ) && null !== $attributes['width'] && '' !== $attributes['width']; + $has_height = array_key_exists( 'height', $attributes ) && null !== $attributes['height'] && '' !== $attributes['height']; - // Aspect ratio with a height set needs to override the default width/height. if ( ! empty( $attributes['aspectRatio'] ) ) { - $extra_styles .= 'width:100%;height:100%;'; - } elseif ( ! empty( $attributes['height'] ) ) { - $extra_styles .= "height:{$attributes['height']};"; + $extra_styles .= esc_attr( safecss_filter_attr( 'aspect-ratio:' . $attributes['aspectRatio'] ) ) . ';'; + $extra_styles .= 'width:100%;'; + } + + if ( $has_height ) { + $extra_styles .= esc_attr( safecss_filter_attr( 'height:' . $attributes['height'] ) ) . ';'; + } elseif ( $has_width ) { + $extra_styles .= 'height:auto;'; + } + + if ( $has_width ) { + $extra_styles .= esc_attr( safecss_filter_attr( 'width:' . $attributes['width'] ) ) . ';'; } if ( ! empty( $attributes['scale'] ) ) { - $extra_styles .= "object-fit:{$attributes['scale']};"; + $extra_styles .= esc_attr( safecss_filter_attr( 'object-fit:' . $attributes['scale'] ) ) . ';'; } if ( ! empty( $attributes['style']['shadow'] ) ) { $shadow_styles = wp_style_engine_get_styles( array( 'shadow' => $attributes['style']['shadow'] ) ); @@ -90,6 +100,13 @@ function render_block_core_post_featured_image( $attributes, $content, $block ) foreach ( $processor->get_attribute_names_with_prefix( '' ) as $name ) { $tag_html->set_attribute( $name, $processor->get_attribute( $name ) ); } + if ( ! empty( $attr['style'] ) ) { + $existing_style = $tag_html->get_attribute( 'style' ); + $style = is_string( $existing_style ) && '' !== $existing_style + ? rtrim( $existing_style, ';' ) . ';' . $attr['style'] + : $attr['style']; + $tag_html->set_attribute( 'style', $style ); + } $featured_image = $tag_html->get_updated_html(); } } @@ -101,13 +118,11 @@ function render_block_core_post_featured_image( $attributes, $content, $block ) if ( $is_link ) { $link_target = $attributes['linkTarget']; $rel = ! empty( $attributes['rel'] ) ? 'rel="' . esc_attr( $attributes['rel'] ) . '"' : ''; - $height = ! empty( $attributes['height'] ) ? 'style="' . esc_attr( safecss_filter_attr( 'height:' . $attributes['height'] ) ) . '"' : ''; $featured_image = sprintf( - '%5$s%6$s', - get_the_permalink( $post_ID ), + '%4$s%5$s', + esc_url( get_the_permalink( $post_ID ) ), esc_attr( $link_target ), $rel, - $height, $featured_image, $overlay_markup ); @@ -115,20 +130,7 @@ function render_block_core_post_featured_image( $attributes, $content, $block ) $featured_image = $featured_image . $overlay_markup; } - $aspect_ratio = ! empty( $attributes['aspectRatio'] ) - ? esc_attr( safecss_filter_attr( 'aspect-ratio:' . $attributes['aspectRatio'] ) ) . ';' - : ''; - $width = ! empty( $attributes['width'] ) - ? esc_attr( safecss_filter_attr( 'width:' . $attributes['width'] ) ) . ';' - : ''; - $height = ! empty( $attributes['height'] ) - ? esc_attr( safecss_filter_attr( 'height:' . $attributes['height'] ) ) . ';' - : ''; - if ( ! $height && ! $width && ! $aspect_ratio ) { - $wrapper_attributes = get_block_wrapper_attributes(); - } else { - $wrapper_attributes = get_block_wrapper_attributes( array( 'style' => $aspect_ratio . $width . $height ) ); - } + $wrapper_attributes = get_block_wrapper_attributes(); return "
    {$featured_image}
    "; } diff --git a/src/wp-includes/blocks/post-featured-image/block.json b/src/wp-includes/blocks/post-featured-image/block.json index f5619dc29fac5..72332d2d1d1e7 100644 --- a/src/wp-includes/blocks/post-featured-image/block.json +++ b/src/wp-includes/blocks/post-featured-image/block.json @@ -98,6 +98,7 @@ } }, "selectors": { + "dimensions": ".wp-block-post-featured-image img", "border": ".wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay", "shadow": ".wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder", "filter": { diff --git a/src/wp-includes/blocks/read-more.php b/src/wp-includes/blocks/read-more.php index c01a0a377fc93..bf14f8ea242e8 100644 --- a/src/wp-includes/blocks/read-more.php +++ b/src/wp-includes/blocks/read-more.php @@ -38,9 +38,9 @@ function render_block_core_read_more( $attributes, $content, $block ) { $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $justify_class_name ) ); $more_text = ! empty( $attributes['content'] ) ? wp_kses_post( $attributes['content'] ) : __( 'Read more' ); return sprintf( - '%4s%5s', + '%4$s%5$s', $wrapper_attributes, - get_the_permalink( $post_ID ), + esc_url( get_the_permalink( $post_ID ) ), esc_attr( $attributes['linkTarget'] ), $more_text, $screen_reader_text diff --git a/src/wp-includes/build/constants.php b/src/wp-includes/build/constants.php index a46c20b7301e6..ad12ede4b12e2 100644 --- a/src/wp-includes/build/constants.php +++ b/src/wp-includes/build/constants.php @@ -9,6 +9,6 @@ */ return array( - 'version' => '23.3.0', + 'version' => '23.4.0-rc.1', 'build_url' => includes_url( 'build/' ), ); diff --git a/src/wp-includes/build/pages.php b/src/wp-includes/build/pages.php index d9fa3cfef0f7f..4ba7d4921e0a0 100644 --- a/src/wp-includes/build/pages.php +++ b/src/wp-includes/build/pages.php @@ -7,20 +7,10 @@ */ foreach ( [ - __DIR__ . '/pages/media-editor/page.php', - __DIR__ . '/pages/media-editor/page-wp-admin.php', __DIR__ . '/pages/font-library/page.php', __DIR__ . '/pages/font-library/page-wp-admin.php', __DIR__ . '/pages/options-connectors/page.php', __DIR__ . '/pages/options-connectors/page-wp-admin.php', - __DIR__ . '/pages/guidelines/page.php', - __DIR__ . '/pages/guidelines/page-wp-admin.php', - __DIR__ . '/pages/experiments/page.php', - __DIR__ . '/pages/experiments/page-wp-admin.php', - __DIR__ . '/pages/content-types/page.php', - __DIR__ . '/pages/content-types/page-wp-admin.php', - __DIR__ . '/pages/dashboard/page.php', - __DIR__ . '/pages/dashboard/page-wp-admin.php', ] as $file ) { if ( file_exists( $file ) ) { require_once $file; diff --git a/src/wp-includes/build/pages/font-library/page-wp-admin.php b/src/wp-includes/build/pages/font-library/page-wp-admin.php index 9bb35621d7d33..355b56a777bc7 100644 --- a/src/wp-includes/build/pages/font-library/page-wp-admin.php +++ b/src/wp-includes/build/pages/font-library/page-wp-admin.php @@ -134,7 +134,9 @@ function wp_font_library_wp_admin_enqueue_scripts( $hook_suffix ) { // Load build constants $build_constants = require __DIR__ . '/../../constants.php'; - // Fire init action for extensions to register routes and menu items + /** + * Fires when the font-library admin page is initialized so extensions can register routes and menu items. + */ do_action( 'font-library-wp-admin_init' ); // Preload REST API data @@ -258,9 +260,7 @@ function wp_font_library_wp_admin_render_page() {