Changeset 24400 for trunk/wp-includes/post.php
- Timestamp:
- 06/03/2013 07:27:58 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/post.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r24388 r24400 578 578 public $format_content; 579 579 580 /**581 * Private variable used by post formats to cache parsed content.582 *583 * @since 3.6.0584 *585 * @var string586 * @access private587 */588 public $split_content;589 580 590 581 public static function get_instance( $post_id ) { … … 4991 4982 * 4992 4983 * @param object $post The post object. 4993 * @param bool $remaining Whether to parse post formats from the content. Defaults to false.4994 4984 * @return array An array of values used for paginating the parsed content. 4995 4985 */ 4996 function wp_parse_post_content( $post , $remaining = false) {4986 function wp_parse_post_content( $post ) { 4997 4987 $numpages = 1; 4998 4999 if ( $remaining ) {5000 $format = get_post_format( $post );5001 if ( $format && in_array( $format, array( 'image', 'audio', 'video', 'quote' ) ) ) {5002 // Call get_the_post_format_*() to set $post->split_content5003 switch ( $format ) {5004 case 'image':5005 get_the_post_format_image( 'full', $post );5006 break;5007 case 'audio':5008 get_the_post_format_media( 'audio', $post, 1 );5009 break;5010 case 'video':5011 get_the_post_format_media( 'video', $post, 1 );5012 break;5013 case 'quote':5014 get_the_post_format_quote( $post );5015 break;5016 }5017 }5018 }5019 4988 5020 4989 if ( strpos( $post->post_content, '<!--nextpage-->' ) ) { 5021 4990 $multipage = 1; 5022 if ( $remaining && isset( $post->split_content ) ) 5023 $pages = paginate_content( $post->split_content ); 5024 else 5025 $pages = paginate_content( $post->post_content ); 4991 $pages = paginate_content( $post->post_content ); 5026 4992 $numpages = count( $pages ); 5027 4993 } else { 5028 if ( $remaining && isset( $post->split_content ) ) 5029 $pages = array( $post->split_content ); 5030 else 5031 $pages = array( $post->post_content ); 4994 $pages = array( $post->post_content ); 5032 4995 $multipage = 0; 5033 4996 }
Note: See TracChangeset
for help on using the changeset viewer.