Make WordPress Core

Changeset 52275


Ignore:
Timestamp:
11/30/2021 12:22:30 AM (3 years ago)
Author:
noisysocks
Message:

Update @wordpress packages

Update packages to include these bug fixes from Gutenberg:

  • Update Pattern block category and add documentation
  • Fix non existent menu handling in nav block
  • Make Reusable blocks available in the Site Editor
  • Add caching to WP_Theme_JSON_Resolver_Gutenberg::get_user_data_from_custom_post_type()
  • theme.json: add appearanceTools flag to opt-in into appearance UI controls
  • Update the block theme folders to templates and parts
  • Remove reference to gutenberg_, swap with wp_
  • Use table layout in templates list screen
  • Update featured image placeholder graphic.
  • [Inserter]: Adjust order of theme blocks and reorder inserter items
  • Implement suitable fallback for Nav block on front end of site when no menu selected
  • Toggle Group Control: add tooltip
  • Use first non-empty Nav post as primary fallback for Nav block
  • Change .nvmrc and documentation for Node.js version (LTS to 14.18.1)
  • Update: Migrate global styles user database data on the rest endpoint
  • Update global styles public API
  • Update: Rename user preset origin to custom
  • Try always generating navigation post title
  • Show all templates and template parts on the site editor list screens
  • Highlight "Site" in the navigation panel
  • Fix template part slug generation when creating through the block placeholder
  • [Block Library - Post Title]: Fix render error when setting Page to homepage
  • Add 'Clear customizations' button to template list page
  • Gallery v1: Allow clicks within replace media placeholder state
  • Site Editor: Set the <title> on the list page to be same as the CPT name
  • Gallery: Fix stuck image size options loader
  • Cover: Fix undo trap
  • Add success and error snackbars to the templates list page
  • Fix: theme colors cannot override defaults
  • Fix: Color palette is not being stored
  • Add elements support to the typography panel in global styles
  • Make links plural in global styles
  • Add: Gradient palette editor
  • Update some small style regressions in the template list
  • Add: Transparency support on global styles colors
  • Fix: apply by slug on all origins
  • Render empty Nav block if no fallback block can be utilised
  • Allow filtering of Nav block fallback
  • Fix Nav block fallback DB query to match on full block grammar start tag
  • Remove unstable max pages attribute from Nav block
  • DateTimePicker: set PM hours correctly
  • Update delete template button
  • Site Editor: Template list add rename action
  • Fix Nav block editing wrong entity on creation of new Menu
  • [REST] Restore the missing double slash in the ID received by /templates
  • Add icons to navigation sidebar items
  • Update function names for the public global styles API functions
  • Templates Controller: Add missing 'is_custom' prop
  • Rename gutenberg_ to wp_ for some functions that land in WordPress 5.9
  • [Block Library - Template Part]:Remove support for conversion to Reusable block
  • Global Styles: Call "palettes" and not "color palettes" on panel label
  • Add button text when no colors found
  • Update: Global Styes: Count all color palette origins on the palette counter
  • Rename navigationMenuId to ref
  • Offset the parent iframe when computing Popover position
  • Fix: Failing PHPUnit test
  • Show theme, plugin or author in Added By column with appropriate icon or avatar
  • Add origin and author to template rest api

See #54487.
Props talldanwp, mamaduka, oandregal.

Location:
trunk
Files:
37 edited

Legend:

Unmodified
Added
Removed
  • trunk/package-lock.json

    r52232 r52275  
    14531453        },
    14541454        "@emotion/react": {
    1455             "version": "11.6.0",
    1456             "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.6.0.tgz",
    1457             "integrity": "sha512-23MnRZFBN9+D1lHXC5pD6z4X9yhPxxtHr6f+iTGz6Fv6Rda0GdefPrsHL7otsEf+//7uqCdT5QtHeRxHCERzuw==",
     1455            "version": "11.7.0",
     1456            "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.7.0.tgz",
     1457            "integrity": "sha512-WL93hf9+/2s3cA1JVJlz8+Uy6p6QWukqQFOm2OZO5ki51hfucHMOmbSjiyC3t2Y4RI8XUmBoepoc/24ny/VBbA==",
    14581458            "requires": {
    14591459                "@babel/runtime": "^7.13.10",
     
    22592259        },
    22602260        "@popperjs/core": {
    2261             "version": "2.10.2",
    2262             "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.10.2.tgz",
    2263             "integrity": "sha512-IXf3XA7+XyN7CP9gGh/XB0UxVMlvARGEgGXLubFICsUMGz6Q+DU+i4gGlpOxTjKvXjkJDJC8YdqdKkDj9qZHEQ=="
     2261            "version": "2.11.0",
     2262            "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.0.tgz",
     2263            "integrity": "sha512-zrsUxjLOKAzdewIDRWy9nsV1GQsKBCWaGwsZQlCgr6/q+vjyZhFgqedLfFBuI9anTPEUT4APq9Mu0SZBTzIcGQ=="
    22642264        },
    22652265        "@react-spring/animated": {
    2266             "version": "9.3.0",
    2267             "resolved": "https://registry.npmjs.org/@react-spring/animated/-/animated-9.3.0.tgz",
    2268             "integrity": "sha512-QvuyW77eDvLhdJyO6FFldlWlvnuKK2cpOx4+Zr962RyT/0IO1tbNDRO6G1vM8va6mbv6tmfYmRGKmKYePN3kVg==",
     2266            "version": "9.3.1",
     2267            "resolved": "https://registry.npmjs.org/@react-spring/animated/-/animated-9.3.1.tgz",
     2268            "integrity": "sha512-23YaERZ++BwZ8F8PxPFqrpOwp/JZun1Pj6aHZtPAU42j5LycBRasT9XMw7Eyr7zNFhT+rl3R3wFfd4WX6Ax+UA==",
    22692269            "requires": {
    22702270                "@react-spring/shared": "~9.3.0",
     
    22732273        },
    22742274        "@react-spring/core": {
    2275             "version": "9.3.0",
    2276             "resolved": "https://registry.npmjs.org/@react-spring/core/-/core-9.3.0.tgz",
    2277             "integrity": "sha512-SZQOIX7wkIagmucAi7zxqGGIb9A60o9n5922UrWo8Kl3FdG7FgrNwqr0kOI43/pMFeL70/PXwFhBatB03N5ctw==",
     2275            "version": "9.3.1",
     2276            "resolved": "https://registry.npmjs.org/@react-spring/core/-/core-9.3.1.tgz",
     2277            "integrity": "sha512-8rmfmEHLHGtF1CUiXRn64YJqsXNxv2cGX8oNnBnsuoE33c48Zc34t2VIMB4R9q5zwIUCvDBGfiEenA8ZAPxqOQ==",
    22782278            "requires": {
    22792279                "@react-spring/animated": "~9.3.0",
     
    22832283        },
    22842284        "@react-spring/rafz": {
    2285             "version": "9.3.0",
    2286             "resolved": "https://registry.npmjs.org/@react-spring/rafz/-/rafz-9.3.0.tgz",
    2287             "integrity": "sha512-FD04d2TNb3xOZ6+04qwDmC3d0H4X6gvhsxU71/nSm4PPYRqFzZEolcVPmrHlbGzco3bvXKI+Kp2pIrpXLPUJFA=="
     2285            "version": "9.3.1",
     2286            "resolved": "https://registry.npmjs.org/@react-spring/rafz/-/rafz-9.3.1.tgz",
     2287            "integrity": "sha512-fEBMCarGVl+/2kdO+g6Zig4F+3ymwmcGN8S71gb1c7Cbbxb87kviPz8EhshfIHoiLeJPGlqwcuGbxNmZbBamvA=="
    22882288        },
    22892289        "@react-spring/shared": {
    2290             "version": "9.3.0",
    2291             "resolved": "https://registry.npmjs.org/@react-spring/shared/-/shared-9.3.0.tgz",
    2292             "integrity": "sha512-7ZFY2Blu/wxbLGcYvQavyLUVi9bK/is1bsn11qZ9AaZb4iucRyIf2jgjBfKZFCq4qgi7S/7QmDQG7sucUyLELg==",
     2290            "version": "9.3.1",
     2291            "resolved": "https://registry.npmjs.org/@react-spring/shared/-/shared-9.3.1.tgz",
     2292            "integrity": "sha512-jhPpxzURGo6Nty90ex1lkxmZae7w/VAbnGmb/nXcYoZwSoNR+W2aAd00iXsh2ZGz6MgoJOsc495JeG3uC7Am8A==",
    22932293            "requires": {
    22942294                "@react-spring/rafz": "~9.3.0",
     
    22972297        },
    22982298        "@react-spring/types": {
    2299             "version": "9.3.0",
    2300             "resolved": "https://registry.npmjs.org/@react-spring/types/-/types-9.3.0.tgz",
    2301             "integrity": "sha512-q4cDr2RSPblXMD3Rxvk6qcC7nmhhfV2izEBP06hb8ZCXznA6qJirG3RMpi29kBtEQiw1lWR59hAXKhauaPtbOA=="
     2299            "version": "9.3.1",
     2300            "resolved": "https://registry.npmjs.org/@react-spring/types/-/types-9.3.1.tgz",
     2301            "integrity": "sha512-W/YMJMX35XgGGzX0gKORBTwnvQ+1loDOFN3XlZkW5fgpEY+7VkRUpPyqPWXQr3n6lHrsLmHIGdpznqZi54ACTQ=="
    23022302        },
    23032303        "@react-spring/web": {
    2304             "version": "9.3.0",
    2305             "resolved": "https://registry.npmjs.org/@react-spring/web/-/web-9.3.0.tgz",
    2306             "integrity": "sha512-OTAGKRdyz6fLRR1tABFyw9KMpytyATIndQrj0O6RG47GfjiInpf4+WZKxo763vpS7z1OlnkI81WLUm/sqOqAnA==",
     2304            "version": "9.3.1",
     2305            "resolved": "https://registry.npmjs.org/@react-spring/web/-/web-9.3.1.tgz",
     2306            "integrity": "sha512-sisZIgFGva/Z+xKWPSfXpukF0AP3kR9ALTxlHL87fVotMUCJX5vtH/YlVcywToEFwTHKt3MpI5Wy2M+vgVEeaw==",
    23072307            "requires": {
    23082308                "@react-spring/animated": "~9.3.0",
     
    35303530        },
    35313531        "@wordpress/block-directory": {
    3532             "version": "3.0.11",
    3533             "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-3.0.11.tgz",
    3534             "integrity": "sha512-zSFsm+yUcrgZSWQVXWPd8jp+K1Lf/S5JITUp1cKReae9hhHgvmEpQydmWNGgjIadeALpcka5j0JIe2AJAqGeBA==",
     3532            "version": "3.0.12",
     3533            "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-3.0.12.tgz",
     3534            "integrity": "sha512-nZqGheHJ1lapCacPgz+pnk2Rb7i6EmJHLSsAh06Om9lXo3ARph1bhnHlS7KME0zADtam7uHteKYE8oSn0jTLcg==",
    35353535            "requires": {
    35363536                "@babel/runtime": "^7.16.0",
    35373537                "@wordpress/a11y": "^3.2.4",
    35383538                "@wordpress/api-fetch": "^5.2.6",
    3539                 "@wordpress/block-editor": "^8.0.5",
     3539                "@wordpress/block-editor": "^8.0.6",
    35403540                "@wordpress/blocks": "^11.1.4",
    3541                 "@wordpress/components": "^19.0.5",
     3541                "@wordpress/components": "^19.1.0",
    35423542                "@wordpress/compose": "^5.0.6",
    3543                 "@wordpress/core-data": "^4.0.7",
     3543                "@wordpress/core-data": "^4.0.8",
    35443544                "@wordpress/data": "^6.1.4",
    3545                 "@wordpress/edit-post": "^5.0.11",
    3546                 "@wordpress/editor": "^12.0.8",
     3545                "@wordpress/edit-post": "^5.0.12",
     3546                "@wordpress/editor": "^12.0.9",
    35473547                "@wordpress/element": "^4.0.4",
    35483548                "@wordpress/hooks": "^3.2.2",
     
    35573557        },
    35583558        "@wordpress/block-editor": {
    3559             "version": "8.0.5",
    3560             "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-8.0.5.tgz",
    3561             "integrity": "sha512-s5kmYFizQlf2K2JXaI5Iw3Zo8mYa6sCw0BMDt9Z+67NNyAvsbf9jPA6Uw80yRsCVcjz+cYcgHv3+Tcz9a6VrUw==",
     3559            "version": "8.0.6",
     3560            "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-8.0.6.tgz",
     3561            "integrity": "sha512-t5AL0nQuakopOoH2RgVflGvBwik+IvqRd2UOQsjVNeCIZLpbI4up9QYHtBidoqu4Zye6aGsL5LMDt7bWmWhn9A==",
    35623562            "requires": {
    35633563                "@babel/runtime": "^7.16.0",
     
    35683568                "@wordpress/block-serialization-default-parser": "^4.2.3",
    35693569                "@wordpress/blocks": "^11.1.4",
    3570                 "@wordpress/components": "^19.0.5",
     3570                "@wordpress/components": "^19.1.0",
    35713571                "@wordpress/compose": "^5.0.6",
    35723572                "@wordpress/data": "^6.1.4",
     
    36043604        },
    36053605        "@wordpress/block-library": {
    3606             "version": "6.0.9",
    3607             "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-6.0.9.tgz",
    3608             "integrity": "sha512-5etkM+WKn7jUlZsSiuA6jVBFlBvxn5szu5Shr6GbLnuUwh2pEhj/BY/aqXcyjNXcoUT2WmURcCPBjclgm2CvBA==",
     3606            "version": "6.0.10",
     3607            "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-6.0.10.tgz",
     3608            "integrity": "sha512-4FVKwUU+ed9oOpk8v8iHq2ZZvmW3AN/dzZ9AAv8ywqoU8IEvw0WjSI87WABT9414w63wE275X7M5Q2eja44ahg==",
    36093609            "requires": {
    36103610                "@babel/runtime": "^7.16.0",
     
    36133613                "@wordpress/autop": "^3.2.3",
    36143614                "@wordpress/blob": "^3.2.2",
    3615                 "@wordpress/block-editor": "^8.0.5",
     3615                "@wordpress/block-editor": "^8.0.6",
    36163616                "@wordpress/blocks": "^11.1.4",
    3617                 "@wordpress/components": "^19.0.5",
     3617                "@wordpress/components": "^19.1.0",
    36183618                "@wordpress/compose": "^5.0.6",
    3619                 "@wordpress/core-data": "^4.0.7",
     3619                "@wordpress/core-data": "^4.0.8",
    36203620                "@wordpress/data": "^6.1.4",
    36213621                "@wordpress/date": "^4.2.3",
     
    36283628                "@wordpress/i18n": "^4.2.4",
    36293629                "@wordpress/icons": "^6.1.1",
    3630                 "@wordpress/interface": "^4.1.7",
     3630                "@wordpress/interface": "^4.1.8",
    36313631                "@wordpress/is-shallow-equal": "^4.2.1",
    36323632                "@wordpress/keycodes": "^3.2.4",
    36333633                "@wordpress/notices": "^3.2.7",
    36343634                "@wordpress/primitives": "^3.0.4",
    3635                 "@wordpress/reusable-blocks": "^3.0.11",
     3635                "@wordpress/reusable-blocks": "^3.0.12",
    36363636                "@wordpress/rich-text": "^5.0.6",
    3637                 "@wordpress/server-side-render": "^3.0.9",
     3637                "@wordpress/server-side-render": "^3.0.10",
    36383638                "@wordpress/url": "^3.3.1",
    36393639                "@wordpress/viewport": "^4.0.6",
     
    36903690        },
    36913691        "@wordpress/components": {
    3692             "version": "19.0.5",
    3693             "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-19.0.5.tgz",
    3694             "integrity": "sha512-xtXTpPvmByVPjIWWo/v8ZzVsEtx9dq6bsdOOkDTnFFUXTcgxJb12RmgbsDR+E/L+z9IwuGxLwt08EGrWWvKF6w==",
     3692            "version": "19.1.0",
     3693            "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-19.1.0.tgz",
     3694            "integrity": "sha512-34hYwy3vtsWHdFFvE6cPlV6KxKMa4uaY2dvZlJ++QMVA24geGRfwtM1ZvGgs9fVjo0koC332sN2LGS7wx6aXew==",
    36953695            "requires": {
    36963696                "@babel/runtime": "^7.16.0",
     
    37563756        },
    37573757        "@wordpress/core-data": {
    3758             "version": "4.0.7",
    3759             "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-4.0.7.tgz",
    3760             "integrity": "sha512-N9za/cxd3KiZsHZj5kcD4zYcPgv7PdCQQx0GB5rBzceYzgON/WG3Y/QhoFHFwEw5OOpBIcSKehV975VByRD+qA==",
     3758            "version": "4.0.8",
     3759            "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-4.0.8.tgz",
     3760            "integrity": "sha512-nv7lXFU+7kdPhoD/Cz5oi6Xu1ODPRDwoMYYpIPB2nEfLi6foleDxhUuib9unwAtvUKNtQnrClDesys7l6pXMwQ==",
    37613761            "requires": {
    37623762                "@babel/runtime": "^7.16.0",
     
    37863786        },
    37873787        "@wordpress/customize-widgets": {
    3788             "version": "2.0.11",
    3789             "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-2.0.11.tgz",
    3790             "integrity": "sha512-3HSHChnMtT7JCXaITzDgM0zwbDopL3CNofhCJf/lQR//msiLiFK2MzjZrgJdQXTzVcPN7fXgIsf5cFJeHsuADg==",
     3788            "version": "2.0.12",
     3789            "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-2.0.12.tgz",
     3790            "integrity": "sha512-83/LFQo7UJ8X2B+yiByRJKWHJV4jpfHsT7RZDg5Vd06bR/UXbM7d8TCCYDvUgn0HuadGM+XcFxxhfYUTm68yHA==",
    37913791            "requires": {
    37923792                "@babel/runtime": "^7.16.0",
    37933793                "@wordpress/a11y": "^3.2.4",
    3794                 "@wordpress/block-editor": "^8.0.5",
    3795                 "@wordpress/block-library": "^6.0.9",
     3794                "@wordpress/block-editor": "^8.0.6",
     3795                "@wordpress/block-library": "^6.0.10",
    37963796                "@wordpress/blocks": "^11.1.4",
    3797                 "@wordpress/components": "^19.0.5",
     3797                "@wordpress/components": "^19.1.0",
    37983798                "@wordpress/compose": "^5.0.6",
    3799                 "@wordpress/core-data": "^4.0.7",
     3799                "@wordpress/core-data": "^4.0.8",
    38003800                "@wordpress/data": "^6.1.4",
    38013801                "@wordpress/dom": "^3.2.7",
     
    38043804                "@wordpress/i18n": "^4.2.4",
    38053805                "@wordpress/icons": "^6.1.1",
    3806                 "@wordpress/interface": "^4.1.7",
     3806                "@wordpress/interface": "^4.1.8",
    38073807                "@wordpress/is-shallow-equal": "^4.2.1",
    38083808                "@wordpress/keyboard-shortcuts": "^3.0.6",
    38093809                "@wordpress/keycodes": "^3.2.4",
    38103810                "@wordpress/media-utils": "^3.0.5",
    3811                 "@wordpress/widgets": "^2.0.11",
     3811                "@wordpress/widgets": "^2.0.12",
    38123812                "classnames": "^2.3.1",
    38133813                "lodash": "^4.17.21"
     
    39383938        },
    39393939        "@wordpress/edit-post": {
    3940             "version": "5.0.11",
    3941             "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-5.0.11.tgz",
    3942             "integrity": "sha512-UVFve7ETYdJjDm2TgAJKOxiRmoTYNu75fkbvTluxnKbvWKDXzY0QCpw47JY4g+JmYBRda6ZGV51eY5P5G5BZ6Q==",
     3940            "version": "5.0.12",
     3941            "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-5.0.12.tgz",
     3942            "integrity": "sha512-A2nt6LXdVcVqUay08P1W0J2t9vUmoxOkZPH4qKhBhUlMfmHKtyqMBiNQFui9drPMWVUb5HB3zsUmlAWsv429Vw==",
    39433943            "requires": {
    39443944                "@babel/runtime": "^7.16.0",
    39453945                "@wordpress/a11y": "^3.2.4",
    39463946                "@wordpress/api-fetch": "^5.2.6",
    3947                 "@wordpress/block-editor": "^8.0.5",
    3948                 "@wordpress/block-library": "^6.0.9",
     3947                "@wordpress/block-editor": "^8.0.6",
     3948                "@wordpress/block-library": "^6.0.10",
    39493949                "@wordpress/blocks": "^11.1.4",
    3950                 "@wordpress/components": "^19.0.5",
     3950                "@wordpress/components": "^19.1.0",
    39513951                "@wordpress/compose": "^5.0.6",
    3952                 "@wordpress/core-data": "^4.0.7",
     3952                "@wordpress/core-data": "^4.0.8",
    39533953                "@wordpress/data": "^6.1.4",
    39543954                "@wordpress/data-controls": "^2.2.7",
    3955                 "@wordpress/editor": "^12.0.8",
     3955                "@wordpress/editor": "^12.0.9",
    39563956                "@wordpress/element": "^4.0.4",
    39573957                "@wordpress/hooks": "^3.2.2",
    39583958                "@wordpress/i18n": "^4.2.4",
    39593959                "@wordpress/icons": "^6.1.1",
    3960                 "@wordpress/interface": "^4.1.7",
     3960                "@wordpress/interface": "^4.1.8",
    39613961                "@wordpress/keyboard-shortcuts": "^3.0.6",
    39623962                "@wordpress/keycodes": "^3.2.4",
     
    39833983        },
    39843984        "@wordpress/edit-site": {
    3985             "version": "3.0.11",
    3986             "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-3.0.11.tgz",
    3987             "integrity": "sha512-jwCXMVDg6ucNOur1lpQBDlXNuUv6RzpOK/I2rfhw9Cqv0DyFfWSL6NIxMZFuqfyhCeqnUaz/GT/CVgghx5Ssvw==",
     3985            "version": "3.0.12",
     3986            "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-3.0.12.tgz",
     3987            "integrity": "sha512-Uxn7mLNCdvND/4ZuMKiNSBSD09hDAdjYsCZDAnZ3HE0lc1DrCQFI8lF911JSYWY2fmiTbAhqGBKHOci7XK4b3A==",
    39883988            "requires": {
    39893989                "@babel/runtime": "^7.16.0",
    39903990                "@wordpress/a11y": "^3.2.4",
    39913991                "@wordpress/api-fetch": "^5.2.6",
    3992                 "@wordpress/block-editor": "^8.0.5",
    3993                 "@wordpress/block-library": "^6.0.9",
     3992                "@wordpress/block-editor": "^8.0.6",
     3993                "@wordpress/block-library": "^6.0.10",
    39943994                "@wordpress/blocks": "^11.1.4",
    3995                 "@wordpress/components": "^19.0.5",
     3995                "@wordpress/components": "^19.1.0",
    39963996                "@wordpress/compose": "^5.0.6",
    3997                 "@wordpress/core-data": "^4.0.7",
     3997                "@wordpress/core-data": "^4.0.8",
    39983998                "@wordpress/data": "^6.1.4",
    39993999                "@wordpress/data-controls": "^2.2.7",
    4000                 "@wordpress/editor": "^12.0.8",
     4000                "@wordpress/editor": "^12.0.9",
    40014001                "@wordpress/element": "^4.0.4",
    40024002                "@wordpress/hooks": "^3.2.2",
     
    40044004                "@wordpress/i18n": "^4.2.4",
    40054005                "@wordpress/icons": "^6.1.1",
    4006                 "@wordpress/interface": "^4.1.7",
     4006                "@wordpress/interface": "^4.1.8",
    40074007                "@wordpress/keyboard-shortcuts": "^3.0.6",
    40084008                "@wordpress/keycodes": "^3.2.4",
     
    40114011                "@wordpress/plugins": "^4.0.6",
    40124012                "@wordpress/primitives": "^3.0.4",
     4013                "@wordpress/reusable-blocks": "^3.0.12",
    40134014                "@wordpress/url": "^3.3.1",
     4015                "@wordpress/viewport": "^4.0.6",
    40144016                "classnames": "^2.3.1",
    40154017                "downloadjs": "^1.4.7",
     
    40214023        },
    40224024        "@wordpress/edit-widgets": {
    4023             "version": "3.1.6",
    4024             "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-3.1.6.tgz",
    4025             "integrity": "sha512-NuVehrAajzThQLh313FiyhjfIFpCwolyPjndj+urUp+iCKpLTMKTKSrZpC6tQsfycrmpPrnL/RiWsNeAV1zGMg==",
     4025            "version": "3.1.7",
     4026            "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-3.1.7.tgz",
     4027            "integrity": "sha512-FwbaqGqGazNSfZth5HG6Kl6l5yCiyL/+h4dSGQrplMxvNlQDC8Sx2x/ti/iH9f82+FOmIbAGvJtZaeRNOI7WZw==",
    40264028            "requires": {
    40274029                "@babel/runtime": "^7.16.0",
    40284030                "@wordpress/a11y": "^3.2.4",
    40294031                "@wordpress/api-fetch": "^5.2.6",
    4030                 "@wordpress/block-editor": "^8.0.5",
    4031                 "@wordpress/block-library": "^6.0.9",
     4032                "@wordpress/block-editor": "^8.0.6",
     4033                "@wordpress/block-library": "^6.0.10",
    40324034                "@wordpress/blocks": "^11.1.4",
    4033                 "@wordpress/components": "^19.0.5",
     4035                "@wordpress/components": "^19.1.0",
    40344036                "@wordpress/compose": "^5.0.6",
    4035                 "@wordpress/core-data": "^4.0.7",
     4037                "@wordpress/core-data": "^4.0.8",
    40364038                "@wordpress/data": "^6.1.4",
    40374039                "@wordpress/dom": "^3.2.7",
     
    40404042                "@wordpress/i18n": "^4.2.4",
    40414043                "@wordpress/icons": "^6.1.1",
    4042                 "@wordpress/interface": "^4.1.7",
     4044                "@wordpress/interface": "^4.1.8",
    40434045                "@wordpress/keyboard-shortcuts": "^3.0.6",
    40444046                "@wordpress/keycodes": "^3.2.4",
     
    40464048                "@wordpress/notices": "^3.2.7",
    40474049                "@wordpress/plugins": "^4.0.6",
    4048                 "@wordpress/reusable-blocks": "^3.0.11",
    4049                 "@wordpress/server-side-render": "^3.0.9",
     4050                "@wordpress/reusable-blocks": "^3.0.12",
     4051                "@wordpress/server-side-render": "^3.0.10",
    40504052                "@wordpress/url": "^3.3.1",
    4051                 "@wordpress/widgets": "^2.0.11",
     4053                "@wordpress/widgets": "^2.0.12",
    40524054                "classnames": "^2.3.1",
    40534055                "lodash": "^4.17.21",
     
    40574059        },
    40584060        "@wordpress/editor": {
    4059             "version": "12.0.8",
    4060             "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-12.0.8.tgz",
    4061             "integrity": "sha512-vEEHEH2Pkg/FzfgZqTZI6RhTcGrRwwgdnSrrJJMXQjKg3ieLpSuKZ2LaZEhfqY2ICTuZ/49A9pxOm6FzkQW8Xg==",
     4061            "version": "12.0.9",
     4062            "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-12.0.9.tgz",
     4063            "integrity": "sha512-yzwkrrCJlgW3VR5xNqsSoLQztYgqqe20goJfRXF+43ZQBTNr0kUbHb3+xF4J/cd3WxqWYYPb2WeHcR65qrnYqw==",
    40624064            "requires": {
    40634065                "@babel/runtime": "^7.16.0",
     
    40664068                "@wordpress/autop": "^3.2.3",
    40674069                "@wordpress/blob": "^3.2.2",
    4068                 "@wordpress/block-editor": "^8.0.5",
     4070                "@wordpress/block-editor": "^8.0.6",
    40694071                "@wordpress/blocks": "^11.1.4",
    4070                 "@wordpress/components": "^19.0.5",
     4072                "@wordpress/components": "^19.1.0",
    40714073                "@wordpress/compose": "^5.0.6",
    4072                 "@wordpress/core-data": "^4.0.7",
     4074                "@wordpress/core-data": "^4.0.8",
    40734075                "@wordpress/data": "^6.1.4",
    40744076                "@wordpress/data-controls": "^2.2.7",
     
    40854087                "@wordpress/media-utils": "^3.0.5",
    40864088                "@wordpress/notices": "^3.2.7",
    4087                 "@wordpress/reusable-blocks": "^3.0.11",
     4089                "@wordpress/reusable-blocks": "^3.0.12",
    40884090                "@wordpress/rich-text": "^5.0.6",
    4089                 "@wordpress/server-side-render": "^3.0.9",
     4091                "@wordpress/server-side-render": "^3.0.10",
    40904092                "@wordpress/url": "^3.3.1",
    40914093                "@wordpress/wordcount": "^3.2.3",
     
    41744176        },
    41754177        "@wordpress/format-library": {
    4176             "version": "3.0.11",
    4177             "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-3.0.11.tgz",
    4178             "integrity": "sha512-RhEQtTDUjXJMNkSCL8v+l2/N8T8kizfSoaD84bbJbSU1sahUF7Cdxtlp06z374iTZDzIqZxtEftWRljJs/AqVA==",
     4178            "version": "3.0.12",
     4179            "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-3.0.12.tgz",
     4180            "integrity": "sha512-gQzGsv63HwQrDNIQvxEC/xwR730Mv+VkSXvCfHip8dBL1cva4CHzrsnYbXGJuaQEEX7yOSv+IPLcrA8rTy2fzw==",
    41794181            "requires": {
    41804182                "@babel/runtime": "^7.16.0",
    41814183                "@wordpress/a11y": "^3.2.4",
    4182                 "@wordpress/block-editor": "^8.0.5",
    4183                 "@wordpress/components": "^19.0.5",
     4184                "@wordpress/block-editor": "^8.0.6",
     4185                "@wordpress/components": "^19.1.0",
    41844186                "@wordpress/compose": "^5.0.6",
    41854187                "@wordpress/data": "^6.1.4",
     
    42364238        },
    42374239        "@wordpress/interface": {
    4238             "version": "4.1.7",
    4239             "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-4.1.7.tgz",
    4240             "integrity": "sha512-mXsTvVKfDctZ1Kkhto2NLCs8xi3cHFD7QU8OIuofgO8rKlQ4ro7+QTuu1N/SfGRnmTQTX0d1gUMzi4JwWp3nsA==",
     4240            "version": "4.1.8",
     4241            "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-4.1.8.tgz",
     4242            "integrity": "sha512-bvvNJ0uuBozCSpRJx/MSQgC8ReH5dUL8pFJc4ky923xFwMjmOybkQbzf/A4uCiKeGkp0H9mL0VvenDkxBzmw4w==",
    42414243            "requires": {
    42424244                "@babel/runtime": "^7.16.0",
    42434245                "@wordpress/a11y": "^3.2.4",
    4244                 "@wordpress/components": "^19.0.5",
     4246                "@wordpress/components": "^19.1.0",
    42454247                "@wordpress/compose": "^5.0.6",
    42464248                "@wordpress/data": "^6.1.4",
     
    43404342        },
    43414343        "@wordpress/list-reusable-blocks": {
    4342             "version": "3.0.9",
    4343             "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-3.0.9.tgz",
    4344             "integrity": "sha512-elYJLYWWeMomiUlFmm/GHJrLvjOXGstUGNHVo6NkmnKi3crYc2QNKn+vHnFaXNLi7n1eG0QIUo4guInkyv224g==",
     4344            "version": "3.0.10",
     4345            "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-3.0.10.tgz",
     4346            "integrity": "sha512-B8+5GWPRhRDryB44aTidVhe6zCUwSoWMiCzEJ6E9J84bh2P5EfTzQBtzyVBNZYxyn58ZViCW2cnt/yQFh85OrA==",
    43454347            "requires": {
    43464348                "@babel/runtime": "^7.16.0",
    43474349                "@wordpress/api-fetch": "^5.2.6",
    4348                 "@wordpress/components": "^19.0.5",
     4350                "@wordpress/components": "^19.1.0",
    43494351                "@wordpress/compose": "^5.0.6",
    43504352                "@wordpress/element": "^4.0.4",
     
    43844386        },
    43854387        "@wordpress/nux": {
    4386             "version": "5.0.9",
    4387             "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-5.0.9.tgz",
    4388             "integrity": "sha512-HGQVQm/8YAyNCIDQRzwAQSikT4tkJ/Gf/4NU2LbQf45gk0vuPLlbXmlF/cA/AQdA8l8hKfE51SfETRRPIE63IA==",
     4388            "version": "5.0.10",
     4389            "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-5.0.10.tgz",
     4390            "integrity": "sha512-W9WyfondJ9IGo9W0QShbP2RQbiCctK0Vx916SIBW/xMTux+nB04MaKkfQsuKFWMsMQGsUZHcv6j/uRVCrRpAyQ==",
    43894391            "requires": {
    43904392                "@babel/runtime": "^7.16.0",
    4391                 "@wordpress/components": "^19.0.5",
     4393                "@wordpress/components": "^19.1.0",
    43924394                "@wordpress/compose": "^5.0.6",
    43934395                "@wordpress/data": "^6.1.4",
     
    45144516        },
    45154517        "@wordpress/reusable-blocks": {
    4516             "version": "3.0.11",
    4517             "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-3.0.11.tgz",
    4518             "integrity": "sha512-5EQ+qrRDscEmILir+atYyZMgPOoHwZEYlxesRj1pEBO/dQX2tpZKt1W8SfkWSukRQYyqUby8z9sZ04ga+/Khlg==",
    4519             "requires": {
    4520                 "@wordpress/block-editor": "^8.0.5",
     4518            "version": "3.0.12",
     4519            "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-3.0.12.tgz",
     4520            "integrity": "sha512-Q38sB3Lo3qHM6JHQoHuEeP9UIsTLBL36dbiaBGyXkMexLG5djr4RIjbzn024nUSk8no+TSqylwxiH/tpW5H8sw==",
     4521            "requires": {
     4522                "@wordpress/block-editor": "^8.0.6",
    45214523                "@wordpress/blocks": "^11.1.4",
    4522                 "@wordpress/components": "^19.0.5",
     4524                "@wordpress/components": "^19.1.0",
    45234525                "@wordpress/compose": "^5.0.6",
    4524                 "@wordpress/core-data": "^4.0.7",
     4526                "@wordpress/core-data": "^4.0.8",
    45254527                "@wordpress/data": "^6.1.4",
    45264528                "@wordpress/element": "^4.0.4",
     
    54865488        },
    54875489        "@wordpress/server-side-render": {
    5488             "version": "3.0.9",
    5489             "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-3.0.9.tgz",
    5490             "integrity": "sha512-9Pv6909FWDuW8OGZUR/pY3D7+YBIT+O/PI9JcNuNtbUK7YuEc+PF7KNTQ0dTuxRvOYy3kQNw/a4pWefq1HDNzA==",
     5490            "version": "3.0.10",
     5491            "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-3.0.10.tgz",
     5492            "integrity": "sha512-6Ifor/lSJEPpqsdHdNt4NhO/ufR0FyjKN4uIhyZW69BdK6OZrXlovLB//vOgR4a+aTqNprbWNbx+lU7nDXASRg==",
    54915493            "requires": {
    54925494                "@babel/runtime": "^7.16.0",
    54935495                "@wordpress/api-fetch": "^5.2.6",
    54945496                "@wordpress/blocks": "^11.1.4",
    5495                 "@wordpress/components": "^19.0.5",
     5497                "@wordpress/components": "^19.1.0",
    54965498                "@wordpress/compose": "^5.0.6",
    54975499                "@wordpress/data": "^6.1.4",
     
    55595561        },
    55605562        "@wordpress/widgets": {
    5561             "version": "2.0.11",
    5562             "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-2.0.11.tgz",
    5563             "integrity": "sha512-XIY/W7WnEXbWSeycFtxaShHYxtJOlTgX9L4DCo/hh2IHkG3HHsZ8qIx0lMtsMq2BKZ2mbL3GCp/cjgBNQygUhg==",
     5563            "version": "2.0.12",
     5564            "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-2.0.12.tgz",
     5565            "integrity": "sha512-XhECJrxmRHT4sFAQCoYWDMADKzN8M5RNfvpZeDJlAa+clk1JN15ljsUsvQR8MkIN4o+W261wVkbCZX2Jej+i0w==",
    55645566            "requires": {
    55655567                "@babel/runtime": "^7.16.0",
    55665568                "@wordpress/api-fetch": "^5.2.6",
    5567                 "@wordpress/block-editor": "^8.0.5",
     5569                "@wordpress/block-editor": "^8.0.6",
    55685570                "@wordpress/blocks": "^11.1.4",
    5569                 "@wordpress/components": "^19.0.5",
     5571                "@wordpress/components": "^19.1.0",
    55705572                "@wordpress/compose": "^5.0.6",
    5571                 "@wordpress/core-data": "^4.0.7",
     5573                "@wordpress/core-data": "^4.0.8",
    55725574                "@wordpress/data": "^6.1.4",
    55735575                "@wordpress/element": "^4.0.4",
     
    1830218304        },
    1830318305        "micromodal": {
    18304             "version": "0.4.6",
    18305             "resolved": "https://registry.npmjs.org/micromodal/-/micromodal-0.4.6.tgz",
    18306             "integrity": "sha512-2VDso2a22jWPpqwuWT/4RomVpoU3Bl9qF9D01xzwlNp5UVsImeA0gY4nSpF44vqcQtQOtkiMUV9EZkAJSRxBsg=="
     18306            "version": "0.4.10",
     18307            "resolved": "https://registry.npmjs.org/micromodal/-/micromodal-0.4.10.tgz",
     18308            "integrity": "sha512-BUrEnzMPFBwK8nOE4xUDYHLrlGlLULQVjpja99tpJQPSUEWgw3kTLp1n1qv0HmKU29AiHE7Y7sMLiRziDK4ghQ=="
    1830718309        },
    1830818310        "miller-rabin": {
  • trunk/package.json

    r52232 r52275  
    8383        "@wordpress/autop": "3.2.3",
    8484        "@wordpress/blob": "3.2.2",
    85         "@wordpress/block-directory": "3.0.11",
    86         "@wordpress/block-editor": "8.0.5",
    87         "@wordpress/block-library": "6.0.9",
     85        "@wordpress/block-directory": "3.0.12",
     86        "@wordpress/block-editor": "8.0.6",
     87        "@wordpress/block-library": "6.0.10",
    8888        "@wordpress/block-serialization-default-parser": "4.2.3",
    8989        "@wordpress/blocks": "11.1.4",
    90         "@wordpress/components": "19.0.5",
     90        "@wordpress/components": "19.1.0",
    9191        "@wordpress/compose": "5.0.6",
    92         "@wordpress/core-data": "4.0.7",
    93         "@wordpress/customize-widgets": "2.0.11",
     92        "@wordpress/core-data": "4.0.8",
     93        "@wordpress/customize-widgets": "2.0.12",
    9494        "@wordpress/data": "6.1.4",
    9595        "@wordpress/data-controls": "2.2.7",
     
    9898        "@wordpress/dom": "3.2.7",
    9999        "@wordpress/dom-ready": "3.2.3",
    100         "@wordpress/edit-post": "5.0.11",
    101         "@wordpress/edit-site": "3.0.11",
    102         "@wordpress/edit-widgets": "3.1.6",
    103         "@wordpress/editor": "12.0.8",
     100        "@wordpress/edit-post": "5.0.12",
     101        "@wordpress/edit-site": "3.0.12",
     102        "@wordpress/edit-widgets": "3.1.7",
     103        "@wordpress/editor": "12.0.9",
    104104        "@wordpress/element": "4.0.4",
    105105        "@wordpress/escape-html": "2.2.3",
    106         "@wordpress/format-library": "3.0.11",
     106        "@wordpress/format-library": "3.0.12",
    107107        "@wordpress/hooks": "3.2.2",
    108108        "@wordpress/html-entities": "3.2.3",
    109109        "@wordpress/i18n": "4.2.4",
    110110        "@wordpress/icons": "6.1.1",
    111         "@wordpress/interface": "4.1.7",
     111        "@wordpress/interface": "4.1.8",
    112112        "@wordpress/is-shallow-equal": "4.2.1",
    113113        "@wordpress/keyboard-shortcuts": "3.0.6",
    114114        "@wordpress/keycodes": "3.2.4",
    115         "@wordpress/list-reusable-blocks": "3.0.9",
     115        "@wordpress/list-reusable-blocks": "3.0.10",
    116116        "@wordpress/media-utils": "3.0.5",
    117117        "@wordpress/notices": "3.2.7",
    118         "@wordpress/nux": "5.0.9",
     118        "@wordpress/nux": "5.0.10",
    119119        "@wordpress/plugins": "4.0.6",
    120120        "@wordpress/primitives": "3.0.4",
    121121        "@wordpress/priority-queue": "2.2.3",
    122122        "@wordpress/redux-routine": "4.2.2",
    123         "@wordpress/reusable-blocks": "3.0.11",
     123        "@wordpress/reusable-blocks": "3.0.12",
    124124        "@wordpress/rich-text": "5.0.6",
    125         "@wordpress/server-side-render": "3.0.9",
     125        "@wordpress/server-side-render": "3.0.10",
    126126        "@wordpress/shortcode": "3.2.3",
    127127        "@wordpress/token-list": "2.2.2",
     
    129129        "@wordpress/viewport": "4.0.6",
    130130        "@wordpress/warning": "2.2.2",
    131         "@wordpress/widgets": "2.0.11",
     131        "@wordpress/widgets": "2.0.12",
    132132        "@wordpress/wordcount": "3.2.3",
    133133        "backbone": "1.4.0",
  • trunk/src/wp-admin/site-editor.php

    r52272 r52275  
    2424}
    2525
    26 // Used in the HTML title tag.
    27 $title       = __( 'Editor (beta)' );
    2826$parent_file = 'themes.php';
    2927
     
    6058    }
    6159
     60    // Used in the HTML title tag.
     61    $title = $post_type->labels->name;
     62
    6263    $preload_paths = array(
    6364        '/',
     
    8182
    8283} else {
     84
     85    // Used in the HTML title tag.
     86    $title = __( 'Editor (beta)' );
    8387
    8488    $active_global_styles_id = WP_Theme_JSON_Resolver::get_user_custom_post_type_id();
  • trunk/src/wp-includes/assets/script-loader-packages.php

    r52232 r52275  
    1 <?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'fa03f246887237d01c383e85ff6f107c'), 'annotations.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'acd6ed75d460d0d3781e1ef6c12cf2aa'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '59f6dbf5a1d9a141515c25411bc4f01e'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e65166da67ee5d5ff66d36ab14532b3b'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b8855b04f6a52a7bca89f8d945d46866'), 'block-directory.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => 'a8ff26eaaddf949aee8669d14277aec3'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '3ffa376560961ee3a73393f18e786d55'), 'block-library.js' => array('dependencies' => array('lodash', 'moment', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '6b537dd5ff318e1d3ac6e32944977862'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'cc8e5d0e23cf68bb9944bf2a7a016e52'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => 'a32036d432544d670dbd252aafb343aa'), 'components.js' => array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-warning'), 'version' => '3de5cbb0aefe275d8abf23f738c797fa'), 'compose.js' => array('dependencies' => array('lodash', 'react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '9dac23239e3ee771f867989188a2e766'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => '3ee92c4459cc98f8e6ebcdb8ce35e578'), 'customize-widgets.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-viewport', 'wp-widgets'), 'version' => 'a4ae79ff9d722a302a31b7af5478e6b7'), 'data.js' => array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => 'f9c70b06478edf537328ed5ca3555658'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'a6b5897d9fe0799f7c5167a4a9fb3fc2'), 'date.js' => array('dependencies' => array('moment', 'wp-polyfill'), 'version' => 'be8358e0f87d66f2bec405069f113602'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '64e8de35a014ff611a39da7042d361dd'), 'dom.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '7d156934b7b48d00965baf08e162ab91'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7ad174e925c73007ee5b17358242e7d9'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => '78dd73ace08da4436266d54e551f1801'), 'edit-site.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => '9564025f796935e5ed95304230462642'), 'edit-widgets.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '98424c28360f75deb941d9d5977df074'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '22329f7ff9d35759e1a4ed63f50fd1f1'), 'element.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '32e0abe121ab85a88acb6472274ad136'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4f03d9c45a01df8191f6833373fe1cfa'), 'format-library.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '314e138f1050b863fc65347b91b547d5'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'fee9af3abfeb76b497fd074608dca647'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => '140ecb91be91e7eec34220584d085033'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '9ddfa7e364f034c04939567c6c6079d5'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => '798b660598677b39413fdb5f68624aa8'), 'keyboard-shortcuts.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '78a4020b31c5ae28f7e97405b83d5027'), 'keycodes.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => '57a448b50bb24e264205e448e0b19ea2'), 'list-reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '411699046747b4d90f82c5b2547ff43c'), 'media-utils.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'ab2c70450229febbbb0a87e88074db07'), 'notices.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-polyfill'), 'version' => 'b9e78ffafe025c455d9ccf2c1a78d1de'), 'nux.js' => array('dependencies' => array('lodash', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'feee5fbb3df2a20c6dc4653f33d12e13'), 'plugins.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => '76d0e1ad216a273ab1359db9aaab1809'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'ec5aecfc61b399ed5c8fa2de6b175942'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => '18c93919f04bb681234310b314675b17'), 'redux-routine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'f4483156a9bae90512f894dbd867b929'), 'reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '436b8be211e4f30893de92b1faad8984'), 'rich-text.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-compose', 'wp-data', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => 'c491067ec9fe71eeaa2c74e4ee78f956'), 'server-side-render.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'ff256efbd27ce91d114094be9982fadc'), 'shortcode.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '0e7a194ec8387c92e8d2c2b3755c3c9b'), 'token-list.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'a50777df914543c1a77067959d6b3fbf'), 'url.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'd99eea3ea07b8acf242f75a06a2c49ff'), 'viewport.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '67406a236d2370eedc90db2dfdcb46bd'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5ebe2df53cf3c74ebffc7e2d3e76184c'), 'widgets.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '3dd8fa0fcd8381649603b755437d9be1'), 'wordcount.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '02339c8ad03da1e7a03f9212da004007'));
     1<?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'fa03f246887237d01c383e85ff6f107c'), 'annotations.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'acd6ed75d460d0d3781e1ef6c12cf2aa'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '59f6dbf5a1d9a141515c25411bc4f01e'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e65166da67ee5d5ff66d36ab14532b3b'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b8855b04f6a52a7bca89f8d945d46866'), 'block-directory.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => 'a8ff26eaaddf949aee8669d14277aec3'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'f32e4a6767256ef0a5e91fe3788fe9de'), 'block-library.js' => array('dependencies' => array('lodash', 'moment', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '868f97e65c74e6f8bf8e7ae2fb8b4261'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'cc8e5d0e23cf68bb9944bf2a7a016e52'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => 'a32036d432544d670dbd252aafb343aa'), 'components.js' => array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-warning'), 'version' => '740d7b9c8beb2b47d15ce1f3c590dee5'), 'compose.js' => array('dependencies' => array('lodash', 'react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '9dac23239e3ee771f867989188a2e766'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => '15ee57b1f0ac2f25cdee181ee369950a'), 'customize-widgets.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-viewport', 'wp-widgets'), 'version' => 'a4ae79ff9d722a302a31b7af5478e6b7'), 'data.js' => array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => 'f9c70b06478edf537328ed5ca3555658'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'a6b5897d9fe0799f7c5167a4a9fb3fc2'), 'date.js' => array('dependencies' => array('moment', 'wp-polyfill'), 'version' => 'be8358e0f87d66f2bec405069f113602'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '64e8de35a014ff611a39da7042d361dd'), 'dom.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '7d156934b7b48d00965baf08e162ab91'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7ad174e925c73007ee5b17358242e7d9'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => '78dd73ace08da4436266d54e551f1801'), 'edit-site.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-url', 'wp-viewport'), 'version' => '2f5a0019e6e13496c0c6466f930380c3'), 'edit-widgets.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '98424c28360f75deb941d9d5977df074'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '22329f7ff9d35759e1a4ed63f50fd1f1'), 'element.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '32e0abe121ab85a88acb6472274ad136'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4f03d9c45a01df8191f6833373fe1cfa'), 'format-library.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '314e138f1050b863fc65347b91b547d5'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'fee9af3abfeb76b497fd074608dca647'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => '140ecb91be91e7eec34220584d085033'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '9ddfa7e364f034c04939567c6c6079d5'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => '798b660598677b39413fdb5f68624aa8'), 'keyboard-shortcuts.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '78a4020b31c5ae28f7e97405b83d5027'), 'keycodes.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => '57a448b50bb24e264205e448e0b19ea2'), 'list-reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '411699046747b4d90f82c5b2547ff43c'), 'media-utils.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'ab2c70450229febbbb0a87e88074db07'), 'notices.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-polyfill'), 'version' => 'b9e78ffafe025c455d9ccf2c1a78d1de'), 'nux.js' => array('dependencies' => array('lodash', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'feee5fbb3df2a20c6dc4653f33d12e13'), 'plugins.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => '76d0e1ad216a273ab1359db9aaab1809'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'ec5aecfc61b399ed5c8fa2de6b175942'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => '18c93919f04bb681234310b314675b17'), 'redux-routine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'f4483156a9bae90512f894dbd867b929'), 'reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '436b8be211e4f30893de92b1faad8984'), 'rich-text.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-compose', 'wp-data', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => 'c491067ec9fe71eeaa2c74e4ee78f956'), 'server-side-render.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'ff256efbd27ce91d114094be9982fadc'), 'shortcode.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '0e7a194ec8387c92e8d2c2b3755c3c9b'), 'token-list.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'a50777df914543c1a77067959d6b3fbf'), 'url.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'd99eea3ea07b8acf242f75a06a2c49ff'), 'viewport.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '67406a236d2370eedc90db2dfdcb46bd'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5ebe2df53cf3c74ebffc7e2d3e76184c'), 'widgets.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '3dd8fa0fcd8381649603b755437d9be1'), 'wordcount.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '02339c8ad03da1e7a03f9212da004007'));
  • trunk/src/wp-includes/block-editor.php

    r52232 r52275  
    339339    if ( isset( $editor_settings['__experimentalFeatures']['color']['palette'] ) ) {
    340340        $colors_by_origin          = $editor_settings['__experimentalFeatures']['color']['palette'];
    341         $editor_settings['colors'] = isset( $colors_by_origin['user'] ) ?
    342             $colors_by_origin['user'] : (
     341        $editor_settings['colors'] = isset( $colors_by_origin['custom'] ) ?
     342            $colors_by_origin['custom'] : (
    343343                isset( $colors_by_origin['theme'] ) ?
    344344                    $colors_by_origin['theme'] :
     
    348348    if ( isset( $editor_settings['__experimentalFeatures']['color']['gradients'] ) ) {
    349349        $gradients_by_origin          = $editor_settings['__experimentalFeatures']['color']['gradients'];
    350         $editor_settings['gradients'] = isset( $gradients_by_origin['user'] ) ?
    351             $gradients_by_origin['user'] : (
     350        $editor_settings['gradients'] = isset( $gradients_by_origin['custom'] ) ?
     351            $gradients_by_origin['custom'] : (
    352352                isset( $gradients_by_origin['theme'] ) ?
    353353                    $gradients_by_origin['theme'] :
     
    357357    if ( isset( $editor_settings['__experimentalFeatures']['typography']['fontSizes'] ) ) {
    358358        $font_sizes_by_origin         = $editor_settings['__experimentalFeatures']['typography']['fontSizes'];
    359         $editor_settings['fontSizes'] = isset( $font_sizes_by_origin['user'] ) ?
    360             $font_sizes_by_origin['user'] : (
     359        $editor_settings['fontSizes'] = isset( $font_sizes_by_origin['custom'] ) ?
     360            $font_sizes_by_origin['custom'] : (
    361361                isset( $font_sizes_by_origin['theme'] ) ?
    362362                    $font_sizes_by_origin['theme'] :
  • trunk/src/wp-includes/block-template-utils.php

    r52247 r52275  
    526526        null !== _get_block_template_file( $post->post_type, $post->post_name );
    527527
     528    $origin = get_post_meta( $post->ID, 'origin', true );
     529
    528530    $template                 = new WP_Block_Template();
    529531    $template->wp_id          = $post->ID;
     
    533535    $template->slug           = $post->post_name;
    534536    $template->source         = 'custom';
     537    $template->origin         = ! empty( $origin ) ? $origin : null;
    535538    $template->type           = $post->post_type;
    536539    $template->description    = $post->post_excerpt;
     
    539542    $template->has_theme_file = $has_theme_file;
    540543    $template->is_custom      = true;
     544    $template->author         = $post->post_author;
    541545
    542546    if ( 'wp_template' === $post->post_type && isset( $default_template_types[ $template->slug ] ) ) {
  • trunk/src/wp-includes/blocks/calendar.php

    r52232 r52275  
    8686
    8787    // On single sites we try our own cached option first.
    88     $has_published_posts = get_option( 'gutenberg_calendar_block_has_published_posts', null );
     88    $has_published_posts = get_option( 'wp_calendar_block_has_published_posts', null );
    8989    if ( null !== $has_published_posts ) {
    9090        return (bool) $has_published_posts;
     
    104104    global $wpdb;
    105105    $has_published_posts = (bool) $wpdb->get_var( "SELECT 1 as test FROM {$wpdb->posts} WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1" );
    106     update_option( 'gutenberg_calendar_block_has_published_posts', $has_published_posts );
     106    update_option( 'wp_calendar_block_has_published_posts', $has_published_posts );
    107107    return $has_published_posts;
    108108}
  • trunk/src/wp-includes/blocks/navigation.php

    r52273 r52275  
    1010 * which will be applied to the navigation markup in the front-end.
    1111 *
    12  * @param  array $attributes Navigation block attributes.
     12 * @param array $attributes Navigation block attributes.
     13 *
    1314 * @return array Colors CSS classes and inline styles.
    1415 */
     
    100101 * which will be applied to the navigation markup in the front-end.
    101102 *
    102  * @param  array $attributes Navigation block attributes.
     103 * @param array $attributes Navigation block attributes.
     104 *
    103105 * @return array Font size CSS classes and inline styles.
    104106 */
     
    133135}
    134136
     137
     138/**
     139 * Finds the first non-empty `wp_navigation` Post.
     140 *
     141 * @return WP_Post|null the first non-empty Navigation or null.
     142 */
     143function block_core_navigation_get_first_non_empty_navigation() {
     144    // Order and orderby args set to mirror those in `wp_get_nav_menus`
     145    // see:
     146    // - https://github.com/WordPress/wordpress-develop/blob/ba943e113d3b31b121f77a2d30aebe14b047c69d/src/wp-includes/nav-menu.php#L613-L619.
     147    // - https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters.
     148    $navigation_posts = get_posts(
     149        array(
     150            'post_type'      => 'wp_navigation',
     151            'order'          => 'ASC',
     152            'orderby'        => 'name',
     153            'posts_per_page' => 1, // only the first post.
     154            's'              => '<!-- wp:', // look for block indicators to ensure we only include non-empty Navigations.
     155        )
     156    );
     157    return count( $navigation_posts ) ? $navigation_posts[0] : null;
     158
     159}
     160
     161/**
     162 * Filter out empty "null" blocks from the block list.
     163 * 'parse_blocks' includes a null block with '\n\n' as the content when
     164 * it encounters whitespace. This is not a bug but rather how the parser
     165 * is designed.
     166 *
     167 * @param array $parsed_blocks the parsed blocks to be normalized.
     168 * @return array the normalized parsed blocks.
     169 */
     170function block_core_navigation_filter_out_empty_blocks( $parsed_blocks ) {
     171    $filtered = array_filter(
     172        $parsed_blocks,
     173        function( $block ) {
     174            return isset( $block['blockName'] );
     175        }
     176    );
     177
     178    // Reset keys.
     179    return array_values( $filtered );
     180}
     181
     182/**
     183 * Retrieves the appropriate fallback to be used on the front of the
     184 * site when there is no menu assigned to the Nav block.
     185 *
     186 * This aims to mirror how the fallback mechanic for wp_nav_menu works.
     187 * See https://developer.wordpress.org/reference/functions/wp_nav_menu/#more-information.
     188 *
     189 * @return array the array of blocks to be used as a fallback.
     190 */
     191function block_core_navigation_get_fallback_blocks() {
     192    $page_list_fallback = array(
     193        array(
     194            'blockName' => 'core/page-list',
     195            'attrs'     => array(
     196                '__unstableMaxPages' => 4,
     197            ),
     198        ),
     199    );
     200
     201    $registry = WP_Block_Type_Registry::get_instance();
     202
     203    // If `core/page-list` is not registered then return empty blocks.
     204    $fallback_blocks = $registry->is_registered( 'core/page-list' ) ? $page_list_fallback : array();
     205
     206    // Default to a list of Pages.
     207
     208    $navigation_post = block_core_navigation_get_first_non_empty_navigation();
     209
     210    // Prefer using the first non-empty Navigation as fallback if available.
     211    if ( $navigation_post ) {
     212        $maybe_fallback = block_core_navigation_filter_out_empty_blocks( parse_blocks( $navigation_post->post_content ) );
     213
     214        // Normalizing blocks may result in an empty array of blocks if they were all `null` blocks.
     215        // In this case default to the (Page List) fallback.
     216        $fallback_blocks = ! empty( $maybe_fallback ) ? $maybe_fallback : $fallback_blocks;
     217    }
     218
     219    /**
     220     * Filters the fallback experience for the Navigation block.
     221     *
     222     * Returning a falsey value will opt out of the fallback and cause the block not to render.
     223     * To customise the blocks provided return an array of blocks - these should be valid
     224     * children of the `core/navigation` block.
     225     *
     226     * @param array[] default fallback blocks provided by the default block mechanic.
     227     */
     228    return apply_filters( 'block_core_navigation_render_fallback', $fallback_blocks );
     229}
     230
    135231/**
    136232 * Renders the `core/navigation` block on server.
     
    143239 */
    144240function render_block_core_navigation( $attributes, $content, $block ) {
     241
     242    // Flag used to indicate whether the rendered output is considered to be
     243    // a fallback (i.e. the block has no menu associated with it).
     244    $is_fallback = false;
     245
    145246    /**
    146247     * Deprecated:
     
    188289        $mapping = get_option( 'wp_navigation_areas', array() );
    189290        if ( ! empty( $mapping[ $area ] ) ) {
    190             $attributes['navigationMenuId'] = $mapping[ $area ];
    191         }
    192     }
    193 
     291            $attributes['ref'] = $mapping[ $area ];
     292        }
     293    }
     294
     295    // Ensure that blocks saved with the legacy ref attribute name (navigationMenuId) continue to render.
     296    if ( array_key_exists( 'navigationMenuId', $attributes ) ) {
     297        $attributes['ref'] = $attributes['navigationMenuId'];
     298    }
    194299    // Load inner blocks from the navigation post.
    195     if ( array_key_exists( 'navigationMenuId', $attributes ) ) {
    196         $navigation_post = get_post( $attributes['navigationMenuId'] );
     300    if ( array_key_exists( 'ref', $attributes ) ) {
     301        $navigation_post = get_post( $attributes['ref'] );
    197302        if ( ! isset( $navigation_post ) ) {
    198303            return '';
     
    203308        // 'parse_blocks' includes a null block with '\n\n' as the content when
    204309        // it encounters whitespace. This code strips it.
    205         $compacted_blocks = array_filter(
    206             $parsed_blocks,
    207             function( $block ) {
    208                 return isset( $block['blockName'] );
    209             }
    210         );
     310        $compacted_blocks = block_core_navigation_filter_out_empty_blocks( $parsed_blocks );
    211311
    212312        // TODO - this uses the full navigation block attributes for the
     
    215315    }
    216316
     317    // If there are no inner blocks then fallback to rendering an appropriate fallback.
    217318    if ( empty( $inner_blocks ) ) {
    218         return '';
     319        $is_fallback = true; // indicate we are rendering the fallback.
     320
     321        $fallback_blocks = block_core_navigation_get_fallback_blocks();
     322
     323        // Fallback my have been filtered so do basic test for validity.
     324        if ( empty( $fallback_blocks ) || ! is_array( $fallback_blocks ) ) {
     325            return '';
     326        }
     327
     328        $inner_blocks = new WP_Block_List( $fallback_blocks, $attributes );
     329
    219330    }
    220331
     
    235346        $font_sizes['css_classes'],
    236347        $is_responsive_menu ? array( 'is-responsive' ) : array(),
    237         $layout_class ? array( $layout_class ) : array()
     348        $layout_class ? array( $layout_class ) : array(),
     349        $is_fallback ? array( 'is-fallback' ) : array()
    238350    );
    239351
     
    324436 * Register the navigation block.
    325437 *
     438 * @throws WP_Error An WP_Error exception parsing the block definition.
    326439 * @uses render_block_core_navigation()
    327  * @throws WP_Error An WP_Error exception parsing the block definition.
    328440 */
    329441function register_block_core_navigation() {
     
    342454 *
    343455 * @param array $parsed_block The block being rendered.
     456 *
    344457 * @return array The block being rendered without typographic presets.
    345458 */
     
    365478        }
    366479    }
     480
    367481    return $parsed_block;
    368482}
  • trunk/src/wp-includes/blocks/navigation/block.json

    r52103 r52275  
    1212    "textdomain": "default",
    1313    "attributes": {
    14         "navigationMenuId": {
     14        "ref": {
    1515            "type": "number"
    1616        },
  • trunk/src/wp-includes/blocks/navigation/view.asset.php

    r52103 r52275  
    1 <?php return array('dependencies' => array(), 'version' => '8591fc81d18e61a0f33b213b1fe35e52');
     1<?php return array('dependencies' => array(), 'version' => '133b84f32422a9ad94c4533f85fa4e87');
  • trunk/src/wp-includes/blocks/navigation/view.min.asset.php

    r52103 r52275  
    1 <?php return array('dependencies' => array(), 'version' => '4942262e50480536aae4cd504a13f19c');
     1<?php return array('dependencies' => array(), 'version' => 'f3cbbfbf9b9c434c39d6f77037d5267c');
  • trunk/src/wp-includes/blocks/page-list.php

    r52232 r52275  
    294294    $nested_pages = block_core_page_list_nest_pages( $top_level_pages, $pages_with_children );
    295295
     296    // Limit the number of items to be visually displayed.
     297    if ( ! empty( $attributes['__unstableMaxPages'] ) ) {
     298        $nested_pages = array_slice( $nested_pages, 0, $attributes['__unstableMaxPages'] );
     299    }
     300
    296301    $is_navigation_child = array_key_exists( 'showSubmenuIcon', $block->context );
    297302
  • trunk/src/wp-includes/blocks/pattern/block.json

    r52069 r52275  
    33    "name": "core/pattern",
    44    "title": "Pattern",
    5     "category": "design",
     5    "category": "theme",
    66    "description": "Show a block pattern.",
    77    "supports": {
  • trunk/src/wp-includes/blocks/post-terms/block.json

    r52042 r52275  
    33    "name": "core/post-terms",
    44    "title": "Post Terms",
    5     "category": "design",
     5    "category": "theme",
    66    "description": "Post terms.",
    77    "textdomain": "default",
  • trunk/src/wp-includes/blocks/query-title/block.json

    r52042 r52275  
    33    "name": "core/query-title",
    44    "title": "Query Title",
    5     "category": "design",
     5    "category": "theme",
    66    "description": "Display the query title.",
    77    "textdomain": "default",
  • trunk/src/wp-includes/blocks/site-logo/block.json

    r52042 r52275  
    33    "name": "core/site-logo",
    44    "title": "Site Logo",
    5     "category": "layout",
     5    "category": "theme",
    66    "description": "Display a graphic to represent this site. Update the block, and the changes apply everywhere it’s used. This is different than the site icon, which is the smaller image visible in your dashboard, browser tabs, etc used to help others recognize this site.",
    77    "textdomain": "default",
  • trunk/src/wp-includes/blocks/site-logo/editor-rtl.css

    r52042 r52275  
    155155  right: 0;
    156156  border: 1px dashed currentColor;
    157   opacity: 0.3;
     157  opacity: 0.4;
    158158  pointer-events: none;
    159159  border-radius: inherit;
     
    195195  stroke: currentColor;
    196196  stroke-dasharray: 3;
    197   opacity: 0.3;
     197  opacity: 0.4;
    198198}
    199199.wp-block-site-logo.wp-block-site-logo.is-selected .components-button.components-button {
  • trunk/src/wp-includes/blocks/site-logo/editor-rtl.min.css

    r52042 r52275  
    1 .wp-block[data-align=center]>.wp-block-site-logo{margin-right:auto;margin-left:auto;text-align:center}.wp-block-site-logo a{pointer-events:none}.wp-block-site-logo:not(.is-default-size){display:table}.wp-block-site-logo.is-default-size{width:120px}.wp-block-site-logo.is-default-size img{height:auto;width:100%}.wp-block-site-logo .custom-logo-link{cursor:inherit}.wp-block-site-logo .custom-logo-link:focus{box-shadow:none}.wp-block-site-logo .custom-logo-link.is-transient img{opacity:.3}.wp-block-site-logo img{display:block;height:auto;max-width:100%}.wp-block-site-logo.wp-block-site-logo .components-placeholder,.wp-block-site-logo.wp-block-site-logo .components-resizable-box__container{border-radius:inherit}.wp-block-site-logo.wp-block-site-logo.is-default-size .components-placeholder{height:120px;width:120px}.wp-block-site-logo.wp-block-site-logo .components-placeholder{justify-content:center;align-items:center;box-shadow:none;padding:0;min-height:48px;min-width:48px;height:100%;width:100%;color:currentColor;background:transparent}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-form-file-upload{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__preview{position:absolute;top:4px;left:4px;bottom:4px;right:4px;background:hsla(0,0%,100%,.8);display:flex;align-items:center;justify-content:center}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-drop-zone__content-text{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder:before{content:"";display:block;position:absolute;top:0;left:0;bottom:0;right:0;border:1px dashed;opacity:.3;pointer-events:none;border-radius:inherit}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__fieldset{width:auto}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{color:inherit;padding:0;display:flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:50%;position:relative;visibility:hidden;background:transparent;transition:all .1s linear}@media (prefers-reduced-motion:reduce){.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{transition-duration:0s;transition-delay:0s}}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button>svg{color:#fff}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__illustration{position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;stroke:currentColor;stroke-dasharray:3;opacity:.3}.wp-block-site-logo.wp-block-site-logo.is-selected .components-button.components-button{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);border-style:solid;color:#fff;opacity:1;visibility:visible}
     1.wp-block[data-align=center]>.wp-block-site-logo{margin-right:auto;margin-left:auto;text-align:center}.wp-block-site-logo a{pointer-events:none}.wp-block-site-logo:not(.is-default-size){display:table}.wp-block-site-logo.is-default-size{width:120px}.wp-block-site-logo.is-default-size img{height:auto;width:100%}.wp-block-site-logo .custom-logo-link{cursor:inherit}.wp-block-site-logo .custom-logo-link:focus{box-shadow:none}.wp-block-site-logo .custom-logo-link.is-transient img{opacity:.3}.wp-block-site-logo img{display:block;height:auto;max-width:100%}.wp-block-site-logo.wp-block-site-logo .components-placeholder,.wp-block-site-logo.wp-block-site-logo .components-resizable-box__container{border-radius:inherit}.wp-block-site-logo.wp-block-site-logo.is-default-size .components-placeholder{height:120px;width:120px}.wp-block-site-logo.wp-block-site-logo .components-placeholder{justify-content:center;align-items:center;box-shadow:none;padding:0;min-height:48px;min-width:48px;height:100%;width:100%;color:currentColor;background:transparent}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-form-file-upload{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__preview{position:absolute;top:4px;left:4px;bottom:4px;right:4px;background:hsla(0,0%,100%,.8);display:flex;align-items:center;justify-content:center}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-drop-zone__content-text{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder:before{content:"";display:block;position:absolute;top:0;left:0;bottom:0;right:0;border:1px dashed;opacity:.4;pointer-events:none;border-radius:inherit}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__fieldset{width:auto}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{color:inherit;padding:0;display:flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:50%;position:relative;visibility:hidden;background:transparent;transition:all .1s linear}@media (prefers-reduced-motion:reduce){.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{transition-duration:0s;transition-delay:0s}}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button>svg{color:#fff}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__illustration{position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;stroke:currentColor;stroke-dasharray:3;opacity:.4}.wp-block-site-logo.wp-block-site-logo.is-selected .components-button.components-button{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);border-style:solid;color:#fff;opacity:1;visibility:visible}
  • trunk/src/wp-includes/blocks/site-logo/editor.css

    r52042 r52275  
    155155  left: 0;
    156156  border: 1px dashed currentColor;
    157   opacity: 0.3;
     157  opacity: 0.4;
    158158  pointer-events: none;
    159159  border-radius: inherit;
     
    195195  stroke: currentColor;
    196196  stroke-dasharray: 3;
    197   opacity: 0.3;
     197  opacity: 0.4;
    198198}
    199199.wp-block-site-logo.wp-block-site-logo.is-selected .components-button.components-button {
  • trunk/src/wp-includes/blocks/site-logo/editor.min.css

    r52042 r52275  
    1 .wp-block[data-align=center]>.wp-block-site-logo{margin-left:auto;margin-right:auto;text-align:center}.wp-block-site-logo a{pointer-events:none}.wp-block-site-logo:not(.is-default-size){display:table}.wp-block-site-logo.is-default-size{width:120px}.wp-block-site-logo.is-default-size img{height:auto;width:100%}.wp-block-site-logo .custom-logo-link{cursor:inherit}.wp-block-site-logo .custom-logo-link:focus{box-shadow:none}.wp-block-site-logo .custom-logo-link.is-transient img{opacity:.3}.wp-block-site-logo img{display:block;height:auto;max-width:100%}.wp-block-site-logo.wp-block-site-logo .components-placeholder,.wp-block-site-logo.wp-block-site-logo .components-resizable-box__container{border-radius:inherit}.wp-block-site-logo.wp-block-site-logo.is-default-size .components-placeholder{height:120px;width:120px}.wp-block-site-logo.wp-block-site-logo .components-placeholder{justify-content:center;align-items:center;box-shadow:none;padding:0;min-height:48px;min-width:48px;height:100%;width:100%;color:currentColor;background:transparent}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-form-file-upload{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__preview{position:absolute;top:4px;right:4px;bottom:4px;left:4px;background:hsla(0,0%,100%,.8);display:flex;align-items:center;justify-content:center}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-drop-zone__content-text{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder:before{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;border:1px dashed;opacity:.3;pointer-events:none;border-radius:inherit}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__fieldset{width:auto}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{color:inherit;padding:0;display:flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:50%;position:relative;visibility:hidden;background:transparent;transition:all .1s linear}@media (prefers-reduced-motion:reduce){.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{transition-duration:0s;transition-delay:0s}}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button>svg{color:#fff}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__illustration{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;stroke:currentColor;stroke-dasharray:3;opacity:.3}.wp-block-site-logo.wp-block-site-logo.is-selected .components-button.components-button{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);border-style:solid;color:#fff;opacity:1;visibility:visible}
     1.wp-block[data-align=center]>.wp-block-site-logo{margin-left:auto;margin-right:auto;text-align:center}.wp-block-site-logo a{pointer-events:none}.wp-block-site-logo:not(.is-default-size){display:table}.wp-block-site-logo.is-default-size{width:120px}.wp-block-site-logo.is-default-size img{height:auto;width:100%}.wp-block-site-logo .custom-logo-link{cursor:inherit}.wp-block-site-logo .custom-logo-link:focus{box-shadow:none}.wp-block-site-logo .custom-logo-link.is-transient img{opacity:.3}.wp-block-site-logo img{display:block;height:auto;max-width:100%}.wp-block-site-logo.wp-block-site-logo .components-placeholder,.wp-block-site-logo.wp-block-site-logo .components-resizable-box__container{border-radius:inherit}.wp-block-site-logo.wp-block-site-logo.is-default-size .components-placeholder{height:120px;width:120px}.wp-block-site-logo.wp-block-site-logo .components-placeholder{justify-content:center;align-items:center;box-shadow:none;padding:0;min-height:48px;min-width:48px;height:100%;width:100%;color:currentColor;background:transparent}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-form-file-upload{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__preview{position:absolute;top:4px;right:4px;bottom:4px;left:4px;background:hsla(0,0%,100%,.8);display:flex;align-items:center;justify-content:center}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-drop-zone__content-text{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder:before{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;border:1px dashed;opacity:.4;pointer-events:none;border-radius:inherit}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__fieldset{width:auto}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{color:inherit;padding:0;display:flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:50%;position:relative;visibility:hidden;background:transparent;transition:all .1s linear}@media (prefers-reduced-motion:reduce){.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{transition-duration:0s;transition-delay:0s}}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button>svg{color:#fff}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__illustration{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;stroke:currentColor;stroke-dasharray:3;opacity:.4}.wp-block-site-logo.wp-block-site-logo.is-selected .components-button.components-button{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);border-style:solid;color:#fff;opacity:1;visibility:visible}
  • trunk/src/wp-includes/blocks/site-tagline/block.json

    r52042 r52275  
    33    "name": "core/site-tagline",
    44    "title": "Site Tagline",
    5     "category": "design",
     5    "category": "theme",
    66    "description": "Describe in a few words what the website is about. The tagline can be used in search results or when sharing on social networks even if it's not displayed in the theme design.",
    77    "keywords": [ "description" ],
  • trunk/src/wp-includes/blocks/site-title/block.json

    r52042 r52275  
    33    "name": "core/site-title",
    44    "title": "Site Title",
    5     "category": "design",
     5    "category": "theme",
    66    "description": "Displays the name of this site. Update the block, and the changes apply everywhere it’s used. This will also appear in the browser title bar and in search results.",
    77    "textdomain": "default",
  • trunk/src/wp-includes/blocks/template-part.php

    r52135 r52275  
    5454            // Else, if the template part was provided by the active theme,
    5555            // render the corresponding file content.
    56             $template_part_file_path = get_theme_file_path( '/block-template-parts/' . $attributes['slug'] . '.html' );
     56            $theme_folders           = get_block_theme_folders();
     57            $template_part_file_path = get_theme_file_path( '/' . $theme_folders['wp_template_part'] . '/' . $attributes['slug'] . '.html' );
    5758            if ( 0 === validate_file( $attributes['slug'] ) && file_exists( $template_part_file_path ) ) {
    5859                $content = file_get_contents( $template_part_file_path );
  • trunk/src/wp-includes/blocks/template-part/block.json

    r52062 r52275  
    3030            "padding": true
    3131        },
    32         "__experimentalLayout": true
     32        "__experimentalLayout": true,
     33        "reusable": false
    3334    },
    3435    "editorStyle": "wp-block-template-part-editor"
  • trunk/src/wp-includes/class-wp-block-template.php

    r52236 r52275  
    7979
    8080    /**
     81     * Origin of the content when the content has been customized.
     82     * When customized, origin takes on the value of source and source becomes
     83     * 'custom'.
     84     *
     85     * @since 5.9.0
     86     * @var string
     87     */
     88    public $origin;
     89
     90    /**
    8191     * Post Id.
    8292     *
     
    110120     */
    111121    public $is_custom = true;
     122
     123    /**
     124     * Author.
     125     *
     126     * A value of 0 means no author.
     127     *
     128     * @since 5.9.0
     129     * @var int
     130     */
     131    public $author;
    112132}
  • trunk/src/wp-includes/class-wp-theme-json-resolver.php

    r52232 r52275  
    223223     * @since 5.9.0
    224224     *
    225      * @param bool  $should_create_cpt  Optional. Whether a new custom post type should be created if none are found.
    226      *                                  False by default.
    227      * @param array $post_status_filter Filter Optional. custom post type by post status.
    228      *                                   ['publish'] by default, so it only fetches published posts.
    229      *
     225     * @param WP_Theme $theme              The theme object.  If empty, it
     226     *                                     defaults to the current theme.
     227     * @param bool     $should_create_cpt  Optional. Whether a new custom post
     228     *                                     type should be created if none are
     229     *                                     found.  False by default.
     230     * @param array    $post_status_filter Filter Optional. custom post type by
     231     *                                     post status.  ['publish'] by default,
     232     *                                     so it only fetches published posts.
    230233     * @return array Custom Post Type for the user's origin config.
    231234     */
    232     private static function get_user_data_from_custom_post_type( $should_create_cpt = false, $post_status_filter = array( 'publish' ) ) {
     235    public static function get_user_data_from_custom_post_type( $theme, $should_create_cpt = false, $post_status_filter = array( 'publish' ) ) {
     236        if ( ! $theme instanceof WP_Theme ) {
     237            $theme = wp_get_theme();
     238        }
    233239        $user_cpt         = array();
    234240        $post_type_filter = 'wp_global_styles';
    235         $query            = new WP_Query(
    236             array(
    237                 'posts_per_page' => 1,
    238                 'orderby'        => 'date',
    239                 'order'          => 'desc',
    240                 'post_type'      => $post_type_filter,
    241                 'post_status'    => $post_status_filter,
    242                 'tax_query'      => array(
    243                     array(
    244                         'taxonomy' => 'wp_theme',
    245                         'field'    => 'name',
    246                         'terms'    => wp_get_theme()->get_stylesheet(),
    247                     ),
     241        $args             = array(
     242            'numberposts' => 1,
     243            'orderby'     => 'date',
     244            'order'       => 'desc',
     245            'post_type'   => $post_type_filter,
     246            'post_status' => $post_status_filter,
     247            'tax_query'   => array(
     248                array(
     249                    'taxonomy' => 'wp_theme',
     250                    'field'    => 'name',
     251                    'terms'    => $theme->get_stylesheet(),
    248252                ),
    249             )
     253            ),
    250254        );
    251255
    252         if ( is_array( $query->posts ) && ( 1 === $query->post_count ) ) {
    253             $user_cpt = $query->posts[0]->to_array();
     256        $cache_key = sprintf( 'wp_global_styles_%s', md5( serialize( $args ) ) );
     257        $post_id   = wp_cache_get( $cache_key );
     258
     259        if ( (int) $post_id > 0 ) {
     260            return get_post( $post_id, ARRAY_A );
     261        }
     262
     263        // Special case: '-1' is a results not found.
     264        if ( -1 === $post_id && ! $should_create_cpt ) {
     265            return $user_cpt;
     266        }
     267
     268        $recent_posts = wp_get_recent_posts( $args );
     269        if ( is_array( $recent_posts ) && ( count( $recent_posts ) === 1 ) ) {
     270            $user_cpt = $recent_posts[0];
    254271        } elseif ( $should_create_cpt ) {
    255272            $cpt_post_id = wp_insert_post(
     
    266283                true
    267284            );
    268 
    269             if ( is_wp_error( $cpt_post_id ) ) {
    270                 $user_cpt = array();
    271             } else {
    272                 $user_cpt = get_post( $cpt_post_id, ARRAY_A );
    273             }
    274         }
     285            $user_cpt    = get_post( $cpt_post_id, ARRAY_A );
     286        }
     287        $cache_expiration = $user_cpt ? DAY_IN_SECONDS : HOUR_IN_SECONDS;
     288        wp_cache_set( $cache_key, $user_cpt ? $user_cpt['ID'] : -1, '', $cache_expiration );
    275289
    276290        return $user_cpt;
     
    290304
    291305        $config   = array();
    292         $user_cpt = self::get_user_data_from_custom_post_type();
     306        $user_cpt = self::get_user_data_from_custom_post_type( wp_get_theme() );
    293307
    294308        if ( array_key_exists( 'post_content', $user_cpt ) ) {
     
    298312            if ( JSON_ERROR_NONE !== $json_decoding_error ) {
    299313                trigger_error( 'Error when decoding a theme.json schema for user data. ' . json_last_error_msg() );
    300                 return new WP_Theme_JSON( $config, 'user' );
     314                return new WP_Theme_JSON( $config, 'custom' );
    301315            }
    302316
     
    312326            }
    313327        }
    314         self::$user = new WP_Theme_JSON( $config, 'user' );
     328        self::$user = new WP_Theme_JSON( $config, 'custom' );
    315329
    316330        return self::$user;
     
    319333    /**
    320334     * There are three sources of data (origins) for a site:
    321      * default, theme, and user. The user's has higher priority
    322      * than the theme's, and the theme's higher than core's.
     335     * default, theme, and custom. The custom's has higher priority
     336     * than the theme's, and the theme's higher than default's.
    323337     *
    324338     * Unlike the getters {@link get_core_data},
     
    337351     *
    338352     * @param string $origin Optional. To what level should we merge data.
    339      *                       Valid values are 'theme' or 'user'.
    340      *                       Default is 'user'.
     353     *                       Valid values are 'theme' or 'custom'.
     354     *                       Default is 'custom'.
    341355     * @return WP_Theme_JSON
    342356     */
    343     public static function get_merged_data( $origin = 'user' ) {
     357    public static function get_merged_data( $origin = 'custom' ) {
    344358        if ( is_array( $origin ) ) {
    345359            _deprecated_argument( __FUNCTION__, '5.9' );
     
    350364        $result->merge( self::get_theme_data() );
    351365
    352         if ( 'user' === $origin ) {
     366        if ( 'custom' === $origin ) {
    353367            $result->merge( self::get_user_data() );
    354368        }
     
    370384        }
    371385
    372         $user_cpt = self::get_user_data_from_custom_post_type( true );
     386        $user_cpt = self::get_user_data_from_custom_post_type( wp_get_theme(), true );
    373387
    374388        if ( array_key_exists( 'ID', $user_cpt ) ) {
  • trunk/src/wp-includes/class-wp-theme-json.php

    r52232 r52275  
    5454        'default',
    5555        'theme',
    56         'user',
     56        'custom',
    5757    );
    5858
     
    7676     *
    7777     * - path       => where to find the preset within the settings section
     78     * - override   => whether a theme preset with the same slug as a default preset
     79     *                 can override it
    7880     * - value_key  => the key that represents the value
    79      * - value_func => the callback to render the value (either value_key or value_func should be present)
     81     * - value_func => optionally, instead of value_key, a function to generate
     82     *                 the value that takes a preset as an argument
     83     *                 (either value_key or value_func should be present)
    8084     * - css_vars   => template string to use in generating the CSS Custom Property.
    8185     *                 Example output: "--wp--preset--duotone--blue: <value>" will generate as many CSS Custom Properties as presets defined
    8286     *                 substituting the $slug for the slug's value for each preset value.
    83      * - classes    => array containing a structure with the classes to generate for the presets.
    84      *                 Each key is a template string to resolve similarly to the css_vars and each value is the CSS property to use for that class.
    85      *                 Example output: ".has-blue-color { color: <value> }"
    86      * - properties  => a list of CSS properties to be used by kses to check the preset value is safe.
     87     * - classes    => array containing a structure with the classes to
     88     *                 generate for the presets, where for each array item
     89     *                 the key is the class name and the value the property name.
     90     *                 The "$slug" substring will be replaced by the slug of each preset.
     91     *                 For example:
     92     *                 'classes' => array(
     93     *                   '.has-$slug-color'            => 'color',
     94     *                   '.has-$slug-background-color' => 'background-color',
     95     *                   '.has-$slug-border-color'     => 'border-color',
     96     *                 )
     97     * - properties => array of CSS properties to be used by kses to
     98     *                 validate the content of each preset
     99     *                 by means of the remove_insecure_properties method.
    87100     *
    88101     * @since 5.8.0
     
    93106        array(
    94107            'path'       => array( 'color', 'palette' ),
     108            'override'   => false,
    95109            'value_key'  => 'color',
    96110            'css_vars'   => '--wp--preset--color--$slug',
     
    104118        array(
    105119            'path'       => array( 'color', 'gradients' ),
     120            'override'   => false,
    106121            'value_key'  => 'gradient',
    107122            'css_vars'   => '--wp--preset--gradient--$slug',
     
    111126        array(
    112127            'path'       => array( 'color', 'duotone' ),
     128            'override'   => true,
    113129            'value_func' => 'wp_render_duotone_filter_preset',
    114130            'css_vars'   => '--wp--preset--duotone--$slug',
     
    118134        array(
    119135            'path'       => array( 'typography', 'fontSizes' ),
     136            'override'   => true,
    120137            'value_key'  => 'size',
    121138            'css_vars'   => '--wp--preset--font-size--$slug',
     
    125142        array(
    126143            'path'       => array( 'typography', 'fontFamilies' ),
     144            'override'   => true,
    127145            'value_key'  => 'fontFamily',
    128146            'css_vars'   => '--wp--preset--font-family--$slug',
     
    214232     */
    215233    const VALID_SETTINGS = array(
    216         'border'     => array(
     234        'appearanceTools' => null,
     235        'border'          => array(
    217236            'color'  => null,
    218237            'radius' => null,
     
    220239            'width'  => null,
    221240        ),
    222         'color'      => array(
     241        'color'           => array(
    223242            'background'       => null,
    224243            'custom'           => null,
     
    233252            'text'             => null,
    234253        ),
    235         'custom'     => null,
    236         'layout'     => array(
     254        'custom'          => null,
     255        'layout'          => array(
    237256            'contentSize' => null,
    238257            'wideSize'    => null,
    239258        ),
    240         'spacing'    => array(
     259        'spacing'         => array(
    241260            'blockGap' => null,
    242261            'margin'   => null,
     
    244263            'units'    => null,
    245264        ),
    246         'typography' => array(
     265        'typography'      => array(
    247266            'customFontSize' => null,
    248267            'dropCap'        => null,
     
    298317
    299318    /**
     319     * The valid elements that can be found under styles.
     320     *
    300321     * @since 5.8.0
    301322     * @var string[]
     
    327348     * @param array $theme_json A structure that follows the theme.json schema.
    328349     * @param string $origin    Optional. What source of data this object represents.
    329      *                          One of 'default', 'theme', or 'user'. Default 'theme'.
     350     *                          One of 'default', 'theme', or 'custom'. Default 'theme'.
    330351     */
    331352    public function __construct( $theme_json = array(), $origin = 'theme' ) {
     
    337358        $valid_block_names   = array_keys( self::get_blocks_metadata() );
    338359        $valid_element_names = array_keys( self::ELEMENTS );
    339         $this->theme_json    = self::sanitize( $this->theme_json, $valid_block_names, $valid_element_names );
     360        $theme_json          = self::sanitize( $this->theme_json, $valid_block_names, $valid_element_names );
     361        $this->theme_json    = self::maybe_opt_in_into_settings( $theme_json );
    340362
    341363        // Internally, presets are keyed by origin.
     
    346368                $preset = _wp_array_get( $this->theme_json, $path, null );
    347369                if ( null !== $preset ) {
    348                     if ( 'user' !== $origin || isset( $preset[0] ) ) {
     370                    // If the preset is not already keyed by origin.
     371                    if ( isset( $preset[0] ) || empty( $preset ) ) {
    349372                        _wp_array_set( $this->theme_json, $path, array( $origin => $preset ) );
    350373                    }
     
    352375            }
    353376        }
     377    }
     378
     379    /**
     380     * Enables some opt-in settings if theme declared support.
     381     *
     382     * @since 5.9.0
     383     *
     384     * @param array $theme_json A theme.json structure to modify.
     385     * @return array The modified theme.json structure.
     386     */
     387    private static function maybe_opt_in_into_settings( $theme_json ) {
     388        $new_theme_json = $theme_json;
     389
     390        if ( isset( $new_theme_json['settings']['appearanceTools'] ) ) {
     391            self::do_opt_in_into_settings( $new_theme_json['settings'] );
     392        }
     393
     394        if ( isset( $new_theme_json['settings']['blocks'] ) && is_array( $new_theme_json['settings']['blocks'] ) ) {
     395            foreach ( $new_theme_json['settings']['blocks'] as &$block ) {
     396                if ( isset( $block['appearanceTools'] ) ) {
     397                    self::do_opt_in_into_settings( $block );
     398                }
     399            }
     400        }
     401
     402        return $new_theme_json;
     403    }
     404
     405    /**
     406     * Enables some settings.
     407     *
     408     * @since 5.9.0
     409     *
     410     * @param array $context The context to which the settings belong.
     411     */
     412    private static function do_opt_in_into_settings( &$context ) {
     413        $to_opt_in = array(
     414            array( 'border', 'color' ),
     415            array( 'border', 'radius' ),
     416            array( 'border', 'style' ),
     417            array( 'border', 'width' ),
     418            array( 'color', 'link' ),
     419            array( 'spacing', 'blockGap' ),
     420            array( 'spacing', 'margin' ),
     421            array( 'spacing', 'padding' ),
     422            array( 'typography', 'lineHeight' ),
     423        );
     424
     425        foreach ( $to_opt_in as $path ) {
     426            if ( null === _wp_array_get( $context, $path, null ) ) {
     427                _wp_array_set( $context, $path, true );
     428            }
     429        }
     430
     431        unset( $context['appearanceTools'] );
    354432    }
    355433
     
    415493        return $output;
    416494    }
     495
    417496    /**
    418497     * Returns the metadata for each block.
     
    13791458
    13801459        /*
    1381          * The array_replace_recursive algorithm merges at the leaf level.
    1382          * For leaf values that are arrays it will use the numeric indexes for replacement.
    1383          * In those cases, we want to replace the existing with the incoming value, if it exists.
     1460         * The array_replace_recursive algorithm merges at the leaf level,
     1461         * but we don't want leaf arrays to be merged, so we overwrite it.
     1462         *
     1463         * For leaf values that are sequential arrays it will use the numeric indexes for replacement.
     1464         * We rather replace the existing with the incoming value, if it exists.
     1465         * This is the case of spacing.units.
     1466         *
     1467         * For leaf values that are associative arrays it will merge them as expected.
     1468         * This is also not the behavior we want for the current associative arrays (presets).
     1469         * We rather replace the existing with the incoming value, if it exists.
     1470         * This happens, for example, when we merge data from theme.json upon existing
     1471         * theme supports or when we merge anything coming from the same source twice.
     1472         * This is the case of color.palette, color.gradients, color.duotone,
     1473         * typography.fontSizes, or typography.fontFamilies.
     1474         *
     1475         * Additionally, for some preset types, we also want to make sure the
     1476         * values they introduce don't conflict with default values. We do so
     1477         * by checking the incoming slugs for theme presets and compare them
     1478         * with the equivalent dfefault presets: if a slug is present as a default
     1479         * we remove it from the theme presets.
    13841480         */
    1385         $to_replace   = array();
    1386         $to_replace[] = array( 'spacing', 'units' );
    1387         foreach ( self::VALID_ORIGINS as $origin ) {
    1388             $to_replace[] = array( 'color', 'duotone', $origin );
    1389             $to_replace[] = array( 'color', 'palette', $origin );
    1390             $to_replace[] = array( 'color', 'gradients', $origin );
    1391             $to_replace[] = array( 'typography', 'fontSizes', $origin );
    1392             $to_replace[] = array( 'typography', 'fontFamilies', $origin );
    1393         }
    1394 
    1395         $nodes = self::get_setting_nodes( $this->theme_json );
    1396         foreach ( $nodes as $metadata ) {
    1397             foreach ( $to_replace as $property_path ) {
    1398                 $path = array_merge( $metadata['path'], $property_path );
    1399                 $node = _wp_array_get( $incoming_data, $path, null );
    1400                 if ( isset( $node ) ) {
    1401                     _wp_array_set( $this->theme_json, $path, $node );
     1481        $nodes        = self::get_setting_nodes( $incoming_data );
     1482        $slugs_global = self::get_slugs_not_to_override( $this->theme_json );
     1483        foreach ( $nodes as $node ) {
     1484            $slugs_node = self::get_slugs_not_to_override( $this->theme_json, $node['path'] );
     1485            $slugs      = array_merge_recursive( $slugs_global, $slugs_node );
     1486
     1487            // Replace the spacing.units.
     1488            $path    = array_merge( $node['path'], array( 'spacing', 'units' ) );
     1489            $content = _wp_array_get( $incoming_data, $path, null );
     1490            if ( isset( $content ) ) {
     1491                _wp_array_set( $this->theme_json, $path, $content );
     1492            }
     1493
     1494            // Replace the presets.
     1495            foreach ( self::PRESETS_METADATA as $preset ) {
     1496                foreach ( self::VALID_ORIGINS as $origin ) {
     1497                    $path    = array_merge( $node['path'], $preset['path'], array( $origin ) );
     1498                    $content = _wp_array_get( $incoming_data, $path, null );
     1499                    if ( ! isset( $content ) ) {
     1500                        continue;
     1501                    }
     1502
     1503                    if (
     1504                        ( 'theme' !== $origin ) ||
     1505                        ( 'theme' === $origin && $preset['override'] )
     1506                    ) {
     1507                        _wp_array_set( $this->theme_json, $path, $content );
     1508                    }
     1509
     1510                    if ( 'theme' === $origin && ! $preset['override'] ) {
     1511                        $content = self::filter_slugs( $content, $preset['path'], $slugs );
     1512                        _wp_array_set( $this->theme_json, $path, $content );
     1513                    }
    14021514                }
    14031515            }
    14041516        }
    1405 
     1517    }
     1518
     1519    /**
     1520     * Returns the slugs for all the presets that cannot be overriden
     1521     * in the given path. It returns an associative array
     1522     * whose keys are the preset paths and the leafs is the list of slugs.
     1523     *
     1524     * For example:
     1525     *
     1526     * array(
     1527     *   'color' => array(
     1528     *     'palette'   => array( 'slug-1', 'slug-2' ),
     1529     *     'gradients' => array( 'slug-3', 'slug-4' ),
     1530     *   ),
     1531     * )
     1532     *
     1533     * @since 5.9.0
     1534     *
     1535     * @param array $data A theme.json like structure to inspect.
     1536     * @param array $node_path The path to inspect. It's 'settings' by default.
     1537     *
     1538     * @return array An associative array containing the slugs for the given path.
     1539     */
     1540    private static function get_slugs_not_to_override( $data, $node_path = array( 'settings' ) ) {
     1541        $slugs = array();
     1542        foreach ( self::PRESETS_METADATA as $metadata ) {
     1543            if ( $metadata['override'] ) {
     1544                continue;
     1545            }
     1546
     1547            $slugs_for_preset = array();
     1548            $path             = array_merge( $node_path, $metadata['path'], array( 'default' ) );
     1549            $preset           = _wp_array_get( $data, $path, null );
     1550            if ( ! isset( $preset ) ) {
     1551                continue;
     1552            }
     1553
     1554            $slugs_for_preset = array_map(
     1555                function( $value ) {
     1556                    return isset( $value['slug'] ) ? $value['slug'] : null;
     1557                },
     1558                $preset
     1559            );
     1560            _wp_array_set( $slugs, $metadata['path'], $slugs_for_preset );
     1561        }
     1562
     1563        return $slugs;
     1564    }
     1565
     1566    /**
     1567     * Removes the preset values whose slug is equal to any of given slugs.
     1568     *
     1569     * @since 5.9.0
     1570     *
     1571     * @param array $node The node with the presets to validate.
     1572     * @param array $path The path to the preset type to inspect.
     1573     * @param array $slugs The slugs that should not be overriden.
     1574     *
     1575     * @return array The new node
     1576     */
     1577    private static function filter_slugs( $node, $path, $slugs ) {
     1578        $slugs_for_preset = _wp_array_get( $slugs, $path, array() );
     1579        if ( empty( $slugs_for_preset ) ) {
     1580            return $node;
     1581        }
     1582
     1583        $new_node = array();
     1584        foreach ( $node as $value ) {
     1585            if ( isset( $value['slug'] ) && ! in_array( $value['slug'], $slugs_for_preset, true ) ) {
     1586                $new_node[] = $value;
     1587            }
     1588        }
     1589
     1590        return $new_node;
    14061591    }
    14071592
  • trunk/src/wp-includes/global-styles-and-settings.php

    r52232 r52275  
    1111 * @since 5.9.0
    1212 *
    13  * @param array  $path              Path to the specific setting to retrieve. Optional.
    14  *                                  If empty, will return all settings.
    15  * @param string $block_name        Which block to retrieve the settings from. Optional
    16  *                                  If empty, it'll return the settings for the global context.
    17  * @param string $origin            Which origin to take data from. Optional.
    18  *                                  It can be 'all' (core, theme, and user) or 'base' (core and theme).
    19  *                                  If empty or unknown, 'all' is used.
     13 * @param array $path    Path to the specific setting to retrieve. Optional.
     14 *                       If empty, will return all settings.
     15 * @param array $context {
     16 *     Metadata to know where to retrieve the $path from. Optional.
     17 *
     18 *     @type string $block_name Which block to retrieve the settings from.
     19 *                              If empty, it'll return the settings for the global context.
     20 *     @type string $origin     Which origin to take data from.
     21 *                              Valid values are 'all' (core, theme, and user) or 'base' (core and theme).
     22 *                              If empty or unknown, 'all' is used.
     23 * }
    2024 *
    2125 * @return array The settings to retrieve.
    2226 */
    23 function wp_get_global_settings( $path = array(), $block_name = '', $origin = 'all' ) {
    24     if ( '' !== $block_name ) {
    25         $path = array_merge( array( 'blocks', $block_name ), $path );
     27function wp_get_global_settings( $path = array(), $context = array() ) {
     28    if ( ! empty( $context['block_name'] ) ) {
     29        $path = array_merge( array( 'blocks', $context['block_name'] ), $path );
    2630    }
    2731
    28     if ( 'base' === $origin ) {
     32    $origin = 'custom';
     33    if ( isset( $context['origin'] ) && 'base' === $context['origin'] ) {
    2934        $origin = 'theme';
    30     } else {
    31         $origin = 'user';
    3235    }
    3336
     
    4245 * @since 5.9.0
    4346 *
    44  * @param array  $path              Path to the specific style to retrieve. Optional.
    45  *                                  If empty, will return all styles.
    46  * @param string $block_name        Which block to retrieve the styles from. Optional.
    47  *                                  If empty, it'll return the styles for the global context.
    48  * @param string $origin            Which origin to take data from. Optional.
    49  *                                  It can be 'all' (core, theme, and user) or 'base' (core and theme).
    50  *                                  If empty or unknown, 'all' is used.
     47 * @param array $path    Path to the specific style to retrieve. Optional.
     48 *                       If empty, will return all styles.
     49 * @param array $context {
     50 *     Metadata to know where to retrieve the $path from. Optional.
     51 *
     52 *     @type string $block_name Which block to retrieve the styles from.
     53 *                              If empty, it'll return the styles for the global context.
     54 *     @type string $origin     Which origin to take data from.
     55 *                              Valid values are 'all' (core, theme, and user) or 'base' (core and theme).
     56 *                              If empty or unknown, 'all' is used.
     57 * }
    5158 *
    5259 * @return array The styles to retrieve.
    5360 */
    54 function wp_get_global_styles( $path = array(), $block_name = '', $origin = 'all' ) {
    55     if ( '' !== $block_name ) {
    56         $path = array_merge( array( 'blocks', $block_name ), $path );
     61function wp_get_global_styles( $path = array(), $context = array() ) {
     62    if ( ! empty( $context['block_name'] ) ) {
     63        $path = array_merge( array( 'blocks', $context['block_name'] ), $path );
    5764    }
    5865
    59     if ( 'base' === $origin ) {
     66    $origin = 'custom';
     67    if ( isset( $context['origin'] ) && 'base' === $context['origin'] ) {
    6068        $origin = 'theme';
    61     } else {
    62         $origin = 'user';
    6369    }
    6470
     
    106112    }
    107113
    108     $origins = array( 'default', 'theme', 'user' );
     114    $origins = array( 'default', 'theme', 'custom' );
    109115    if ( ! $supports_theme_json && ! $supports_link_color ) {
    110116        // In this case we only enqueue the core presets (CSS Custom Properties + the classes).
  • trunk/src/wp-includes/post.php

    r52232 r52275  
    385385                'editor',
    386386                'revisions',
     387                'author',
    387388            ),
    388389        )
     
    443444                'editor',
    444445                'revisions',
     446                'author',
    445447            ),
    446448        )
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php

    r52103 r52275  
    233233     */
    234234    public function prepare_item_for_response( $post, $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
    235         $config                           = json_decode( $post->post_content, true );
    236         $is_global_styles_user_theme_json = isset( $config['isGlobalStylesUserThemeJSON'] ) && true === $config['isGlobalStylesUserThemeJSON'];
    237         $fields                           = $this->get_fields_for_response( $request );
     235        $raw_config                       = json_decode( $post->post_content, true );
     236        $is_global_styles_user_theme_json = isset( $raw_config['isGlobalStylesUserThemeJSON'] ) && true === $raw_config['isGlobalStylesUserThemeJSON'];
     237        $config                           = array();
     238        if ( $is_global_styles_user_theme_json ) {
     239            $config = ( new WP_Theme_JSON( $raw_config, 'custom' ) )->get_raw_data();
     240        }
    238241
    239242        // Base fields for every post.
    240         $data = array();
     243        $data   = array();
     244        $fields = $this->get_fields_for_response( $request );
    241245
    242246        if ( rest_is_field_included( 'id', $fields ) ) {
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php

    r52268 r52275  
    7373                'args'   => array(
    7474                    'id' => array(
    75                         'description' => __( 'The id of a template' ),
    76                         'type'        => 'string',
     75                        'description'       => __( 'The id of a template' ),
     76                        'type'              => 'string',
     77                        'sanitize_callback' => array( $this, '_sanitize_template_id' ),
    7778                    ),
    7879                ),
     
    133134
    134135    /**
     136     * Requesting this endpoint for a template like 'twentytwentytwo//home'
     137     * requires using a path like /wp/v2/templates/twentytwentytwo//home. There
     138     * are special cases when WordPress routing corrects the name to contain
     139     * only a single slash like 'twentytwentytwo/home'.
     140     *
     141     * This method doubles the last slash if it's not already doubled. It relies
     142     * on the template ID format {theme_name}//{template_slug} and the fact that
     143     * slugs cannot contain slashes.
     144     *
     145     * @since 5.9.0
     146     * @see https://core.trac.wordpress.org/ticket/54507
     147     *
     148     * @param string $id Template ID.
     149     * @return string Sanitized template ID.
     150     */
     151    public function _sanitize_template_id( $id ) {
     152        $last_slash_pos = strrpos( $id, '/' );
     153        if ( false === $last_slash_pos ) {
     154            return $id;
     155        }
     156
     157        $is_double_slashed = substr( $id, $last_slash_pos - 1, 1 ) === '/';
     158        if ( $is_double_slashed ) {
     159            return $id;
     160        }
     161        return (
     162            substr( $id, 0, $last_slash_pos )
     163            . '/'
     164            . substr( $id, $last_slash_pos )
     165        );
     166    }
     167
     168    /**
    135169     * Checks if a given request has access to read templates.
    136170     *
     
    244278
    245279        $changes = $this->prepare_item_for_database( $request );
     280
     281        if ( is_wp_error( $changes ) ) {
     282            return $changes;
     283        }
    246284
    247285        if ( 'custom' === $template->source ) {
     
    299337    public function create_item( $request ) {
    300338        $prepared_post            = $this->prepare_item_for_database( $request );
     339
     340        if ( is_wp_error( $prepared_post ) ) {
     341            return $prepared_post;
     342        }
     343
    301344        $prepared_post->post_name = $request['slug'];
    302345        $post_id                  = wp_insert_post( wp_slash( (array) $prepared_post ), true );
     
    431474                'wp_theme' => $template->theme,
    432475            );
     476            $changes->meta_input  = array(
     477                'origin' => $template->source,
     478            );
    433479        } else {
    434480            $changes->post_name   = $template->slug;
     
    470516        }
    471517
     518        if ( ! empty( $request['author'] ) ) {
     519            $post_author = (int) $request['author'];
     520
     521            if ( get_current_user_id() !== $post_author ) {
     522                $user_obj = get_userdata( $post_author );
     523
     524                if ( ! $user_obj ) {
     525                    return new WP_Error(
     526                        'rest_invalid_author',
     527                        __( 'Invalid author ID.' ),
     528                        array( 'status' => 400 )
     529                    );
     530                }
     531            }
     532
     533            $changes->post_author = $post_author;
     534        }
     535
    472536        return $changes;
    473537    }
     
    517581        if ( rest_is_field_included( 'source', $fields ) ) {
    518582            $data['source'] = $template->source;
     583        }
     584
     585        if ( rest_is_field_included( 'origin', $fields ) ) {
     586            $data['origin'] = $template->origin;
    519587        }
    520588
     
    554622        if ( rest_is_field_included( 'has_theme_file', $fields ) ) {
    555623            $data['has_theme_file'] = (bool) $template->has_theme_file;
     624        }
     625
     626        if ( rest_is_field_included( 'is_custom', $fields ) && 'wp_template' === $template->type ) {
     627            $data['is_custom'] = $template->is_custom;
     628        }
     629
     630        if ( rest_is_field_included( 'author', $fields ) ) {
     631            $data['author'] = (int) $template->author;
    556632        }
    557633
     
    704780                    'readonly'    => true,
    705781                ),
     782                'origin'         => array(
     783                    'description' => __( 'Source of a customized template' ),
     784                    'type'        => 'string',
     785                    'context'     => array( 'embed', 'view', 'edit' ),
     786                    'readonly'    => true,
     787                ),
    706788                'content'        => array(
    707789                    'description' => __( 'Content of template.' ),
     
    767849                    'readonly'    => true,
    768850                ),
     851                'author' => array(
     852                    'description' => __( 'The ID for the author of the template.' ),
     853                    'type'        => 'integer',
     854                    'context'     => array( 'view', 'edit', 'embed' ),
     855                ),
    769856            ),
    770857        );
     858
     859        if ( 'wp_template' === $this->post_type ) {
     860            $schema['properties']['is_custom'] = array(
     861                'description' => __( 'Whether a template is a custom template.' ),
     862                'type'        => 'bool',
     863                'context'     => array( 'embed', 'view', 'edit' ),
     864                'readonly'    => true,
     865            );
     866        }
    771867
    772868        if ( 'wp_template_part' === $this->post_type ) {
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php

    r52051 r52275  
    321321            $id = WP_Theme_JSON_Resolver::get_user_custom_post_type_id();
    322322        } else {
    323             $wp_query_args       = array(
    324                 'post_status'    => 'publish',
    325                 'post_type'      => 'wp_global_styles',
    326                 'posts_per_page' => 1,
    327                 'no_found_rows'  => true,
    328                 'fields'         => 'ids',
    329                 'tax_query'      => array(
    330                     array(
    331                         'taxonomy' => 'wp_theme',
    332                         'field'    => 'name',
    333                         'terms'    => $theme->get_stylesheet(),
    334                     ),
    335                 ),
    336             );
    337             $global_styles_query = new WP_Query( $wp_query_args );
    338             $id                  = ! empty( $global_styles_query->posts ) ? array_shift( $global_styles_query->posts ) : null;
     323            $user_cpt = WP_Theme_JSON_Resolver::get_user_data_from_custom_post_type( $theme );
     324            $id       = isset( $user_cpt['ID'] ) ? $user_cpt['ID'] : null;
    339325        }
    340326
  • trunk/src/wp-includes/theme.json

    r52049 r52275  
    22    "version": 2,
    33    "settings": {
     4        "appearanceTools": false,
    45        "border": {
    56            "color": false,
     
    910        },
    1011        "color": {
     12            "background": true,
    1113            "custom": true,
    1214            "customDuotone": true,
    1315            "customGradient": true,
    14             "link": false,
    15             "background": true,
    16             "text": true,
     16            "defaultGradients": true,
     17            "defaultPalette": true,
    1718            "duotone": [
    1819                {
     
    119120                }
    120121            ],
     122            "link": false,
    121123            "palette": [
    122124                {
     
    180182                    "color": "#9b51e0"
    181183                }
    182             ]
     184            ],
     185            "text": true
    183186        },
    184187        "spacing": {
     
    191194            "customFontSize": true,
    192195            "dropCap": true,
     196            "fontSizes": [
     197                {
     198                    "name": "Small",
     199                    "slug": "small",
     200                    "size": "13px"
     201                },
     202                {
     203                    "name": "Normal",
     204                    "slug": "normal",
     205                    "size": "16px"
     206                },
     207                {
     208                    "name": "Medium",
     209                    "slug": "medium",
     210                    "size": "20px"
     211                },
     212                {
     213                    "name": "Large",
     214                    "slug": "large",
     215                    "size": "36px"
     216                },
     217                {
     218                    "name": "Huge",
     219                    "slug": "huge",
     220                    "size": "42px"
     221                }
     222            ],
    193223            "fontStyle": true,
    194224            "fontWeight": true,
     
    196226            "lineHeight": false,
    197227            "textDecoration": true,
    198             "textTransform": true,
    199             "fontSizes": [
    200                 {
    201                     "name": "Small",
    202                     "slug": "small",
    203                     "size": "13px"
    204                 },
    205                 {
    206                     "name": "Normal",
    207                     "slug": "normal",
    208                     "size": "16px"
    209                 },
    210                 {
    211                     "name": "Medium",
    212                     "slug": "medium",
    213                     "size": "20px"
    214                 },
    215                 {
    216                     "name": "Large",
    217                     "slug": "large",
    218                     "size": "36px"
    219                 },
    220                 {
    221                     "name": "Huge",
    222                     "slug": "huge",
    223                     "size": "42px"
    224                 }
    225             ]
     228            "textTransform": true
    226229        },
    227230        "blocks": {
  • trunk/tests/phpunit/tests/rest-api/wpRestTemplatesController.php

    r52186 r52275  
    5454    }
    5555
    56 
    5756    public function test_register_routes() {
    5857        $routes = rest_get_server()->get_routes();
     
    9493                'slug'           => 'my_template',
    9594                'source'         => 'custom',
     95                'origin'         => null,
    9696                'type'           => 'wp_template',
    9797                'description'    => 'Description of my template.',
     
    103103                'wp_id'          => self::$post->ID,
    104104                'has_theme_file' => false,
     105                'is_custom'      => true,
     106                'author'         => 0,
    105107            ),
    106108            $this->find_and_normalize_template_by_id( $data, 'default//my_template' )
     
    135137                'slug'           => 'my_template',
    136138                'source'         => 'custom',
     139                'origin'         => null,
    137140                'type'           => 'wp_template',
    138141                'description'    => 'Description of my template.',
     
    144147                'wp_id'          => self::$post->ID,
    145148                'has_theme_file' => false,
     149                'is_custom'      => true,
     150                'author'         => 0,
    146151            ),
    147152            $data
     153        );
     154    }
     155
     156    /**
     157     * @ticket 54507
     158     * @dataProvider get_template_endpoint_urls
     159     */
     160    public function test_get_item_works_with_a_single_slash( $endpoint_url ) {
     161        wp_set_current_user( self::$admin_id );
     162        $request  = new WP_REST_Request( 'GET', $endpoint_url );
     163        $response = rest_get_server()->dispatch( $request );
     164
     165        $data = $response->get_data();
     166        unset( $data['content'] );
     167        unset( $data['_links'] );
     168
     169        $this->assertSame(
     170            array(
     171                'id'             => 'default//my_template',
     172                'theme'          => 'default',
     173                'slug'           => 'my_template',
     174                'source'         => 'custom',
     175                'origin'         => null,
     176                'type'           => 'wp_template',
     177                'description'    => 'Description of my template.',
     178                'title'          => array(
     179                    'raw'      => 'My Template',
     180                    'rendered' => 'My Template',
     181                ),
     182                'status'         => 'publish',
     183                'wp_id'          => self::$post->ID,
     184                'has_theme_file' => false,
     185                'is_custom'      => true,
     186                'author'         => 0,
     187            ),
     188            $data
     189        );
     190    }
     191
     192    public function get_template_endpoint_urls() {
     193        return array(
     194            array( '/wp/v2/templates/default/my_template' ),
     195            array( '/wp/v2/templates/default//my_template' ),
     196        );
     197    }
     198
     199    /**
     200     * @ticket 54507
     201     * @dataProvider get_template_ids_to_sanitize
     202     */
     203    public function test_sanitize_template_id( $input_id, $sanitized_id ) {
     204        $endpoint = new WP_REST_Templates_Controller( 'wp_template' );
     205        $this->assertEquals(
     206            $sanitized_id,
     207            $endpoint->_sanitize_template_id( $input_id )
     208        );
     209    }
     210
     211    public function get_template_ids_to_sanitize() {
     212        return array(
     213            array( 'tt1-blocks/index', 'tt1-blocks//index' ),
     214            array( 'tt1-blocks//index', 'tt1-blocks//index' ),
     215
     216            array( 'theme-experiments/tt1-blocks/index', 'theme-experiments/tt1-blocks//index' ),
     217            array( 'theme-experiments/tt1-blocks//index', 'theme-experiments/tt1-blocks//index' ),
    148218        );
    149219    }
     
    162232                'title'       => 'My Template',
    163233                'content'     => 'Content',
     234                'author'      => self::$admin_id,
    164235            )
    165236        );
     
    178249                'slug'           => 'my_custom_template',
    179250                'source'         => 'custom',
     251                'origin'         => null,
    180252                'type'           => 'wp_template',
    181253                'description'    => 'Just a description',
     
    186258                'status'         => 'publish',
    187259                'has_theme_file' => false,
     260                'is_custom'      => true,
     261                'author'         => self::$admin_id,
    188262            ),
    189263            $data
     
    208282                    'raw' => 'Content',
    209283                ),
     284                'author'      => self::$admin_id,
    210285            )
    211286        );
     
    224299                'slug'           => 'my_custom_template_raw',
    225300                'source'         => 'custom',
     301                'origin'         => null,
    226302                'type'           => 'wp_template',
    227303                'description'    => 'Just a description',
     
    232308                'status'         => 'publish',
    233309                'has_theme_file' => false,
     310                'is_custom'      => true,
     311                'author'         => self::$admin_id,
    234312            ),
    235313            $data
    236314        );
     315    }
     316
     317    public function test_create_item_invalid_author() {
     318        wp_set_current_user( self::$admin_id );
     319        $request = new WP_REST_Request( 'POST', '/wp/v2/templates' );
     320        $request->set_body_params(
     321            array(
     322                'slug'        => 'my_custom_template_invalid_author',
     323                'description' => 'Just a description',
     324                'title'       => 'My Template',
     325                'content'     => 'Content',
     326                'author'      => -1,
     327            )
     328        );
     329        $response = rest_get_server()->dispatch( $request );
     330        $this->assertErrorResponse( 'rest_invalid_author', $response, 400 );
    237331    }
    238332
     
    371465        $data       = $response->get_data();
    372466        $properties = $data['schema']['properties'];
    373         $this->assertCount( 11, $properties );
     467        $this->assertCount( 14, $properties );
    374468        $this->assertArrayHasKey( 'id', $properties );
    375469        $this->assertArrayHasKey( 'description', $properties );
     
    378472        $this->assertArrayHasKey( 'type', $properties );
    379473        $this->assertArrayHasKey( 'source', $properties );
     474        $this->assertArrayHasKey( 'origin', $properties );
    380475        $this->assertArrayHasKey( 'content', $properties );
    381476        $this->assertArrayHasKey( 'title', $properties );
     
    384479        $this->assertArrayHasKey( 'wp_id', $properties );
    385480        $this->assertArrayHasKey( 'has_theme_file', $properties );
     481        $this->assertArrayHasKey( 'is_custom', $properties );
     482        $this->assertArrayHasKey( 'author', $properties );
    386483    }
    387484
  • trunk/tests/phpunit/tests/theme/wpThemeJson.php

    r52232 r52275  
    201201    }
    202202
     203    function test_get_settings_using_opt_in_key() {
     204        $theme_json = new WP_Theme_JSON(
     205            array(
     206                'version'  => WP_Theme_JSON::LATEST_SCHEMA,
     207                'settings' => array(
     208                    'appearanceTools' => true,
     209                    'blocks'          => array(
     210                        'core/paragraph' => array(
     211                            'typography' => array(
     212                                'lineHeight' => false,
     213                            ),
     214                        ),
     215                        'core/group'     => array(
     216                            'appearanceTools' => true,
     217                            'typography'      => array(
     218                                'lineHeight' => false, // This should override appearanceTools.
     219                            ),
     220                        ),
     221                    ),
     222                ),
     223            )
     224        );
     225
     226        $actual   = $theme_json->get_settings();
     227        $expected = array(
     228            'border'     => array(
     229                'width'  => true,
     230                'style'  => true,
     231                'radius' => true,
     232                'color'  => true,
     233            ),
     234            'color'      => array(
     235                'link' => true,
     236            ),
     237            'spacing'    => array(
     238                'blockGap' => true,
     239                'margin'   => true,
     240                'padding'  => true,
     241            ),
     242            'typography' => array(
     243                'lineHeight' => true,
     244            ),
     245            'blocks'     => array(
     246                'core/paragraph' => array(
     247                    'typography' => array(
     248                        'lineHeight' => false,
     249                    ),
     250                ),
     251                'core/group'     => array(
     252                    'border'     => array(
     253                        'width'  => true,
     254                        'style'  => true,
     255                        'radius' => true,
     256                        'color'  => true,
     257                    ),
     258                    'color'      => array(
     259                        'link' => true,
     260                    ),
     261                    'spacing'    => array(
     262                        'blockGap' => true,
     263                        'margin'   => true,
     264                        'padding'  => true,
     265                    ),
     266                    'typography' => array(
     267                        'lineHeight' => false,
     268                    ),
     269                ),
     270            ),
     271        );
     272
     273        $this->assertEqualSetsWithIndex( $expected, $actual );
     274    }
     275
    203276    /**
    204277     * @ticket 54336
     
    10611134    }
    10621135
     1136    public function test_merge_incoming_data_removes_theme_presets_with_slugs_as_default_presets() {
     1137        $defaults = new WP_Theme_JSON(
     1138            array(
     1139                'version'  => WP_Theme_JSON::LATEST_SCHEMA,
     1140                'settings' => array(
     1141                    'color'  => array(
     1142                        'palette' => array(
     1143                            array(
     1144                                'slug'  => 'red',
     1145                                'color' => 'red',
     1146                                'name'  => 'Red',
     1147                            ),
     1148                            array(
     1149                                'slug'  => 'green',
     1150                                'color' => 'green',
     1151                                'name'  => 'Green',
     1152                            ),
     1153                        ),
     1154                    ),
     1155                    'blocks' => array(
     1156                        'core/paragraph' => array(
     1157                            'color' => array(
     1158                                'palette' => array(
     1159                                    array(
     1160                                        'slug'  => 'blue',
     1161                                        'color' => 'blue',
     1162                                        'name'  => 'Blue',
     1163                                    ),
     1164                                ),
     1165                            ),
     1166                        ),
     1167                    ),
     1168                ),
     1169            ),
     1170            'default'
     1171        );
     1172        $theme    = new WP_Theme_JSON(
     1173            array(
     1174                'version'  => WP_Theme_JSON::LATEST_SCHEMA,
     1175                'settings' => array(
     1176                    'color'  => array(
     1177                        'palette' => array(
     1178                            array(
     1179                                'slug'  => 'pink',
     1180                                'color' => 'pink',
     1181                                'name'  => 'Pink',
     1182                            ),
     1183                            array(
     1184                                'slug'  => 'green',
     1185                                'color' => 'green',
     1186                                'name'  => 'Greenish',
     1187                            ),
     1188                        ),
     1189                    ),
     1190                    'blocks' => array(
     1191                        'core/paragraph' => array(
     1192                            'color' => array(
     1193                                'palette' => array(
     1194                                    array(
     1195                                        'slug'  => 'blue',
     1196                                        'color' => 'blue',
     1197                                        'name'  => 'Bluish',
     1198                                    ),
     1199                                    array(
     1200                                        'slug'  => 'yellow',
     1201                                        'color' => 'yellow',
     1202                                        'name'  => 'Yellow',
     1203                                    ),
     1204                                    array(
     1205                                        'slug'  => 'green',
     1206                                        'color' => 'green',
     1207                                        'name'  => 'Block Green',
     1208                                    ),
     1209                                ),
     1210                            ),
     1211                        ),
     1212                    ),
     1213                ),
     1214            )
     1215        );
     1216
     1217        $expected = array(
     1218            'version'  => WP_Theme_JSON::LATEST_SCHEMA,
     1219            'settings' => array(
     1220                'color'  => array(
     1221                    'palette' => array(
     1222                        'default' => array(
     1223                            array(
     1224                                'slug'  => 'red',
     1225                                'color' => 'red',
     1226                                'name'  => 'Red',
     1227                            ),
     1228                            array(
     1229                                'slug'  => 'green',
     1230                                'color' => 'green',
     1231                                'name'  => 'Green',
     1232                            ),
     1233                        ),
     1234                        'theme'   => array(
     1235                            array(
     1236                                'slug'  => 'pink',
     1237                                'color' => 'pink',
     1238                                'name'  => 'Pink',
     1239                            ),
     1240                        ),
     1241                    ),
     1242                ),
     1243                'blocks' => array(
     1244                    'core/paragraph' => array(
     1245                        'color' => array(
     1246                            'palette' => array(
     1247                                'default' => array(
     1248                                    array(
     1249                                        'slug'  => 'blue',
     1250                                        'color' => 'blue',
     1251                                        'name'  => 'Blue',
     1252                                    ),
     1253                                ),
     1254                                'theme'   => array(
     1255                                    array(
     1256                                        'slug'  => 'yellow',
     1257                                        'color' => 'yellow',
     1258                                        'name'  => 'Yellow',
     1259                                    ),
     1260                                ),
     1261                            ),
     1262                        ),
     1263                    ),
     1264                ),
     1265            ),
     1266        );
     1267
     1268        $defaults->merge( $theme );
     1269        $actual = $defaults->get_raw_data();
     1270
     1271        $this->assertEqualSetsWithIndex( $expected, $actual );
     1272    }
     1273
    10631274    /**
    10641275     * @ticket 54336
     
    12991510                        'custom'  => true,
    13001511                        'palette' => array(
    1301                             'user' => array(
     1512                            'custom' => array(
    13021513                                array(
    13031514                                    'name'  => 'Red',
     
    13261537                                'custom'  => true,
    13271538                                'palette' => array(
    1328                                     'user' => array(
     1539                                    'custom' => array(
    13291540                                        array(
    13301541                                            'name'  => 'Yellow',
     
    13591570                'color'  => array(
    13601571                    'palette' => array(
    1361                         'user' => array(
     1572                        'custom' => array(
    13621573                            array(
    13631574                                'name'  => 'Red',
     
    13821593                        'color' => array(
    13831594                            'palette' => array(
    1384                                 'user' => array(
     1595                                'custom' => array(
    13851596                                    array(
    13861597                                        'name'  => 'Yellow',
     
    14181629                    'color'      => array(
    14191630                        'palette' => array(
    1420                             'user' => array(
     1631                            'custom' => array(
    14211632                                array(
    14221633                                    'name'  => 'Red/><b>ok</ok>',
     
    14441655                    'typography' => array(
    14451656                        'fontFamilies' => array(
    1446                             'user' => array(
     1657                            'custom' => array(
    14471658                                array(
    14481659                                    'name'       => 'Helvetica Arial/><b>test</b>',
     
    14721683                            'color' => array(
    14731684                                'palette' => array(
    1474                                     'user' => array(
     1685                                    'custom' => array(
    14751686                                        array(
    14761687                                            'name'  => 'Red/><b>ok</ok>',
     
    15071718                'color'      => array(
    15081719                    'palette' => array(
    1509                         'user' => array(
     1720                        'custom' => array(
    15101721                            array(
    15111722                                'name'  => 'Pink',
     
    15181729                'typography' => array(
    15191730                    'fontFamilies' => array(
    1520                         'user' => array(
     1731                        'custom' => array(
    15211732                            array(
    15221733                                'name'       => 'Cambria',
     
    15311742                        'color' => array(
    15321743                            'palette' => array(
    1533                                 'user' => array(
     1744                                'custom' => array(
    15341745                                    array(
    15351746                                        'name'  => 'Pink',
  • trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php

    r52232 r52275  
    2525        add_filter( 'stylesheet_root', array( $this, 'filter_set_theme_root' ) );
    2626        add_filter( 'template_root', array( $this, 'filter_set_theme_root' ) );
     27        $this->queries = array();
    2728        // Clear caches.
    2829        wp_clean_themes_cache();
     
    4344    public function filter_set_locale_to_polish() {
    4445        return 'pl_PL';
     46    }
     47
     48    function filter_db_query( $query ) {
     49        if ( preg_match( '#post_type = \'wp_global_styles\'#', $query ) ) {
     50            $this->queries[] = $query;
     51        }
     52        return $query;
    4553    }
    4654
     
    313321        );
    314322    }
     323
     324    function test_get_user_data_from_custom_post_type_does_not_use_uncached_queries() {
     325        add_filter( 'query', array( $this, 'filter_db_query' ) );
     326        $query_count = count( $this->queries );
     327        for ( $i = 0; $i < 3; $i++ ) {
     328            WP_Theme_JSON_Resolver::get_user_data_from_custom_post_type( wp_get_theme() );
     329            WP_Theme_JSON_Resolver::clean_cached_data();
     330        }
     331        $query_count = count( $this->queries ) - $query_count;
     332        $this->assertEquals( 1, $query_count, 'Only one SQL query should be peformed for multiple invocations of WP_Theme_JSON_Resolver::get_user_data_from_custom_post_type()' );
     333
     334        $user_cpt = WP_Theme_JSON_Resolver::get_user_data_from_custom_post_type( wp_get_theme() );
     335        $this->assertEmpty( $user_cpt );
     336
     337        $user_cpt = WP_Theme_JSON_Resolver::get_user_data_from_custom_post_type( wp_get_theme(), true );
     338        $this->assertNotEmpty( $user_cpt );
     339
     340        $query_count = count( $this->queries );
     341        for ( $i = 0; $i < 3; $i++ ) {
     342            WP_Theme_JSON_Resolver::get_user_data_from_custom_post_type( wp_get_theme() );
     343            WP_Theme_JSON_Resolver::clean_cached_data();
     344        }
     345        $query_count = count( $this->queries ) - $query_count;
     346        $this->assertEquals( 0, $query_count, 'Unexpected SQL queries detected for the wp_global_style post type' );
     347        remove_filter( 'query', array( $this, 'filter_db_query' ) );
     348    }
    315349}
  • trunk/tests/qunit/fixtures/wp-api-generated.js

    r52272 r52275  
    51185118                            ],
    51195119                            "required": false
     5120                        },
     5121                        "author": {
     5122                            "description": "The ID for the author of the template.",
     5123                            "type": "integer",
     5124                            "required": false
    51205125                        }
    51215126                    }
     
    52635268                            ],
    52645269                            "required": false
     5270                        },
     5271                        "author": {
     5272                            "description": "The ID for the author of the template.",
     5273                            "type": "integer",
     5274                            "required": false
    52655275                        }
    52665276                    }
     
    55725582                            ],
    55735583                            "required": false
     5584                        },
     5585                        "author": {
     5586                            "description": "The ID for the author of the template.",
     5587                            "type": "integer",
     5588                            "required": false
    55745589                        }
    55755590                    }
     
    57515766                            "required": false
    57525767                        },
     5768                        "author": {
     5769                            "description": "The ID for the author of the template.",
     5770                            "type": "integer",
     5771                            "required": false
     5772                        },
    57535773                        "area": {
    57545774                            "description": "Where the template part is intended for use (header, footer, etc.)",
     
    59015921                            "required": false
    59025922                        },
     5923                        "author": {
     5924                            "description": "The ID for the author of the template.",
     5925                            "type": "integer",
     5926                            "required": false
     5927                        },
    59035928                        "area": {
    59045929                            "description": "Where the template part is intended for use (header, footer, etc.)",
     
    62136238                                "private"
    62146239                            ],
     6240                            "required": false
     6241                        },
     6242                        "author": {
     6243                            "description": "The ID for the author of the template.",
     6244                            "type": "integer",
    62156245                            "required": false
    62166246                        },
Note: See TracChangeset for help on using the changeset viewer.