Opened 12 years ago
Closed 11 years ago
#24188 closed defect (bug) (fixed)
Post Formats: get_the_post_format_image doesn't return the requested size
Reported by: | kovshenin | Owned by: | markjaquith |
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | normal | Version: | 3.6 |
Component: | Post Formats | Keywords: | has-patch |
Focuses: | Cc: |
Description
The new get_the_post_format_image
function accepts an $attached_size
argument, but the value is ignored for the following cases:
- Image meta has a caption shortcode and image HTML
- Image meta is an image URL
- Image meta is an image HTML string
- Image meta is empty, but content contains image HTML
The only way this seems to work as expected is when the get_attached_images
-way and when the meta is numeric.
Attachments (2)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Related to #23945 and #24002 but not duplicates. This has nothing to do with the way results are cached.
24188.diff introduces a new function to get an attachment ID out of HTML containing an image. This function is then used in
get_the_post_format_image
where applicable. Somewhat regex-heavy.