[wp-trac] [WordPress Trac] #28159: get_body_class makes a raw, uncacheable query for child posts
WordPress Trac
noreply at wordpress.org
Wed May 14 16:04:36 UTC 2014
#28159: get_body_class makes a raw, uncacheable query for child posts
--------------------------+-----------------------
Reporter: rmccue | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.0
Component: Themes | Version: 2.8
Severity: normal | Resolution:
Keywords: has-patch | Focuses: template
--------------------------+-----------------------
Changes (by obenland):
* keywords: => has-patch
* focuses: => template
* version: => 2.8
* milestone: Awaiting Review => 4.0
Comment:
Is [attachment:28159.diff] what we're looking for?
Before:
{{{
#!sql
SELECT ID FROM wp_posts WHERE post_parent = 2 AND post_type = 'page' AND
post_status = 'publish' LIMIT 1
}}}
After:
{{{
#!sql
SELECT wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_parent = 2
AND wp_posts.post_type = 'page' AND ((wp_posts.post_status = 'publish'))
ORDER BY wp_posts.post_date DESC LIMIT 0, 1
}}}
Introduced in r11053.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28159#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list