[wp-trac] [WordPress Trac] #38175: Use `get_sites()` instead of a database lookup in `get_id_from_blogname()`

WordPress Trac noreply at wordpress.org
Tue Sep 27 17:55:07 UTC 2016


#38175: Use `get_sites()` instead of a database lookup in `get_id_from_blogname()`
--------------------------------+-----------------
 Reporter:  jeremyfelt          |      Owner:
     Type:  enhancement         |     Status:  new
 Priority:  normal              |  Milestone:  4.7
Component:  Networks and Sites  |    Version:
 Severity:  normal              |   Keywords:
  Focuses:  multisite           |
--------------------------------+-----------------
 This was originally introduced in a patch on #34450, but deserved its own
 ticket due to the scope of changes.

 Now that `get_sites()` is available (4.6.0) and via `WP_Site_Query`
 (4.6.0) caches queries, we can use this to handle the slug lookup instead
 of the manual database query.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38175>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list