<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[24400] trunk/wp-includes: Lose content removal and splitting from the media extraction functions.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/24400">24400</a></dd>
<dt>Author</dt> <dd>markjaquith</dd>
<dt>Date</dt> <dd>2013-06-03 19:27:58 +0000 (Mon, 03 Jun 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Lose content removal and splitting from the media extraction functions.

see <a href="http://core.trac.wordpress.org/ticket/24484">#24484</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesmediaphp">trunk/wp-includes/media.php</a></li>
<li><a href="#trunkwpincludespostphp">trunk/wp-includes/post.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/media.php (24399 => 24400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/media.php      2013-06-02 16:26:10 UTC (rev 24399)
+++ trunk/wp-includes/media.php 2013-06-03 19:27:58 UTC (rev 24400)
</span><span class="lines">@@ -1901,19 +1901,16 @@
</span><span class="cx">  * @param string $type Type of media: audio or video
</span><span class="cx">  * @param string $content A string which might contain media data.
</span><span class="cx">  * @param boolean $html Whether to return HTML or URLs
</span><del>- * @param boolean $remove Whether to remove the found URL from the passed content.
</del><span class="cx">  * @param int $limit Optional. The number of medias to return
</span><span class="cx">  * @return array A list of parsed shortcodes or extracted srcs
</span><span class="cx">  */
</span><del>-function get_content_media( $type, &$content, $html = true, $remove = false, $limit = 0 ) {
</del><ins>+function get_content_media( $type, $content, $html = true, $limit = 0 ) {
</ins><span class="cx">   $items = array();
</span><span class="cx"> 
</span><span class="cx">  if ( preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ) && ! empty( $matches ) ) {
</span><span class="cx">          foreach ( $matches as $shortcode ) {
</span><span class="cx">                  if ( $type === $shortcode[2] ) {
</span><span class="cx">                          $count = 1;
</span><del>-                               if ( $remove )
-                                       $content =& str_replace( $shortcode[0], '', $content, $count );
</del><span class="cx"> 
</span><span class="cx">                          $items[] = do_shortcode_tag( $shortcode );
</span><span class="cx">                          if ( $limit > 0 && count( $items ) >= $limit )
</span><span class="lines">@@ -1949,18 +1946,15 @@
</span><span class="cx">  *
</span><span class="cx">  * @param string $type Type of media: audio or video
</span><span class="cx">  * @param string $content A string which might contain media data.
</span><del>- * @param boolean $remove Whether to remove the found URL from the passed content.
</del><span class="cx">  * @param int $limit Optional. The number of galleries to return
</span><span class="cx">  * @return array A list of found HTML media embeds and possibly a URL by itself
</span><span class="cx">  */
</span><del>-function get_embedded_media( $type, &$content, $remove = false, $limit = 0 ) {
</del><ins>+function get_embedded_media( $type, $content, $limit = 0 ) {
</ins><span class="cx">   $html = array();
</span><span class="cx"> 
</span><span class="cx">  foreach ( array( $type, 'object', 'embed', 'iframe' ) as $tag ) {
</span><span class="cx">          if ( preg_match( '#' . get_tag_regex( $tag ) . '#', $content, $matches ) ) {
</span><span class="cx">                  $html[] = $matches[0];
</span><del>-                       if ( $remove )
-                               $content = str_replace( $matches[0], '', $content );
</del><span class="cx"> 
</span><span class="cx">                  if ( $limit > 0 && count( $html ) >= $limit )
</span><span class="cx">                          break;
</span><span class="lines">@@ -1973,9 +1967,6 @@
</span><span class="cx">  $lines = explode( "\n", trim( $content ) );
</span><span class="cx">  $line = trim( array_shift( $lines  ) );
</span><span class="cx">  if ( 0 === stripos( $line, 'http' ) ) {
</span><del>-               if ( $remove )
-                       $content = join( "\n", $lines );
-
</del><span class="cx">           $html[] = $line;
</span><span class="cx">  }
</span><span class="cx">  return $html;
</span><span class="lines">@@ -1988,12 +1979,11 @@
</span><span class="cx">  *
</span><span class="cx">  * @param string $content A string which might contain audio data.
</span><span class="cx">  * @param boolean $html Whether to return HTML or URLs
</span><del>- * @param boolean $remove Whether to remove the found URL from the passed content.
</del><span class="cx">  * @return array A list of lists. Each item has a list of HTML or srcs corresponding
</span><span class="cx">  *               to an [audio]'s HTML or primary src and specified fallbacks
</span><span class="cx">  */
</span><del>-function get_content_audio( &$content, $html = true, $remove = false ) {
-       return get_content_media( 'audio', $content, $html, $remove );
</del><ins>+function get_content_audio( $content, $html = true ) {
+       return get_content_media( 'audio', $content, $html );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -2003,11 +1993,10 @@
</span><span class="cx">  * @since 3.6.0
</span><span class="cx">  *
</span><span class="cx">  * @param string $content A string which might contain audio data.
</span><del>- * @param boolean $remove Whether to remove the found URL from the passed content.
</del><span class="cx">  * @return array A list of found HTML audio embeds and possibly a URL by itself
</span><span class="cx">  */
</span><del>-function get_embedded_audio( &$content, $remove = false ) {
-       return get_embedded_media( 'audio', $content, $remove );
</del><ins>+function get_embedded_audio( $content ) {
+       return get_embedded_media( 'audio', $content );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -2017,12 +2006,11 @@
</span><span class="cx">  *
</span><span class="cx">  * @param string $content A string which might contain video data.
</span><span class="cx">  * @param boolean $html Whether to return HTML or URLs
</span><del>- * @param boolean $remove Whether to remove the found URL from the passed content.
</del><span class="cx">  * @return array A list of lists. Each item has a list of HTML or srcs corresponding
</span><span class="cx">  *               to a [video]'s HTML or primary src and specified fallbacks
</span><span class="cx">  */
</span><del>-function get_content_video( &$content, $html = true, $remove = false ) {
-       return get_content_media( 'video', $content, $html, $remove );
</del><ins>+function get_content_video( $content, $html = true ) {
+       return get_content_media( 'video', $content, $html );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -2032,22 +2020,20 @@
</span><span class="cx">  * @since 3.6.0
</span><span class="cx">  *
</span><span class="cx">  * @param string $content A string which might contain video data.
</span><del>- * @param boolean $remove Whether to remove the found URL from the passed content.
</del><span class="cx">  * @return array A list of found HTML video embeds and possibly a URL by itself
</span><span class="cx">  */
</span><del>-function get_embedded_video( &$content, $remove = false ) {
-       return get_embedded_media( 'video', $content, $remove );
</del><ins>+function get_embedded_video( $content ) {
+       return get_embedded_media( 'video', $content );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="cx">  * Return suitable HTML code for output based on the content related to the global $post
</span><del>- * If found, remove the content from the @global $post's post_content field
</del><span class="cx">  *
</span><span class="cx">  * @since 3.6.0
</span><span class="cx">  *
</span><span class="cx">  * @param string $type Required. 'audio' or 'video'
</span><span class="cx">  * @param WP_Post $post Optional. Used instead of global $post when passed.
</span><del>- * @param int $limit Optional. The number of medias to remove if content is scanned.
</del><ins>+ * @param int $limit Optional. The number of medias to extract if content is scanned.
</ins><span class="cx">  * @return string HTML for the media. Blank string if no media is found.
</span><span class="cx">  */
</span><span class="cx"> function get_the_post_format_media( $type, &$post = null, $limit = 0 ) {
</span><span class="lines">@@ -2069,50 +2055,19 @@
</span><span class="cx"> 
</span><span class="cx">  $count = 1;
</span><span class="cx"> 
</span><del>-       if ( has_post_format( $type, $post ) ) {
-               $meta = get_post_format_meta( $post->ID );
-               if ( ! empty( $meta[$type . '_embed'] ) ) {
-                       $value = $meta[$type . '_embed'];
-                       if ( is_integer( $value ) ) {
-                               $url = wp_get_attachment_url( $value );
-                               $shortcode = sprintf( '[%s src="%s"]', $type, $url );
-                       } elseif ( preg_match( '/' . get_shortcode_regex() . '/s', $value ) ) {
-                               $shortcode = $value;
-                       } elseif ( preg_match( '#<[^>]+>#', $value ) ) {
-                               $post->format_content[ $cache_key ] = $value;
-                               return $post->format_content[ $cache_key ];
-                       } elseif ( 0 === strpos( $value, 'http' ) ) {
-                               $post->split_content = str_replace( $value, '', $post->post_content, $count );
-                               if ( strstr( $value, home_url() ) ) {
-                                       $shortcode = sprintf( '[%s src="%s"]', $type, $value );
-                               } else {
-                                       $post->format_content[ $cache_key ] = $wp_embed->autoembed( $value );
-                                       return $post->format_content[ $cache_key ];
-                               }
-                       }
-
-                       if ( ! empty( $shortcode ) ) {
-                               $post->format_content[ $cache_key ] = do_shortcode( $shortcode );
-                               return $post->format_content[ $cache_key ];
-                       }
-               }
-       }
-
</del><span class="cx">   // these functions expect a reference, so we should make a copy of post content to avoid changing it
</span><span class="cx">  $content = $post->post_content;
</span><span class="cx"> 
</span><del>-       $htmls = get_content_media( $type, $content, true, true, $limit );
</del><ins>+        $htmls = get_content_media( $type, $content, true, $limit );
</ins><span class="cx">   if ( ! empty( $htmls ) ) {
</span><span class="cx">          $html = reset( $htmls );
</span><del>-               $post->split_content = $content;
</del><span class="cx">           $post->format_content[ $cache_key ] = $html;
</span><span class="cx">          return $post->format_content[ $cache_key ];
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       $embeds = get_embedded_media( $type, $content, true, 1 );
</del><ins>+        $embeds = get_embedded_media( $type, $content, 1 );
</ins><span class="cx">   if ( ! empty( $embeds ) ) {
</span><span class="cx">          $embed = reset( $embeds );
</span><del>-               $post->split_content = $content;
</del><span class="cx">           if ( 0 === strpos( $embed, 'http' ) ) {
</span><span class="cx">                  if ( strstr( $embed, home_url() ) ) {
</span><span class="cx">                          $post->format_content[ $cache_key ] = do_shortcode( sprintf( '[%s src="%s"]', $type, $embed ) );
</span><span class="lines">@@ -2197,11 +2152,10 @@
</span><span class="cx">  *
</span><span class="cx">  * @param string $content A string which might contain image data.
</span><span class="cx">  * @param boolean $html Whether to return HTML or URLs
</span><del>- * @param boolean $remove Whether to remove the found data from the passed content.
</del><span class="cx">  * @param int $limit Optional. The number of image srcs to return
</span><span class="cx">  * @return array The found images or srcs
</span><span class="cx">  */
</span><del>-function get_content_images( &$content, $html = true, $remove = false, $limit = 0 ) {
</del><ins>+function get_content_images( $content, $html = true, $limit = 0 ) {
</ins><span class="cx">   $tags = array();
</span><span class="cx">  $captions = array();
</span><span class="cx"> 
</span><span class="lines">@@ -2230,14 +2184,9 @@
</span><span class="cx">                          foreach ( $captions as $caption ) {
</span><span class="cx">                                  if ( strstr( $caption, $node[0] ) ) {
</span><span class="cx">                                          $found = true;
</span><del>-                                               if ( $remove )
-                                                       $content = str_replace( $caption, '', $content, $count );
</del><span class="cx">                                   }
</span><span class="cx">                          }
</span><span class="cx"> 
</span><del>-                               if ( $remove )
-                                       $content = str_replace( $node[0], '', $content, $count );
-
</del><span class="cx">                           if ( ! $found )
</span><span class="cx">                                  $tags[] = $node[0];
</span><span class="cx"> 
</span><span class="lines">@@ -2271,11 +2220,10 @@
</span><span class="cx">  *
</span><span class="cx">  * @param string $content A string which might contain image data.
</span><span class="cx">  * @param boolean $html Whether to return HTML or URLs
</span><del>- * @param boolean $remove Whether to remove the found data from the passed content.
</del><span class="cx">  * @return string The found data
</span><span class="cx">  */
</span><del>-function get_content_image( &$content, $html = true, $remove = false ) {
-       $srcs = get_content_images( $content, $html, $remove, 1 );
</del><ins>+function get_content_image( $content, $html = true ) {
+       $srcs = get_content_images( $content, $html, 1 );
</ins><span class="cx">   if ( empty( $srcs ) )
</span><span class="cx">          return '';
</span><span class="cx"> 
</span><span class="lines">@@ -2289,11 +2237,10 @@
</span><span class="cx">  *
</span><span class="cx">  * @param string $content A string which might contain image data.
</span><span class="cx">  * @param boolean $html Whether to return HTML or data
</span><del>- * @param boolean $remove Optional. Whether to remove the found data from the passed content.
</del><span class="cx">  * @param int $limit Optional. The number of galleries to return
</span><span class="cx">  * @return array A list of galleries, which in turn are a list of their srcs in order
</span><span class="cx">  */
</span><del>-function get_content_galleries( &$content, $html = true, $remove = false, $limit = 0 ) {
</del><ins>+function get_content_galleries( $content, $html = true, $limit = 0 ) {
</ins><span class="cx">   $galleries = array();
</span><span class="cx"> 
</span><span class="cx">  if ( preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ) && ! empty( $matches ) ) {
</span><span class="lines">@@ -2301,8 +2248,6 @@
</span><span class="cx">                  if ( 'gallery' === $shortcode[2] ) {
</span><span class="cx">                          $srcs = array();
</span><span class="cx">                          $count = 1;
</span><del>-                               if ( $remove )
-                                       $content = str_replace( $shortcode[0], '', $content, $count );
</del><span class="cx"> 
</span><span class="cx">                          $data = shortcode_parse_atts( $shortcode[3] );
</span><span class="cx">                          $gallery = do_shortcode_tag( $shortcode );
</span><span class="lines">@@ -2438,63 +2383,8 @@
</span><span class="cx">          $post->format_content = array();
</span><span class="cx"> 
</span><span class="cx">  $matched = false;
</span><del>-       $meta = get_post_format_meta( $post->ID );
-
</del><span class="cx">   $link_fmt = '%s';
</span><del>-       if ( ! empty( $meta['url'] ) )
-               $link_fmt = '<a href="' . esc_url( $meta['url'] ) . '">%s</a>';
</del><span class="cx"> 
</span><del>-       if ( ! empty( $meta['image'] ) ) {
-               if ( is_numeric( $meta['image'] ) ) {
-                       $image = wp_get_attachment_image( absint( $meta['image'] ), $attached_size );
-                       // wrap image in <a>
-                       if ( ! empty( $meta['url'] ) )
-                               $image = sprintf( $link_fmt, $image );
-               } elseif ( has_shortcode( $meta['image'], 'caption' ) ) {
-                       // wrap <img> in <a>
-                       if ( ! empty( $meta['url'] ) && false === strpos( $meta['image'], '<a ' ) ) {
-                               $meta['image'] = preg_replace(
-                                       '#(<img[^>]+>)#',
-                                       sprintf( '<a href="%s">$1</a>', esc_url( $meta['url'] ) ),
-                                       $meta['image']
-                               );
-                       }
-
-                       $attachment_id = img_html_to_post_id( $meta['image'], $matched_html );
-                       if ( $attachment_id && $matched_html ) {
-                               $meta['image'] = str_replace( $matched_html, wp_get_attachment_image( $attachment_id, $attached_size ), $meta['image'] );
-                               $attachment = wp_get_attachment_image_src( $attachment_id, $attached_size );
-                               $attachment_width = ( ! empty( $attachment[1] ) ) ? $attachment[1] : 0;
-
-                               if ( $attachment_width && preg_match_all( '#width=([\'"])(.+?)\1#is', $meta['image'], $matches ) && ! empty( $matches ) )
-                                       foreach ( $matches[2] as $width )
-                                               if ( $width != $attachment_width )
-                                                       $meta['image'] = str_replace( $matches[0], sprintf( 'width="%d"', $attachment_width ), $meta['image'] );
-                       }
-
-                       $image = do_shortcode( $meta['image'] );
-               } elseif ( ! preg_match( '#<[^>]+>#', $meta['image'] ) ) {
-                       // not HTML, assume URL
-                       $attachment_id = attachment_url_to_postid( $meta['image'] );
-                       if ( $attachment_id )
-                               $image = wp_get_attachment_image( $attachment_id, $attached_size );
-                       else
-                               $image = sprintf( '<img src="%s" alt="" />', esc_url( $meta['image'] ) );
-               } else {
-                       // assume HTML
-                       $image = $meta['image'];
-                       $attachment_id = img_html_to_post_id( $image, $matched_html );
-                       if ( $attachment_id && $matched_html )
-                               $image = str_replace( $matched_html, wp_get_attachment_image( $attachment_id, $attached_size ), $image );
-               }
-
-               if ( false === strpos( $image, '<a ' ) )
-                       $post->format_content[ $cache_key ] = sprintf( $link_fmt, $image );
-               else
-                       $post->format_content[ $cache_key ] = $image;
-               return $post->format_content[ $cache_key ];
-       }
-
</del><span class="cx">   $medias = get_attached_images( $post->ID );
</span><span class="cx">  if ( ! empty( $medias ) ) {
</span><span class="cx">          $media = reset( $medias );
</span><span class="lines">@@ -2521,7 +2411,7 @@
</span><span class="cx">                                          if ( strstr( $shortcode[0], $url ) ) {
</span><span class="cx">                                                  if ( ! $matched )
</span><span class="cx">                                                          $matched = do_shortcode( $shortcode[0] );
</span><del>-                                                       $content = str_replace( $shortcode[0], '', $content, $count );
</del><ins>+                                                        // $content = str_replace( $shortcode[0], '', $content, $count );
</ins><span class="cx">                                           }
</span><span class="cx">                                  }
</span><span class="cx">                          }
</span><span class="lines">@@ -2535,14 +2425,13 @@
</span><span class="cx">                                          if ( strstr( $match[0], $url ) ) {
</span><span class="cx">                                                  if ( ! $matched )
</span><span class="cx">                                                          $matched = $match[0];
</span><del>-                                                       $content = str_replace( $match[0], '', $content, $count );
</del><ins>+                                                        // $content = str_replace( $match[0], '', $content, $count );
</ins><span class="cx">                                           }
</span><span class="cx">                                  }
</span><span class="cx">                          }
</span><span class="cx">                  }
</span><span class="cx">          }
</span><span class="cx"> 
</span><del>-               $post->split_content = $content;
</del><span class="cx">           if ( ! $matched ) {
</span><span class="cx">                  $image = wp_get_attachment_image( $media->ID, $attached_size );
</span><span class="cx">                  $post->format_content[ $cache_key ] = sprintf( $link_fmt, $image );
</span><span class="lines">@@ -2555,7 +2444,7 @@
</span><span class="cx">  }
</span><span class="cx"> 
</span><span class="cx">  $content = $post->post_content;
</span><del>-       $htmls = get_content_images( $content, true, true, 1 );
</del><ins>+        $htmls = get_content_images( $content, true, 1 );
</ins><span class="cx">   if ( ! empty( $htmls ) ) {
</span><span class="cx">          $html = reset( $htmls );
</span><span class="cx"> 
</span><span class="lines">@@ -2563,7 +2452,6 @@
</span><span class="cx">          if ( $attachment_id && $matched_html )
</span><span class="cx">                  $html = str_replace( $matched_html, wp_get_attachment_image( $attachment_id, $attached_size ), $html );
</span><span class="cx"> 
</span><del>-               $post->split_content = $content;
</del><span class="cx">           $post->format_content[ $cache_key ] = sprintf( $link_fmt, $html );
</span><span class="cx">          return $post->format_content[ $cache_key ];
</span><span class="cx">  }
</span></span></pre></div>
<a id="trunkwpincludespostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/post.php (24399 => 24400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post.php       2013-06-02 16:26:10 UTC (rev 24399)
+++ trunk/wp-includes/post.php  2013-06-03 19:27:58 UTC (rev 24400)
</span><span class="lines">@@ -577,15 +577,6 @@
</span><span class="cx">   */
</span><span class="cx">  public $format_content;
</span><span class="cx"> 
</span><del>-       /**
-        * Private variable used by post formats to cache parsed content.
-        *
-        * @since 3.6.0
-        *
-        * @var string
-        * @access private
-        */
-       public $split_content;
</del><span class="cx"> 
</span><span class="cx">  public static function get_instance( $post_id ) {
</span><span class="cx">          global $wpdb;
</span><span class="lines">@@ -4990,45 +4981,17 @@
</span><span class="cx">  * @uses paginate_content()
</span><span class="cx">  *
</span><span class="cx">  * @param object $post The post object.
</span><del>- * @param bool $remaining Whether to parse post formats from the content. Defaults to false.
</del><span class="cx">  * @return array An array of values used for paginating the parsed content.
</span><span class="cx">  */
</span><del>-function wp_parse_post_content( $post, $remaining = false ) {
</del><ins>+function wp_parse_post_content( $post ) {
</ins><span class="cx">   $numpages = 1;
</span><span class="cx"> 
</span><del>-       if ( $remaining ) {
-               $format = get_post_format( $post );
-               if ( $format && in_array( $format, array( 'image', 'audio', 'video', 'quote' ) ) ) {
-                       // Call get_the_post_format_*() to set $post->split_content
-                       switch ( $format ) {
-                               case 'image':
-                                       get_the_post_format_image( 'full', $post );
-                                       break;
-                               case 'audio':
-                                       get_the_post_format_media( 'audio', $post, 1 );
-                                       break;
-                               case 'video':
-                                       get_the_post_format_media( 'video', $post, 1 );
-                                       break;
-                               case 'quote':
-                                       get_the_post_format_quote( $post );
-                                       break;
-                       }
-               }
-       }
-
</del><span class="cx">   if ( strpos( $post->post_content, '<!--nextpage-->' ) ) {
</span><span class="cx">          $multipage = 1;
</span><del>-               if ( $remaining && isset( $post->split_content ) )
-                       $pages = paginate_content( $post->split_content );
-               else
-                       $pages = paginate_content( $post->post_content );
</del><ins>+                $pages = paginate_content( $post->post_content );
</ins><span class="cx">           $numpages = count( $pages );
</span><span class="cx">  } else {
</span><del>-               if ( $remaining && isset( $post->split_content ) )
-                       $pages = array( $post->split_content );
-               else
-                       $pages = array( $post->post_content );
</del><ins>+                $pages = array( $post->post_content );
</ins><span class="cx">           $multipage = 0;
</span><span class="cx">  }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>