[wp-trac] [WordPress Trac] #38039: Invalid PHPDOC for get_sites

WordPress Trac noreply at wordpress.org
Tue Sep 13 12:08:08 UTC 2016


#38039: Invalid PHPDOC for get_sites
--------------------------------+-----------------------------
 Reporter:  MaximeCulea         |      Owner:
     Type:  enhancement         |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Networks and Sites  |    Version:  4.6.1
 Severity:  normal              |   Keywords:
  Focuses:  multisite           |
--------------------------------+-----------------------------
 It seems that the PHPDOC for `get_sites` is invalid.

 While it is written that the `$network_id` arg allows to **Limit results
 to those affiliated with a given network ID. Default current network
 ID.**.
 In fact if we look closely to `WP_Site_Query` and his `$network_id`arg, it
 is specified that **Limit results to those affiliated with a given network
 ID. If 0, include all networks. Default 0.**.

 So when using `get_sites` with no network_id given, it will not return
 sites from the current network but from all networks.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38039>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list