[wp-trac] [WordPress Trac] #21143: Add a hook for when no blog is found (in addition to NOBLOGREDIRECT)
WordPress Trac
noreply at wordpress.org
Wed Mar 5 06:02:22 UTC 2014
#21143: Add a hook for when no blog is found (in addition to NOBLOGREDIRECT)
------------------------------------+------------------------
Reporter: jamescollins | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.9
Component: Bootstrap/Load | Version:
Severity: normal | Resolution:
Keywords: dev-feedback has-patch | Focuses: multisite
------------------------------------+------------------------
Comment (by jeremyfelt):
Replying to [comment:17 jeremyfelt]:
> I wonder how necessary that signup redirect is. If that was taken out or
checked separately, the redirect decision would become cleaner.
I attempted to clean this up a bit in
[https://core.trac.wordpress.org/attachment/ticket/21143/21143.3.diff
21143.3.diff].
1. The `network_not_found` action fires before `ms_not_installed()` if a
network cannot be found.
1. If we find a network but no site and `WP_INSTALLING` is set, set a blog
ID of 1 to continue loading WordPress.
1. If we're not installing and we haven't found anything, fire
`site_not_found` before...
a. If it's a subdomain install, redirect to one of `NOBLOGREDIRECT` if
defined, the network's signup URL if registration is set to anything other
than none, or the main network domain/path.
b. If it's a subdirectory install and the requested domain doesn't
match the network's domain, redirect to the network's domain and path.
c. Bail completely with `ms_not_installed()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21143#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list