Uses
Uses | Description |
---|---|
wp-includes/class-wp-site-query.php: WP_Site_Query::query() | Sets up the WordPress query for retrieving sites. |
Sets up the site query, based on the query vars passed.
(string|array) (Optional) Array or query string of site query parameters.
SQL_CALC_FOUND_ROWS
query. Default true.ORDER BY
clause. Default 'id'.WP_Meta_Query
. $meta_value
. $meta_key
. $meta_value
column will be CAST to for comparisons. $meta_value
. Default value: ''
File: wp-includes/class-wp-site-query.php
public function __construct( $query = '' ) { $this->query_var_defaults = array( 'fields' => '', 'ID' => '', 'site__in' => '', 'site__not_in' => '', 'number' => 100, 'offset' => '', 'no_found_rows' => true, 'orderby' => 'id', 'order' => 'ASC', 'network_id' => 0, 'network__in' => '', 'network__not_in' => '', 'domain' => '', 'domain__in' => '', 'domain__not_in' => '', 'path' => '', 'path__in' => '', 'path__not_in' => '', 'public' => null, 'archived' => null, 'mature' => null, 'spam' => null, 'deleted' => null, 'lang_id' => null, 'lang__in' => '', 'lang__not_in' => '', 'search' => '', 'search_columns' => array(), 'count' => false, 'date_query' => null, // See WP_Date_Query. 'update_site_cache' => true, 'update_site_meta_cache' => true, 'meta_query' => '', 'meta_key' => '', 'meta_value' => '', 'meta_type' => '', 'meta_compare' => '', ); if ( ! empty( $query ) ) { $this->query( $query ); } }
Version | Description |
---|---|
5.1.0 | Introduced the 'update_site_meta_cache', 'meta_query', 'meta_key', 'meta_value', 'meta_type' and 'meta_compare' parameters. |
4.8.0 | Introduced the 'lang_id', 'lang__in', and 'lang__not_in' parameters. |
4.6.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_site_query/__construct