WordPress.org

Make WordPress Core

Changeset 41918


Ignore:
Timestamp:
10/18/2017 06:12:20 PM (2 years ago)
Author:
flixos90
Message:

Multisite: Document all return types in get_networks().

Adds more complete documentation to get_networks() and the corresponding methods in WP_Network_Query.

Fixes #42260.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-network-query.php

    r41686 r41918  
    171171     *
    172172     * @param string|array $query Array or URL query string of parameters.
    173      * @return array|int List of networks, or number of networks when 'count' is passed as a query var.
     173     * @return array|int List of WP_Network objects, a list of network ids when 'fields' is set to 'ids',
     174     *                   or the number of networks when 'count' is passed as a query var.
    174175     */
    175176    public function query( $query ) {
     
    183184     * @since 4.6.0
    184185     *
    185      * @return int|array The list of networks.
     186     * @return array|int List of WP_Network objects, a list of network ids when 'fields' is set to 'ids',
     187     *                   or the number of networks when 'count' is passed as a query var.
    186188     */
    187189    public function get_networks() {
  • trunk/src/wp-includes/ms-blogs.php

    r41912 r41918  
    11171117 * @param string|array $args Optional. Array or string of arguments. See WP_Network_Query::parse_query()
    11181118 *                           for information on accepted arguments. Default empty array.
    1119  * @return int|array List of networks or number of found networks if `$count` argument is true.
     1119 * @return array|int List of WP_Network objects, a list of network ids when 'fields' is set to 'ids',
     1120 *                   or the number of networks when 'count' is passed as a query var.
    11201121 */
    11211122function get_networks( $args = array() ) {
Note: See TracChangeset for help on using the changeset viewer.