[wp-trac] [WordPress Trac] #27003: Introduce wp_get_network() and begin cleanup of multisite load
WordPress Trac
noreply at wordpress.org
Fri Feb 7 01:27:48 UTC 2014
#27003: Introduce wp_get_network() and begin cleanup of multisite load
-------------------------------------------------+-------------------------
Reporter: jeremyfelt | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: Bootstrap/Load | Review
Severity: normal | Version: trunk
Keywords: has-patch needs-testing dev- | Resolution:
feedback | Focuses: multisite
-------------------------------------------------+-------------------------
Comment (by jeremyfelt):
Ok. [attachment:27003.2.diff] takes another approach via
`get_network_by_path()`. This function accepts only `$domain` and `$path`
as arguments and walks through some possibilities in an attempt to find a
matching network.
On a request for `http://foo.bar.network.com/path/page-title/`, the
matching occurs like this:
1. `foo.bar.network.com/path/`
2. `foo.bar.network.com/`
3. `bar.network.com/path/`
4. `bar.network.com/`
5. `network.com/path/`
6. `network.com/`
If no matching network is found from those possibilities, false is
returned. I've tested this a bit in a multinetwork setup and it seems to
be doing the trick thus far. I got rid of my `sunrise.php` and have been
flipping between networks. My favorite part is that it ditches
`is_subdomain_install()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27003#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list