-
Notifications
You must be signed in to change notification settings - Fork 799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post Images: look for images in inner blocks. #13358
Conversation
This adds 3 new tests, to cover columns blocks with attachment images as well as external images
Caution: This PR has changes that must be merged to WordPress.com |
Fixes #13338 Until now, we only parsed blocks that included images right away. However, some blocks may include some other, inner, blocks. Let's go 2 levels deep to look for blocks that we support and that may include images. This allows us to support, for example, a colunms block that would include an image block as well as a text block.
80844f2
to
af615a4
Compare
jeherve, Your synced wpcom patch D32151-code has been updated. |
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: October 1, 2019. |
jeherve, Your synced wpcom patch D32151-code has been updated. |
One gap I discovered in testing is the I added a commit to handle this, so leaving as needs review for at least that second commit. Approving it so @jeherve can be that reviewer of my change. :) |
This looks good to me, thanks for the addition! Merging. |
* Changelog: initial set of changes for 7.8 * Changelog: add #13310 * Changelog: add #13103 * Changelog: add #13426 * Changelog: add #13389 * Changelog: add #13449 * Changelog: add #13461 * Changelog: add #13460 * Changelog: add #13441 * Changelog: add #13454 * Changelog: add #13457 * Changelog: add #13425 * Changelog: add #13473 * Changelog: add #13355 * Changelog: add #13451 * Changelog: add #13358 * Changelog: add #13464 * Changelog: add #13416 * Changelog: add #13494 * Changelog: add #13465 * Changelog: add #13424 * Changelog: add #13432 * Changelog: add #13471 * Changelog: add 7.7.2 entry * Changelog: add #13446 * Add more testing elements
* Changelog: initial set of changes for 7.8 * Changelog: add #13310 * Changelog: add #13103 * Changelog: add #13426 * Changelog: add #13389 * Changelog: add #13449 * Changelog: add #13461 * Changelog: add #13460 * Changelog: add #13441 * Changelog: add #13454 * Changelog: add #13457 * Changelog: add #13425 * Changelog: add #13473 * Changelog: add #13355 * Changelog: add #13451 * Changelog: add #13358 * Changelog: add #13464 * Changelog: add #13416 * Changelog: add #13494 * Changelog: add #13465 * Changelog: add #13424 * Changelog: add #13432 * Changelog: add #13471 * Changelog: add 7.7.2 entry * Changelog: add #13446 * Add more testing elements
Fixes #13338
Changes proposed in this Pull Request:
Until now, we only parsed blocks that included images right away. However, some blocks may include some other, inner, blocks.
Let's go 2 levels deep to look for blocks that we support and that may include images.
This allows us to support, for example, a colunms block that would include an image block as well as a text block.
Testing instructions:
og:image
meta tag. It should list your image.og:image
meta tag. Your image is not listed.og:image
meta tags now work even with posts with columns blocks.You can repeat this with Gallery blocks, tiled galleries, slideshows, all inside columns blocks.
You can also try installing the Kadence Blocks – Gutenberg Page Builder Toolkit plugin, and insert a Row layout block instead of a columns block. See that everything keeps working.
Proposed changelog entry for your changes: