WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
326 | * @since 5.2.0 |
327 | * @since 5.6.0 The returned array of site data is assigned to the `sites` property |
328 | * of the current WP_Site_Query instance. |
329 | * |
330 | * @param array|int|null $site_data Return an array of site data to short-circuit WP's site query, |
331 | * the site count as an integer if `$this->query_vars['count']` is set, |
332 | * or null to run the normal queries. |
333 | * @param WP_Site_Query $query The WP_Site_Query instance, passed by reference. |
334 | */ |
335 | $site_data = apply_filters_ref_array( 'sites_pre_query', array( $site_data, &$this ) ); |
336 |
|
337 | if ( null !== $site_data ) { |
338 | if ( is_array( $site_data ) && ! $this->query_vars['count'] ) { |
339 | $this->sites = $site_data; |
340 | } |
341 |
|
342 | return $site_data; |
343 | } |
344 |
|