networks_clauses filter-hookWP 4.6.0

Filters the network query clauses.

Usage

add_filter( 'networks_clauses', 'wp_kama_networks_clauses_filter', 10, 2 );

/**
 * Function for `networks_clauses` filter-hook.
 * 
 * @param string[]         $clauses An associative array of network query clauses.
 * @param WP_Network_Query $query   Current instance of WP_Network_Query (passed by reference).
 *
 * @return string[]
 */
function wp_kama_networks_clauses_filter( $clauses, $query ){

	// filter...
	return $clauses;
}
$clauses(string[])
An associative array of network query clauses.
$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_network_ids()
networks_clauses
wp-includes/class-wp-network-query.php 451
$clauses = apply_filters_ref_array( 'networks_clauses', array( compact( $clauses ), &$this ) );

Where the hook is used in WordPress

Usage not found.