<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[52275] trunk: Update @wordpress packages</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/52275">52275</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/52275","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>noisysocks</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2021-11-30 00:22:30 +0000 (Tue, 30 Nov 2021)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>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 <a href="https://core.trac.wordpress.org/ticket/54487">#54487</a>.
Props talldanwp, mamaduka, oandregal.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkpackagelockjson">trunk/package-lock.json</a></li>
<li><a href="#trunkpackagejson">trunk/package.json</a></li>
<li><a href="#trunksrcwpadminsiteeditorphp">trunk/src/wp-admin/site-editor.php</a></li>
<li><a href="#trunksrcwpincludesassetsscriptloaderpackagesphp">trunk/src/wp-includes/assets/script-loader-packages.php</a></li>
<li><a href="#trunksrcwpincludesblockeditorphp">trunk/src/wp-includes/block-editor.php</a></li>
<li><a href="#trunksrcwpincludesblocktemplateutilsphp">trunk/src/wp-includes/block-template-utils.php</a></li>
<li><a href="#trunksrcwpincludesblockscalendarphp">trunk/src/wp-includes/blocks/calendar.php</a></li>
<li><a href="#trunksrcwpincludesblocksnavigationblockjson">trunk/src/wp-includes/blocks/navigation/block.json</a></li>
<li><a href="#trunksrcwpincludesblocksnavigationviewassetphp">trunk/src/wp-includes/blocks/navigation/view.asset.php</a></li>
<li><a href="#trunksrcwpincludesblocksnavigationviewminassetphp">trunk/src/wp-includes/blocks/navigation/view.min.asset.php</a></li>
<li><a href="#trunksrcwpincludesblocksnavigationphp">trunk/src/wp-includes/blocks/navigation.php</a></li>
<li><a href="#trunksrcwpincludesblockspagelistphp">trunk/src/wp-includes/blocks/page-list.php</a></li>
<li><a href="#trunksrcwpincludesblockspatternblockjson">trunk/src/wp-includes/blocks/pattern/block.json</a></li>
<li><a href="#trunksrcwpincludesblocksposttermsblockjson">trunk/src/wp-includes/blocks/post-terms/block.json</a></li>
<li><a href="#trunksrcwpincludesblocksquerytitleblockjson">trunk/src/wp-includes/blocks/query-title/block.json</a></li>
<li><a href="#trunksrcwpincludesblockssitelogoblockjson">trunk/src/wp-includes/blocks/site-logo/block.json</a></li>
<li><a href="#trunksrcwpincludesblockssitelogoeditorrtlcss">trunk/src/wp-includes/blocks/site-logo/editor-rtl.css</a></li>
<li><a href="#trunksrcwpincludesblockssitelogoeditorrtlmincss">trunk/src/wp-includes/blocks/site-logo/editor-rtl.min.css</a></li>
<li><a href="#trunksrcwpincludesblockssitelogoeditorcss">trunk/src/wp-includes/blocks/site-logo/editor.css</a></li>
<li><a href="#trunksrcwpincludesblockssitelogoeditormincss">trunk/src/wp-includes/blocks/site-logo/editor.min.css</a></li>
<li><a href="#trunksrcwpincludesblockssitetaglineblockjson">trunk/src/wp-includes/blocks/site-tagline/block.json</a></li>
<li><a href="#trunksrcwpincludesblockssitetitleblockjson">trunk/src/wp-includes/blocks/site-title/block.json</a></li>
<li><a href="#trunksrcwpincludesblockstemplatepartblockjson">trunk/src/wp-includes/blocks/template-part/block.json</a></li>
<li><a href="#trunksrcwpincludesblockstemplatepartphp">trunk/src/wp-includes/blocks/template-part.php</a></li>
<li><a href="#trunksrcwpincludesclasswpblocktemplatephp">trunk/src/wp-includes/class-wp-block-template.php</a></li>
<li><a href="#trunksrcwpincludesclasswpthemejsonresolverphp">trunk/src/wp-includes/class-wp-theme-json-resolver.php</a></li>
<li><a href="#trunksrcwpincludesclasswpthemejsonphp">trunk/src/wp-includes/class-wp-theme-json.php</a></li>
<li><a href="#trunksrcwpincludesglobalstylesandsettingsphp">trunk/src/wp-includes/global-styles-and-settings.php</a></li>
<li><a href="#trunksrcwpincludespostphp">trunk/src/wp-includes/post.php</a></li>
<li><a href="#trunksrcwpincludesrestapiendpointsclasswprestglobalstylescontrollerphp">trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php</a></li>
<li><a href="#trunksrcwpincludesrestapiendpointsclasswpresttemplatescontrollerphp">trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php</a></li>
<li><a href="#trunksrcwpincludesrestapiendpointsclasswprestthemescontrollerphp">trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php</a></li>
<li><a href="#trunksrcwpincludesthemejson">trunk/src/wp-includes/theme.json</a></li>
<li><a href="#trunktestsphpunittestsrestapiwpRestTemplatesControllerphp">trunk/tests/phpunit/tests/rest-api/wpRestTemplatesController.php</a></li>
<li><a href="#trunktestsphpunitteststhemewpThemeJsonphp">trunk/tests/phpunit/tests/theme/wpThemeJson.php</a></li>
<li><a href="#trunktestsphpunitteststhemewpThemeJsonResolverphp">trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php</a></li>
<li><a href="#trunktestsqunitfixtureswpapigeneratedjs">trunk/tests/qunit/fixtures/wp-api-generated.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkpackagelockjson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/package-lock.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/package-lock.json 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/package-lock.json 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1452,9 +1452,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ=="
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@emotion/react": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "11.6.0",
- "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.6.0.tgz",
- "integrity": "sha512-23MnRZFBN9+D1lHXC5pD6z4X9yhPxxtHr6f+iTGz6Fv6Rda0GdefPrsHL7otsEf+//7uqCdT5QtHeRxHCERzuw==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "11.7.0",
+ "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.7.0.tgz",
+ "integrity": "sha512-WL93hf9+/2s3cA1JVJlz8+Uy6p6QWukqQFOm2OZO5ki51hfucHMOmbSjiyC3t2Y4RI8XUmBoepoc/24ny/VBbA==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.13.10",
</span><span class="cx" style="display: block; padding: 0 10px"> "@emotion/cache": "^11.6.0",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2258,14 +2258,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "dev": true
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@popperjs/core": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "2.10.2",
- "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.10.2.tgz",
- "integrity": "sha512-IXf3XA7+XyN7CP9gGh/XB0UxVMlvARGEgGXLubFICsUMGz6Q+DU+i4gGlpOxTjKvXjkJDJC8YdqdKkDj9qZHEQ=="
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "2.11.0",
+ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.0.tgz",
+ "integrity": "sha512-zrsUxjLOKAzdewIDRWy9nsV1GQsKBCWaGwsZQlCgr6/q+vjyZhFgqedLfFBuI9anTPEUT4APq9Mu0SZBTzIcGQ=="
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@react-spring/animated": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "9.3.0",
- "resolved": "https://registry.npmjs.org/@react-spring/animated/-/animated-9.3.0.tgz",
- "integrity": "sha512-QvuyW77eDvLhdJyO6FFldlWlvnuKK2cpOx4+Zr962RyT/0IO1tbNDRO6G1vM8va6mbv6tmfYmRGKmKYePN3kVg==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "9.3.1",
+ "resolved": "https://registry.npmjs.org/@react-spring/animated/-/animated-9.3.1.tgz",
+ "integrity": "sha512-23YaERZ++BwZ8F8PxPFqrpOwp/JZun1Pj6aHZtPAU42j5LycBRasT9XMw7Eyr7zNFhT+rl3R3wFfd4WX6Ax+UA==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@react-spring/shared": "~9.3.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@react-spring/types": "~9.3.0"
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2272,9 +2272,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@react-spring/core": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "9.3.0",
- "resolved": "https://registry.npmjs.org/@react-spring/core/-/core-9.3.0.tgz",
- "integrity": "sha512-SZQOIX7wkIagmucAi7zxqGGIb9A60o9n5922UrWo8Kl3FdG7FgrNwqr0kOI43/pMFeL70/PXwFhBatB03N5ctw==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "9.3.1",
+ "resolved": "https://registry.npmjs.org/@react-spring/core/-/core-9.3.1.tgz",
+ "integrity": "sha512-8rmfmEHLHGtF1CUiXRn64YJqsXNxv2cGX8oNnBnsuoE33c48Zc34t2VIMB4R9q5zwIUCvDBGfiEenA8ZAPxqOQ==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@react-spring/animated": "~9.3.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@react-spring/shared": "~9.3.0",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2282,14 +2282,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@react-spring/rafz": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "9.3.0",
- "resolved": "https://registry.npmjs.org/@react-spring/rafz/-/rafz-9.3.0.tgz",
- "integrity": "sha512-FD04d2TNb3xOZ6+04qwDmC3d0H4X6gvhsxU71/nSm4PPYRqFzZEolcVPmrHlbGzco3bvXKI+Kp2pIrpXLPUJFA=="
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "9.3.1",
+ "resolved": "https://registry.npmjs.org/@react-spring/rafz/-/rafz-9.3.1.tgz",
+ "integrity": "sha512-fEBMCarGVl+/2kdO+g6Zig4F+3ymwmcGN8S71gb1c7Cbbxb87kviPz8EhshfIHoiLeJPGlqwcuGbxNmZbBamvA=="
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@react-spring/shared": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "9.3.0",
- "resolved": "https://registry.npmjs.org/@react-spring/shared/-/shared-9.3.0.tgz",
- "integrity": "sha512-7ZFY2Blu/wxbLGcYvQavyLUVi9bK/is1bsn11qZ9AaZb4iucRyIf2jgjBfKZFCq4qgi7S/7QmDQG7sucUyLELg==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "9.3.1",
+ "resolved": "https://registry.npmjs.org/@react-spring/shared/-/shared-9.3.1.tgz",
+ "integrity": "sha512-jhPpxzURGo6Nty90ex1lkxmZae7w/VAbnGmb/nXcYoZwSoNR+W2aAd00iXsh2ZGz6MgoJOsc495JeG3uC7Am8A==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@react-spring/rafz": "~9.3.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@react-spring/types": "~9.3.0"
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2296,14 +2296,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@react-spring/types": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "9.3.0",
- "resolved": "https://registry.npmjs.org/@react-spring/types/-/types-9.3.0.tgz",
- "integrity": "sha512-q4cDr2RSPblXMD3Rxvk6qcC7nmhhfV2izEBP06hb8ZCXznA6qJirG3RMpi29kBtEQiw1lWR59hAXKhauaPtbOA=="
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "9.3.1",
+ "resolved": "https://registry.npmjs.org/@react-spring/types/-/types-9.3.1.tgz",
+ "integrity": "sha512-W/YMJMX35XgGGzX0gKORBTwnvQ+1loDOFN3XlZkW5fgpEY+7VkRUpPyqPWXQr3n6lHrsLmHIGdpznqZi54ACTQ=="
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@react-spring/web": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "9.3.0",
- "resolved": "https://registry.npmjs.org/@react-spring/web/-/web-9.3.0.tgz",
- "integrity": "sha512-OTAGKRdyz6fLRR1tABFyw9KMpytyATIndQrj0O6RG47GfjiInpf4+WZKxo763vpS7z1OlnkI81WLUm/sqOqAnA==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "9.3.1",
+ "resolved": "https://registry.npmjs.org/@react-spring/web/-/web-9.3.1.tgz",
+ "integrity": "sha512-sisZIgFGva/Z+xKWPSfXpukF0AP3kR9ALTxlHL87fVotMUCJX5vtH/YlVcywToEFwTHKt3MpI5Wy2M+vgVEeaw==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@react-spring/animated": "~9.3.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@react-spring/core": "~9.3.0",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3529,21 +3529,21 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/block-directory": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "3.0.11",
- "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-3.0.11.tgz",
- "integrity": "sha512-zSFsm+yUcrgZSWQVXWPd8jp+K1Lf/S5JITUp1cKReae9hhHgvmEpQydmWNGgjIadeALpcka5j0JIe2AJAqGeBA==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "3.0.12",
+ "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-3.0.12.tgz",
+ "integrity": "sha512-nZqGheHJ1lapCacPgz+pnk2Rb7i6EmJHLSsAh06Om9lXo3ARph1bhnHlS7KME0zADtam7uHteKYE8oSn0jTLcg==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.16.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/a11y": "^3.2.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/api-fetch": "^5.2.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/block-editor": "^8.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/block-editor": "^8.0.6",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/blocks": "^11.1.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/components": "^19.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/components": "^19.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/compose": "^5.0.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/core-data": "^4.0.7",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/core-data": "^4.0.8",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data": "^6.1.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/edit-post": "^5.0.11",
- "@wordpress/editor": "^12.0.8",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/edit-post": "^5.0.12",
+ "@wordpress/editor": "^12.0.9",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/element": "^4.0.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/hooks": "^3.2.2",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/html-entities": "^3.2.3",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3556,9 +3556,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/block-editor": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "8.0.5",
- "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-8.0.5.tgz",
- "integrity": "sha512-s5kmYFizQlf2K2JXaI5Iw3Zo8mYa6sCw0BMDt9Z+67NNyAvsbf9jPA6Uw80yRsCVcjz+cYcgHv3+Tcz9a6VrUw==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "8.0.6",
+ "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-8.0.6.tgz",
+ "integrity": "sha512-t5AL0nQuakopOoH2RgVflGvBwik+IvqRd2UOQsjVNeCIZLpbI4up9QYHtBidoqu4Zye6aGsL5LMDt7bWmWhn9A==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.16.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@react-spring/web": "^9.2.4",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3567,7 +3567,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/blob": "^3.2.2",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/block-serialization-default-parser": "^4.2.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/blocks": "^11.1.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/components": "^19.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/components": "^19.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/compose": "^5.0.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data": "^6.1.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/deprecated": "^3.2.3",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3603,9 +3603,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/block-library": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "6.0.9",
- "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-6.0.9.tgz",
- "integrity": "sha512-5etkM+WKn7jUlZsSiuA6jVBFlBvxn5szu5Shr6GbLnuUwh2pEhj/BY/aqXcyjNXcoUT2WmURcCPBjclgm2CvBA==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "6.0.10",
+ "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-6.0.10.tgz",
+ "integrity": "sha512-4FVKwUU+ed9oOpk8v8iHq2ZZvmW3AN/dzZ9AAv8ywqoU8IEvw0WjSI87WABT9414w63wE275X7M5Q2eja44ahg==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.16.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/a11y": "^3.2.4",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3612,11 +3612,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/api-fetch": "^5.2.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/autop": "^3.2.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/blob": "^3.2.2",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/block-editor": "^8.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/block-editor": "^8.0.6",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/blocks": "^11.1.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/components": "^19.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/components": "^19.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/compose": "^5.0.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/core-data": "^4.0.7",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/core-data": "^4.0.8",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data": "^6.1.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/date": "^4.2.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/deprecated": "^3.2.3",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3627,14 +3627,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/html-entities": "^3.2.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/i18n": "^4.2.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/icons": "^6.1.1",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/interface": "^4.1.7",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/interface": "^4.1.8",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/is-shallow-equal": "^4.2.1",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/keycodes": "^3.2.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/notices": "^3.2.7",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/primitives": "^3.0.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/reusable-blocks": "^3.0.11",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/reusable-blocks": "^3.0.12",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/rich-text": "^5.0.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/server-side-render": "^3.0.9",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/server-side-render": "^3.0.10",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/url": "^3.3.1",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/viewport": "^4.0.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "classnames": "^2.3.1",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3689,9 +3689,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "dev": true
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/components": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "19.0.5",
- "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-19.0.5.tgz",
- "integrity": "sha512-xtXTpPvmByVPjIWWo/v8ZzVsEtx9dq6bsdOOkDTnFFUXTcgxJb12RmgbsDR+E/L+z9IwuGxLwt08EGrWWvKF6w==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "19.1.0",
+ "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-19.1.0.tgz",
+ "integrity": "sha512-34hYwy3vtsWHdFFvE6cPlV6KxKMa4uaY2dvZlJ++QMVA24geGRfwtM1ZvGgs9fVjo0koC332sN2LGS7wx6aXew==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.16.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@emotion/cache": "^11.4.0",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3755,9 +3755,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/core-data": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "4.0.7",
- "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-4.0.7.tgz",
- "integrity": "sha512-N9za/cxd3KiZsHZj5kcD4zYcPgv7PdCQQx0GB5rBzceYzgON/WG3Y/QhoFHFwEw5OOpBIcSKehV975VByRD+qA==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-4.0.8.tgz",
+ "integrity": "sha512-nv7lXFU+7kdPhoD/Cz5oi6Xu1ODPRDwoMYYpIPB2nEfLi6foleDxhUuib9unwAtvUKNtQnrClDesys7l6pXMwQ==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.16.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/api-fetch": "^5.2.6",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3785,18 +3785,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/customize-widgets": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "2.0.11",
- "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-2.0.11.tgz",
- "integrity": "sha512-3HSHChnMtT7JCXaITzDgM0zwbDopL3CNofhCJf/lQR//msiLiFK2MzjZrgJdQXTzVcPN7fXgIsf5cFJeHsuADg==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "2.0.12",
+ "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-2.0.12.tgz",
+ "integrity": "sha512-83/LFQo7UJ8X2B+yiByRJKWHJV4jpfHsT7RZDg5Vd06bR/UXbM7d8TCCYDvUgn0HuadGM+XcFxxhfYUTm68yHA==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.16.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/a11y": "^3.2.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/block-editor": "^8.0.5",
- "@wordpress/block-library": "^6.0.9",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/block-editor": "^8.0.6",
+ "@wordpress/block-library": "^6.0.10",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/blocks": "^11.1.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/components": "^19.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/components": "^19.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/compose": "^5.0.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/core-data": "^4.0.7",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/core-data": "^4.0.8",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data": "^6.1.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/dom": "^3.2.7",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/element": "^4.0.4",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3803,12 +3803,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/hooks": "^3.2.2",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/i18n": "^4.2.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/icons": "^6.1.1",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/interface": "^4.1.7",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/interface": "^4.1.8",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/is-shallow-equal": "^4.2.1",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/keyboard-shortcuts": "^3.0.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/keycodes": "^3.2.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/media-utils": "^3.0.5",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/widgets": "^2.0.11",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/widgets": "^2.0.12",
</ins><span class="cx" style="display: block; padding: 0 10px"> "classnames": "^2.3.1",
</span><span class="cx" style="display: block; padding: 0 10px"> "lodash": "^4.17.21"
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3937,27 +3937,27 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/edit-post": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "5.0.11",
- "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-5.0.11.tgz",
- "integrity": "sha512-UVFve7ETYdJjDm2TgAJKOxiRmoTYNu75fkbvTluxnKbvWKDXzY0QCpw47JY4g+JmYBRda6ZGV51eY5P5G5BZ6Q==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "5.0.12",
+ "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-5.0.12.tgz",
+ "integrity": "sha512-A2nt6LXdVcVqUay08P1W0J2t9vUmoxOkZPH4qKhBhUlMfmHKtyqMBiNQFui9drPMWVUb5HB3zsUmlAWsv429Vw==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.16.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/a11y": "^3.2.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/api-fetch": "^5.2.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/block-editor": "^8.0.5",
- "@wordpress/block-library": "^6.0.9",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/block-editor": "^8.0.6",
+ "@wordpress/block-library": "^6.0.10",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/blocks": "^11.1.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/components": "^19.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/components": "^19.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/compose": "^5.0.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/core-data": "^4.0.7",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/core-data": "^4.0.8",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data": "^6.1.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data-controls": "^2.2.7",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/editor": "^12.0.8",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/editor": "^12.0.9",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/element": "^4.0.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/hooks": "^3.2.2",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/i18n": "^4.2.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/icons": "^6.1.1",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/interface": "^4.1.7",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/interface": "^4.1.8",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/keyboard-shortcuts": "^3.0.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/keycodes": "^3.2.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/media-utils": "^3.0.5",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3982,28 +3982,28 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/edit-site": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "3.0.11",
- "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-3.0.11.tgz",
- "integrity": "sha512-jwCXMVDg6ucNOur1lpQBDlXNuUv6RzpOK/I2rfhw9Cqv0DyFfWSL6NIxMZFuqfyhCeqnUaz/GT/CVgghx5Ssvw==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "3.0.12",
+ "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-3.0.12.tgz",
+ "integrity": "sha512-Uxn7mLNCdvND/4ZuMKiNSBSD09hDAdjYsCZDAnZ3HE0lc1DrCQFI8lF911JSYWY2fmiTbAhqGBKHOci7XK4b3A==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.16.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/a11y": "^3.2.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/api-fetch": "^5.2.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/block-editor": "^8.0.5",
- "@wordpress/block-library": "^6.0.9",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/block-editor": "^8.0.6",
+ "@wordpress/block-library": "^6.0.10",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/blocks": "^11.1.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/components": "^19.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/components": "^19.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/compose": "^5.0.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/core-data": "^4.0.7",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/core-data": "^4.0.8",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data": "^6.1.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data-controls": "^2.2.7",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/editor": "^12.0.8",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/editor": "^12.0.9",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/element": "^4.0.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/hooks": "^3.2.2",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/html-entities": "^3.2.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/i18n": "^4.2.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/icons": "^6.1.1",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/interface": "^4.1.7",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/interface": "^4.1.8",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/keyboard-shortcuts": "^3.0.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/keycodes": "^3.2.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/media-utils": "^3.0.5",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4010,7 +4010,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/notices": "^3.2.7",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/plugins": "^4.0.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/primitives": "^3.0.4",
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/reusable-blocks": "^3.0.12",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/url": "^3.3.1",
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/viewport": "^4.0.6",
</ins><span class="cx" style="display: block; padding: 0 10px"> "classnames": "^2.3.1",
</span><span class="cx" style="display: block; padding: 0 10px"> "downloadjs": "^1.4.7",
</span><span class="cx" style="display: block; padding: 0 10px"> "file-saver": "^2.0.2",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4020,19 +4022,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/edit-widgets": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "3.1.6",
- "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-3.1.6.tgz",
- "integrity": "sha512-NuVehrAajzThQLh313FiyhjfIFpCwolyPjndj+urUp+iCKpLTMKTKSrZpC6tQsfycrmpPrnL/RiWsNeAV1zGMg==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "3.1.7",
+ "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-3.1.7.tgz",
+ "integrity": "sha512-FwbaqGqGazNSfZth5HG6Kl6l5yCiyL/+h4dSGQrplMxvNlQDC8Sx2x/ti/iH9f82+FOmIbAGvJtZaeRNOI7WZw==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.16.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/a11y": "^3.2.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/api-fetch": "^5.2.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/block-editor": "^8.0.5",
- "@wordpress/block-library": "^6.0.9",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/block-editor": "^8.0.6",
+ "@wordpress/block-library": "^6.0.10",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/blocks": "^11.1.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/components": "^19.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/components": "^19.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/compose": "^5.0.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/core-data": "^4.0.7",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/core-data": "^4.0.8",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data": "^6.1.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/dom": "^3.2.7",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/element": "^4.0.4",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4039,16 +4041,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/hooks": "^3.2.2",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/i18n": "^4.2.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/icons": "^6.1.1",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/interface": "^4.1.7",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/interface": "^4.1.8",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/keyboard-shortcuts": "^3.0.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/keycodes": "^3.2.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/media-utils": "^3.0.5",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/notices": "^3.2.7",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/plugins": "^4.0.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/reusable-blocks": "^3.0.11",
- "@wordpress/server-side-render": "^3.0.9",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/reusable-blocks": "^3.0.12",
+ "@wordpress/server-side-render": "^3.0.10",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/url": "^3.3.1",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/widgets": "^2.0.11",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/widgets": "^2.0.12",
</ins><span class="cx" style="display: block; padding: 0 10px"> "classnames": "^2.3.1",
</span><span class="cx" style="display: block; padding: 0 10px"> "lodash": "^4.17.21",
</span><span class="cx" style="display: block; padding: 0 10px"> "rememo": "^3.0.0",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4056,9 +4058,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/editor": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "12.0.8",
- "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-12.0.8.tgz",
- "integrity": "sha512-vEEHEH2Pkg/FzfgZqTZI6RhTcGrRwwgdnSrrJJMXQjKg3ieLpSuKZ2LaZEhfqY2ICTuZ/49A9pxOm6FzkQW8Xg==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "12.0.9",
+ "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-12.0.9.tgz",
+ "integrity": "sha512-yzwkrrCJlgW3VR5xNqsSoLQztYgqqe20goJfRXF+43ZQBTNr0kUbHb3+xF4J/cd3WxqWYYPb2WeHcR65qrnYqw==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.16.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/a11y": "^3.2.4",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4065,11 +4067,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/api-fetch": "^5.2.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/autop": "^3.2.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/blob": "^3.2.2",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/block-editor": "^8.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/block-editor": "^8.0.6",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/blocks": "^11.1.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/components": "^19.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/components": "^19.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/compose": "^5.0.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/core-data": "^4.0.7",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/core-data": "^4.0.8",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data": "^6.1.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data-controls": "^2.2.7",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/date": "^4.2.3",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4084,9 +4086,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/keycodes": "^3.2.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/media-utils": "^3.0.5",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/notices": "^3.2.7",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/reusable-blocks": "^3.0.11",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/reusable-blocks": "^3.0.12",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/rich-text": "^5.0.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/server-side-render": "^3.0.9",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/server-side-render": "^3.0.10",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/url": "^3.3.1",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/wordcount": "^3.2.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "classnames": "^2.3.1",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4173,14 +4175,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/format-library": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "3.0.11",
- "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-3.0.11.tgz",
- "integrity": "sha512-RhEQtTDUjXJMNkSCL8v+l2/N8T8kizfSoaD84bbJbSU1sahUF7Cdxtlp06z374iTZDzIqZxtEftWRljJs/AqVA==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "3.0.12",
+ "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-3.0.12.tgz",
+ "integrity": "sha512-gQzGsv63HwQrDNIQvxEC/xwR730Mv+VkSXvCfHip8dBL1cva4CHzrsnYbXGJuaQEEX7yOSv+IPLcrA8rTy2fzw==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.16.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/a11y": "^3.2.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/block-editor": "^8.0.5",
- "@wordpress/components": "^19.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/block-editor": "^8.0.6",
+ "@wordpress/components": "^19.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/compose": "^5.0.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data": "^6.1.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/dom": "^3.2.7",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4235,13 +4237,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/interface": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "4.1.7",
- "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-4.1.7.tgz",
- "integrity": "sha512-mXsTvVKfDctZ1Kkhto2NLCs8xi3cHFD7QU8OIuofgO8rKlQ4ro7+QTuu1N/SfGRnmTQTX0d1gUMzi4JwWp3nsA==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "4.1.8",
+ "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-4.1.8.tgz",
+ "integrity": "sha512-bvvNJ0uuBozCSpRJx/MSQgC8ReH5dUL8pFJc4ky923xFwMjmOybkQbzf/A4uCiKeGkp0H9mL0VvenDkxBzmw4w==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.16.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/a11y": "^3.2.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/components": "^19.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/components": "^19.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/compose": "^5.0.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data": "^6.1.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/deprecated": "^3.2.3",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4339,13 +4341,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/list-reusable-blocks": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "3.0.9",
- "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-3.0.9.tgz",
- "integrity": "sha512-elYJLYWWeMomiUlFmm/GHJrLvjOXGstUGNHVo6NkmnKi3crYc2QNKn+vHnFaXNLi7n1eG0QIUo4guInkyv224g==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "3.0.10",
+ "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-3.0.10.tgz",
+ "integrity": "sha512-B8+5GWPRhRDryB44aTidVhe6zCUwSoWMiCzEJ6E9J84bh2P5EfTzQBtzyVBNZYxyn58ZViCW2cnt/yQFh85OrA==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.16.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/api-fetch": "^5.2.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/components": "^19.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/components": "^19.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/compose": "^5.0.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/element": "^4.0.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/i18n": "^4.2.4",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4383,12 +4385,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "dev": true
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/nux": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "5.0.9",
- "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-5.0.9.tgz",
- "integrity": "sha512-HGQVQm/8YAyNCIDQRzwAQSikT4tkJ/Gf/4NU2LbQf45gk0vuPLlbXmlF/cA/AQdA8l8hKfE51SfETRRPIE63IA==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "5.0.10",
+ "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-5.0.10.tgz",
+ "integrity": "sha512-W9WyfondJ9IGo9W0QShbP2RQbiCctK0Vx916SIBW/xMTux+nB04MaKkfQsuKFWMsMQGsUZHcv6j/uRVCrRpAyQ==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.16.0",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/components": "^19.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/components": "^19.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/compose": "^5.0.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data": "^6.1.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/deprecated": "^3.2.3",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4513,15 +4515,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/reusable-blocks": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "3.0.11",
- "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-3.0.11.tgz",
- "integrity": "sha512-5EQ+qrRDscEmILir+atYyZMgPOoHwZEYlxesRj1pEBO/dQX2tpZKt1W8SfkWSukRQYyqUby8z9sZ04ga+/Khlg==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "3.0.12",
+ "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-3.0.12.tgz",
+ "integrity": "sha512-Q38sB3Lo3qHM6JHQoHuEeP9UIsTLBL36dbiaBGyXkMexLG5djr4RIjbzn024nUSk8no+TSqylwxiH/tpW5H8sw==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/block-editor": "^8.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/block-editor": "^8.0.6",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/blocks": "^11.1.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/components": "^19.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/components": "^19.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/compose": "^5.0.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/core-data": "^4.0.7",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/core-data": "^4.0.8",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data": "^6.1.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/element": "^4.0.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/i18n": "^4.2.4",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5485,14 +5487,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/server-side-render": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "3.0.9",
- "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-3.0.9.tgz",
- "integrity": "sha512-9Pv6909FWDuW8OGZUR/pY3D7+YBIT+O/PI9JcNuNtbUK7YuEc+PF7KNTQ0dTuxRvOYy3kQNw/a4pWefq1HDNzA==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "3.0.10",
+ "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-3.0.10.tgz",
+ "integrity": "sha512-6Ifor/lSJEPpqsdHdNt4NhO/ufR0FyjKN4uIhyZW69BdK6OZrXlovLB//vOgR4a+aTqNprbWNbx+lU7nDXASRg==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.16.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/api-fetch": "^5.2.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/blocks": "^11.1.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/components": "^19.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/components": "^19.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/compose": "^5.0.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data": "^6.1.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/deprecated": "^3.2.3",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5558,17 +5560,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "integrity": "sha512-iG1Hq56RK3N6AJqAD1sRLWRIJatfYn+NrPyrfqRNZNYXHM8Vj/s7ABNMbIU0Y99vXkBE83rvCdbMkugNoI2jXA=="
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/widgets": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "2.0.11",
- "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-2.0.11.tgz",
- "integrity": "sha512-XIY/W7WnEXbWSeycFtxaShHYxtJOlTgX9L4DCo/hh2IHkG3HHsZ8qIx0lMtsMq2BKZ2mbL3GCp/cjgBNQygUhg==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "2.0.12",
+ "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-2.0.12.tgz",
+ "integrity": "sha512-XhECJrxmRHT4sFAQCoYWDMADKzN8M5RNfvpZeDJlAa+clk1JN15ljsUsvQR8MkIN4o+W261wVkbCZX2Jej+i0w==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@babel/runtime": "^7.16.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/api-fetch": "^5.2.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/block-editor": "^8.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/block-editor": "^8.0.6",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/blocks": "^11.1.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/components": "^19.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/components": "^19.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/compose": "^5.0.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/core-data": "^4.0.7",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/core-data": "^4.0.8",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data": "^6.1.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/element": "^4.0.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/i18n": "^4.2.4",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -18301,9 +18303,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "micromodal": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "0.4.6",
- "resolved": "https://registry.npmjs.org/micromodal/-/micromodal-0.4.6.tgz",
- "integrity": "sha512-2VDso2a22jWPpqwuWT/4RomVpoU3Bl9qF9D01xzwlNp5UVsImeA0gY4nSpF44vqcQtQOtkiMUV9EZkAJSRxBsg=="
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "0.4.10",
+ "resolved": "https://registry.npmjs.org/micromodal/-/micromodal-0.4.10.tgz",
+ "integrity": "sha512-BUrEnzMPFBwK8nOE4xUDYHLrlGlLULQVjpja99tpJQPSUEWgw3kTLp1n1qv0HmKU29AiHE7Y7sMLiRziDK4ghQ=="
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "miller-rabin": {
</span><span class="cx" style="display: block; padding: 0 10px"> "version": "4.0.1",
</span></span></pre></div>
<a id="trunkpackagejson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/package.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/package.json 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/package.json 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -82,15 +82,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/api-fetch": "5.2.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/autop": "3.2.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/blob": "3.2.2",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/block-directory": "3.0.11",
- "@wordpress/block-editor": "8.0.5",
- "@wordpress/block-library": "6.0.9",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/block-directory": "3.0.12",
+ "@wordpress/block-editor": "8.0.6",
+ "@wordpress/block-library": "6.0.10",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/block-serialization-default-parser": "4.2.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/blocks": "11.1.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/components": "19.0.5",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/components": "19.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/compose": "5.0.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/core-data": "4.0.7",
- "@wordpress/customize-widgets": "2.0.11",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/core-data": "4.0.8",
+ "@wordpress/customize-widgets": "2.0.12",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data": "6.1.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/data-controls": "2.2.7",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/date": "4.2.3",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -97,38 +97,38 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/deprecated": "3.2.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/dom": "3.2.7",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/dom-ready": "3.2.3",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/edit-post": "5.0.11",
- "@wordpress/edit-site": "3.0.11",
- "@wordpress/edit-widgets": "3.1.6",
- "@wordpress/editor": "12.0.8",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/edit-post": "5.0.12",
+ "@wordpress/edit-site": "3.0.12",
+ "@wordpress/edit-widgets": "3.1.7",
+ "@wordpress/editor": "12.0.9",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/element": "4.0.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/escape-html": "2.2.3",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/format-library": "3.0.11",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/format-library": "3.0.12",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/hooks": "3.2.2",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/html-entities": "3.2.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/i18n": "4.2.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/icons": "6.1.1",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/interface": "4.1.7",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/interface": "4.1.8",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/is-shallow-equal": "4.2.1",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/keyboard-shortcuts": "3.0.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/keycodes": "3.2.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/list-reusable-blocks": "3.0.9",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/list-reusable-blocks": "3.0.10",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/media-utils": "3.0.5",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/notices": "3.2.7",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/nux": "5.0.9",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/nux": "5.0.10",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/plugins": "4.0.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/primitives": "3.0.4",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/priority-queue": "2.2.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/redux-routine": "4.2.2",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/reusable-blocks": "3.0.11",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/reusable-blocks": "3.0.12",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/rich-text": "5.0.6",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/server-side-render": "3.0.9",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/server-side-render": "3.0.10",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/shortcode": "3.2.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/token-list": "2.2.2",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/url": "3.3.1",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/viewport": "4.0.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/warning": "2.2.2",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/widgets": "2.0.11",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/widgets": "2.0.12",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/wordcount": "3.2.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "backbone": "1.4.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "clipboard": "2.0.8",
</span></span></pre></div>
<a id="trunksrcwpadminsiteeditorphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/site-editor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/site-editor.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-admin/site-editor.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -23,8 +23,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_die( __( 'The theme you are currently using is not compatible with Full Site Editing.' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-// Used in the HTML title tag.
-$title = __( 'Editor (beta)' );
</del><span class="cx" style="display: block; padding: 0 10px"> $parent_file = 'themes.php';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Flag that we're loading the block editor.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -59,6 +57,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_die( __( 'Invalid post type.' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Used in the HTML title tag.
+ $title = $post_type->labels->name;
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $preload_paths = array(
</span><span class="cx" style="display: block; padding: 0 10px"> '/',
</span><span class="cx" style="display: block; padding: 0 10px"> '/wp/v2/types/' . $post_type->name . '?context=edit',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -81,6 +82,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Used in the HTML title tag.
+ $title = __( 'Editor (beta)' );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $active_global_styles_id = WP_Theme_JSON_Resolver::get_user_custom_post_type_id();
</span><span class="cx" style="display: block; padding: 0 10px"> $active_theme = wp_get_theme()->get_stylesheet();
</span><span class="cx" style="display: block; padding: 0 10px"> $preload_paths = array(
</span></span></pre></div>
<a id="trunksrcwpincludesassetsscriptloaderpackagesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/assets/script-loader-packages.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/assets/script-loader-packages.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/assets/script-loader-packages.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1 +1 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?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-cor
e-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-vie
wport', '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' => '7ad174e925c73007ee5b173582
42e7d9'), '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('de
pendencies' => 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'), 'elemen
t.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' => arr
ay('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-ur
l'), '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'));
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?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-cor
e-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-vie
wport', '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' => '7ad174e925c73007ee5b173582
42e7d9'), '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-widge
ts.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' => '22329f7ff9d35759e1a4e
d63f50fd1f1'), '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('d
ependencies' => 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('depe
ndencies' => 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'));
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpincludesblockeditorphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/block-editor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/block-editor.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/block-editor.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -338,8 +338,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // These settings may need to be updated based on data coming from theme.json sources.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $editor_settings['__experimentalFeatures']['color']['palette'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $colors_by_origin = $editor_settings['__experimentalFeatures']['color']['palette'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $editor_settings['colors'] = isset( $colors_by_origin['user'] ) ?
- $colors_by_origin['user'] : (
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $editor_settings['colors'] = isset( $colors_by_origin['custom'] ) ?
+ $colors_by_origin['custom'] : (
</ins><span class="cx" style="display: block; padding: 0 10px"> isset( $colors_by_origin['theme'] ) ?
</span><span class="cx" style="display: block; padding: 0 10px"> $colors_by_origin['theme'] :
</span><span class="cx" style="display: block; padding: 0 10px"> $colors_by_origin['default']
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -347,8 +347,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $editor_settings['__experimentalFeatures']['color']['gradients'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $gradients_by_origin = $editor_settings['__experimentalFeatures']['color']['gradients'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $editor_settings['gradients'] = isset( $gradients_by_origin['user'] ) ?
- $gradients_by_origin['user'] : (
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $editor_settings['gradients'] = isset( $gradients_by_origin['custom'] ) ?
+ $gradients_by_origin['custom'] : (
</ins><span class="cx" style="display: block; padding: 0 10px"> isset( $gradients_by_origin['theme'] ) ?
</span><span class="cx" style="display: block; padding: 0 10px"> $gradients_by_origin['theme'] :
</span><span class="cx" style="display: block; padding: 0 10px"> $gradients_by_origin['default']
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -356,8 +356,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $editor_settings['__experimentalFeatures']['typography']['fontSizes'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $font_sizes_by_origin = $editor_settings['__experimentalFeatures']['typography']['fontSizes'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $editor_settings['fontSizes'] = isset( $font_sizes_by_origin['user'] ) ?
- $font_sizes_by_origin['user'] : (
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $editor_settings['fontSizes'] = isset( $font_sizes_by_origin['custom'] ) ?
+ $font_sizes_by_origin['custom'] : (
</ins><span class="cx" style="display: block; padding: 0 10px"> isset( $font_sizes_by_origin['theme'] ) ?
</span><span class="cx" style="display: block; padding: 0 10px"> $font_sizes_by_origin['theme'] :
</span><span class="cx" style="display: block; padding: 0 10px"> $font_sizes_by_origin['default']
</span></span></pre></div>
<a id="trunksrcwpincludesblocktemplateutilsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/block-template-utils.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/block-template-utils.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/block-template-utils.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -525,6 +525,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $has_theme_file = wp_get_theme()->get_stylesheet() === $theme &&
</span><span class="cx" style="display: block; padding: 0 10px"> null !== _get_block_template_file( $post->post_type, $post->post_name );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $origin = get_post_meta( $post->ID, 'origin', true );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $template = new WP_Block_Template();
</span><span class="cx" style="display: block; padding: 0 10px"> $template->wp_id = $post->ID;
</span><span class="cx" style="display: block; padding: 0 10px"> $template->id = $theme . '//' . $post->post_name;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -532,6 +534,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $template->content = $post->post_content;
</span><span class="cx" style="display: block; padding: 0 10px"> $template->slug = $post->post_name;
</span><span class="cx" style="display: block; padding: 0 10px"> $template->source = 'custom';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $template->origin = ! empty( $origin ) ? $origin : null;
</ins><span class="cx" style="display: block; padding: 0 10px"> $template->type = $post->post_type;
</span><span class="cx" style="display: block; padding: 0 10px"> $template->description = $post->post_excerpt;
</span><span class="cx" style="display: block; padding: 0 10px"> $template->title = $post->post_title;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -538,6 +541,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $template->status = $post->post_status;
</span><span class="cx" style="display: block; padding: 0 10px"> $template->has_theme_file = $has_theme_file;
</span><span class="cx" style="display: block; padding: 0 10px"> $template->is_custom = true;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $template->author = $post->post_author;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'wp_template' === $post->post_type && isset( $default_template_types[ $template->slug ] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $template->is_custom = false;
</span></span></pre></div>
<a id="trunksrcwpincludesblockscalendarphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/calendar.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/calendar.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/calendar.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -85,7 +85,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // On single sites we try our own cached option first.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $has_published_posts = get_option( 'gutenberg_calendar_block_has_published_posts', null );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $has_published_posts = get_option( 'wp_calendar_block_has_published_posts', null );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( null !== $has_published_posts ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return (bool) $has_published_posts;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -103,7 +103,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function block_core_calendar_update_has_published_posts() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px"> $has_published_posts = (bool) $wpdb->get_var( "SELECT 1 as test FROM {$wpdb->posts} WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1" );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- update_option( 'gutenberg_calendar_block_has_published_posts', $has_published_posts );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ update_option( 'wp_calendar_block_has_published_posts', $has_published_posts );
</ins><span class="cx" style="display: block; padding: 0 10px"> return $has_published_posts;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludesblocksnavigationblockjson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/navigation/block.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/navigation/block.json 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/navigation/block.json 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -11,7 +11,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ],
</span><span class="cx" style="display: block; padding: 0 10px"> "textdomain": "default",
</span><span class="cx" style="display: block; padding: 0 10px"> "attributes": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "navigationMenuId": {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "ref": {
</ins><span class="cx" style="display: block; padding: 0 10px"> "type": "number"
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "textColor": {
</span></span></pre></div>
<a id="trunksrcwpincludesblocksnavigationviewassetphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/navigation/view.asset.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/navigation/view.asset.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/navigation/view.asset.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1 +1 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php return array('dependencies' => array(), 'version' => '8591fc81d18e61a0f33b213b1fe35e52');
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php return array('dependencies' => array(), 'version' => '133b84f32422a9ad94c4533f85fa4e87');
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpincludesblocksnavigationviewminassetphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/navigation/view.min.asset.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/navigation/view.min.asset.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/navigation/view.min.asset.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1 +1 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php return array('dependencies' => array(), 'version' => '4942262e50480536aae4cd504a13f19c');
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php return array('dependencies' => array(), 'version' => 'f3cbbfbf9b9c434c39d6f77037d5267c');
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpincludesblocksnavigationphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/navigation.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/navigation.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/navigation.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,7 +9,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Build an array with CSS classes and inline styles defining the colors
</span><span class="cx" style="display: block; padding: 0 10px"> * which will be applied to the navigation markup in the front-end.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $attributes Navigation block attributes.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $attributes Navigation block attributes.
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return array Colors CSS classes and inline styles.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function block_core_navigation_build_css_colors( $attributes ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -99,7 +100,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Build an array with CSS classes and inline styles defining the font sizes
</span><span class="cx" style="display: block; padding: 0 10px"> * which will be applied to the navigation markup in the front-end.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $attributes Navigation block attributes.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $attributes Navigation block attributes.
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return array Font size CSS classes and inline styles.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function block_core_navigation_build_css_font_sizes( $attributes ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -132,7 +134,101 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" role="img" aria-hidden="true" focusable="false"><path d="M1.50002 4L6.00002 8L10.5 4" stroke-width="1.5"></path></svg>';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Finds the first non-empty `wp_navigation` Post.
+ *
+ * @return WP_Post|null the first non-empty Navigation or null.
+ */
+function block_core_navigation_get_first_non_empty_navigation() {
+ // Order and orderby args set to mirror those in `wp_get_nav_menus`
+ // see:
+ // - https://github.com/WordPress/wordpress-develop/blob/ba943e113d3b31b121f77a2d30aebe14b047c69d/src/wp-includes/nav-menu.php#L613-L619.
+ // - https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters.
+ $navigation_posts = get_posts(
+ array(
+ 'post_type' => 'wp_navigation',
+ 'order' => 'ASC',
+ 'orderby' => 'name',
+ 'posts_per_page' => 1, // only the first post.
+ 's' => '<!-- wp:', // look for block indicators to ensure we only include non-empty Navigations.
+ )
+ );
+ return count( $navigation_posts ) ? $navigation_posts[0] : null;
+
+}
+
+/**
+ * Filter out empty "null" blocks from the block list.
+ * 'parse_blocks' includes a null block with '\n\n' as the content when
+ * it encounters whitespace. This is not a bug but rather how the parser
+ * is designed.
+ *
+ * @param array $parsed_blocks the parsed blocks to be normalized.
+ * @return array the normalized parsed blocks.
+ */
+function block_core_navigation_filter_out_empty_blocks( $parsed_blocks ) {
+ $filtered = array_filter(
+ $parsed_blocks,
+ function( $block ) {
+ return isset( $block['blockName'] );
+ }
+ );
+
+ // Reset keys.
+ return array_values( $filtered );
+}
+
+/**
+ * Retrieves the appropriate fallback to be used on the front of the
+ * site when there is no menu assigned to the Nav block.
+ *
+ * This aims to mirror how the fallback mechanic for wp_nav_menu works.
+ * See https://developer.wordpress.org/reference/functions/wp_nav_menu/#more-information.
+ *
+ * @return array the array of blocks to be used as a fallback.
+ */
+function block_core_navigation_get_fallback_blocks() {
+ $page_list_fallback = array(
+ array(
+ 'blockName' => 'core/page-list',
+ 'attrs' => array(
+ '__unstableMaxPages' => 4,
+ ),
+ ),
+ );
+
+ $registry = WP_Block_Type_Registry::get_instance();
+
+ // If `core/page-list` is not registered then return empty blocks.
+ $fallback_blocks = $registry->is_registered( 'core/page-list' ) ? $page_list_fallback : array();
+
+ // Default to a list of Pages.
+
+ $navigation_post = block_core_navigation_get_first_non_empty_navigation();
+
+ // Prefer using the first non-empty Navigation as fallback if available.
+ if ( $navigation_post ) {
+ $maybe_fallback = block_core_navigation_filter_out_empty_blocks( parse_blocks( $navigation_post->post_content ) );
+
+ // Normalizing blocks may result in an empty array of blocks if they were all `null` blocks.
+ // In this case default to the (Page List) fallback.
+ $fallback_blocks = ! empty( $maybe_fallback ) ? $maybe_fallback : $fallback_blocks;
+ }
+
+ /**
+ * Filters the fallback experience for the Navigation block.
+ *
+ * Returning a falsey value will opt out of the fallback and cause the block not to render.
+ * To customise the blocks provided return an array of blocks - these should be valid
+ * children of the `core/navigation` block.
+ *
+ * @param array[] default fallback blocks provided by the default block mechanic.
+ */
+ return apply_filters( 'block_core_navigation_render_fallback', $fallback_blocks );
+}
+
+/**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Renders the `core/navigation` block on server.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $attributes The block attributes.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -142,6 +238,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string Returns the post content with the legacy widget added.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function render_block_core_navigation( $attributes, $content, $block ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ // Flag used to indicate whether the rendered output is considered to be
+ // a fallback (i.e. the block has no menu associated with it).
+ $is_fallback = false;
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Deprecated:
</span><span class="cx" style="display: block; padding: 0 10px"> * The rgbTextColor and rgbBackgroundColor attributes
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -187,13 +288,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $area = $block->context['navigationArea'];
</span><span class="cx" style="display: block; padding: 0 10px"> $mapping = get_option( 'wp_navigation_areas', array() );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $mapping[ $area ] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $attributes['navigationMenuId'] = $mapping[ $area ];
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $attributes['ref'] = $mapping[ $area ];
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Ensure that blocks saved with the legacy ref attribute name (navigationMenuId) continue to render.
+ if ( array_key_exists( 'navigationMenuId', $attributes ) ) {
+ $attributes['ref'] = $attributes['navigationMenuId'];
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> // Load inner blocks from the navigation post.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( array_key_exists( 'navigationMenuId', $attributes ) ) {
- $navigation_post = get_post( $attributes['navigationMenuId'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( array_key_exists( 'ref', $attributes ) ) {
+ $navigation_post = get_post( $attributes['ref'] );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! isset( $navigation_post ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return '';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -202,12 +307,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // 'parse_blocks' includes a null block with '\n\n' as the content when
</span><span class="cx" style="display: block; padding: 0 10px"> // it encounters whitespace. This code strips it.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $compacted_blocks = array_filter(
- $parsed_blocks,
- function( $block ) {
- return isset( $block['blockName'] );
- }
- );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $compacted_blocks = block_core_navigation_filter_out_empty_blocks( $parsed_blocks );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // TODO - this uses the full navigation block attributes for the
</span><span class="cx" style="display: block; padding: 0 10px"> // context which could be refined.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -214,8 +314,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $inner_blocks = new WP_Block_List( $compacted_blocks, $attributes );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // If there are no inner blocks then fallback to rendering an appropriate fallback.
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $inner_blocks ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $is_fallback = true; // indicate we are rendering the fallback.
+
+ $fallback_blocks = block_core_navigation_get_fallback_blocks();
+
+ // Fallback my have been filtered so do basic test for validity.
+ if ( empty( $fallback_blocks ) || ! is_array( $fallback_blocks ) ) {
+ return '';
+ }
+
+ $inner_blocks = new WP_Block_List( $fallback_blocks, $attributes );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Restore legacy classnames for submenu positioning.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -234,7 +345,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $colors['css_classes'],
</span><span class="cx" style="display: block; padding: 0 10px"> $font_sizes['css_classes'],
</span><span class="cx" style="display: block; padding: 0 10px"> $is_responsive_menu ? array( 'is-responsive' ) : array(),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $layout_class ? array( $layout_class ) : array()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $layout_class ? array( $layout_class ) : array(),
+ $is_fallback ? array( 'is-fallback' ) : array()
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $inner_blocks_html = '';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -323,8 +435,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Register the navigation block.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @throws WP_Error An WP_Error exception parsing the block definition.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @uses render_block_core_navigation()
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @throws WP_Error An WP_Error exception parsing the block definition.
</del><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function register_block_core_navigation() {
</span><span class="cx" style="display: block; padding: 0 10px"> register_block_type_from_metadata(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -341,6 +453,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filter that changes the parsed attribute values of navigation blocks contain typographic presets to contain the values directly.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $parsed_block The block being rendered.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return array The block being rendered without typographic presets.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function block_core_navigation_typographic_presets_backcompatibility( $parsed_block ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -364,6 +477,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> return $parsed_block;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludesblockspagelistphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/page-list.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/page-list.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/page-list.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -293,6 +293,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $nested_pages = block_core_page_list_nest_pages( $top_level_pages, $pages_with_children );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Limit the number of items to be visually displayed.
+ if ( ! empty( $attributes['__unstableMaxPages'] ) ) {
+ $nested_pages = array_slice( $nested_pages, 0, $attributes['__unstableMaxPages'] );
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $is_navigation_child = array_key_exists( 'showSubmenuIcon', $block->context );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $open_submenus_on_click = array_key_exists( 'openSubmenusOnClick', $block->context ) ? $block->context['openSubmenusOnClick'] : false;
</span></span></pre></div>
<a id="trunksrcwpincludesblockspatternblockjson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/pattern/block.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/pattern/block.json 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/pattern/block.json 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2,7 +2,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "apiVersion": 2,
</span><span class="cx" style="display: block; padding: 0 10px"> "name": "core/pattern",
</span><span class="cx" style="display: block; padding: 0 10px"> "title": "Pattern",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "category": "design",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "category": "theme",
</ins><span class="cx" style="display: block; padding: 0 10px"> "description": "Show a block pattern.",
</span><span class="cx" style="display: block; padding: 0 10px"> "supports": {
</span><span class="cx" style="display: block; padding: 0 10px"> "html": false,
</span></span></pre></div>
<a id="trunksrcwpincludesblocksposttermsblockjson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/post-terms/block.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/post-terms/block.json 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/post-terms/block.json 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2,7 +2,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "apiVersion": 2,
</span><span class="cx" style="display: block; padding: 0 10px"> "name": "core/post-terms",
</span><span class="cx" style="display: block; padding: 0 10px"> "title": "Post Terms",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "category": "design",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "category": "theme",
</ins><span class="cx" style="display: block; padding: 0 10px"> "description": "Post terms.",
</span><span class="cx" style="display: block; padding: 0 10px"> "textdomain": "default",
</span><span class="cx" style="display: block; padding: 0 10px"> "attributes": {
</span></span></pre></div>
<a id="trunksrcwpincludesblocksquerytitleblockjson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/query-title/block.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/query-title/block.json 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/query-title/block.json 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2,7 +2,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "apiVersion": 2,
</span><span class="cx" style="display: block; padding: 0 10px"> "name": "core/query-title",
</span><span class="cx" style="display: block; padding: 0 10px"> "title": "Query Title",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "category": "design",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "category": "theme",
</ins><span class="cx" style="display: block; padding: 0 10px"> "description": "Display the query title.",
</span><span class="cx" style="display: block; padding: 0 10px"> "textdomain": "default",
</span><span class="cx" style="display: block; padding: 0 10px"> "attributes": {
</span></span></pre></div>
<a id="trunksrcwpincludesblockssitelogoblockjson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/site-logo/block.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/site-logo/block.json 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/site-logo/block.json 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2,7 +2,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "apiVersion": 2,
</span><span class="cx" style="display: block; padding: 0 10px"> "name": "core/site-logo",
</span><span class="cx" style="display: block; padding: 0 10px"> "title": "Site Logo",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "category": "layout",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "category": "theme",
</ins><span class="cx" style="display: block; padding: 0 10px"> "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.",
</span><span class="cx" style="display: block; padding: 0 10px"> "textdomain": "default",
</span><span class="cx" style="display: block; padding: 0 10px"> "attributes": {
</span></span></pre></div>
<a id="trunksrcwpincludesblockssitelogoeditorrtlcss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/site-logo/editor-rtl.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/site-logo/editor-rtl.css 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/site-logo/editor-rtl.css 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -154,7 +154,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> bottom: 0;
</span><span class="cx" style="display: block; padding: 0 10px"> right: 0;
</span><span class="cx" style="display: block; padding: 0 10px"> border: 1px dashed currentColor;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- opacity: 0.3;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ opacity: 0.4;
</ins><span class="cx" style="display: block; padding: 0 10px"> pointer-events: none;
</span><span class="cx" style="display: block; padding: 0 10px"> border-radius: inherit;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -194,7 +194,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> height: 100%;
</span><span class="cx" style="display: block; padding: 0 10px"> stroke: currentColor;
</span><span class="cx" style="display: block; padding: 0 10px"> stroke-dasharray: 3;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- opacity: 0.3;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ opacity: 0.4;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> .wp-block-site-logo.wp-block-site-logo.is-selected .components-button.components-button {
</span><span class="cx" style="display: block; padding: 0 10px"> background: var(--wp-admin-theme-color);
</span></span></pre></div>
<a id="trunksrcwpincludesblockssitelogoeditorrtlmincss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/site-logo/editor-rtl.min.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/site-logo/editor-rtl.min.css 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/site-logo/editor-rtl.min.css 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1 +1 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.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-conten
t: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-placeholde
r .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}
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.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-conten
t: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-placeholde
r .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}
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpincludesblockssitelogoeditorcss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/site-logo/editor.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/site-logo/editor.css 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/site-logo/editor.css 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -154,7 +154,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> bottom: 0;
</span><span class="cx" style="display: block; padding: 0 10px"> left: 0;
</span><span class="cx" style="display: block; padding: 0 10px"> border: 1px dashed currentColor;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- opacity: 0.3;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ opacity: 0.4;
</ins><span class="cx" style="display: block; padding: 0 10px"> pointer-events: none;
</span><span class="cx" style="display: block; padding: 0 10px"> border-radius: inherit;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -194,7 +194,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> height: 100%;
</span><span class="cx" style="display: block; padding: 0 10px"> stroke: currentColor;
</span><span class="cx" style="display: block; padding: 0 10px"> stroke-dasharray: 3;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- opacity: 0.3;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ opacity: 0.4;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> .wp-block-site-logo.wp-block-site-logo.is-selected .components-button.components-button {
</span><span class="cx" style="display: block; padding: 0 10px"> background: var(--wp-admin-theme-color);
</span></span></pre></div>
<a id="trunksrcwpincludesblockssitelogoeditormincss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/site-logo/editor.min.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/site-logo/editor.min.css 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/site-logo/editor.min.css 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1 +1 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.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-conten
t: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-placeholde
r .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}
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.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-conten
t: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-placeholde
r .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}
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpincludesblockssitetaglineblockjson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/site-tagline/block.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/site-tagline/block.json 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/site-tagline/block.json 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2,7 +2,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "apiVersion": 2,
</span><span class="cx" style="display: block; padding: 0 10px"> "name": "core/site-tagline",
</span><span class="cx" style="display: block; padding: 0 10px"> "title": "Site Tagline",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "category": "design",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "category": "theme",
</ins><span class="cx" style="display: block; padding: 0 10px"> "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.",
</span><span class="cx" style="display: block; padding: 0 10px"> "keywords": [ "description" ],
</span><span class="cx" style="display: block; padding: 0 10px"> "textdomain": "default",
</span></span></pre></div>
<a id="trunksrcwpincludesblockssitetitleblockjson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/site-title/block.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/site-title/block.json 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/site-title/block.json 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2,7 +2,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "apiVersion": 2,
</span><span class="cx" style="display: block; padding: 0 10px"> "name": "core/site-title",
</span><span class="cx" style="display: block; padding: 0 10px"> "title": "Site Title",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "category": "design",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "category": "theme",
</ins><span class="cx" style="display: block; padding: 0 10px"> "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.",
</span><span class="cx" style="display: block; padding: 0 10px"> "textdomain": "default",
</span><span class="cx" style="display: block; padding: 0 10px"> "attributes": {
</span></span></pre></div>
<a id="trunksrcwpincludesblockstemplatepartblockjson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/template-part/block.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/template-part/block.json 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/template-part/block.json 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -29,7 +29,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "spacing": {
</span><span class="cx" style="display: block; padding: 0 10px"> "padding": true
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "__experimentalLayout": true
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "__experimentalLayout": true,
+ "reusable": false
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "editorStyle": "wp-block-template-part-editor"
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpincludesblockstemplatepartphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/template-part.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/template-part.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/blocks/template-part.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -53,7 +53,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> // Else, if the template part was provided by the active theme,
</span><span class="cx" style="display: block; padding: 0 10px"> // render the corresponding file content.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $template_part_file_path = get_theme_file_path( '/block-template-parts/' . $attributes['slug'] . '.html' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $theme_folders = get_block_theme_folders();
+ $template_part_file_path = get_theme_file_path( '/' . $theme_folders['wp_template_part'] . '/' . $attributes['slug'] . '.html' );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( 0 === validate_file( $attributes['slug'] ) && file_exists( $template_part_file_path ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $content = file_get_contents( $template_part_file_path );
</span><span class="cx" style="display: block; padding: 0 10px"> $content = is_string( $content ) && '' !== $content
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpblocktemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-block-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-block-template.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/class-wp-block-template.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -78,6 +78,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public $source = 'theme';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Origin of the content when the content has been customized.
+ * When customized, origin takes on the value of source and source becomes
+ * 'custom'.
+ *
+ * @since 5.9.0
+ * @var string
+ */
+ public $origin;
+
+ /**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Post Id.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.8.0
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -109,4 +119,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @var bool
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public $is_custom = true;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Author.
+ *
+ * A value of 0 means no author.
+ *
+ * @since 5.9.0
+ * @var int
+ */
+ public $author;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpthemejsonresolverphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-theme-json-resolver.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-theme-json-resolver.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/class-wp-theme-json-resolver.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -222,35 +222,52 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param bool $should_create_cpt Optional. Whether a new custom post type should be created if none are found.
- * False by default.
- * @param array $post_status_filter Filter Optional. custom post type by post status.
- * ['publish'] by default, so it only fetches published posts.
- *
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param WP_Theme $theme The theme object. If empty, it
+ * defaults to the current theme.
+ * @param bool $should_create_cpt Optional. Whether a new custom post
+ * type should be created if none are
+ * found. False by default.
+ * @param array $post_status_filter Filter Optional. custom post type by
+ * post status. ['publish'] by default,
+ * so it only fetches published posts.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return array Custom Post Type for the user's origin config.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- private static function get_user_data_from_custom_post_type( $should_create_cpt = false, $post_status_filter = array( 'publish' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public static function get_user_data_from_custom_post_type( $theme, $should_create_cpt = false, $post_status_filter = array( 'publish' ) ) {
+ if ( ! $theme instanceof WP_Theme ) {
+ $theme = wp_get_theme();
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> $user_cpt = array();
</span><span class="cx" style="display: block; padding: 0 10px"> $post_type_filter = 'wp_global_styles';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $query = new WP_Query(
- array(
- 'posts_per_page' => 1,
- 'orderby' => 'date',
- 'order' => 'desc',
- 'post_type' => $post_type_filter,
- 'post_status' => $post_status_filter,
- 'tax_query' => array(
- array(
- 'taxonomy' => 'wp_theme',
- 'field' => 'name',
- 'terms' => wp_get_theme()->get_stylesheet(),
- ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $args = array(
+ 'numberposts' => 1,
+ 'orderby' => 'date',
+ 'order' => 'desc',
+ 'post_type' => $post_type_filter,
+ 'post_status' => $post_status_filter,
+ 'tax_query' => array(
+ array(
+ 'taxonomy' => 'wp_theme',
+ 'field' => 'name',
+ 'terms' => $theme->get_stylesheet(),
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ),
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( is_array( $query->posts ) && ( 1 === $query->post_count ) ) {
- $user_cpt = $query->posts[0]->to_array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $cache_key = sprintf( 'wp_global_styles_%s', md5( serialize( $args ) ) );
+ $post_id = wp_cache_get( $cache_key );
+
+ if ( (int) $post_id > 0 ) {
+ return get_post( $post_id, ARRAY_A );
+ }
+
+ // Special case: '-1' is a results not found.
+ if ( -1 === $post_id && ! $should_create_cpt ) {
+ return $user_cpt;
+ }
+
+ $recent_posts = wp_get_recent_posts( $args );
+ if ( is_array( $recent_posts ) && ( count( $recent_posts ) === 1 ) ) {
+ $user_cpt = $recent_posts[0];
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( $should_create_cpt ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $cpt_post_id = wp_insert_post(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -265,13 +282,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> true
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
- if ( is_wp_error( $cpt_post_id ) ) {
- $user_cpt = array();
- } else {
- $user_cpt = get_post( $cpt_post_id, ARRAY_A );
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user_cpt = get_post( $cpt_post_id, ARRAY_A );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $cache_expiration = $user_cpt ? DAY_IN_SECONDS : HOUR_IN_SECONDS;
+ wp_cache_set( $cache_key, $user_cpt ? $user_cpt['ID'] : -1, '', $cache_expiration );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return $user_cpt;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -289,7 +303,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $config = array();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $user_cpt = self::get_user_data_from_custom_post_type();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user_cpt = self::get_user_data_from_custom_post_type( wp_get_theme() );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( array_key_exists( 'post_content', $user_cpt ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $decoded_data = json_decode( $user_cpt['post_content'], true );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -297,7 +311,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $json_decoding_error = json_last_error();
</span><span class="cx" style="display: block; padding: 0 10px"> if ( JSON_ERROR_NONE !== $json_decoding_error ) {
</span><span class="cx" style="display: block; padding: 0 10px"> trigger_error( 'Error when decoding a theme.json schema for user data. ' . json_last_error_msg() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return new WP_Theme_JSON( $config, 'user' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return new WP_Theme_JSON( $config, 'custom' );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Very important to verify if the flag isGlobalStylesUserThemeJSON is true.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -311,7 +325,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $config = $decoded_data;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- self::$user = new WP_Theme_JSON( $config, 'user' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ self::$user = new WP_Theme_JSON( $config, 'custom' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return self::$user;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -318,8 +332,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * There are three sources of data (origins) for a site:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * default, theme, and user. The user's has higher priority
- * than the theme's, and the theme's higher than core's.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * default, theme, and custom. The custom's has higher priority
+ * than the theme's, and the theme's higher than default's.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Unlike the getters {@link get_core_data},
</span><span class="cx" style="display: block; padding: 0 10px"> * {@link get_theme_data}, and {@link get_user_data},
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -336,11 +350,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.9.0 Add user data and change the arguments.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $origin Optional. To what level should we merge data.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Valid values are 'theme' or 'user'.
- * Default is 'user'.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Valid values are 'theme' or 'custom'.
+ * Default is 'custom'.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return WP_Theme_JSON
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public static function get_merged_data( $origin = 'user' ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public static function get_merged_data( $origin = 'custom' ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( is_array( $origin ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> _deprecated_argument( __FUNCTION__, '5.9' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -349,7 +363,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $result->merge( self::get_core_data() );
</span><span class="cx" style="display: block; padding: 0 10px"> $result->merge( self::get_theme_data() );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'user' === $origin ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 'custom' === $origin ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $result->merge( self::get_user_data() );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -369,7 +383,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return self::$user_custom_post_type_id;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $user_cpt = self::get_user_data_from_custom_post_type( true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user_cpt = self::get_user_data_from_custom_post_type( wp_get_theme(), true );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( array_key_exists( 'ID', $user_cpt ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> self::$user_custom_post_type_id = $user_cpt['ID'];
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpthemejsonphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-theme-json.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-theme-json.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/class-wp-theme-json.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -53,7 +53,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> const VALID_ORIGINS = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'default',
</span><span class="cx" style="display: block; padding: 0 10px"> 'theme',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'user',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'custom',
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -75,15 +75,28 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * This contains the necessary metadata to process them:
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * - path => where to find the preset within the settings section
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * - override => whether a theme preset with the same slug as a default preset
+ * can override it
</ins><span class="cx" style="display: block; padding: 0 10px"> * - value_key => the key that represents the value
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * - value_func => the callback to render the value (either value_key or value_func should be present)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * - value_func => optionally, instead of value_key, a function to generate
+ * the value that takes a preset as an argument
+ * (either value_key or value_func should be present)
</ins><span class="cx" style="display: block; padding: 0 10px"> * - css_vars => template string to use in generating the CSS Custom Property.
</span><span class="cx" style="display: block; padding: 0 10px"> * Example output: "--wp--preset--duotone--blue: <value>" will generate as many CSS Custom Properties as presets defined
</span><span class="cx" style="display: block; padding: 0 10px"> * substituting the $slug for the slug's value for each preset value.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * - classes => array containing a structure with the classes to generate for the presets.
- * 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.
- * Example output: ".has-blue-color { color: <value> }"
- * - properties => a list of CSS properties to be used by kses to check the preset value is safe.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * - classes => array containing a structure with the classes to
+ * generate for the presets, where for each array item
+ * the key is the class name and the value the property name.
+ * The "$slug" substring will be replaced by the slug of each preset.
+ * For example:
+ * 'classes' => array(
+ * '.has-$slug-color' => 'color',
+ * '.has-$slug-background-color' => 'background-color',
+ * '.has-$slug-border-color' => 'border-color',
+ * )
+ * - properties => array of CSS properties to be used by kses to
+ * validate the content of each preset
+ * by means of the remove_insecure_properties method.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.8.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.9.0 Added new presets and simplified the metadata structure.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -92,6 +105,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> const PRESETS_METADATA = array(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'path' => array( 'color', 'palette' ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'override' => false,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'value_key' => 'color',
</span><span class="cx" style="display: block; padding: 0 10px"> 'css_vars' => '--wp--preset--color--$slug',
</span><span class="cx" style="display: block; padding: 0 10px"> 'classes' => array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -103,6 +117,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'path' => array( 'color', 'gradients' ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'override' => false,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'value_key' => 'gradient',
</span><span class="cx" style="display: block; padding: 0 10px"> 'css_vars' => '--wp--preset--gradient--$slug',
</span><span class="cx" style="display: block; padding: 0 10px"> 'classes' => array( '.has-$slug-gradient-background' => 'background' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -110,6 +125,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'path' => array( 'color', 'duotone' ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'override' => true,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'value_func' => 'wp_render_duotone_filter_preset',
</span><span class="cx" style="display: block; padding: 0 10px"> 'css_vars' => '--wp--preset--duotone--$slug',
</span><span class="cx" style="display: block; padding: 0 10px"> 'classes' => array(),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -117,6 +133,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'path' => array( 'typography', 'fontSizes' ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'override' => true,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'value_key' => 'size',
</span><span class="cx" style="display: block; padding: 0 10px"> 'css_vars' => '--wp--preset--font-size--$slug',
</span><span class="cx" style="display: block; padding: 0 10px"> 'classes' => array( '.has-$slug-font-size' => 'font-size' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -124,6 +141,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'path' => array( 'typography', 'fontFamilies' ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'override' => true,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'value_key' => 'fontFamily',
</span><span class="cx" style="display: block; padding: 0 10px"> 'css_vars' => '--wp--preset--font-family--$slug',
</span><span class="cx" style="display: block; padding: 0 10px"> 'classes' => array( '.has-$slug-font-family' => 'font-family' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -213,13 +231,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @var array
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> const VALID_SETTINGS = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'border' => array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'appearanceTools' => null,
+ 'border' => array(
</ins><span class="cx" style="display: block; padding: 0 10px"> 'color' => null,
</span><span class="cx" style="display: block; padding: 0 10px"> 'radius' => null,
</span><span class="cx" style="display: block; padding: 0 10px"> 'style' => null,
</span><span class="cx" style="display: block; padding: 0 10px"> 'width' => null,
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'color' => array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'color' => array(
</ins><span class="cx" style="display: block; padding: 0 10px"> 'background' => null,
</span><span class="cx" style="display: block; padding: 0 10px"> 'custom' => null,
</span><span class="cx" style="display: block; padding: 0 10px"> 'customDuotone' => null,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -232,18 +251,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'palette' => null,
</span><span class="cx" style="display: block; padding: 0 10px"> 'text' => null,
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'custom' => null,
- 'layout' => array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'custom' => null,
+ 'layout' => array(
</ins><span class="cx" style="display: block; padding: 0 10px"> 'contentSize' => null,
</span><span class="cx" style="display: block; padding: 0 10px"> 'wideSize' => null,
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'spacing' => array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'spacing' => array(
</ins><span class="cx" style="display: block; padding: 0 10px"> 'blockGap' => null,
</span><span class="cx" style="display: block; padding: 0 10px"> 'margin' => null,
</span><span class="cx" style="display: block; padding: 0 10px"> 'padding' => null,
</span><span class="cx" style="display: block; padding: 0 10px"> 'units' => null,
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'typography' => array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'typography' => array(
</ins><span class="cx" style="display: block; padding: 0 10px"> 'customFontSize' => null,
</span><span class="cx" style="display: block; padding: 0 10px"> 'dropCap' => null,
</span><span class="cx" style="display: block; padding: 0 10px"> 'fontFamilies' => null,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -297,6 +316,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * The valid elements that can be found under styles.
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @since 5.8.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @var string[]
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -326,7 +347,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $theme_json A structure that follows the theme.json schema.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $origin Optional. What source of data this object represents.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * One of 'default', 'theme', or 'user'. Default 'theme'.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * One of 'default', 'theme', or 'custom'. Default 'theme'.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function __construct( $theme_json = array(), $origin = 'theme' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! in_array( $origin, self::VALID_ORIGINS, true ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -336,7 +357,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->theme_json = WP_Theme_JSON_Schema::migrate( $theme_json );
</span><span class="cx" style="display: block; padding: 0 10px"> $valid_block_names = array_keys( self::get_blocks_metadata() );
</span><span class="cx" style="display: block; padding: 0 10px"> $valid_element_names = array_keys( self::ELEMENTS );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->theme_json = self::sanitize( $this->theme_json, $valid_block_names, $valid_element_names );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $theme_json = self::sanitize( $this->theme_json, $valid_block_names, $valid_element_names );
+ $this->theme_json = self::maybe_opt_in_into_settings( $theme_json );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Internally, presets are keyed by origin.
</span><span class="cx" style="display: block; padding: 0 10px"> $nodes = self::get_setting_nodes( $this->theme_json );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -345,7 +367,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $path = array_merge( $node['path'], $preset_metadata['path'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $preset = _wp_array_get( $this->theme_json, $path, null );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( null !== $preset ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'user' !== $origin || isset( $preset[0] ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // If the preset is not already keyed by origin.
+ if ( isset( $preset[0] ) || empty( $preset ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> _wp_array_set( $this->theme_json, $path, array( $origin => $preset ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -354,6 +377,61 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Enables some opt-in settings if theme declared support.
+ *
+ * @since 5.9.0
+ *
+ * @param array $theme_json A theme.json structure to modify.
+ * @return array The modified theme.json structure.
+ */
+ private static function maybe_opt_in_into_settings( $theme_json ) {
+ $new_theme_json = $theme_json;
+
+ if ( isset( $new_theme_json['settings']['appearanceTools'] ) ) {
+ self::do_opt_in_into_settings( $new_theme_json['settings'] );
+ }
+
+ if ( isset( $new_theme_json['settings']['blocks'] ) && is_array( $new_theme_json['settings']['blocks'] ) ) {
+ foreach ( $new_theme_json['settings']['blocks'] as &$block ) {
+ if ( isset( $block['appearanceTools'] ) ) {
+ self::do_opt_in_into_settings( $block );
+ }
+ }
+ }
+
+ return $new_theme_json;
+ }
+
+ /**
+ * Enables some settings.
+ *
+ * @since 5.9.0
+ *
+ * @param array $context The context to which the settings belong.
+ */
+ private static function do_opt_in_into_settings( &$context ) {
+ $to_opt_in = array(
+ array( 'border', 'color' ),
+ array( 'border', 'radius' ),
+ array( 'border', 'style' ),
+ array( 'border', 'width' ),
+ array( 'color', 'link' ),
+ array( 'spacing', 'blockGap' ),
+ array( 'spacing', 'margin' ),
+ array( 'spacing', 'padding' ),
+ array( 'typography', 'lineHeight' ),
+ );
+
+ foreach ( $to_opt_in as $path ) {
+ if ( null === _wp_array_get( $context, $path, null ) ) {
+ _wp_array_set( $context, $path, true );
+ }
+ }
+
+ unset( $context['appearanceTools'] );
+ }
+
+ /**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Sanitizes the input according to the schemas.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.8.0
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -414,6 +492,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return $output;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Returns the metadata for each block.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1378,34 +1457,140 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->theme_json = array_replace_recursive( $this->theme_json, $incoming_data );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * The array_replace_recursive algorithm merges at the leaf level.
- * For leaf values that are arrays it will use the numeric indexes for replacement.
- * In those cases, we want to replace the existing with the incoming value, if it exists.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * The array_replace_recursive algorithm merges at the leaf level,
+ * but we don't want leaf arrays to be merged, so we overwrite it.
+ *
+ * For leaf values that are sequential arrays it will use the numeric indexes for replacement.
+ * We rather replace the existing with the incoming value, if it exists.
+ * This is the case of spacing.units.
+ *
+ * For leaf values that are associative arrays it will merge them as expected.
+ * This is also not the behavior we want for the current associative arrays (presets).
+ * We rather replace the existing with the incoming value, if it exists.
+ * This happens, for example, when we merge data from theme.json upon existing
+ * theme supports or when we merge anything coming from the same source twice.
+ * This is the case of color.palette, color.gradients, color.duotone,
+ * typography.fontSizes, or typography.fontFamilies.
+ *
+ * Additionally, for some preset types, we also want to make sure the
+ * values they introduce don't conflict with default values. We do so
+ * by checking the incoming slugs for theme presets and compare them
+ * with the equivalent dfefault presets: if a slug is present as a default
+ * we remove it from the theme presets.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $to_replace = array();
- $to_replace[] = array( 'spacing', 'units' );
- foreach ( self::VALID_ORIGINS as $origin ) {
- $to_replace[] = array( 'color', 'duotone', $origin );
- $to_replace[] = array( 'color', 'palette', $origin );
- $to_replace[] = array( 'color', 'gradients', $origin );
- $to_replace[] = array( 'typography', 'fontSizes', $origin );
- $to_replace[] = array( 'typography', 'fontFamilies', $origin );
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $nodes = self::get_setting_nodes( $incoming_data );
+ $slugs_global = self::get_slugs_not_to_override( $this->theme_json );
+ foreach ( $nodes as $node ) {
+ $slugs_node = self::get_slugs_not_to_override( $this->theme_json, $node['path'] );
+ $slugs = array_merge_recursive( $slugs_global, $slugs_node );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $nodes = self::get_setting_nodes( $this->theme_json );
- foreach ( $nodes as $metadata ) {
- foreach ( $to_replace as $property_path ) {
- $path = array_merge( $metadata['path'], $property_path );
- $node = _wp_array_get( $incoming_data, $path, null );
- if ( isset( $node ) ) {
- _wp_array_set( $this->theme_json, $path, $node );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Replace the spacing.units.
+ $path = array_merge( $node['path'], array( 'spacing', 'units' ) );
+ $content = _wp_array_get( $incoming_data, $path, null );
+ if ( isset( $content ) ) {
+ _wp_array_set( $this->theme_json, $path, $content );
+ }
+
+ // Replace the presets.
+ foreach ( self::PRESETS_METADATA as $preset ) {
+ foreach ( self::VALID_ORIGINS as $origin ) {
+ $path = array_merge( $node['path'], $preset['path'], array( $origin ) );
+ $content = _wp_array_get( $incoming_data, $path, null );
+ if ( ! isset( $content ) ) {
+ continue;
+ }
+
+ if (
+ ( 'theme' !== $origin ) ||
+ ( 'theme' === $origin && $preset['override'] )
+ ) {
+ _wp_array_set( $this->theme_json, $path, $content );
+ }
+
+ if ( 'theme' === $origin && ! $preset['override'] ) {
+ $content = self::filter_slugs( $content, $preset['path'], $slugs );
+ _wp_array_set( $this->theme_json, $path, $content );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Returns the slugs for all the presets that cannot be overriden
+ * in the given path. It returns an associative array
+ * whose keys are the preset paths and the leafs is the list of slugs.
+ *
+ * For example:
+ *
+ * array(
+ * 'color' => array(
+ * 'palette' => array( 'slug-1', 'slug-2' ),
+ * 'gradients' => array( 'slug-3', 'slug-4' ),
+ * ),
+ * )
+ *
+ * @since 5.9.0
+ *
+ * @param array $data A theme.json like structure to inspect.
+ * @param array $node_path The path to inspect. It's 'settings' by default.
+ *
+ * @return array An associative array containing the slugs for the given path.
+ */
+ private static function get_slugs_not_to_override( $data, $node_path = array( 'settings' ) ) {
+ $slugs = array();
+ foreach ( self::PRESETS_METADATA as $metadata ) {
+ if ( $metadata['override'] ) {
+ continue;
+ }
+
+ $slugs_for_preset = array();
+ $path = array_merge( $node_path, $metadata['path'], array( 'default' ) );
+ $preset = _wp_array_get( $data, $path, null );
+ if ( ! isset( $preset ) ) {
+ continue;
+ }
+
+ $slugs_for_preset = array_map(
+ function( $value ) {
+ return isset( $value['slug'] ) ? $value['slug'] : null;
+ },
+ $preset
+ );
+ _wp_array_set( $slugs, $metadata['path'], $slugs_for_preset );
+ }
+
+ return $slugs;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Removes the preset values whose slug is equal to any of given slugs.
+ *
+ * @since 5.9.0
+ *
+ * @param array $node The node with the presets to validate.
+ * @param array $path The path to the preset type to inspect.
+ * @param array $slugs The slugs that should not be overriden.
+ *
+ * @return array The new node
+ */
+ private static function filter_slugs( $node, $path, $slugs ) {
+ $slugs_for_preset = _wp_array_get( $slugs, $path, array() );
+ if ( empty( $slugs_for_preset ) ) {
+ return $node;
+ }
+
+ $new_node = array();
+ foreach ( $node as $value ) {
+ if ( isset( $value['slug'] ) && ! in_array( $value['slug'], $slugs_for_preset, true ) ) {
+ $new_node[] = $value;
+ }
+ }
+
+ return $new_node;
+ }
+
+ /**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Removes insecure data from theme.json.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.9.0
</span></span></pre></div>
<a id="trunksrcwpincludesglobalstylesandsettingsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/global-styles-and-settings.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/global-styles-and-settings.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/global-styles-and-settings.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -10,25 +10,28 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $path Path to the specific setting to retrieve. Optional.
- * If empty, will return all settings.
- * @param string $block_name Which block to retrieve the settings from. Optional
- * If empty, it'll return the settings for the global context.
- * @param string $origin Which origin to take data from. Optional.
- * It can be 'all' (core, theme, and user) or 'base' (core and theme).
- * If empty or unknown, 'all' is used.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $path Path to the specific setting to retrieve. Optional.
+ * If empty, will return all settings.
+ * @param array $context {
+ * Metadata to know where to retrieve the $path from. Optional.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @type string $block_name Which block to retrieve the settings from.
+ * If empty, it'll return the settings for the global context.
+ * @type string $origin Which origin to take data from.
+ * Valid values are 'all' (core, theme, and user) or 'base' (core and theme).
+ * If empty or unknown, 'all' is used.
+ * }
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return array The settings to retrieve.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wp_get_global_settings( $path = array(), $block_name = '', $origin = 'all' ) {
- if ( '' !== $block_name ) {
- $path = array_merge( array( 'blocks', $block_name ), $path );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wp_get_global_settings( $path = array(), $context = array() ) {
+ if ( ! empty( $context['block_name'] ) ) {
+ $path = array_merge( array( 'blocks', $context['block_name'] ), $path );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'base' === $origin ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $origin = 'custom';
+ if ( isset( $context['origin'] ) && 'base' === $context['origin'] ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $origin = 'theme';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else {
- $origin = 'user';
</del><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $settings = WP_Theme_JSON_Resolver::get_merged_data( $origin )->get_settings();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -41,25 +44,28 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $path Path to the specific style to retrieve. Optional.
- * If empty, will return all styles.
- * @param string $block_name Which block to retrieve the styles from. Optional.
- * If empty, it'll return the styles for the global context.
- * @param string $origin Which origin to take data from. Optional.
- * It can be 'all' (core, theme, and user) or 'base' (core and theme).
- * If empty or unknown, 'all' is used.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $path Path to the specific style to retrieve. Optional.
+ * If empty, will return all styles.
+ * @param array $context {
+ * Metadata to know where to retrieve the $path from. Optional.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @type string $block_name Which block to retrieve the styles from.
+ * If empty, it'll return the styles for the global context.
+ * @type string $origin Which origin to take data from.
+ * Valid values are 'all' (core, theme, and user) or 'base' (core and theme).
+ * If empty or unknown, 'all' is used.
+ * }
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return array The styles to retrieve.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wp_get_global_styles( $path = array(), $block_name = '', $origin = 'all' ) {
- if ( '' !== $block_name ) {
- $path = array_merge( array( 'blocks', $block_name ), $path );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wp_get_global_styles( $path = array(), $context = array() ) {
+ if ( ! empty( $context['block_name'] ) ) {
+ $path = array_merge( array( 'blocks', $context['block_name'] ), $path );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'base' === $origin ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $origin = 'custom';
+ if ( isset( $context['origin'] ) && 'base' === $context['origin'] ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $origin = 'theme';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else {
- $origin = 'user';
</del><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $styles = WP_Theme_JSON_Resolver::get_merged_data( $origin )->get_raw_data()['styles'];
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -105,7 +111,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $types = array( 'variables', 'styles', 'presets' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $origins = array( 'default', 'theme', 'user' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $origins = array( 'default', 'theme', 'custom' );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! $supports_theme_json && ! $supports_link_color ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // In this case we only enqueue the core presets (CSS Custom Properties + the classes).
</span><span class="cx" style="display: block; padding: 0 10px"> $origins = array( 'default' );
</span></span></pre></div>
<a id="trunksrcwpincludespostphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/post.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/post.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/post.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -384,6 +384,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'excerpt',
</span><span class="cx" style="display: block; padding: 0 10px"> 'editor',
</span><span class="cx" style="display: block; padding: 0 10px"> 'revisions',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'author',
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -442,6 +443,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'excerpt',
</span><span class="cx" style="display: block; padding: 0 10px"> 'editor',
</span><span class="cx" style="display: block; padding: 0 10px"> 'revisions',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'author',
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span></span></pre></div>
<a id="trunksrcwpincludesrestapiendpointsclasswprestglobalstylescontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -232,12 +232,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return WP_REST_Response $data
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function prepare_item_for_response( $post, $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $config = json_decode( $post->post_content, true );
- $is_global_styles_user_theme_json = isset( $config['isGlobalStylesUserThemeJSON'] ) && true === $config['isGlobalStylesUserThemeJSON'];
- $fields = $this->get_fields_for_response( $request );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $raw_config = json_decode( $post->post_content, true );
+ $is_global_styles_user_theme_json = isset( $raw_config['isGlobalStylesUserThemeJSON'] ) && true === $raw_config['isGlobalStylesUserThemeJSON'];
+ $config = array();
+ if ( $is_global_styles_user_theme_json ) {
+ $config = ( new WP_Theme_JSON( $raw_config, 'custom' ) )->get_raw_data();
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Base fields for every post.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $data = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $data = array();
+ $fields = $this->get_fields_for_response( $request );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( rest_is_field_included( 'id', $fields ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $data['id'] = $post->ID;
</span></span></pre></div>
<a id="trunksrcwpincludesrestapiendpointsclasswpresttemplatescontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -72,8 +72,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'args' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'id' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'description' => __( 'The id of a template' ),
- 'type' => 'string',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'description' => __( 'The id of a template' ),
+ 'type' => 'string',
+ 'sanitize_callback' => array( $this, '_sanitize_template_id' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -132,6 +133,39 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Requesting this endpoint for a template like 'twentytwentytwo//home'
+ * requires using a path like /wp/v2/templates/twentytwentytwo//home. There
+ * are special cases when WordPress routing corrects the name to contain
+ * only a single slash like 'twentytwentytwo/home'.
+ *
+ * This method doubles the last slash if it's not already doubled. It relies
+ * on the template ID format {theme_name}//{template_slug} and the fact that
+ * slugs cannot contain slashes.
+ *
+ * @since 5.9.0
+ * @see https://core.trac.wordpress.org/ticket/54507
+ *
+ * @param string $id Template ID.
+ * @return string Sanitized template ID.
+ */
+ public function _sanitize_template_id( $id ) {
+ $last_slash_pos = strrpos( $id, '/' );
+ if ( false === $last_slash_pos ) {
+ return $id;
+ }
+
+ $is_double_slashed = substr( $id, $last_slash_pos - 1, 1 ) === '/';
+ if ( $is_double_slashed ) {
+ return $id;
+ }
+ return (
+ substr( $id, 0, $last_slash_pos )
+ . '/'
+ . substr( $id, $last_slash_pos )
+ );
+ }
+
+ /**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Checks if a given request has access to read templates.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.8.0
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -244,6 +278,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $changes = $this->prepare_item_for_database( $request );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( is_wp_error( $changes ) ) {
+ return $changes;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( 'custom' === $template->source ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $result = wp_update_post( wp_slash( (array) $changes ), true );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -298,6 +336,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function create_item( $request ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $prepared_post = $this->prepare_item_for_database( $request );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ if ( is_wp_error( $prepared_post ) ) {
+ return $prepared_post;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $prepared_post->post_name = $request['slug'];
</span><span class="cx" style="display: block; padding: 0 10px"> $post_id = wp_insert_post( wp_slash( (array) $prepared_post ), true );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_wp_error( $post_id ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -430,6 +473,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $changes->tax_input = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'wp_theme' => $template->theme,
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $changes->meta_input = array(
+ 'origin' => $template->source,
+ );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $changes->post_name = $template->slug;
</span><span class="cx" style="display: block; padding: 0 10px"> $changes->ID = $template->wp_id;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -469,6 +515,24 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! empty( $request['author'] ) ) {
+ $post_author = (int) $request['author'];
+
+ if ( get_current_user_id() !== $post_author ) {
+ $user_obj = get_userdata( $post_author );
+
+ if ( ! $user_obj ) {
+ return new WP_Error(
+ 'rest_invalid_author',
+ __( 'Invalid author ID.' ),
+ array( 'status' => 400 )
+ );
+ }
+ }
+
+ $changes->post_author = $post_author;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> return $changes;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -518,6 +582,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $data['source'] = $template->source;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( rest_is_field_included( 'origin', $fields ) ) {
+ $data['origin'] = $template->origin;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( rest_is_field_included( 'type', $fields ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $data['type'] = $template->type;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -555,6 +623,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $data['has_theme_file'] = (bool) $template->has_theme_file;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( rest_is_field_included( 'is_custom', $fields ) && 'wp_template' === $template->type ) {
+ $data['is_custom'] = $template->is_custom;
+ }
+
+ if ( rest_is_field_included( 'author', $fields ) ) {
+ $data['author'] = (int) $template->author;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( rest_is_field_included( 'area', $fields ) && 'wp_template_part' === $template->type ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $data['area'] = $template->area;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -703,6 +779,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'context' => array( 'embed', 'view', 'edit' ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'readonly' => true,
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'origin' => array(
+ 'description' => __( 'Source of a customized template' ),
+ 'type' => 'string',
+ 'context' => array( 'embed', 'view', 'edit' ),
+ 'readonly' => true,
+ ),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'content' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'description' => __( 'Content of template.' ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'type' => array( 'object', 'string' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -766,9 +848,23 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'context' => array( 'embed', 'view', 'edit' ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'readonly' => true,
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'author' => array(
+ 'description' => __( 'The ID for the author of the template.' ),
+ 'type' => 'integer',
+ 'context' => array( 'view', 'edit', 'embed' ),
+ ),
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 'wp_template' === $this->post_type ) {
+ $schema['properties']['is_custom'] = array(
+ 'description' => __( 'Whether a template is a custom template.' ),
+ 'type' => 'bool',
+ 'context' => array( 'embed', 'view', 'edit' ),
+ 'readonly' => true,
+ );
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( 'wp_template_part' === $this->post_type ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $schema['properties']['area'] = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'description' => __( 'Where the template part is intended for use (header, footer, etc.)' ),
</span></span></pre></div>
<a id="trunksrcwpincludesrestapiendpointsclasswprestthemescontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -320,22 +320,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // This creates a record for the current theme if not existent.
</span><span class="cx" style="display: block; padding: 0 10px"> $id = WP_Theme_JSON_Resolver::get_user_custom_post_type_id();
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $wp_query_args = array(
- 'post_status' => 'publish',
- 'post_type' => 'wp_global_styles',
- 'posts_per_page' => 1,
- 'no_found_rows' => true,
- 'fields' => 'ids',
- 'tax_query' => array(
- array(
- 'taxonomy' => 'wp_theme',
- 'field' => 'name',
- 'terms' => $theme->get_stylesheet(),
- ),
- ),
- );
- $global_styles_query = new WP_Query( $wp_query_args );
- $id = ! empty( $global_styles_query->posts ) ? array_shift( $global_styles_query->posts ) : null;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user_cpt = WP_Theme_JSON_Resolver::get_user_data_from_custom_post_type( $theme );
+ $id = isset( $user_cpt['ID'] ) ? $user_cpt['ID'] : null;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $id ) {
</span></span></pre></div>
<a id="trunksrcwpincludesthemejson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/theme.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/theme.json 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/src/wp-includes/theme.json 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,6 +1,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> {
</span><span class="cx" style="display: block; padding: 0 10px"> "version": 2,
</span><span class="cx" style="display: block; padding: 0 10px"> "settings": {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "appearanceTools": false,
</ins><span class="cx" style="display: block; padding: 0 10px"> "border": {
</span><span class="cx" style="display: block; padding: 0 10px"> "color": false,
</span><span class="cx" style="display: block; padding: 0 10px"> "radius": false,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8,12 +9,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "width": false
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "color": {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "background": true,
</ins><span class="cx" style="display: block; padding: 0 10px"> "custom": true,
</span><span class="cx" style="display: block; padding: 0 10px"> "customDuotone": true,
</span><span class="cx" style="display: block; padding: 0 10px"> "customGradient": true,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "link": false,
- "background": true,
- "text": true,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "defaultGradients": true,
+ "defaultPalette": true,
</ins><span class="cx" style="display: block; padding: 0 10px"> "duotone": [
</span><span class="cx" style="display: block; padding: 0 10px"> {
</span><span class="cx" style="display: block; padding: 0 10px"> "name": "Dark grayscale" ,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -118,6 +119,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "slug": "midnight"
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> ],
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "link": false,
</ins><span class="cx" style="display: block; padding: 0 10px"> "palette": [
</span><span class="cx" style="display: block; padding: 0 10px"> {
</span><span class="cx" style="display: block; padding: 0 10px"> "name": "Black",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -179,7 +181,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "slug": "vivid-purple",
</span><span class="cx" style="display: block; padding: 0 10px"> "color": "#9b51e0"
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ]
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ],
+ "text": true
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "spacing": {
</span><span class="cx" style="display: block; padding: 0 10px"> "blockGap": null,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -190,12 +193,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "typography": {
</span><span class="cx" style="display: block; padding: 0 10px"> "customFontSize": true,
</span><span class="cx" style="display: block; padding: 0 10px"> "dropCap": true,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "fontStyle": true,
- "fontWeight": true,
- "letterSpacing": true,
- "lineHeight": false,
- "textDecoration": true,
- "textTransform": true,
</del><span class="cx" style="display: block; padding: 0 10px"> "fontSizes": [
</span><span class="cx" style="display: block; padding: 0 10px"> {
</span><span class="cx" style="display: block; padding: 0 10px"> "name": "Small",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -222,7 +219,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "slug": "huge",
</span><span class="cx" style="display: block; padding: 0 10px"> "size": "42px"
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ]
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ],
+ "fontStyle": true,
+ "fontWeight": true,
+ "letterSpacing": true,
+ "lineHeight": false,
+ "textDecoration": true,
+ "textTransform": true
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "blocks": {
</span><span class="cx" style="display: block; padding: 0 10px"> "core/button": {
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapiwpRestTemplatesControllerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/wpRestTemplatesController.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/wpRestTemplatesController.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/tests/phpunit/tests/rest-api/wpRestTemplatesController.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -53,7 +53,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_delete_post( self::$post->ID );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> public function test_register_routes() {
</span><span class="cx" style="display: block; padding: 0 10px"> $routes = rest_get_server()->get_routes();
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( '/wp/v2/templates', $routes );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -93,6 +92,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'theme' => 'default',
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => 'my_template',
</span><span class="cx" style="display: block; padding: 0 10px"> 'source' => 'custom',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'origin' => null,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'type' => 'wp_template',
</span><span class="cx" style="display: block; padding: 0 10px"> 'description' => 'Description of my template.',
</span><span class="cx" style="display: block; padding: 0 10px"> 'title' => array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -102,6 +102,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'status' => 'publish',
</span><span class="cx" style="display: block; padding: 0 10px"> 'wp_id' => self::$post->ID,
</span><span class="cx" style="display: block; padding: 0 10px"> 'has_theme_file' => false,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'is_custom' => true,
+ 'author' => 0,
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> $this->find_and_normalize_template_by_id( $data, 'default//my_template' )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -134,6 +136,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'theme' => 'default',
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => 'my_template',
</span><span class="cx" style="display: block; padding: 0 10px"> 'source' => 'custom',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'origin' => null,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'type' => 'wp_template',
</span><span class="cx" style="display: block; padding: 0 10px"> 'description' => 'Description of my template.',
</span><span class="cx" style="display: block; padding: 0 10px"> 'title' => array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -143,6 +146,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'status' => 'publish',
</span><span class="cx" style="display: block; padding: 0 10px"> 'wp_id' => self::$post->ID,
</span><span class="cx" style="display: block; padding: 0 10px"> 'has_theme_file' => false,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'is_custom' => true,
+ 'author' => 0,
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> $data
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -149,6 +154,71 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @ticket 54507
+ * @dataProvider get_template_endpoint_urls
+ */
+ public function test_get_item_works_with_a_single_slash( $endpoint_url ) {
+ wp_set_current_user( self::$admin_id );
+ $request = new WP_REST_Request( 'GET', $endpoint_url );
+ $response = rest_get_server()->dispatch( $request );
+
+ $data = $response->get_data();
+ unset( $data['content'] );
+ unset( $data['_links'] );
+
+ $this->assertSame(
+ array(
+ 'id' => 'default//my_template',
+ 'theme' => 'default',
+ 'slug' => 'my_template',
+ 'source' => 'custom',
+ 'origin' => null,
+ 'type' => 'wp_template',
+ 'description' => 'Description of my template.',
+ 'title' => array(
+ 'raw' => 'My Template',
+ 'rendered' => 'My Template',
+ ),
+ 'status' => 'publish',
+ 'wp_id' => self::$post->ID,
+ 'has_theme_file' => false,
+ 'is_custom' => true,
+ 'author' => 0,
+ ),
+ $data
+ );
+ }
+
+ public function get_template_endpoint_urls() {
+ return array(
+ array( '/wp/v2/templates/default/my_template' ),
+ array( '/wp/v2/templates/default//my_template' ),
+ );
+ }
+
+ /**
+ * @ticket 54507
+ * @dataProvider get_template_ids_to_sanitize
+ */
+ public function test_sanitize_template_id( $input_id, $sanitized_id ) {
+ $endpoint = new WP_REST_Templates_Controller( 'wp_template' );
+ $this->assertEquals(
+ $sanitized_id,
+ $endpoint->_sanitize_template_id( $input_id )
+ );
+ }
+
+ public function get_template_ids_to_sanitize() {
+ return array(
+ array( 'tt1-blocks/index', 'tt1-blocks//index' ),
+ array( 'tt1-blocks//index', 'tt1-blocks//index' ),
+
+ array( 'theme-experiments/tt1-blocks/index', 'theme-experiments/tt1-blocks//index' ),
+ array( 'theme-experiments/tt1-blocks//index', 'theme-experiments/tt1-blocks//index' ),
+ );
+ }
+
+ /**
</ins><span class="cx" style="display: block; padding: 0 10px"> * @ticket 54422
</span><span class="cx" style="display: block; padding: 0 10px"> * @covers WP_REST_Templates_Controller::create_item
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -161,6 +231,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'description' => 'Just a description',
</span><span class="cx" style="display: block; padding: 0 10px"> 'title' => 'My Template',
</span><span class="cx" style="display: block; padding: 0 10px"> 'content' => 'Content',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'author' => self::$admin_id,
</ins><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $response = rest_get_server()->dispatch( $request );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -177,6 +248,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => 'my_custom_template',
</span><span class="cx" style="display: block; padding: 0 10px"> 'source' => 'custom',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'origin' => null,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'type' => 'wp_template',
</span><span class="cx" style="display: block; padding: 0 10px"> 'description' => 'Just a description',
</span><span class="cx" style="display: block; padding: 0 10px"> 'title' => array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -185,6 +257,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'status' => 'publish',
</span><span class="cx" style="display: block; padding: 0 10px"> 'has_theme_file' => false,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'is_custom' => true,
+ 'author' => self::$admin_id,
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> $data
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -207,6 +281,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'content' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'raw' => 'Content',
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'author' => self::$admin_id,
</ins><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $response = rest_get_server()->dispatch( $request );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -223,6 +298,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => 'my_custom_template_raw',
</span><span class="cx" style="display: block; padding: 0 10px"> 'source' => 'custom',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'origin' => null,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'type' => 'wp_template',
</span><span class="cx" style="display: block; padding: 0 10px"> 'description' => 'Just a description',
</span><span class="cx" style="display: block; padding: 0 10px"> 'title' => array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -231,11 +307,29 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'status' => 'publish',
</span><span class="cx" style="display: block; padding: 0 10px"> 'has_theme_file' => false,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'is_custom' => true,
+ 'author' => self::$admin_id,
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> $data
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_create_item_invalid_author() {
+ wp_set_current_user( self::$admin_id );
+ $request = new WP_REST_Request( 'POST', '/wp/v2/templates' );
+ $request->set_body_params(
+ array(
+ 'slug' => 'my_custom_template_invalid_author',
+ 'description' => 'Just a description',
+ 'title' => 'My Template',
+ 'content' => 'Content',
+ 'author' => -1,
+ )
+ );
+ $response = rest_get_server()->dispatch( $request );
+ $this->assertErrorResponse( 'rest_invalid_author', $response, 400 );
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @covers WP_REST_Templates_Controller::update_item
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -370,7 +464,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $response = rest_get_server()->dispatch( $request );
</span><span class="cx" style="display: block; padding: 0 10px"> $data = $response->get_data();
</span><span class="cx" style="display: block; padding: 0 10px"> $properties = $data['schema']['properties'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertCount( 11, $properties );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertCount( 14, $properties );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'id', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'description', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'slug', $properties );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -377,6 +471,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'theme', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'type', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'source', $properties );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertArrayHasKey( 'origin', $properties );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'content', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'title', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'description', $properties );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -383,6 +478,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'status', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'wp_id', $properties );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'has_theme_file', $properties );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertArrayHasKey( 'is_custom', $properties );
+ $this->assertArrayHasKey( 'author', $properties );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> protected function find_and_normalize_template_by_id( $templates, $id ) {
</span></span></pre></div>
<a id="trunktestsphpunitteststhemewpThemeJsonphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/theme/wpThemeJson.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/theme/wpThemeJson.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/tests/phpunit/tests/theme/wpThemeJson.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -200,6 +200,79 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEqualSetsWithIndex( $expected_no_origin, $actual_no_origin );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function test_get_settings_using_opt_in_key() {
+ $theme_json = new WP_Theme_JSON(
+ array(
+ 'version' => WP_Theme_JSON::LATEST_SCHEMA,
+ 'settings' => array(
+ 'appearanceTools' => true,
+ 'blocks' => array(
+ 'core/paragraph' => array(
+ 'typography' => array(
+ 'lineHeight' => false,
+ ),
+ ),
+ 'core/group' => array(
+ 'appearanceTools' => true,
+ 'typography' => array(
+ 'lineHeight' => false, // This should override appearanceTools.
+ ),
+ ),
+ ),
+ ),
+ )
+ );
+
+ $actual = $theme_json->get_settings();
+ $expected = array(
+ 'border' => array(
+ 'width' => true,
+ 'style' => true,
+ 'radius' => true,
+ 'color' => true,
+ ),
+ 'color' => array(
+ 'link' => true,
+ ),
+ 'spacing' => array(
+ 'blockGap' => true,
+ 'margin' => true,
+ 'padding' => true,
+ ),
+ 'typography' => array(
+ 'lineHeight' => true,
+ ),
+ 'blocks' => array(
+ 'core/paragraph' => array(
+ 'typography' => array(
+ 'lineHeight' => false,
+ ),
+ ),
+ 'core/group' => array(
+ 'border' => array(
+ 'width' => true,
+ 'style' => true,
+ 'radius' => true,
+ 'color' => true,
+ ),
+ 'color' => array(
+ 'link' => true,
+ ),
+ 'spacing' => array(
+ 'blockGap' => true,
+ 'margin' => true,
+ 'padding' => true,
+ ),
+ 'typography' => array(
+ 'lineHeight' => false,
+ ),
+ ),
+ ),
+ );
+
+ $this->assertEqualSetsWithIndex( $expected, $actual );
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 54336
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1060,6 +1133,144 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEqualSetsWithIndex( $expected, $actual );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_merge_incoming_data_removes_theme_presets_with_slugs_as_default_presets() {
+ $defaults = new WP_Theme_JSON(
+ array(
+ 'version' => WP_Theme_JSON::LATEST_SCHEMA,
+ 'settings' => array(
+ 'color' => array(
+ 'palette' => array(
+ array(
+ 'slug' => 'red',
+ 'color' => 'red',
+ 'name' => 'Red',
+ ),
+ array(
+ 'slug' => 'green',
+ 'color' => 'green',
+ 'name' => 'Green',
+ ),
+ ),
+ ),
+ 'blocks' => array(
+ 'core/paragraph' => array(
+ 'color' => array(
+ 'palette' => array(
+ array(
+ 'slug' => 'blue',
+ 'color' => 'blue',
+ 'name' => 'Blue',
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ 'default'
+ );
+ $theme = new WP_Theme_JSON(
+ array(
+ 'version' => WP_Theme_JSON::LATEST_SCHEMA,
+ 'settings' => array(
+ 'color' => array(
+ 'palette' => array(
+ array(
+ 'slug' => 'pink',
+ 'color' => 'pink',
+ 'name' => 'Pink',
+ ),
+ array(
+ 'slug' => 'green',
+ 'color' => 'green',
+ 'name' => 'Greenish',
+ ),
+ ),
+ ),
+ 'blocks' => array(
+ 'core/paragraph' => array(
+ 'color' => array(
+ 'palette' => array(
+ array(
+ 'slug' => 'blue',
+ 'color' => 'blue',
+ 'name' => 'Bluish',
+ ),
+ array(
+ 'slug' => 'yellow',
+ 'color' => 'yellow',
+ 'name' => 'Yellow',
+ ),
+ array(
+ 'slug' => 'green',
+ 'color' => 'green',
+ 'name' => 'Block Green',
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ )
+ );
+
+ $expected = array(
+ 'version' => WP_Theme_JSON::LATEST_SCHEMA,
+ 'settings' => array(
+ 'color' => array(
+ 'palette' => array(
+ 'default' => array(
+ array(
+ 'slug' => 'red',
+ 'color' => 'red',
+ 'name' => 'Red',
+ ),
+ array(
+ 'slug' => 'green',
+ 'color' => 'green',
+ 'name' => 'Green',
+ ),
+ ),
+ 'theme' => array(
+ array(
+ 'slug' => 'pink',
+ 'color' => 'pink',
+ 'name' => 'Pink',
+ ),
+ ),
+ ),
+ ),
+ 'blocks' => array(
+ 'core/paragraph' => array(
+ 'color' => array(
+ 'palette' => array(
+ 'default' => array(
+ array(
+ 'slug' => 'blue',
+ 'color' => 'blue',
+ 'name' => 'Blue',
+ ),
+ ),
+ 'theme' => array(
+ array(
+ 'slug' => 'yellow',
+ 'color' => 'yellow',
+ 'name' => 'Yellow',
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ );
+
+ $defaults->merge( $theme );
+ $actual = $defaults->get_raw_data();
+
+ $this->assertEqualSetsWithIndex( $expected, $actual );
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 54336
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1298,7 +1509,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'color' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'custom' => true,
</span><span class="cx" style="display: block; padding: 0 10px"> 'palette' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'user' => array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'custom' => array(
</ins><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'name' => 'Red',
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => 'red',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1325,7 +1536,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'color' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'custom' => true,
</span><span class="cx" style="display: block; padding: 0 10px"> 'palette' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'user' => array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'custom' => array(
</ins><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'name' => 'Yellow',
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => 'yellow',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1358,7 +1569,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'settings' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'color' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'palette' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'user' => array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'custom' => array(
</ins><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'name' => 'Red',
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => 'red',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1381,7 +1592,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'core/group' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'color' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'palette' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'user' => array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'custom' => array(
</ins><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'name' => 'Yellow',
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => 'yellow',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1417,7 +1628,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'settings' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'color' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'palette' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'user' => array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'custom' => array(
</ins><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'name' => 'Red/><b>ok</ok>',
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => 'red',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1443,7 +1654,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'typography' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'fontFamilies' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'user' => array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'custom' => array(
</ins><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'name' => 'Helvetica Arial/><b>test</b>',
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => 'helvetica-arial',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1471,7 +1682,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'core/group' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'color' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'palette' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'user' => array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'custom' => array(
</ins><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'name' => 'Red/><b>ok</ok>',
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => 'red',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1506,7 +1717,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'settings' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'color' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'palette' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'user' => array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'custom' => array(
</ins><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'name' => 'Pink',
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => 'pink',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1517,7 +1728,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'typography' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'fontFamilies' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'user' => array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'custom' => array(
</ins><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'name' => 'Cambria',
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => 'cambria',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1530,7 +1741,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'core/group' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'color' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'palette' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'user' => array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'custom' => array(
</ins><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'name' => 'Pink',
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => 'pink',
</span></span></pre></div>
<a id="trunktestsphpunitteststhemewpThemeJsonResolverphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -24,6 +24,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'theme_root', array( $this, 'filter_set_theme_root' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'stylesheet_root', array( $this, 'filter_set_theme_root' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'template_root', array( $this, 'filter_set_theme_root' ) );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->queries = array();
</ins><span class="cx" style="display: block; padding: 0 10px"> // Clear caches.
</span><span class="cx" style="display: block; padding: 0 10px"> wp_clean_themes_cache();
</span><span class="cx" style="display: block; padding: 0 10px"> unset( $GLOBALS['wp_themes'] );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -44,6 +45,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return 'pl_PL';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function filter_db_query( $query ) {
+ if ( preg_match( '#post_type = \'wp_global_styles\'#', $query ) ) {
+ $this->queries[] = $query;
+ }
+ return $query;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 52991
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 54336
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -312,4 +320,30 @@
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ function test_get_user_data_from_custom_post_type_does_not_use_uncached_queries() {
+ add_filter( 'query', array( $this, 'filter_db_query' ) );
+ $query_count = count( $this->queries );
+ for ( $i = 0; $i < 3; $i++ ) {
+ WP_Theme_JSON_Resolver::get_user_data_from_custom_post_type( wp_get_theme() );
+ WP_Theme_JSON_Resolver::clean_cached_data();
+ }
+ $query_count = count( $this->queries ) - $query_count;
+ $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()' );
+
+ $user_cpt = WP_Theme_JSON_Resolver::get_user_data_from_custom_post_type( wp_get_theme() );
+ $this->assertEmpty( $user_cpt );
+
+ $user_cpt = WP_Theme_JSON_Resolver::get_user_data_from_custom_post_type( wp_get_theme(), true );
+ $this->assertNotEmpty( $user_cpt );
+
+ $query_count = count( $this->queries );
+ for ( $i = 0; $i < 3; $i++ ) {
+ WP_Theme_JSON_Resolver::get_user_data_from_custom_post_type( wp_get_theme() );
+ WP_Theme_JSON_Resolver::clean_cached_data();
+ }
+ $query_count = count( $this->queries ) - $query_count;
+ $this->assertEquals( 0, $query_count, 'Unexpected SQL queries detected for the wp_global_style post type' );
+ remove_filter( 'query', array( $this, 'filter_db_query' ) );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunktestsqunitfixtureswpapigeneratedjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/qunit/fixtures/wp-api-generated.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/qunit/fixtures/wp-api-generated.js 2021-11-29 23:44:01 UTC (rev 52274)
+++ trunk/tests/qunit/fixtures/wp-api-generated.js 2021-11-30 00:22:30 UTC (rev 52275)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5117,6 +5117,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "private"
</span><span class="cx" style="display: block; padding: 0 10px"> ],
</span><span class="cx" style="display: block; padding: 0 10px"> "required": false
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ },
+ "author": {
+ "description": "The ID for the author of the template.",
+ "type": "integer",
+ "required": false
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5262,6 +5267,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "private"
</span><span class="cx" style="display: block; padding: 0 10px"> ],
</span><span class="cx" style="display: block; padding: 0 10px"> "required": false
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ },
+ "author": {
+ "description": "The ID for the author of the template.",
+ "type": "integer",
+ "required": false
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5571,6 +5581,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "private"
</span><span class="cx" style="display: block; padding: 0 10px"> ],
</span><span class="cx" style="display: block; padding: 0 10px"> "required": false
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ },
+ "author": {
+ "description": "The ID for the author of the template.",
+ "type": "integer",
+ "required": false
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5750,6 +5765,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ],
</span><span class="cx" style="display: block; padding: 0 10px"> "required": false
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "author": {
+ "description": "The ID for the author of the template.",
+ "type": "integer",
+ "required": false
+ },
</ins><span class="cx" style="display: block; padding: 0 10px"> "area": {
</span><span class="cx" style="display: block; padding: 0 10px"> "description": "Where the template part is intended for use (header, footer, etc.)",
</span><span class="cx" style="display: block; padding: 0 10px"> "type": "string",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5900,6 +5920,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ],
</span><span class="cx" style="display: block; padding: 0 10px"> "required": false
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "author": {
+ "description": "The ID for the author of the template.",
+ "type": "integer",
+ "required": false
+ },
</ins><span class="cx" style="display: block; padding: 0 10px"> "area": {
</span><span class="cx" style="display: block; padding: 0 10px"> "description": "Where the template part is intended for use (header, footer, etc.)",
</span><span class="cx" style="display: block; padding: 0 10px"> "type": "string",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6214,6 +6239,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ],
</span><span class="cx" style="display: block; padding: 0 10px"> "required": false
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "author": {
+ "description": "The ID for the author of the template.",
+ "type": "integer",
+ "required": false
+ },
</ins><span class="cx" style="display: block; padding: 0 10px"> "area": {
</span><span class="cx" style="display: block; padding: 0 10px"> "description": "Where the template part is intended for use (header, footer, etc.)",
</span><span class="cx" style="display: block; padding: 0 10px"> "type": "string",
</span></span></pre>
</div>
</div>
</body>
</html>