the_sites filter-hook . WP 4.6.0
Filters the site query results.
Usage
add_filter( 'the_sites', 'filter_function_name_6848', 10, 2 ); function filter_function_name_6848( $_sites, $this ){ // filter... return $_sites; }
- $_sites(WP_Site[])
- An array of WP_Site objects.
- $this(WP_Site_Query)
- Current instance of WP_Site_Query (passed by reference).
Changelog
Since 4.6.0 | Introduced. |
Where the hook is called
wp-includes/class-wp-site-query.php 401
$_sites = apply_filters_ref_array( 'the_sites', array( $_sites, &$this ) );