[wp-trac] [WordPress Trac] #33900: introduce get_current_network_id helper function
WordPress Trac
noreply at wordpress.org
Sat Apr 16 20:39:13 UTC 2016
#33900: introduce get_current_network_id helper function
--------------------------------+------------------------
Reporter: spacedmonkey | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.6
Component: Networks and Sites | Version: 4.4
Severity: normal | Resolution:
Keywords: has-patch | Focuses: multisite
--------------------------------+------------------------
Comment (by johnjamesjacoby):
My thoughts:
* Yes
* Yes
* Yes
The second condition could maybe happen if `sunrise.php` was already in
place and wasn't using core functions to populate `$current_site`, and
honestly this seems likely for anyone that's using `sunrise.php` since the
only thing it is really great at is pre-populating those globals.
----
Tangentially, the assumed `1` main network ID return value bothers me. A
new default constant makes sense here, itself defaulted to `1` in
WordPress core. And it can still be overridden in `sunrise.php` or `wp-
config.php`. It's edge-case, but I've already needed to kludge this
because a new network with a few sites took the place of the original one.
So for each of the 3 cases, I'd like for the `1` default return value to
be configurable in some way.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33900#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list