the_sites filter-hookWP 4.6.0

Filters the site query results.

Usage

add_filter( 'the_sites', 'wp_kama_the_sites_filter' );

/**
 * Function for `the_sites` filter-hook.
 * 
 * @param WP_Site[] $_sites An array of WP_Site objects.
 *
 * @return WP_Site[]
 */
function wp_kama_the_sites_filter( $_sites ){

	// filter...
	return $_sites;
}
$_sites(WP_Site[])
An array of WP_Site objects.

Changelog

Since 4.6.0 Introduced.

Where the hook is called

WP_Site_Query::get_sites()
the_sites
wp-includes/class-wp-site-query.php 423
$_sites = apply_filters_ref_array( 'the_sites', array( $_sites, &$this ) );

Where the hook is used in WordPress

Usage not found.