[wp-trac] [WordPress Trac] #40180: Introduce `get_site_by()` function for multisite
WordPress Trac
noreply at wordpress.org
Tue Oct 3 03:45:46 UTC 2017
#40180: Introduce `get_site_by()` function for multisite
-------------------------------------------------+-------------------------
Reporter: flixos90 | Owner: jeremyfelt
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 4.9
Component: Networks and Sites | Version:
Severity: normal | Resolution:
Keywords: has-patch dev-feedback has-unit- | Focuses: multisite
tests ms-roadmap needs-dev-note |
-------------------------------------------------+-------------------------
Changes (by jeremyfelt):
* owner: flixos90 => jeremyfelt
* status: assigned => reviewing
Comment:
In [attachment:40180.6.diff]:
* Ensure a non-empty string is passed for string fields. Previously, if an
empty string was passed for something like `domain`, `get_sites()` would
return the results of a default query (`get_sites( array( 'domain' => '' )
);`).
* Add tests for empty string values.
* Ensure a numeric value is passed when `id` is used to avoid an
unnecessary query attempt.
* Use the `site__in` parameter when `id` is used as a parameter so that
the `network_id` parameter continues to work as expected.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40180#comment:32>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list