mirror of
git://develop.git.wordpress.org/
synced 2025-03-19 11:29:48 +01:00
Improve performance of the `wp_count_comments` function by replacing a complex query with multiple calls to the `get_comments` function. Passing the `count` parameter to the `get_comments` function results in a simple count query that returns quickly. Using `get_comments` also means that query is cached and run through filters. Props FolioVision, markjaquith, nacin, ryan, coffee2code, wonderboymusic, ComputerGuru, jb510, SergeyBiryukov, Znuff, Rahe, uday17035, spacedmonkey, peterwilsoncc. Fixes #19901. git-svn-id: https://develop.svn.wordpress.org/trunk@53036 602fd350-edb4-49c9-b593-d223f7449a82