Update @wordpress packages

Update packages to include these bug fixes from Gutenberg:

- Image block: Set image display to grid when no alignment sent to properly align caption on resize
- Update and align template descriptions
- Site Editor - prevent loading state from showing the admin menu.
- Add client side routing for Site Editor
- Navigation: Add clearance for appender in submenus.
- Fix CSS Custom Properties for presets in the site editor
- Add/navigation blocks post processing after migration from menu items
- Allow selector ordering to ensure theme.json root selector margin takes precedence 
- Do not remove theme presets if defaults are hidden
- Format library: fix unsetting highlight color
- FSE: Fix template resolution to give precedence to child theme PHP templates over parent theme block templates with equal specificity
- ColorPalette: Improving accessibility and visibility
- Update: Make the color popover on the gradient picker appear as expected
- Site Editor: Display a notice if export fails
- Fix docs and function naming for gallery block registration in PHP
- Switch to addEventListener for load event in the navigation block view script
- Fix mistake in _remove_theme_attribute_in_block_template_content
- Better synchronisation between Gutenberg and Core code
- Move the block page templates hook into compat/5.9 folder
- Moves to the template loader hooks and functions into lib/compat folder
- Refactor the gutenberg_is_fse_theme function to use wp_is_block_theme
- Site Editor: Update support doc URL in Welcome Guide
- Global Styles: Add Welcome Guide toggle
- Hide remove control point when removing would break gradient control
- Don't request the deprecated navigation areas endpoint outside of the Gutenberg plugin
- Image: Fix resizer controls being hidden in Safari when switching between alignments
- Remove Navigation Menus from WP Admin sidebar
- Site Editor: Hide the block appender in the Template Part editor
- Site Editor: Use server definition for the Template Areas
- Synchronize wp_is_block_theme and block-templates block support with Core
- E2E: Retry login again after a bad nonce request to prevent intermittent test failures 
- Fix theme requirement validation with WP 5.8
- Fix WP 5.9 check for conditionally running code
- Fix post comment form input width
- Border Style Control: Update styling for consistency with border width control
- Fix form-submit styles by adding button classes to the submit-button in post-comments block
- Site Editor: Fix edit template part link in header dropdown
- Move duotone palette to the bottom of global styles gradients
- Fix how appearanceTools works
- Move WP 5.9 wp-admin menus compatibility code to lib/compat folder
- Revert "Site Editor: Set the <title> on the list page to be same as the CPT name"
- Site Editor: Document Actions: add SR text to heading 1
- Do not register global styles CPT in WordPress 5.9
- Global Styles: Move the 'Edit colors' button to a standard menu item
- Fix styles for previews and patterns
- Site Editor: Fix failing E2E test
- Templates: Search for old template names in the parent theme too
- Remove 4 instances of 'gutenberg' text domain from WordPress core
- Fix content loss when ungrouping template parts or reusable blocks
- Simplify the RESET_BLOCK action to fix template part focus mode content loss
- [Global Styles]: Make Blocks section more distinguishable
- Only use block markup for comment form button when using a block theme
- Navigation: Fix vertical alignment of page list in modal.
- Fix: ToggleGroupControl active state
- Remove gutenberg_ prefix from @wordpress/block-library

Props ocean90, oandregal, hellofromtonya, youknowriad.
See #54487.


git-svn-id: https://develop.svn.wordpress.org/trunk@52364 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Robert Anderson 2021-12-14 01:55:28 +00:00
parent 7155e3c083
commit 667fb94b79
23 changed files with 638 additions and 260 deletions

257
package-lock.json generated
View File

@ -1384,9 +1384,9 @@
"dev": true
},
"@emotion/babel-plugin": {
"version": "11.3.0",
"resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.3.0.tgz",
"integrity": "sha512-UZKwBV2rADuhRp+ZOGgNWg2eYgbzKzQXfQPtJbu/PLy8onurxlNCLvxMQEvlr1/GudguPI5IU9qIY1+2z1M5bA==",
"version": "11.7.1",
"resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.7.1.tgz",
"integrity": "sha512-K3/6Y+J/sIAjplf3uIteWLhPuOyuMNnE+iyYnTF/m294vc6IL90kTHp7y8ldZYbpKlP17rpOWDKM9DvTcrOmNQ==",
"requires": {
"@babel/helper-module-imports": "^7.12.13",
"@babel/plugin-syntax-jsx": "^7.12.13",
@ -1399,7 +1399,7 @@
"escape-string-regexp": "^4.0.0",
"find-root": "^1.1.0",
"source-map": "^0.5.7",
"stylis": "^4.0.3"
"stylis": "4.0.13"
},
"dependencies": {
"escape-string-regexp": {
@ -1410,24 +1410,24 @@
}
},
"@emotion/cache": {
"version": "11.6.0",
"resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.6.0.tgz",
"integrity": "sha512-ElbsWY1KMwEowkv42vGo0UPuLgtPYfIs9BxxVrmvsaJVvktknsHYYlx5NQ5g6zLDcOTyamlDc7FkRg2TAcQDKQ==",
"version": "11.7.1",
"resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.7.1.tgz",
"integrity": "sha512-r65Zy4Iljb8oyjtLeCuBH8Qjiy107dOYC6SJq7g7GV5UCQWMObY4SJDPGFjiiVpPrOJ2hmJOoBiYTC7hwx9E2A==",
"requires": {
"@emotion/memoize": "^0.7.4",
"@emotion/sheet": "^1.1.0",
"@emotion/utils": "^1.0.0",
"@emotion/weak-memoize": "^0.2.5",
"stylis": "^4.0.10"
"stylis": "4.0.13"
}
},
"@emotion/css": {
"version": "11.5.0",
"resolved": "https://registry.npmjs.org/@emotion/css/-/css-11.5.0.tgz",
"integrity": "sha512-mqjz/3aqR9rp40M+pvwdKYWxlQK4Nj3cnNjo3Tx6SM14dSsEn7q/4W2/I7PlgG+mb27iITHugXuBIHH/QwUBVQ==",
"version": "11.7.1",
"resolved": "https://registry.npmjs.org/@emotion/css/-/css-11.7.1.tgz",
"integrity": "sha512-RUUgPlMZunlc7SE5A6Hg+VWRzb2cU6O9xlV78KCFgcnl25s7Qz/20oQg71iKudpLqk7xj0vhbJlwcJJMT0BOZg==",
"requires": {
"@emotion/babel-plugin": "^11.0.0",
"@emotion/cache": "^11.5.0",
"@emotion/babel-plugin": "^11.7.1",
"@emotion/cache": "^11.7.1",
"@emotion/serialize": "^1.0.0",
"@emotion/sheet": "^1.0.3",
"@emotion/utils": "^1.0.0"
@ -1452,12 +1452,12 @@
"integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ=="
},
"@emotion/react": {
"version": "11.7.0",
"resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.7.0.tgz",
"integrity": "sha512-WL93hf9+/2s3cA1JVJlz8+Uy6p6QWukqQFOm2OZO5ki51hfucHMOmbSjiyC3t2Y4RI8XUmBoepoc/24ny/VBbA==",
"version": "11.7.1",
"resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.7.1.tgz",
"integrity": "sha512-DV2Xe3yhkF1yT4uAUoJcYL1AmrnO5SVsdfvu+fBuS7IbByDeTVx9+wFmvx9Idzv7/78+9Mgx2Hcmr7Fex3tIyw==",
"requires": {
"@babel/runtime": "^7.13.10",
"@emotion/cache": "^11.6.0",
"@emotion/cache": "^11.7.1",
"@emotion/serialize": "^1.0.2",
"@emotion/sheet": "^1.1.0",
"@emotion/utils": "^1.0.0",
@ -3529,21 +3529,21 @@
}
},
"@wordpress/block-directory": {
"version": "3.0.14",
"resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-3.0.14.tgz",
"integrity": "sha512-c9fSb3JHosUJb8HdatmvZg8iI9AtYfVwyaARt/5LT0xVtsOlNP6+WeaJa2ikpkdxpIt+sUG28YAgOWuCnLkALA==",
"version": "3.0.17",
"resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-3.0.17.tgz",
"integrity": "sha512-OpD5qBIO8Nac1BJG2GGb3o5I7hfGpTAEG2LI3cIAq4JgTZI0hJwLTak+ENvb8K3EBgCH4QYXqS6ZaZQaG2VQzw==",
"requires": {
"@babel/runtime": "^7.16.0",
"@wordpress/a11y": "^3.2.4",
"@wordpress/api-fetch": "^5.2.6",
"@wordpress/block-editor": "^8.0.8",
"@wordpress/block-editor": "^8.0.11",
"@wordpress/blocks": "^11.1.4",
"@wordpress/components": "^19.1.2",
"@wordpress/components": "^19.1.5",
"@wordpress/compose": "^5.0.6",
"@wordpress/core-data": "^4.0.8",
"@wordpress/data": "^6.1.4",
"@wordpress/edit-post": "^5.0.14",
"@wordpress/editor": "^12.0.11",
"@wordpress/edit-post": "^5.0.17",
"@wordpress/editor": "^12.0.14",
"@wordpress/element": "^4.0.4",
"@wordpress/hooks": "^3.2.2",
"@wordpress/html-entities": "^3.2.3",
@ -3556,9 +3556,9 @@
}
},
"@wordpress/block-editor": {
"version": "8.0.8",
"resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-8.0.8.tgz",
"integrity": "sha512-3KFD0gQZ6gvP98b3mvDYtZS/APaxWfw02L8/ur23i79HpKfNYheT+3HMrUf/MUxmsJX++BgWWU86r5kqH0Ug0A==",
"version": "8.0.11",
"resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-8.0.11.tgz",
"integrity": "sha512-U70TL7m/TQNGw6gKMe+gzAh3bzziCW5JcFrF8hv42c4uZk1BL8P4WGHpP5WNvr5Ae529VpN+rSaDmqE7pY4IyQ==",
"requires": {
"@babel/runtime": "^7.16.0",
"@react-spring/web": "^9.2.4",
@ -3567,7 +3567,7 @@
"@wordpress/blob": "^3.2.2",
"@wordpress/block-serialization-default-parser": "^4.2.3",
"@wordpress/blocks": "^11.1.4",
"@wordpress/components": "^19.1.2",
"@wordpress/components": "^19.1.5",
"@wordpress/compose": "^5.0.6",
"@wordpress/data": "^6.1.4",
"@wordpress/deprecated": "^3.2.3",
@ -3603,18 +3603,18 @@
}
},
"@wordpress/block-library": {
"version": "6.0.12",
"resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-6.0.12.tgz",
"integrity": "sha512-Mdlspqpezzq0WSmBd2jTlUXb2/Y4CC+AFyOzY5X47ErWbwZPZnwZtqOmeAjrVwfdQpkqAyMJWjMdj7C71qoRTQ==",
"version": "6.0.15",
"resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-6.0.15.tgz",
"integrity": "sha512-jE2k9YPOE/AfDJHM0cCInQYY8/OA3xwnbCZb0aazTCfm2UlJYzSc8BluPydX8Pyv4915cLAZ614RueViou6P0g==",
"requires": {
"@babel/runtime": "^7.16.0",
"@wordpress/a11y": "^3.2.4",
"@wordpress/api-fetch": "^5.2.6",
"@wordpress/autop": "^3.2.3",
"@wordpress/blob": "^3.2.2",
"@wordpress/block-editor": "^8.0.8",
"@wordpress/block-editor": "^8.0.11",
"@wordpress/blocks": "^11.1.4",
"@wordpress/components": "^19.1.2",
"@wordpress/components": "^19.1.5",
"@wordpress/compose": "^5.0.6",
"@wordpress/core-data": "^4.0.8",
"@wordpress/data": "^6.1.4",
@ -3627,14 +3627,14 @@
"@wordpress/html-entities": "^3.2.3",
"@wordpress/i18n": "^4.2.4",
"@wordpress/icons": "^6.1.1",
"@wordpress/interface": "^4.1.10",
"@wordpress/interface": "^4.1.13",
"@wordpress/is-shallow-equal": "^4.2.1",
"@wordpress/keycodes": "^3.2.4",
"@wordpress/notices": "^3.2.7",
"@wordpress/primitives": "^3.0.4",
"@wordpress/reusable-blocks": "^3.0.14",
"@wordpress/reusable-blocks": "^3.0.17",
"@wordpress/rich-text": "^5.0.6",
"@wordpress/server-side-render": "^3.0.12",
"@wordpress/server-side-render": "^3.0.15",
"@wordpress/url": "^3.3.1",
"@wordpress/viewport": "^4.0.6",
"classnames": "^2.3.1",
@ -3689,9 +3689,9 @@
"dev": true
},
"@wordpress/components": {
"version": "19.1.2",
"resolved": "https://registry.npmjs.org/@wordpress/components/-/components-19.1.2.tgz",
"integrity": "sha512-Qdj8l+/3wwkwxP1/pG3369/2xhKz07lpDXlNyAOMEctA8o8YhVLKvHhAiOKMNL/TQkPz9hWai9MEK/5aPsXffg==",
"version": "19.1.5",
"resolved": "https://registry.npmjs.org/@wordpress/components/-/components-19.1.5.tgz",
"integrity": "sha512-dZLrGhhjYWhxbDc72kSjgsWUkTksXa5XhCF4hAXXA9zCVMTUksOWFTIozsgQhUDQpHuq1JKWnDvzVo/Gzo24zQ==",
"requires": {
"@babel/runtime": "^7.16.0",
"@emotion/cache": "^11.4.0",
@ -3785,16 +3785,16 @@
}
},
"@wordpress/customize-widgets": {
"version": "2.0.14",
"resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-2.0.14.tgz",
"integrity": "sha512-QGHulwm/osqTMnVIcGjCz+hHTNNb1VSucr1zp/pr294H9StOIENer20dr7WSFiUavTRtXdcAWxpbiJkcaeEwYw==",
"version": "2.0.17",
"resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-2.0.17.tgz",
"integrity": "sha512-d0piCMwzS6ShBk72RLn6npVGY0XoNcdk1B8Z8h7X2bOQPNZ5UDQw6jMQurQIIbxnsMR9VeluTP5qBVrhc3kqNQ==",
"requires": {
"@babel/runtime": "^7.16.0",
"@wordpress/a11y": "^3.2.4",
"@wordpress/block-editor": "^8.0.8",
"@wordpress/block-library": "^6.0.12",
"@wordpress/block-editor": "^8.0.11",
"@wordpress/block-library": "^6.0.15",
"@wordpress/blocks": "^11.1.4",
"@wordpress/components": "^19.1.2",
"@wordpress/components": "^19.1.5",
"@wordpress/compose": "^5.0.6",
"@wordpress/core-data": "^4.0.8",
"@wordpress/data": "^6.1.4",
@ -3803,12 +3803,12 @@
"@wordpress/hooks": "^3.2.2",
"@wordpress/i18n": "^4.2.4",
"@wordpress/icons": "^6.1.1",
"@wordpress/interface": "^4.1.10",
"@wordpress/interface": "^4.1.13",
"@wordpress/is-shallow-equal": "^4.2.1",
"@wordpress/keyboard-shortcuts": "^3.0.6",
"@wordpress/keycodes": "^3.2.4",
"@wordpress/media-utils": "^3.0.5",
"@wordpress/widgets": "^2.0.14",
"@wordpress/widgets": "^2.0.17",
"classnames": "^2.3.1",
"lodash": "^4.17.21"
}
@ -3909,9 +3909,9 @@
}
},
"@wordpress/e2e-test-utils": {
"version": "5.4.9",
"resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-5.4.9.tgz",
"integrity": "sha512-L0ReQGU8N9soIUoomVEILR7/PX0BrlBMltH9yjFuNxUweqZxoKd5vhNEDQfN2BZM24Zrnm9P/XQmdNwr9r/vPw==",
"version": "5.4.10",
"resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-5.4.10.tgz",
"integrity": "sha512-JRp1f7uQ9INpN3t0x4X07P3uBMwaitou9lvYWpDwVsHRcDn21NyFpVYbsX/T63ADIpvcqIhql58RnkVJRUWYxg==",
"dev": true,
"requires": {
"@babel/runtime": "^7.16.0",
@ -3937,27 +3937,27 @@
}
},
"@wordpress/edit-post": {
"version": "5.0.14",
"resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-5.0.14.tgz",
"integrity": "sha512-5groMRI4CT6I6TcZeG2T5GC5j4Uj1dNlk69DF4q+eLJf6bs3EO3A2gIfzr2fuMTsfOO9pyrk+Y3yjEG8fDg3AA==",
"version": "5.0.17",
"resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-5.0.17.tgz",
"integrity": "sha512-nqRMXTWlutu8OQnqLpp052PqZoBvTjv59hT28QvFagOngGb5/iirqaauCe7iLEZDyIQW95k7K3goxGPhdqzDTA==",
"requires": {
"@babel/runtime": "^7.16.0",
"@wordpress/a11y": "^3.2.4",
"@wordpress/api-fetch": "^5.2.6",
"@wordpress/block-editor": "^8.0.8",
"@wordpress/block-library": "^6.0.12",
"@wordpress/block-editor": "^8.0.11",
"@wordpress/block-library": "^6.0.15",
"@wordpress/blocks": "^11.1.4",
"@wordpress/components": "^19.1.2",
"@wordpress/components": "^19.1.5",
"@wordpress/compose": "^5.0.6",
"@wordpress/core-data": "^4.0.8",
"@wordpress/data": "^6.1.4",
"@wordpress/data-controls": "^2.2.7",
"@wordpress/editor": "^12.0.11",
"@wordpress/editor": "^12.0.14",
"@wordpress/element": "^4.0.4",
"@wordpress/hooks": "^3.2.2",
"@wordpress/i18n": "^4.2.4",
"@wordpress/icons": "^6.1.1",
"@wordpress/interface": "^4.1.10",
"@wordpress/interface": "^4.1.13",
"@wordpress/keyboard-shortcuts": "^3.0.6",
"@wordpress/keycodes": "^3.2.4",
"@wordpress/media-utils": "^3.0.5",
@ -3982,57 +3982,58 @@
}
},
"@wordpress/edit-site": {
"version": "3.0.14",
"resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-3.0.14.tgz",
"integrity": "sha512-mG3D1rad/HK87HqxvnZE7wiQl9ZC2fqrxiUwfQgyOU9F+2T3s6DCKMquJhDrs0TPCmZMj+y4H/cHN46Yw8hhbw==",
"version": "3.0.17",
"resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-3.0.17.tgz",
"integrity": "sha512-CC3JB4L7Dg33kxSkxpBqsqksn30GiFH5x1dcLMt9BYTAGDGwlmShCQJhZI6ifSD9/F+CA1JviG4fB9UATmgMow==",
"requires": {
"@babel/runtime": "^7.16.0",
"@wordpress/a11y": "^3.2.4",
"@wordpress/api-fetch": "^5.2.6",
"@wordpress/block-editor": "^8.0.8",
"@wordpress/block-library": "^6.0.12",
"@wordpress/block-editor": "^8.0.11",
"@wordpress/block-library": "^6.0.15",
"@wordpress/blocks": "^11.1.4",
"@wordpress/components": "^19.1.2",
"@wordpress/components": "^19.1.5",
"@wordpress/compose": "^5.0.6",
"@wordpress/core-data": "^4.0.8",
"@wordpress/data": "^6.1.4",
"@wordpress/data-controls": "^2.2.7",
"@wordpress/editor": "^12.0.11",
"@wordpress/editor": "^12.0.14",
"@wordpress/element": "^4.0.4",
"@wordpress/hooks": "^3.2.2",
"@wordpress/html-entities": "^3.2.3",
"@wordpress/i18n": "^4.2.4",
"@wordpress/icons": "^6.1.1",
"@wordpress/interface": "^4.1.10",
"@wordpress/interface": "^4.1.13",
"@wordpress/keyboard-shortcuts": "^3.0.6",
"@wordpress/keycodes": "^3.2.4",
"@wordpress/media-utils": "^3.0.5",
"@wordpress/notices": "^3.2.7",
"@wordpress/plugins": "^4.0.6",
"@wordpress/primitives": "^3.0.4",
"@wordpress/reusable-blocks": "^3.0.14",
"@wordpress/reusable-blocks": "^3.0.17",
"@wordpress/url": "^3.3.1",
"@wordpress/viewport": "^4.0.6",
"classnames": "^2.3.1",
"downloadjs": "^1.4.7",
"file-saver": "^2.0.2",
"history": "^5.1.0",
"jszip": "^3.2.2",
"lodash": "^4.17.21",
"rememo": "^3.0.0"
}
},
"@wordpress/edit-widgets": {
"version": "3.1.9",
"resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-3.1.9.tgz",
"integrity": "sha512-ivcnkftK+0N6lZjtcIbj2onsfvmt7/oo6e5Uh+ZcYXQGoX9t+02zFik23gOgqPqbb7XkbkQGf1sHWs5eaFFo5g==",
"version": "3.1.12",
"resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-3.1.12.tgz",
"integrity": "sha512-u/610TaZbZgE6ArZPBqRvkzCbEJFgtlCrzCEnBIHE93oeytmzUyNo/+vyzj3NvJG40WQIrjWJbmBfuU1Ze+m3w==",
"requires": {
"@babel/runtime": "^7.16.0",
"@wordpress/a11y": "^3.2.4",
"@wordpress/api-fetch": "^5.2.6",
"@wordpress/block-editor": "^8.0.8",
"@wordpress/block-library": "^6.0.12",
"@wordpress/block-editor": "^8.0.11",
"@wordpress/block-library": "^6.0.15",
"@wordpress/blocks": "^11.1.4",
"@wordpress/components": "^19.1.2",
"@wordpress/components": "^19.1.5",
"@wordpress/compose": "^5.0.6",
"@wordpress/core-data": "^4.0.8",
"@wordpress/data": "^6.1.4",
@ -4041,16 +4042,16 @@
"@wordpress/hooks": "^3.2.2",
"@wordpress/i18n": "^4.2.4",
"@wordpress/icons": "^6.1.1",
"@wordpress/interface": "^4.1.10",
"@wordpress/interface": "^4.1.13",
"@wordpress/keyboard-shortcuts": "^3.0.6",
"@wordpress/keycodes": "^3.2.4",
"@wordpress/media-utils": "^3.0.5",
"@wordpress/notices": "^3.2.7",
"@wordpress/plugins": "^4.0.6",
"@wordpress/reusable-blocks": "^3.0.14",
"@wordpress/server-side-render": "^3.0.12",
"@wordpress/reusable-blocks": "^3.0.17",
"@wordpress/server-side-render": "^3.0.15",
"@wordpress/url": "^3.3.1",
"@wordpress/widgets": "^2.0.14",
"@wordpress/widgets": "^2.0.17",
"classnames": "^2.3.1",
"lodash": "^4.17.21",
"rememo": "^3.0.0",
@ -4058,18 +4059,18 @@
}
},
"@wordpress/editor": {
"version": "12.0.11",
"resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-12.0.11.tgz",
"integrity": "sha512-qZ2WJ7JiycKtkPuSUoRApOVECZC5XuseRhfDl3dUwlaRl0jND83B/kj3NoHfZPNB09621j+bwBT39qH78e953g==",
"version": "12.0.14",
"resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-12.0.14.tgz",
"integrity": "sha512-CO4I5g4Qve5HOeXcHaQT1sOjZ/VJ5C4K49IIzrgl/P5IEkkw5kwIq94Ori8CtPQZQllzSBWJGpO3QoKhQoVSsg==",
"requires": {
"@babel/runtime": "^7.16.0",
"@wordpress/a11y": "^3.2.4",
"@wordpress/api-fetch": "^5.2.6",
"@wordpress/autop": "^3.2.3",
"@wordpress/blob": "^3.2.2",
"@wordpress/block-editor": "^8.0.8",
"@wordpress/block-editor": "^8.0.11",
"@wordpress/blocks": "^11.1.4",
"@wordpress/components": "^19.1.2",
"@wordpress/components": "^19.1.5",
"@wordpress/compose": "^5.0.6",
"@wordpress/core-data": "^4.0.8",
"@wordpress/data": "^6.1.4",
@ -4086,9 +4087,9 @@
"@wordpress/keycodes": "^3.2.4",
"@wordpress/media-utils": "^3.0.5",
"@wordpress/notices": "^3.2.7",
"@wordpress/reusable-blocks": "^3.0.14",
"@wordpress/reusable-blocks": "^3.0.17",
"@wordpress/rich-text": "^5.0.6",
"@wordpress/server-side-render": "^3.0.12",
"@wordpress/server-side-render": "^3.0.15",
"@wordpress/url": "^3.3.1",
"@wordpress/wordcount": "^3.2.3",
"classnames": "^2.3.1",
@ -4175,14 +4176,14 @@
}
},
"@wordpress/format-library": {
"version": "3.0.14",
"resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-3.0.14.tgz",
"integrity": "sha512-iemQKg711CrFmpJvPh1isceiorAGPkKXouPt+UF7Ic8G6YggyUf8hnyGuPIWZM7wTlbh5PD2XeL90+pChJVfRQ==",
"version": "3.0.17",
"resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-3.0.17.tgz",
"integrity": "sha512-QAA0FwJJGW4tj1D/52f28aKtd95yV0md6gVLgoBIgGW+LZV52VYMPMycfxpP/dDBMOzc+8GDQhcutvbpe8weaA==",
"requires": {
"@babel/runtime": "^7.16.0",
"@wordpress/a11y": "^3.2.4",
"@wordpress/block-editor": "^8.0.8",
"@wordpress/components": "^19.1.2",
"@wordpress/block-editor": "^8.0.11",
"@wordpress/components": "^19.1.5",
"@wordpress/compose": "^5.0.6",
"@wordpress/data": "^6.1.4",
"@wordpress/dom": "^3.2.7",
@ -4237,13 +4238,13 @@
}
},
"@wordpress/interface": {
"version": "4.1.10",
"resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-4.1.10.tgz",
"integrity": "sha512-3nUDqo69m0EBPpXW83Zv4MjTDRmmeoo2cYWNi2tUEi117Ls7Nuw+zXMdHCdYk1QcqVfVOmRg77tZlPDapDZBqQ==",
"version": "4.1.13",
"resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-4.1.13.tgz",
"integrity": "sha512-XWTJtSlqTOTDU19Pq+TMRlYOXRSn2rHRyonp0Il8zSIj6UlMO1FvEXhgGbZcwLfS4bGAqTq7ji5YMxfbTD4QiA==",
"requires": {
"@babel/runtime": "^7.16.0",
"@wordpress/a11y": "^3.2.4",
"@wordpress/components": "^19.1.2",
"@wordpress/components": "^19.1.5",
"@wordpress/compose": "^5.0.6",
"@wordpress/data": "^6.1.4",
"@wordpress/deprecated": "^3.2.3",
@ -4341,13 +4342,13 @@
}
},
"@wordpress/list-reusable-blocks": {
"version": "3.0.12",
"resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-3.0.12.tgz",
"integrity": "sha512-slGIu0ABCws87Ch8urInCpg/YI/B7Ap2U8AJ5FSM5cQ6ex+JCbMexABOwiuIHL065hEaw/wI/LNrgP75MRjT8A==",
"version": "3.0.15",
"resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-3.0.15.tgz",
"integrity": "sha512-QQ3wH3SAbzQgFbvEzU6gpX1Dc/PzQTwqChVLsXzB7J7538Ulcd+mOvyK9pLn8LCvIeZDBCW5Opp7EPmbWwtN8A==",
"requires": {
"@babel/runtime": "^7.16.0",
"@wordpress/api-fetch": "^5.2.6",
"@wordpress/components": "^19.1.2",
"@wordpress/components": "^19.1.5",
"@wordpress/compose": "^5.0.6",
"@wordpress/element": "^4.0.4",
"@wordpress/i18n": "^4.2.4",
@ -4385,12 +4386,12 @@
"dev": true
},
"@wordpress/nux": {
"version": "5.0.12",
"resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-5.0.12.tgz",
"integrity": "sha512-qMWUHyACqTMI6vGXQA20nUGlagaQ/GOGuk1al6acMrHMbk3b5LCgrA6nYPuHDXfgheZ5dZ85p8r2onos1bUkig==",
"version": "5.0.15",
"resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-5.0.15.tgz",
"integrity": "sha512-dfpR300xRtj2SgNe2gYp/4KS2ETdixdoIx2B+aap6GdyKW01fF9dmRF8+/bmt3rJs6b3cGE8BaqnS2TEwPH5OA==",
"requires": {
"@babel/runtime": "^7.16.0",
"@wordpress/components": "^19.1.2",
"@wordpress/components": "^19.1.5",
"@wordpress/compose": "^5.0.6",
"@wordpress/data": "^6.1.4",
"@wordpress/deprecated": "^3.2.3",
@ -4515,13 +4516,13 @@
}
},
"@wordpress/reusable-blocks": {
"version": "3.0.14",
"resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-3.0.14.tgz",
"integrity": "sha512-jR4byu0is1n4FX53wVxuTR60bTU3wYv+yS+nvUPqgo7Ngh/8m3HP6PeKFP35/w3L3zYXM309s9tox7mUsycadg==",
"version": "3.0.17",
"resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-3.0.17.tgz",
"integrity": "sha512-V12Kr7jzkEbaatSfPdS9u7HSf7KeFe6zO218a51eMqmStHzb9HljO0FKSFLCINq1hjqDiwceeC+S9gfOgIgslg==",
"requires": {
"@wordpress/block-editor": "^8.0.8",
"@wordpress/block-editor": "^8.0.11",
"@wordpress/blocks": "^11.1.4",
"@wordpress/components": "^19.1.2",
"@wordpress/components": "^19.1.5",
"@wordpress/compose": "^5.0.6",
"@wordpress/core-data": "^4.0.8",
"@wordpress/data": "^6.1.4",
@ -5487,14 +5488,14 @@
}
},
"@wordpress/server-side-render": {
"version": "3.0.12",
"resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-3.0.12.tgz",
"integrity": "sha512-ctiH9X/8Yn/Cp7Yvpcq7ee/kG6FDVhgLbCtNLFN+4estKfcKXfdMuzEsV0Lhi3z8SF9pRewwvas0cdIo+maK7g==",
"version": "3.0.15",
"resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-3.0.15.tgz",
"integrity": "sha512-mrcemEw1eG0i8MGy912rHhi1/FqzneCKv6D/E8QmRX7m2WUz/M5g7XNksRIor44eNLg6dTjQkAM4AzuwAq9C9Q==",
"requires": {
"@babel/runtime": "^7.16.0",
"@wordpress/api-fetch": "^5.2.6",
"@wordpress/blocks": "^11.1.4",
"@wordpress/components": "^19.1.2",
"@wordpress/components": "^19.1.5",
"@wordpress/compose": "^5.0.6",
"@wordpress/data": "^6.1.4",
"@wordpress/deprecated": "^3.2.3",
@ -5560,15 +5561,15 @@
"integrity": "sha512-iG1Hq56RK3N6AJqAD1sRLWRIJatfYn+NrPyrfqRNZNYXHM8Vj/s7ABNMbIU0Y99vXkBE83rvCdbMkugNoI2jXA=="
},
"@wordpress/widgets": {
"version": "2.0.14",
"resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-2.0.14.tgz",
"integrity": "sha512-fMAWwEcK79esTIttuQkCFTHhPsrWbCQmletT8IjpUmT34RXbwGreBXnief8n9H4BC8eTe1JAE/kI3AhtdYfrRg==",
"version": "2.0.17",
"resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-2.0.17.tgz",
"integrity": "sha512-jKUIgcu6dlOSk09HEC9p+vnn5J5vc9K0y1NuWumNopqC3/iy9+EwKgpTWkfvytl+pWnDA9Ha+IBa6a99sgcHfw==",
"requires": {
"@babel/runtime": "^7.16.0",
"@wordpress/api-fetch": "^5.2.6",
"@wordpress/block-editor": "^8.0.8",
"@wordpress/block-editor": "^8.0.11",
"@wordpress/blocks": "^11.1.4",
"@wordpress/components": "^19.1.2",
"@wordpress/components": "^19.1.5",
"@wordpress/compose": "^5.0.6",
"@wordpress/core-data": "^4.0.8",
"@wordpress/data": "^6.1.4",
@ -6249,9 +6250,9 @@
}
},
"object-inspect": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz",
"integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg=="
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.1.tgz",
"integrity": "sha512-If7BjFlpkzzBeV1cqgT3OSWT3azyoxDGajR+iGnFBfVV2EWyDyWaZZW2ERDjUaY2QM8i5jI3Sj7mhsM4DDAqWA=="
},
"string.prototype.trimend": {
"version": "1.0.4",
@ -13987,6 +13988,14 @@
"resolved": "https://registry.npmjs.org/highlight-words-core/-/highlight-words-core-1.2.2.tgz",
"integrity": "sha512-BXUKIkUuh6cmmxzi5OIbUJxrG8OAk2MqoL1DtO3Wo9D2faJg2ph5ntyuQeLqaHJmzER6H5tllCDA9ZnNe9BVGg=="
},
"history": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/history/-/history-5.1.0.tgz",
"integrity": "sha512-zPuQgPacm2vH2xdORvGGz1wQMuHSIB56yNAy5FnLuwOwgSYyPKptJtcMm6Ev+hRGeS+GzhbmRacHzvlESbFwDg==",
"requires": {
"@babel/runtime": "^7.7.6"
}
},
"hmac-drbg": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
@ -21824,9 +21833,9 @@
}
},
"object-inspect": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz",
"integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg=="
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.1.tgz",
"integrity": "sha512-If7BjFlpkzzBeV1cqgT3OSWT3azyoxDGajR+iGnFBfVV2EWyDyWaZZW2ERDjUaY2QM8i5jI3Sj7mhsM4DDAqWA=="
},
"object.values": {
"version": "1.1.5",
@ -24864,9 +24873,9 @@
}
},
"stylis": {
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.10.tgz",
"integrity": "sha512-m3k+dk7QeJw660eIKRRn3xPF6uuvHs/FFzjX3HQ5ove0qYsiygoAhwn5a3IYKaZPo5LrYD0rfVmtv1gNY1uYwg=="
"version": "4.0.13",
"resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.13.tgz",
"integrity": "sha512-xGPXiFVl4YED9Jh7Euv2V220mriG9u4B2TA6Ybjc1catrstKD2PpIdU3U0RKpkVBC2EhmL/F0sPCr9vrFTNRag=="
},
"sugarss": {
"version": "2.0.0",

View File

@ -27,7 +27,7 @@
"@wordpress/babel-preset-default": "6.4.1",
"@wordpress/custom-templated-path-webpack-plugin": "2.1.0",
"@wordpress/dependency-extraction-webpack-plugin": "3.2.1",
"@wordpress/e2e-test-utils": "5.4.9",
"@wordpress/e2e-test-utils": "5.4.10",
"@wordpress/library-export-default-webpack-plugin": "2.2.0",
"@wordpress/scripts": "19.2.2",
"autoprefixer": "^9.8.8",
@ -82,53 +82,53 @@
"@wordpress/api-fetch": "5.2.6",
"@wordpress/autop": "3.2.3",
"@wordpress/blob": "3.2.2",
"@wordpress/block-directory": "3.0.14",
"@wordpress/block-editor": "8.0.8",
"@wordpress/block-library": "6.0.12",
"@wordpress/block-directory": "3.0.17",
"@wordpress/block-editor": "8.0.11",
"@wordpress/block-library": "6.0.15",
"@wordpress/block-serialization-default-parser": "4.2.3",
"@wordpress/blocks": "11.1.4",
"@wordpress/components": "19.1.2",
"@wordpress/components": "19.1.5",
"@wordpress/compose": "5.0.6",
"@wordpress/core-data": "4.0.8",
"@wordpress/customize-widgets": "2.0.14",
"@wordpress/customize-widgets": "2.0.17",
"@wordpress/data": "6.1.4",
"@wordpress/data-controls": "2.2.7",
"@wordpress/date": "4.2.3",
"@wordpress/deprecated": "3.2.3",
"@wordpress/dom": "3.2.7",
"@wordpress/dom-ready": "3.2.3",
"@wordpress/edit-post": "5.0.14",
"@wordpress/edit-site": "3.0.14",
"@wordpress/edit-widgets": "3.1.9",
"@wordpress/editor": "12.0.11",
"@wordpress/edit-post": "5.0.17",
"@wordpress/edit-site": "3.0.17",
"@wordpress/edit-widgets": "3.1.12",
"@wordpress/editor": "12.0.14",
"@wordpress/element": "4.0.4",
"@wordpress/escape-html": "2.2.3",
"@wordpress/format-library": "3.0.14",
"@wordpress/format-library": "3.0.17",
"@wordpress/hooks": "3.2.2",
"@wordpress/html-entities": "3.2.3",
"@wordpress/i18n": "4.2.4",
"@wordpress/icons": "6.1.1",
"@wordpress/interface": "4.1.10",
"@wordpress/interface": "4.1.13",
"@wordpress/is-shallow-equal": "4.2.1",
"@wordpress/keyboard-shortcuts": "3.0.6",
"@wordpress/keycodes": "3.2.4",
"@wordpress/list-reusable-blocks": "3.0.12",
"@wordpress/list-reusable-blocks": "3.0.15",
"@wordpress/media-utils": "3.0.5",
"@wordpress/notices": "3.2.7",
"@wordpress/nux": "5.0.12",
"@wordpress/nux": "5.0.15",
"@wordpress/plugins": "4.0.6",
"@wordpress/primitives": "3.0.4",
"@wordpress/priority-queue": "2.2.3",
"@wordpress/redux-routine": "4.2.2",
"@wordpress/reusable-blocks": "3.0.14",
"@wordpress/reusable-blocks": "3.0.17",
"@wordpress/rich-text": "5.0.6",
"@wordpress/server-side-render": "3.0.12",
"@wordpress/server-side-render": "3.0.15",
"@wordpress/shortcode": "3.2.3",
"@wordpress/token-list": "2.2.2",
"@wordpress/url": "3.3.1",
"@wordpress/viewport": "4.0.6",
"@wordpress/warning": "2.2.2",
"@wordpress/widgets": "2.0.14",
"@wordpress/widgets": "2.0.17",
"@wordpress/wordcount": "3.2.3",
"backbone": "1.4.0",
"clipboard": "2.0.8",

View File

@ -23,6 +23,8 @@ if ( ! wp_is_block_theme() ) {
wp_die( __( 'The theme you are currently using is not compatible with Full Site Editing.' ) );
}
// Used in the HTML title tag.
$title = __( 'Editor (beta)' );
$parent_file = 'themes.php';
// Flag that we're loading the block editor.
@ -56,75 +58,46 @@ $custom_settings = array(
$editor_settings = get_block_editor_settings( $custom_settings, $block_editor_context );
if ( isset( $_GET['postType'] ) && ! isset( $_GET['postId'] ) ) {
$post_type = get_post_type_object( $_GET['postType'] );
if ( ! $post_type ) {
wp_die( __( 'Invalid post type.' ) );
}
// Used in the HTML title tag.
$title = $post_type->labels->name;
$preload_paths = array(
'/',
'/wp/v2/types/' . $post_type->name . '?context=edit',
'/wp/v2/types?context=edit',
add_query_arg( 'context', 'edit', rest_get_route_for_post_type_items( $post_type->name ) ),
);
block_editor_rest_api_preload( $preload_paths, $block_editor_context );
wp_add_inline_script(
'wp-edit-site',
sprintf(
'wp.domReady( function() {
wp.editSite.initializeList( "site-editor", "%s", %s );
} );',
$post_type->name,
wp_json_encode( $editor_settings )
)
);
} else {
// Used in the HTML title tag.
$title = __( 'Editor (beta)' );
$active_global_styles_id = WP_Theme_JSON_Resolver::get_user_custom_post_type_id();
$active_theme = wp_get_theme()->get_stylesheet();
$preload_paths = array(
array( rest_get_route_for_post_type_items( 'attachment' ), 'OPTIONS' ),
'/',
'/wp/v2/types?context=edit',
'/wp/v2/taxonomies?context=edit',
add_query_arg( 'context', 'edit', rest_get_route_for_post_type_items( 'page' ) ),
add_query_arg( 'context', 'edit', rest_get_route_for_post_type_items( 'post' ) ),
add_query_arg( 'context', 'edit', rest_get_route_for_taxonomy_items( 'category' ) ),
add_query_arg( 'context', 'edit', rest_get_route_for_taxonomy_items( 'post_tag' ) ),
add_query_arg( 'context', 'edit', rest_get_route_for_post_type_items( 'wp_template' ) ),
add_query_arg( 'context', 'edit', rest_get_route_for_post_type_items( 'wp_template_part' ) ),
'/wp/v2/settings',
'/wp/v2/themes?context=edit&status=active',
'/wp/v2/global-styles/' . $active_global_styles_id . '?context=edit',
'/wp/v2/global-styles/' . $active_global_styles_id,
'/wp/v2/themes/' . $active_theme . '/global-styles',
);
block_editor_rest_api_preload( $preload_paths, $block_editor_context );
wp_add_inline_script(
'wp-edit-site',
sprintf(
'wp.domReady( function() {
wp.editSite.initializeEditor( "site-editor", %s );
} );',
wp_json_encode( $editor_settings )
)
);
}
$active_global_styles_id = WP_Theme_JSON_Resolver::get_user_custom_post_type_id();
$active_theme = wp_get_theme()->get_stylesheet();
$preload_paths = array(
array( '/wp/v2/media', 'OPTIONS' ),
'/',
'/wp/v2/types?context=edit',
'/wp/v2/types/wp_template?context=edit',
'/wp/v2/types/wp_template-part?context=edit',
'/wp/v2/taxonomies?context=edit',
'/wp/v2/pages?context=edit',
'/wp/v2/categories?context=edit',
'/wp/v2/posts?context=edit',
'/wp/v2/tags?context=edit',
'/wp/v2/templates?context=edit&per_page=-1',
'/wp/v2/template-parts?context=edit&per_page=-1',
'/wp/v2/settings',
'/wp/v2/themes?context=edit&status=active',
'/wp/v2/global-styles/' . $active_global_styles_id . '?context=edit',
'/wp/v2/global-styles/' . $active_global_styles_id,
'/wp/v2/global-styles/themes/' . $active_theme,
);
block_editor_rest_api_preload( $preload_paths, $block_editor_context );
wp_add_inline_script(
'wp-edit-site',
sprintf(
'wp.domReady( function() {
wp.editSite.initializeEditor( "site-editor", %s );
} );',
wp_json_encode( $editor_settings )
)
);
// Preload server-registered block schemas.
wp_add_inline_script(
'wp-blocks',

File diff suppressed because one or more lines are too long

View File

@ -311,7 +311,6 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex
array(
'css' => 'variables',
'__unstableType' => 'presets',
'__experimentalNoWrapper' => true,
),
array(
'css' => 'presets',

View File

@ -41,7 +41,7 @@ function get_block_theme_folders( $theme_stylesheet = null ) {
$root_dir = get_theme_root( $theme_name );
$theme_dir = "$root_dir/$theme_name";
if ( is_readable( $theme_dir . '/block-templates/index.html' ) ) {
if ( file_exists( $theme_dir . '/block-templates' ) || file_exists( $theme_dir . '/block-template-parts' ) ) {
return array(
'wp_template' => 'block-templates',
'wp_template_part' => 'block-template-parts',

View File

@ -0,0 +1,51 @@
<?php
/**
* Server-side rendering of the `core/gallery` block.
*
* @package WordPress
*/
/**
* Handles backwards compatibility for Gallery Blocks,
* whose images feature a `data-id` attribute.
*
* Now that the Gallery Block contains inner Image Blocks,
* we add a custom `data-id` attribute before rendering the gallery
* so that the Image Block can pick it up in its render_callback.
*
* @param array $parsed_block The block being rendered.
* @return array The migrated block object.
*/
function block_core_gallery_data_id_backcompatibility( $parsed_block ) {
if ( 'core/gallery' === $parsed_block['blockName'] ) {
foreach ( $parsed_block['innerBlocks'] as $key => $inner_block ) {
if ( 'core/image' === $inner_block['blockName'] ) {
if ( ! isset( $parsed_block['innerBlocks'][ $key ]['attrs']['data-id'] ) && isset( $inner_block['attrs']['id'] ) ) {
$parsed_block['innerBlocks'][ $key ]['attrs']['data-id'] = esc_attr( $inner_block['attrs']['id'] );
}
}
}
}
return $parsed_block;
}
add_filter( 'render_block_data', 'block_core_gallery_data_id_backcompatibility' );
/**
* Registers the `core/gallery` block on server.
* This render callback needs to be here
* so that the gallery styles are loaded in block-based themes.
*/
function register_block_core_gallery() {
register_block_type_from_metadata(
__DIR__ . '/gallery',
array(
'render_callback' => function ( $attributes, $content ) {
return $content;
},
)
);
}
add_action( 'init', 'register_block_core_gallery', 20 );

View File

@ -0,0 +1,42 @@
<?php
/**
* Server-side rendering of the `core/image` block.
*
* @package WordPress
*/
/**
* Renders the `core/image` block on the server,
* adding a data-id attribute to the element if core/gallery has added on pre-render.
*
* @param array $attributes The block attributes.
* @param array $content The block content.
* @return string Returns the block content with the data-id attribute added.
*/
function render_block_core_image( $attributes, $content ) {
if ( isset( $attributes['data-id'] ) ) {
// Add the data-id="$id" attribute to the img element
// to provide backwards compatibility for the Gallery Block,
// which now wraps Image Blocks within innerBlocks.
// The data-id attribute is added in a core/gallery `render_block_data` hook.
$data_id_attribute = 'data-id="' . esc_attr( $attributes['data-id'] ) . '"';
if ( ! strpos( $content, $data_id_attribute ) ) {
$content = str_replace( '<img', '<img ' . $data_id_attribute . ' ', $content );
}
}
return $content;
}
/**
* Registers the `core/image` block on server.
*/
function register_block_core_image() {
register_block_type_from_metadata(
__DIR__ . '/image',
array(
'render_callback' => 'render_block_core_image',
)
);
}
add_action( 'init', 'register_block_core_image' );

View File

@ -11,6 +11,8 @@ require ABSPATH . WPINC . '/blocks/block.php';
require ABSPATH . WPINC . '/blocks/calendar.php';
require ABSPATH . WPINC . '/blocks/categories.php';
require ABSPATH . WPINC . '/blocks/file.php';
require ABSPATH . WPINC . '/blocks/gallery.php';
require ABSPATH . WPINC . '/blocks/image.php';
require ABSPATH . WPINC . '/blocks/latest-comments.php';
require ABSPATH . WPINC . '/blocks/latest-posts.php';
require ABSPATH . WPINC . '/blocks/legacy-widget.php';
@ -64,11 +66,9 @@ function register_core_block_types_from_metadata() {
'cover',
'embed',
'freeform',
'gallery',
'group',
'heading',
'html',
'image',
'list',
'media-text',
'missing',

View File

@ -188,6 +188,12 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) {
);
}
$aria_label = sprintf(
/* translators: Accessibility text. %s: Parent page title. */
__( '%s submenu' ),
$label
);
$html = '<li ' . $wrapper_attributes . '>';
// If Submenus open on hover, we render an anchor tag with attributes.
@ -226,11 +232,11 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) {
if ( $show_submenu_indicators ) {
// The submenu icon is rendered in a button here
// so that there's a clickable elment to open the submenu.
$html .= '<button aria-label="' . $label . ' ' . __( 'submenu', 'gutenberg' ) . '" class="wp-block-navigation__submenu-icon wp-block-navigation-submenu__toggle" aria-expanded="false">' . block_core_navigation_submenu_render_submenu_icon() . '</button>';
$html .= '<button aria-label="' . $aria_label . '" class="wp-block-navigation__submenu-icon wp-block-navigation-submenu__toggle" aria-expanded="false">' . block_core_navigation_submenu_render_submenu_icon() . '</button>';
}
} else {
// If menus open on click, we render the parent as a button.
$html .= '<button aria-label="' . $label . ' ' . __( 'submenu', 'gutenberg' ) . '" class="wp-block-navigation-item__content wp-block-navigation-submenu__toggle" aria-expanded="false">';
$html .= '<button aria-label="' . $aria_label . '" class="wp-block-navigation-item__content wp-block-navigation-submenu__toggle" aria-expanded="false">';
// Wrap title with span to isolate it from submenu icon.
$html .= '<span class="wp-block-navigation-item__label">';

View File

@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '133b84f32422a9ad94c4533f85fa4e87');
<?php return array('dependencies' => array(), 'version' => '34d9f07c7910e83c264c6c4406619c5e');

View File

@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => 'f3cbbfbf9b9c434c39d6f77037d5267c');
<?php return array('dependencies' => array(), 'version' => 'd5ab04a497b4f1465f1f0060b6b71ae3');

View File

@ -173,12 +173,17 @@ function block_core_page_list_render_nested_page_list( $open_submenus_on_click,
}
}
$title = wp_kses( $page['title'], wp_kses_allowed_html( 'post' ) );
$title = wp_kses( $page['title'], wp_kses_allowed_html( 'post' ) );
$aria_label = sprintf(
/* translators: Accessibility text. %s: Parent page title. */
__( '%s submenu' ),
$title
);
$markup .= '<li class="wp-block-pages-list__item' . $css_class . '"' . $style_attribute . '>';
if ( isset( $page['children'] ) && $is_navigation_child && $open_submenus_on_click ) {
$markup .= '<button aria-label="' . $title . ' ' . __( 'submenu', 'gutenberg' ) . '" class="' . $navigation_child_content_class . ' wp-block-navigation-submenu__toggle" aria-expanded="false">' . $title . '<span class="wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" role="img" aria-hidden="true" focusable="false"><path d="M1.50002 4L6.00002 8L10.5 4" stroke-width="1.5"></path></svg></span>' .
$markup .= '<button aria-label="' . $aria_label . '" class="' . $navigation_child_content_class . ' wp-block-navigation-submenu__toggle" aria-expanded="false">' . $title . '<span class="wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" role="img" aria-hidden="true" focusable="false"><path d="M1.50002 4L6.00002 8L10.5 4" stroke-width="1.5"></path></svg></span>' .
'</button>';
} else {
$markup .= '<a class="wp-block-pages-list__item__link' . $navigation_child_content_class . '" href="' . esc_url( $page['link'] ) . '"' . $aria_current . '>' . $title . '</a>';
@ -186,7 +191,7 @@ function block_core_page_list_render_nested_page_list( $open_submenus_on_click,
if ( isset( $page['children'] ) ) {
if ( $is_navigation_child && $show_submenu_icons && ! $open_submenus_on_click ) {
$markup .= '<button aria-label="' . $title . ' ' . __( 'submenu', 'gutenberg' ) . '" class="wp-block-navigation__submenu-icon wp-block-navigation-submenu__toggle" aria-expanded="false">';
$markup .= '<button aria-label="' . $aria_label . '" class="wp-block-navigation__submenu-icon wp-block-navigation-submenu__toggle" aria-expanded="false">';
$markup .= '<span class="wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" role="img" aria-hidden="true" focusable="false"><path d="M1.50002 4L6.00002 8L10.5 4" stroke-width="1.5"></path></svg></span>';
$markup .= '</button>';
}

View File

@ -66,3 +66,20 @@ function register_block_core_post_comments() {
);
}
add_action( 'init', 'register_block_core_post_comments' );
/**
* Use the button block classes for the form-submit button.
*
* @param array $fields The default comment form arguments.
*
* @return array Returns the modified fields.
*/
function post_comments_block_form_defaults( $fields ) {
if ( wp_is_block_theme() ) {
$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="%3$s wp-block-button__link" value="%4$s" />';
$fields['submit_field'] = '<p class="form-submit wp-block-button">%1$s %2$s</p>';
}
return $fields;
}
add_filter( 'comment_form_defaults', 'post_comments_block_form_defaults' );

View File

@ -30,5 +30,9 @@
"link": true
}
},
"style": "wp-block-post-comments"
"style": [
"wp-block-post-comments",
"wp-block-buttons",
"wp-block-button"
]
}

View File

@ -64,8 +64,11 @@ function render_block_core_template_part( $attributes ) {
} else {
// Else, if the template part was provided by the active theme,
// render the corresponding file content.
$theme_folders = get_block_theme_folders();
$template_part_file_path = get_theme_file_path( '/' . $theme_folders['wp_template_part'] . '/' . $attributes['slug'] . '.html' );
$parent_theme_folders = get_block_theme_folders( get_template() );
$child_theme_folders = get_block_theme_folders( get_stylesheet() );
$child_theme_part_file_path = get_theme_file_path( '/' . $child_theme_folders['wp_template_part'] . '/' . $attributes['slug'] . '.html' );
$parent_theme_part_file_path = get_theme_file_path( '/' . $parent_theme_folders['wp_template_part'] . '/' . $attributes['slug'] . '.html' );
$template_part_file_path = 0 === validate_file( $attributes['slug'] ) && file_exists( $child_theme_part_file_path ) ? $child_theme_part_file_path : $parent_theme_part_file_path;
if ( 0 === validate_file( $attributes['slug'] ) && file_exists( $template_part_file_path ) ) {
$content = file_get_contents( $template_part_file_path );
$content = is_string( $content ) && '' !== $content

View File

@ -107,7 +107,7 @@ class WP_Theme_JSON {
const PRESETS_METADATA = array(
array(
'path' => array( 'color', 'palette' ),
'override' => false,
'override' => array( 'color', 'defaultPalette' ),
'value_key' => 'color',
'css_vars' => '--wp--preset--color--$slug',
'classes' => array(
@ -119,7 +119,7 @@ class WP_Theme_JSON {
),
array(
'path' => array( 'color', 'gradients' ),
'override' => false,
'override' => array( 'color', 'defaultGradients' ),
'value_key' => 'gradient',
'css_vars' => '--wp--preset--gradient--$slug',
'classes' => array( '.has-$slug-gradient-background' => 'background' ),
@ -397,13 +397,16 @@ class WP_Theme_JSON {
private static function maybe_opt_in_into_settings( $theme_json ) {
$new_theme_json = $theme_json;
if ( isset( $new_theme_json['settings']['appearanceTools'] ) ) {
if (
isset( $new_theme_json['settings']['appearanceTools'] ) &&
true === $new_theme_json['settings']['appearanceTools']
) {
self::do_opt_in_into_settings( $new_theme_json['settings'] );
}
if ( isset( $new_theme_json['settings']['blocks'] ) && is_array( $new_theme_json['settings']['blocks'] ) ) {
foreach ( $new_theme_json['settings']['blocks'] as &$block ) {
if ( isset( $block['appearanceTools'] ) ) {
if ( isset( $block['appearanceTools'] ) && ( true === $block['appearanceTools'] ) ) {
self::do_opt_in_into_settings( $block );
}
}
@ -433,7 +436,9 @@ class WP_Theme_JSON {
);
foreach ( $to_opt_in as $path ) {
if ( null === _wp_array_get( $context, $path, null ) ) {
// Use "unset prop" as a marker instead of "null" because
// "null" can be a valid value for some props (e.g. blockGap).
if ( 'unset prop' === _wp_array_get( $context, $path, 'unset prop' ) ) {
_wp_array_set( $context, $path, true );
}
}
@ -1502,9 +1507,9 @@ class WP_Theme_JSON {
* we remove it from the theme presets.
*/
$nodes = self::get_setting_nodes( $incoming_data );
$slugs_global = self::get_slugs_not_to_override( $this->theme_json );
$slugs_global = self::get_default_slugs( $this->theme_json, array( 'settings' ) );
foreach ( $nodes as $node ) {
$slugs_node = self::get_slugs_not_to_override( $this->theme_json, $node['path'] );
$slugs_node = self::get_default_slugs( $this->theme_json, $node['path'] );
$slugs = array_merge_recursive( $slugs_global, $slugs_node );
// Replace the spacing.units.
@ -1516,6 +1521,8 @@ class WP_Theme_JSON {
// Replace the presets.
foreach ( self::PRESETS_METADATA as $preset ) {
$override_preset = self::should_override_preset( $this->theme_json, $node['path'], $preset['override'] );
foreach ( self::VALID_ORIGINS as $origin ) {
$path = array_merge( $node['path'], $preset['path'], array( $origin ) );
$content = _wp_array_get( $incoming_data, $path, null );
@ -1525,13 +1532,12 @@ class WP_Theme_JSON {
if (
( 'theme' !== $origin ) ||
( 'theme' === $origin && $preset['override'] )
( 'theme' === $origin && $override_preset )
) {
_wp_array_set( $this->theme_json, $path, $content );
}
if ( 'theme' === $origin && ! $preset['override'] ) {
$content = self::filter_slugs( $content, $preset['path'], $slugs );
} else {
$slugs_for_preset = _wp_array_get( $slugs, $preset['path'], array() );
$content = self::filter_slugs( $content, $slugs_for_preset );
_wp_array_set( $this->theme_json, $path, $content );
}
}
@ -1540,13 +1546,55 @@ class WP_Theme_JSON {
}
/**
* Returns the slugs for all the presets that cannot be overriden
* in the given path. It returns an associative array
* Returns whether a presets should be overriden or not.
*
* @since 5.9.0
*
* @param array $theme_json The theme.json like structure to inspect.
* @param array $path Path to inspect.
* @param bool|array $override Data to compute whether to override the preset.
* @return boolean
*/
private static function should_override_preset( $theme_json, $path, $override ) {
if ( is_bool( $override ) ) {
return $override;
}
/*
* The relationship between whether to override the defaults
* and whether the defaults are enabled is inverse:
*
* - If defaults are enabled => theme presets should not be overriden
* - If defaults are disabled => theme presets should be overriden
*
* For example, a theme sets defaultPalette to false,
* making the default palette hidden from the user.
* In that case, we want all the theme presets to be present,
* so they should override the defaults.
*/
if ( is_array( $override ) ) {
$value = _wp_array_get( $theme_json, array_merge( $path, $override ) );
if ( isset( $value ) ) {
return ! $value;
}
// Search the top-level key if none was found for this node.
$value = _wp_array_get( $theme_json, array_merge( array( 'settings' ), $override ) );
if ( isset( $value ) ) {
return ! $value;
}
return true;
}
}
/**
* Returns the default slugs for all the presets in an associative array
* whose keys are the preset paths and the leafs is the list of slugs.
*
* For example:
*
* array(
* array(
* 'color' => array(
* 'palette' => array( 'slug-1', 'slug-2' ),
* 'gradients' => array( 'slug-3', 'slug-4' ),
@ -1555,26 +1603,23 @@ class WP_Theme_JSON {
*
* @since 5.9.0
*
* @param array $data A theme.json like structure to inspect.
* @param array $node_path The path to inspect. Default `array( 'settings' )`.
* @return array An associative array containing the slugs for the given path.
* @param array $data A theme.json like structure.
* @param array $node_path The path to inspect. It's 'settings' by default.
* @return array
*/
private static function get_slugs_not_to_override( $data, $node_path = array( 'settings' ) ) {
private static function get_default_slugs( $data, $node_path ) {
$slugs = array();
foreach ( self::PRESETS_METADATA as $metadata ) {
if ( $metadata['override'] ) {
continue;
}
$slugs_for_preset = array();
$path = array_merge( $node_path, $metadata['path'], array( 'default' ) );
$preset = _wp_array_get( $data, $path, null );
foreach ( self::PRESETS_METADATA as $metadata ) {
$path = array_merge( $node_path, $metadata['path'], array( 'default' ) );
$preset = _wp_array_get( $data, $path, null );
if ( ! isset( $preset ) ) {
continue;
}
$slugs_for_preset = array();
$slugs_for_preset = array_map(
function( $value ) {
static function( $value ) {
return isset( $value['slug'] ) ? $value['slug'] : null;
},
$preset
@ -1591,19 +1636,17 @@ class WP_Theme_JSON {
* @since 5.9.0
*
* @param array $node The node with the presets to validate.
* @param array $path The path to the preset type to inspect.
* @param array $slugs The slugs that should not be overriden.
* @return array The new node.
*/
private static function filter_slugs( $node, $path, $slugs ) {
$slugs_for_preset = _wp_array_get( $slugs, $path, array() );
if ( empty( $slugs_for_preset ) ) {
private static function filter_slugs( $node, $slugs ) {
if ( empty( $slugs ) ) {
return $node;
}
$new_node = array();
foreach ( $node as $value ) {
if ( isset( $value['slug'] ) && ! in_array( $value['slug'], $slugs_for_preset, true ) ) {
if ( isset( $value['slug'] ) && ! in_array( $value['slug'], $slugs, true ) ) {
$new_node[] = $value;
}
}

View File

@ -563,6 +563,7 @@ add_action( 'enqueue_block_editor_assets', 'wp_enqueue_registered_block_scripts_
add_action( 'enqueue_block_editor_assets', 'enqueue_editor_block_styles_assets' );
add_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' );
add_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_format_library_assets' );
add_action( 'enqueue_block_editor_assets', 'wp_enqueue_global_styles_css_custom_properties' );
add_action( 'admin_print_scripts-index.php', 'wp_localize_community_events' );
add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );

View File

@ -504,7 +504,7 @@ function create_initial_post_types() {
'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
'has_archive' => false,
'show_ui' => wp_is_block_theme(),
'show_in_menu' => 'themes.php',
'show_in_menu' => false,
'show_in_admin_bar' => false,
'show_in_rest' => true,
'rewrite' => false,

View File

@ -2863,3 +2863,14 @@ function wp_add_iframed_editor_assets_html() {
echo "<script>window.__editorAssets = $editor_assets</script>";
}
/**
* Function that enqueues the CSS Custom Properties coming from theme.json.
*
* @since 5.9.0
*/
function wp_enqueue_global_styles_css_custom_properties() {
wp_register_style( 'global-styles-css-custom-properties', false, array(), true, true );
wp_add_inline_style( 'global-styles-css-custom-properties', wp_get_global_stylesheet( array( 'variables' ) ) );
wp_enqueue_style( 'global-styles-css-custom-properties' );
}

View File

@ -307,6 +307,8 @@ function _unhook_block_registration() {
remove_action( 'init', 'register_block_core_calendar' );
remove_action( 'init', 'register_block_core_categories' );
remove_action( 'init', 'register_block_core_file' );
remove_action( 'init', 'register_block_core_gallery', 20 );
remove_action( 'init', 'register_block_core_image' );
remove_action( 'init', 'register_block_core_latest_comments' );
remove_action( 'init', 'register_block_core_latest_posts' );
remove_action( 'init', 'register_block_core_legacy_widget' );

View File

@ -200,12 +200,15 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
$this->assertEqualSetsWithIndex( $expected_no_origin, $actual_no_origin );
}
function test_get_settings_using_opt_in_key() {
function test_get_settings_appearance_true_opts_in() {
$theme_json = new WP_Theme_JSON(
array(
'version' => WP_Theme_JSON::LATEST_SCHEMA,
'settings' => array(
'appearanceTools' => true,
'spacing' => array(
'blockGap' => false, // This should override appearanceTools.
),
'blocks' => array(
'core/paragraph' => array(
'typography' => array(
@ -217,6 +220,9 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
'typography' => array(
'lineHeight' => false, // This should override appearanceTools.
),
'spacing' => array(
'blockGap' => null,
),
),
),
),
@ -235,7 +241,7 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
'link' => true,
),
'spacing' => array(
'blockGap' => true,
'blockGap' => false,
'margin' => true,
'padding' => true,
),
@ -259,7 +265,7 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
'link' => true,
),
'spacing' => array(
'blockGap' => true,
'blockGap' => false,
'margin' => true,
'padding' => true,
),
@ -273,6 +279,54 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
$this->assertEqualSetsWithIndex( $expected, $actual );
}
function test_get_settings_appearance_false_does_not_opt_in() {
$theme_json = new WP_Theme_JSON(
array(
'version' => WP_Theme_JSON::LATEST_SCHEMA,
'settings' => array(
'appearanceTools' => false,
'border' => array(
'width' => true,
),
'blocks' => array(
'core/paragraph' => array(
'typography' => array(
'lineHeight' => false,
),
),
'core/group' => array(
'typography' => array(
'lineHeight' => false,
),
),
),
),
)
);
$actual = $theme_json->get_settings();
$expected = array(
'appearanceTools' => false,
'border' => array(
'width' => true,
),
'blocks' => array(
'core/paragraph' => array(
'typography' => array(
'lineHeight' => false,
),
),
'core/group' => array(
'typography' => array(
'lineHeight' => false,
),
),
),
);
$this->assertEqualSetsWithIndex( $expected, $actual );
}
/**
* @ticket 54336
*/
@ -1133,13 +1187,14 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
$this->assertEqualSetsWithIndex( $expected, $actual );
}
public function test_merge_incoming_data_removes_theme_presets_with_slugs_as_default_presets() {
public function test_merge_incoming_data_color_presets_with_same_slugs_as_default_are_removed() {
$defaults = new WP_Theme_JSON(
array(
'version' => WP_Theme_JSON::LATEST_SCHEMA,
'settings' => array(
'color' => array(
'palette' => array(
'defaultPalette' => true,
'palette' => array(
array(
'slug' => 'red',
'color' => 'red',
@ -1218,7 +1273,7 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
'version' => WP_Theme_JSON::LATEST_SCHEMA,
'settings' => array(
'color' => array(
'palette' => array(
'palette' => array(
'default' => array(
array(
'slug' => 'red',
@ -1239,6 +1294,7 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
),
),
),
'defaultPalette' => true,
),
'blocks' => array(
'core/paragraph' => array(
@ -1271,6 +1327,162 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
$this->assertEqualSetsWithIndex( $expected, $actual );
}
public function test_merge_incoming_data_color_presets_with_same_slugs_as_default_are_not_removed_if_defaults_are_disabled() {
$defaults = new WP_Theme_JSON(
array(
'version' => WP_Theme_JSON::LATEST_SCHEMA,
'settings' => array(
'color' => array(
'defaultPalette' => true, // Emulate the defaults from core theme.json.
'palette' => array(
array(
'slug' => 'red',
'color' => 'red',
'name' => 'Red',
),
array(
'slug' => 'green',
'color' => 'green',
'name' => 'Green',
),
),
),
'blocks' => array(
'core/paragraph' => array(
'color' => array(
'palette' => array(
array(
'slug' => 'blue',
'color' => 'blue',
'name' => 'Blue',
),
),
),
),
),
),
),
'default'
);
$theme = new WP_Theme_JSON(
array(
'version' => WP_Theme_JSON::LATEST_SCHEMA,
'settings' => array(
'color' => array(
'defaultPalette' => false,
'palette' => array(
array(
'slug' => 'pink',
'color' => 'pink',
'name' => 'Pink',
),
array(
'slug' => 'green',
'color' => 'green',
'name' => 'Greenish',
),
),
),
'blocks' => array(
'core/paragraph' => array(
'color' => array(
'palette' => array(
array(
'slug' => 'blue',
'color' => 'blue',
'name' => 'Bluish',
),
array(
'slug' => 'yellow',
'color' => 'yellow',
'name' => 'Yellow',
),
array(
'slug' => 'green',
'color' => 'green',
'name' => 'Block Green',
),
),
),
),
),
),
)
);
$expected = array(
'version' => WP_Theme_JSON::LATEST_SCHEMA,
'settings' => array(
'color' => array(
'defaultPalette' => false,
'palette' => array(
'default' => array(
array(
'slug' => 'red',
'color' => 'red',
'name' => 'Red',
),
array(
'slug' => 'green',
'color' => 'green',
'name' => 'Green',
),
),
'theme' => array(
array(
'slug' => 'pink',
'color' => 'pink',
'name' => 'Pink',
),
array(
'slug' => 'green',
'color' => 'green',
'name' => 'Greenish',
),
),
),
),
'blocks' => array(
'core/paragraph' => array(
'color' => array(
'palette' => array(
'default' => array(
array(
'slug' => 'blue',
'color' => 'blue',
'name' => 'Blue',
),
),
'theme' => array(
array(
'slug' => 'blue',
'color' => 'blue',
'name' => 'Bluish',
),
array(
'slug' => 'yellow',
'color' => 'yellow',
'name' => 'Yellow',
),
array(
'slug' => 'green',
'color' => 'green',
'name' => 'Block Green',
),
),
),
),
),
),
),
);
$defaults->merge( $theme );
$actual = $defaults->get_raw_data();
$this->assertEqualSetsWithIndex( $expected, $actual );
}
/**
* @ticket 54336
*/

View File

@ -28,6 +28,8 @@ module.exports = function( env = { environment: 'production', watch: false, buil
'calendar',
'categories',
'file',
'gallery',
'image',
'latest-comments',
'latest-posts',
'loginout',
@ -73,11 +75,9 @@ module.exports = function( env = { environment: 'production', watch: false, buil
'cover',
'embed',
'freeform',
'gallery',
'group',
'heading',
'html',
'image',
'list',
'media-text',
'missing',