[wp-trac] [WordPress Trac] #40180: Introduce `get_site_by()` function for multisite

WordPress Trac noreply at wordpress.org
Fri Mar 17 14:03:47 UTC 2017


#40180: Introduce `get_site_by()` function for multisite
--------------------------------+------------------------
 Reporter:  flixos90            |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  4.8
Component:  Networks and Sites  |     Version:
 Severity:  normal              |  Resolution:
 Keywords:  2nd-opinion         |     Focuses:  multisite
--------------------------------+------------------------

Comment (by stephdau):

 There is one thing we'll need to contend with, for consistency, with other
 `get_*_by()` instances: `get_user_by()`, `get_term_by()`, etc all assume
 that the 1st parameter is a single `$field`, such as `login` (user) or
 `slug` (term).

 In the case of `get_blog_details()`, that same equivalent parameter can
 accept an array of `$fields`, such as `array( 'domain' => 'blah.com',
 'path' => '/' )`;

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


More information about the wp-trac mailing list