Ticket #9256: 9256.3.diff
File 9256.3.diff, 961 bytes (added by , 11 years ago) |
---|
-
src/wp-includes/query.php
3930 3930 * @since 1.5.0 3931 3931 * 3932 3932 * @param object $post Post data. 3933 * @param boolean $paginate Whether or not to read the $page global set by the original global query. 3933 3934 * @uses do_action_ref_array() Calls 'the_post' 3934 3935 * @return bool True when finished. 3935 3936 */ 3936 function setup_postdata( $post ) {3937 function setup_postdata( $post, $paginate = true ) { 3937 3938 global $id, $authordata, $currentday, $currentmonth, $page, $pages, $multipage, $more, $numpages; 3938 3939 3939 3940 $id = (int) $post->ID; … … 3944 3945 $currentmonth = mysql2date('m', $post->post_date, false); 3945 3946 $numpages = 1; 3946 3947 $multipage = 0; 3947 $page = get_query_var('page');3948 $page = $paginate ? get_query_var('page') : 1; 3948 3949 if ( ! $page ) 3949 3950 $page = 1; 3950 3951 if ( is_single() || is_page() || is_feed() )