WordPress at a glance
filter is not described

networks_pre_query filter-hook . WP 5.2.0

Filter the sites array before the query takes place.

Return a non-null value to bypass WordPress's default site queries.


add_filter( 'networks_pre_query', 'filter_function_name_3056', 10, 2 );
function filter_function_name_3056( $site_ids, $this ){
	// filter...

	return $site_ids;
Return an array of site data to short-circuit WP's site query, or null to allow WP to run its normal queries.
The WP_Network_Query instance, passed by reference.


Since 5.2.0 Introduced.

Where the hook is called

wp-includes/class-wp-network-query.php 214
$network_ids = apply_filters_ref_array( 'networks_pre_query', array( $network_ids, &$this ) );

Where the hook is used (in WP core)

Usage not found!