[wp-trac] [WordPress Trac] #56992: The Loop displays incorrect data for queries started with `fields => 'id=>parent'`.
WordPress Trac
noreply at wordpress.org
Wed Mar 5 22:12:23 UTC 2025
#56992: The Loop displays incorrect data for queries started with `fields =>
'id=>parent'`.
-------------------------------------------------+-------------------------
Reporter: peterwilsoncc | Owner:
| peterwilsoncc
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.8
Component: Query | Version: 3.1
Severity: normal | Resolution: fixed
Keywords: 2nd-opinion has-patch has-unit- | Focuses:
tests |
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"59937" 59937]:
{{{
#!CommitTicketReference repository="" revision="59937"
Query: Ensure preview links show autosave content to logged in users.
Ensures that the global post object is populated with the autosave post
when a preview link is used for a published post. This allows post authors
to preview the changes to a post prior to publication.
This modifies `WP_Query::the_post()` to only call `get_post()` if
`WP_Query::$posts` does not contain `WP_Post` objects. Other data types
(`stdClass` or numeric) indicates partial data was queried, a `WP_Post`
object indicates the full data was queried and populated.
Props peterwilsoncc, mamaduka, wildworks, audrasjb.
Fixes #56992.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56992#comment:29>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list