[wp-trac] [WordPress Trac] #27003: Introduce wp_get_network() and begin cleanup of multisite load
WordPress Trac
noreply at wordpress.org
Wed Mar 5 15:23:08 UTC 2014
#27003: Introduce wp_get_network() and begin cleanup of multisite load
----------------------------+------------------------
Reporter: jeremyfelt | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 3.9
Component: Bootstrap/Load | Version: trunk
Severity: normal | Resolution:
Keywords: needs-testing | Focuses: multisite
----------------------------+------------------------
Comment (by jeremyfelt):
Replying to [comment:44 nacin]:
> I imagine if a site doesn't match a network now, with no special
handling (a plugin, etc.), COOKIE_DOMAIN would be set to the network, and
the site wouldn't have functioning cookies?
Exactly. 27003.21.diff (very weak) forced the site domain rather than the
network domain, but that only works when the paths on each are the same.
We need to determine the best way to handle `COOKIE_DOMAIN`, `COOKIEPATH`,
`SITECOOKIEPATH`, and `ADMIN_COOKIE_PATH`, all which are set in
`ms_cookie_constants()` if not previously set elsewhere.
One option is to continue with each page load resulting in one set of
cookies. This would be relatively straight forward and requires that
`ms_cookie_constants()` have access to current site and network
information. Cookie constants would then be set based on the site that
loaded, not the network.
Another option is to consider cases when setting cookies for multiple
domains might be desirable. Though a user with access to one site doesn't
necessarily need (or want) cookies for the network's primary admin site.
This is probably best left to developers with sunrise or elsewhere. We
could add filters in `ms_cookie_constant()` to provide a nice way in.
Also possible alongside either approach—wrapping `setcookie()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27003#comment:46>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list