[wp-trac] [WordPress Trac] #28290: Changing _site_option functions for _network_option functions

WordPress Trac noreply at wordpress.org
Wed Oct 7 17:34:02 UTC 2015


#28290: Changing _site_option functions for _network_option functions
------------------------------------+-------------------------
 Reporter:  jmlapam                 |       Owner:  jeremyfelt
     Type:  enhancement             |      Status:  reviewing
 Priority:  normal                  |   Milestone:  4.4
Component:  Options, Meta APIs      |     Version:  4.0
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  multisite
------------------------------------+-------------------------

Comment (by jeremyfelt):

 Replying to [comment:44 spacedmonkey]:
 > Can someone explain why this was reverted? The commit doesn't explain
 the reasoning...

 Yep, sorry! I reversed the order of commenting in places. :)

 We had a good [https://wordpress.slack.com/archives/core-
 multisite/p1444067812000003 discussion] in #core-multisite a couple days
 ago and then [https://wordpress.slack.com/archives/core-
 multisite/p1444162024000068 another one yesterday] and decided to change
 the parameter order in the `_network_option()` functions so that
 `$network_id` is first.

 My summary:

 * The parameter order feels nicer when retrieving an option for another
 network.
 * `_blog_option()` accepts an ID as the first parameter. It would be
 strange to have another similar function with a different order.
 * WP Multi Network has provided `_network_option()` with `$network_id` as
 the first parameter for quite a while. We eliminate some edge case fatals
 by doing this.
 * `_site_option()` functions will remain as the method for retrieving data
 about the current network without having to provide a network ID.

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


More information about the wp-trac mailing list