[wp-trac] [WordPress Trac] #19903: wp_count_comments() and get_comments_count() both do SQL queries
WordPress Trac
noreply at wordpress.org
Mon Aug 31 18:50:13 UTC 2015
#19903: wp_count_comments() and get_comments_count() both do SQL queries
-------------------------+-----------------------------
Reporter: markjaquith | Owner: wonderboymusic
Type: enhancement | Status: closed
Priority: normal | Milestone: 4.4
Component: Comments | Version: 3.3.1
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: performance
-------------------------+-----------------------------
Changes (by wonderboymusic):
* owner: => wonderboymusic
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"33822"]:
{{{
#!CommitTicketReference repository="" revision="33822"
Comments: `wp_count_comments()` can use `get_comment_count()` internally
to makes its DB query, provided that `get_comment_count()` returns more
properties.
Adds/updates unit tests. There were zero (0) unit tests for
`wp_count_comments()`.
Fixes #19903.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/19903#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list