Opened 5 hours ago
Last modified 5 hours ago
#64608 new enhancement
Backport: Add Terms Query Pagination blocks
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | trunk |
| Component: | Editor | Keywords: | has-patch |
| Focuses: | Cc: |
Description
Introduce new blocks to enable pagination for terms queries, including "Previous", "Next", and "Page Numbers" links.
Change History (1)
This ticket was mentioned in PR #10872 on WordPress/wordpress-develop by @jillro.
5 hours ago
#1
Note: See
TracTickets for help on using
tickets.
Adds
build_terms_query_vars_from_block()andterms_query_register_query_vars()towp-includes/blocks.phpto support pagination in the Terms Query block.These helper functions are used by:
termspagequery variable)core/terms-query-pagination,core/terms-query-pagination-next,core/terms-query-pagination-previous,core/terms-query-pagination-numbers)build_terms_query_vars_from_block()extracts and normalizes query arguments from the block context, handling both inherited (taxonomy archive) and custom term queries. It follows the same pattern as the existingbuild_query_vars_from_query_block()andbuild_comment_query_vars_from_block().terms_query_register_query_vars()registerstermspageas a public query variable so it can be used for pagination URLs.The block files themselves (block.json, index.php, CSS, JS) are synced automatically via the Gutenberg build process.