the_networks filter-hookWP 4.6.0

Filters the network query results.

Usage

add_filter( 'the_networks', 'wp_kama_the_networks_filter', 10, 2 );

/**
 * Function for `the_networks` filter-hook.
 * 
 * @param WP_Network[]     $_networks An array of WP_Network objects.
 * @param WP_Network_Query $query     Current instance of WP_Network_Query (passed by reference).
 *
 * @return WP_Network[]
 */
function wp_kama_the_networks_filter( $_networks, $query ){

	// filter...
	return $_networks;
}
$_networks(WP_Network[])
An array of WP_Network objects.
$query(WP_Network_Query)
Current instance of WP_Network_Query (passed by reference).

Changelog

Since 4.6.0 Introduced.

Where the hook is called

WP_Network_Query::get_networks()
the_networks
wp-includes/class-wp-network-query.php 308
$_networks = apply_filters_ref_array( 'the_networks', array( $_networks, &$this ) );

Where the hook is used in WordPress

Usage not found.