-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Query: Add migration of colors to v2 deprecation (#46522)
- Loading branch information
1 parent
a3db417
commit 1d62d0d
Showing
5 changed files
with
238 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
test/integration/fixtures/blocks/core__query__deprecated-2-with-colors.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!-- wp:query {"queryId":19,"query":{"perPage":3,"pages":0,"offset":0,"postType":"post","categoryIds":[3,5],"tagIds":[6],"order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false},"style":{"color":{"background":"#284d5f"},"elements":{"link":{"color":{"text":"var:preset|color|luminous-vivid-amber"}}}},"textColor":"pale-cyan-blue"} --> | ||
<div class="wp-block-query has-pale-cyan-blue-color has-text-color has-background has-link-color" style="background-color:#284d5f"><!-- wp:post-template --> | ||
<!-- wp:post-title /--> | ||
<!-- /wp:post-template --> | ||
</div> | ||
<!-- /wp:query --> |
72 changes: 72 additions & 0 deletions
72
test/integration/fixtures/blocks/core__query__deprecated-2-with-colors.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
[ | ||
{ | ||
"name": "core/query", | ||
"isValid": true, | ||
"attributes": { | ||
"queryId": 19, | ||
"query": { | ||
"perPage": 3, | ||
"pages": 0, | ||
"offset": 0, | ||
"postType": "post", | ||
"order": "desc", | ||
"orderBy": "date", | ||
"author": "", | ||
"search": "", | ||
"exclude": [], | ||
"sticky": "", | ||
"inherit": false, | ||
"taxQuery": { | ||
"category": [ 3, 5 ], | ||
"post_tag": [ 6 ] | ||
} | ||
}, | ||
"tagName": "div", | ||
"displayLayout": { | ||
"type": "list" | ||
} | ||
}, | ||
"innerBlocks": [ | ||
{ | ||
"name": "core/group", | ||
"isValid": true, | ||
"attributes": { | ||
"tagName": "div", | ||
"textColor": "pale-cyan-blue", | ||
"style": { | ||
"color": { | ||
"background": "#284d5f" | ||
}, | ||
"elements": { | ||
"link": { | ||
"color": { | ||
"text": "var:preset|color|luminous-vivid-amber" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"innerBlocks": [ | ||
{ | ||
"name": "core/post-template", | ||
"isValid": true, | ||
"attributes": {}, | ||
"innerBlocks": [ | ||
{ | ||
"name": "core/post-title", | ||
"isValid": true, | ||
"attributes": { | ||
"level": 2, | ||
"isLink": false, | ||
"rel": "", | ||
"linkTarget": "_self" | ||
}, | ||
"innerBlocks": [] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] |
59 changes: 59 additions & 0 deletions
59
test/integration/fixtures/blocks/core__query__deprecated-2-with-colors.parsed.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
[ | ||
{ | ||
"blockName": "core/query", | ||
"attrs": { | ||
"queryId": 19, | ||
"query": { | ||
"perPage": 3, | ||
"pages": 0, | ||
"offset": 0, | ||
"postType": "post", | ||
"categoryIds": [ 3, 5 ], | ||
"tagIds": [ 6 ], | ||
"order": "desc", | ||
"orderBy": "date", | ||
"author": "", | ||
"search": "", | ||
"exclude": [], | ||
"sticky": "", | ||
"inherit": false | ||
}, | ||
"style": { | ||
"color": { | ||
"background": "#284d5f" | ||
}, | ||
"elements": { | ||
"link": { | ||
"color": { | ||
"text": "var:preset|color|luminous-vivid-amber" | ||
} | ||
} | ||
} | ||
}, | ||
"textColor": "pale-cyan-blue" | ||
}, | ||
"innerBlocks": [ | ||
{ | ||
"blockName": "core/post-template", | ||
"attrs": {}, | ||
"innerBlocks": [ | ||
{ | ||
"blockName": "core/post-title", | ||
"attrs": {}, | ||
"innerBlocks": [], | ||
"innerHTML": "", | ||
"innerContent": [] | ||
} | ||
], | ||
"innerHTML": "\n\n", | ||
"innerContent": [ "\n", null, "\n" ] | ||
} | ||
], | ||
"innerHTML": "\n<div class=\"wp-block-query has-pale-cyan-blue-color has-text-color has-background has-link-color\" style=\"background-color:#284d5f\">\n</div>\n", | ||
"innerContent": [ | ||
"\n<div class=\"wp-block-query has-pale-cyan-blue-color has-text-color has-background has-link-color\" style=\"background-color:#284d5f\">", | ||
null, | ||
"\n</div>\n" | ||
] | ||
} | ||
] |
7 changes: 7 additions & 0 deletions
7
test/integration/fixtures/blocks/core__query__deprecated-2-with-colors.serialized.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!-- wp:query {"queryId":19,"query":{"perPage":3,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"taxQuery":{"category":[3,5],"post_tag":[6]}},"displayLayout":{"type":"list"}} --> | ||
<div class="wp-block-query"><!-- wp:group {"textColor":"pale-cyan-blue","style":{"color":{"background":"#284d5f"},"elements":{"link":{"color":{"text":"var:preset|color|luminous-vivid-amber"}}}}} --> | ||
<div class="wp-block-group has-pale-cyan-blue-color has-text-color has-background has-link-color" style="background-color:#284d5f"><!-- wp:post-template --> | ||
<!-- wp:post-title /--> | ||
<!-- /wp:post-template --></div> | ||
<!-- /wp:group --></div> | ||
<!-- /wp:query --> |