Fix mangled image output in compat function.

props wonderboymusic. see #24175.

git-svn-id: http://core.svn.wordpress.org/trunk@24078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith
2013-04-25 02:18:49 +00:00
parent 5f08d11b11
commit cd0bbd830c
2 changed files with 25 additions and 11 deletions

View File

@@ -2428,7 +2428,7 @@ function get_the_post_format_image( $attached_size = 'full', &$post = null ) {
// wrap image in <a>
if ( ! empty( $meta['url'] ) )
$image = sprint( $link_fmt, $image );
} elseif ( has_shortcode( $meta['image'], 'gallery' ) ) {
} elseif ( has_shortcode( $meta['image'], 'caption' ) ) {
// wrap <img> in <a>
if ( ! empty( $meta['url'] ) && false === strpos( $meta['image'], '<a ' ) ) {
$meta['image'] = preg_replace(