[wp-trac] [WordPress Trac] #42072: Add limit 1 to domain_exists
WordPress Trac
noreply at wordpress.org
Tue Oct 3 19:06:19 UTC 2017
#42072: Add limit 1 to domain_exists
--------------------------------------+------------------------
Reporter: spacedmonkey | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.9
Component: Networks and Sites | Version: 4.6
Severity: normal | Resolution:
Keywords: good-first-bug has-patch | Focuses: multisite
--------------------------------------+------------------------
Changes (by jeremyfelt):
* keywords: good-first-bug needs-unit-tests has-patch => good-first-bug
has-patch
* milestone: Awaiting Review => 4.9
Comment:
I think we're okay to use `get_site_by()` here. While a full object is
returned, `domain_exists()` is not widely used and because only one result
is being returned, the performance difference is negligible. See
[attachment:42072.2.diff]. Tests exist for `domain_exists()` and those
continue to pass.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42072#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list