[wp-trac] [WordPress Trac] #42072: Add limit 1 to domain_exists

WordPress Trac noreply at wordpress.org
Tue Oct 3 15:40:39 UTC 2017


#42072: Add limit 1 to domain_exists
-------------------------------------------------+-------------------------
 Reporter:  spacedmonkey                         |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Networks and Sites                   |  Review
 Severity:  normal                               |     Version:  4.6
 Keywords:  good-first-bug needs-unit-tests      |  Resolution:
  has-patch                                      |     Focuses:  multisite
-------------------------------------------------+-------------------------

Comment (by flixos90):

 We should consider simplifying the function further, by internally using
 the new `get_site_by()`. See
 https://core.trac.wordpress.org/ticket/40180#comment:24

 * The advantage would be less code to maintain, and we could theoretically
 even deprecate this function at some point (not a necessity though).
 * The disadvantage would be that `get_site_by()` returns a full object,
 while we only need an ID here. Not sure that's a real issue though, since
 it only queries for one result anyway, so it shouldn't have a significant
 impact on performance.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42072#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list