[wp-trac] [WordPress Trac] #20904: WP_Query instances getting entangled with $wp_query global
WordPress Trac
noreply at wordpress.org
Wed Oct 29 02:31:40 UTC 2014
#20904: WP_Query instances getting entangled with $wp_query global
--------------------------+-----------------------------
Reporter: boonebgorges | Owner: boonebgorges
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Future Release
Component: Query | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses:
--------------------------+-----------------------------
Changes (by boonebgorges):
* owner: => boonebgorges
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"30085"]:
{{{
#!CommitTicketReference repository="" revision="30085"
Improve global variable setting in `setup_postdata()`.
`setup_postdata()` is responsible for setting a number of global variables
that are used for post pagination (`$pages`, `$page`, `$nextpage`) and the
generation of post excerpts (`$more`). These variables should be sensitive
to
the currently running instance of `WP_Query` - rather than the main query
-
so that these features work properly inside of secondary `WP_Query` loops.
This changeset moves the logic of `setup_postdata()` into a method on
`WP_Query`,
and converts `setup_postdata()` to a wrapper.
Props boonebgorges, wonderboymusic.
See #25349.
Fixes #9256, #20904.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/20904#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list