Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: the_sites

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
368
369           /**
370            * Filters the site query results.
371            *
372            * @since 4.6.0
373            *
374            * @param WP_Site[]     $_sites An array of WP_Site objects.
375            * @param WP_Site_Query $this   Current instance of WP_Site_Query (passed by reference).
376            */
377           $_sites = apply_filters_ref_array( 'the_sites', array( $_sites, &$this ) );
378
379           // Convert to WP_Site instances.
380           $this->sites = array_map( 'get_site', $_sites );
381
382           return $this->sites;
383      }
384
385      /**
386       * Used internally to get a list of site IDs matching the query vars.