[wp-trac] [WordPress Trac] #36717: Allow to access network and site properties using the current naming conventions

WordPress Trac noreply at wordpress.org
Tue May 24 05:09:03 UTC 2016


#36717: Allow to access network and site properties using the current naming
conventions
--------------------------------+------------------------
 Reporter:  flixos90            |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  4.6
Component:  Networks and Sites  |     Version:  4.5
 Severity:  normal              |  Resolution:
 Keywords:  has-patch           |     Focuses:  multisite
--------------------------------+------------------------
Changes (by jeremyfelt):

 * keywords:  has-patch 2nd-opinion => has-patch


Comment:

 [attachment:36717.2.diff] makes a couple changes:

 * Use `ID` rather than `id` for both to follow precedent set by `WP_User`
 and `WP_Post`.
 * Use `if` vs `switch` in `WP_Network` since we're only checking one key.
 * Small changes to docs.

 To recap, we'll get:

 * `$network->ID`
 * `$network->site_id`
 * `$site->ID`
 * `$site->network_id`

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


More information about the wp-trac mailing list