Make WordPress Core

Ticket #23888: 23888.diff

File 23888.diff, 869 bytes (added by wonderboymusic, 12 years ago)
  • wp-includes/media.php

    diff --git wp-includes/media.php wp-includes/media.php
    index f41f63e..c02e59c 100644
    function get_the_image( $attached_size = 'full', &$post = null ) { 
    23862386
    23872387                $count = 1;
    23882388                $matches = array();
    2389                 $content =& $post->post_content;
     2389                $_content = $post->post_content;
     2390                $content =& $_content;
    23902391
    23912392                if ( preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ) && ! empty( $matches ) ) {
    23922393                        foreach ( $matches as $shortcode ) {
    function get_the_image( $attached_size = 'full', &$post = null ) { 
    24152416                return $post->format_content;
    24162417        }
    24172418
    2418         $content =& $post->post_content;
     2419        $_content = $post->post_content;
     2420        $content =& $_content;
    24192421        $htmls = get_content_images( $content, true, true, 1 );
    24202422        if ( ! empty( $htmls ) ) {
    24212423                $html = reset( $htmls );