Opened 9 years ago
Closed 9 years ago
#41789 closed defect (bug) (fixed)
get_sites() returns an integer when 'count' is passed as a query var
| Reported by: | ocean90 | Owned by: | jeremyfelt |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.9 |
| Component: | Networks and Sites | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | docs, multisite |
Description
But the current @return tag only mentions an array.
Attachments (1)
Change History (13)
#3
@
9 years ago
@johnbillion That specificity is incorrect. get_sites() can also return an array of IDs.
Also, why didn't you update get_sites()? And while we're on it, we should probably make the docs consistent across all the query classes.
#4
@
9 years ago
- Keywords needs-patch added
- Resolution fixed
- Status closed → reopened
Let's try again.
This ticket was mentioned in Slack in #core-multisite by jeremyfelt. View the logs.
9 years ago
This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.
9 years ago
#7
@
9 years ago
How about:
array|int Defaults to list of WP_Site objects. A list of site ids when 'fields' is set to 'ids'. The number of sites when 'count' is passed as a query var.
- On
WP_Site_Query'squery()andget_sites()and in theget_sites()function. - Similarly with networks on
WP_Network_Query'squery()andget_networks()and in theget_networks()function.
This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.
9 years ago
This ticket was mentioned in Slack in #core by melchoyce. View the logs.
9 years ago
#11
@
9 years ago
- Keywords has-patch added; needs-patch removed
- Owner changed from to
- Status reopened → reviewing
Let's go with 41789.diff for 4.9. We can address the documentation of other queries in another ticket.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 41331: