Post Images: Return attachment info when using from_thumbnail#11451
Post Images: Return attachment info when using from_thumbnail#11451
Conversation
|
Caution: This PR has changes that must be merged to WordPress.com |
|
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: April 2, 2019. |
jeherve
left a comment
There was a problem hiding this comment.
Nice catch! I just have a minor nitpick.
Co-Authored-By: kraftbj <public@brandonkraft.com>
|
kraftbj, Your synced wpcom patch D25030-code has been updated. |
|
Deployed to wpcom via r188460-wpcom |
* Initial Changelog for 7.2 * Testing list: add mention of IE11 testing * Initial Changelog for 7.2 * Testing list: add mention of IE11 testing * Add CL for #11224 * Add CL for #11426 * Add CL for #11442 * Add testing instructions for #11224 * Add CL for #11451 * Reclassify CL item * Add testing instructions for #11451 * Add CL for #11486 * Add CL for #11418 * Add CL for #11524 * Add CL and testing instructions for #11449 * Add CL for #11460 * Add CL for #11520 and #11582 * Add CL for #11531 * Add CL #11644 * Add testing instructions for #11644 * Add testing instructions for #11644 * Add CL for #11618 * Uniform changelog lines * CL #11679 * CL #11661 * CL #11654 * CL #11645 * CL #11643 * CL #11636 * CL #11635 and for other PHPCS commits * CL #11627 * CL #11626 * CL #11598 * CL #11596 * Remove nested items for shortcopy. I don't believe the detailed list is helpful * CL #11570 * CL #11569 * CL #11560 * CL #11558 * CL #11555 * CL #6704 * CL #11298 * CL #11324 * CL #11443 * CL #11484 * CL #11516 * CL #11529 * Expand Ads block enhancement CL item
The
Jetpack_PostImagesclass returns no post image for anattachmentpost type. We should return the image.I attached it onto the
from_thumbnailgroup since the attachment's "featured image" is itself, which made more sense to me than the other groups, not to mention matches the intent (thefrom_htmlandfrom_attachmentis kinda weird and, personally, something I would often opt out of using).Fixes #11413
Changes proposed in this Pull Request:
Testing instructions:
Jetpack_PostImages::get_image( [the id] ); viawp shellProposed changelog entry for your changes: