Ticket #23888: 23888.3.diff
File 23888.3.diff, 1.1 KB (added by , 12 years ago) |
---|
-
wp-includes/media.php
2069 2069 } 2070 2070 } 2071 2071 2072 // these functions expected a reference, not a value 2073 $_content = $post->post_content; 2074 $content =& $_content; 2072 // these functions expect a reference, so we should make a copy of post content to avoid changing it 2073 $content = $post->post_content; 2075 2074 2076 2075 $htmls = get_content_media( $type, $content, true, true ); 2077 2076 if ( ! empty( $htmls ) ) { … … 2386 2385 2387 2386 $count = 1; 2388 2387 $matches = array(); 2389 $content = &$post->post_content;2388 $content = $post->post_content; 2390 2389 2391 2390 if ( preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ) && ! empty( $matches ) ) { 2392 2391 foreach ( $matches as $shortcode ) { … … 2415 2414 return $post->format_content; 2416 2415 } 2417 2416 2418 $content = &$post->post_content;2417 $content = $post->post_content; 2419 2418 $htmls = get_content_images( $content, true, true, 1 ); 2420 2419 if ( ! empty( $htmls ) ) { 2421 2420 $html = reset( $htmls );