Make WordPress Core

Ticket #23964: 23964.3.diff

File 23964.3.diff, 638 bytes (added by wonderboymusic, 12 years ago)

Don't double-link

  • wp-includes/media.php

    diff --git wp-includes/media.php wp-includes/media.php
    index bd52867..81c3c4b 100644
    function get_the_post_format_image( $attached_size = 'full', &$post = null ) { 
    24162416                else
    24172417                        $image = $meta['image'];
    24182418
    2419                 $post->format_content = sprintf( $link_fmt, $image );
     2419                if ( false === strpos( $image, '<a ' ) )
     2420                        $post->format_content = sprintf( $link_fmt, $image );
     2421                else
     2422                        $post->format_content = $image;
    24202423                return $post->format_content;
    24212424        }
    24222425
    function attachment_url_to_postid( $url ) { 
    25082511        }
    25092512
    25102513        return 0;
    2511 }
    2512  No newline at end of file
     2514}