Changeset 38102
- Timestamp:
- 07/19/2016 01:09:39 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-network-query.php
r38003 r38102 109 109 * @type bool $no_found_rows Whether to disable the `SQL_CALC_FOUND_ROWS` query. Default true. 110 110 * @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 disable112 * `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'. 113 113 * @type string $order How to order retrieved networks. Accepts 'ASC', 'DESC'. Default 'ASC'. 114 114 * @type string $domain Limit results to those affiliated with a given network ID. … … 133 133 'offset' => '', 134 134 'no_found_rows' => true, 135 'orderby' => ' ',135 'orderby' => 'id', 136 136 'order' => 'ASC', 137 137 'domain' => '', -
trunk/tests/phpunit/tests/multisite/networkQuery.php
r37894 r38102 60 60 } 61 61 62 public function test_wp_network_query_by_network__in_with_order() { 63 $expected = array( self::$network_ids['wordpress.org/'], self::$network_ids['make.wordpress.org/'] ); 64 65 $q = new WP_Network_Query(); 66 $found = $q->query( array( 67 'fields' => 'ids', 68 'network__in' => $expected, 69 'order' => 'ASC', 70 ) ); 71 72 $this->assertEquals( $expected, $found ); 73 74 $found = $q->query( array( 75 'fields' => 'ids', 76 'network__in' => $expected, 77 'order' => 'DESC', 78 ) ); 79 80 $this->assertEquals( array_reverse( $expected ), $found ); 81 } 82 62 83 public function test_wp_network_query_by_network__in_with_single_id() { 63 84 $expected = array( self::$network_ids['wordpress.org/'] );
Note: See TracChangeset
for help on using the changeset viewer.