-
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.
Embed: Add deprecation for the caption element (#45166)
Co-authored-by: Glen Davies <glen.davies@automattic.com>
- Loading branch information
Showing
9 changed files
with
131 additions
and
26 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__embed__deprecated-1.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:embed {"url":"https://example.com/"} --> | ||
<figure class="wp-block-embed"> | ||
https://example.com/ | ||
<figcaption>Embedded content from an example URL</figcaption> | ||
</figure> | ||
<!-- /wp:embed --> |
14 changes: 14 additions & 0 deletions
14
test/integration/fixtures/blocks/core__embed__deprecated-1.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,14 @@ | ||
[ | ||
{ | ||
"name": "core/embed", | ||
"isValid": true, | ||
"attributes": { | ||
"url": "https://example.com/", | ||
"caption": "Embedded content from an example URL", | ||
"allowResponsive": true, | ||
"responsive": false, | ||
"previewable": true | ||
}, | ||
"innerBlocks": [] | ||
} | ||
] |
13 changes: 13 additions & 0 deletions
13
test/integration/fixtures/blocks/core__embed__deprecated-1.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,13 @@ | ||
[ | ||
{ | ||
"blockName": "core/embed", | ||
"attrs": { | ||
"url": "https://example.com/" | ||
}, | ||
"innerBlocks": [], | ||
"innerHTML": "\n<figure class=\"wp-block-embed\">\n https://example.com/\n <figcaption>Embedded content from an example URL</figcaption>\n</figure>\n", | ||
"innerContent": [ | ||
"\n<figure class=\"wp-block-embed\">\n https://example.com/\n <figcaption>Embedded content from an example URL</figcaption>\n</figure>\n" | ||
] | ||
} | ||
] |
5 changes: 5 additions & 0 deletions
5
test/integration/fixtures/blocks/core__embed__deprecated-1.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,5 @@ | ||
<!-- wp:embed {"url":"https://example.com/"} --> | ||
<figure class="wp-block-embed"><div class="wp-block-embed__wrapper"> | ||
https://example.com/ | ||
</div><figcaption class="wp-element-caption">Embedded content from an example URL</figcaption></figure> | ||
<!-- /wp:embed --> |
8 changes: 8 additions & 0 deletions
8
test/integration/fixtures/blocks/core__embed__deprecated-2.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,8 @@ | ||
<!-- wp:embed {"url":"https://example.com/"} --> | ||
<figure class="wp-block-embed"> | ||
<div class="wp-block-embed__wrapper"> | ||
https://example.com/ | ||
</div> | ||
<figcaption>Embedded content from an example URL</figcaption> | ||
</figure> | ||
<!-- /wp:embed --> |
14 changes: 14 additions & 0 deletions
14
test/integration/fixtures/blocks/core__embed__deprecated-2.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,14 @@ | ||
[ | ||
{ | ||
"name": "core/embed", | ||
"isValid": true, | ||
"attributes": { | ||
"url": "https://example.com/", | ||
"caption": "Embedded content from an example URL", | ||
"allowResponsive": true, | ||
"responsive": false, | ||
"previewable": true | ||
}, | ||
"innerBlocks": [] | ||
} | ||
] |
13 changes: 13 additions & 0 deletions
13
test/integration/fixtures/blocks/core__embed__deprecated-2.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,13 @@ | ||
[ | ||
{ | ||
"blockName": "core/embed", | ||
"attrs": { | ||
"url": "https://example.com/" | ||
}, | ||
"innerBlocks": [], | ||
"innerHTML": "\n<figure class=\"wp-block-embed\">\n <div class=\"wp-block-embed__wrapper\">\n https://example.com/\n </div>\n <figcaption>Embedded content from an example URL</figcaption>\n</figure>\n", | ||
"innerContent": [ | ||
"\n<figure class=\"wp-block-embed\">\n <div class=\"wp-block-embed__wrapper\">\n https://example.com/\n </div>\n <figcaption>Embedded content from an example URL</figcaption>\n</figure>\n" | ||
] | ||
} | ||
] |
5 changes: 5 additions & 0 deletions
5
test/integration/fixtures/blocks/core__embed__deprecated-2.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,5 @@ | ||
<!-- wp:embed {"url":"https://example.com/"} --> | ||
<figure class="wp-block-embed"><div class="wp-block-embed__wrapper"> | ||
https://example.com/ | ||
</div><figcaption class="wp-element-caption">Embedded content from an example URL</figcaption></figure> | ||
<!-- /wp:embed --> |