[wp-trac] [WordPress Trac] #31377: Add optional blogname to wp_get_sites

WordPress Trac noreply at wordpress.org
Thu Feb 19 17:11:37 UTC 2015


#31377: Add optional blogname to wp_get_sites
--------------------------------+------------------------------
 Reporter:  elliott-stocks      |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Networks and Sites  |     Version:  trunk
 Severity:  normal              |  Resolution:
 Keywords:                      |     Focuses:  multisite
--------------------------------+------------------------------

Comment (by elliott-stocks):

 Replying to [comment:1 jeremyfelt]:
 > Hi @elliott-stocks, thanks for the report and the patch!
 >
 > Expanding `wp_get_sites()` is definitely a goal. #31148 is working to
 allow searching by domain/path, which may effectively cover the blogname
 search for most scenarios.
 >
 > Searching for data stored in individual options tables rather than in
 the global `wp_site` and `wp_sitemeta` tables inspires caution. I'm not
 sure we would want to go there yet.
 >

 Thanks for the feedback! I figured running the query would be quicker than
 calling `get_blog_option()` per site, as with a huge network that may
 result in a lot of unnecessary calls to `switch_to_blog()`.

 I'd be happy to hear your thoughts on improving this.

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


More information about the wp-trac mailing list