Opened 9 years ago
Closed 9 years ago
#37621 closed defect (bug) (fixed)
Incorrect docs for `$number` argument in `WP_Site_Query`
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.7 | Priority: | normal |
| Severity: | normal | Version: | 4.6 |
| Component: | Networks and Sites | Keywords: | has-patch |
| Focuses: | docs, multisite | Cc: |
Description
The docs for the $number argument of WP_Site_Query are wrong. The default value is 100, not null as it currently states.
Attachments (2)
Change History (9)
#2
@
9 years ago
I actually think that is a strange default though. It should probably rather be null, as in other queries, not limiting anything. Was there any particular reason for specifying 100 here?
#3
@
9 years ago
- Version set to trunk
Introduced in [37477] / #35791.
I assume 100 was chosen as a sane default for huge networks. For example, posts_per_page in WP_Query is limited to.
35791.4.patch:ticket:35791 was the first patch with that limit. See 12:ticket:35791.
#4
@
9 years ago
On a related note, in WP_Network_Query, $number should be Default empty rather than Default null.
#5
@
9 years ago
37621.2.diff fixes the $number docs in WP_Network_Query, and also in WP_Comment_Query (same mistake there).
37621.diff fixes the docs.