[wp-trac] [WordPress Trac] #33900: introduce get_current_network_id helper function
WordPress Trac
noreply at wordpress.org
Wed Jun 8 06:22:32 UTC 2016
#33900: introduce get_current_network_id helper function
--------------------------------+------------------------
Reporter: spacedmonkey | Owner: flixos90
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.6
Component: Networks and Sites | Version: 4.4
Severity: normal | Resolution:
Keywords: has-patch | Focuses: multisite
--------------------------------+------------------------
Comment (by jeremyfelt):
Replying to [comment:12 flixos90]:
> I wonder whether the instance check is really necessary (edge-case)
We may be better off with an `isset()` instead. If the function is used in
`sunrise.php` for some reason, it's possible that things are not full
objects yet but still have the `id` property. We then convert to `
WP_Network` object in `ms-settings.php`. [attachment:33900.diff] takes
this route.
Thoughts?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33900#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list