A WordPress-centric search engine for devs and theme authors



sites_pre_query ›

Since5.2.0
Deprecatedn/a
apply_filters_ref_array( 'sites_pre_query', array( $site_ids, &$this )
Parameters: (2)
  • (array|null) $site_ids Return an array of site data to short-circuit WP's site query, or null to allow WP to run its normal queries.
    Required: Yes
  • (WP_Site_Query) $this The WP_Site_Query instance, passed by reference.
    Required: Yes
Defined at:
Codex:

Filter the sites array before the query takes place.

Return a non-null value to bypass WordPress's default site queries.





Source

$site_ids = apply_filters_ref_array( 'sites_pre_query', array( $site_ids, &$this ) );