[wp-trac] [WordPress Trac] #37053: Ensure `get_site_by_path()` returns a `WP_Site`

WordPress Trac noreply at wordpress.org
Fri Sep 30 04:09:47 UTC 2016


#37053: Ensure `get_site_by_path()` returns a `WP_Site`
--------------------------------------+------------------------------
 Reporter:  flixos90                  |       Owner:  jeremyfelt
     Type:  enhancement               |      Status:  closed
 Priority:  normal                    |   Milestone:  4.7
Component:  Networks and Sites        |     Version:  4.6
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  docs, multisite
--------------------------------------+------------------------------
Changes (by jeremyfelt):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"38681"]:
 {{{
 #!CommitTicketReference repository="" revision="38681"
 Multisite: Ensure a consistent `WP_Site` return from `get_site_by_path()`.

 It is possible to short circuit `get_site_by_path()` using the
 `pre_get_site_by_path` filter. When this happens and a standard site
 object is provided, we can make sure it is upgraded to a proper `WP_Site`
 object before passing it on.

 Props flixos90.
 Fixes #37053.
 }}}

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


More information about the wp-trac mailing list