[wp-trac] [WordPress Trac] #62390: REST API: proposal for new endpoint to fetch post counts by post status
WordPress Trac
noreply at wordpress.org
Tue Nov 12 11:15:58 UTC 2024
#62390: REST API: proposal for new endpoint to fetch post counts by post status
-------------------------+--------------------------------------
Reporter: ramonopoly | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: trunk
Severity: normal | Keywords: has-patch has-unit-tests
Focuses: |
-------------------------+--------------------------------------
This ticket tracks proposal in Gutenberg to develop a new Core endpoint to
fetch the total number of post counts by post status using
[https://developer.wordpress.org/reference/functions/wp_count_posts/
wp_count_posts].
https://github.com/WordPress/gutenberg/pull/66294
There is a need for a performant post counts check in the block editor.
See:
https://github.com/WordPress/gutenberg/pull/65223#issuecomment-2381323815
Contrast this feature with `$query->found_posts` which returns the total
count for a specific query only and would degrade performance given `n`
posts.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62390>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list