Lazy load $wp_query->found_posts
|Reported by:||scribu||Owned by:|
Description (last modified by scribu)
prettyboymp in #10964:
For the most part, the found posts result is only needed for the main loop where paging is involved, yet, most developers don't know to add the 'no_found_rows' parameter to every single WP_Query request where they don't need paging. It would require creating a magic get() method for backwards compatibility, but it can throw a deprecated warning and switch to a real getter implementation.