[wp-trac] [WordPress Trac] #33900: introduce get_current_network_id helper function

WordPress Trac noreply at wordpress.org
Wed Jun 8 09:05:40 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 flixos90):

 Replying to [comment:14 jeremyfelt]:
 > 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?

 Makes sense to me, this will make it more accurate in those use-cases.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33900#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list