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 |
---|---|
314 | * @since 5.2.0 |
315 | * @since 5.6.0 The returned array of site data is assigned to the `sites` property |
316 | * of the current WP_Site_Query instance. |
317 | * |
318 | * @param array|int|null $site_data Return an array of site data to short-circuit WP's site query, |
319 | * the site count as an integer if `$this->query_vars['count']` is set, |
320 | * or null to run the normal queries. |
321 | * @param WP_Site_Query $this The WP_Site_Query instance, passed by reference. |
322 | */ |
323 | $site_data = apply_filters_ref_array( 'sites_pre_query', array( $site_data, &$this ) ); |
324 |
|
325 | if ( null !== $site_data ) { |
326 | if ( is_array( $site_data ) && ! $this->query_vars['count'] ) { |
327 | $this->sites = $site_data; |
328 | } |
329 |
|
330 | return $site_data; |
331 | } |
332 |
|