[wp-trac] [WordPress Trac] #56948: WP_Query::the_post causes a type warning when querying for ids, not full post objects
WordPress Trac
noreply at wordpress.org
Thu Nov 3 00:51:10 UTC 2022
#56948: WP_Query::the_post causes a type warning when querying for ids, not full
post objects
--------------------------------------+---------------------
Reporter: konyoldeath | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.1.1
Component: Query | Version: 6.1
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+---------------------
Comment (by TimothyBlynJacobs):
> I experimented with warming the cache when a subset of fields was
requested (either ids or id=>parent) but it was a little complex with the
latter as there's no way of knowing whether the developer intends to use
the posts or the post parents.
Doesn't initializing the loop indicate that they are at minimum going to
use the posts? Since each loop will call `setup_postdata`?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56948#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list