Make WordPress Core

Ticket #9256: 9256.3.diff

File 9256.3.diff, 961 bytes (added by wonderboymusic, 11 years ago)
  • src/wp-includes/query.php

     
    39303930 * @since 1.5.0
    39313931 *
    39323932 * @param object $post Post data.
     3933 * @param boolean $paginate Whether or not to read the $page global set by the original global query.
    39333934 * @uses do_action_ref_array() Calls 'the_post'
    39343935 * @return bool True when finished.
    39353936 */
    3936 function setup_postdata( $post ) {
     3937function setup_postdata( $post, $paginate = true ) {
    39373938        global $id, $authordata, $currentday, $currentmonth, $page, $pages, $multipage, $more, $numpages;
    39383939
    39393940        $id = (int) $post->ID;
     
    39443945        $currentmonth = mysql2date('m', $post->post_date, false);
    39453946        $numpages = 1;
    39463947        $multipage = 0;
    3947         $page = get_query_var('page');
     3948        $page = $paginate ? get_query_var('page') : 1;
    39483949        if ( ! $page )
    39493950                $page = 1;
    39503951        if ( is_single() || is_page() || is_feed() )