Make WordPress Core

Ticket #30970: 30970.patch

File 30970.patch, 835 bytes (added by mordauk, 9 years ago)
  • src/wp-includes/query.php

     
    45684568         *
    45694569         * @since 4.1.0
    45704570         *
    4571          * @param WP_Post $post Post data.
     4571         * @param WP_Post $p Post data or post ID.
    45724572         * @return bool True when finished.
    45734573         */
    4574         public function setup_postdata( $post ) {
    4575                 global $id, $authordata, $currentday, $currentmonth, $page, $pages, $multipage, $more, $numpages;
     4574        public function setup_postdata( $p ) {
     4575                global $id, $authordata, $currentday, $currentmonth, $post, $page, $pages, $multipage, $more, $numpages;
    45764576
     4577                if ( ! ( $p instanceof WP_Post ) ) {
     4578                        $p = get_post( $p );
     4579                }
     4580
     4581                $post = $p;
     4582
    45774583                $id = (int) $post->ID;
    45784584
    45794585                $authordata = get_userdata($post->post_author);