Changeset 49538 for trunk/src/wp-includes/class-wp-network-query.php
- Timestamp:
- 11/08/2020 11:45:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-network-query.php
r49108 r49538 213 213 * - Otherwise the filter should return an array of WP_Network objects. 214 214 * 215 * Note that if the filter returns an array of network data, it will be assigned 216 * to the `networks` property of the current WP_Network_Query instance. 217 * 218 * Filtering functions that require pagination information are encouraged to set 219 * the `found_networks` and `max_num_pages` properties of the WP_Network_Query object, 220 * passed to the filter by reference. If WP_Network_Query does not perform a database 221 * query, it will not have enough information to generate these values itself. 222 * 215 223 * @since 5.2.0 224 * @since 5.6.0 The returned array of network data is assigned to the `networks` property 225 * of the current WP_Network_Query instance. 216 226 * 217 227 * @param array|int|null $network_data Return an array of network data to short-circuit WP's network query, … … 223 233 224 234 if ( null !== $network_data ) { 235 if ( is_array( $network_data ) && ! $this->query_vars['count'] ) { 236 $this->networks = $network_data; 237 } 238 225 239 return $network_data; 226 240 }
Note: See TracChangeset
for help on using the changeset viewer.