You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.
Unlinked Accounts
The following contributors have not linked their GitHub and WordPress.org accounts: @yeetien.
The loadPostTypeEntities uses the blanket rule, I guess we can do the same. IIRC, pagination can't be disabled via register_taxonomy, unless you entirely replace the controller.
Mamaduka
changed the title
Core data entities: add supportsPagination to user, comment, and plugin entities
Core Data: Add 'supportsPagination' to all appropriate entities
Aug 25, 2025
Flaky tests detected in bf36045.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What? How? Why?
This PR adds the
supportsPagination
property to rootEntitiesConfig for user, comment, and taxonomy entities.This is so
totalItems
andtotalPages
are correctly set in meta from theX-WP-Total
andX-WP-TotalPages
headers.Also, to quote #55164
An example use case would be rendering a dataviews list of comments or users, and accurate totals are required.
See: https://github.com/WordPress/gutenberg/blob/add/entities-support-pagination/packages/core-data/src/resolvers.js#L281
Closes #59520
Testing Instructions
I tested by adding a lot of users, e.g.,
Then I fetched users:
This will return 10 entries by default.
Then I checked the total:
This should return 150 (plus how many users you had already).
In trunk, you'd see
10
because that's how many users are in the store.