Changeset 24301 for trunk/wp-includes/query.php
- Timestamp:
- 05/20/2013 11:05:50 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/query.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r24115 r24301 3682 3682 * @return bool True when finished. 3683 3683 */ 3684 function setup_postdata( $post) {3685 global $id, $authordata, $currentday, $currentmonth, $page, $pages, $ format_pages, $multipage, $more, $numpages;3684 function setup_postdata( $post ) { 3685 global $id, $authordata, $currentday, $currentmonth, $page, $pages, $multipage, $more, $numpages; 3686 3686 3687 3687 $id = (int) $post->ID; … … 3693 3693 $numpages = 1; 3694 3694 $page = get_query_var('page'); 3695 if ( ! $page )3695 if ( ! $page ) 3696 3696 $page = 1; 3697 3697 if ( is_single() || is_page() || is_feed() ) 3698 3698 $more = 1; 3699 $split_content = $content = $post->post_content; 3700 $format = get_post_format( $post ); 3701 if ( $format && in_array( $format, array( 'image', 'audio', 'video', 'quote' ) ) ) { 3702 switch ( $format ) { 3703 case 'image': 3704 get_the_post_format_image( 'full', $post ); 3705 if ( isset( $post->split_content ) ) 3706 $split_content = $post->split_content; 3707 break; 3708 case 'audio': 3709 get_the_post_format_media( 'audio', $post, 1 ); 3710 if ( isset( $post->split_content ) ) 3711 $split_content = $post->split_content; 3712 break; 3713 case 'video': 3714 get_the_post_format_media( 'video', $post, 1 ); 3715 if ( isset( $post->split_content ) ) 3716 $split_content = $post->split_content; 3717 break; 3718 case 'quote': 3719 get_the_post_format_quote( $post ); 3720 if ( isset( $post->split_content ) ) 3721 $split_content = $post->split_content; 3722 break; 3723 } 3724 } 3725 3726 if ( strpos( $content, '<!--nextpage-->' ) ) { 3727 if ( $page > 1 ) 3699 3700 extract( wp_parse_post_content( $post, false ) ); 3701 3702 if ( $multipage && ( $page > 1 ) ) 3728 3703 $more = 1; 3729 $multipage = 1;3730 $pages = paginate_content( $content );3731 $format_pages = paginate_content( $split_content );3732 $numpages = count( $pages );3733 } else {3734 $pages = array( $post->post_content );3735 $format_pages = array( $split_content );3736 $multipage = 0;3737 }3738 3704 3739 3705 do_action_ref_array('the_post', array(&$post));
Note: See TracChangeset
for help on using the changeset viewer.