Skip to content

feat: SiteQuery and NetworkQuery (multisite) - #11

Merged
ogorzalka merged 1 commit into
mainfrom
feat/site-network-query
Oct 15, 2026
Merged

ogorzalka merged 1 commit into
mainfrom
feat/site-network-query

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

Stacked on #10.

New SiteQuery (WP_Site_Query) and NetworkQuery (WP_Network_Query). All documented parameters are covered, except ID (use whereIn([$id]) / find($id)) and top-level order (carried by the orderby map).

  • Reuses metaQuery(), dateQuery(), MetaField, OrdersByMap, LimitsResults; new concerns RetrievesRecords (first/ids/count/exists, now also used by CommentQuery), SelectsIds, DisablesOrder, SkipsFoundRows, FiltersByDomainAndPath
  • Decision to review: SiteQuery sends number => 0 by default. WP_Site_Query otherwise returns at most 100 sites, silently. limit() restores a cap.
  • Tests use shared WP_*_Query doubles (WpQueryDouble trait in tests/helpers/wp.php)

Pest: 240 passed.

…_Query

- SiteQuery/NetworkQuery reusing the meta, date, order, limit and field concerns
- RetrievesRecords concern shared by CommentQuery, SiteQuery and NetworkQuery (first, ids, count, exists)
- SiteQuery removes the silent 100 sites cap of WP_Site_Query (number => 0)
- shared WP_*_Query test doubles
@ogorzalka
ogorzalka changed the base branch from feat/comment-query to main October 15, 2026 14:07
@ogorzalka
ogorzalka merged commit 03313a6 into main Oct 15, 2026
2 checks passed
@ogorzalka
ogorzalka deleted the feat/site-network-query branch October 15, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant