[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/ -> class-wp-network-query.php (summary)

Network API: WP_Network_Query class

File Size: 603 lines (19 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Network_Query:: (9 methods):
  __construct()
  parse_query()
  query()
  get_networks()
  get_network_ids()
  set_found_networks()
  get_search_sql()
  parse_orderby()
  parse_order()


Class: WP_Network_Query  - X-Ref

Core class used for querying networks.

__construct( $query = '' )   X-Ref
Constructor.

Sets up the network query, based on the query vars passed.

param: string|array $query {
since: 4.6.0

parse_query( $query = '' )   X-Ref
Parses arguments passed to the network query with default query parameters.

param: string|array $query WP_Network_Query arguments. See WP_Network_Query::__construct()
since: 4.6.0

query( $query )   X-Ref
Sets up the WordPress query for retrieving networks.

return: array|int List of WP_Network objects, a list of network IDs when 'fields' is set to 'ids',
param: string|array $query Array or URL query string of parameters.
since: 4.6.0

get_networks()   X-Ref
Gets a list of networks matching the query vars.

return: array|int List of WP_Network objects, a list of network IDs when 'fields' is set to 'ids',
since: 4.6.0

get_network_ids()   X-Ref
Used internally to get a list of network IDs matching the query vars.

return: int|array A single count of network IDs if a count query. An array of network IDs if a full query.
since: 4.6.0

set_found_networks()   X-Ref
Populates found_networks and max_num_pages properties for the current query
if the limit clause was used.

since: 4.6.0

get_search_sql( $search, $columns )   X-Ref
Used internally to generate an SQL string for searching across multiple columns.

return: string Search SQL.
param: string   $search  Search string.
param: string[] $columns Array of columns to search.
since: 4.6.0

parse_orderby( $orderby )   X-Ref
Parses and sanitizes 'orderby' keys passed to the network query.

return: string|false Value to used in the ORDER clause. False otherwise.
param: string $orderby Alias for the field to order by.
since: 4.6.0

parse_order( $order )   X-Ref
Parses an 'order' query variable and cast it to 'ASC' or 'DESC' as necessary.

return: string The sanitized 'order' query variable.
param: string $order The 'order' query variable.
since: 4.6.0



Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1