WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/19/2016 01:09:39 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Multisite: Correct default value for orderby in WP_Network_Query::__construct().

Add a unit test.

See #32504.

File:
1 edited

Legend:

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

    r38003 r38102  
    109109     *     @type bool         $no_found_rows        Whether to disable the `SQL_CALC_FOUND_ROWS` query. Default true.
    110110     *     @type string|array $orderby              Network status or array of statuses. Accepts 'id', 'domain', 'path',
    111      *                                              'domain_length', 'path_length' and 'network__in'. Also accepts false, an empty array, or 'none' to disable
    112      *                                              `ORDER BY` clause. Default 'id'.
     111     *                                              'domain_length', 'path_length' and 'network__in'. Also accepts false,
     112     *                                              an empty array, or 'none' to disable `ORDER BY` clause. Default 'id'.
    113113     *     @type string       $order                How to order retrieved networks. Accepts 'ASC', 'DESC'. Default 'ASC'.
    114114     *     @type string       $domain               Limit results to those affiliated with a given network ID.
     
    133133            'offset'               => '',
    134134            'no_found_rows'        => true,
    135             'orderby'              => '',
     135            'orderby'              => 'id',
    136136            'order'                => 'ASC',
    137137            'domain'               => '',
Note: See TracChangeset for help on using the changeset viewer.