Changeset 23819 for trunk/wp-includes/query.php
- Timestamp:
- 03/27/2013 06:34:59 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/query.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r23804 r23819 3678 3678 */ 3679 3679 function setup_postdata($post) { 3680 global $id, $authordata, $currentday, $currentmonth, $page, $pages, $ multipage, $more, $numpages;3680 global $id, $authordata, $currentday, $currentmonth, $page, $pages, $format_pages, $multipage, $more, $numpages; 3681 3681 3682 3682 $id = (int) $post->ID; … … 3692 3692 if ( is_single() || is_page() || is_feed() ) 3693 3693 $more = 1; 3694 $content = $post->post_content; 3694 $split_content = $content = $post->post_content; 3695 $format = get_post_format( $post ); 3696 if ( $format && in_array( $format, array( 'image', 'audio', 'video' ) ) ) { 3697 switch ( $format ) { 3698 case 'image': 3699 get_the_image( 'full', $post ); 3700 if ( isset( $post->split_content ) ) 3701 $split_content = $post->split_content; 3702 break; 3703 case 'audio': 3704 get_the_media( 'audio', $post ); 3705 if ( isset( $post->split_content ) ) 3706 $split_content = $post->split_content; 3707 break; 3708 case 'video': 3709 get_the_media( 'video', $post ); 3710 if ( isset( $post->split_content ) ) 3711 $split_content = $post->split_content; 3712 break; 3713 } 3714 } 3715 3695 3716 if ( strpos( $content, '<!--nextpage-->' ) ) { 3696 3717 if ( $page > 1 ) 3697 3718 $more = 1; 3698 3719 $multipage = 1; 3699 $content = str_replace("\n<!--nextpage-->\n", '<!--nextpage-->', $content); 3700 $content = str_replace("\n<!--nextpage-->", '<!--nextpage-->', $content); 3701 $content = str_replace("<!--nextpage-->\n", '<!--nextpage-->', $content); 3702 $pages = explode('<!--nextpage-->', $content); 3703 $numpages = count($pages); 3720 $pages = paginate_content( $content ); 3721 $format_pages = paginate_content( $split_content ); 3722 $numpages = count( $pages ); 3704 3723 } else { 3705 3724 $pages = array( $post->post_content ); 3725 $format_pages = array( $split_content ); 3706 3726 $multipage = 0; 3707 3727 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)