Opened 7 years ago
Closed 7 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 |
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Networks and Sites | Keywords: | has-patch |
Focuses: | docs, multisite | Cc: |
Description
But the current @return tag only mentions an array.
Attachments (1)
Change History (13)
#3
@
7 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
@
7 years ago
- Keywords needs-patch added
- Resolution fixed deleted
- Status changed from closed to reopened
Let's try again.
This ticket was mentioned in Slack in #core-multisite by jeremyfelt. View the logs.
7 years ago
This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.
7 years ago
#7
@
7 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.
7 years ago
This ticket was mentioned in Slack in #core by melchoyce. View the logs.
7 years ago
#11
@
7 years ago
- Keywords has-patch added; needs-patch removed
- Owner changed from ocean90 to jeremyfelt
- Status changed from reopened to reviewing
Let's go with 41789.diff for 4.9. We can address the documentation of other queries in another ticket.
In 41331: