[wp-trac] [WordPress Trac] #24347: get_the_post_format_image() should use filtered content for image extraction
WordPress Trac
noreply at wordpress.org
Wed May 15 19:56:19 UTC 2013
#24347: get_the_post_format_image() should use filtered content for image
extraction
--------------------------+-----------------------------
Reporter: ethitter | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Post Formats | Version: trunk
Severity: normal | Keywords:
--------------------------+-----------------------------
Any plugin that modifies image paths through the `image_downsize` and
`the_content` filters prevents `get_the_post_format_image()` from properly
removing the first parsed image from the content later passed to
`get_the_remaining_content()`.
When `get_the_post_format_image()` parses post content to extract an
image, the content is accessed directly from the `$post` global without
applying the `the_content` filter. In the case of a user with a CDN plugin
such as Jetpack Photon enabled, this causes the string replacement meant
to strip out the first image to fail because the image path returned by
`wp_get_attachment_image_src()` is modified through the `image_downsize`
filter. Since the corresponding filter hooked to `the_content` hasn't
modified the content the string replacement is applied to, the parsed
image isn't removed from the content.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24347>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list