WordPress.org

Make WordPress Core

Ticket #9256: 9256.2.diff

File 9256.2.diff, 974 bytes (added by wonderboymusic, 6 years ago)
  • wp-includes/query.php

    diff --git wp-includes/query.php wp-includes/query.php
    index 04286aa..afca556 100644
    function wp_old_slug_redirect() { 
    36363636 * @since 1.5.0
    36373637 *
    36383638 * @param object $post Post data.
     3639 * @param boolean $paginate Whether or not to read the $page global set by the original global query.
    36393640 * @uses do_action_ref_array() Calls 'the_post'
    36403641 * @return bool True when finished.
    36413642 */
    3642 function setup_postdata( $post ) {
     3643function setup_postdata( $post, $paginate = true ) {
    36433644        global $id, $authordata, $currentday, $currentmonth, $page, $pages, $multipage, $more, $numpages;
    36443645
    36453646        $id = (int) $post->ID;
    function setup_postdata( $post ) { 
    36503651        $currentmonth = mysql2date('m', $post->post_date, false);
    36513652        $numpages = 1;
    36523653        $multipage = 0;
    3653         $page = get_query_var('page');
     3654        $page = $paginate ? get_query_var('page') : 1;
    36543655        if ( ! $page )
    36553656                $page = 1;
    36563657        if ( is_single() || is_page() || is_feed() )