[wp-trac] [WordPress Trac] #38152: Clarify in the DocBlock that get_site_by_path() does not return exact matches

WordPress Trac noreply at wordpress.org
Sat Sep 24 08:23:43 UTC 2016


#38152: Clarify in the DocBlock that get_site_by_path() does not return exact
matches
--------------------------------+----------------------------------------
 Reporter:  ocean90             |      Owner:
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Future Release
Component:  Networks and Sites  |    Version:
 Severity:  normal              |   Keywords:  needs-patch good-first-bug
  Focuses:  docs, multisite     |
--------------------------------+----------------------------------------
 Related Slack discussion: https://wordpress.slack.com/archives/core-
 multisite/p1474390310000390

 `get_site_by_path()` does not return exact matches because it also
 searches sites with path = '/'. The same applies to
 `WP_Network::get_by_path()`  but
 [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-wp-
 network.php?rev=37919&marks=253-258#L250 its DocBlock] is much better. We
 should add a similar comment to `get_site_by_path()`.

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


More information about the wp-trac mailing list